rs6000: Split rs6000_cpu
[platform/upstream/gcc.git] / gcc / ChangeLog
1 2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>
2
3         * config/rs6000/rs6000.opt (rs6000_tune): New variable.
4         * config/rs6000/rs6000.c (rs6000_option_override_internal): Also set
5         rs6000_tune.  Use rs6000_tune instead of rs6000_cpu where appropriate.
6         (rs6000_loop_align): Use rs6000_tune instead of rs6000_cpu where
7         appropriate.
8         (rs6000_reassociation_width): Ditto.
9         (rs6000_emit_epilogue): Ditto.
10         (rs6000_adjust_cost): Ditto.
11         (is_microcoded_insn): Ditto.
12         (is_cracked_insn): Ditto.
13         (rs6000_adjust_priority): Ditto.
14         (rs6000_sched_reorder): Ditto.
15         (rs6000_sched_reorder2): Ditto.
16         (insn_must_be_first_in_group): Ditto.
17         (insn_must_be_last_in_group): Ditto.
18         (rs6000_register_move_cost): Ditto.
19         * config/rs6000/rs6000.h (rs6000_cpu_attr): Use rs6000_tune instead of
20         rs6000_cpu.
21
22 2017-12-07  Julia Koval  <julia.koval@intel.com>
23
24         * config.gcc: Add vaesintrin.h.
25         * config/i386/i386-builtin-types.def (V64QI_FTYPE_V64QI_V64QI): New type.
26         * config/i386/i386-builtin.def (__builtin_ia32_vaesdec_v16qi,
27         __builtin_ia32_vaesdec_v32qi, __builtin_ia32_vaesdec_v64qi): New builtins.
28         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
29         * config/i386/immintrin.h: Include vaesintrin.h.
30         * config/i386/sse.md (vaesdec_<mode>): New pattern.
31         * config/i386/vaesintrin.h (_mm256_aesdec_epi128, _mm512_aesdec_epi128,
32         _mm_aesdec_epi128): New intrinsics.
33
34 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
35
36         * Makefile.in (C_COMMON_OBJS): Add c-family/c-spellcheck.o.
37         * spellcheck-tree.c (find_closest_macro_cpp_cb): Move to
38         c-family/c-spellcheck.cc.
39         (best_macro_match::best_macro_match): Likewise.
40         * spellcheck-tree.h
41         (struct edit_distance_traits<cpp_hashnode *>): Move to
42         c-family/c-spellcheck.h.
43         (class best_macro_match): Likewise.
44
45 2017-12-06  Jakub Jelinek  <jakub@redhat.com>
46
47         PR tree-optimization/83293
48         * gimple-ssa-strength-reduction.c (insert_initializers): Use
49         GSI_NEW_STMT instead of GSI_SAME_STMT in gsi_insert_after that
50         might insert into empty bb.
51
52         PR sanitizer/81281
53         * match.pd ((T)(P + A) - (T)P -> (T) A): Split into separate
54         simplify for plus with :c added, and pointer_plus without that.
55         ((T)P - (T)(P + A) -> -(T) A): Likewise.  If type is integral
56         with undefined overflow and the conversion is not widening,
57         perform negation in utype and only convert to type afterwards.
58         ((T)(P + A) - (T)(P + B) -> (T)A - (T)B): Split into separate
59         simplify for plus with :c added, and pointer_plus without that.
60         If type is integral with undefined overflow and the conversion is
61         not widening, perform minus in utype and only convert to type
62         afterwards.  Move the last pointer_diff_expr simplify into the
63         two outermost ifs.
64
65 2017-12-06  Martin Sebor  <msebor@redhat.com>
66
67         PR tree-optimization/82646
68         * builtins.c (maybe_emit_chk_warning): Use size as the bound for
69         strncpy, not maxlen.
70
71 2017-12-06  Martin Sebor  <msebor@redhat.com>
72
73         * doc/invoke.texi (-Wstringop-truncation): Mention attribute
74         nonstring.
75
76         PR tree-optimization/83075
77         * tree-ssa-strlen.c (handle_builtin_stxncpy): Avoid assuming
78         strncat/strncpy don't change length of source string.
79
80 2017-12-06  Eric Botcazou  <ebotcazou@adacore.com>
81
82         Revert
83         2017-11-29  Martin Aberg  <maberg@gaisler.com>
84
85         * config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length
86         to prevent b2bst errata sequence.
87         (sqrtdf2_fix): Likewise.
88
89 2017-12-06  Jakub Jelinek  <jakub@redhat.com>
90
91         PR tree-optimization/81945
92         * cfgloop.h (FOR_EACH_LOOP_FN): Use FN instead of hardcoding fn.
93         * tree-cfg.c (move_sese_region_to_fn): If any of the loops moved
94         to dest_cfun has orig_loop_num set, either remap it to the new
95         loop number if the loop got moved too, or clear it.
96
97 2017-12-05  Steve Ellcey  <sellcey@cavium.com>
98
99         * config/aarch64/thunderx2-t99.md (thunderx2t99_branch): Add trap
100         to reservation.
101         (thunderx2t99_nothing): New insn reservation.
102         (thunderx2t99_mrs): New insn reservation.
103         (thunderx2t99_multiple): New insn reservation.
104         (thunderx2t99_alu_basi): Add bfx to reservation.
105         (thunderx2t99_fp_cmp): Add fccmps and fccmpd to reservation.
106
107 2017-12-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
108
109         PR target/82248
110         * config/arm/arm.md (probe_stack) : Use the 'o' constraint.
111
112 2017-12-05  Bin Cheng  <bin.cheng@arm.com>
113
114         * tree-ssa-dce.c (simple_dce_from_worklist): Move and rename from
115         tree-ssa-pre.c::remove_dead_inserted_code.
116         * tree-ssa-dce.h: New file.
117         * tree-ssa-pre.c (tree-ssa-dce.h): Include new header file.
118         (remove_dead_inserted_code): Move and rename to function
119         tree-ssa-dce.c::simple_dce_from_worklist.
120         (pass_pre::execute): Update use.
121
122 2017-12-05  Richard Biener  <rguenther@suse.de>
123
124         PR tree-optimization/83277
125         * graphite-isl-ast-to-gimple.c (should_copy_to_new_region): Make sure
126         to code-gen liveout vars.
127
128 2017-12-05  Richard Sandiford  <richard.sandiford@linaro.org>
129
130         * config/aarch64/aarch64-simd.md (aarch64_simd_bsldi_internal)
131         (aarch64_simd_bsldi_alt): Check REG_P before GP_REGNUM_P.
132         (aarch64_cm<optab>di, aarch64_cmtstdi): Add leading "&&" to
133         split condition.
134
135 2017-12-05  Max Filippov  <jcmvbkbc@gmail.com>
136
137         * config/xtensa/xtensa.c (xtensa_asan_shadow_offset): New
138         function.
139         (TARGET_ASAN_SHADOW_OFFSET): New macro definition.
140         * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): Set to 1 if
141         ASAN is enabled.
142
143 2017-12-05  Richard Biener   <rguenther@suse.de>
144
145         * timevar.def (TV_TREE_RECIP, TV_TREE_SINCOS, TV_TREE_WIDEN_MUL):
146         Add.
147         * tree-ssa-math-opts.c (pass_data_cse_reciprocal): Use TV_TREE_RECIP.
148         (pass_data_cse_sincos): Use TV_TREE_SINCOS.
149         (pass_data_optimize_widening_mul): Use TV_TREE_WIDEN_MUL.
150
151 2017-12-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
152
153         * dbxout.c (dbxout_block): Grow buf to 30 bytes.
154
155 2017-12-05  Martin Liska  <mliska@suse.cz>
156             Jakub Jelinek  <jakub@redhat.com>
157
158         * doc/invoke.texi: Document the options.
159         * flag-types.h (enum sanitize_code): Add
160         SANITIZE_POINTER_COMPARE and SANITIZE_POINTER_SUBTRACT.
161         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Add handling
162         of SANITIZE_POINTER_COMPARE and SANITIZE_POINTER_SUBTRACT.
163         * opts.c: Define new sanitizer options.
164         * sanitizer.def (BUILT_IN_ASAN_POINTER_COMPARE): Likewise.
165         (BUILT_IN_ASAN_POINTER_SUBTRACT): Likewise.
166
167 2017-12-05  Julia Koval  <julia.koval@intel.com>
168
169         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VNNI_SET,
170         OPTION_MASK_ISA_AVX512VNNI_UNSET): New.
171         (ix86_handle_option): Handle -mavx512vnni.
172         * config/i386/cpuid.h (bit_AVX512VNNI): New bit.
173         * config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit.
174         * config/i386/i386-c (__AVX512VNNI__): New.
175         * config/i386/i386.c (ix86_target_string): Handle new option.
176         (ix86_valid_target_attribute_inner_p): Handle new option.
177         * config/i386/i386.h (TARGET_AVX512VNNI, TARGET_AVX512VNNI_P): New.
178         * config/i386/i386.opt (mavx512vnni): New option.
179
180 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
181
182         PR target/81616
183         * athlon.md: Disable for generic.
184         * haswell.md: Enable for generic.
185         * i386.c (ix86_sched_init_global): Add core hooks for generic.
186         * x86-tune-sched.c (ix86_issue_rate): Increase issue rate for generic
187         to 4.
188         (ix86_adjust_cost): Move generic to haswell path.
189
190 2017-12-04  Eric Botcazou  <ebotcazou@adacore.com>
191
192         * config/sparc/sparc.c (sparc_do_work_around_errata): Use mem_ref
193         instead of MEM_P in a couple more places.  Fix formatting issues.
194
195 2017-12-04  Jim Wilson  <jimw@sifive.com>
196
197         * config/riscv/riscv.c (riscv_for_each_saved_reg): Use GP_REG_LAST
198         instead of GP_REG_LAST-1.
199         (riscv_adjust_libcall_cfi_prologue): Likewise.
200         (riscv_adjust_libcall_cri_epilogue): Likewise.
201         * config/riscv/riscv.h (CALL_USED_REGISTERS): Change a6 to t6 in
202         comment.
203
204 2017-12-04  Luis Machado  <luis.machado@linaro.org>
205
206         * ipa-pure-const.c (check_decl): Add missing newline.
207         (state_from_flags): Likewise.
208
209 2017-12-04  Jeff Law  <law@redhat.com>
210
211         PR tree-optimizatin/78496
212         * gimple-ssa-evrp-analyze.h
213         (evrp_range_analyzer::get_vr_values): Simplify.
214         * gimple-ssa-evrp-analyze.c: Corresponding changes.
215         * tree-ssa-dom.c: Include alloc-pool.h, tree-vrp.h, vr-values.h
216         and gimple-ssa-evrp-analyze.h.
217         (dom_opt_dom_walker class): Add evrp_range_analyzer member.
218         (simplify_stmt_for_jump_threading): Copy a blob of code from
219         tree-vrp.c to use ranges to simplify statements.
220         (dom_opt_dom_walker::before_dom_children): Call
221         evrp_range_analyzer::{enter,record_ranges_from_stmt} methods.
222         (dom_opt_dom_walker::after_dom_children): Similarly for
223         evrp_range_analyzer::leave.
224         (dom_opt_dom_walker::optimize_stmt): Use EVRP ranges to optimize
225         conditionals.
226
227         * gimple-ssa-evrp-analyze.c
228         (evrp_range_analyzer::extract_range_from_stmt):  Always use
229         vr_values::update_value_range so preexisting range info is
230         medged with new range info, even if the new range is VR_VARYING.
231
232 2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>
233
234         * combine.c: Adjust comment.
235         (use_crosses_set_p): Delete.
236         (can_combine_p): Use modified_between_p instead of use_crosses_set_p.
237         (try_combine): Ditto.
238
239 2017-12-04  Richard Biener  <rguenther@suse.de>
240
241         PR tree-optimization/83255
242         * graphite-isl-ast-to-gimple.c (translate_isl_ast_node_for):
243         Re-add zero-iteration check.
244
245 2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>
246
247         PR rtl-optimization/83245
248         * lra.c (collect_non_operand_hard_regs): Treat clobbers of non-operand
249         hard registers as earlyclobber, also if not in an asm.
250
251 2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>
252
253         PR bootstrap/83265
254         Revert
255         2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
256
257         PR target/43871
258         * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
259         rs6000_cpu based on cpu_index, not tune_index.
260
261 2017-12-04  Richard Biener  <rguenther@suse.de>
262
263         PR tree-optimization/83238
264         * graphite-scop-detection.c (scop_detection::merge_sese): Make
265         code match comment, rejecting invalid SESE regions.
266
267 2017-12-03  John David Anglin  <danglin@gcc.gnu.org>
268
269         * config/pa/pa.c (pa_legitimate_address_p): For scaled indexing,
270         require base operand is a REG_POINTER prior to reload on targets
271         with non-equivalent space registers.
272
273 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
274
275         * ipa-cp.c (ipcp_lattice<valtype>::print): Update dumping.
276         (update_specialized_profile): Fix updating of counts.
277         (perhaps_add_new_callers): Likewise.
278
279 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
280
281         PR target/81616
282         * x86-tune.def: Remove obsolette FIXMEs.
283         (X86_TUNE_PARTIAL_FLAG_REG_STALL): Disable for generic
284         (X86_TUNE_FUSE_CMP_AND_BRANCH_32, X86_TUNE_FUSE_CMP_AND_BRANCH_64,
285         X86_TUNE_FUSE_CMP_AND_BRANCH_SOFLAGS, X86_TUNE_FUSE_ALU_AND_BRANCH):
286         Enable for generic.
287         (X86_TUNE_PAD_RETURNS): Disable for generic.
288
289 2017-12-02  Jakub Jelinek  <jakub@redhat.com>
290
291         PR tree-optimization/83170
292         PR tree-optimization/83241
293         * gimple-ssa-store-merging.c
294         (imm_store_chain_info::try_coalesce_bswap): Update vuse field from
295         gimple_vuse (ins_stmt) in case it has changed.
296         (imm_store_chain_info::output_merged_store): Likewise.
297
298         * tree-chkp.c (chkp_compute_bounds_for_assignment): Handle
299         POINTER_DIFF_EXPR.
300
301         PR c++/81212
302         * tree-cfg.c (pass_warn_function_return::execute): Handle
303         __builtin_ubsan_handle_missing_return like __builtin_unreachable
304         with BUILTINS_LOCATION.
305
306         PR target/78643
307         PR target/80583
308         * expr.c (get_inner_reference): If DECL_MODE of a non-bitfield
309         is BLKmode for vector field with vector raw mode, use TYPE_MODE
310         instead of DECL_MODE.
311
312         * config/i386/i386-protos.h (standard_sse_constant_opcode): Change
313         last argument to rtx pointer.
314         * config/i386/i386.c (standard_sse_constant_opcode): Replace X argument
315         with OPERANDS.  For AVX+ 128-bit VEX encoded instructions over 256-bit
316         or 512-bit.  If setting EXT_REX_SSE_REG_P, use EVEX encoded insn
317         depending on the chosen ISAs.
318         * config/i386/i386.md (*movxi_internal_avx512f, *movoi_internal_avx,
319         *movti_internal, *movdi_internal, *movsi_internal, *movtf_internal,
320         *movdf_internal, *movsf_internal): Adjust standard_sse_constant_opcode
321         callers.
322         * config/i386/sse.md (mov<mode>_internal): Likewise.
323         * config/i386/mmx.md (*mov<mode>_internal): Likewise.
324
325 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
326
327         * doc/invoke.texi (-dp): Say that instruction cost is printed as well.
328
329 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
330
331         * config/rs6000/rs6000-protos.h (emit_fusion_addis): Remove last two
332         parameters from prototype.
333         * config/rs6000/rs6000.c (emit_fusion_addis): Remove last two
334         parameters.  Don't print a comment.
335         (emit_fusion_gpr_load): Adjust.
336         (emit_fusion_load_store): Adjust.
337         * config/rs6000/rs6000.md (*fusion_p9_<mode>_constant): Adjust.
338         * config/rs6000/vsx.md (two peepholes): Print the "vector load fusion"
339         comment on the second line.
340
341 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
342
343         PR target/43871
344         * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
345         rs6000_cpu based on cpu_index, not tune_index.
346
347 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
348
349         * final.c (output_asm_name): Print insn_cost.  Shorten output.  Print
350         which_alternative instead of which_alternative + 1.
351         (output_asm_insn): Print an extra tab if the template is short.
352
353 2017-12-01  Jim Wilson  <jimw@sifive.com>
354
355         * common.opt (use_gnu_debug_info_extensions): Delete DWARF_DEBUG from
356         comment.
357         * config/vx-common.h (DWARF_DEBUGGING_INFO): Delete undef.
358         * doc/tm.texi.in (PREFERRED_DEBUGGING_TYPE): Delete DWARF_DEBUG
359         reference.
360         * doc/tm.texi: Regenerate.
361
362 2017-12-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
363
364         PR target/81959
365         * config/rs6000/rs6000.c (rs6000_address_for_fpconvert): Check for
366         whether we can allocate pseudos before trying to fix an address.
367         * config/rs6000/rs6000.md (float_<mode>si2_hw): Make sure the
368         memory address is indexed or indirect.
369         (floatuns_<mode>si2_hw2): Likewise.
370
371 2017-12-01  Jason Merrill  <jason@redhat.com>
372
373         * Makefile.in (TAGS): Add c-family/*.cc.
374
375 2017-12-01  Wilco Dijkstra  <wdijkstr@arm.com>
376
377         * config/aarch64/aarch64.md (call_insn): Use %c rather than %a.
378         (call_value_insn): Likewise.
379         (sibcall_insn): Likewise.
380         (sibcall_value_insn): Likewise.
381         (movsi_aarch64): Likewise.
382         (movdi_aarch64): Likewise.
383         (add_losym_): Likewise.
384         (ldr_got_small_): Likewise.
385         (ldr_got_small_sidi): Likewise.
386         (ldr_got_small_28k_): Likewise.
387         (ldr_got_small_28k_sidi): Likewise.
388         * config/aarch64/aarch64.c (aarch64_print_address_internal):
389         Move output_addr_const to symbolic case. Add error check.
390
391 2017-12-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
392
393         * config/s390/predicates.md (plus16_Q_operand): New predicate.
394         * config/s390/s390.md: Disable MVC merging peephole if it would
395         disable operand forwarding.
396         (new peephole2): Split MVCs if it would turn them into up to 2
397         forwardable MVCs.
398
399 2017-12-01  Richard Biener  <rguenther@suse.de>
400
401         PR tree-optimization/83232
402         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Fix
403         detection of same access. Instead of breaking the group here
404         do not consider the duplicate.  Add comment explaining real fix.
405
406 2017-12-01  Jonathan Wakely  <jwakely@redhat.com>
407
408         * doc/md.texi (Insn Splitting): Fix "central flowgraph" typo.
409
410 2017-12-01  Sudakshina Das  <sudi.das@arm.com>
411
412         * config/arm/vfp.md (*movhf_vfp_fp16): Add conds attribute.
413
414 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
415
416         * function.h (struct function): Remove cilk_frame_decl,
417         is_cilk_function and calls_cilk_spawn fields.
418         * tree-inline.h (struct copy_body_data): Remove remap_var_for_cilk
419         field.
420         * omp-simd-clone.c (simd_clone_clauses_extract): Don't clear
421         cilk_elemental field.
422         * cgraph.h (struct cgraph_simd_clone): Remove cilk_elemental field.
423         * target.def: Adjust comment.
424         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
425         Don't test cilk_elemental.
426
427         PR tree-optimization/83233
428         * gimple-ssa-store-merging.c (nop_stats, bswap_stats): Use
429         bswap_stat name for the struct.
430
431         PR c/79153
432         * tree.h (SWITCH_BREAK_LABEL_P): Define.
433         * gimplify.c (collect_fallthrough_labels): Handle GIMPLE_BIND
434         starting with a GIMPLE_SWITCH and ending with GIMPLE_LABEL with
435         SWITCH_BREAK_LABEL_P set on the label.
436         (gimplify_switch_expr): Set SWITCH_BREAK_LABEL_P on the label
437         added for default case if it was missing and not all cases covered.
438         Wrap GIMPLE_SWITCH and the switch_body_seq into a GIMPLE_BIND if
439         switch_body_seq ends with a GIMPLE_LABEL with SWITCH_BREAK_LABEL_P
440         set on the label.
441         * tree-chrec.c (evolution_function_is_univariate_p): Add return true;
442         to avoid -Wimplicit-fallthrough warning.
443         * config/i386/i386.c (ix86_expand_special_args_builtin): Add
444         FALLTHRU comment to avoid -Wimplicit-fallthrough warning.
445
446         PR tree-optimization/83221
447         * tree-ssa-reassoc.c (sort_by_operand_rank): Shift bb_rank
448         down by 16.
449         (init_reassoc): Formatting fix.
450
451         PR sanitizer/81275
452         * tree-cfg.c (group_case_labels_stmt): Don't optimize away
453         C++ FE implicitly added __builtin_unreachable () until -Wreturn-type
454         is diagnosed.
455
456         PR sanitizer/83219
457         * tree-cfg.c: Include asan.h.
458         (gimple_seq_unreachable_p): Return false for -fsanitize=unreachable.
459
460 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
461
462         * config/i386/i386.md: Fix AVX512 register width in AVX512 instruction.
463
464 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
465
466         * config/i386/i386.c (standard_sse_constant_opcode): Fix wrong form for
467         vpcmpeqd instruction.
468
469 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
470
471         * config/i386/i386.c (standard_sse_constant_opcode): Fix
472         registers type for 128bit mode.
473
474 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
475
476         * spellcheck-tree.c (test_find_closest_identifier): Use ; instead
477         of ;;.
478         * gengtype-state.c (read_state_pair): Likewise.
479         * gimple-fold.c (gimple_fold_builtin_string_compare): Likewise.
480         * sel-sched-dump.c (dump_insn_rtx_1): Likewise.
481         * ipa-cp.c (intersect_aggregates_with_edge): Likewise.
482         * ifcvt.c (noce_try_store_flag_constants): Likewise.
483         * tree-ssa-ccp.c (ccp_finalize): Likewise.
484         * omp-grid.c (grid_process_kernel_body_copy): Likewise.
485         * builtins.c (fold_builtin_3): Likewise.
486         * graphite-scop-detection.c
487         (scop_detection::stmt_has_simple_data_refs_p): Likewise.
488         * hsa-gen.c (hsa_function_representation::hsa_function_representation):
489         Likewise.
490
491 2017-12-01  Maxim Ostapenko  <m.ostapenko@samsung.com>
492
493         PR sanitizer/81697
494         * asan.c (asan_protect_global): Add new ignore_decl_rtl_set_p
495         parameter. Return true if ignore_decl_rtl_set_p is true and other
496         conditions are satisfied.
497         * asan.h (asan_protect_global): Add new parameter.
498         * varasm.c (categorize_decl_for_section): Pass true as second parameter
499         to asan_protect_global calls.
500
501 2017-11-30  Jim Wilson  <jimw@sifive.com>
502
503         * doc/invoke.texi (RISC-V Options): Delete nonexistent -mmemcpy and
504         -mno-memcpy options.  For -mplt, -mfdiv, -mdiv, -msave-restore, and
505         -mstrict-align, add info on default value.  Delete redundant lines for
506         -mabi.  Add missing -mexplicit-relocs docs.
507
508 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
509
510         * config/arc/arc.md (trap): New pattern.
511
512 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
513
514         * config/arc/arc.c (hwloop_optimize): Prevent the last ZOL
515         instruction to end into a delay slot.
516         * config/arc/arc.md (cond_delay_insn): Check if the instruction
517         can be placed into a delay slot against reg_note.
518
519 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
520
521         * config/arc/arc.c (hwloop_optimize): Update hw-loop's end/start
522         labels number of usages.
523
524 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
525
526         * config/arc/arc.c (arc_cannot_substitue_mem_equiv_p): New
527         function.
528         (TARGET_CANNOT_SUBSTITUTE_MEM_EQUIV_P): Define.
529
530 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
531
532         PR target/83210
533         * internal-fn.c (expand_mul_overflow): Optimize unsigned
534         multiplication by power of 2 constant into two shifts + comparison.
535
536 2017-11-30  Jan Hubicka  <hubicka@ucw.cz>
537
538         PR target/81616
539         * config/i386/x86-tune-costs.h (generic_cost): Revise for modern CPUs.
540
541 2017-11-30  Richard Biener  <rguenther@suse.de>
542
543         PR tree-optimization/83202
544         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add
545         allow_peel argument and guard peeling.
546         (canonicalize_loop_induction_variables): Likewise.
547         (canonicalize_induction_variables): Pass false.
548         (tree_unroll_loops_completely_1): Pass unroll_outer to disallow
549         peeling from cunrolli.
550
551 2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>
552
553         * combine.c (try_combine): Print a message to dump file whenever
554         I0, I1, or I2 cannot be combined into I3.
555
556 2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>
557
558         PR rtl-optimization/83156
559         PR rtl-optimization/82621
560         * combine.c (try_combine): Don't split an I2 if one of the dests is
561         set again before I3.  Allow unused dests.
562
563 2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>
564
565         * config/rs6000/rs6000.md (*add<mode>3_carry_in_internal2): New.
566
567 2017-11-29  Vladimir Makarov  <vmakarov@redhat.com>
568
569         PR rtl-optimization/80818
570         * lra.c (collect_non_operand_hard_regs): New arg insn.  Pass it
571         recursively.  Use insn code for clobber.
572         (lra_set_insn_recog_data): Pass the new arg to
573         collect_non_operand_hard_regs.
574         (add_regs_to_insn_regno_info): Pass insn instead of uid.  Use insn
575         code for clobber.
576         (lra_update_insn_regno_info): Pass insn to
577         add_regs_to_insn_regno_info.
578
579 2017-11-29  Jim Wilson  <jimw@sifive.com>
580             Andrew Waterman  <andrew@sifive.com>
581
582         * config/riscv/riscv.c (SINGLE_SHIFT_COST): New.
583         (riscv_rtx_costs): Case ZERO_EXTRACT, match new pattern, and return
584         SINGLE_SHIFT_COST.  Case LT and ZERO_EXTEND, likewise.  Case ASHIFT,
585         use SINGLE_SHIFT_COST.
586         * config/riscv/riscv.md (lshrsi3_zero_extend_1): New.
587         (lshrsi3_zero_extend_2, lshrsi3_zero_extend_3): New.
588
589 2017-11-29  Julia Koval  <julia.koval@intel.com>
590
591         * config/i386/avx512vbmi2intrin.h (_mm512_shldv_epi16,
592         _mm512_mask_shldv_epi16, _mm512_maskz_shldv_epi16, _mm512_shldv_epi32,
593         _mm512_mask_shldv_epi32, _mm512_maskz_shldv_epi32, _mm512_shldv_epi64,
594         _mm512_mask_shldv_epi64, _mm512_maskz_shldv_epi64): New intrinsics.
595         * config/i386/avx512vbmi2vlintrin.h (_mm256_shldv_epi16,
596         _mm256_mask_shldv_epi16, _mm256_maskz_shldv_epi16, _mm256_shldv_epi32,
597         _mm256_mask_shldv_epi32, _mm256_maskz_shldv_epi32, _mm256_shldv_epi64,
598         _mm256_mask_shldv_epi64, _mm256_maskz_shldv_epi64, _mm_shldv_epi16,
599         _mm_mask_shldv_epi16, _mm_maskz_shldv_epi16, _mm_shldv_epi32,
600         _mm_mask_shldv_epi32, _mm_maskz_shldv_epi32, _mm_shldv_epi64,
601         _mm_mask_shldv_epi64, _mm_maskz_shldv_epi64): Ditto.
602         * config/i386/i386-builtin.def (__builtin_ia32_vpshldv_v32hi,
603         __builtin_ia32_vpshldv_v32hi_mask, __builtin_ia32_vpshldv_v32hi_maskz,
604         __builtin_ia32_vpshldv_v16hi, __builtin_ia32_vpshldv_v16hi_mask,
605         __builtin_ia32_vpshldv_v16hi_maskz, __builtin_ia32_vpshldv_v8hi,
606         __builtin_ia32_vpshldv_v8hi_mask, __builtin_ia32_vpshldv_v8hi_maskz,
607         __builtin_ia32_vpshldv_v16si, __builtin_ia32_vpshldv_v16si_mask,
608         __builtin_ia32_vpshldv_v16si_maskz, __builtin_ia32_vpshldv_v8si,
609         __builtin_ia32_vpshldv_v8si_mask, __builtin_ia32_vpshldv_v8si_maskz,
610         __builtin_ia32_vpshldv_v4si, __builtin_ia32_vpshldv_v4si_mask,
611         __builtin_ia32_vpshldv_v4si_maskz, __builtin_ia32_vpshldv_v8di,
612         __builtin_ia32_vpshldv_v8di_mask, __builtin_ia32_vpshldv_v8di_maskz,
613         __builtin_ia32_vpshldv_v4di, __builtin_ia32_vpshldv_v4di_mask,
614         __builtin_ia32_vpshldv_v4di_maskz, __builtin_ia32_vpshldv_v2di,
615         __builtin_ia32_vpshldv_v2di_mask,
616         __builtin_ia32_vpshldv_v2di_maskz): New builtins.
617         * config/i386/sse.md (vpshldv_<mode>, vpshldv_<mode>_mask,
618         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): New patterns.
619
620 2017-11-29  Julia Koval  <julia.koval@intel.com>
621
622         * config/i386/avx512vbmi2intrin.h (_mm512_shrdv_epi16,
623         _mm512_mask_shrdv_epi16, _mm512_maskz_shrdv_epi16, _mm512_shrdv_epi32,
624         _mm512_mask_shrdv_epi32, _mm512_maskz_shrdv_epi32, _mm512_shrdv_epi64,
625         _mm512_mask_shrdv_epi64, _mm512_maskz_shrdv_epi64): New intrinsics.
626         * config/i386/avx512vbmi2vlintrin.h (_mm256_shrdv_epi16,
627         _mm256_mask_shrdv_epi16, _mm256_maskz_shrdv_epi16, _mm256_shrdv_epi32,
628         _mm256_mask_shrdv_epi32, _mm256_maskz_shrdv_epi32, _mm256_shrdv_epi64,
629         _mm256_mask_shrdv_epi64, _mm256_maskz_shrdv_epi64, _mm_shrdv_epi16,
630         _mm_mask_shrdv_epi16, _mm_maskz_shrdv_epi16, _mm_shrdv_epi32,
631         _mm_mask_shrdv_epi32, _mm_maskz_shrdv_epi32, _mm_shrdv_epi64,
632         _mm_mask_shrdv_epi64, _mm_maskz_shrdv_epi64): Ditto.
633         * config/i386/i386-builtin-types.def (V32HI_FTYPE_V32HI_V32HI_V32HI,
634         V32HI_FTYPE_V32HI_V32HI_V32HI_INT, V16HI_FTYPE_V16HI_V16HI_V16HI_INT,
635         V8HI_FTYPE_V8HI_V8HI_V8HI_INT, V8SI_FTYPE_V8SI_V8SI_V8SI_INT,
636         V4SI_FTYPE_V4SI_V4SI_V4SI_INT, V8DI_FTYPE_V8DI_V8DI_V8DI,
637         V8DI_FTYPE_V8DI_V8DI_V8DI_INT, V4DI_FTYPE_V4DI_V4DI_V4DI_INT,
638         V16SI_FTYPE_V16SI_V16SI_V16SI, V16SI_FTYPE_V16SI_V16SI_V16SI_INT,
639         V2DI_FTYPE_V2DI_V2DI_V2DI_INT): New types.
640         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
641         * config/i386/sse.md (vpshrdv_<mode>, vpshrdv_<mode>_mask,
642         vpshrdv_<mode>_maskz, vpshrdv_<mode>_maskz_1): New pattern.
643
644 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
645
646         * config/sparc/sparc.c (sparc_do_work_around_errata): Treat the
647         movsi_pic_gotdata_op instruction as a load for the UT699 errata
648         workaround.
649
650 2017-11-29  Martin Aberg  <maberg@gaisler.com>
651
652         * config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length
653         to prevent b2bst errata sequence.
654         (sqrtdf2_fix): Likewise.
655
656 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
657
658         * config/sparc/sparc.c (fpop_reg_depend_p): New function.
659         (div_sqrt_insn_p): New function.
660         (sparc_do_work_around_errata): Insert NOP instructions to
661         prevent sequences that could trigger the TN-0013 errata for
662         certain LEON3 processors.
663         (pass_work_around_errata::gate): Also test sparc_fix_lost_divsqrt.
664         (sparc_option_override): Set sparc_fix_lost_divsqrt appropriately.
665         * config/sparc/sparc.md (fix_lost_divsqrt): New attribute.
666         (in_branch_delay): Prevent div and sqrt in delay slot if
667         fix_lost_divsqrt.
668         * config/sparc/sparc.opt (sparc_fix_lost_divsqrt): New variable.
669
670 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
671
672         * config/sparc/sparc.c (atomic_insn_p): New function.
673         (sparc_do_work_around_errata): Insert NOP instructions to
674         prevent sequences that could trigger the TN-0010 errata for
675         UT700.
676         * config/sparc/sync.md (atomic_compare_and_swap_leon3_1): Make
677         instruction referable in atomic_insns_p.
678
679 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
680
681         * config/sparc/sync.md (swapsi): 16-byte align if sparc_fix_gr712rc.
682         (atomic_compare_and_swap_leon3_1): Likewise.
683         (ldstub): Likewise.
684
685 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
686
687         * config/sparc/sparc.c (fpop_insn_p): New function.
688         (sparc_do_work_around_errata): Insert NOP instructions to
689         prevent sequences that could trigger the TN-0012 errata for
690         GR712RC.
691         (pass_work_around_errata::gate): Also test sparc_fix_gr712rc.
692         * config/sparc/sparc.md (fix_gr712rc): New attribute.
693         (in_branch_annul_delay): Prevent floating-point instructions
694         in delay slot of annulled integer branch.
695
696 2017-11-29  Richard Biener  <rguenther@suse.de>
697
698         PR tree-optimization/83202
699         * tree-vect-slp.c (scalar_stmts_set_t): New typedef.
700         (bst_fail): Use it.
701         (vect_analyze_slp_cost_1): Add visited set, do not account SLP
702         nodes vectorized to the same stmts multiple times.
703         (vect_analyze_slp_cost): Allocate a visited set and pass it down.
704         (vect_analyze_slp_instance): Adjust.
705         (scalar_stmts_to_slp_tree_map_t): New typedef.
706         (vect_schedule_slp_instance): Add a map recording the SLP node
707         representing the vectorized stmts for a set of scalar stmts.
708         Avoid code-generating redundancies.
709         (vect_schedule_slp): Allocate map and pass it down.
710
711 2017-11-29  Nathan Sidwell  <nathan@acm.org>
712
713         PR c++/83187
714         * tree.c (build_complex_type): Fix canonicalization.  Only fill in
715         type if it is new.
716
717 2017-11-29  Wilco Dijkstra  <wdijkstr@arm.com>
718
719         * config/aarch64/aarch64.c (aarch64_print_operand): Add new
720         cases for printing LDP/STP memory addresses.
721         (aarch64_print_address_internal): Renamed from
722         aarch64_print_operand_address, added parameter, add Pmode check.
723         (aarch64_print_ldpstp_address): New function for LDP/STP addresses.
724         (aarch64_print_operand_address): Indirect to
725         aarch64_print_address_internal.
726         * config/aarch64/aarch64-simd.md (store_pair_lanes): Use new
727         'y' operand output specifier.
728
729 2017-11-29  Jakub Jelinek  <jakub@redhat.com>
730
731         PR middle-end/83185
732         * tree.c (build_simple_mem_ref_loc): Handle
733         get_addr_base_and_unit_offset returning a MEM_REF.
734
735         PR middle-end/80929
736         * rtlanal.c (seq_cost): For non-single_set insns try to use insn_cost.
737
738         PR target/80819
739         * config/i386/sse.md (vec_concatv2di): Remove * from (=Yr,0,*rm)
740         alternative.
741
742 2017-11-28  David Malcolm  <dmalcolm@redhat.com>
743
744         * diagnostic-show-locus.c (layout::print_trailing_fixits): Handle
745         m_x_offset.
746         (layout::move_to_column): Likewise.
747
748 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
749
750         PR sanitizer/81275
751         * tree.c (block_may_fallthru): Return false if SWITCH_ALL_CASES_P
752         is set on SWITCH_EXPR and !block_may_fallthru (SWITCH_BODY ()).
753
754 2017-11-28  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
755             Martin Jambor  <mjambor@suse.cz>
756
757         PR ipa/82808
758         * tree.h (expr_type_first_operand_type_p): Declare
759         * tree.c (expr_type_first_operand_type_p): New function.
760         * ipa-prop.h (ipa_get_type): Allow i to be out of bounds.
761         (ipa_value_from_jfunc): Adjust declaration.
762         * ipa-cp.c (ipa_get_jf_pass_through_result): New parameter RES_TYPE.
763         Use it as result type for arithmetics, unless it is NULL in which case
764         be more conservative.
765         (ipa_value_from_jfunc): New parameter PARM_TYPE, pass it to
766         ipa_get_jf_pass_through_result.
767         (propagate_vals_across_pass_through): Likewise.
768         (propagate_scalar_across_jump_function): New parameter PARM_TYPE, pass
769         is to propagate_vals_across_pass_through.
770         (propagate_constants_across_call): Pass PARM_TYPE to
771         propagate_scalar_across_jump_function.
772         (find_more_scalar_values_for_callers_subset): Pass parameter type to
773         ipa_value_from_jfunc.
774         (cgraph_edge_brings_all_scalars_for_node): Likewise.
775         * ipa-fnsummary.c (evaluate_properties_for_edge): Renamed parms_info
776         to caller_parms_info, pass parameter type to ipa_value_from_jfunc.
777         * ipa-prop.c (try_make_edge_direct_simple_call): New parameter
778         target_type, pass it to ipa_value_from_jfunc.
779         (update_indirect_edges_after_inlining): Pass parameter type to
780         try_make_edge_direct_simple_call.
781
782 2017-11-28  Jeff Law  <law@redhat.com>
783
784         * gimple-ssa-evrp-analyze.c
785         (evrp_range_analyzer::record_ranges_from_phis): Only use SCEV to
786         refine ranges if scev_initialized_p returns true.
787         * vr-values.c (vr_values::extract_range_from_phi_node): Likewise.
788
789 2017-11-28  Julia Koval  <julia.koval@intel.com>
790
791         * config/i386/avx512vbmi2intrin.h (_mm512_shrdi_epi16,
792         _mm512_mask_shrdi_epi16, _mm512_maskz_shrdi_epi16, _mm512_shrdi_epi32,
793         _mm512_mask_shrdi_epi32, _mm512_maskz_shrdi_epi32, _mm512_shrdi_epi64,
794         _mm512_mask_shrdi_epi64, _mm512_maskz_shrdi_epi64): New intrinsics.
795         * config/i386/avx512vbmi2vlintrin.h (_mm256_shrdi_epi16,
796         _mm256_mask_shrdi_epi16, _mm256_maskz_shrdi_epi16,
797         _mm256_mask_shrdi_epi32, _mm256_maskz_shrdi_epi32, _mm256_shrdi_epi32,
798         _mm256_mask_shrdi_epi64, _mm256_maskz_shrdi_epi64, _mm256_shrdi_epi64,
799         _mm_mask_shrdi_epi16, _mm_maskz_shrdi_epi16, _mm_shrdi_epi16,
800         _mm_mask_shrdi_epi32, _mm_maskz_shrdi_epi32, _mm_shrdi_epi32,
801         _mm_mask_shrdi_epi64, _mm_maskz_shrdi_epi64, _mm_shrdi_epi64): Ditto.
802         * config/i386/i386-builtin.def (__builtin_ia32_vpshrd_v32hi,
803         __builtin_ia32_vpshrd_v32hi_mask, __builtin_ia32_vpshrd_v16hi,
804         __builtin_ia32_vpshrd_v16hi_mask, __builtin_ia32_vpshrd_v8hi,
805         __builtin_ia32_vpshrd_v8hi_mask, __builtin_ia32_vpshrd_v16si,
806         __builtin_ia32_vpshrd_v16si_mask, __builtin_ia32_vpshrd_v8si,
807         __builtin_ia32_vpshrd_v8si_mask, __builtin_ia32_vpshrd_v4si,
808         __builtin_ia32_vpshrd_v4si_mask, __builtin_ia32_vpshrd_v8di,
809         __builtin_ia32_vpshrd_v8di_mask, __builtin_ia32_vpshrd_v4di,
810         __builtin_ia32_vpshrd_v4di_mask, __builtin_ia32_vpshrd_v2di,
811         __builtin_ia32_vpshrd_v2di_mask): New builtins.
812         * config/i386/sse.md (vpshrd_<mode><mask_name>): New pattern.
813
814 2017-11-28  Julia Koval  <julia.koval@intel.com>
815
816         * config/i386/avx512vbmi2intrin.h (_mm512_shldi_epi16,
817         _mm512_mask_shldi_epi16, _mm512_maskz_shldi_epi16, _mm512_shldi_epi32,
818         _mm512_mask_shldi_epi32, _mm512_maskz_shldi_epi32, _mm512_shldi_epi64,
819         _mm512_mask_shldi_epi64, _mm512_maskz_shldi_epi64): New intrinsics.
820         * config/i386/avx512vbmi2vlintrin.h (_mm256_shldi_epi16,
821         _mm256_mask_shldi_epi16, _mm256_maskz_shldi_epi16,
822         _mm256_mask_shldi_epi32, _mm256_maskz_shldi_epi32, _mm256_shldi_epi32,
823         _mm256_mask_shldi_epi64, _mm256_maskz_shldi_epi64, _mm256_shldi_epi64,
824         _mm_mask_shldi_epi16, _mm_maskz_shldi_epi16, _mm_shldi_epi16,
825         _mm_mask_shldi_epi32, _mm_maskz_shldi_epi32, _mm_shldi_epi32,
826         _mm_mask_shldi_epi64, _mm_maskz_shldi_epi64, _mm_shldi_epi64): Ditto.
827         * config/i386/i386-builtin-types.def (V32HI_FTYPE_V32HI_V32HI_INT,
828         V32HI_FTYPE_V32HI_V32HI_INT_V32HI_INT, V16SI_FTYPE_V16SI_V16SI_INT,
829         V16SI_FTYPE_V16SI_V16SI_INT_V16SI_INT,
830         V8DI_FTYPE_V8DI_V8DI_INT_V8DI_INT, V8SI_FTYPE_V8SI_V8SI_INT_V8SI_INT,
831         V16HI_FTYPE_V16HI_V16HI_INT_V16HI_INT,
832         V4DI_FTYPE_V4DI_V4DI_INT_V4DI_INT,
833         V8HI_FTYPE_V8HI_V8HI_INT_V8HI_INT,
834         V4SI_FTYPE_V4SI_V4SI_INT_V4SI_INT,
835         V2DI_FTYPE_V2DI_V2DI_INT_V2DI_INT): New types.
836         * config/i386/i386-builtin.def (__builtin_ia32_vpshld_v32hi,
837         __builtin_ia32_vpshld_v32hi_mask, __builtin_ia32_vpshld_v16hi,
838         __builtin_ia32_vpshld_v16hi_mask, __builtin_ia32_vpshld_v8hi,
839         __builtin_ia32_vpshld_v8hi_mask, __builtin_ia32_vpshld_v16si,
840         __builtin_ia32_vpshld_v16si_mask, __builtin_ia32_vpshld_v8si,
841         __builtin_ia32_vpshld_v8si_mask, __builtin_ia32_vpshld_v4si,
842         __builtin_ia32_vpshld_v4si_mask, __builtin_ia32_vpshld_v8di,
843         __builtin_ia32_vpshld_v8di_mask, __builtin_ia32_vpshld_v4di,
844         __builtin_ia32_vpshld_v4di_mask, __builtin_ia32_vpshld_v2di,
845         __builtin_ia32_vpshld_v2di_mask): New builtins.
846         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
847         * config/i386/sse.md (vpshld_<mode><mask_name>): New pattern.
848
849 2017-11-28  Richard Biener  <rguenther@suse.de>
850
851         PR tree-optimization/80776
852         * gimple-ssa-evrp-analyze.h (evrp_range_analyzer::set_ssa_range_info):
853         Declare.
854         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::set_ssa_range_info):
855         New function.
856         (evrp_range_analyzer::record_ranges_from_incoming_edges):
857         If the incoming edge is an effective fallthru because the other
858         edge only reaches a __builtin_unreachable () then record ranges
859         derived from the controlling condition in SSA info.
860         (evrp_range_analyzer::record_ranges_from_phis): Use set_ssa_range_info.
861         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
862
863 2017-11-28  Olivier Hainque  <hainque@adacore.com>
864
865         * Makefile.in (SELFTEST_FLAGS): Use nul instead of /dev/null
866         on mingw build hosts.
867
868 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
869
870         PR debug/81307
871         * dbxout.c (dbx_block_with_cold_children): Fix function comment.
872
873 2017-11-28  Richard Biener  <rguenther@suse.de>
874
875         PR middle-end/83141
876         * gimple-fold.c (gimple_fold_builtin_memory_op): For aggregate
877         copies generated from memcpy use a character array as reference
878         type.
879
880 2017-11-28  Julia Koval  <julia.koval@intel.com>
881             Sebastian Peryt  <sebastian.peryt@intel.com>
882
883         * Makefile.in (cilkplus.def, cilk-builtins.def, c-family/cilk.o, 
884         c-family/c-cilkplus.o, c-family/array-notation-common.o,
885         cilk-common.o, cilk.h, cilk-common.c): Remove.
886         * builtin-types.def
887         (BT_FN_INT_PTR_PTR_PTR_FTYPE_BT_INT_BT_PTR_BT_PTR_BT_PTR): Remove.
888         * builtins.c (is_builtin_name): Remove cilkplus condition.
889         (BUILT_IN_CILK_DETACH, BUILT_IN_CILK_POP_FRAME): Remove.
890         * builtins.def (DEF_CILK_BUILTIN_STUB, DEF_CILKPLUS_BUILTIN,
891         cilk-builtins.def, cilkplus.def): Remove.
892         * cif-code.def (CILK_SPAWN): Remove.
893         * cilk-builtins.def: Delete.
894         * cilk-common.c: Ditto.
895         * cilk.h: Ditto.
896         * cilkplus.def: Ditto.
897         * config/darwin.h (fcilkplus): Delete.
898         * cppbuiltin.c: Ditto.
899         * doc/extend.texi: Remove cilkplus doc.
900         * doc/generic.texi: Ditto.
901         * doc/invoke.texi: Ditto.
902         * doc/passes.texi: Ditto.
903         * gcc.c (fcilkplus): Remove.
904         * gengtype.c (cilk.h): Remove.
905         * gimple-pretty-print.c (dump_gimple_omp_for): Remove cilkplus
906         support.
907         * gimple.h (GF_OMP_FOR_KIND_CILKFOR, GF_OMP_FOR_KIND_CILKSIMD):
908         Remove.
909         * gimplify.c (gimplify_return_expr, maybe_fold_stmt,
910         gimplify_call_expr,
911         is_gimple_stmt, gimplify_modify_expr, gimplify_scan_omp_clauses,
912         gimplify_adjust_omp_clauses, gimplify_omp_for, gimplify_expr): Remove
913         cilkplus conditions.
914         * ipa-fnsummary.c (ipa_dump_fn_summary, compute_fn_summary,
915         inline_read_section): Ditto.
916         * ipa-inline-analysis.c (cilk.h): Remove.
917         * ira.c (ira_setup_eliminable_regset): Remove cilkplus support.
918         * lto-wrapper.c (merge_and_complain, append_compiler_options,
919         append_linker_options): Remove condition for fcilkplus.
920         * lto/lto-lang.c (cilk.h): Remove.
921         (lto_init): Remove condition for fcilkplus.
922         * omp-expand.c (expand_cilk_for_call): Delete.
923         (expand_omp_taskreg, expand_omp_for_static_chunk,
924         expand_omp_for): Remove cilkplus
925         conditions.
926         (expand_cilk_for): Delete.
927         * omp-general.c (omp_extract_for_data): Remove cilkplus support.
928         * omp-low.c (scan_sharing_clauses, create_omp_child_function,
929         execute_lower_omp, diagnose_sb_0): Ditto.
930         * omp-simd-clone.c (simd_clone_clauses_extract): Ditto.
931         * tree-core.h (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
932         * tree-nested.c: Ditto.
933         * tree-pretty-print.c (dump_omp_clause): Remove cilkplus support.
934         (dump_generic_node): Ditto.
935         * tree.c (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
936         * tree.def (cilk_simd, cilk_for, cilk_spawn_stmt, cilk_sync_stmt):
937         Delete.
938         * tree.h (CILK_SPAWN_FN, EXPR_CILK_SPAWN): Delete.
939
940 2017-11-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
941
942         * config/aarch64/aarch64.md (div<mode>3): Change check to TARGET_FLOAT.
943         * config/aarch64/aarch64.c (aarch64_emit_approx_div): Add early exit
944         for vector mode and !TARGET_SIMD.
945
946 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
947
948         * tree.def (SWITCH_EXPR): Change from 3 operand to 2 operand tree.
949         Adjust comment.
950         * tree.h (SWITCH_LABELS): Remove.
951         * gimplify.c (gimplify_switch_expr): Don't test SWITCH_LABELS,
952         assert SWITCH_BODY is non-NULL.
953         * tree-pretty-print.c (dump_generic_node): Remove SWITCH_LABELS
954         handling.
955         * tree.c (block_may_fallthru): Always return true; for SWITCH_EXPR.
956
957         PR tree-optimization/80788
958         * match.pd (X +- C1 CMP C2 -> X CMP C2 -+ C1): If res
959         has TREE_OVERFLOW set, call drop_tree_overflow.
960
961 2017-11-28  Richard Biener  <rguenther@suse.de>
962
963         PR tree-optimization/83158
964         * tree-vrp.c (intersect_ranges): Prefer ~[0, 0] in a few more
965         cases.
966
967 2017-11-28  Segher Boessenkool  <segher@kernel.crashing.org>
968
969         PR 81288/target
970         * config/rs6000/rs6000.c (rs6000_rtx_costs): Do not handle
971         TARGET_ISEL && !TARGET_MFCRF differently.  Simplify code.
972
973 2017-11-27  Segher Boessenkool  <segher@kernel.crashing.org>
974
975         * config/rs6000/rs6000.md (<code><GPR:mode><GPR2:mode>2_isel): Change
976         LT/GT/LTU/GTU to LE/GE/LEU/GEU where possible.
977
978 2017-11-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
979
980         PR middle_end/82333
981         * varasm.c (compare_constant): Take the mode of the constants into
982         account when comparing floating point constants.
983
984 2017-11-27  Gerald Pfeifer  <gerald@pfeifer.com>
985
986         * hash-set.h (DEFINE_DEBUG_HASH_SET): Remove static qualifier
987         from explicit instantiation of debug_helper.
988         * vec.h (DEFINE_DEBUG_VEC): Ditto.
989
990 2017-11-27  Richard Biener  <rguenther@suse.de>
991
992         * gimple-fold.c (gimple_fold_builtin_memory_op): Remove dead code,
993         refactor a bit.
994
995 2017-11-27  Richard Biener  <rguenther@suse.de>
996
997         * tree.c (wide_int_to_tree): Free discarded INTEGER_CST.
998         (type_hash_canon): Also clear int_cst_hash_table entry for
999         TYPE_MIN/MAX_VALUE.
1000         (build_nonstandard_integer_type): Hash all TYPE_MAX_VALUEs.
1001
1002 2017-11-27  Tamar Christina  <tamar.christina@arm.com>
1003
1004         * doc/extend.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
1005         * doc/invoke.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
1006         * doc/sourcebuild.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
1007
1008 2017-11-27  Markus Trippelsdorf  <markus@trippelsdorf.de>
1009
1010         * hash-map.h (gt_cleare_cache): Avoid UB.
1011
1012 2017-11-27  Eric Botcazou  <ebotcazou@adacore.com>
1013
1014         * cfgloop.h (struct loop): Document usage of USHRT_MAX for unroll.
1015         * loop-unroll.c (decide_unroll_constant_iterations): Implement it.
1016         (decide_unroll_runtime_iterations): Likewise.
1017         (decide_unroll_stupid): Likewise.
1018
1019 2017-11-27  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
1020
1021         PR target/83109
1022         * config/i386/i386.md: Add a loop with incssp.
1023
1024 2017-11-27  Martin Jambor  <mjambor@suse.cz>
1025
1026         PR tree-optimization/81248
1027         * tree-sra.c (splice_param_accesses): Remove size check.
1028         (decide_one_param_reduction): Fix size check.
1029         * gimple-pretty-print.c (dump_profile): Silence warning.
1030         * params.def (PARAM_IPA_SRA_PTR_GROWTH_FACTOR): Adjust description.
1031
1032 2017-11-27  Jakub Jelinek  <jakub@redhat.com>
1033
1034         PR debug/81307
1035         * dbxout.c (lastlineno): New variable.
1036         (dbx_debug_hooks): Use dbxout_switch_text_section as
1037         switch_text_section debug hook.
1038         (dbxout_function_end): Switch to current_function_section
1039         rather than function_section.  If crtl->has_bb_partition,
1040         output just one N_FUN, depending on in_cold_section_p.
1041         (dbxout_source_line): Remember last lineno in lastlineno.
1042         (dbxout_switch_text_section): New function.
1043         (dbxout_function_decl): Adjust dbxout_block caller.
1044         (dbx_block_with_cold_children): New function.
1045         (dbxout_block): Return true if any LBRAC/RBRAC have been
1046         emitted.  Use dbx_block_with_cold_children at depth == 0
1047         in second partition.  Add PARENT_BLOCKNUM argument, pass
1048         it optionally adjusted to children.  Output LBRAC/RBRAC
1049         around recursive call only if the block is in the current
1050         partition, if not and anything was output, emit empty
1051         range LBRAC/RBRAC.
1052         * final.c (final_scan_insn): Compute cold_function_name
1053         before calling switch_text_section debug hook.  Call
1054         that hook even if dwarf2out_do_frame if not emitting
1055         dwarf debug info.
1056
1057         PR target/83100
1058         * varasm.c (bss_initializer_p): Return true for DECL_COMMON
1059         TREE_READONLY decls.
1060
1061 2017-11-27  Markus Trippelsdorf  <markus@trippelsdorf.de>
1062
1063         PR rtl-optimization/82488
1064         * expr.c (fixup_args_size_notes): Avoid signed integer overflow.
1065
1066 2017-11-26  Julia Koval  <julia.koval@intel.com>
1067
1068         * config/i386/i386.c (processor_target_table): Add skylake_cost for
1069         skylake-avx512.
1070         * config/i386/x86-tune-costs.h (skylake_memcpy, skylake_memset,
1071         skylake_cost): New.
1072
1073 2017-11-26  Julia Koval  <julia.koval@intel.com>
1074
1075         * config/i386/driver-i386.c (host_detect_local_cpu):
1076         Detect skylake-avx512.
1077
1078 2017-11-26  Julia Koval  <julia.koval@intel.com>
1079
1080         * config.gcc: Add -march=cannonlake.
1081         * config/i386/driver-i386.c (host_detect_local_cpu): Detect cannonlake.
1082         * config/i386/i386-c.c (ix86_target_macros_internal): Handle cannonlake.
1083         * config/i386/i386.c (processor_costs): Add m_CANNONLAKE.
1084         (PTA_CANNONLAKE): New.
1085         (processor_target_table): Add cannonlake.
1086         (ix86_option_override_internal): Ditto.
1087         (fold_builtin_cpu): Ditto.
1088         (get_builtin_code_for_version): Handle cannonlake.
1089         (M_INTEL_COREI7_CANNONLAKE): New.
1090         * config/i386/i386.h (TARGET_CANNONLAKE, PROCESSOR_CANNONLAKE): New.
1091         * doc/invoke.texi: Add -march=cannonlake.
1092
1093 2017-11-14  Boris Kolpackov  <boris@codesynthesis.com>
1094
1095         * plugin.c (add_new_plugin): Use platform-specific library extensions.
1096         (try_init_one_plugin): Alternative implementation for MinGW.
1097         * Makefile.in (plugin_implib): New.
1098         (gengtype-lex.c): Fix broken AIX workaround.
1099         * configure: Regenerate.
1100         * doc/plugins.texi: Document support for MinGW.
1101
1102 2017-11-25  Jakub Jelinek  <jakub@redhat.com>
1103
1104         PR rtl-optimization/81553
1105         * combine.c (simplify_if_then_else): In (if_then_else COND (OP Z C1) Z)
1106         to (OP Z (mult COND (C1 * STORE_FLAG_VALUE))) optimization, if OP
1107         is a shift where C1 has different mode than the whole shift, use C1's
1108         mode for MULT rather than the shift's mode.
1109
1110         PR target/82848
1111         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Don't fold
1112         builtins not enabled in the currently selected ISA.
1113
1114 2017-11-24  Jackson Woodruff  <jackson.woodruff@arm.com>
1115
1116         PR tree-optimization/71026
1117         * tree-ssa-math-opts (is_division_by_square, is_square_of): New.
1118         (insert_reciprocals): Change to insert reciprocals before a division
1119         by a square and to insert the square of a reciprocal.
1120         (execute_cse_reciprocals_1): Change to consider division by a square.
1121         (register_division_in): Add importance parameter.
1122
1123 2017-11-24  Richard Biener  <rguenther@suse.de>
1124
1125         PR tree-optimization/82402
1126         * tree-vect-loop-manip.c (create_lcssa_for_virtual_phi): Properly
1127         set SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
1128
1129 2017-11-24  Marc Glisse  <marc.glisse@inria.fr>
1130
1131         * match.pd (0-ptr): New transformation.
1132
1133 2017-11-24  Jan Hubicka  <hubicka@ucw.cz>
1134
1135         PR bootstrap/83015
1136         * ipa-inline.c (inline_small_functions): Set current badnes correctly
1137         when skipping checking.
1138
1139 2017-11-24  Richard Biener  <rguenther@suse.de>
1140
1141         PR tree-optimization/83128
1142         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Handle STRING_CSTs.
1143         (vn_reference_lookup_3): Likewise.
1144
1145 2017-11-24  Jakub Jelinek  <jakub@redhat.com>
1146
1147         PR sanitizer/83014
1148         * ubsan.c (ubsan_type_descriptor): Use pp_unsigned_wide_integer
1149         instead of pp_printf with HOST_WIDE_INT_PRINT_DEC.  Avoid calling
1150         tree_to_uhwi twice.
1151
1152         * tree-object-size.c (pass_through_call): Use gimple_call_return_flags
1153         ERF_RETURN*ARG* for builtins other than BUILT_IN_ASSUME_ALIGNED,
1154         check for the latter with gimple_call_builtin_p.  Do not handle
1155         BUILT_IN_STPNCPY_CHK which is not a pass through call.
1156
1157 2017-11-24  Christophe Lyon  <christophe.lyon@linaro.org>
1158
1159         * config/arm/arm_neon.h: Fix pragma GCC push_options before
1160         vdot_u32.
1161
1162 2017-11-23  Julia Koval  <julia.koval@intel.com>
1163
1164         * config/i386/avx512vbmi2intrin.h (_mm512_mask_expand_epi8,
1165         _mm512_maskz_expand_epi8, _mm512_mask_expandloadu_epi8,
1166         _mm512_maskz_expandloadu_epi8, _mm512_mask_expand_epi16,
1167         _mm512_maskz_expand_epi16, _mm512_mask_expandloadu_epi16,
1168         _mm512_maskz_expandloadu_epi16): New intrinsics.
1169         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_expand_epi8,
1170         _mm_maskz_expand_epi8, _mm_mask_expandloadu_epi8,
1171         _mm_maskz_expandloadu_epi8, _mm_mask_expand_epi16,
1172         _mm_maskz_expand_epi16, _mm_mask_expandloadu_epi16,
1173         _mm_maskz_expandloadu_epi16, _mm256_mask_expand_epi16,
1174         _mm256_maskz_expand_epi16, _mm256_mask_expandloadu_epi16,
1175         _mm256_maskz_expandloadu_epi16, _mm256_mask_expand_epi8,
1176         _mm256_maskz_expand_epi8, _mm256_mask_expandloadu_epi8,
1177         _mm256_maskz_expandloadu_epi8): New intrinsics.
1178         * config/i386/i386-builtin-types.def (V64QI_FTYPE_PCV64QI_V64QI_UDI,
1179         V32HI_FTYPE_PCV32HI_V32HI_USI, V32QI_FTYPE_PCV32QI_V32QI_USI,
1180         V16HI_FTYPE_PCV16HI_V16HI_UHI, V16QI_FTYPE_PCV16QI_V16QI_UHI,
1181         V8HI_FTYPE_PCV8HI_V8HI_UQI): New types.
1182         * config/i386/i386.c (ix86_expand_special_args_builtin): Use new types.
1183         * config/i386/sse.md (VI248_VLBW): New iterator.
1184         (expand<mode>_mask, expand<mode>_maskz): New patterns.
1185
1186 2017-11-23  Julia Koval  <julia.koval@intel.com>
1187
1188         * config.gcc (avx512vbmi2intrin.h, avx512vbmi2vlintrin): New headers.
1189         * config/i386/avx512vbmi2intrin.h (_mm512_mask_compress_epi8,
1190         _mm512_maskz_compress_epi8, _mm512_mask_compressstoreu_epi8,
1191         _mm512_mask_compress_epi16, _mm512_maskz_compress_epi16,
1192         _mm512_mask_compressstoreu_epi16): New.
1193         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_compress_epi8,
1194         _mm_maskz_compress_epi8, _mm256_mask_compressstoreu_epi16,
1195         _mm_mask_compress_epi16, _mm_maskz_compress_epi16,
1196         _mm256_mask_compress_epi16, _mm256_maskz_compress_epi16,
1197         _mm_mask_compressstoreu_epi8, _mm_mask_compressstoreu_epi16,
1198         _mm256_mask_compress_epi8, _mm256_maskz_compress_epi8,
1199         _mm256_mask_compressstoreu_epi8): New.
1200         * config/i386/i386-builtin-types.def (VOID_FTYPE_PV64QI_V64QI_UDI,
1201         VOID_FTYPE_PV32HI_V32HI_USI, VOID_FTYPE_PV32QI_V32QI_USI,
1202         VOID_FTYPE_PV16QI_V16QI_UHI, VOID_FTYPE_PV16HI_V16HI_UHI,
1203         VOID_FTYPE_PV8HI_V8HI_UQI): New types.
1204         * config/i386/i386-builtin.def (__builtin_ia32_compressqi512_mask,
1205         __builtin_ia32_compresshi512_mask, __builtin_ia32_compressqi256_mask,
1206         __builtin_ia32_compressqi128_mask, __builtin_ia32_compresshi256_mask,
1207         __builtin_ia32_compresshi128_mask,
1208         __builtin_ia32_compressstoreuqi512_mask,
1209         __builtin_ia32_compressstoreuhi512_mask,
1210         __builtin_ia32_compressstoreuqi256_mask,
1211         __builtin_ia32_compressstoreuqi128_mask,
1212         __builtin_ia32_compressstoreuhi256_mask,
1213         __builtin_ia32_compressstoreuhi128_mask): New builtins.
1214         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Create special args
1215         array for flags2.
1216         (ix86_expand_special_args_builtin): Handle new types.
1217         (s4fma_expand): Handle new builtin array.
1218         * config/i386/immintrin.h: Include new headers.
1219         * config/i386/sse.md (VI12_AVX512VLBW): New iterator.
1220         (compress<mode>_mask, compressstore<mode>_mask): New patterns.
1221
1222 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
1223
1224         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Formatting
1225         fixes.  Declare temp and g variables at the top in order to avoid
1226         {} in most of the cases.
1227
1228 2017-11-23  Marc Glisse  <marc.glisse@inria.fr>
1229
1230         * match.pd (ptr-0): New transformation.
1231
1232 2017-11-23  Charles Baylis  <charles.baylis@linaro.org>
1233
1234         * config/arm/arm-protos.h (enum arm_addr_mode_op): New.
1235         (struct addr_mode_cost_table): New.
1236         (struct tune_params): Add field addr_mode_costs.
1237         * config/arm/arm.c (generic_addr_mode_costs): New.
1238         (arm_slowmul_tune): Initialise addr_mode_costs field.
1239         (arm_fastmul_tune): Likewise.
1240         (arm_strongarm_tune): Likewise.
1241         (arm_xscale_tune): Likewise.
1242         (arm_9e_tune): Likewise.
1243         (arm_marvell_pj4_tune): Likewise.
1244         (arm_v6t2_tune): Likewise.
1245         (arm_cortex_tune): Likewise.
1246         (arm_cortex_a8_tune): Likewise.
1247         (arm_cortex_a7_tune): Likewise.
1248         (arm_cortex_a15_tune): Likewise.
1249         (arm_cortex_a35_tune): Likewise.
1250         (arm_cortex_a53_tune): Likewise.
1251         (arm_cortex_a57_tune): Likewise.
1252         (arm_exynosm1_tune): Likewise.
1253         (arm_xgene1_tune): Likewise.
1254         (arm_cortex_a5_tune): Likewise.
1255         (arm_cortex_a9_tune): Likewise.
1256         (arm_cortex_a12_tune): Likewise.
1257         (arm_cortex_a73_tune): Likewise.
1258         (arm_v7m_tune): Likewise.
1259         (arm_cortex_m7_tune): Likewise.
1260         (arm_v6m_tune): Likewise.
1261         (arm_fa726te_tune): Likewise.
1262         (arm_mem_costs): Use table lookup to calculate cost of addressing
1263         mode.
1264
1265 2017-11-23  Charles Baylis  <charles.baylis@linaro.org>
1266
1267         * config/arm/arm.c (arm_mem_costs): New function.
1268         (arm_rtx_costs_internal): Use arm_mem_costs.
1269
1270 2017-11-23  Mark Wielaard  <mark@klomp.org>
1271
1272         * dwarf2out.c (init_sections_and_labels): Use generation to create
1273         unique ranges_section_label and ranges_base_label. Return generation.
1274         (output_rnglists): Add generation argument. Use generation to create
1275         unique ranges labels.
1276         (dwarf2out_finish): Get generation from init_sections_and_labels
1277         and pass generation to output_rnglists.
1278
1279 2017-11-23  Mike Stump  <mikestump@comcast.net>
1280             Eric Botcazou  <ebotcazou@adacore.com>
1281
1282         * doc/generic.texi (ANNOTATE_EXPR): Document 3rd operand.
1283         * cfgloop.h (struct loop): Add unroll field.
1284         * function.h (struct function): Add has_unroll bitfield.
1285         * gimplify.c (gimple_boolify) <ANNOTATE_EXPR>: Deal with unroll kind.
1286         (gimplify_expr) <ANNOTATE_EXPR>: Propagate 3rd operand.
1287         * loop-init.c (pass_loop2::gate): Return true if cfun->has_unroll.
1288         (pass_rtl_unroll_loops::gate): Likewise.
1289         * loop-unroll.c (decide_unrolling): Tweak note message.  Skip loops
1290         for which loop->unroll==1.
1291         (decide_unroll_constant_iterations): Use note for consistency and
1292         take loop->unroll into account.  Return early if loop->unroll is set.
1293         Fix thinko in existing test.
1294         (decide_unroll_runtime_iterations): Use note for consistency and
1295         take loop->unroll into account.
1296         (decide_unroll_stupid): Likewise.
1297         * lto-streamer-in.c (input_cfg): Read loop->unroll.
1298         * lto-streamer-out.c (output_cfg): Write loop->unroll.
1299         * tree-cfg.c (replace_loop_annotate_in_block) <annot_expr_unroll_kind>:
1300         New case.
1301         (replace_loop_annotate) <annot_expr_unroll_kind>: Likewise.
1302         (print_loop): Print loop->unroll if set.
1303         * tree-core.h (enum annot_expr_kind): Add annot_expr_unroll_kind.
1304         * tree-inline.c (copy_loops): Copy unroll and set cfun->has_unroll.
1305         * tree-pretty-print.c (dump_generic_node) <annot_expr_unroll_kind>:
1306         New case.
1307         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Bail out if
1308         loop->unroll is set and smaller than the trip count.  Otherwise bypass
1309         entirely the heuristics if loop->unroll is set.  Remove dead note.
1310         Fix off-by-one bug in other note.
1311         (try_peel_loop): Bail out if loop->unroll is set.  Fix formatting.
1312         (tree_unroll_loops_completely_1): Force unrolling if loop->unroll
1313         is greater than 1.
1314         (tree_unroll_loops_completely): Make static.
1315         (pass_complete_unroll::execute): Use correct type for variable.
1316         (pass_complete_unrolli::execute): Fix formatting.
1317         * tree.def (ANNOTATE_EXPR): Add 3rd operand.
1318
1319 2017-11-23  Sergey Shalnov  <Sergey.Shalnov@intel.com>
1320
1321         * config/i386/i386.h (TARGET_PREFER_AVX256): Also
1322         enable when TARGET_PREFER_AVX128 is set.
1323
1324 2017-11-23  Jan Hubicka  <hubicka@ucw.cz>
1325
1326         * ipa-profile.c (ipa_propagate_frequency_1): Use count instead of
1327         frequency.
1328         * cgraph.c (cgraph_edge::dump_edge_flags): Dump sreal frequencies.
1329         (cgraph_edge::maybe_hot_p): Use sreal frequencies.
1330
1331 2017-11-23  Jan Hubicka  <hubicka@ucw.cz>
1332
1333         * ipa-fnsummary.c (record_modified_bb_info): Use sreal
1334         frequencies. Fix estimation of aggregate parameters.
1335
1336 2017-11-23  Jan Hubicka  <hubicka@ucw.cz>
1337
1338         * cgraphclones.c (cgraph_node::create_clone): Fix updating of profile
1339         when inlining.
1340
1341 2017-11-23  Tom de Vries  <tom@codesourcery.com>
1342
1343         * config/sh/sh.h (ASM_OUTPUT_ADDR_VEC_ELT): Wrap in "do {} while (0)".
1344
1345 2017-11-23  Tom de Vries  <tom@codesourcery.com>
1346
1347         * config/ft32/ft32.h (ASM_OUTPUT_ADDR_VEC_ELT): Remove semicolon after
1348         macro.
1349
1350 2017-11-23  Oleg Endo  <olegendo@gcc.gnu.org>
1351
1352         PR target/83111
1353         * config/sh/sh.md (udivsi3, divsi3, sibcall_value_pcrel,
1354         sibcall_value_pcrel_fdpic): Use local variable instead of
1355         operands[3].
1356         (calli_tbr_rel): Add missing operand 2.
1357         (call_valuei_tbr_rel): Add missing operand 3.
1358
1359 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
1360
1361         PR middle-end/82253
1362         * expr.c (expand_assignment): For CONCAT to_rtx, complex type from and
1363         bitpos/bitsize covering the whole destination, use store_expr only if
1364         the complex mode is the same.  Otherwise, use expand_normal and if
1365         it returns CONCAT, subreg each part separately instead of trying to
1366         subreg the whole result.
1367
1368 2017-11-23  Richard Biener  <rguenther@suse.de>
1369
1370         PR tree-optimization/23094
1371         * tree-ssa-sccvn.c (vuse_ssa_val): Handle VN_TOP when we
1372         come here from walking over backedges in the first iteration.
1373         (vn_reference_lookup_3): Skip clobbers that store the same value.
1374
1375 2017-11-23  Richard Biener  <rguenther@suse.de>
1376
1377         PR tree-optimization/81403
1378         * tree-ssa-pre.c (get_representative_for): Add parameter specifying
1379         a block we need a leader relative to.
1380         (phi_translate_1): For nary processing require a leader from
1381         get_representative_for given we run expression simplification
1382         using match-and-simplify.  Remove previous fix.
1383
1384 2017-11-22  Jeff Law  <law@redhat.com>
1385
1386         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
1387         Use new method allocate_value_range rather than accessing the
1388         vrp_value_range_pool data member directly.
1389         * tree-vrp.c (simplify_stmt_for_jump_threading): Tweak slightly
1390         to use extract_range_from_stmt method to avoid need for
1391         extract_range_from_assignment method.
1392         (vrp_prop::vrp_finalize): Use set_lattice_propagation_complete
1393         method rather than setting values_propgated data member directly.
1394         * vr-values.h (class vr_values): Privatize vrp_value_range_pool,
1395         and values propagated data members and extract_range_from_assignment
1396         method.  Reorder private data members to conform to standards.
1397         Add new methods set_lattice_propagation_complete and
1398         allocate_value_range.
1399
1400 2017-11-22  Eric Botcazou  <ebotcazou@adacore.com>
1401
1402         PR rtl-optimization/83030
1403         * doc/rtl.texi (Flags in an RTL Expression): Alphabetize, add entry
1404         for CROSSING_JUMP_P and mention usage of 'jump' for JUMP_INSNs.
1405         (Insns): Delete entry for REG_CROSSING_JUMP in register notes.
1406         * bb-reorder.c (update_crossing_jump_flags): Do not test whether the
1407         CROSSING_JUMP_P flag is already set before setting it.
1408         * cfgrtl.c (fixup_partition_crossing): Likewise.
1409         * reorg.c (relax_delay_slots): Do not consider a CROSSING_JUMP_P
1410         insn as useless.
1411
1412 2017-11-22  Jakub Jelinek  <jakub@redhat.com>
1413
1414         * simplify-rtx.c (simplify_binary_operation_1) <case VEC_SERIES>:
1415         Handle the case where both arguments are using gen_const_vec_series.
1416
1417 2017-11-22  David Malcolm  <dmalcolm@redhat.com>
1418
1419         PR c++/62170
1420         * pretty-print.c (pp_format): Move quoting implementation to
1421         pp_begin_quote and pp_end_quote.  Update pp_format_decoder call
1422         to pass address of "quote" local.
1423         (pp_begin_quote): New function.
1424         (pp_end_quote): New function.
1425         * pretty-print.h (printer_fn): Convert penultimate param from bool
1426         to bool *.
1427         (pp_begin_quote): New decl.
1428         (pp_end_quote): New decl.
1429         * tree-diagnostic.c (default_tree_printer): Convert penultimate
1430         param from bool to bool *.
1431         * tree-diagnostic.h (default_tree_printer): Likewise.
1432
1433 2017-11-22  Jeff Law  <law@redhat.com>
1434
1435         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::evrp_range_analyzer)
1436         Initialize vr_values.
1437         (evrp_range_analyzer::try_find_new_range): Call methods attached to
1438         vr_values via vr_values class instance rather than delegators.
1439         (evrp_range_analyzer::record_ranges_from_phis): Likewise.
1440         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
1441         (evrp_range_analyzer::push_value_range): Likewise.
1442         (evrp_range_analyzer::pop_value_range): Likewise.
1443         * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Remove
1444         most delegators.  Those remaining are exposed as public interfaces.
1445         Make vr_values a pointer and private.
1446         (evrp_range_analyzer::~evrp_range_analyzer): Delete the attached
1447         vr_values.
1448         (evrp_range_analyzer::get_vr_value): New method.
1449         * gimple-ssa-evrp.c (class evrp_folder): Use DISABLE_COPY_AND_ASSIGN.
1450         (evrp_folder::evrp_folder): New ctor to initialize vr_values.
1451         (class evrp_dom_walker): Attach evrp_folder class, initialize
1452         it in the ctor.  Remove temporary delegators.
1453         (evrp_dom_walker::before_dom_children): Call methods in attached
1454         evrp_range_analyzer class via class instance pointer.  Use
1455         free value_range_constant_singleton to remove need for
1456         op_with_constant_singleton_value delegator method.  Do not
1457         create a vrp_prop class instance for every call!  Narrow
1458         scope of a couple variables.
1459         (evrp_dom_walker::cleanup): Call methods in attached
1460         evrp_range_analyzer class via class instance pointer.
1461         * vr-values.h (class vr_values): Privatize many methods and
1462         data members.
1463
1464 2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
1465
1466         * tree.def (REDUC_MAX_EXPR, REDUC_MIN_EXPR, REDUC_PLUS_EXPR): Delete.
1467         * cfgexpand.c (expand_debug_expr): Remove handling for them.
1468         * expr.c (expand_expr_real_2): Likewise.
1469         * fold-const.c (const_unop): Likewise.
1470         * optabs-tree.c (optab_for_tree_code): Likewise.
1471         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
1472         * tree-inline.c (estimate_operator_cost): Likewise.
1473         * tree-pretty-print.c (dump_generic_node): Likewise.
1474         (op_code_prio): Likewise.
1475         (op_symbol_code): Likewise.
1476         * internal-fn.def (DEF_INTERNAL_SIGNED_OPTAB_FN): Define.
1477         (IFN_REDUC_PLUS, IFN_REDUC_MAX, IFN_REDUC_MIN): New internal functions.
1478         * internal-fn.c (direct_internal_fn_optab): New function.
1479         (direct_internal_fn_array, direct_internal_fn_supported_p
1480         (internal_fn_expanders): Handle DEF_INTERNAL_SIGNED_OPTAB_FN.
1481         * fold-const-call.c (fold_const_reduction): New function.
1482         (fold_const_call): Handle CFN_REDUC_PLUS, CFN_REDUC_MAX and
1483         CFN_REDUC_MIN.
1484         * tree-vect-loop.c: Include internal-fn.h.
1485         (reduction_code_for_scalar_code): Rename to...
1486         (reduction_fn_for_scalar_code): ...this and return an internal
1487         function.
1488         (vect_model_reduction_cost): Take an internal_fn rather than
1489         a tree_code.
1490         (vect_create_epilog_for_reduction): Likewise.  Build calls rather
1491         than assignments.
1492         (vectorizable_reduction): Use internal functions rather than tree
1493         codes for the reduction operation.  Update calls to the functions
1494         above.
1495         * config/aarch64/aarch64-builtins.c (aarch64_gimple_fold_builtin):
1496         Use calls to internal functions rather than REDUC tree codes.
1497         * config/aarch64/aarch64-simd.md: Update comment accordingly.
1498
1499 2017-11-22  Olivier Hainque  <hainque@adacore.com>
1500
1501        * config/vxworks.c (vxworks_override_options): Pick default
1502         dwarf version from macro value, VXWORKS_DWARF_VERSION_DEFAULT.
1503        * config/vxworks.h: Define VXWORKS_DWARF_VERSION_DEFAULT and
1504        DWARF_GNAT_ENCODINGS_DEFAULT.
1505        * config/vxworksae.h: Likewise.
1506
1507 2017-11-22  Marc Glisse  <marc.glisse@inria.fr>
1508
1509         PR tree-optimization/83104
1510         * vr-values.c (simplify_stmt_using_ranges): Check integral argument,
1511         not result.
1512
1513 2017-11-22  Marek Polacek  <polacek@redhat.com>
1514             H.J. Lu  <hongjiu.lu@intel.com>
1515             Jason Merrill  <jason@redhat.com>
1516
1517         PR c++/60336
1518         PR middle-end/67239
1519         PR target/68355
1520         * calls.c (initialize_argument_information): Call
1521         warn_parameter_passing_abi target hook.
1522         (store_one_arg): Use 0 for empty record size.  Don't push 0 size
1523         argument onto stack.
1524         (must_pass_in_stack_var_size_or_pad): Return false for empty types.
1525         * common.opt: Update -fabi-version description.
1526         * config/i386/i386.c (init_cumulative_args): Set cum->warn_empty.
1527         (ix86_gimplify_va_arg): Call arg_int_size_in_bytes instead of
1528         int_size_in_bytes.
1529         (ix86_is_empty_record): New function.
1530         (ix86_warn_parameter_passing_abi): New function.
1531         (TARGET_EMPTY_RECORD_P): Redefine.
1532         (TARGET_WARN_PARAMETER_PASSING_ABI): Redefine.
1533         * config/i386/i386.h (CUMULATIVE_ARGS): Add warn_empty.
1534         * doc/tm.texi: Regenerated.
1535         * doc/tm.texi.in (TARGET_EMPTY_RECORD_P,
1536         TARGET_WARN_PARAMETER_PASSING_ABI): Add.
1537         * dwarf2out.c (get_ultimate_context): Move to tree.c.
1538         * explow.c (hard_function_value): Call arg_int_size_in_bytes
1539         instead of int_size_in_bytes.
1540         * expr.c (copy_blkmode_to_reg): Likewise.
1541         * function.c (aggregate_value_p): Return 0 for empty types.
1542         (assign_parm_find_entry_rtl): Call warn_parameter_passing_abi target hook.
1543         (locate_and_pad_parm): Call arg size_in_bytes instead
1544         size_in_bytes.
1545         * lto-streamer-out.c (hash_tree): Hash TYPE_EMPTY_P and DECL_PADDING_P.
1546         * stor-layout.c (finalize_type_size): Set TYPE_EMPTY_P.
1547         * target.def (empty_record_p, warn_parameter_passing_abi): New target
1548         hooks.
1549         * targhooks.c (hook_void_CUMULATIVE_ARGS_tree): New hook.
1550         (std_gimplify_va_arg_expr): Skip empty records.  Call
1551         arg_size_in_bytes instead size_in_bytes.
1552         * targhooks.h (hook_void_CUMULATIVE_ARGS_tree): Declare.
1553         * tree-core.h (tree_type_common): Add empty_flag.
1554         (tree_decl_common): Update comments.
1555         * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Stream
1556         DECL_PADDING_P.
1557         (unpack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
1558         * tree-streamer-out.c (pack_ts_decl_common_value_fields): Stream
1559         DECL_PADDING_P.
1560         (pack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
1561         * tree.c (default_is_empty_type): New function.
1562         (default_is_empty_record): New function.
1563         (arg_int_size_in_bytes): New function.
1564         (arg_size_in_bytes): New function.
1565         (get_ultimate_context): New function.
1566         * tree.h: Define TYPE_EMPTY_P, DECL_PADDING_P and
1567         TRANSLATION_UNIT_WARN_EMPTY_P.
1568         (default_is_empty_record, arg_int_size_in_bytes,
1569         arg_size_in_bytes, get_ultimate_context): Declare.
1570
1571 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1572
1573         * config/arm/arm.c (cmse_clear_registers): New function.
1574         (cmse_nonsecure_call_clear_caller_saved): Replace register clearing
1575         code by call to cmse_clear_registers.
1576         (cmse_nonsecure_entry_clear_before_return): Likewise.
1577
1578 2017-11-22  Tamar Christina  <tamar.christina@arm.com>
1579
1580         * config/arm/arm_neon.h (vdot_u32, vdotq_u32)
1581         (vdot_s32, vdotq_s32): New.
1582         (vdot_lane_u32, vdotq_lane_u32): New.
1583         (vdot_lane_s32, vdotq_lane_s32): New.
1584
1585
1586 2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
1587
1588         PR middle-end/82547
1589         * wide-int.cc (wi::add_large, wi::sub_large): Fix overflow detection
1590         for unsigned values with fewer HWIs than the precision.
1591         (test_overflow): New function.
1592         (wide_int_cc_tests): Call it.
1593
1594 2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
1595
1596         * emit-rtl.c (init_derived_machine_modes): Make sure ptr_mode
1597         has the same mode class as Pmode.
1598
1599 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1600
1601         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Get rid of
1602         padding_bits_to_clear_ptr.
1603         (cmse_nonsecure_entry_clear_before_return): Likewise.
1604
1605 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1606
1607         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Use
1608         auto_sbitap instead of integer bitfield to control register needing
1609         clearing.
1610
1611 2017-11-22  Jakub Jelinek  <jakub@redhat.com>
1612
1613         PR tree-optimization/83044
1614         * tree-vrp.c (vrp_prop::check_array_ref): If eltsize is not
1615         INTEGER_CST or is 0, clear up_bound{,_p1} and later ignore tests
1616         that need the upper bound.  Subtract offset from
1617         get_addr_base_and_unit_offset only if positive and subtract it
1618         before division by eltsize rather than after it.
1619
1620         PR debug/83084
1621         * valtrack.c (propagate_for_debug_subst, propagate_for_debug): Reset
1622         debug insns if they would contain UNSPEC_VOLATILE or volatile asm.
1623         (dead_debug_insert_temp): Likewise, but also ignore even non-volatile
1624         asm.
1625
1626         PR middle-end/82875
1627         * optabs.c (expand_doubleword_mult, expand_binop): Before calling
1628         expand_binop with *mul_widen_optab, make sure at least one of the
1629         operands doesn't have VOIDmode.
1630
1631         PR debug/83034
1632         * dwarf2out.c (mem_loc_descriptor): Handle VEC_SERIES.
1633
1634         PR rtl-optimization/82044
1635         PR tree-optimization/82042
1636         * dse.c (record_store): Check for overflow.
1637         (check_mem_read_rtx): Properly check for overflow if width == -1, call
1638         add_wild_read instead of clear_rhs_from_active_local_stores on
1639         overflow and log it into dump_file.
1640
1641 2017-11-22  Richard Biener  <rguenther@suse.de>
1642
1643         * gimple-iterator.c (gimple_find_edge_insert_loc): Ignore
1644         fake edges to exit when looking for a place to insert.
1645         * tree-ssa-pre.c (clear_expression_ids): Inline into callers
1646         and remove.
1647         (insert_into_preds_of_block): Commit edge insertion immediately,
1648         assert that doesn't require new BBs.
1649         (fini_pre): Release expressions.
1650         (pass_pre::execute): Shuffle things around a bit, if the fn
1651         is too large do not compute AVAIL either as this is really the
1652         quadratic bit.
1653
1654 2017-11-22  Richard Biener  <rguenther@suse.de>
1655
1656         PR tree-optimization/83089
1657         * tree-if-conv.c (pass_if_conversion::execute): If anything
1658         changed reset SCEV and free the number of iteration estimates.
1659
1660 2017-11-21  Martin Sebor  <msebor@redhat.com>
1661
1662         PR tree-optimization/82945
1663         * calls.h (warn_nonstring_bound): Remove unused function.
1664
1665 2017-11-21  Martin Sebor  <msebor@redhat.com>
1666
1667         PR tree-optimization/82945
1668         * builtins.c (expand_builtin_strlen): Call maybe_warn_nonstring_arg.
1669         * calls.h (maybe_warn_nonstring_arg): Declare new function.
1670         * calls.c (get_attr_nonstring_decl, maybe_warn_nonstring_arg): New
1671         functions.
1672         (initialize_argument_information): Call maybe_warn_nonstring_arg.
1673         * calls.h (get_attr_nonstring_decl): Declare new function.
1674         * doc/extend.texi (attribute nonstring): Update.
1675         * gimple-fold.c (gimple_fold_builtin_strncpy): Call
1676         get_attr_nonstring_decl and handle it.
1677         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Same.  Improve
1678         detection of nul-termination.
1679         (strlen_to_stridx): Change to a pointer.
1680         (handle_builtin_strlen, handle_builtin_stxncpy): Adjust.
1681         (pass_strlen::execute): Same.
1682
1683 2017-11-21  Sergey Shalnov  <Sergey.Shalnov@intel.com>
1684
1685         * config/i386/i386-opts.h (enum prefer_vector_width): Added new enum
1686         for the new option -mprefer-vector-width=[none|128|256|512].
1687         * config/i386/i386.c (ix86_target_string): remove old style options
1688         -mprefer-avx256 and make -mprefer-avx128 as alias.
1689         (ix86_option_override_internal):  Apply defaults for the
1690         -mprefer-vector-width=[128|256] option.
1691         * config/i386/i386.h (TARGET_PREFER_AVX128, TARGET_PREFER_AVX256):
1692         Implement macros to work with -mprefer-vector-width=.
1693         * config/i386/i386.opt: Implemented option
1694         -mprefer-vector-width=[none|128|256|512].
1695         * doc/invoke.texi: Documentation for
1696         -mprefer-vector-width=[none|128|256|512].
1697
1698 2017-11-21  Pat Haugen  <pthaugen@us.ibm.com>
1699
1700         * config/rs6000/ppc-asm.h (f50, vs50): Fix values.
1701
1702 2017-11-21  Jonathan Wakely  <jwakely@redhat.com>
1703
1704         * doc/invoke.texi (-Wmaybe-uninitialized): Rephrase for clarity.
1705
1706 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
1707
1708         * doc/generic.texi: Document POINTER_DIFF_EXPR, update
1709         POINTER_PLUS_EXPR.
1710         * cfgexpand.c (expand_debug_expr): Handle POINTER_DIFF_EXPR.
1711         * expr.c (expand_expr_real_2): Likewise.
1712         * fold-const.c (const_binop, fold_addr_of_array_ref_difference,
1713         fold_binary_loc): Likewise.
1714         * match.pd (X-X, P+(Q-P), &D-P, (P+N)-P, P-(P+N), (P+M)-(P+N),
1715         P-Q==0, -(A-B), X-Z<Y-Z, (X-Z)-(Y-Z), Z-X<Z-Y, (Z-X)-(Z-Y),
1716         (A-B)+(C-A)): New transformations for POINTER_DIFF_EXPR, based on
1717         MINUS_EXPR transformations.
1718         * optabs-tree.c (optab_for_tree_code): Handle POINTER_DIFF_EXPR.
1719         * tree-cfg.c (verify_expr, verify_gimple_assign_binary): Likewise.
1720         * tree-inline.c (estimate_operator_cost): Likewise.
1721         * tree-pretty-print.c (dump_generic_node, op_code_prio,
1722         op_symbol_code): Likewise.
1723         * tree-vect-stmts.c (vectorizable_operation): Likewise.
1724         * vr-values.c (extract_range_from_binary_expr): Likewise.
1725         * varasm.c (initializer_constant_valid_p_1): Likewise.
1726         * tree.def: New tree code POINTER_DIFF_EXPR.
1727
1728 2017-11-21  Uros Bizjak  <ubizjak@gmail.com>
1729
1730         * config/i386/i386.md (*bswap<mode>2_movbe): Add
1731         integer suffix to movbe mnemonic.
1732         (*bswaphi2_movbe): Ditto.
1733         (bswaphi_lowpart): Merge with *bswaphi_lowpart_1.
1734
1735 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
1736
1737         PR c++/83045
1738         * tree-cfg.c (pass_warn_function_return::execute): Formatting fix.
1739         Also warn if seen __builtin_unreachable () call with BUILTINS_LOCATION.
1740         Use LOCATION_LOCUS when comparing against UNKNOWN_LOCATION.
1741
1742 2017-11-21  Martin Liska  <mliska@suse.cz>
1743
1744         * tree-inline.c (expand_call_inline): Remove not needed
1745         xstrdup_for_dump.
1746
1747 2017-11-21  James Cowgill  <James.Cowgill@imgtec.com>
1748             Jakub Jelinek  <jakub@redhat.com>
1749
1750         PR target/82880
1751         * config/mips/frame-header-opt.c (mips_register_frame_header_opt):
1752         Remove static keyword from f variable.
1753
1754 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
1755
1756         PR tree-optimization/83086
1757         * gimple-ssa-store-merging.c
1758         (imm_store_chain_info::try_coalesce_bswap): Test this_n.base_addr
1759         rather than n.base_addr.
1760
1761 2017-11-21  Martin Liska  <mliska@suse.cz>
1762
1763         PR rtl-optimization/82044
1764         PR tree-optimization/82042
1765         * dse.c (check_mem_read_rtx): Check for overflow.
1766
1767 2017-11-21  Aldy Hernandez  <aldyh@redhat.com>
1768
1769         * tree-ssa-threadbackward.c (find_jump_threads_backwards): Fix
1770         typo in comment.
1771
1772 2017-11-21  Claudiu Zissulescu  <claziss@synopsys.com>
1773
1774         * cfgrtl.c (force_nonfallthru_and_redirect): Don't split a call
1775         and its corresponding call arg location note.
1776
1777 2017-11-21  Claudiu Zissulescu  <claziss@synopsys.com>
1778             Andrew Burgess  <andrew.burgess@embecosm.com>
1779
1780         * config/arc/arc-protos.h (arc_compute_frame_size): Delete
1781         declaration.
1782         (arc_return_slot_offset): Likewise.
1783         (arc_eh_return_address_location): New declaration.
1784         * config/arc/arc.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Define.
1785         (MUST_SAVE_REGISTER): Add exception handler case.
1786         (MUST_SAVE_RETURN_ADDR): Likewise.
1787         (arc_frame_pointer_required): Likewise.
1788         (arc_frame_pointer_needed): New function.
1789         (arc_compute_frame_size): Changed.
1790         (arc_expand_prologue): Likewise.
1791         (arc_expand_epilogue): Likewise.
1792         (arc_initial_elimination_offset): Likewise.
1793         (arc_return_slot_offset): Delete.
1794         (arc_eh_return_address_location): New function.
1795         (arc_builtin_setjmp_frame_value): Likewise.
1796         * config/arc/arc.h (EH_RETURN_DATA_REGNO): Use 2 registers.
1797         (EH_RETURN_STACKADJ_RTX): Define.
1798         (EH_RETURN_HANDLER_RTX): Likewise.
1799         * config/arc/arc.md (eh_return): Delete.
1800
1801 2017-11-21  Aldy Hernandez  <aldyh@redhat.com>
1802
1803         * print-tree.h (debug_vec_tree): Remove prototype.
1804         * gdbinit.in (pvt): Remove macro.
1805
1806 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
1807
1808         PR tree-optimization/83047
1809         * gimple-ssa-store-merging.c
1810         (imm_store_chain_info::output_merged_store): If the loads with the
1811         same vuse are in different basic blocks, for load_gsi pick a load
1812         location that is dominated by the other loads.
1813
1814         PR c++/83059
1815         * config/i386/i386.c (ix86_memmodel_check): Start
1816         -Winvalid-memory-model diagnostics with lowercase letter.
1817
1818         PR debug/82718
1819         * dwarf2out.c (dw_loc_list): If crtl->has_bb_partition, temporarily
1820         set in_cold_section_p to the partition containing loc_list->first.
1821         When seeing loc_list->last_before_switch node, update secname and
1822         perform range_across_switch second partition handling only after that.
1823
1824         PR debug/82933
1825         * run-rtl-passes.c: Include debug.h.
1826         (run_rtl_passes): Call debug_hooks->assembly_start.
1827         * dwarf2out.c (dwarf2out_assembly_start): Return early if invoked
1828         multiple times.
1829
1830         PR target/82981
1831         * internal-fn.c (expand_mul_overflow): Use OPTAB_WIDEN instead of
1832         OPTAB_DIRECT in calls to expand_simple_binop.
1833
1834 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
1835
1836         PR c/81404
1837         * Makefile.in (C_COMMON_OBJS): Add c-family/known-headers.o.
1838
1839 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
1840
1841         PR c++/72786
1842         * spellcheck.h (best_match::blithely_get_best_candidate): New
1843         accessor.
1844
1845 2017-11-20  Jakub Jelinek  <jakub@redhat.com>
1846
1847         * config/i386/i386.c (parse_mtune_ctrl_str): Start diagnostics
1848         with lower case letter.
1849
1850 2017-11-20  Uros Bizjak  <ubizjak@gmail.com>
1851
1852         * config/i386/i386.md (bswaphi2): New expander.
1853         (*bswaphi2_movbe): New insn pattern.
1854         (bswaphi -> rorhi pepehole2): New peephole pattern.
1855
1856 2017-11-20  Jeff Law  <law@redhat.com>
1857
1858         * Makefile.in (OBJS): Add gimple-ssa-evrp-analyze.o.
1859         * gimple-ssa-evrp-analyze.c: New file pulled from gimple-ssa-evrp.c.
1860         * gimple-ssa-evrp-analyze.h: New file pulled from gimple-ssa-evrp.c.
1861         * gimple-ssa-evrp.c: Remove bits moved into new files.  Include
1862         gimple-ssa-evrp-analyze.h.
1863
1864         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Do not
1865         set BB_VISITED here.
1866         (evrp_range_analyzer::enter): Set BB_VISITED here instead.
1867
1868 2017-11-20  Bin Cheng  <bin.cheng@arm.com>
1869
1870         * tree-predcom.c: Add general comment on Store-Store chains.
1871         (split_data_refs_to_components): Postpone clearing eliminate_store_p
1872         flag in component.
1873         (get_chain_last_ref_at): Rename into...
1874         (get_chain_last_write_at): ...this.
1875         (get_chain_last_write_before_load): New function.
1876         (add_ref_to_chain): Promote type of chain from CT_STORE_LOAD to
1877         CT_STORE_STORE when write reference is added.
1878         (determine_roots_comp): Support load ref in CT_STORE_STORE chains.
1879         (is_inv_store_elimination_chain): Update get_chain_last_write_at call.
1880         (initialize_root_vars_store_elim_1): Ditto.
1881         (initialize_root_vars_store_elim_2): Ditto.  Replace rhs once default
1882         definition is created.
1883         (execute_pred_commoning_chain): Support load ref in CT_STORE_STORE
1884         chain by replacing it with dominant stored value.
1885
1886 2017-11-20  Bin Cheng  <bin.cheng@arm.com>
1887
1888         * tree-predcom.c (add_ref_to_chain): Remove check on distance.
1889
1890 2017-11-20  Marc Glisse  <marc.glisse@inria.fr>
1891
1892         * vr-values.c (extract_range_from_binary_expr): Use a full range
1893         for VR_VARYING.
1894
1895 2017-11-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1896
1897         * config/arm/arm.md (R4_REGNUM): Define constant.
1898         (nonsecure_call_internal): Remove r4 clobber.
1899         (nonsecure_call_value_internal): Likewise.
1900         * config/arm/thumb1.md (nonsecure_call_reg_thumb1_v5): Remove second
1901         clobber and resequence match_operands.
1902         (nonsecure_call_value_reg_thumb1_v5): Likewise.
1903         * config/arm/thumb2.md (nonsecure_call_reg_thumb2): Likewise.
1904         (nonsecure_call_value_reg_thumb2): Likewise.
1905
1906 2017-11-20  Jakub Jelinek  <jakub@redhat.com>
1907
1908         PR tree-optimization/78821
1909         * gimple-ssa-store-merging.c (find_bswap_or_nop_load): Give up
1910         if base is TARGET_MEM_REF.  If base is not MEM_REF, set base_addr
1911         to the address of the base rather than the base itself.
1912         (find_bswap_or_nop_1): Just use pointer comparison for vuse check.
1913         (find_bswap_or_nop_finalize): New function.
1914         (find_bswap_or_nop): Use it.
1915         (bswap_replace): Return a tree rather than bool, change first
1916         argument from gimple * to gimple_stmt_iterator, allow inserting
1917         into an empty sequence, allow ins_stmt to be NULL - then emit
1918         all stmts into gsi.  Fix up MEM_REF address gimplification.
1919         (pass_optimize_bswap::execute): Adjust bswap_replace caller.
1920         (struct store_immediate_info): Add N and INS_STMT non-static
1921         data members.
1922         (store_immediate_info::store_immediate_info): Initialize them
1923         from newly added ctor args.
1924         (merged_store_group::apply_stores): Formatting fixes.  Sort by
1925         bitpos at the end.
1926         (stmts_may_clobber_ref_p): For stores call also
1927         refs_anti_dependent_p.
1928         (gather_bswap_load_refs): New function.
1929         (imm_store_chain_info::try_coalesce_bswap): New method.
1930         (imm_store_chain_info::coalesce_immediate_stores): Use it.
1931         (split_group): Handle LROTATE_EXPR and NOP_EXPR rhs_code specially.
1932         (imm_store_chain_info::output_merged_store): Fail if number of
1933         new estimated stmts is bigger or equal than old.  Handle LROTATE_EXPR
1934         and NOP_EXPR rhs_code.
1935         (pass_store_merging::process_store): Compute n and ins_stmt, if
1936         ins_stmt is non-NULL and the store rhs is otherwise invalid, use
1937         LROTATE_EXPR rhs_code.  Pass n and ins_stmt to store_immediate_info
1938         ctor.
1939         (pass_store_merging::execute): Calculate dominators.
1940
1941         * tree-ssa-math-opts.c (nop_stats, bswap_stats, struct symbolic_number,
1942         BITS_PER_MARKER, MARKER_MASK, MARKER_BYTE_UNKNOWN, HEAD_MARKER, CMPNOP,
1943         CMPXCHG, do_shift_rotate, verify_symbolic_number_p,
1944         init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
1945         find_bswap_or_nop_1, find_bswap_or_nop, pass_data_optimize_bswap,
1946         class pass_optimize_bswap, bswap_replace,
1947         pass_optimize_bswap::execute): Moved to ...
1948         * gimple-ssa-store-merging.c: ... this file.
1949         Include optabs-tree.h.
1950         (nop_stats, bswap_stats, do_shift_rotate, verify_symbolic_number_p,
1951         init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
1952         find_bswap_or_nop_1, find_bswap_or_nop, bswap_replace): Put into
1953         anonymous namespace, remove static keywords.
1954         (pass_optimize_bswap::gate): Test BITS_PER_UNIT == 8 here...
1955         (pass_optimize_bswap::execute): ... rather than here.  Formatting fix.
1956
1957 2017-11-20  Jan Hubicka  <hubicka@ucw.cz>
1958
1959         PR bootstrap/83062
1960         * ipa-inline.c (can_inline_edge_p): Fix typo in previous patch.
1961
1962 2017-11-20  Aldy Hernandez  <aldyh@redhat.com>
1963
1964         * vec.h (debug_helper): New function.
1965         (DEFINE_DEBUG_VEC): New macro.
1966         * hash-set.h (debug_helper): New function.
1967         (DEFINE_DEBUG_HASH_SET): New macro.
1968         * cfg.c (debug_slim (edge)): New function.
1969         Call DEFINE_DEBUG_VEC for edges.
1970         Call DEFINE_DEBUG_HASH_SET for edges.
1971         * cfghooks.c (debug_slim (basic_block)): New function.
1972         Call DEFINE_DEBUG_VEC for basic blocks.
1973         Call DEFINE_DEBUG_HASH_SET for basic blocks.
1974         * print-tree.c (debug_slim): New function to handle trees.
1975         Call DEFINE_DEBUG_VEC for trees.
1976         Call DEFINE_DEBUG_HASH_SET for trees.
1977         (debug (vec<tree, va_gc>) &): Remove.
1978         (debug (<vec<tree, va_gc>) *): Remove.
1979         * print-rtl.c (debug_slim): New function to handle const_rtx.
1980         Call DEFINE_DEBUG_VEC for rtx_def.
1981         Call DEFINE_DEBUG_VEC for rtx_insn.
1982         Call DEFINE_DEBUG_HASH_SET for rtx_def.
1983         Call DEFINE_DEBUG_HASH_SET for rtx_insn.
1984         * sel-sched-dump.c (debug (vec<rtx_insn *> &): Remove.
1985         (debug (vec<rtx_insn *> *ptr): Remove.
1986         (debug_insn_vector): Remove.
1987         * stor-layout.c (debug_rli): Call debug() instead of debug_vec_tree.
1988
1989 2017-11-20  Tom de Vries  <tom@codesourcery.com>
1990
1991         PR rtl-optimization/82020
1992         * simplify-rtx.c (simplify_ternary_operation): Fix comparison mode of
1993         IF_THEN_ELSE condition.
1994
1995 2017-11-19  Jeff Law  <law@redhat.com>
1996
1997         * tree-ssa-dom.c (record_equivalences_from_phis): Fix handling
1998         of degenerates resulting from ignoring an edge.
1999
2000 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
2001
2002         PR ipa/81360
2003         * ipa-inline.c (can_inline_edge_p): Also check that caller is optimized
2004
2005 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
2006
2007         PR ipa/83001
2008         * profile-count.c (profile_count::to_sreal_scale): Fix return value
2009         for uninitialied counts.
2010
2011 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
2012
2013         PR ipa/60243
2014         * tree-inline.c (estimate_num_insns): Set to 1 at least.
2015
2016 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
2017
2018         PR target/82713
2019         * i386.c (ix86_builtin_vectorization_cost): Be ready for insane types.
2020
2021 2017-11-19  Tom de Vries  <tom@codesourcery.com>
2022
2023         * config/arc/arc.h (FUNCTION_PROFILER): Remove semicolon after
2024         "do while (0)".
2025
2026 2017-11-19  Tom de Vries  <tom@codesourcery.com>
2027
2028         * config/phoenix.h (TARGET_OS_CPP_BUILTINS): Remove semicolon after
2029         "do {} while (0)".
2030
2031 2017-11-19  Tom de Vries  <tom@codesourcery.com>
2032
2033         * config/visium/visium.h (ASM_OUTPUT_CASE_END): Remove semicolon after
2034         macro body.
2035
2036 2017-11-19  Tom de Vries  <tom@codesourcery.com>
2037
2038         * config/ft32/ft32.h (REGISTER_TARGET_PRAGMAS): Remove semicolon after
2039         "do {} while (0)".
2040         * config/spu/spu.h (REGISTER_TARGET_PRAGMAS): Same.
2041
2042 2017-11-19  Tom de Vries  <tom@codesourcery.com>
2043
2044         * config/mcore/mcore-elf.h (MCORE_EXPORT_NAME): Remove semicolon after
2045         "do {} while (0)".
2046         * config/mcore/mcore.h (ASM_OUTPUT_ALIGNED_COMMON): After missing
2047         semicolon after MCORE_EXPORT_NAME call.
2048
2049 2017-11-19  Tom de Vries  <tom@codesourcery.com>
2050
2051         PR target/82961
2052         * vmsdbgout.c (vmsdbgout_early_finish): New function.
2053         (vmsdbg_debug_hooks): Set early_finish field to vmsdbgout_early_finish.
2054
2055 2017-11-18  Jan Hubicka  <hubicka@ucw.cz>
2056
2057         * cgraphclones.c (cgraph_edge::clone): Rename gcov_count to prof_count.
2058         (cgraph_edge::clone): Cleanup updating of profile.
2059         * ipa-cp.c (update_profiling_info): Likewise.
2060         * ipa-inline-transform.c (inline_transform): Likewise.
2061         * ipa-inline.c (inline_small_functions): Add missing space to dump.
2062         * ipa-split.c (execute_split_functions): Do not split when function
2063         is cold.
2064         * predict.c (estimate_bb_frequencies): Cleanup updating of profile.
2065         * profile-count.c (profile_count::dump): Add global0.
2066         (profile_count::to_cgraph_frequency): Do not ICE when entry is
2067         undefined.
2068         (profile_count::to_sreal_scale): Likewise.
2069         (profile_count::adjust_for_ipa_scaling): Fix typo in comment.
2070         (profile_count::combine_with_ipa_count): New function.
2071         * profile-count.h (profile_guessed_global0adjusted): New.
2072         (profile_count::adjusted_zero): New.
2073         (profile_count::global0adjusted): New.
2074         (profile_count::combine_with_ipa_count): New.
2075         * tree-inline.c (copy_edges_for_bb): Add NUM/DEN arugment;
2076         correct profile of return block of split functions.
2077         (copy_cfg_body): Remove unused profile_count.
2078         (copy_body): Likewise.
2079         (expand_call_inline): Update.
2080         (tree_function_versioning): Update.
2081
2082 2017-11-18  Aldy Hernandez  <aldyh@redhat.com>
2083
2084         * hash-set.h (hash_set::empty): New.
2085         * tree-ssa-threadbackward.h: Delete.
2086         * tree-ssa-threadbackward.c (class thread_jumps): New.
2087         Move max_threaded_paths into class.
2088         (fsm_find_thread_path): Remove arguments that are now in class.
2089         (profitable_jump_thread_path): Rename to...
2090         (thread_jumps::profitable_jump_thread_path): ...this.
2091         (convert_and_register_jump_thread_path): Rename to...
2092         (thread_jumps::convert_and_register_current_path): ...this.
2093         (check_subpath_and_update_thread_path): Rename to...
2094         (thread_jumps::check_subpath_and_update_thread_path): ...this.
2095         (register_jump_thread_path_if_profitable): Rename to...
2096         (thread_jumps::register_jump_thread_path_if_profitable): ...this.
2097         (handle_phi): Rename to...
2098         (thread_jumps::handle_phi): ...this.
2099         (handle_assignment): Rename to...
2100         (thread_jumps::handle_assignment): ...this.
2101         (fsm_find_control_statement_thread_paths): Rename to...
2102         (thread_jumps::fsm_find_control_statement_thread_paths): ...this.
2103         (find_jump_threads_backwards): Rename to...
2104         (thread_jumps::find_jump_threads_backwards): ...this.
2105         Initialize path local data.
2106         (pass_thread_jumps::execute): Call find_jump_threads_backwards
2107         from within thread_jumps class.
2108         (pass_early_thread_jumps::execute): Same.
2109
2110 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
2111
2112         * cgraph.c (cgraph_node::dump): Do IPA sanity checking on IPA counts.
2113
2114 2017-11-17  Steve Ellcey  <sellcey@cavium.com>
2115
2116         * config/aarch64/aarch64-simd.md (fnma<mode>4): Move neg operator
2117         to canonical location.
2118
2119 2017-11-17  Steve Ellcey  <sellcey@cavium.com>
2120
2121         PR target/81356
2122         * config/aarch64/aarch64.c (aarch64_use_by_pieces_infrastructure_p):
2123         Remove.
2124         (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Remove define.
2125
2126 2017-11-17  H.J. Lu  <hongjiu.lu@intel.com>
2127
2128         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Use
2129         rcrt1.o%s/grcrt1.o%s for -static-pie.
2130
2131 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
2132
2133         * i386.c (ix86_multiplication_cost, ix86_division_cost,
2134         ix86_shift_rotate_cost): Break out from ...
2135         (ix86_rtx_costs): ... here.
2136         (ix86_add_stmt_cost): Use rtx cost machinery to compute cost of
2137         vector operations.
2138
2139 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
2140
2141         * predict.c (determine_unlikely_bbs): Set cgraph node count to 0
2142         when entry block was promoted unlikely.
2143         (estimate_bb_frequencies): Increase frequency scale.
2144         * profile-count.h (profile_count): Export precision info.
2145
2146 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
2147
2148         * tree-tailcall.c (eliminate_tail_call): Be more careful about not
2149         disturbin profile of entry block.
2150
2151 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
2152
2153         * ipa-fnsummary.c (estimate_node_size_and_time): Be more tolerant for
2154         roundoff errors.
2155
2156 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
2157
2158         * ipa-cp.c (update_profiling_info): Handle conversion to local profile.
2159         * tree-cfg.c (execute_fixup_cfg): Do fixup same way as inliner does.
2160
2161 2017-11-17  Jeff Law  <law@redhat.com>
2162
2163         * gimple-ssa-evrp.c (class evrp_range_analyzer): New class extracted
2164         from evrp_dom_walker class.  Various methods moved into new class.
2165         (evrp_range_analyzer::evrp_range_analyzer): Constructor for new class.
2166         (evrp_range_analyzer::enter): New method.
2167         (evrp_range_analyzer::leave): New method.
2168         (evrp_dom_walker): Remove delegators no longer needed by this class.
2169         Replace vr_values data member with evrp_range_analyzer
2170
2171         * gimple-ssa-evrp.c (evrp_dom_walker::record_ranges_from_phis): New
2172         method extracted from evrp_dom_walker::before_dom_children.
2173         (evrp_dom_walker::record_ranges_from_stmt): Likewise.
2174         (evrp_dom_walker::record_ranges_from_incoming_edge): Likewise.
2175
2176         * gimple-ssa-evrp.c (evrp_dom_walker): Add cleanup method.
2177         Add private copy constructor and move assignment operators.
2178         Privatize methods and class data where trivially possible.
2179         (evrp_dom_walker::cleanup): New function, extracted from
2180         execute_early_vrp.  Simplify access to class data.
2181
2182         * vr-values.h (get_output_for_vrp): Prototype.
2183         * vr-values.c (get_output_for_vrp): New function extracted from
2184         vrp_visit_assignment_or_call and extract_range_from_stmt.
2185         (vrp_visit_assignment_or_call): Use get_output_for_vrp.  Simplify.
2186
2187 2017-11-17  Luis Machado  <luis.machado@linaro.org>
2188
2189         * config/aarch64/aarch64.c
2190         (qdf24xx_prefetch_tune) <default_opt_level>: Set to -1.
2191         (qdf24xx_tunings) <autoprefetcher_model>: Set to
2192         tune_params::AUTOPREFETCHER_WEAK.
2193
2194 2017-11-17  Tamar Christina  <tamar.christina@arm.com>
2195
2196         PR target/82641
2197         * config/arm/arm.c (arm_valid_target_attribute_rec):
2198         Parse "arch=" and "+<ext>".
2199         (arm_valid_target_attribute_tree): Re-init global options.
2200         (arm_option_override): Make non-static.
2201         (arm_options_perform_arch_sanity_checks): Make errors fatal.
2202         * gcc/config/arm/arm-c.c (__ARM_FEATURE_CMSE): Support undef.
2203         (__ARM_FEATURE_CRC32): Support undef.
2204         * config/arm/arm_acle.h (__ARM_FEATURE_CRC32): Replace with pragma.
2205         * doc/extend.texi (ARM Function Attributes): Add pragma and target.
2206
2207 2017-11-17  David Malcolm  <dmalcolm@redhat.com>
2208
2209         * gdbinit.in (break-on-diagnostic): New command.
2210
2211 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
2212
2213         * config/i386/i386.c (ix86_expand_epilogue): Change simple
2214         return to indirect jump for EH return if control-flow
2215         protection is enabled. Change explicit 'false' argument in
2216         pro_epilogue_adjust_stack with a value of
2217         flag_cf_protection.
2218         * config/i386/i386.md (simple_return_indirect_internal):
2219         Remove SImode restriction to support 64-bit.
2220
2221 2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>
2222
2223         * combine.c (added_notes_insn): New.
2224         (try_combine): Handle added_notes_insn like added_links_insn.
2225         Rewrite return value code.
2226         (distribute_notes): Set added_notes_insn to the earliest insn we added
2227         a note to.
2228
2229 2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>
2230
2231         PR rtl-optimization/82621
2232         * combine.c (try_combine): Do not split PARALLELs of two SETs if the
2233         dest of one of those SETs is unused.
2234
2235 2017-11-17  Richard Biener  <rguenther@suse.de>
2236
2237         PR fortran/83017
2238         * tree-core.h (enum annot_expr_kind): Add annot_expr_parallel_kind.
2239         * tree-pretty-print.c (dump_generic_node): Handle
2240         annot_expr_parallel_kind.
2241         * tree-cfg.c (replace_loop_annotate_in_block): Likewise.
2242         * gimplify.c (gimple_boolify): Likewise.
2243
2244 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
2245
2246         * config.gcc (extra_headers): Add cet.h for x86 targets.
2247         * config/i386/cet.h: New file.
2248         * doc/install.texi: Add --enable-cet/--disable-cet.
2249
2250 2017-11-17  Richard Biener  <rguenther@suse.de>
2251
2252         PR tree-optimization/83017
2253         * tree-parloops.c (MIN_PER_THREAD): Use --param parloops-min-per-thread.
2254         (gen_parallel_loop): Properly count iterations.
2255         (parallelize_loops): Handle loop->can_be_parallel independent
2256         of flag_loop_parallelize_all.  Make static profitability test match
2257         the runtime one.
2258         * params.def (PARAM_PARLOOPS_MIN_PER_THREAD): New.
2259         * invoke.texi (parloops-min-per-thread): Document.
2260
2261 2017-11-17  Vineet Gupta  <vgupta@synopsys.com>
2262
2263         * config/arc/linux.h: GLIBC_DYNAMIC_LINKER update per glibc
2264         upstreaming review comments.
2265
2266 2017-11-17  Tamar Christina  <tamar.christina@arm.com>
2267
2268         * expr.c (copy_blkmode_to_reg): Fix bitsize for targets
2269         with fast unaligned access.
2270         * doc/sourcebuild.texi (word_mode_no_slow_unalign): New.
2271
2272 2017-11-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2273
2274         * config/arm/arm.c (cmse_nonsecure_entry_clear_before_return): Allocate
2275         to_clear_arg_regs_bitmap to the same size as to_clear_bitmap.
2276
2277 2017-11-17  Richard Biener  <rguenther@suse.de>
2278
2279         * tree-ssa-pre.c (phi_translate_1): Remove redundant constant
2280         folding of references.
2281
2282 2017-11-17  Qing Zhao  <qing.zhao@oracle.com>
2283
2284         PR middle-end/78809
2285         * gimple-fold.c (gimple_fold_builtin_string_compare): Add handling
2286         of replacing call to strncmp with corresponding call to strcmp when
2287         meeting conditions.
2288
2289 2017-11-17  Sergey Shalnov  <Sergey.Shalnov@intel.com>
2290
2291         * config/i386/x86-tune.def (X86_TUNE_AVX256_OPTIMAL): Add tuning
2292         option prefer-avx256 for skylake-avx512 configuration.
2293         * config/i386/i386.c (ix86_option_override_internal): Ditto.
2294         (get_builtin_code_for_version): Ditto.
2295
2296 2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
2297             Monk Chiang  <sh.chiang04@gmail.com>
2298
2299         * config/nds32/nds32.h (FIRST_PSEUDO_REGISTER): Modify.
2300         (FIXED_REGISTERS): Reserve more register numbers.
2301         (CALL_USED_REGISTERS): Likewise.
2302         (REG_ALLOC_ORDER): Likewise.
2303         (REG_CLASS_CONTENTS): Likewise.
2304         (REGISTER_NAMES): Likewise.
2305
2306 2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
2307             Kito Cheng  <kito.cheng@gmail.com>
2308
2309         * config/nds32/nds32-modes.def: Add vector mode V4QI V2HI V8QI V4HI
2310         V2SI.
2311         * config/nds32/iterators.md: Add vector mode iterators and attributes.
2312
2313 2017-11-16  Steven Munroe  <munroesj@gcc.gnu.org>
2314
2315         * config/rs6000/mmintrin.h (_mm_add_pi32[_ARCH_PWR]): Correct
2316         parameter list for vec_splats.
2317
2318 2017-11-16  Joseph Myers  <joseph@codesourcery.com>
2319
2320         * doc/invoke.texi (-std=c17): Refer to 2018 expected publication
2321         date of C17.
2322         (-std=c18, -std=iso9899:2018, -std=gnu18): Document option aliases.
2323
2324 2017-11-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
2325
2326         PR bootstrap/82856
2327         * doc/install.texi: Document incompatibility of Perl >=5.6.26
2328         with the required version of automake 1.11.6.
2329
2330 2017-11-16  Pat Haugen  <pthaugen@us.ibm.com>
2331
2332         * rs6000/power9.md (power9fpdiv): New automaton and cpu_unit defined
2333         for it.
2334         (DU_C2_3_power9): Correct reservation combinations.
2335         (FP_DIV_power9, VEC_DIV_power9): New.
2336         (power9-alu): Split out rotate/shift...
2337         (power9-rot): ...to here, correct dispatch resource.
2338         (power9-cracked-alu, power9-mul, power9-mul-compare): Correct dispatch
2339         resource.
2340         (power9-fp): Correct latency.
2341         (power9-sdiv): Add div/sqrt resource.
2342         (power9-ddiv): Correct latency, add div/sqrt resource.
2343         (power9-sqrt, power9-dsqrt): Add div/sqrt resource.
2344         (power9-vecfdiv, power9-vecdiv): Correct latency, add div/sqrt
2345         resource.
2346         (power9-qpdiv, power9-qpmul): Adjust resource usage.
2347
2348 2017-11-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
2349
2350         * config/rs6000/rs6000.c (rs6000_expand_builtin): Do not do the
2351         switch statement mapping KF built-ins to TF built-ins if we don't
2352         have the proper ISA 3.0 assembler support.
2353
2354 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
2355
2356         * tree-emutls.c (lower_emutls_data): Remove unused bb_freq.
2357         (lower_emutls_function_body): Do not compute it.
2358
2359 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
2360
2361         * ipa-split.c (split_bb_info): Turn time to sreal.
2362         (split_point): Likewise.
2363         (dump_split_point): Likewise.
2364         (fine_split_points): Likewise.
2365         (execute_split_functions): Only zero split_bbs; turn time to sreals.
2366
2367 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
2368
2369         * ipa-fnsummary.c (analyze_function_body): Accumulate time consistently
2370         in sreal.
2371
2372 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
2373
2374         * predict.c (combine_predictions_for_bb): Preserve zero predicted
2375         edges.
2376         (expensive_function_p): Remove useless assert.
2377         (determine_unlikely_bbs): Propagate also forward; determine cold blocks
2378
2379 2017-11-16  Martin Sebor  <msebor@redhat.com>
2380
2381         PR tree-optimization/82588
2382         PR tree-optimization/82583
2383         * tree-vrp.c (check_array_ref): Handle flexible array members,
2384         string literals, and inner indices.
2385         (search_for_addr_array): Add detail to diagnostics.
2386
2387 2017-11-16  Nathan Sidwell  <nathan@acm.org>
2388
2389         PR c++/82836
2390         PR c++/82737
2391         * tree.h (COPY_DECL_RTL): Rename parms for clarity.
2392         (SET_DECL_ASSEMBLER_NAME): Forward to
2393         overwrite_decl_assembler_name.
2394         (COPY_DECL_ASSEMBLER_NAME): Rename parms for clarity.
2395         (overwrite_decl_assembler_name): Declare.
2396         * tree.c (overwrite_decl_assembler_name): New.
2397         * langhooks-def.h (lhd_overwrite_decl_assembler_name): Declare.
2398         (LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME): Provide default.
2399         (LANG_HOOKS_INITIALIZER): Add it.
2400         * langhooks.h (struct lang_hooks): Add overwrite_decl_assembler_name.
2401         * langhooks.c (lhd_set_decl_assembler_name): Use
2402         SET_DECL_ASSEMBLER_NAME.
2403         (lhd_overwrite_decl_assembler_name): Default implementation.
2404
2405 2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
2406             Jackson Woodruff  <jackson.woodruff@arm.com>
2407
2408         PR tree-optimization/71026
2409         * match.pd: Canonicalize constant multiplies in division.
2410
2411 2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
2412
2413         * opts.c (default_options_table): Add OPT_fomit_frame_pointer entry.
2414         * common/config/alpha/alpha-common.c (TARGET_OPTION_OPTIMIZATION_TABLE):
2415         Remove OPT_fomit_frame_pointer entry.
2416         * common/config/arc/arc-common.c: Likewise.
2417         * common/config/arm/arm-common.c: Likewise.
2418         * common/config/avr/avr-common.c: Likewise.
2419         * common/config/c6x/c6x-common.c: Likewise.
2420         * common/config/cr16/cr16-common.c: Likewise.
2421         * common/config/cris/cris-common.c: Likewise.
2422         * common/config/epiphany/epiphany-common.c: Likewise.
2423         * common/config/fr30/fr30-common.c: Likewise.
2424         * common/config/frv/frv-common.c: Likewise.
2425         * common/config/ia64/ia64-common.c: Likewise.
2426         * common/config/iq2000/iq2000-common.c: Likewise.
2427         * common/config/lm32/lm32-common.c: Likewise.
2428         * common/config/m32r/m32r-common.c: Likewise.
2429         * common/config/mcore/mcore-common.c: Likewise.
2430         * common/config/microblaze/microblaze-common.c: Likewise.
2431         * common/config/mips/mips-common.c: Likewise.
2432         * common/config/mmix/mmix-common.c: Likewise.
2433         * common/config/mn10300/mn10300-common.c: Likewise.
2434         * common/config/nios2/nios2-common.c: Likewise.
2435         * common/config/pa/pa-common.c: Likewise.
2436         * common/config/pdp11/pdp11-common.c: Likewise.
2437         * common/config/powerpcspe/powerpcspe-common.c: Likewise.
2438         * common/config/riscv/riscv-common.c: Likewise.
2439         * common/config/rs6000/rs6000-common.c: Likewise.
2440         * common/config/rx/rx-common.c: Likewise.
2441         * common/config/s390/s390-common.c: Likewise.
2442         * common/config/sh/sh-common.c: Likewise.
2443         * common/config/sparc/sparc-common.c: Likewise.
2444         * common/config/tilegx/tilegx-common.c: Likewise.
2445         * common/config/tilepro/tilepro-common.c: Likewise.
2446         * common/config/v850/v850-common.c: Likewise.
2447         * common/config/visium/visium-common.c: Likewise.
2448         * common/config/xstormy16/xstormy16-common.c: Likewise.
2449         * common/config/xtensa/xtensa-common.c: Likewise.
2450         * invoke.texi (-fomit-frame-pointer): Update documentation.
2451
2452 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
2453
2454         * tree-cfg.c (gimple_find_sub_bbs): Do not compute freq.
2455
2456 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
2457
2458         * cfg.c (scale_bbs_frequencies_int,
2459         cale_bbs_frequencies_gcov_type): Remove.
2460         * cfg.h (scale_bbs_frequencies_int,
2461         cale_bbs_frequencies_gcov_type): Remove.
2462
2463 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
2464
2465         * tree-ssa-loop-manip.c
2466         (scale_dominated_blocks_in_loop): Update to profile counts.
2467         (tree_transform_and_unroll_loop): Likewise.
2468
2469 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
2470
2471         * tree-vect-loop-manip.c (vect_do_peeling): Do not use
2472         scale_bbs_frequencies_int.
2473
2474 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
2475
2476         * final.c (compute_alignments): Use counts rather than frequencies.
2477
2478 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
2479
2480         * cfgloopanal.c: Include sreal.h
2481         (average_num_loop_insns): Use counts and sreal for accounting.
2482
2483 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
2484
2485         * cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
2486         manipulation.
2487
2488 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
2489             Kito Cheng  <kito.cheng@gmail.com>
2490
2491         * config/nds32/constraints.md: Provide more constraints.
2492         * config/nds32/nds32.h (enum reg_class, REG_CLASS_NAMES,
2493         REG_CLASS_CONTENTS): Define R5_REG, R8_REG, and FRAME_POINTER_REG to
2494         support constraints usage.
2495
2496 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
2497
2498         * config/nds32/constants.md (UNSPEC_VOLATILE_FUNC_RETURN): Remove.
2499
2500 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
2501             Kito Cheng  <kito.cheng@gmail.com>
2502
2503         * config/nds32/nds32.opt: Add mext-perf, mext-perf2, mext-string.
2504         * config/nds32/nds32.opt: Refine the layout.
2505         * config/nds32/nds32.c (TARGET_EXT_PERF, TARGET_EXT_PERF2,
2506         TARGET_EXT_STRING): Support new options.
2507         * config/nds32/nds32.h: Likewise.
2508         * config/nds32/nds32.md: Likewise.
2509         * config/nds32/nds32-predicates.c: Likewise.
2510         * config/nds32/constraints.md: Likewise.
2511         * common/config/nds32/nds32-common.c: Likewise.
2512
2513 2017-11-16  Julia Koval  <julia.koval@intel.com>
2514
2515         PR target/82983
2516         * config/i386/gfniintrin.h: Add sse check.
2517         * config/i386/i386.c (ix86_expand_builtin): Fix gfni check.
2518
2519 2017-11-16  Julia Koval  <julia.koval@intel.com>
2520
2521         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI2_SET,
2522         OPTION_MASK_ISA_AVX512VBMI2_UNSET): New.
2523         (ix86_handle_option): Handle -mavx512vbmi2.
2524         * config/i386/cpuid.h: Add bit_AVX512VBMI2.
2525         * config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit.
2526         * config/i386/i386-c.c (__AVX512VBMI2__): New.
2527         * config/i386/i386.c (ix86_target_string): Handle -mavx512vbmi2.
2528         (ix86_valid_target_attribute_inner_p): Ditto.
2529         * config/i386/i386.h (TARGET_AVX512VBMI2, TARGET_AVX512VBMI2_P): New.
2530         * config/i386/i386.opt (mavx512vbmi2): New option.
2531         * doc/invoke.texi: Add new option.
2532
2533 2017-11-16  Julia Koval  <julia.koval@intel.com>
2534
2535         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8, _mm256_gf2p8mul_epi8,
2536         _mm_mask_gf2p8mul_epi8, _mm_maskz_gf2p8mul_epi8,
2537         _mm256_mask_gf2p8mul_epi8, _mm256_maskz_gf2p8mul_epi8,
2538         _mm512_mask_gf2p8mul_epi8, _mm512_maskz_gf2p8mul_epi8,
2539         _mm512_gf2p8mul_epi8): New intrinsics.
2540         * config/i386/i386-builtin-types.def
2541         (V64QI_FTYPE_V64QI_V64QI): New type.
2542         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8mulb_v64qi,
2543         __builtin_ia32_vgf2p8mulb_v64qi_mask, __builtin_ia32_vgf2p8mulb_v32qi,
2544         __builtin_ia32_vgf2p8mulb_v32qi_mask, __builtin_ia32_vgf2p8mulb_v16qi,
2545         __builtin_ia32_vgf2p8mulb_v16qi_mask): New builtins.
2546         * config/i386/sse.md (vgf2p8mulb_*): New pattern.
2547         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
2548
2549 2017-11-15  Uros Bizjak  <ubizjak@gmail.com>
2550
2551         * config/i386/i386.c (x86_print_call_or_nop): Emit 5 byte nop
2552         explicitly as a stream of bytes.
2553
2554 2017-11-15  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
2555
2556         * config/rs6000/altivec.h (vec_xst_be): New #define.
2557         * config/rs6000/altivec.md (altivec_vperm_<mode>_direct): Rename
2558         and externalize from *altivec_vperm_<mode>_internal.
2559         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI): Remove macro
2560         instantiation.
2561         (XL_BE_V8HI): Likewise.
2562         (XL_BE_V4SI): Likewise.
2563         (XL_BE_V4SI): Likewise.
2564         (XL_BE_V2DI): Likewise.
2565         (XL_BE_V4SF): Likewise.
2566         (XL_BE_V2DF): Likewise.
2567         (XST_BE): Add BU_VSX_OVERLOAD_X macro instantiation.
2568         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Correct
2569         all array entries with these keys: VSX_BUILTIN_VEC_XL,
2570         VSX_BUILTIN_VEC_XL_BE, VSX_BUILTIN_VEC_XST.  Add entries for key
2571         VSX_BUILTIN_VEC_XST_BE.
2572         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Remove.
2573         (altivec_expand_builtin): Remove handling for VSX_BUILTIN_XL_BE_*
2574         built-ins.
2575         (altivec_init_builtins): Replace conditional calls to def_builtin
2576         for __builtin_vsx_ld_elemrev_{v8hi,v16qi} and
2577         __builtin_vsx_st_elemrev_{v8hi,v16qi} based on TARGET_P9_VECTOR
2578         with unconditional calls.  Remove calls to def_builtin for
2579         __builtin_vsx_le_be_<mode>.  Add a call to def_builtin for
2580         __builtin_vec_xst_be.
2581         * config/rs6000/vsx.md (vsx_ld_elemrev_v8hi): Convert define_insn
2582         to define_expand, and add alternate RTL generation for P8.
2583         (*vsx_ld_elemrev_v8hi_internal): New define_insn based on
2584         vsx_ld_elemrev_v8hi.
2585         (vsx_ld_elemrev_v16qi): Convert define_insn to define_expand, and
2586         add alternate RTL generation for P8.
2587         (*vsx_ld_elemrev_v16qi_internal): New define_insn based on
2588         vsx_ld_elemrev_v16qi.
2589         (vsx_st_elemrev_v8hi): Convert define_insn
2590         to define_expand, and add alternate RTL generation for P8.
2591         (*vsx_st_elemrev_v8hi_internal): New define_insn based on
2592         vsx_st_elemrev_v8hi.
2593         (vsx_st_elemrev_v16qi): Convert define_insn to define_expand, and
2594         add alternate RTL generation for P8.
2595         (*vsx_st_elemrev_v16qi_internal): New define_insn based on
2596         vsx_st_elemrev_v16qi.
2597
2598 2017-11-15  H.J. Lu  <hongjiu.lu@intel.com>
2599
2600         PR target/82990
2601         * config/i386/i386.c (pass_insert_vzeroupper::gate): Remove
2602         TARGET_AVX512ER check.
2603         (ix86_option_override_internal): Set MASK_VZEROUPPER if
2604         neither -mzeroupper nor -mno-zeroupper is used and
2605         TARGET_EMIT_VZEROUPPER is set.
2606         * config/i386/i386.h (TARGET_EMIT_VZEROUPPER): New.
2607         * config/i386/x86-tune.def: Add X86_TUNE_EMIT_VZEROUPPER.
2608
2609 2017-11-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
2610
2611         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
2612         folding of vector compares.
2613         (fold_build_vec_cmp): New helper function.
2614         (fold_compare_helper): New helper function.
2615         (builtin_function_type): Add compare builtins to the list of functions
2616         having unsigned arguments.  Cosmetic updates to comment indentation.
2617         * config/rs6000/vsx.md (vcmpneb, vcmpneh, vcmpnew): Update to specify
2618         the not+eq combination.
2619
2620 2017-11-15  Bin Cheng  <bin.cheng@arm.com>
2621
2622         PR tree-optimization/82726
2623         PR tree-optimization/70754
2624         * tree-predcom.c (order_drefs_by_pos): New function.
2625         (combine_chains): Move code setting has_max_use_after to...
2626         (try_combine_chains): ...here.  New parameter.  Sort combined chains
2627         according to position information.
2628         (tree_predictive_commoning_loop): Update call to above function.
2629         (update_pos_for_combined_chains, pcom_stmt_dominates_stmt_p): New.
2630
2631 2017-11-15  Bin Cheng  <bin.cheng@arm.com>
2632
2633         PR tree-optimization/82726
2634         Revert
2635         2017-01-23  Bin Cheng  <bin.cheng@arm.com>
2636
2637         PR tree-optimization/70754
2638         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
2639         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
2640         combined stmt before it if not NULL.
2641         (combine_chains): Process refs reversely and compute dominance point
2642         for root ref.
2643
2644         Revert
2645         2017-02-23  Bin Cheng  <bin.cheng@arm.com>
2646
2647         PR tree-optimization/79663
2648         * tree-predcom.c (combine_chains): Process refs in reverse order
2649         only for ZERO length chains, and add explaining comment.
2650
2651 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
2652
2653         * config/arm/arm-cpus.in (armv8_3, ARMv8_3a, armv8.3-a): New
2654         * config/arm/arm-tables.opt (armv8.3-a): Regenerated.
2655         * doc/invoke.texi (ARM Options): Add armv8.3-a.
2656
2657 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
2658
2659         * config/arm/arm.h (TARGET_DOTPROD): Add arm_arch8_2.
2660
2661 2017-11-15  Martin Liska  <mliska@suse.cz>
2662
2663         * tree-cfg.c (pass_warn_function_return::execute):
2664         Compare warn_return_type for greater than zero.
2665
2666 2017-11-15  Sebastian Peryt  <sebastian.peryt@intel.com>
2667
2668         PR target/82941
2669         PR target/82942
2670         * config/i386/i386.c (pass_insert_vzeroupper): Modify gate condition
2671         to return true on Xeon and not on Xeon Phi.
2672         (ix86_check_avx256_register): Changed to ...
2673         (ix86_check_avx_upper_register): ... this. Add extra check for
2674         VALID_AVX512F_REG_OR_XI_MODE.
2675         (ix86_avx_u128_mode_needed): Changed
2676         ix86_check_avx256_register to ix86_check_avx_upper_register.
2677         (ix86_check_avx256_stores): Changed to ...
2678         (ix86_check_avx_upper_stores): ... this. Changed
2679         ix86_check_avx256_register to ix86_check_avx_upper_register.
2680         (ix86_avx_u128_mode_after): Changed
2681         avx_reg256_found to avx_upper_reg_found. Changed
2682         ix86_check_avx256_stores to ix86_check_avx_upper_stores.
2683         (ix86_avx_u128_mode_entry): Changed
2684         ix86_check_avx256_register to ix86_check_avx_upper_register.
2685         (ix86_avx_u128_mode_exit): Ditto.
2686         * config/i386/i386.h: (host_detect_local_cpu): New define.
2687
2688 2017-11-15  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>
2689
2690         * config/arm/xgene1.md (xgene1): Split into automatons
2691         xgene1_main, xgene1_decoder, xgene1_div, xgene1_simd.
2692         (xgene1_f_load): Adjust reservations and/or types.
2693         (xgene1_f_store): Likewise.
2694         (xgene1_load_pair): Likewise.
2695         (xgene1_store_pair): Likewise.
2696         (xgene1_fp_load1): Likewise.
2697         (xgene1_load1): Likewise.
2698         (xgene1_store1): Likewise.
2699         (xgene1_move): Likewise.
2700         (xgene1_alu): Likewise.
2701         (xgene1_simd): Likewise.
2702         (xgene1_bfm): Likewise.
2703         (xgene1_neon_load1): Likewise.
2704         (xgene1_neon_store1): Likewise.
2705         (xgene1_neon_logic): Likewise.
2706         (xgene1_neon_st1): Likewise.
2707         (xgene1_neon_ld1r): Likewise.
2708         (xgene1_alu_cond): Added.
2709         (xgene1_shift_reg): Likwise.
2710         (xgene1_bfx): Likewise.
2711         (xgene1_mul): Split into xgene1_mul32, xgene1_mul64.
2712
2713 2017-11-15  Jakub Jelinek  <jakub@redhat.com>
2714
2715         PR target/82981
2716         * internal-fn.c: Include gimple-ssa.h, tree-phinodes.h and
2717         ssa-iterators.h.
2718         (can_widen_mult_without_libcall): New function.
2719         (expand_mul_overflow): If only checking unsigned mul overflow,
2720         not result, and can do efficiently MULT_HIGHPART_EXPR, emit that.
2721         Don't use WIDEN_MULT_EXPR if it would involve a libcall, unless
2722         no other way works.  Add MULT_HIGHPART_EXPR + MULT_EXPR support.
2723         (expand_DIVMOD): Formatting fix.
2724         * expmed.h (expand_mult): Add NO_LIBCALL argument.
2725         * expmed.c (expand_mult): Likewise.  Use OPTAB_WIDEN rather
2726         than OPTAB_LIB_WIDEN if NO_LIBCALL is true, and allow it to fail.
2727
2728         PR tree-optimization/82977
2729         * tree-ssa-strlen.c (strlen_optimize_stmt): Pass a reference to a copy
2730         constructed temporary to strlen_to_stridx.put.
2731
2732 2017-11-15  Martin Liska  <mliska@suse.cz>
2733
2734         * configure.ac: Remove -fkeep-inline-functions from coverage_flags.
2735         * configure: Regenerate.
2736
2737 2017-11-15  Martin Liska  <mliska@suse.cz>
2738
2739         PR target/82927
2740         * config/sh/sh-mem.cc: Use proper probability for
2741         REG_BR_PROB_NOTE.
2742
2743 2017-11-14  Jeff Law  <law@redhat.com>
2744
2745         * explow.c (anti_adjust_stack_and_probe_stack_clash): Avoid probing
2746         the red zone for stack_clash_protection_final_dynamic_probe targets
2747         when the total dynamic stack size is zero bytes.
2748
2749         * tree-ssa-threadupdate.c (thread_through_all_blocks): Thread
2750         blocks is post order.
2751
2752 2017-11-15  Alexandre Oliva <aoliva@redhat.com>
2753
2754         * dumpfile.h (TDF_COMPARE_DEBUG): New.
2755         * final.c (rest_of_clean_state): Set it for the
2756         -fcompare-debug dump.
2757         * tree-pretty-print.c (dump_generic_node): Omit OBJ_TYPE_REF
2758         class when TDF_COMPARE_DEBUG is set.
2759
2760         * dwarf2out.c (gen_producer_string): Discard
2761         OPT_fcompare_debug.
2762
2763 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
2764
2765         PR c/81156
2766         * doc/extend.texi (Other Builtins): Document __builtin_tgmath.
2767         * ginclude/tgmath.h (__tg_cplx, __tg_ldbl, __tg_dbl, __tg_choose)
2768         (__tg_choose_2, __tg_choose_3, __TGMATH_REAL_1_2)
2769         (__TGMATH_REAL_2_3): Remove macros.
2770         (__TGMATH_CPLX, __TGMATH_CPLX_2, __TGMATH_REAL, __TGMATH_REAL_2)
2771         (__TGMATH_REAL_3, __TGMATH_CPLX_ONLY): Define using
2772         __builtin_tgmath.
2773         (frexp, ldexp, nexttoward, scalbn, scalbln): Define using
2774         __TGMATH_REAL_2.
2775         (remquo): Define using __TGMATH_REAL_3.
2776
2777 2017-11-14  Jeff Law  <law@redhat.com>
2778
2779         * vr-values.c: New file with contents extracted from tree-vrp.c.
2780         * Makefile.in (OBJS): Add vr-values.o
2781         * tree-vrp.h (set_value_range_to_nonnull): Prototype.
2782         (set_value_range, set_and_canonicalize_value_range): Likewise.
2783         (vrp_bitmap_equal_p, range_is_nonnull): Likewise.
2784         (value_range_constant_singleton, symbolic_range_p): Likewise.
2785         (compare_values, compare_values_warnv, vrp_val_is_min): Likewise.
2786         (vrp_val_is_max, copy_value_range, set_value_range_to_value): Likewise.
2787         (extract_range_from_binary_expr_1, vrp_val_min, vrp_val_max): Likewise.
2788         (set_value_range_to_null, range_int_cst_p, opreand_less_p): Likewise.
2789         (find_case_label_range, find_case_label_index): Likewise.
2790         (zero_nonzero_bits_from_vr, overflow_comparison_p): Likewise.
2791         (range_int_cst_singleton_p, value_inside_range): Likewise.
2792         (get_single_symbol): Likewise.
2793         (switch_update): Move structure definition here.
2794         (to_remove_edges, to_update_switch_stmts): Provide externs.
2795         * tree-vrp.c: Move all methods for vr-values class to vr-values.c
2796         (vrp_val_max, vrp_val_min, vrp_val_is_max): Make externally visible.
2797         (vrp_val_is_min, set_value_range): Likewise.
2798         (set_and_canonicalize_value_range, copy_value_range): Likewise.
2799         (set_value_range_to_value, set_value_range_to_nonnull): Likewise.
2800         (set_value_range_to_null, vrp_bitmap_equal_p): Likewise.
2801         (range_is_nonnull, range_int_cst_p): Likewwise.
2802         (range_int_cst_singleton_p, symbolic_range_p): Likewise.
2803         (get_single_symbol, operand_less_p): Likewise
2804         (compare_values_warnv, compare_values): Likewise.
2805         (value_inside_range, value_range_constant_singleton): Likewise.
2806         (zero_nonzero_bitgs_from_vr): Likewise.
2807         (extract_range_from_binary_expr_1): Likewise.
2808         (overflow_comparison_p): Likewise.
2809         (to_remove_edges, to_update_switch_stmts): Likewise.
2810         (find_case_label-index, find_case_label_range): Likewise.
2811         (switch_update, set_value_range_to_nonnegative): Remove.
2812         (set_value_range_to_truthvalue): Likewise.
2813         (symbolic_range_based_on_p, gimple_assign_nonzero_p): Likewise.
2814         (gimple_stmt_nonzero_p, compare_ranges): Likewise.
2815         (compare_range_with_value, vrp_valueize, vrp_valueize_1): Likewise.
2816         (find_case_label_ranges, test_for_singularity): Likewise.
2817         (range_fits_type_p, simplify_conversion_using_ranges): LIkewise.
2818         (x_vr_values): Move to its remaining use site.
2819
2820 2017-11-10  Jeff Law  <law@redhat.com>
2821
2822         * vr-values.h (VR_INITIALIZER): Move #define here.
2823         * gimple-ssa-evrp.c: New file with contents extracted from tree-vrp.c
2824         * Makefile.in (OBJS): Add tree-evrp.o
2825         * tree-vrp.h (assert_info): Move structure definition here.
2826         (set_value_range_to_varying): Prototype.
2827         (vrp_operand_equal_p, range_includes_zero_p): Likewise.
2828         (infer_value_range, register_edge_assert_for): Likewise.
2829         (stmt_interesting_for_vrp): Likewise.
2830         * tree-vrp.c: Move all methods for evrp class into gimple-ssa-evrp.c.
2831         (set_value_range_to_varying): No longer static.
2832         (vrp_operand_equal_p, range_includes_zero_p): Likewise.
2833         (infer_value_range, register_edge_assert_for): Likewise.
2834
2835 2017-11-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
2836
2837         * config/rs6000/rs6000.md (bswapdi2): On 32-bit ISA 3.0, don't
2838         generate the XXBRD instruction.
2839
2840         * config/rs6000/rs6000-c.c (is_float128_p): New helper function.
2841         (rs6000_builtin_type_compatible): Treat _Float128 and long double
2842         as being compatible if -mabi=ieeelongdouble.
2843         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_HW_1): New macros
2844         to setup float128 built-ins with hardware support.
2845         (BU_FLOAT128_HW_2): Likewise.
2846         (BU_FLOAT128_HW_3): Likewise.
2847         (BU_FLOAT128_HW_VSX_1): Likewise.
2848         (BU_FLOAT128_HW_VSX_2): Likewise.
2849         (scalar_extract_expq): Change float128 built-in functions to
2850         accommodate having both KFmode and TFmode functions.  Use the
2851         KFmode variant as the default.
2852         (scalar_extract_sigq): Likewise.
2853         (scalar_test_neg_qp): Likewise.
2854         (scalar_insert_exp_q): Likewise.
2855         (scalar_insert_exp_qp): Likewise.
2856         (scalar_test_data_class_qp): Likewise.
2857         (sqrtf128_round_to_odd): Delete processing the round to odd
2858         built-in functions as special built-in functions, and define them
2859         as float128 built-ins.  Use the KFmode variant as the default.
2860         (truncf128_round_to_odd): Likewise.
2861         (addf128_round_to_odd): Likewise.
2862         (subf128_round_to_odd): Likewise.
2863         (mulf128_round_to_odd): Likewise.
2864         (divf128_round_to_odd): Likewise.
2865         (fmaf128_round_to_odd): Likewise.
2866         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
2867         support for KFmode and TFmode xststdcqp calls.
2868         (rs6000_expand_builtin): If long double is IEEE 128-bit floating
2869         point, switch the built-in handlers for the get/set float128
2870         exponent, get float128 mantissa, float128 test built-ins, and the
2871         float128 round to odd built-in functions.  Eliminate creating the
2872         float128 round to odd built-in functions as special built-ins.
2873         (rs6000_init_builtins): Eliminate special creation of the float128
2874         round to odd built-in functions.
2875         * config/rs6000/vsx.md (xsxexpqp_<mode>): Change float128 built-in
2876         function insns to support both TFmode and KFmode variants.
2877         (xsxsigqp_<mode>): Likewise.
2878         (xsiexpqpf_<mode>): Likewise.
2879         (xsiexpqp_<mode>): Likewise.
2880         (xststdcqp_<mode>): Likewise.
2881         (xststdcnegqp_<mode>): Likewise.
2882         (xststdcqp_<mode>): Likewise.
2883
2884 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
2885
2886         * tree-ssa-threadupdate.c (compute_path_counts): Remove
2887         unused path_in_freq_ptr parameter.
2888         (ssa_fix_duplicate_block_edges): Do not pass around path_in_freq
2889
2890 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
2891
2892         * ipa-inline.c (edge_badness): Dump sreal frequency.
2893         (compute_inlined_call_time): Match natural implementaiton ...
2894         * ipa-fnsummary.c (estimate_edge_size_and_time): ... here; remove
2895         forgotten division by CGRAPH_FREQ_BASE.
2896
2897 2017-11-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2898
2899         * config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since
2900         Solaris 11.  Update comment.
2901         * configure.ac (gcc_cv_ld_pid): Adapt comment for Solaris 12
2902         renaming.
2903         * config/sol2.h (STARTFILE_SPEC): Likewise.
2904         * configure: Regenerate.
2905
2906 2017-11-14  Carl Love  <cel@us.ibm.com>
2907
2908         * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Remove
2909         le_ and be_ prefixes to swap* variables.  Remove
2910         if (VECTOR_ELT_ORDER_BIG) statement. Remove E_V16QImode case
2911         statements.
2912
2913 2017-11-14  Jason Merrill  <jason@redhat.com>
2914
2915         Support GTY((cache)) on hash_map.
2916         * hash-traits.h (ggc_remove): Add ggc_maybe_mx member function.
2917         (ggc_cache_remove): Override it instead of ggc_mx.
2918         * hash-table.h (gt_ggc_mx): Call it instead of ggc_mx.
2919         (gt_cleare_cache): Call ggc_mx instead of gt_ggc_mx.
2920         * hash-map-traits.h (simple_hashmap_traits): Add maybe_mx member.
2921         (simple_cache_map_traits): Override maybe_mx.
2922         * hash-map.h (hash_entry): Add ggc_maybe_mx and keep_cache_entry.
2923         (hash_map): Friend gt_cleare_cache.
2924         (gt_cleare_cache): New.
2925         * tree.h (tree_cache_traits): New hash_map traits class.
2926         (tree_cache_map): New typedef.
2927
2928 2017-11-14  Richard Biener  <rguenther@suse.de>
2929
2930         * tree-cfgcleanup.c (cleanup_control_expr_graph): Remove first_p
2931         paramter and handling.
2932         (cleanup_control_flow_bb): Likewise.
2933         (cleanup_control_flow_pre): New helper performing a DFS walk
2934         to call cleanup_control_flow_bb in PRE order.
2935         (cleanup_tree_cfg_1): Do the first phase of cleanup_control_flow_bb
2936         via cleanup_control_flow_pre.
2937
2938 2017-11-14  James Greenhalgh  <james.greenhalgh@arm.com>
2939
2940         * config/aarch64/aarch64-simd.md
2941         (aarch64_simd_bsl<mode>_internal): Remove DImode.
2942         (*aarch64_simd_bsl<mode>_alt): Likewise.
2943         (aarch64_simd_bsldi_internal): New.
2944         (aarch64_simd_bsldi_alt): Likewise.
2945
2946 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
2947
2948         * tracer.c (better_p): Do not compare frequencies.
2949         * reg-stack.c (better_edge): Likewise.
2950         * shrink-wrap.c (try_shrink_wrapping): Do not convert to gcov counts
2951         and back.
2952
2953 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
2954
2955         * auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
2956         * cgraphunit.c (cgraph_node::expand_thunk): Use update_max_bb_count.
2957         * ipa-utils.c (ipa_merge_profiles): Use update_max_bb_count.
2958         * lto-streamer-in.c (input_function): Use update_max_bb_count.
2959         * omp-expand.c (expand_omp_taskreg): Use update_max_bb_count.
2960         * predict.c (maybe_hot_frequency_p): Inline to ...
2961         (maybe_hot_count_p): ... here; rewrite to counts.
2962         (counts_to_freqs): Rename to ...
2963         (update_max_bb_count): ... this one.
2964         (expensive_function_p): Use counts.
2965         (estimate_bb_frequencies): Update.
2966         (rebuild_frequencies): Update.
2967         * predict.h (counts_to_freqs): Rename to ...
2968         (update_max_bb_count): ... this one.
2969         * profile.c (compute_branch_probabilities): Add debug info
2970         * tree-inline.c (expand_call_inline): Update debug info.
2971         (optimize_inline_calls): Use update_max_bb_count..
2972         (tree_function_versioning): Use update_max_bb_count..
2973         * value-prof.c (gimple_value_profile_transformations):
2974         Do not use update_max_bb_count.
2975
2976 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
2977
2978         * ipa-inline.c (compute_uninlined_call_time, compute_inlined_call_time):
2979         always use frequencies.
2980
2981 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
2982
2983         * bb-reorder.c: Remove frequencies from comments.
2984         (better_edge_p): Use profile counts.
2985         (find_traces): Dump profile counts.
2986         (rotate_loop): Use profile counts.
2987         (find_traces_1_round): Likewise.
2988         (connect_better_edge_p): Use counts instead of probabilities for
2989         reverse walk.
2990         (copy_bb_p): Drop early check for non-0 frequency.
2991         (sanitize_hot_paths): Update comments.
2992
2993 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
2994
2995         * ipa-split.c (struct split_point): Add count.
2996         (consider_split): Do not compute incoming frequency; compute incoming
2997         count and store it to split_point.
2998         (split_function): Set count of the call to split part correctly.
2999
3000 2017-11-13  Carl Love  <cel@us.ibm.com>
3001
3002         * config/rs6000/altivec.md (altivec_vsumsws_be): Add define_expand.
3003
3004 2017-11-13  Tom Tromey  <tom@tromey.com>
3005
3006         * doc/cpp.texi (Variadic Macros): Document __VA_OPT__.
3007
3008 2017-11-13  Carl Love  <cel@us.ibm.com>
3009
3010         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins):
3011         Add support for builtins:
3012         unsigned int vec_first_{,miss}_match_{,or_eos}index,
3013         vector {un,}signed {char,int,short},
3014         vector {un,}signed {char,int,short}) arguments.
3015         * config/rs6000/rs6000-builtin.def (VFIRSTMATCHINDEX,
3016         VFIRSTMATCHOREOSINDEX, VFIRSTMISMATCHINDEX, VFIRSTMISMATCHOREOSINDEX):
3017         Add BU_P9V_AV_2 expansions for the builtins.
3018         * config/rs6000/altivec.h (vec_first_match_index,
3019         vec_first_mismatch_index, vec_first_match_or_eos_index,
3020         vec_first_mismatch_or_eos_index): Add #defines for the builtins.
3021         * config/rs6000/rs6000-protos.h (bytes_in_mode): Add
3022         new extern declaration.
3023         * config/rs6000/rs6000.c (bytes_in_mode): Add new function.
3024         * config/rs6000/vsx.md (first_match_index_<mode>,
3025         first_match_or_eos_index_<mode>, first_mismatch_index_<mode>,
3026         first_mismatch_or_eos_index_<mode>): Add define expand.
3027         (vctzlsbb_<mode>): Add mode field to define_insn for vctzlsbb.
3028         * doc/extend.texi: Update the built-in documenation file for the new
3029         built-in functions.
3030
3031 2017-11-13  Michael Meissner  <meissner@linux.vnet.ibm.com>
3032
3033         * match.pd: Convert fminf<N>, fminf<N>x, fmax<N>, and fmax<N>x
3034         into the min/max operations for _Float<N> and _Float<N>X types.
3035
3036 2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>
3037
3038         PR lto/81351
3039         * dwarf2out.c (do_eh_frame): New static variable.
3040         (dwarf2out_begin_prologue): Set it.
3041         (dwarf2out_frame_finish): Test it instead of dwarf2out_do_eh_frame.
3042
3043 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
3044
3045         * tree-ssa-coalesce.c (coalesce_cost): Fix formating.
3046
3047         * tree-ssa-sink.c (select_best_block): Do not use frequencies.
3048
3049 2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>
3050
3051         PR lto/81351
3052         * debug.h (dwarf2out_do_eh_frame): Declare.
3053         * dwarf2cfi.c (dwarf2out_do_eh_frame): New predicate.
3054         (dwarf2out_do_frame): Use it.
3055         (dwarf2out_do_cfi_asm): Likewise.
3056         * dwarf2out.c (dwarf2out_frame_finish): Likewise.
3057         (dwarf2out_assembly_start): Likewise.
3058         (dwarf2out_begin_prologue): Fix comment.
3059         * toplev.c (compile_file): Always call dwarf2out_frame_finish
3060         if the target needs either debug or unwind DWARF2 info.
3061         * lto-opts.c (lto_write_options): Do not save -fexceptions,
3062         -fnon-call-exceptions, -ffp-contract, -fmath-errno, -fsigned-zeros,
3063         -ftrapping-math, -ftrapv and -fwrapv.
3064
3065 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
3066
3067         * cgraph.c (cgraph_edge::sreal_frequency): New function.
3068         * cgraph.h (cgraph_edge::sreal_frequency): Declare.
3069         * ipa-fnsummary.c (dump_ipa_call_summary): Use sreal_frequency.
3070         (estimate_edge_size_and_time): Likewise.
3071         (ipa_merge_fn_summary_after_inlining): Likewise.
3072         * ipa-inline.c (cgraph_freq_base_rec): Remove.
3073         (compute_uninlined_call_time): Use sreal_frequency.
3074         (compute_inlined_call_time): Likewise.
3075         (ipa_inline): Do not initialize cgraph_freq_base_rec.
3076         * profile-count.c: Include sreal.h.
3077         (profile_count::to_sreal_scale): New.
3078         * profile-count.h: Forward declare sreal.
3079         (profile_count::to_sreal_scale): Declare.
3080
3081 2017-11-13  Nathan Sidwell  <nathan@acm.org>
3082
3083         * diagnostic.c (maybe_line_and_column): New.
3084         (diagnostic_get_location_text): Use it.
3085         (diagnostic_report_current_module): Likewise.
3086         (test_diagnostic_get_location_text): Add tests.
3087
3088 2017-11-13  Luis Machado  <luis.machado@linaro.org>
3089
3090         * doc/md.texi (Specifying processor pipeline description): Fix
3091         incorrect latency for the div instruction example.
3092
3093 2017-11-13  Jakub Jelinek  <jakub@redhat.com>
3094
3095         PR tree-optimization/78821
3096         * gimple-ssa-store-merging.c (compatible_load_p): Don't require
3097         that bit_not_p is the same.
3098         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
3099         (split_group): Count precisely bit_not_p bits in each statement.
3100         (invert_op): New function.
3101         (imm_store_chain_info::output_merged_store): Use invert_op to
3102         emit BIT_XOR_EXPR with a xor_mask instead of BIT_NOT_EXPR if some
3103         but not all orig_stores have BIT_NOT_EXPR in the corresponding spots.
3104
3105 2017-11-13  Martin Liska  <mliska@suse.cz>
3106
3107         * gcov.c (struct coverage_info): Remove typedef of coverage_t.
3108         (struct source_info): Likewise.
3109         (add_branch_counts): Likewise.
3110         (add_line_counts): Likewise.
3111         (function_summary): Likewise.
3112         (output_intermediate_line): Likewise.
3113         (generate_results): Likewise.
3114
3115 2017-11-13  Martin Liska  <mliska@suse.cz>
3116
3117         * gcov.c (struct block_info): Remove typedef for block_t.
3118         (struct line_info): Likewise.
3119         (line_info::has_block): Likewise.
3120         (EXIT_BLOCK): Likewise.
3121         (unblock): Likewise.
3122         (circuit): Likewise.
3123         (get_cycles_count): Likewise.
3124         (process_file): Likewise.
3125         (read_graph_file): Likewise.
3126         (solve_flow_graph): Likewise.
3127         (find_exception_blocks): Likewise.
3128         (add_line_counts): Likewise.
3129         (accumulate_line_info): Likewise.
3130         (output_line_details): Likewise.
3131
3132 2017-11-13  Martin Liska  <mliska@suse.cz>
3133
3134         * gcov.c (struct arc_info): Remove typedef for arc_t.
3135         (struct line_info): Likewise.
3136         (add_branch_counts): Likewise.
3137         (output_branch_count): Likewise.
3138         (function_info::~function_info): Likewise.
3139         (circuit): Likewise.
3140         (output_intermediate_line): Likewise.
3141         (read_graph_file): Likewise.
3142         (solve_flow_graph): Likewise.
3143         (find_exception_blocks): Likewise.
3144         (add_line_counts): Likewise.
3145         (accumulate_line_info): Likewise.
3146         (output_line_details): Likewise.
3147         (output_function_details): Likewise.
3148
3149 2017-11-13  Martin Liska  <mliska@suse.cz>
3150
3151         * gcov.c (struct function_info): Remove typedef for function_t.
3152         (struct source_info): Likewise.
3153         (source_info::get_functions_at_location): Likewise.
3154         (solve_flow_graph): Likewise.
3155         (find_exception_blocks): Likewise.
3156         (add_line_counts): Likewise.
3157         (output_intermediate_file): Likewise.
3158         (process_file): Likewise.
3159         (generate_results): Likewise.
3160         (release_structures): Likewise.
3161         (read_graph_file): Likewise.
3162         (read_count_file): Likewise.
3163         (accumulate_line_counts): Likewise.
3164         (output_lines): Likewise.
3165
3166 2017-11-13  Martin Liska  <mliska@suse.cz>
3167
3168         * gcov.c (function_info::function_info): Remove num_counts
3169         and add vector<gcov_type>.
3170         (function_info::~function_info): Use the vector.
3171         (process_file): Likewise.
3172         (read_graph_file): Likewise.
3173         (read_count_file): Likewise.
3174         (solve_flow_graph): Likewise.
3175
3176 2017-11-13  Martin Liska  <mliska@suse.cz>
3177
3178         * gcov.c (function_info::is_artificial): New function.
3179         (process_file): Erase all artificial early.
3180         (generate_results): Skip as all artificial are already
3181         removed.
3182
3183 2017-11-13  Martin Liska  <mliska@suse.cz>
3184
3185         * gcov.c (read_graph_file): Store to global vector of functions.
3186         (read_count_file): Iterate the vector.
3187         (process_file): Likewise.
3188         (generate_results): Likewise.
3189         (release_structures): Likewise.
3190
3191 2017-11-13  Jakub Jelinek  <jakub@redhat.com>
3192
3193         PR tree-optimization/82954
3194         * gimple-ssa-store-merging.c
3195         (imm_store_chain_info::coalesce_immediate_stores): If
3196         !infof->ops[N].base_addr, split group if info->ops[N].base_addr.
3197
3198 2017-11-13  Richard Sandiford  <richard.sandiford@linaro.org>
3199
3200         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
3201         Upddate call to ENDIAN_LANE_N.
3202         (aarch64_<sur>dot_lane<vsi2qi>): Use aarch64_endian_lane_rtx.
3203         (aarch64_<sur>dot_laneq<vsi2qi>): Likewise.
3204         (*aarch64_simd_vec_copy_lane<mode>): Update calls to ENDIAN_LANE_N
3205         and use aarch64_endian_lane_rtx.
3206         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Likewise.
3207
3208 2017-11-12  Tom de Vries  <tom@codesourcery.com>
3209
3210         * config/riscv/riscv.h (ASM_OUTPUT_LABELREF): Wrap in do {} while (0).
3211
3212 2017-11-12  Tom de Vries  <tom@codesourcery.com>
3213
3214         * config/elfos.h (ASM_OUTPUT_ASCII): Remove semicolon after macro body.
3215
3216 2017-11-12  Tom de Vries  <tom@codesourcery.com>
3217
3218         * config/cr16/cr16.h (ASM_OUTPUT_LABELREF): Remove semicolon after macro
3219         body.
3220         * config/powerpcspe/xcoff.h (ASM_OUTPUT_LABELREF): Same.
3221         * config/rs6000/xcoff.h (ASM_OUTPUT_LABELREF): Same.
3222         * defaults.h (ASM_OUTPUT_LABELREF): Same.
3223
3224 2017-11-11  Martin Sebor  <msebor@redhat.com>
3225
3226         PR c/81117
3227         * doc/extend.texi (attribute nonstring): Remove spurious argument.
3228
3229         PR bootstrap/82948
3230         * prefic.c (translate_name): Replace strncpy with memcpy to
3231         avoid -Wstringop-truncation.
3232
3233 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
3234
3235         * tree-ssa-loop-im.c (execute_sm_if_changed): Do not compute freq_sum.
3236
3237 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
3238
3239         * predict.c (maybe_hot_frequency_p): Do not use cfun.
3240
3241 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
3242
3243         * tree-ssa-tail-merge.c (replace_block_by): Fix and re-enable profile
3244         merging.
3245
3246 2017-11-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
3247
3248         * config/rs6000/rs6000.md (bswaphi2_reg): On ISA 3.0 systems,
3249         enable generating XXBRH if the value is in a vector register.
3250         (bswapsi2_reg): On ISA 3.0 systems, enable generating XXBRW if the
3251         value is in a vector register.
3252         (bswapdi2_reg): On ISA 3.0 systems, always use XXBRD to do
3253         register to register bswap64's instead of doing the GPR sequence
3254         used on previous machines.
3255         (bswapdi2_xxbrd): New insn.
3256         (bswapdi2_reg): Disallow on ISA 3.0.
3257         (register to register bswap64 splitter): Do not split the insn on
3258         ISA 3.0 systems that use XXBRD.
3259
3260 2017-11-10  Martin Sebor  <msebor@redhat.com>
3261
3262         PR c/81117
3263         * config/darwin-c.c (framework_construct_pathname): Replace strncpy
3264         with memcpy.
3265         (find_subframework_file): Same.
3266
3267 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
3268
3269         * auto-profile.c (afdo_indirect_call): Drop frequency.
3270         * cgraph.c (symbol_table::create_edge): Drop frequency argument.
3271         (cgraph_node::create_edge): Drop frequency argument.
3272         (cgraph_node::create_indirect_edge): Drop frequency argument.
3273         (cgraph_edge::make_speculative): Drop frequency arguments.
3274         (cgraph_edge::resolve_speculation): Do not update frequencies
3275         (cgraph_edge::dump_edge_flags): Do not dump frequency.
3276         (cgraph_node::dump): Check consistency in IPA mode.
3277         (cgraph_edge::maybe_hot_p): Use IPA counter.
3278         (cgraph_edge::verify_count_and_frequency): Rename to ...
3279         (cgraph_edge::verify_count): ... this one; drop frequency checking.
3280         (cgraph_node::verify_node): Update.
3281         * cgraph.h (struct cgraph_edge): Drop frequency.
3282         (cgraph_edge::frequency): New function.
3283         * cgraphbuild.c (pass_build_cgraph_edges::execute): Donot pass
3284         frequencies.
3285         (cgraph_edge::rebuild_edges): Likewise.
3286         * cgraphclones.c (cgraph_edge::clone): Scale only counts.
3287         (duplicate_thunk_for_node): Do not pass frequency.
3288         (cgraph_node::create_clone): Scale only counts.
3289         (cgraph_node::create_virtual_clone): Do not pass frequency.
3290         (cgraph_node::create_edge_including_clones): Do not pass frequency.
3291         (cgraph_node::create_version_clone): Do not pass frequency.
3292         * cgraphunit.c (cgraph_node::analyze): Do not pass frequency.
3293         (cgraph_node::expand_thunk): Do not pass frequency.
3294         (cgraph_node::create_wrapper): Do not pass frequency.
3295         * gimple-iterator.c (update_call_edge_frequencies): Do not pass
3296         frequency.
3297         * gimple-streamer-in.c (input_bb): Scale only IPA counts.
3298         * ipa-chkp.c (chkp_produce_thunks): Do not pass frequency.
3299         * ipa-cp.c (ipcp_lattice::print): Use frequency function.
3300         (gather_caller_stats): Use frequency function.
3301         (ipcp_cloning_candidate_p): Use frequency function.
3302         (ipcp_propagate_stage): Use frequency function.
3303         (get_info_about_necessary_edges): Use frequency function.
3304         (update_profiling_info): Update only IPA profile.
3305         (update_specialized_profile): Use frequency functoin.
3306         (perhaps_add_new_callers): Update only IPA profile.
3307         * ipa-devirt.c (ipa_devirt): Use IPA profile.
3308         * ipa-fnsummary.c (redirect_to_unreachable): Do not set frequrency.
3309         (dump_ipa_call_summary): Use frequency function.
3310         (estimate_edge_size_and_time): Use frequency function.
3311         (ipa_merge_fn_summary_after_inlining): Use frequency function.
3312         * ipa-inline-analysis.c (do_estimate_edge_time): Use IPA profile.
3313         * ipa-inline-transform.c (update_noncloned_frequencies): Rename to ..
3314         (update_noncloned_counts): ... ths one; scale counts only.
3315         (clone_inlined_nodes): Do not scale frequency.
3316         (inline_call): Do not pass frequency.
3317         * ipa-inline.c (compute_uninlined_call_time): Use IPA profile.
3318         (compute_inlined_call_time): Use IPA profile.
3319         (want_inline_small_function_p): Use IPA profile.
3320         (want_inline_self_recursive_call_p): Use IPA profile.
3321         (edge_badness): Use IPA profile.
3322         (lookup_recursive_calls): Use IPA profile.
3323         (recursive_inlining): Do not pass frequency.
3324         (resolve_noninline_speculation): Do not update frequency.
3325         (inline_small_functions): Collect max of IPA profile.
3326         (dump_overall_stats): Dump IPA porfile.
3327         (dump_inline_stats): Dump IPA porfile.
3328         (ipa_inline): Collect IPA stats.
3329         * ipa-inline.h (clone_inlined_nodes): Update prototype.
3330         * ipa-profile.c (ipa_propagate_frequency_1): Use frequency function.
3331         (ipa_propagate_frequency): Use frequency function.
3332         (ipa_profile): Cleanup.
3333         * ipa-prop.c (ipa_make_edge_direct_to_target): Do not pass frequency
3334         * ipa-utils.c (ipa_merge_profiles): Merge all profiles.
3335         * lto-cgraph.c (lto_output_edge): Do not stream frequency.
3336         (input_node): Do not stream frequency.
3337         (input_edge): Do not stream frequency.
3338         (merge_profile_summaries): Scale only IPA profiles.
3339         * omp-simd-clone.c (simd_clone_adjust): Do not pass frequency.
3340         * predict.c (drop_profile): Do not recompute frequency.
3341         * trans-mem.c (ipa_tm_insert_irr_call): Do not pass frequency.
3342         (ipa_tm_insert_gettmclone_call): Do not pass frequency.
3343         * tree-cfg.c (execute_fixup_cfg): Drop profile to global0 if needed.
3344         * tree-chkp.c (chkp_copy_bounds_for_assign): Do not pass frequency.
3345         * tree-emutls.c (gen_emutls_addr): Do not pass frequency.
3346         * tree-inline.c (copy_bb): Do not scale frequency.
3347         (expand_call_inline): Do not scale frequency.
3348         (tree_function_versioning): Do not scale frequency.
3349         * ubsan.c (ubsan_create_edge): Do not pass frequency.
3350
3351 2017-11-10  Julia Koval  <julia.koval@intel.com>
3352
3353         * config/i386/gfniintrin.h (_mm_gf2p8affine_epi64_epi8)
3354         (_mm256_gf2p8affine_epi64_epi8, _mm_mask_gf2p8affine_epi64_epi8)
3355         (_mm_maskz_gf2p8affine_epi64_epi8, _mm256_mask_gf2p8affine_epi64_epi8)
3356         (_mm256_maskz_gf2p8affine_epi64_epi8)
3357         (_mm512_mask_gf2p8affine_epi64_epi8, _mm512_gf2p8affine_epi64_epi8)
3358         (_mm512_maskz_gf2p8affine_epi64_epi8): New intrinsics.
3359         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineqb_v64qi)
3360         (__builtin_ia32_vgf2p8affineqb_v32qi)
3361         (__builtin_ia32_vgf2p8affineqb_v16qi): New builtins.
3362         * config/i386/sse.md (vgf2p8affineqb_<mode><mask_name>): New pattern.
3363
3364 2017-11-10  Tamar Christina  <tamar.christina@arm.com>
3365
3366         PR target/82641
3367         * config/arm/arm.c
3368         (arm_option_override): Refactor.
3369         (arm_option_reconfigure_globals): New.
3370         (arm_options_perform_arch_sanity_checks): New.
3371         * config/arm/arm-protos.h (arm_option_reconfigure_globals):
3372         New prototype.
3373         (arm_options_perform_arch_sanity_checks): Likewise
3374
3375 2017-11-10  Pat Haugen  <pthaugen@us.ibm.com>
3376
3377         * rs6000/power9.md (power9-qpdiv): Correct DFU pipe usage.
3378         (power9-qpmul): New.
3379         * rs6000/rs6000.md ("type" attr): Add qmul.
3380         (mul<mode>3, fma<mode>4_hw, *fms<mode>4_hw, *nfma<mode>4_hw,
3381         *nfms<mode>4_hw, mul<mode>3_odd, fma<mode>4_odd, *fms<mode>4_odd,
3382         *nfma<mode>4_odd, *nfms<mode>4_odd): Change type to qmul.
3383
3384 2017-11-10  Martin Sebor  <msebor@redhat.com>
3385
3386         PR c/81117
3387         * builtins.c (compute_objsize): Handle arrays that
3388         compute_builtin_object_size likes to fail for.  Make extern.
3389         * builtins.h (compute_objsize): Declare.
3390         (check_strncpy_sizes): New function.
3391         (expand_builtin_strncpy): Call check_strncpy_sizes.
3392         * gimple-fold.c (gimple_fold_builtin_strncpy): Implement
3393         -Wstringop-truncation.
3394         (gimple_fold_builtin_strncat): Same.
3395         * gimple.c (gimple_build_call_from_tree): Set call location.
3396         * tree-ssa-strlen.c (strlen_to_stridx): New global variable.
3397         (maybe_diag_bound_equal_length, is_strlen_related_p): New functions.
3398         (handle_builtin_stxncpy, handle_builtin_strncat): Same.
3399         (handle_builtin_strlen): Use strlen_to_stridx.
3400         (strlen_optimize_stmt): Handle flavors of strncat, strncpy, and
3401         stpncpy.
3402         Use strlen_to_stridx.
3403         (pass_strlen::execute): Release strlen_to_stridx.
3404         * doc/invoke.texi (-Wsizeof-pointer-memaccess): Document enhancement.
3405         (-Wstringop-truncation): Document new option.
3406
3407 2017-11-10  Martin Liska  <mliska@suse.cz>
3408
3409         PR gcov-profile/82702
3410         * gcov.c (main): Handle intermediate files in a different
3411         way.
3412         (get_gcov_intermediate_filename): New function.
3413         (output_gcov_file): Remove support of intermediate files.
3414         (generate_results): Allocate intermediate file.
3415         (release_structures): Clean-up properly fn_end.
3416         (output_intermediate_file): Start iterating with line 1.
3417
3418 2017-11-10  Jakub Jelinek  <jakub@redhat.com>
3419
3420         PR tree-optimization/82929
3421         * gimple-ssa-store-merging.c (struct store_immediate_info): Add
3422         ops_swapped_p non-static data member.
3423         (store_immediate_info::store_immediate_info): Clear it.
3424         (imm_store_chain_info::coalesce_immediate_stores): If swapping
3425         ops set ops_swapped_p.
3426         (count_multiple_uses): Handle ops_swapped_p.
3427
3428 2017-11-10  Martin Liska  <mliska@suse.cz>
3429
3430         * coverage.c (coverage_init): Stream information about
3431         support of has_unexecuted_blocks.
3432         * doc/gcov.texi: Document that.
3433         * gcov-dump.c (dump_gcov_file): Support it in gcov_dump tool.
3434         * gcov.c (read_graph_file): Likewise.
3435         (output_line_beginning): Fix a small issue with
3436         color output.
3437
3438 2017-11-10  Bin Cheng  <bin.cheng@arm.com>
3439
3440         * tree-predcom.c (determine_roots_comp): Avoid memory leak by freeing
3441         reference of trivial component.
3442
3443 2017-11-10  Jakub Jelinek  <jakub@redhat.com>
3444
3445         PR bootstrap/82916
3446         * gimple-ssa-store-merging.c
3447         (pass_store_merging::terminate_all_aliasing_chains): For
3448         gimple_store_p stmts also call refs_output_dependent_p.
3449
3450         PR rtl-optimization/82913
3451         * compare-elim.c (try_merge_compare): Punt if def_insn is not
3452         single set.
3453
3454 2017-11-09  Jeff Law  <law@redhat.com>
3455
3456         * vr-values.h: New file with vr_values class.
3457         * tree-vrp.c: Include vr-values.h
3458         (vrp_value_range_pool, vrp_equiv_obstack, num_vr_values): Move static
3459         data objects into the vr_values class.
3460         (vr_value, values_propagated, vr_phi_edge_counts): Likewise.
3461         (get_value_range): Make it a member function within vr_values class.
3462         (set_defs_to_varying, update_value_range, add_equivalence): Likewise.
3463         (vrp_stmt_computes_nonzero_p, op_with_boolean_value_range_p): Likewise.
3464         (op_with_constant_singleton_value_range): Likewise.
3465         (extract_range_for_var_from_comparison_expr): Likewise.
3466         (extract_range_from_assert, extract_range_from_ssa_name): Likewise.
3467         (extract_range_from_binary_expr): Likewise.
3468         (extract_range_from_unary_expr): Likewise.
3469         (extract_range_from_cond_expr, extrat_range_from_comparison): Likewise.
3470         (check_for_binary_op_overflow, extract_range_basic): Likewise.
3471         (extract_range_from_assignment, adjust_range_with_scev): Likewise.
3472         (dump_all_value_ranges, get_vr_for_comparison): Likewise.
3473         (compare_name_with_value, compare_names): Likewise.
3474         (vrp_evaluate_conditional_warnv_with_ops_using_ranges): Likewise.
3475         (vrp_evaluate_conditional_warnv_with_ops): Likewise.  Remove prototype.
3476         (vrp_evaluate_conditional, vrp_visit_cond_stmt): Likewise.
3477         (vrp_visit_switch_stmt, extract_range_from_stmt): Likewise.
3478         (extract_range_from_phi_node): Likewise.
3479         (simplify_truth_ops_using_ranges): Likewise.
3480         (simplify_div_or_mod_using_ranges): Likewise.
3481         (simplify_min_or_max_using_ranges, simplify_abs_using_ranges): Likewise.
3482         (simplify_bit_ops_using_ranges, simplify_cond_using_ranges_1): Likewise.
3483         (simplify_cond_using_ranges_2, simplify_switch_using_ranges): Likewise.
3484         (simplify_float_conversion_using_ranges): Likewise.
3485         (simplify_internal_call_using_ranges): Likewise.
3486         (two_valued_val_range_p, simplify_stmt_using_ranges): Likewise.
3487         (vrp_visit_assignment_or_call): Likewise.  Smuggle class instance
3488         poitner via x_vr_values for calls into gimple folder.
3489         (vrp_initialize_lattice): Make this the vr_values ctor.
3490         (vrp_free_lattice): Make this the vr_values dtor.
3491         (set_vr_value): New function.
3492         (class vrp_prop): Add vr_values data member.  Add various member
3493         functions as well as member functions that delegate to vr_values.
3494         (check_array_ref): Make a member function within vrp_prop class.
3495         (search_for_addr_array, vrp_initialize): Likewise.
3496         (vrp_finalize): Likewise.  Revamp to avoid direct access to
3497         vr_value, values_propagated, etc.
3498         (check_array_bounds): Extract vrp_prop class instance pointer from
3499         walk info structure.  Use it to call member functions.
3500         (check_all_array_refs): Make a member function within vrp_prop class.
3501         Smuggle class instance pointer via walk info structure.
3502         (x_vr_values): New local static.
3503         (vrp_valueize): Use x_vr_values to get class instance.
3504         (vr_valueize_1): Likewise.
3505         (class vrp_folder): Add vr_values data member.  Add various member
3506         functions as well as member functions that delegate to vr_values.
3507         (fold_predicate_in): Make a mber fucntion within vrp_folder class.
3508         (simplify_stmt_for_jump_threading): Extract smuggled vr_values
3509         class instance from vr_values.  Use it to call member functions.
3510         (vrp_dom_walker): Add vr_values data member.
3511         (vrp_dom_walker::after_dom_children): Smuggle vr_values class
3512         instance via x_vr_values.
3513         (identify_jump_threads): Accept vr_values as argument.  Store
3514         it into the walker structure.
3515         (evrp_dom_walker): Add vr_values class data member.  Add various
3516         delegators.
3517         (evrp_dom_walker::try_find_new_range): Use vr_values data
3518         member to access the memory allocator.
3519         (evrp_dom_walker::before_dom_children): Store vr_values class
3520         instance into the vrp_folder class.
3521         (evrp_dom_walker::push_value_range): Rework to avoid direct
3522         access to num_vr_values and vr_value.
3523         (evrp_dom_walker::pop_value_range): Likewise.
3524         (execute_early_vrp): Remove call to vrp_initialize_lattice.
3525         Use vr_values to get to dump_all_value_ranges member function.
3526         Remove call to vrp_free_lattice.  Call vrp_initialize, vrp_finalize,
3527         and simplify_cond_using_ranges_2 via vrp_prop class instance.
3528         Pass vr_values class instance down to identify_jump_threads.
3529         Remove call to vrp_free_lattice.
3530         (debug_all_value_ranges): Remove.
3531
3532         * tree-vrp.c (vrp_prop): Move class to earlier point in the file.
3533         (vrp_folder): Likewise.
3534
3535         * tree-vrp.c (set_value_range): Do not reference vrp_equiv_obstack.
3536         Get it from the existing bitmap instead.
3537         (vrp_intersect_ranges_1): Likewise.
3538
3539 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
3540
3541         * gimple-ssa-store-merging.c (struct store_immediate_info): Add
3542         bit_not_p field.
3543         (store_immediate_info::store_immediate_info): Add bitnotp argument,
3544         set bit_not_p to it.
3545         (imm_store_chain_info::coalesce_immediate_stores): Break group
3546         if bit_not_p is different.
3547         (count_multiple_uses, split_group,
3548         imm_store_chain_info::output_merged_store): Handle info->bit_not_p.
3549         (handled_load): Avoid multiple chained BIT_NOT_EXPRs.
3550         (pass_store_merging::process_store): Handle BIT_{AND,IOR,XOR}_EXPR
3551         result inverted using BIT_NOT_EXPR, compute bit_not_p, pass it
3552         to store_immediate_info ctor.
3553
3554 2017-11-09  Jim Wilson  <jimw@sifive.com>
3555
3556         * collect2.c (OBJECT_FORMAT_COFF): Remove EXTENDED_COFF support.
3557         (scan_prog_file): Likewise.
3558
3559 2017-11-09  Jan Hubicka  <hubicka@ucw.cz>
3560
3561         * bb-reorder.c (max_entry_frequency): Remove.
3562         (find_traces, rotate_loop, mark_bb_visited, connect_better_edge_p,
3563         connect_traces, push_to_next_round_p): Remove prototypes.
3564         (find_traces_1_round): Use counts only.
3565         (push_to_next_round_p): Likewise.
3566         (find_traces): Likewise.
3567         (rotate_loop): Likewise.
3568         (find_traces_1_round): Likewise.
3569         (connect_traces): Likewise.
3570         (edge_order): Likewise.
3571
3572 2017-11-09  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3573
3574         * config/arm/arm.c (output_return_instruction): Add comments to
3575         indicate requirement for cmse_nonsecure_entry return to account
3576         for the size of clearing instruction output here.
3577         (thumb_exit): Likewise.
3578         * config/arm/thumb2.md (thumb2_cmse_entry_return): Fix length for
3579         return in hardfloat mode.
3580
3581 2017-11-09  Segher Boessenkool  <segher@kernel.crashing.org>
3582
3583         * config/rs6000/rs6000.c (machine_function): Add a bool,
3584         "toc_is_wrapped_separately".
3585         (rs6000_option_override_internal): Enable OPTION_MASK_SAVE_TOC_INDIRECT
3586         if it wasn't explicitly set or unset, we are optimizing for speed, and
3587         doing separate shrink-wrapping.
3588         (rs6000_get_separate_components): Enable the TOC component if
3589         saving the TOC register in the prologue.
3590         (rs6000_components_for_bb): Handle the TOC component.
3591         (rs6000_emit_prologue_components): Store the TOC register where needed.
3592         (rs6000_set_handled_components): Mark TOC as handled, if handled.
3593         (rs6000_emit_prologue): Don't save the TOC if that is already done.
3594
3595 2017-11-09  Martin Jambor  <mjambor@suse.cz>
3596
3597         * ipa-param-manipulation.c: New file.
3598         * ipa-param-manipulation.h: Likewise.
3599         * Makefile.in (OBJS): Add ipa-param-manipulation.o.
3600         (PLUGIN_HEADERS): Addded ipa-param-manipulation.h
3601         * ipa-param.h (ipa_parm_op): Moved to ipa-param-manipulation.h.
3602         (ipa_parm_adjustment): Likewise.
3603         (ipa_parm_adjustment_vec): Likewise.
3604         (ipa_get_vector_of_formal_parms): Moved declaration to
3605         ipa-param-manipulation.h.
3606         (ipa_get_vector_of_formal_parm_types): Likewise.
3607         (ipa_modify_formal_parameters): Likewise.
3608         (ipa_modify_call_arguments): Likewise.
3609         (ipa_combine_adjustments): Likewise.
3610         (ipa_dump_param_adjustments): Likewise.
3611         (ipa_modify_expr): Likewise.
3612         (ipa_get_adjustment_candidate): Likewise.
3613         * ipa-prop.c (ipa_get_vector_of_formal_parms): Moved to
3614         ipa-param-manipulation.c.
3615         (ipa_get_vector_of_formal_parm_types): Likewise.
3616         (ipa_modify_formal_parameters): Likewise.
3617         (ipa_modify_call_arguments): Likewise.
3618         (ipa_modify_expr): Likewise.
3619         (get_ssa_base_param): Likewise.
3620         (ipa_get_adjustment_candidate): Likewise.
3621         (index_in_adjustments_multiple_times_p): Likewise.
3622         (ipa_combine_adjustments): Likewise.
3623         (ipa_dump_param_adjustments): Likewise.
3624         * tree-sra.c: Also include ipa-param-manipulation.h
3625         * omp-simd-clone.c: Include ipa-param-manipulation.h instead of
3626         ipa-param.h.
3627
3628 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
3629             Alan Hayward  <alan.hayward@arm.com>
3630             David Sherwood  <david.sherwood@arm.com>
3631
3632         * doc/sourcebuild.texi (vect_masked_store): Document.
3633
3634 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
3635             Alan Hayward  <alan.hayward@arm.com>
3636             David Sherwood  <david.sherwood@arm.com>
3637
3638         * doc/sourcebuild.texi (vect_align_stack_vars): Document.
3639
3640 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
3641             Alan Hayward  <alan.hayward@arm.com>
3642             David Sherwood  <david.sherwood@arm.com>
3643
3644         * doc/sourcebuild.texi (vect_variable_length): Document.
3645
3646 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
3647             Alan Hayward  <alan.hayward@arm.com>
3648             David Sherwood  <david.sherwood@arm.com>
3649
3650         * doc/sourcebuild.texi (vect_unaligned_possible): Document.
3651
3652 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
3653             Alan Hayward  <alan.hayward@arm.com>
3654             David Sherwood  <david.sherwood@arm.com>
3655
3656         * doc/sourcebuild.texi (vect_element_align_preferred): Document.
3657
3658 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
3659             Alan Hayward  <alan.hayward@arm.com>
3660             David Sherwood  <david.sherwood@arm.com>
3661
3662         * doc/sourcebuild.texi (vect_perm_short, vect_perm_byte): Document
3663         previously undocumented selectors.
3664         (vect_perm3_byte, vect_perm3_short, vect_perm3_int): Document.
3665
3666 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
3667
3668         * doc/rtl.texi (const_vector): Say that elements can be
3669         const_wide_ints too.
3670         * emit-rtl.h (valid_for_const_vec_duplicate_p): Declare.
3671         * emit-rtl.c (valid_for_const_vec_duplicate_p): New function.
3672         (gen_vec_duplicate): Use it instead of CONSTANT_P.
3673         * optabs.c (expand_vector_broadcast): Likewise.
3674
3675 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
3676             Alan Hayward  <alan.hayward@arm.com>
3677             David Sherwood  <david.sherwood@arm.com>
3678
3679         * tree-ssa-loop-ivopts.c (get_address_cost): Try using a
3680         scaled index even if the unscaled address was invalid.
3681         Don't increase the complexity of using a scale in that case.
3682
3683 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
3684             Alan Hayward  <alan.hayward@arm.com>
3685             David Sherwood  <david.sherwood@arm.com>
3686
3687         * doc/rtl.texi: Rewrite the subreg rules so that they partition
3688         the inner register into REGMODE_NATURAL_SIZE bytes rather than
3689         UNITS_PER_WORD bytes.
3690         * emit-rtl.c (validate_subreg): Divide subregs into blocks
3691         based on REGMODE_NATURAL_SIZE of the inner mode.
3692         (gen_lowpart_common): Split the SCALAR_FLOAT_MODE_P and
3693         !SCALAR_FLOAT_MODE_P cases.  Use REGMODE_NATURAL_SIZE for the latter.
3694         * expmed.c (lowpart_bit_field_p): Divide the value up into
3695         chunks of REGMODE_NATURAL_SIZE rather than UNITS_PER_WORD.
3696         * expr.c (store_constructor): Use REGMODE_NATURAL_SIZE to test
3697         whether something is likely to occupy more than one register.
3698
3699 2017-11-09  Jan Hubicka  <hubicka@ucw.cz>
3700
3701         PR ipa/82879
3702         * ipa-inline-transform.c (update_noncloned_frequencies): Use
3703         profile_count::adjust_for_ipa_scaling.
3704         * tree-inline.c (copy_bb, copy_cfg_body): Likewise.
3705         * profile-count.c (profile_count::adjust_for_ipa_scaling): New member
3706         function.
3707         * profile-count.h (profile_count::adjust_for_ipa_scaling): Declare.
3708
3709 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
3710
3711         * gimple-ssa-store-merging.c (count_multiple_uses): New function.
3712         (split_group): Add total_orig and total_new arguments, estimate the
3713         number of statements related to the store group without store merging
3714         and with store merging.
3715         (imm_store_chain_info::output_merged_store): Adjust split_group
3716         callers, punt if estimated number of statements with store merging
3717         is not smaller than estimated number of statements without it.
3718         Formatting fix.
3719         (handled_load): Remove has_single_use checks.
3720         (pass_store_merging::process_store): Likewise.
3721
3722 2017-11-09  Richard Biener  <rguenther@suse.de>
3723
3724         PR tree-optimization/82902
3725         * tree-ssa-phiprop.c (propagate_with_phi): Test proper type.
3726
3727 2017-11-09  Martin Liska  <mliska@suse.cz>
3728
3729         PR target/82863
3730         * emit-rtl.c (init_emit_regs): Initialize split_branch_probability to
3731         uninitialized.
3732
3733 2017-11-09  Martin Liska  <mliska@suse.cz>
3734
3735         PR tree-optimization/82669
3736         * sbitmap.h (bmp_iter_set_init): Remove non needed check.
3737
3738 2017-11-09  Martin Liska  <mliska@suse.cz>
3739
3740         PR gcov-profile/48463
3741         * coverage.c (coverage_begin_function): Output also end locus
3742         of a function and information whether the function is
3743         artificial.
3744         * gcov-dump.c (tag_function): Parse and print the information.
3745         * gcov.c (INCLUDE_MAP): Add include.
3746         (INCLUDE_SET): Likewise.
3747         (struct line_info): Move earlier in the source file because
3748         of vector<line_info> in function_info structure.
3749         (line_info::line_info): Likewise.
3750         (line_info::has_block): Likewise.
3751         (struct source_info): Add new member index.
3752         (source_info::get_functions_at_location): New function.
3753         (function_info::group_line_p): New function.
3754         (output_intermediate_line): New function.
3755         (output_intermediate_file): Use the mentioned function.
3756         (struct function_start): New.
3757         (struct function_start_pair_hash): Likewise.
3758         (process_file): Add code that identifies group functions.
3759         Assign lines either to global or function scope.
3760         (generate_results): Skip artificial functions.
3761         (find_source): Assign index for each source file.
3762         (read_graph_file): Read new flag artificial and end_line.
3763         (add_line_counts): Assign it either to global of function scope.
3764         (accumulate_line_counts): Isolate core of the function to
3765         accumulate_line_info and call it for both function and global
3766         scope lines.
3767         (accumulate_line_info): New function.
3768         (output_line_beginning): Fix GNU coding style.
3769         (print_source_line): New function.
3770         (output_line_details): Likewise.
3771         (output_function_details): Likewise.
3772         (output_lines): Iterate both source (global) scope and function
3773         scope.
3774         (struct function_line_start_cmp): New class.
3775         * doc/gcov.texi: Reflect changes in documentation.
3776
3777 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
3778
3779         PR debug/82837
3780         * dwarf2out.c (const_ok_for_output_1): Reject NEG in addition to NOT.
3781         (mem_loc_descriptor): Handle (const (neg (...))) as (neg (const (...)))
3782         and similarly for not instead of neg.
3783
3784 2017-11-08  Andi Kleen  <ak@linux.intel.com>
3785
3786         * config/i386/i386.opt: Add -mforce-indirect-call.
3787         * config/i386/predicates.md: Check for flag_force_indirect_call.
3788         * doc/invoke.texi: Document -mforce-indirect-call
3789
3790 2017-11-08  Kito Cheng  <kito.cheng@gmail.com>
3791
3792         * config/riscv/riscv-protos.h (riscv_slow_unaligned_access_p):
3793         New extern.
3794         (MOVE_RATIO): Use riscv_slow_unaligned_access_p.
3795         config/riscv/riscv.c (predict.h): New include.
3796         (riscv_slow_unaligned_access_p): No longer static.
3797         (riscv_block_move_straight): Add require.
3798         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
3799
3800 2017-11-08  Jakub Jelinek  <jakub@redhat.com>
3801
3802         PR target/82855
3803         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>,
3804         <avx512>_eq<mode>3<mask_scalar_merge_name>_1): Use
3805         nonimmediate_operand predicate for operand 1 instead of
3806         register_operand.
3807
3808 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3809
3810         * config/aarch64/aarch64-simd.md (store_pair_lanes<mode>):
3811         New pattern.
3812         * config/aarch64/constraints.md (Uml): New constraint.
3813         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): New
3814         predicate.
3815
3816 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3817
3818         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
3819         of two vec_duplicates into a vec_concat.
3820
3821 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3822
3823         * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
3824         Simplify vec_merge of vec_duplicate and vec_concat.
3825         * config/aarch64/constraints.md (Utq): New constraint.
3826         * config/aarch64/aarch64-simd.md (load_pair_lanes<mode>): New
3827         define_insn.
3828
3829 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3830
3831         * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
3832         Simplify vec_merge of vec_duplicate and const_vector.
3833         * config/aarch64/predicates.md (aarch64_simd_or_scalar_imm_zero):
3834         New predicate.
3835         * config/aarch64/aarch64-simd.md (*aarch64_combinez<mode>): Use VDC
3836         mode iterator.  Update predicate on operand 1 to
3837         handle non-const_vec constants.  Delete constraints.
3838         (*aarch64_combinez_be<mode>): Likewise for operand 2.
3839
3840 2017-11-08  Jakub Jelinek  <jakub@redhat.com>
3841
3842         PR tree-optimization/78821
3843         * gimple-ssa-store-merging.c (struct store_operand_info): Add bit_not_p
3844         data member.
3845         (store_operand_info::store_operand_info): Initialize it to false.
3846         (pass_store_merging::terminate_all_aliasing_chains): Rewritten to use
3847         ref_maybe_used_by_stmt_p and stmt_may_clobber_ref_p on lhs of each
3848         store in the group, and if chain_info is non-NULL, to ignore altogether
3849         that chain.
3850         (compatible_load_p): Fail if bit_not_p does not match.
3851         (imm_store_chain_info::output_merged_store): Handle bit_not_p loads.
3852         (handled_load): Fill in bit_not_p.  Handle BIT_NOT_EXPR.
3853         (pass_store_merging::process_store): Adjust
3854         terminate_all_aliasing_chains calls to pass NULL in all current spots,
3855         call terminate_all_aliasing_chains newly when adding a store into
3856         a chain with non-NULL chain_info.
3857
3858 2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>
3859
3860         * config/aarch64/aarch64.c (aarch64_can_eliminate): Simplify logic.
3861
3862 2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>
3863
3864         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
3865         Remove.
3866         (aarch64_layout_frame): Initialise emit_frame_chain.
3867         (aarch64_can_eliminate): Remove omit leaf frame pointer code.
3868         (TARGET_FRAME_POINTER_REQUIRED): Remove define.
3869
3870 2017-11-08  Martin Liska  <mliska@suse.cz>
3871
3872         * gimplify.c (expand_FALLTHROUGH_r): Simplify usage
3873         of gimple_call_internal_p.
3874
3875 2017-11-07  Tom de Vries  <tom@codesourcery.com>
3876
3877         * config/mips/mips.h (ASM_OUTPUT_LABELREF): Wrap in "do {} while (0)".
3878
3879 2017-11-07  Tom de Vries  <tom@codesourcery.com>
3880
3881         * config/mips/mips.h (ASM_OUTPUT_CASE_END): Remove semicolon after
3882         "do {} while (0)".
3883
3884 2017-11-08  Martin Liska  <mliska@suse.cz>
3885
3886         PR sanitizer/82792
3887         * gimplify.c (expand_FALLTHROUGH_r): Skip IFN_ASAN_MARK.
3888
3889 2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>
3890
3891         * gimple-pretty-print.c (dump_profile): Return "" instead of NULL.
3892
3893 2017-11-07  Jakub Jelinek  <jakub@redhat.com>
3894
3895         PR target/82855
3896         * config/i386/i386.md (SWI1248_AVX512BWDQ2_64): New mode iterator.
3897         (*cmp<mode>_ccz_1): New insn with $k alternative.
3898
3899         PR target/82855
3900         * config/i386/i386.c (ix86_swap_binary_operands_p): Treat
3901         RTX_COMM_COMPARE as commutative as well.
3902         (ix86_binary_operator_ok): Formatting fix.
3903         * config/i386/sse.md (*mul<mode>3<mask_name><round_name>,
3904         *<code><mode>3<mask_name><round_saeonly_name>,
3905         *<code><mode>3<mask_name>, *<code>tf3, *mul<mode>3<mask_name>,
3906         *<s>mul<mode>3_highpart<mask_name>,
3907         *vec_widen_umult_even_v16si<mask_name>,
3908         *vec_widen_umult_even_v8si<mask_name>,
3909         *vec_widen_umult_even_v4si<mask_name>,
3910         *vec_widen_smult_even_v16si<mask_name>,
3911         *vec_widen_smult_even_v8si<mask_name>, *sse4_1_mulv2siv2di3<mask_name>,
3912         *avx2_pmaddwd, *sse2_pmaddwd, *<sse4_1_avx2>_mul<mode>3<mask_name>,
3913         *avx2_<code><mode>3, *avx512f_<code><mode>3<mask_name>,
3914         *sse4_1_<code><mode>3<mask_name>, *<code>v8hi3,
3915         *sse4_1_<code><mode>3<mask_name>, *<code>v16qi3, *avx2_eq<mode>3,
3916         <avx512>_eq<mode>3<mask_scalar_merge_name>_1, *sse4_1_eqv2di3,
3917         *sse2_eq<mode>3, <mask_codefor><code><mode>3<mask_name>,
3918         *<code><mode>3, *<sse2_avx2>_uavg<mode>3<mask_name>,
3919         *<ssse3_avx2>_pmulhrsw<mode>3<mask_name>, *ssse3_pmulhrswv4hi3): Use
3920         !(MEM_P (operands[1]) && MEM_P (operands[2])) condition instead of
3921         ix86_binary_operator_ok.  Formatting fixes.
3922         (*<plusminus_insn><mode>3<mask_name><round_name>,
3923         *<plusminus_insn><mode>3, *<plusminus_insn><mode>3_m): Formatting
3924         fixes.
3925
3926 2017-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
3927
3928         * config/rs6000/rs6000.md (GPR2): New mode_iterator.
3929         ("cstore<mode>4"): Don't always expand with rs6000_emit_int_cmove for
3930         eq and ne if TARGET_ISEL.
3931         (cmp): New code_iterator.
3932         (UNS, UNSU_, UNSIK): New code_attrs.
3933         (<code><GPR:mode><GPR2:mode>2_isel): New define_insn_and_split.
3934         ("eq<mode>3"): New define_expand, rename the define_insn_and_split
3935         to...
3936         ("eq<mode>3"): ... this.
3937         ("ne<mode>3"): New define_expand, rename the define_insn_and_split
3938         to...
3939         ("ne<mode>3"): ... this.
3940
3941 2017-11-07  Julia Koval  <julia.koval@intel.com>
3942
3943         PR target/82812
3944         * common/config/i386/i386-common.c
3945         (OPTION_MASK_ISA_GENERAL_REGS_ONLY_UNSET): Remove MPX from flag.
3946         (ix86_handle_option): Move MPX to isa_flags2 and GFNI to isa_flags.
3947         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto.
3948         * config/i386/i386.opt: Ditto.
3949         * config/i386/i386.c (ix86_target_string): Ditto.
3950         (ix86_option_override_internal): Ditto.
3951         (ix86_init_mpx_builtins): Move MPX to args2.
3952         (ix86_expand_builtin): Special handling for OPTION_MASK_ISA_GFNI.
3953         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineinvqb_v64qi,
3954         __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
3955         __builtin_ia32_vgf2p8affineinvqb_v32qi,
3956         __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
3957         __builtin_ia32_vgf2p8affineinvqb_v16qi,
3958         __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): Move to ARGS array.
3959
3960 2017-11-07  Uros Bizjak  <ubizjak@gmail.com>
3961
3962         PR target/80425
3963         * config/i386.i386.md (*zero_extendsidi2): Change (?r,*Yj), (?*Yi,r)
3964         and (*x,m) to ($r,Yj), ($Yi,r) and ($x,m).
3965         (zero-extendsidi peephole2): Remove peephole.
3966
3967 2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>
3968
3969         PR c/53037
3970         * stor-layout.c: Include attribs.h.
3971         (handle_warn_if_not_align): Replace test on TYPE_USER_ALIGN with
3972         explicit lookup of "aligned" attribute.
3973
3974 2017-11-07  Andrew Waterman  <andrew@sifive.com>
3975
3976         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): New prototype.
3977         (riscv_expand_block_move): Likewise.
3978         * config/riscv/riscv.h (MOVE_RATIO): Tune cost to movmemsi
3979         implementation.
3980         (RISCV_MAX_MOVE_BYTES_PER_LOOP_ITER): New define.
3981         (RISCV_MAX_MOVE_BYTES_STRAIGHT): New define.
3982         * config/riscv/riscv.c (riscv_block_move_straight): New function.
3983         (riscv_adjust_block_mem): Likewise.
3984         (riscv_block_move_loop): Likewise.
3985         (riscv_expand_block_move): Likewise.
3986         * config/riscv/riscv.md (movmemsi): New pattern.
3987
3988 2017-11-07  Michael Clark  <michaeljclark@mac.com>
3989
3990         * config/riscv/linux.h (MUSL_ABI_SUFFIX): New define.
3991         (MUSL_DYNAMIC_LINKER): Likewise.
3992
3993 2017-11-07  Richard Sandiford  <richard.sandiford@linaro.org>
3994
3995         * config/aarch64/aarch64.md (ashl<mode>3, ashr<mode>3, lshr<mode>3)
3996         (rotr<mode>3, rotl<mode>3): Use aarch64_reg_or_imm instead of
3997         nonmmory_operand.
3998
3999 2017-11-07  Richard Biener  <rguenther@suse.de>
4000
4001         * match.pd: Fix build.
4002
4003 2017-11-07  Wilco Dijkstra  <wdijkstr@arm.com>
4004             Jackson Woodruff  <jackson.woodruff@arm.com>
4005
4006         PR tree-optimization/71026
4007         * match.pd: Canonicalize negate in division.
4008
4009 2017-11-07  Sudakshina Das  <sudi.das@arm.com>
4010
4011         PR middle-end/80131
4012         * match.pd: Simplify 1 << (C - x) where C = precision (x) - 1.
4013
4014 2017-11-07  Marc Glisse  <marc.glisse@inria.fr>
4015
4016         * match.pd ((a&~b)|(a^b),(a&~b)^~a,(a|b)&~(a^b),a|~(a^b),
4017         (a|b)|(a&^b),(a&b)|~(a^b),~(~a&b),~X^Y): New transformations.
4018
4019 2017-11-07  Marc Glisse  <marc.glisse@inria.fr>
4020
4021         * fold-const.c (negate_expr_p) [PLUS_EXPR, MINUS_EXPR]: Handle
4022         non-scalar integral types.
4023         * match.pd (negate_expr_p): Handle MINUS_EXPR.
4024         (-(A-B), -(~A)): New transformations.
4025
4026 2017-11-07  Tom de Vries  <tom@codesourcery.com>
4027
4028         * config/powerpcspe/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove
4029         semicolon after "do {} while (0)".
4030         * config/powerpcspe/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
4031         * config/powerpcspe/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
4032         * config/powerpcspe/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
4033         * config/powerpcspe/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
4034         * config/powerpcspe/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
4035
4036 2017-11-07  Tom de Vries  <tom@codesourcery.com>
4037
4038         * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove semicolon
4039         after "do {} while (0)".
4040         * config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
4041         * config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
4042         * config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
4043         * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
4044         * config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
4045
4046 2017-11-07  Tom de Vries  <tom@codesourcery.com>
4047
4048         PR other/82784
4049         * config/arm/arm.c (HANDLE_NARROW_SHIFT_ARITH): Remove semicolon after
4050         "while {} do (0)".
4051         (arm_rtx_costs_internal): Add missing semicolon after
4052         HANDLE_NARROW_SHIFT_ARITH call.
4053
4054 2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
4055
4056         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
4057         disable isel if it was not set explicitly.
4058
4059 2017-11-06  James Bowman  <james.bowman@ftdichip.com>
4060
4061         * gcc/dwarf2out.c (modified_type_die): Retain ADDR_SPACE qualifiers.
4062         (add_type_attribute) likewise.
4063
4064 2017-11-06  H.J. Lu  <hongjiu.lu@intel.com>
4065
4066         * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
4067         of struct ix86_frame.
4068         (ix86_initial_elimination_offset): Likewise.
4069         (ix86_expand_split_stack_prologue): Likewise.
4070
4071 2017-11-06  Marc Glisse  <marc.glisse@inria.fr>
4072
4073         * tree-vrp.h (enum value_range_type): Update stale comment.
4074
4075 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
4076             Alan Hayward  <alan.hayward@arm.com>
4077             David Sherwood  <david.sherwood@arm.com>
4078
4079         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm)
4080         (aarch64_expand_vec_perm_const): Take the number of units too.
4081         * config/aarch64/aarch64.c (aarch64_expand_vec_perm)
4082         (aarch64_expand_vec_perm_const): Likewise.
4083         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>)
4084         (vec_perm<mode>): Update accordingly.
4085
4086 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
4087             Alan Hayward  <alan.hayward@arm.com>
4088             David Sherwood  <david.sherwood@arm.com>
4089
4090         * config/aarch64/aarch64-protos.h (aarch64_simd_vect_par_cnst_half):
4091         Take the number of units too.
4092         * config/aarch64/aarch64.c (aarch64_simd_vect_par_cnst_half): Likewise.
4093         (aarch64_simd_check_vect_par_cnst_half): Update call accordingly,
4094         but check for a vector mode before rather than after the call.
4095         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
4096         (move_hi_quad_<mode>, vec_unpack<su>_hi_<mode>)
4097         (vec_unpack<su>_lo_<mode, vec_widen_<su>mult_lo_<mode>)
4098         (vec_widen_<su>mult_hi_<mode>, vec_unpacks_lo_<mode>)
4099         (vec_unpacks_hi_<mode>, aarch64_saddl2<mode>, aarch64_uaddl2<mode>)
4100         (aarch64_ssubl2<mode>, aarch64_usubl2<mode>, widen_ssum<mode>3)
4101         (widen_usum<mode>3, aarch64_saddw2<mode>, aarch64_uaddw2<mode>)
4102         (aarch64_ssubw2<mode>, aarch64_usubw2<mode>, aarch64_sqdmlal2<mode>)
4103         (aarch64_sqdmlsl2<mode>, aarch64_sqdmlal2_lane<mode>)
4104         (aarch64_sqdmlal2_laneq<mode>, aarch64_sqdmlsl2_lane<mode>)
4105         (aarch64_sqdmlsl2_laneq<mode>, aarch64_sqdmlal2_n<mode>)
4106         (aarch64_sqdmlsl2_n<mode>, aarch64_sqdmull2<mode>)
4107         (aarch64_sqdmull2_lane<mode>, aarch64_sqdmull2_laneq<mode>)
4108         (aarch64_sqdmull2_n<mode>): Update accordingly.
4109
4110 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
4111             Alan Hayward  <alan.hayward@arm.com>
4112             David Sherwood  <david.sherwood@arm.com>
4113
4114         * config/aarch64/aarch64-protos.h (aarch64_reverse_mask): Take
4115         the number of units too.
4116         * config/aarch64/aarch64.c (aarch64_reverse_mask): Likewise.
4117         * config/aarch64/aarch64-simd.md (vec_load_lanesoi<mode>)
4118         (vec_store_lanesoi<mode>, vec_load_lanesci<mode>)
4119         (vec_store_lanesci<mode>, vec_load_lanesxi<mode>)
4120         (vec_store_lanesxi<mode>): Update accordingly.
4121
4122 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
4123             Alan Hayward  <alan.hayward@arm.com>
4124             David Sherwood  <david.sherwood@arm.com>
4125
4126         * config/aarch64/aarch64-protos.h (aarch64_endian_lane_rtx): Declare.
4127         * config/aarch64/aarch64.c (aarch64_endian_lane_rtx): New function.
4128         * config/aarch64/aarch64.h (ENDIAN_LANE_N): Take the number
4129         of units rather than the mode.
4130         * config/aarch64/iterators.md (nunits): New mode attribute.
4131         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args):
4132         Use aarch64_endian_lane_rtx instead of GEN_INT (ENDIAN_LANE_N ...).
4133         * config/aarch64/aarch64-simd.md (aarch64_dup_lane<mode>)
4134         (aarch64_dup_lane_<vswap_width_name><mode>, *aarch64_mul3_elt<mode>)
4135         (*aarch64_mul3_elt_<vswap_width_name><mode>): Likewise.
4136         (*aarch64_mul3_elt_to_64v2df, *aarch64_mla_elt<mode>): Likewise.
4137         (*aarch64_mla_elt_<vswap_width_name><mode>, *aarch64_mls_elt<mode>)
4138         (*aarch64_mls_elt_<vswap_width_name><mode>, *aarch64_fma4_elt<mode>)
4139         (*aarch64_fma4_elt_<vswap_width_name><mode>):: Likewise.
4140         (*aarch64_fma4_elt_to_64v2df, *aarch64_fnma4_elt<mode>): Likewise.
4141         (*aarch64_fnma4_elt_<vswap_width_name><mode>): Likewise.
4142         (*aarch64_fnma4_elt_to_64v2df, reduc_plus_scal_<mode>): Likewise.
4143         (reduc_plus_scal_v4sf, reduc_<maxmin_uns>_scal_<mode>): Likewise.
4144         (reduc_<maxmin_uns>_scal_<mode>): Likewise.
4145         (*aarch64_get_lane_extend<GPI:mode><VDQQH:mode>): Likewise.
4146         (*aarch64_get_lane_zero_extendsi<mode>): Likewise.
4147         (aarch64_get_lane<mode>, *aarch64_mulx_elt_<vswap_width_name><mode>)
4148         (*aarch64_mulx_elt<mode>, *aarch64_vgetfmulx<mode>): Likewise.
4149         (aarch64_sq<r>dmulh_lane<mode>, aarch64_sq<r>dmulh_laneq<mode>)
4150         (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_lane<mode>): Likewise.
4151         (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_laneq<mode>): Likewise.
4152         (aarch64_sqdml<SBINQOPS:as>l_lane<mode>): Likewise.
4153         (aarch64_sqdml<SBINQOPS:as>l_laneq<mode>): Likewise.
4154         (aarch64_sqdml<SBINQOPS:as>l2_lane<mode>_internal): Likewise.
4155         (aarch64_sqdml<SBINQOPS:as>l2_laneq<mode>_internal): Likewise.
4156         (aarch64_sqdmull_lane<mode>, aarch64_sqdmull_laneq<mode>): Likewise.
4157         (aarch64_sqdmull2_lane<mode>_internal): Likewise.
4158         (aarch64_sqdmull2_laneq<mode>_internal): Likewise.
4159         (aarch64_vec_load_lanesoi_lane<mode>): Likewise.
4160         (aarch64_vec_store_lanesoi_lane<mode>): Likewise.
4161         (aarch64_vec_load_lanesci_lane<mode>): Likewise.
4162         (aarch64_vec_store_lanesci_lane<mode>): Likewise.
4163         (aarch64_vec_load_lanesxi_lane<mode>): Likewise.
4164         (aarch64_vec_store_lanesxi_lane<mode>): Likewise.
4165         (aarch64_simd_vec_set<mode>): Update use of ENDIAN_LANE_N.
4166         (aarch64_simd_vec_setv2di): Likewise.
4167
4168 2017-11-06  Carl Love  <cel@us.ibm.com>
4169
4170         * config/rs6000/rs6000-c.c (P8V_BUILTIN_VEC_REVB): Add power 8
4171         definitions.
4172         (P9V_BUILTIN_VEC_REVB): Remove the power 9 instance definitions.
4173         * config/rs6000/altivec.h (vec_revb): Change the #define from power 9
4174         to power 8.
4175         * config/rs6000/r6000-protos.h (swap_endian_selector_for_mode): Add new
4176         extern declaration.
4177         * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Add function.
4178         * config/rs6000/rs6000-builtin.def (BU_P8V_VSX_1, BU_P8V_OVERLOAD_1):
4179         Add power 8 macro expansions.
4180         (BU_P9V_OVERLOAD_1): Remove power 9 overload expansion.
4181         * config/rs6000/vsx.md (revb_<mode>): Add define_expand to generate
4182         power 8 instructions.  (VSX_XXBR): Add iterator.
4183
4184 2017-11-06  Wilco Dijkstra  <wdijkstr@arm.com>
4185
4186         * config/arm/arm.md (predicable_short_it): Change default to "no",
4187         improve documentation, remove uses that are identical to the default.
4188         (enabled_for_depr_it): Rename to enabled_for_short_it.
4189         * gcc/config/arm/arm-fixed.md (predicable_short_it):
4190         Remove default uses.
4191         * gcc/config/arm/ldmstm.md (predicable_short_it): Likewise.
4192         * gcc/config/arm/sync.md (predicable_short_it): Likewise.
4193         * gcc/config/arm/thumb2.md (predicable_short_it): Likewise.
4194         * gcc/config/arm/vfp.md (predicable_short_it): Likewise.
4195
4196 2017-11-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
4197
4198         PR target/82748
4199         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1): Delete
4200         float128 helper macros, which are no longer used after deleting
4201         the old 'q' built-in functions, and moving the round to odd
4202         built-in functions to being special built-in functions.
4203         (BU_FLOAT128_2): Likewise.
4204         (BU_FLOAT128_1_HW): Likewise.
4205         (BU_FLOAT128_2_HW): Likewise.
4206         (BU_FLOAT128_3_HW): Likewise.
4207         (FABSQ): Delete old 'q' built-in functions.
4208         (COPYSIGNQ): Likewise.
4209         (SQRTF128_ODD): Move round to odd built-in functions to be
4210         special built-in functions, so that we can handle
4211         -mabi=ieeelongdouble.
4212         (TRUNCF128_ODD): Likewise.
4213         (ADDF128_ODD): Likewise.
4214         (SUBF128_ODD): Likewise.
4215         (MULF128_ODD): Likewise.
4216         (DIVF128_ODD): Likewise.
4217         (FMAF128_ODD): Likewise.
4218         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Map old 'q'
4219         built-in names to 'f128'.
4220         * config/rs6000/rs6000.c (rs6000_fold_builtin): Remove folding the
4221         old 'q' built-in functions, as the machine independent code for
4222         'f128' built-in functions handles this.
4223         (rs6000_expand_builtin): Add expansion for float128 round to odd
4224         functions, keying off on -mabi=ieeelongdouble of whether to use
4225         the KFmode or TFmode variant.
4226         (rs6000_init_builtins): Initialize the _Float128 round to odd
4227         built-in functions.
4228         * doc/extend.texi (PowerPC Built-in Functions): Document the old
4229         _Float128 'q' built-in functions are now mapped into the new
4230         'f128' built-in functions.
4231
4232 2017-11-06  David Edelsohn  <dje.gcc@gmail.com>
4233
4234         * collect2.c (add_lto_object): Compile for OBJECT_COFF.
4235         (scan_prog_file): Don't skip PASS_LTOINFO. Scan for LTO objects.
4236
4237 2017-11-06  David Malcolm  <dmalcolm@redhat.com>
4238
4239         PR jit/82826
4240         * ipa-fnsummary.c (ipa_fnsummary_c_finalize): New function.
4241         * ipa-fnsummary.h (ipa_fnsummary_c_finalize): New decl.
4242         * toplev.c: Include "ipa-fnsummary.h".
4243         (toplev::finalize): Call ipa_fnsummary_c_finalize.
4244
4245 2017-11-06  Jakub Jelinek  <jakub@redhat.com>
4246
4247         PR tree-optimization/82838
4248         * gimple-ssa-store-merging.c
4249         (imm_store_chain_info::output_merged_store): Call force_gimple_operand_1
4250         on a separate gimple_seq which is then appended to seq.
4251
4252 2017-11-06  Jeff Law  <law@redhat.com>
4253
4254         PR target/82788
4255         * config/i386/i386.c (PROBE_INTERVAL): Remove.
4256         (get_probe_interval): New functions.
4257         (ix86_adjust_stack_and_probe_stack_clash): Use get_probe_interval.
4258         (ix86_adjust_stack_and_probe): Likewise.
4259         (output_adjust_stack_and_probe): Likewise.
4260         (ix86_emit_probe_stack_range): Likewise.
4261         (ix86_expand_prologue): Likewise.
4262
4263 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
4264
4265         PR tree-optimization/82816
4266         * tree-ssa-math-opts.c (convert_mult_to_widen): Return false
4267         if the modes of the two types are the same.
4268         (convert_plusminus_to_widen): Likewise.
4269
4270 2017-11-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
4271
4272         * config/rs6000/altivec.md (*p9_vadu<mode>3) Rename to
4273         p9_vadu<mode>3.
4274         (usadv16qi): New define_expand.
4275         (usadv8hi): New define_expand.
4276
4277 2017-11-06  Jan Hubicka  <hubicka@ucw.cz>
4278
4279         PR bootstrap/82832
4280         * ipa-inline-transform.c (update_noncloned_frequencies): Always
4281         scale.
4282         (inline_transform): Likewise.
4283         * predict.c (counts_to_freqs): Remove useless conditional.
4284         * profile-count.h (profile_count::apply_scale): Move sanity check.
4285         * tree-inline.c (copy_bb): Always scale.
4286         (copy_cfg_body): Likewise.
4287
4288 2017-11-06  Christophe Lyon  <christophe.lyon@linaro.org>
4289
4290         PR target/67591
4291         * config/arm/arm.md (*sub_shiftsi): Add predicable_short_it
4292         attribute.
4293         (*cmp_ite0): Add enabled_for_depr_it attribute.
4294         (*cmp_ite1): Likewise.
4295
4296 2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
4297
4298         * config/rs6000/rs6000.c (rs6000_insn_cost): Handle TYPE_MFCR and
4299         TYPE_MFCRF.
4300
4301 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
4302
4303         * tree-vrp.c (vrp_int_const_binop): Return true on success and
4304         return the value by pointer.
4305         (extract_range_from_multiplicative_op_1): Update accordingly.
4306         Return as soon as an operation fails.
4307
4308 2017-11-05  Tom de Vries  <tom@codesourcery.com>
4309
4310         PR other/82784
4311         * asan.c (DEF_SANITIZER_BUILTIN_1): Factor out of ...
4312         (DEF_SANITIZER_BUILTIN): ... here.
4313         (initialize_sanitizer_builtins): Use DEF_SANITIZER_BUILTIN_1 instead of
4314         DEF_SANITIZER_BUILTIN in if stmt.  Add missing semicolon.
4315
4316 2017-11-05  Tom de Vries  <tom@codesourcery.com>
4317
4318         PR other/82784
4319         * config/elfos.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon after
4320         macro body.
4321         (ASM_OUTPUT_CASE_LABEL): Add semicolon after
4322         ASM_OUTPUT_BEFORE_CASE_LABEL call.
4323         * config/arc/arc.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon
4324         after macro body.
4325         * config/m68k/m68kelf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
4326         * config/mips/mips.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
4327         * config/v850/v850.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
4328
4329 2017-11-05  Tom de Vries  <tom@codesourcery.com>
4330
4331         PR other/82784
4332         * graphite-scop-detection.c (DEBUG_PRINT): Remove semicolon after
4333         "do {} while (0)".
4334
4335 2017-11-04  Michael Clark  <michaeljclark@mac.com>
4336
4337         * config/riscv/riscv.c (riscv_print_operand): Add a 'i' format.
4338         config/riscv/riscv.md (addsi3): Use 'i' for immediates.
4339         (adddi3): Likewise.
4340         (*addsi3_extended): Likewise.
4341         (*addsi3_extended2): Likewise.
4342         (<optab>si3): Likewise.
4343         (<optab>di3): Likewise.
4344         (<optab><mode>3): Likewise.
4345         (<*optabe>si3_internal): Likewise.
4346         (zero_extendqi<SUPERQI:mode>2): Likewise.
4347         (*add<mode>hi3): Likewise.
4348         (*xor<mode>hi3): Likewise.
4349         (<optab>di3): Likewise.
4350         (*<optab>si3_extend): Likewise.
4351         (*sge<u>_<X:mode><GPR:mode>): Likewise.
4352         (*slt<u>_<X:mode><GPR:mode>): Likewise.
4353         (*sle<u>_<X:mode><GPR:mode>): Likewise.
4354
4355 2017-11-04  Andrew Waterman  <andrew@sifive.com>
4356
4357         * config/riscv/riscv.c (riscv_option_override): Conditionally set
4358         TARGET_STRICT_ALIGN based upon -mtune argument.
4359
4360 2017-11-04  Andrew Waterman  <andrew@sifive.com>
4361
4362         * config/riscv/riscv.h (SLOW_BYTE_ACCESS): Change to 1.
4363
4364 2017-11-04  Daniel Santos  <daniel.santos@pobox.com>
4365
4366         * config/i386/i386.c (choose_basereg): Use optional scratch
4367         register and add assertion.
4368         (x86_emit_outlined_ms2sysv_save): Use scratch register when
4369         needed, and don't allocate stack.
4370         (ix86_expand_prologue): Rearrange where SSE saves/stub call is
4371         emitted, correct wrong allocation with -mcall-ms2sysv-xlogues.
4372         (ix86_emit_outlined_ms2sysv_restore): Fix non-immediate offsets.
4373
4374 2017-11-03  Jeff Law  <law@redhat.com>
4375
4376         * config/i386/i386.c (ix86_emit_restore_reg_using_pop): Prototype.
4377         (ix86_adjust_stack_and_probe_stack_clash): Use a push/pop sequence
4378         to probe at the start of a noreturn function.
4379
4380 2017-11-03  Jakub Jelinek  <jakub@redhat.com>
4381
4382         PR tree-optimization/78821
4383         * gimple-ssa-store-merging.c: Update the file comment.
4384         (MAX_STORE_ALIAS_CHECKS): Define.
4385         (struct store_operand_info): New type.
4386         (store_operand_info::store_operand_info): New constructor.
4387         (struct store_immediate_info): Add rhs_code and ops data members.
4388         (store_immediate_info::store_immediate_info): Add rhscode, op0r
4389         and op1r arguments to the ctor, initialize corresponding data members.
4390         (struct merged_store_group): Add load_align_base and load_align
4391         data members.
4392         (merged_store_group::merged_store_group): Initialize them.
4393         (merged_store_group::do_merge): Update them.
4394         (merged_store_group::apply_stores): Pick the constant for
4395         encode_tree_to_bitpos from one of the two operands, or skip
4396         encode_tree_to_bitpos if neither operand is a constant.
4397         (class pass_store_merging): Add process_store method decl.  Remove
4398         bool argument from terminate_all_aliasing_chains method decl.
4399         (pass_store_merging::terminate_all_aliasing_chains): Remove
4400         var_offset_p argument and corresponding handling.
4401         (stmts_may_clobber_ref_p): New function.
4402         (compatible_load_p): New function.
4403         (imm_store_chain_info::coalesce_immediate_stores): Terminate group
4404         if there is overlap and rhs_code is not INTEGER_CST.  For
4405         non-overlapping stores terminate group if rhs is not mergeable.
4406         (get_alias_type_for_stmts): Change first argument from
4407         auto_vec<gimple *> & to vec<gimple *> &.  Add IS_LOAD, CLIQUEP and
4408         BASEP arguments.  If IS_LOAD is true, look at rhs1 of the stmts
4409         instead of lhs.  Compute *CLIQUEP and *BASEP in addition to the
4410         alias type.
4411         (get_location_for_stmts): Change first argument from
4412         auto_vec<gimple *> & to vec<gimple *> &.
4413         (struct split_store): Remove orig_stmts data member, add orig_stores.
4414         (split_store::split_store): Create orig_stores rather than orig_stmts.
4415         (find_constituent_stmts): Renamed to ...
4416         (find_constituent_stores): ... this.  Change second argument from
4417         vec<gimple *> * to vec<store_immediate_info *> *, push pointers
4418         to info structures rather than the statements.
4419         (split_group): Rename ALLOW_UNALIGNED argument to
4420         ALLOW_UNALIGNED_STORE, add ALLOW_UNALIGNED_LOAD argument and handle
4421         it.  Adjust find_constituent_stores caller.
4422         (imm_store_chain_info::output_merged_store): Handle rhs_code other
4423         than INTEGER_CST, adjust split_group, get_alias_type_for_stmts and
4424         get_location_for_stmts callers.  Set MR_DEPENDENCE_CLIQUE and
4425         MR_DEPENDENCE_BASE on the MEM_REFs if they are the same in all stores.
4426         (mem_valid_for_store_merging): New function.
4427         (handled_load): New function.
4428         (pass_store_merging::process_store): New method.
4429         (pass_store_merging::execute): Use process_store method.  Adjust
4430         terminate_all_aliasing_chains caller.
4431
4432 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
4433
4434         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
4435         Return true for more constants, symbols and label references.
4436         (aarch64_valid_floating_const): Remove unused function.
4437
4438 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
4439
4440         PR target/82786
4441         * config/aarch64/aarch64.c (aarch64_layout_frame):
4442         Undo forcing of LR at bottom of frame.
4443
4444 2017-11-03  Jeff Law  <law@redhat.com>
4445
4446         PR target/82823
4447         * config/i386/i386.c (ix86_expand_prologue): Tighten assert
4448         for int_registers_saved.
4449
4450         * cfganal.c (single_pred_edge_ignoring_loop_edges): New function
4451         extracted from tree-ssa-dom.c.
4452         * cfganal.h (single_pred_edge_ignoring_loop_edges): Prototype.
4453         * tree-ssa-dom.c (single_incoming_edge_ignoring_loop_edges): Remove.
4454         (record_equivalences_from_incoming_edge): Add additional argument
4455         to single_pred_edge_ignoring_loop_edges call.
4456         * tree-ssa-uncprop.c (single_incoming_edge_ignoring_loop_edges): Remove.
4457         (uncprop_dom_walker::before_dom_children): Add additional argument
4458         to single_pred_edge_ignoring_loop_edges call.
4459         * tree-ssa-sccvn.c (sccvn_dom_walker::before_dom_children): Use
4460         single_pred_edge_ignoring_loop_edges rather than open coding.
4461         * tree-vrp.c (evrp_dom_walker::before_dom_children): Similarly.
4462
4463 2017-11-03  Marc Glisse  <marc.glisse@inria.fr>
4464
4465         * match.pd (-(-A)): Rewrite.
4466
4467 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
4468
4469         * config/rs6000/rs60000-protos.h (rs6000_emit_sISEL): Delete.
4470         (rs6000_emit_int_cmove): New declaration.
4471         * config/rs6000/rs6000.c (rs6000_emit_int_cmove): Delete declaration.
4472         (rs6000_emit_sISEL): Delete.
4473         (rs6000_emit_int_cmove): Make non-static.
4474         * config/rs6000/rs6000.md (cstore<mode>4): Use rs6000_emit_int_cmove
4475         instead of rs6000_emit_sISEL.
4476
4477 2017-11-03  Jan Hubicka  <hubicka@ucw.cz>
4478
4479         * asan.c (create_cond_insert_point): Maintain profile.
4480         * ipa-utils.c (ipa_merge_profiles): Be sure only IPA profiles are
4481         merged.
4482         * basic-block.h (struct basic_block_def): Remove frequency.
4483         (EDGE_FREQUENCY): Use to_frequency
4484         * bb-reorder.c (push_to_next_round_p): Use only IPA counts for global
4485         heuristics.
4486         (find_traces): Update to use to_frequency.
4487         (find_traces_1_round): Likewise; use only IPA counts.
4488         (bb_to_key): Likewise.
4489         (connect_traces): Use IPA counts only.
4490         (copy_bb_p): Update to use to_frequency.
4491         (fix_up_crossing_landing_pad): Likewise.
4492         (sanitize_hot_paths): Likewise.
4493         * bt-load.c (basic_block_freq): Likewise.
4494         * cfg.c (init_flow): Set count_max to uninitialized.
4495         (check_bb_profile): Remove frequencies; check counts.
4496         (dump_bb_info): Do not dump frequencies.
4497         (update_bb_profile_for_threading): Update counts only.
4498         (scale_bbs_frequencies_int): Likewise.
4499         (MAX_SAFE_MULTIPLIER): Remove.
4500         (scale_bbs_frequencies_gcov_type): Update counts only.
4501         (scale_bbs_frequencies_profile_count): Update counts only.
4502         (scale_bbs_frequencies): Update counts only.
4503         * cfg.h (struct control_flow_graph): Add count-max.
4504         (update_bb_profile_for_threading): Update prototype.
4505         * cfgbuild.c (find_bb_boundaries): Do not update frequencies.
4506         (find_many_sub_basic_blocks): Likewise.
4507         * cfgcleanup.c (try_forward_edges): Likewise.
4508         (try_crossjump_to_edge): Likewise.
4509         * cfgexpand.c (expand_gimple_cond): Likewise.
4510         (expand_gimple_tailcall): Likewise.
4511         (construct_init_block): Likewise.
4512         (construct_exit_block): Likewise.
4513         * cfghooks.c (verify_flow_info): Check consistency of counts.
4514         (dump_bb_for_graph): Do not dump frequencies.
4515         (split_block_1): Do not update frequencies.
4516         (split_edge): Do not update frequencies.
4517         (make_forwarder_block): Do not update frequencies.
4518         (duplicate_block): Do not update frequencies.
4519         (account_profile_record): Do not update frequencies.
4520         * cfgloop.c (find_subloop_latch_edge_by_profile): Use IPA counts
4521         for global heuristics.
4522         * cfgloopanal.c (average_num_loop_insns): Update to use to_frequency.
4523         (expected_loop_iterations_unbounded): Use counts only.
4524         * cfgloopmanip.c (scale_loop_profile): Simplify.
4525         (create_empty_loop_on_edge): Simplify
4526         (loopify): Simplify
4527         (duplicate_loop_to_header_edge): Simplify
4528         * cfgrtl.c (force_nonfallthru_and_redirect): Update profile.
4529         (update_br_prob_note): Take care of removing note when profile
4530         becomes undefined.
4531         (relink_block_chain): Do not dump frequency.
4532         (rtl_account_profile_record): Use to_frequency.
4533         * cgraph.c (symbol_table::create_edge): Convert count to ipa count.
4534         (cgraph_edge::redirect_call_stmt_to_calle): Conver tcount to ipa count.
4535         (cgraph_update_edges_for_call_stmt_node): Likewise.
4536         (cgraph_edge::verify_count_and_frequency): Update.
4537         (cgraph_node::verify_node): Temporarily disable frequency verification.
4538         * cgraphbuild.c (compute_call_stmt_bb_frequency): Use
4539         to_cgraph_frequency.
4540         (cgraph_edge::rebuild_edges): Convert to ipa counts.
4541         * cgraphunit.c (init_lowered_empty_function): Do not initialize
4542         frequencies.
4543         (cgraph_node::expand_thunk): Update profile.
4544         * except.c (dw2_build_landing_pads): Do not update frequency.
4545         * final.c (compute_alignments): Use to_frequency.
4546         (dump_basic_block_info): Do not dump frequency.
4547         * gimple-pretty-print.c (dump_profile): Do not dump frequency.
4548         (dump_gimple_bb_header): Do not dump frequency.
4549         * gimple-ssa-isolate-paths.c (isolate_path): Do not update frequency;
4550         do update count.
4551         * gimple-streamer-in.c (input_bb): Do not stream frequency.
4552         * gimple-streamer-out.c (output_bb): Do not stream frequency.
4553         * haifa-sched.c (sched_pressure_start_bb): Use to_freuqency.
4554         (init_before_recovery): Do not update frequency.
4555         (sched_create_recovery_edges): Do not update frequency.
4556         * hsa-gen.c (convert_switch_statements): Do not update frequency.
4557         * ipa-cp.c (ipcp_propagate_stage): Update search for max_count.
4558         (ipa_cp_c_finalize): Set max_count to uninitialized.
4559         * ipa-fnsummary.c (get_minimal_bb): Use counts.
4560         (param_change_prob): Use counts.
4561         * ipa-profile.c (ipa_profile_generate_summary): Do not summarize
4562         local profiles.
4563         * ipa-split.c (consider_split): Use to_frequency.
4564         (split_function): Use to_frequency.
4565         * ira-build.c (loop_compare_func): Likewise.
4566         (mark_loops_for_removal): Likewise.
4567         (mark_all_loops_for_removal): Likewise.
4568         * loop-doloop.c (doloop_modify): Do not update frequency.
4569         * loop-unroll.c (unroll_loop_runtime_iterations): Do not update
4570         frequency.
4571         * lto-streamer-in.c (input_function): Update count_max.
4572         * omp-expand.c (expand_omp_taskreg): Update count_max.
4573         * omp-simd-clone.c (simd_clone_adjust): Update profile.
4574         * predict.c (maybe_hot_frequency_p): Use to_frequency.
4575         (maybe_hot_count_p): Use ipa counts only.
4576         (maybe_hot_bb_p): Simplify.
4577         (maybe_hot_edge_p): Simplify.
4578         (probably_never_executed): Do not take frequency argument.
4579         (probably_never_executed_bb_p): Do not pass frequency.
4580         (probably_never_executed_edge_p): Likewise.
4581         (combine_predictions_for_bb): Check that profile is nonzero.
4582         (propagate_freq): Do not set frequency.
4583         (drop_profile): Simplify.
4584         (counts_to_freqs): Simplify.
4585         (expensive_function_p): Use to_frequency.
4586         (propagate_unlikely_bbs_forward): Simplify.
4587         (determine_unlikely_bbs): Simplify.
4588         (estimate_bb_frequencies): Add hack to silence graphite issues.
4589         (compute_function_frequency): Use ipa counts.
4590         (pass_profile::execute): Update.
4591         (rebuild_frequencies): Use counts only.
4592         (force_edge_cold): Use counts only.
4593         * profile-count.c (profile_count::dump): Dump new count types.
4594         (profile_count::differs_from_p): Check compatiblity.
4595         (profile_count::to_frequency): New function.
4596         (profile_count::to_cgraph_frequency): New function.
4597         * profile-count.h (struct function): Declare.
4598         (enum profile_quality): Add profile_guessed_local and
4599         profile_guessed_global0.
4600         (class profile_proability): Decrease number of bits to 29;
4601         update from_reg_br_prob_note and to_reg_br_prob_note.
4602         (class profile_count: Update comment; decrease number of bits
4603         to 61. Check compatibility.
4604         (profile_count::compatible_p): New private member function.
4605         (profile_count::ipa_p): New member function.
4606         (profile_count::operator<): Handle global zero correctly.
4607         (profile_count::operator>): Handle global zero correctly.
4608         (profile_count::operator<=): Handle global zero correctly.
4609         (profile_count::operator>=): Handle global zero correctly.
4610         (profile_count::nonzero_p): New member function.
4611         (profile_count::force_nonzero): New member function.
4612         (profile_count::max): New member function.
4613         (profile_count::apply_scale): Handle IPA scalling.
4614         (profile_count::guessed_local): New member function.
4615         (profile_count::global0): New member function.
4616         (profile_count::ipa): New member function.
4617         (profile_count::to_frequency): Declare.
4618         (profile_count::to_cgraph_frequency): Declare.
4619         * profile.c (OVERLAP_BASE): Delete.
4620         (compute_frequency_overlap): Delete.
4621         (compute_branch_probabilities): Do not use compute_frequency_overlap.
4622         * regs.h (REG_FREQ_FROM_BB): Use to_frequency.
4623         * sched-ebb.c (rank): Use counts only.
4624         * shrink-wrap.c (handle_simple_exit): Use counts only.
4625         (try_shrink_wrapping): Use counts only.
4626         (place_prologue_for_one_component): Use counts only.
4627         * tracer.c (find_best_predecessor): Use to_frequency.
4628         (find_trace): Use to_frequency.
4629         (tail_duplicate): Use to_frequency.
4630         * trans-mem.c (expand_transaction): Do not update frequency.
4631         * tree-call-cdce.c: Do not update frequency.
4632         * tree-cfg.c (gimple_find_sub_bbs): Likewise.
4633         (gimple_merge_blocks): Likewise.
4634         (gimple_split_edge): Likewise.
4635         (gimple_duplicate_sese_region): Likewise.
4636         (gimple_duplicate_sese_tail): Likewise.
4637         (move_sese_region_to_fn): Likewise.
4638         (gimple_account_profile_record): Likewise.
4639         (insert_cond_bb): Likewise.
4640         * tree-complex.c (expand_complex_div_wide): Likewise.
4641         * tree-eh.c (lower_resx): Update profile.
4642         * tree-inline.c (copy_bb): Simplify count scaling; do not scale
4643         frequencies.
4644         (initialize_cfun): Do not initialize frequencies
4645         (freqs_to_counts): Delete.
4646         (copy_cfg_body): Ignore count parameter.
4647         (copy_body): Update.
4648         (expand_call_inline): Update count_max.
4649         (optimize_inline_calls): Update count_max.
4650         (tree_function_versioning): Update count_max.
4651         * tree-ssa-coalesce.c (coalesce_cost_bb): Use to_frequency.
4652         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Do not update
4653         frequency.
4654         * tree-ssa-loop-im.c (execute_sm_if_changed): Use counts only.
4655         * tree-ssa-loop-ivcanon.c (unloop_loops): Do not update freuqency.
4656         (try_peel_loop): Likewise.
4657         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Use
4658         to_frequency.
4659         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Pass -1.
4660         (tree_transform_and_unroll_loop): Do not use frequencies
4661         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations):
4662         Use reliable prediction only.
4663         * tree-ssa-loop-unswitch.c (hoist_guard): Do not use frequencies.
4664         * tree-ssa-sink.c (select_best_block): Use to_frequency.
4665         * tree-ssa-tail-merge.c (replace_block_by): Temporarily disable
4666         probability scaling.
4667         * tree-ssa-threadupdate.c (create_block_for_threading): Do
4668         not update frequency
4669         (any_remaining_duplicated_blocks): Likewise.
4670         (update_profile): Likewise.
4671         (estimated_freqs_path): Delete.
4672         (freqs_to_counts_path): Delete.
4673         (clear_counts_path): Delete.
4674         (ssa_fix_duplicate_block_edges): Likewise.
4675         (duplicate_thread_path): Likewise.
4676         * tree-switch-conversion.c (gen_inbound_check): Use counts.
4677         * tree-tailcall.c (decrease_profile): Do not update frequency.
4678         (eliminate_tail_call): Likewise.
4679         * tree-vect-loop-manip.c (vect_do_peeling): Likewise.
4680         * tree-vect-loop.c (scale_profile_for_vect_loop): Likewise.
4681         (optimize_mask_stores): Likewise.
4682         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
4683         * ubsan.c (ubsan_expand_null_ifn): Update profile.
4684         (ubsan_expand_ptr_ifn): Update profile.
4685         * value-prof.c (gimple_ic): Simplify.
4686         * value-prof.h (gimple_ic): Update prototype.
4687         * ipa-inline-transform.c (inline_transform): Fix scaling conditoins.
4688         * ipa-inline.c (compute_uninlined_call_time): Be sure that
4689         counts are nonzero.
4690         (want_inline_self_recursive_call_p): Likewise.
4691         (resolve_noninline_speculation): Only cummulate defined counts.
4692         (inline_small_functions): Use nonzero_p.
4693         (ipa_inline): Do not access freed node.
4694
4695 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
4696
4697         * config/aarch64/aarch64.c (aarch64_override_options_internal):
4698         Set PARAM_SCHED_PRESSURE_ALGORITHM to SCHED_PRESSURE_MODEL.
4699
4700 2017-11-03  Kito Cheng  <kito.cheng@gmail.com>
4701
4702         * config/riscv/riscv.c (riscv_legitimize_move): Handle
4703         non-legitimate address.
4704
4705 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
4706
4707         * config/rs6000/rs6000.md (*lt0_disi): Delete.
4708         (*lt0_<mode>di, *lt0_<mode>si): New.
4709
4710 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
4711
4712         * config/rs6000/rs6000.md (move_from_CR_ov_bit): Change condition to
4713         TARGET_PAIRED_FLOAT.
4714
4715 2017-11-03  Siddhesh Poyarekar  <siddhesh.poyarekar@linaro.org>
4716             Jim Wilson  <jim.wilson@linaro.org>
4717
4718         * config/aarch64/aarch64-cores.def (saphira): New CPU.
4719         * config/aarch64/aarch64-tune.md: Regenerated.
4720         * doc/invoke.texi (AArch64 Options/-mtune): Add "saphira".
4721         * gcc/config/aarch64/aarch64.c (saphira_tunings): New tuning table.
4722
4723 2017-11-03  Cupertino Miranda  <cmiranda@synopsys.com>
4724
4725         * config/arc/arc.c (arc_save_restore): Corrected CFA note.
4726         (arc_expand_prologue): Restore blink for millicode.
4727         * config/arc/linux.h (LINK_EH_SPEC): Defined.
4728
4729 2017-11-03  Richard Sandiford  <richard.sandiford@linaro.org>
4730
4731         PR target/82809
4732         * config/i386/i386.c (ix86_vector_duplicate_value): Use
4733         gen_vec_duplicate after forcing the scalar into a register.
4734
4735 2017-11-02  Segher Boessenkool  <segher@kernel.crashing.org>
4736
4737         * combine (try_combine): Print the insns input to try_combine to the
4738         dump file.
4739
4740 2017-11-02  Steve Ellcey  <sellcey@cavium.com>
4741
4742         PR target/79868
4743         * config/aarch64/aarch64-c.c (aarch64_pragma_target_parse):
4744         Remove second argument from aarch64_process_target_attr call.
4745         * config/aarch64/aarch64-protos.h (aarch64_process_target_attr):
4746         Ditto.
4747         * config/aarch64/aarch64.c (aarch64_attribute_info): Change
4748         field type.
4749         (aarch64_handle_attr_arch): Remove second argument.
4750         (aarch64_handle_attr_cpu): Ditto.
4751         (aarch64_handle_attr_tune): Ditto.
4752         (aarch64_handle_attr_isa_flags): Ditto.
4753         (aarch64_process_one_target_attr): Ditto.
4754         (aarch64_process_target_attr): Ditto.
4755         (aarch64_option_valid_attribute_p): Remove second argument.
4756         on aarch64_process_target_attr call.
4757
4758 2017-11-02  David Malcolm  <dmalcolm@redhat.com>
4759
4760         * diagnostic.c: Include "selftest-diagnostic.h".
4761         (selftest::assert_location_text): New function.
4762         (selftest::test_diagnostic_get_location_text): New function.
4763         (selftest::diagnostic_c_tests): Call it.
4764
4765 2017-11-02  David Malcolm  <dmalcolm@redhat.com>
4766
4767         * Makefile.in (OBJS-libcommon): Add selftest-diagnostic.o.
4768         * diagnostic-show-locus.c: Include "selftest-diagnostic.h".
4769         (class selftest::test_diagnostic_context): Move to...
4770         * selftest-diagnostic.c: New file.
4771         * selftest-diagnostic.h: New file.
4772
4773 2017-11-02  James Bowman  <james.bowman@ftdichip.com>
4774
4775         * config/ft32/ft32.c (ft32_addr_space_legitimate_address_p): increase
4776         offset range for FT32B.
4777         * config/ft32/ft32.h: option "mcompress" enables relaxation.
4778         * config/ft32/ft32.md: Add TARGET_NOPM.
4779         * config/ft32/ft32.opt: Add mft32b, mcompress, mnopm.
4780         * gcc/doc/invoke.texi: Add mft32b, mcompress, mnopm.
4781
4782 2017-11-02  Wilco Dijkstra  <wdijkstr@arm.com>
4783
4784         * config/aarch64/aarch64.h (MALLOC_ABI_ALIGNMENT): New define.
4785
4786 2017-11-02  Jeff Law  <law@redhat.com>
4787
4788         * gimple-ssa-sprintf.c (sprintf_dom_walker): Remove
4789         virtual keyword on FINAL OVERRIDE members.
4790
4791         * tree-ssa-propagate.h (ssa_propagation_engine): Group
4792         virtuals together.  Add virtual destructor.
4793         (substitute_and_fold_engine): Similarly.
4794
4795 2017-11-02  Jan Hubicka  <hubicka@ucw.cz>
4796
4797         * x86-tune.def (X86_TUNE_USE_INCDEC): Enable for Haswell+.
4798
4799 2017-11-02  Richard Biener  <rguenther@suse.de>
4800
4801         PR tree-optimization/82795
4802         * tree-if-conv.c (predicate_mem_writes): Remove bogus assert.
4803
4804 2017-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4805
4806         * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Don't require
4807         gcc_SUN_LD_VERSION.
4808         (gcc_GAS_CHECK_FEATURE): Remove.
4809         * configure.ac (ld_vers) <*-*-solaris2*>: Move comments from
4810         gcc_AC_INITFINI_ARRAY here.  Update for Solaris 11.4 changes.
4811         * configure: Regenerate.
4812
4813 2017-11-02  Claudiu Zissulescu <claziss@synopsys.com>
4814
4815         * config/arc/arc.c (hwloop_optimize): Account for empty
4816         body loops.
4817
4818 2017-11-02  Richard Biener  <rguenther@suse.de>
4819
4820         PR middle-end/82765
4821         * varasm.c (decode_addr_const): Make offset HOST_WIDE_INT.
4822         Truncate ARRAY_REF index and element size.
4823
4824 2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
4825
4826         * doc/invoke.texi (RISC-V Options): Use "@minus{}2 GB", not "-2 GB".
4827
4828 2017-11-01  Jeff Law  <law@redhat.com>
4829
4830         * tree-ssa-ccp.c (ccp_folder): New class derived from
4831         substitute_and_fold_engine.
4832         (ccp_folder::get_value): New member function.
4833         (ccp_folder::fold_stmt): Renamed from ccp_fold_stmt.
4834         (ccp_fold_stmt): Remove prototype.
4835         (ccp_finalize): Call substitute_and_fold from the ccp_class.
4836         * tree-ssa-copy.c (copy_folder): New class derived from
4837         substitute_and_fold_engine.
4838         (copy_folder::get_value): Renamed from get_value.
4839         (fini_copy_prop): Call substitute_and_fold from copy_folder class.
4840         * tree-vrp.c (vrp_folder): New class derived from
4841         substitute_and_fold_engine.
4842         (vrp_folder::fold_stmt): Renamed from vrp_fold_stmt.
4843         (vrp_folder::get_value): New member function.
4844         (vrp_finalize): Call substitute_and_fold from vrp_folder class.
4845         (evrp_dom_walker::before_dom_children): Similarly for replace_uses_in.
4846         * tree-ssa-propagate.h (substitute_and_fold_engine): New class to
4847         provide a class interface to folder/substitute routines.
4848         (ssa_prop_fold_stmt_fn): Remove typedef.
4849         (ssa_prop_get_value_fn): Likewise.
4850         (subsitute_and_fold): Remove prototype.
4851         (replace_uses_in): Likewise.
4852         * tree-ssa-propagate.c (substitute_and_fold_engine::replace_uses_in):
4853         Renamed from replace_uses_in.  Call the virtual member function
4854         (substitute_and_fold_engine::replace_phi_args_in): Similarly.
4855         (substitute_and_fold_dom_walker): Remove initialization of
4856         data member entries for calbacks.  Add substitute_and_fold_engine
4857         member and initialize it.
4858         (substitute_and_fold_dom_walker::before_dom_children0: Use the
4859         member functions for get_value, replace_phi_args_in c
4860         replace_uses_in, and fold_stmt calls.
4861         (substitute_and_fold_engine::substitute_and_fold): Renamed from
4862         substitute_and_fold.  Remove assert.   Update ctor call.
4863
4864         * tree-ssa-propagate.h (ssa_prop_visit_stmt_fn): Remove typedef.
4865         (ssa_prop_visit_phi_fn): Likewise.
4866         (class ssa_propagation_engine): New class to provide an interface
4867         into ssa_propagate.
4868         * tree-ssa-propagate.c (ssa_prop_visit_stmt): Remove file scoped
4869         variable.
4870         (ssa_prop_visit_phi): Likewise.
4871         (ssa_propagation_engine::simulate_stmt): Moved into class.
4872         Call visit_phi/visit_stmt from the class rather than via
4873         file scoped static variables.
4874         (ssa_propagation_engine::simulate_block): Moved into class.
4875         (ssa_propagation_engine::process_ssa_edge_worklist): Similarly.
4876         (ssa_propagation_engine::ssa_propagate): Similarly.  No longer
4877         set file scoped statics for the visit_stmt/visit_phi callbacks.
4878         * tree-complex.c (complex_propagate): New class derived from
4879         ssa_propagation_engine.
4880         (complex_propagate::visit_stmt): Renamed from complex_visit_stmt.
4881         (complex_propagate::visit_phi): Renamed from complex_visit_phi.
4882         (tree_lower_complex): Call ssa_propagate via the complex_propagate
4883         class.
4884         * tree-ssa-ccp.c: (ccp_propagate): New class derived from
4885         ssa_propagation_engine.
4886         (ccp_propagate::visit_phi): Renamed from ccp_visit_phi_node.
4887         (ccp_propagate::visit_stmt): Renamed from ccp_visit_stmt.
4888         (do_ssa_ccp): Call ssa_propagate from the ccp_propagate class.
4889         * tree-ssa-copy.c (copy_prop): New class derived from
4890         ssa_propagation_engine.
4891         (copy_prop::visit_stmt): Renamed from copy_prop_visit_stmt.
4892         (copy_prop::visit_phi): Renamed from copy_prop_visit_phi_node.
4893         (execute_copy_prop): Call ssa_propagate from the copy_prop class.
4894         * tree-vrp.c (vrp_prop): New class derived from ssa_propagation_engine.
4895         (vrp_prop::visit_stmt): Renamed from vrp_visit_stmt.
4896         (vrp_prop::visit_phi): Renamed from vrp_visit_phi_node.
4897         (execute_vrp): Call ssa_propagate from the vrp_prop class.
4898
4899 2017-11-01  Jakub Jelinek  <jakub@redhat.com>
4900
4901         PR rtl-optimization/82778
4902         PR rtl-optimization/82597
4903         * compare-elim.c (struct comparison): Add in_a_setter field.
4904         (find_comparison_dom_walker::before_dom_children): Remove killed
4905         bitmap and df_simulate_find_defs call, instead walk the defs.
4906         Compute last_setter and initialize in_a_setter.  Merge definitions
4907         with first initialization for a few variables.
4908         (try_validate_parallel): Use insn_invalid_p instead of
4909         recog_memoized.  Return insn rather than just the pattern.
4910         (try_merge_compare): Fix up comment.  Don't uselessly test if
4911         in_a is a REG_P.  Use cmp->in_a_setter instead of walking UD
4912         chains.
4913         (execute_compare_elim_after_reload): Remove df_chain_add_problem
4914         call.
4915
4916 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
4917             Alan Hayward  <alan.hayward@arm.com>
4918             David Sherwood  <david.sherwood@arm.com>
4919
4920         * config/aarch64/aarch64.c (aarch64_rtx_costs): Use
4921         aarch64_hard_regno_nregs to get the number of registers
4922         in a mode.
4923
4924 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
4925             Alan Hayward  <alan.hayward@arm.com>
4926             David Sherwood  <david.sherwood@arm.com>
4927
4928         * config/aarch64/constraints.md (Upl): Rename to...
4929         (Uaa): ...this.
4930         * config/aarch64/aarch64.md
4931         (*zero_extend<SHORT:mode><GPI:mode>2_aarch64, *addsi3_aarch64_uxtw):
4932         Update accordingly.
4933
4934 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
4935             Alan Hayward  <alan.hayward@arm.com>
4936             David Sherwood  <david.sherwood@arm.com>
4937
4938         * config/aarch64/aarch64.c (aarch64_add_constant_internal)
4939         (aarch64_add_constant, aarch64_add_sp, aarch64_sub_sp): Move
4940         earlier in file.
4941
4942 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
4943             Alan Hayward  <alan.hayward@arm.com>
4944             David Sherwood  <david.sherwood@arm.com>
4945
4946         * config/aarch64/aarch64.c (aarch64_evpc_trn, aarch64_evpc_uzp)
4947         (aarch64_evpc_zip, aarch64_evpc_ext, aarch64_evpc_rev)
4948         (aarch64_evpc_dup): Generate rtl direcly, rather than using
4949         named expanders.
4950         (aarch64_expand_vec_perm_const_1): Explicitly check for permutes
4951         of a single element.
4952         * config/aarch64/iterators.md: Add a comment above the permute
4953         unspecs to say that they are generated directly by
4954         aarch64_expand_vec_perm_const.
4955         * config/aarch64/aarch64-simd.md: Likewise the permute instructions.
4956
4957 2017-11-01  Nathan Sidwell  <nathan@acm.org>
4958
4959         * tree-dump.c (dequeue_and_dump): Use HAS_DECL_ASSEMBLER_NAME_P.
4960
4961 2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
4962
4963         * doc/invoke.texi (RISC-V Options): Explicitly name the medlow
4964         and medany code models, and describe what they do.
4965
4966 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
4967
4968         Revert accidental duplicate:
4969
4970         * combine.c (can_change_dest_mode): Reject changes in
4971         REGMODE_NATURAL_SIZE.
4972
4973 2017-11-01  Segher Boessenkool  <segher@kernel.crashing.org>
4974
4975         PR rtl-optimization/64682
4976         PR rtl-optimization/69567
4977         PR rtl-optimization/69737
4978         PR rtl-optimization/82683
4979         * combine.c (distribute_notes) <REG_DEAD>: If the new I2 sets the same
4980         register mentioned in the note, drop the note, unless it came from I3,
4981         in which case it should go to I3 again.
4982
4983 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
4984
4985         * tree-ssa-dse.c (normalize_ref): Check whether the ranges overlap
4986         and return false if not.
4987         (clear_bytes_written_by, live_bytes_read): Update accordingly.
4988
4989 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
4990
4991         * tree-ssa-alias.h (ranges_overlap_p): Return false if either
4992         range is known to be empty.
4993
4994 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
4995             Alan Hayward  <alan.hayward@arm.com>
4996             David Sherwood  <david.sherwood@arm.com>
4997
4998         * simplify-rtx.c (simplify_const_unary_operation): Use GET_MODE_NUNITS
4999         and CONST_VECTOR_NUNITS instead of computing the number of units from
5000         the byte sizes of the vector and element.
5001         (simplify_binary_operation_1): Likewise.
5002         (simplify_const_binary_operation): Likewise.
5003         (simplify_ternary_operation): Likewise.
5004
5005 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
5006             Alan Hayward  <alan.hayward@arm.com>
5007             David Sherwood  <david.sherwood@arm.com>
5008
5009         * var-tracking.c (INT_MEM_OFFSET): Replace with...
5010         (int_mem_offset): ...this new function.
5011         (var_mem_set, var_mem_delete_and_set, var_mem_delete)
5012         (find_mem_expr_in_1pdv, dataflow_set_preserve_mem_locs)
5013         (same_variable_part_p, use_type, add_stores, vt_get_decl_and_offset):
5014         Update accordingly.
5015
5016 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
5017             Alan Hayward  <alan.hayward@arm.com>
5018             David Sherwood  <david.sherwood@arm.com>
5019
5020         * lower-subreg.c (interesting_mode_p): New function.
5021         (compute_costs, find_decomposable_subregs, decompose_register)
5022         (simplify_subreg_concatn, can_decompose_p, resolve_simple_move)
5023         (resolve_clobber, dump_choices): Use it.
5024
5025 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
5026             Alan Hayward  <alan.hayward@arm.com>
5027             David Sherwood  <david.sherwood@arm.com>
5028
5029         * rtlhash.c (add_rtx): Use add_hwi for 'w' and add_int for 'i'.
5030
5031 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
5032             Alan Hayward  <alan.hayward@arm.com>
5033             David Sherwood  <david.sherwood@arm.com>
5034
5035         * alias.c (find_base_value, find_base_term): Only process integer
5036         truncations.  Check the precision rather than the size.
5037
5038 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
5039             Alan Hayward  <alan.hayward@arm.com>
5040             David Sherwood  <david.sherwood@arm.com>
5041
5042         * machmode.h (is_narrower_int_mode): New function
5043         * optabs.c (expand_float, expand_fix): Use it.
5044         * dwarf2out.c (rotate_loc_descriptor): Likewise.
5045
5046 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
5047             Alan Hayward  <alan.hayward@arm.com>
5048             David Sherwood  <david.sherwood@arm.com>
5049
5050         * rtl.h (narrower_subreg_mode): New function.
5051         * ira-color.c (update_costs_from_allocno): Use it.
5052
5053 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
5054             Alan Hayward  <alan.hayward@arm.com>
5055             David Sherwood  <david.sherwood@arm.com>
5056
5057         * optabs-query.h (convert_optab_p): New function, split out from...
5058         (convert_optab_handler): ...here.
5059         (widening_optab_handler): Delete.
5060         (find_widening_optab_handler): Remove permit_non_widening parameter.
5061         (find_widening_optab_handler_and_mode): Likewise.  Provide an
5062         override that operates on mode class wrappers.
5063         * optabs-query.c (widening_optab_handler): Delete.
5064         (find_widening_optab_handler_and_mode): Remove permit_non_widening
5065         parameter.  Assert that the two modes are the same class and that
5066         the "from" mode is narrower than the "to" mode.  Use
5067         convert_optab_handler instead of widening_optab_handler.
5068         * expmed.c (expmed_mult_highpart_optab): Use convert_optab_handler
5069         instead of widening_optab_handler.
5070         * expr.c (expand_expr_real_2): Update calls to
5071         find_widening_optab_handler.
5072         * optabs.c (expand_widen_pattern_expr): Likewise.
5073         (expand_binop_directly): Take the insn_code as a parameter.
5074         (expand_binop): Only call find_widening_optab_handler for
5075         conversion optabs; use optab_handler otherwise.  Update calls
5076         to find_widening_optab_handler and expand_binop_directly.
5077         Use convert_optab_handler instead of widening_optab_handler.
5078         * tree-ssa-math-opts.c (convert_mult_to_widen): Update calls to
5079         find_widening_optab_handler and use scalar_mode rather than
5080         machine_mode.
5081         (convert_plusminus_to_widen): Likewise.
5082
5083 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
5084             Alan Hayward  <alan.hayward@arm.com>
5085             David Sherwood  <david.sherwood@arm.com>
5086
5087         * machmode.h (fixed_size_mode): New class.
5088         * rtl.h (get_pool_mode): Return fixed_size_mode.
5089         * gengtype.c (main): Add fixed_size_mode.
5090         * target.def (get_raw_result_mode): Return a fixed_size_mode.
5091         (get_raw_arg_mode): Likewise.
5092         * doc/tm.texi: Regenerate.
5093         * targhooks.h (default_get_reg_raw_mode): Return a fixed_size_mode.
5094         * targhooks.c (default_get_reg_raw_mode): Likewise.
5095         * config/ia64/ia64.c (ia64_get_reg_raw_mode): Likewise.
5096         * config/mips/mips.c (mips_get_reg_raw_mode): Likewise.
5097         * config/msp430/msp430.c (msp430_get_raw_arg_mode): Likewise.
5098         (msp430_get_raw_result_mode): Likewise.
5099         * config/avr/avr-protos.h (regmask): Use as_a <fixed_side_mode>
5100         * dbxout.c (dbxout_parms): Require fixed-size modes.
5101         * expr.c (copy_blkmode_from_reg, copy_blkmode_to_reg): Likewise.
5102         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
5103         * omp-low.c (lower_oacc_reductions): Likewise.
5104         * simplify-rtx.c (simplify_immed_subreg): Take fixed_size_modes.
5105         (simplify_subreg): Update accordingly.
5106         * varasm.c (constant_descriptor_rtx::mode): Change to fixed_size_mode.
5107         (force_const_mem): Update accordingly.  Return NULL_RTX for modes
5108         that aren't fixed-size.
5109         (get_pool_mode): Return a fixed_size_mode.
5110         (output_constant_pool_2): Take a fixed_size_mode.
5111
5112 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
5113             Alan Hayward  <alan.hayward@arm.com>
5114             David Sherwood  <david.sherwood@arm.com>
5115
5116         * doc/rtl.texi (vec_series): Document.
5117         (const): Say that the operand can be a vec_series.
5118         * rtl.def (VEC_SERIES): New rtx code.
5119         * rtl.h (const_vec_series_p_1): Declare.
5120         (const_vec_series_p): New function.
5121         * emit-rtl.h (gen_const_vec_series): Declare.
5122         (gen_vec_series): Likewise.
5123         * emit-rtl.c (const_vec_series_p_1, gen_const_vec_series)
5124         (gen_vec_series): Likewise.
5125         * optabs.c (expand_mult_highpart): Use gen_const_vec_series.
5126         * simplify-rtx.c (simplify_unary_operation): Handle negations
5127         of vector series.
5128         (simplify_binary_operation_series): New function.
5129         (simplify_binary_operation_1): Use it.  Handle VEC_SERIES.
5130         (test_vector_ops_series): New function.
5131         (test_vector_ops): Call it.
5132         * config/powerpcspe/altivec.md (altivec_lvsl): Use
5133         gen_const_vec_series.
5134         (altivec_lvsr): Likewise.
5135         * config/rs6000/altivec.md (altivec_lvsl, altivec_lvsr): Likewise.
5136
5137 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
5138             Alan Hayward  <alan.hayward@arm.com>
5139             David Sherwood  <david.sherwood@arm.com>
5140
5141         * doc/rtl.texi (const): Update description of address constants.
5142         Say that vector constants are allowed too.
5143         * common.md (E, F): Use CONSTANT_P instead of checking for
5144         CONST_VECTOR.
5145         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
5146         checking for CONST_VECTOR.
5147         * expmed.c (make_tree): Use build_vector_from_val for a CONST
5148         VEC_DUPLICATE.
5149         * expr.c (expand_expr_real_2): Check for vector modes instead
5150         of checking for CONST_VECTOR.
5151         * rtl.h (const_vec_p): New function.
5152         (const_vec_duplicate_p): Check for a CONST VEC_DUPLICATE.
5153         (unwrap_const_vec_duplicate): Handle them here too.
5154
5155 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
5156             David Malcolm  <dmalcolm@redhat.com>
5157             Alan Hayward  <alan.hayward@arm.com>
5158             David Sherwood  <david.sherwood@arm.com>
5159
5160         * rtl.h (vec_duplicate_p): New function.
5161         * selftest-rtl.c (assert_rtx_eq_at): New function.
5162         * selftest-rtl.h (ASSERT_RTX_EQ): New macro.
5163         (assert_rtx_eq_at): Declare.
5164         * selftest.h (selftest::simplify_rtx_c_tests): Declare.
5165         * selftest-run-tests.c (selftest::run_tests): Call it.
5166         * simplify-rtx.c: Include selftest.h and selftest-rtl.h.
5167         (simplify_unary_operation_1): Recursively handle vector duplicates.
5168         (simplify_binary_operation_1): Likewise.  Handle VEC_SELECTs of
5169         vector duplicates.
5170         (simplify_subreg): Handle subregs of vector duplicates.
5171         (make_test_reg, test_vector_ops_duplicate, test_vector_ops)
5172         (selftest::simplify_rtx_c_tests): New functions.
5173
5174 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
5175             Alan Hayward  <alan.hayward@arm.com>
5176             David Sherwood  <david.sherwood@arm.com>
5177
5178         * emit-rtl.h (gen_const_vec_duplicate): Declare.
5179         (gen_vec_duplicate): Likewise.
5180         * emit-rtl.c (gen_const_vec_duplicate_1): New function, split
5181         out from...
5182         (gen_const_vector): ...here.
5183         (gen_const_vec_duplicate, gen_vec_duplicate): New functions.
5184         (gen_rtx_CONST_VECTOR): Use gen_const_vec_duplicate for constants
5185         whose elements are all equal.
5186         * optabs.c (expand_vector_broadcast): Use gen_const_vec_duplicate.
5187         * simplify-rtx.c (simplify_const_unary_operation): Likewise.
5188         (simplify_relational_operation): Likewise.
5189         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
5190         Likewise.
5191         (aarch64_simd_dup_constant): Use gen_vec_duplicate.
5192         (aarch64_expand_vector_init): Likewise.
5193         * config/arm/arm.c (neon_vdup_constant): Likewise.
5194         (neon_expand_vector_init): Likewise.
5195         (arm_expand_vec_perm): Use gen_const_vec_duplicate.
5196         (arm_block_set_unaligned_vect): Likewise.
5197         (arm_block_set_aligned_vect): Likewise.
5198         * config/arm/neon.md (neon_copysignf<mode>): Likewise.
5199         * config/i386/i386.c (ix86_expand_vec_perm): Likewise.
5200         (expand_vec_perm_even_odd_pack): Likewise.
5201         (ix86_vector_duplicate_value): Use gen_vec_duplicate.
5202         * config/i386/sse.md (one_cmpl<mode>2): Use CONSTM1_RTX.
5203         * config/ia64/ia64.c (ia64_expand_vecint_compare): Use
5204         gen_const_vec_duplicate.
5205         * config/ia64/vect.md (addv2sf3, subv2sf3): Use CONST1_RTX.
5206         * config/mips/mips.c (mips_gen_const_int_vector): Use
5207         gen_const_vec_duplicate.
5208         (mips_expand_vector_init): Use CONST0_RTX.
5209         * config/powerpcspe/altivec.md (abs<mode>2, nabs<mode>2): Likewise.
5210         (define_split): Use gen_const_vec_duplicate.
5211         * config/rs6000/altivec.md (abs<mode>2, nabs<mode>2): Use CONST0_RTX.
5212         (define_split): Use gen_const_vec_duplicate.
5213         * config/s390/vx-builtins.md (vec_genmask<mode>): Likewise.
5214         (vec_ctd_s64, vec_ctd_u64, vec_ctsl, vec_ctul): Likewise.
5215         * config/spu/spu.c (spu_const): Likewise.
5216
5217 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
5218             Alan Hayward  <alan.hayward@arm.com>
5219             David Sherwood  <david.sherwood@arm.com>
5220
5221         * combine.c (can_change_dest_mode): Reject changes in
5222         REGMODE_NATURAL_SIZE.
5223
5224 2017-10-31  Sandra Loosemore  <sandra@codesourcery.com>
5225
5226         * configure.ac (--enable-libssp): New.
5227         (gcc_cv_libc_provides_ssp): Check for explicit setting before
5228         trying to determine target-specific default.  Adjust indentation.
5229         * configure: Regenerated.
5230         * doc/install.texi (Configuration): Expand --disable-libssp
5231         documentation.
5232
5233 2017-10-31  Daniel Santos  <daniel.santos@pobox.com>
5234
5235         config/i386/i386.c (ix86_expand_epilogue): Correct stack
5236         calculation.
5237
5238 2017-10-31  Martin Jambor  <mjambor@suse.cz>
5239
5240         PR c++/81702
5241         * gimple-fold.c (gimple_get_virt_method_for_vtable): Remove assert.
5242
5243 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
5244
5245         * auto-profile.c (autofdo_source_profile::read): Use
5246         UNKNOWN_LOCATION rather than 0.
5247         * diagnostic-core.h (warning_at_rich_loc): Rename to...
5248         (warning_at): ...this overload.
5249         (warning_at_rich_loc_n): Rename to...
5250         (warning_n): ...this overload.
5251         (error_at_rich_loc): Rename to...
5252         (error_at): ...this overload.
5253         (pedwarn_at_rich_loc): Rename to...
5254         (pedwarn): ...this overload.
5255         (permerror_at_rich_loc): Rename to...
5256         (permerror): ...this overload.
5257         (inform_at_rich_loc): Rename to...
5258         (inform): ...this overload.
5259         * diagnostic.c: (diagnostic_n_impl): Delete location_t-based decl.
5260         (diagnostic_n_impl_richloc): Rename to...
5261         (diagnostic_n_impl): ...this rich_location *-based decl.
5262         (inform_at_rich_loc): Rename to...
5263         (inform): ...this, and add an assertion.
5264         (inform_n): Update for removal of location_t-based diagnostic_n_impl.
5265         (warning_at_rich_loc): Rename to...
5266         (warning_at): ...this, and add an assertion.
5267         (warning_at_rich_loc_n): Rename to...
5268         (warning_n): ...this, and add an assertion.
5269         (warning_n): Update location_t-based implementation for removal of
5270         location_t-based diagnostic_n_impl.
5271         (pedwarn_at_rich_loc): Rename to...
5272         (pedwarn): ...this, and add an assertion.
5273         (permerror_at_rich_loc): Rename to...
5274         (permerror): ...this, and add an assertion.
5275         (error_n): Update for removal of location_t-based diagnostic_n_impl.
5276         (error_at_rich_loc): Rename to...
5277         (error_at): ...this, and add an assertion.
5278         * gcc.c (do_spec_1): Use UNKNOWN_LOCATION rather than 0.
5279         (driver::do_spec_on_infiles): Likewise.
5280         * substring-locations.c (format_warning_va): Update for renaming
5281         of inform_at_rich_loc.
5282
5283 2017-10-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
5284
5285         * builtins.def (DEF_FLOATN_BUILTIN): Change most _Float<N> and
5286         _Float<N>X built-in functions so that the variant without the
5287         "__builtin_" prefix is only enabled for the GNU C and Objective C
5288         languages when they are in non-strict ANSI/ISO mode.
5289         (DEF_EXT_LIB_FLOATN_NX_BUILTINS): Likewise.
5290         * target.def (floatn_builtin_p): Add a target hook to control
5291         whether _Float<N> and _Float<N>X built-in functions without the
5292         "__builtin_" prefix are enabled, and return true for C and
5293         Objective C in the default hook.  Include langhooks.h in
5294         targhooks.c.
5295         * targhooks.h (default_floatn_builtin_p): Likewise.
5296         * targhooks.c (default_floatn_builtin_p): Likewise.
5297         * doc/tm.texi.in (TARGET_FLOATN_BUILTIN_P): Document the
5298         floatn_builtin_p target hook.
5299         * doc/tm.texi (TARGET_FLOATN_BUILTIN_P): Likewise.
5300
5301 2017-10-31  Matthew Fortune  <matthew.fortune@imgtec.com>
5302             Eric Botcazou  <ebotcazou@adacore.com>
5303
5304         PR rtl-optimization/81803
5305         * lra-constraints.c (curr_insn_transform): Also reload the whole
5306         register for a strict subreg no wider than a word if this is for
5307         a WORD_REGISTER_OPERATIONS target.
5308
5309 2017-10-31  Jason Merrill  <jason@redhat.com>
5310
5311         * gdbinit.in: Skip over inlines from timevar.h.
5312
5313 2017-10-31  Martin Liska  <mliska@suse.cz>
5314
5315         * doc/gcov.texi: Document new option.
5316         * gcov.c (print_usage): Likewise print it.
5317         (process_args): Support the argument.
5318         (format_count): New function.
5319         (format_gcov): Use the function.
5320
5321 2017-10-31  Martin Liska  <mliska@suse.cz>
5322
5323         * gcov.c (struct name_map): do not use typedef.
5324         Define operator== and operator<.
5325         (name_search): Remove.
5326         (name_sort): Remove.
5327         (main): Do not allocate names.
5328         (process_file): Add vertical space.
5329         (generate_results): Use std::find.
5330         (release_structures): Do not release memory.
5331         (find_source): Use std::find.
5332
5333 2017-10-31  Martin Liska  <mliska@suse.cz>
5334
5335         * gcov.c (struct line_info): Remove it's typedef.
5336         (line_info::line_info): Add proper ctor.
5337         (line_info::has_block): Do not use a typedef.
5338         (struct source_info): Do not use typedef.
5339         (circuit): Likewise.
5340         (get_cycles_count): Likewise.
5341         (output_intermediate_file): Iterate via vector iterator.
5342         (add_line_counts): Use std::vector methods.
5343         (accumulate_line_counts): Likewise.
5344         (output_lines): Likewise.
5345
5346 2017-10-31  Martin Liska  <mliska@suse.cz>
5347
5348         * gcov.c (struct source_info): Remove typedef.
5349         (source_info::source_info): Add proper ctor.
5350         (accumulate_line_counts): Use struct, not it's typedef.
5351         (output_gcov_file): Likewise.
5352         (output_lines): Likewise.
5353         (main): Do not allocate an array.
5354         (output_intermediate_file): Use size of vector container.
5355         (process_file): Resize the vector.
5356         (generate_results): Do not preallocate, use newly added vector
5357         lines.
5358         (release_structures): Do not release sources.
5359         (find_source): Use vector methods.
5360         (add_line_counts): Do not use typedef.
5361
5362 2017-10-31  Martin Liska  <mliska@suse.cz>
5363
5364         * doc/gcov.texi: Document that.
5365         * gcov.c (add_line_counts): Mark lines with a non-executed
5366         statement.
5367         (output_line_beginning): Handle such lines.
5368         (output_lines): Pass new argument.
5369         (output_intermediate_file): Print it in intermediate format.
5370
5371 2017-10-31  Martin Liska  <mliska@suse.cz>
5372
5373         * color-macros.h: New file.
5374         * diagnostic-color.c: Factor out color related to macros to
5375         color-macros.h.
5376         * doc/gcov.texi: Document -k option.
5377         * gcov.c (INCLUDE_STRING): Include string.h.
5378         (print_usage): Add -k option.
5379         (process_args): Parse it.
5380         (pad_count_string): New function.
5381         (output_line_beginning): Likewise.
5382         (DEFAULT_LINE_START): New macro.
5383         (output_lines): Support color output.
5384
5385 2017-10-31  Martin Liska  <mliska@suse.cz>
5386
5387         PR gcov-profile/82633
5388         * doc/gcov.texi: Document -fkeep-{static,inline}-functions and
5389         their interaction with GCOV infrastructure.
5390         * configure.ac: Add -fkeep-{inline,static}-functions to
5391         coverage_flags.
5392         * configure: Regenerate.
5393
5394 2017-10-31  Uros Bizjak  <ubizjak@gmail.com>
5395
5396         PR target/82772
5397         * config/alpha/sync.md (fetchop_constr) <and>: Change to "rINM".
5398
5399 2017-10-31  Segher Boessenkool  <segher@kernel.crashing.org>
5400
5401         PR target/82674
5402         * config/rs6000/rs6000.md (allocate_stack): Force update interval
5403         into a register if it does not fit into an immediate offset field.
5404
5405 2017-10-31  Olivier Hainque  <hainque@adacore.com>
5406
5407         * gcc/Makefile.in (FLAGS_TO_PASS): Pass libsubdir as well.
5408
5409 2017-10-31  Julia Koval  <julia.koval@intel.com>
5410
5411         * config.gcc: Add gfniintrin.h.
5412         * config/i386/gfniintrin.h: New.
5413         * config/i386/i386-builtin-types.def
5414         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
5415         __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
5416         __builtin_ia32_vgf2p8affineinvqb_v32qi,
5417         __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
5418         __builtin_ia32_vgf2p8affineinvqb_v16qi,
5419         __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): New builtins.
5420         * config/i386/i386-builtin.def (V64QI_FTYPE_V64QI_V64QI_INT_V64QI_UDI,
5421         V32QI_FTYPE_V32QI_V32QI_INT_V32QI_USI,
5422         V16QI_FTYPE_V16QI_V16QI_INT_V16QI_UHI,
5423         V64QI_FTYPE_V64QI_V64QI_INT): New types.
5424         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
5425         * config/i386/immintrin.h: Include gfniintrin.h.
5426         * config/i386/sse.md (vgf2p8affineinvqb_*) New pattern.
5427
5428 2017-10-30  Eric Botcazou  <ebotcazou@adacore.com>
5429
5430         * gcc.c (HAVE_TARGET_EXECUTABLE_SUFFIX): Remove old kludge.
5431
5432 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
5433
5434         * config/arm/arm.md (ashldi3): Remove shift by 1 expansion.
5435         (arm_ashldi3_1bit): Remove pattern.
5436         (ashrdi3): Remove shift by 1 expansion.
5437         (arm_ashrdi3_1bit): Remove pattern.
5438         (lshrdi3): Remove shift by 1 expansion.
5439         (arm_lshrdi3_1bit): Remove pattern.
5440         * config/arm/arm.c (arm_rtx_costs_internal): Slightly increase
5441         cost of ashldi3 by 1.
5442         * config/arm/neon.md (ashldi3_neon): Remove shift by 1 expansion.
5443         (<shift>di3_neon): Likewise.
5444
5445 2017-10-30  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>
5446
5447         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov): Rename
5448         both identically named patterns to (*aarch64_simd_mov<VD:mode>)
5449         and (*aarch64_simd_mov<VQ:mode>).
5450         (*aarch64_simd_mov<VD:mode>): Change type attribute to match
5451         pattern alternative.
5452         (*aarch64_simd_mov<VQ:mode>): Re-order and change type
5453         attributes to match pattern alternative.
5454
5455 2017-10-30  Steven Munroe  <munroesj@gcc.gnu.org>
5456
5457         * config.gcc (powerpc*-*-*): Add emmintrin.h.
5458         * config/rs6000/emmintrin.h: New file.
5459         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include emmintrin.h.
5460
5461 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
5462
5463         * config/arm/vfp.md (movdi_vfp): Merge changes from movdi_vfp_cortexa8.
5464         * (movdi_vfp_cortexa8): Remove pattern.
5465
5466 2017-10-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5467
5468         * doc/install.texi (Specific, alpha*-*-*): Remove DEC OSF/1
5469         etc. reference.
5470         (Specific, alpha*-dec-osf5.1): Remove.
5471         (Specific, mips-sgi-irix5): Remove.
5472         (Specific, mips-sgi-irix6): Remove.
5473
5474 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
5475
5476         PR middle-end/22141
5477         * gimple-ssa-store-merging.c (merged_store_group::apply_stores): Fix
5478         arguments to clear_bit_region_be.
5479
5480 2017-10-30  Jim Wilson  <wilson@tuliptree.org>
5481
5482         * gimplify.c: Include memmodel.h.
5483
5484 2017-10-30  Martin Jambor  <mjambor@suse.cz>
5485
5486         * omp-grid.c (grid_attempt_target_gridification): Also insert a
5487         condition whether loop should be executed at all.
5488
5489 2017-10-30  Will Schmidt  <will_schmidt@vnet.ibm.com>
5490
5491         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
5492         gimple folding of vec_madd() intrinsics.
5493         * config/rs6000/altivec.md (mulv8hi3): Rename altivec_vmladduhm to
5494         fmav8hi4.  (altivec_vmladduhm): Rename to fmav8hi4.
5495         * config/rs6000/rs6000-builtin.def: Rename vmladduhm to fmav8hi4
5496
5497 2017-10-30  Richard Biener  <rguenther@suse.de>
5498
5499         PR tree-optimization/82762
5500         Revert
5501         2017-10-23  Richard Biener  <rguenther@suse.de>
5502
5503         PR tree-optimization/82129
5504         Revert
5505         2017-08-01  Richard Biener  <rguenther@suse.de>
5506
5507         PR tree-optimization/81181
5508         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
5509         (compute_antic): ... end of iteration here.
5510
5511 2017-10-30  Joseph Myers  <joseph@codesourcery.com>
5512
5513         * doc/invoke.texi (C Dialect Options): Document -std=c17,
5514         -std=iso9899:2017 and -std=gnu17.
5515         * doc/standards.texi (C Language): Document C17 support.
5516         * doc/cpp.texi (Overview): Mention -std=c17.
5517         (Standard Predefined Macros): Document C11 and C17 values of
5518         __STDC_VERSION__.  Do not refer to C99 support as incomplete.
5519         * doc/extend.texi (Inline): Do not list individual options for
5520         standards newer than C99.
5521         * dwarf2out.c (highest_c_language, gen_compile_unit_die): Handle
5522         "GNU C17".
5523         * config/rl78/rl78.c (rl78_option_override): Handle "GNU C17"
5524         language name.
5525
5526 2017-10-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
5527
5528         * asan.c (asan_finish_file): Align asan globals array by shadow
5529         granularity.
5530
5531 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
5532
5533         PR middle-end/22141
5534         * gimple-ssa-store-merging.c: Include rtl.h and expr.h.
5535         (struct store_immediate_info): Add bitregion_start and bitregion_end
5536         fields.
5537         (store_immediate_info::store_immediate_info): Add brs and bre
5538         arguments and initialize bitregion_{start,end} from those.
5539         (struct merged_store_group): Add bitregion_start, bitregion_end,
5540         align_base and mask fields.  Drop unnecessary struct keyword from
5541         struct store_immediate_info.  Add do_merge method.
5542         (clear_bit_region_be): Use memset instead of loop storing zeros.
5543         (merged_store_group::do_merge): New method.
5544         (merged_store_group::merge_into): Use do_merge.  Allow gaps in between
5545         stores as long as the surrounding bitregions have no gaps.
5546         (merged_store_group::merge_overlapping): Use do_merge.
5547         (merged_store_group::apply_stores): Test that bitregion_{start,end}
5548         is byte aligned, rather than requiring that start and width are
5549         byte aligned.  Drop unnecessary struct keyword from
5550         struct store_immediate_info.  Allocate and populate also mask array.
5551         Make start of the arrays relative to bitregion_start rather than
5552         start and size them according to bitregion_{end,start} difference.
5553         (struct imm_store_chain_info): Drop unnecessary struct keyword from
5554         struct store_immediate_info.
5555         (pass_store_merging::gate): Punt if BITS_PER_UNIT or CHAR_BIT is not 8.
5556         (pass_store_merging::terminate_all_aliasing_chains): Drop unnecessary
5557         struct keyword from struct store_immediate_info.
5558         (imm_store_chain_info::coalesce_immediate_stores): Allow gaps in
5559         between stores as long as the surrounding bitregions have no gaps.
5560         Formatting fixes.
5561         (struct split_store): Add orig non-static data member.
5562         (split_store::split_store): Initialize orig to false.
5563         (find_constituent_stmts): Return store_immediate_info *, non-NULL
5564         if there is exactly a single original stmt.  Change stmts argument
5565         to pointer from reference, if NULL, don't push anything to it.  Add
5566         first argument, use it to optimize skipping over orig stmts that
5567         are known to be before bitpos already.  Simplify.
5568         (split_group): Return unsigned int count how many stores are or
5569         would be needed rather than a bool.  Add allow_unaligned argument.
5570         Change split_stores argument from reference to pointer, if NULL,
5571         only do a dry run computing how many stores would be produced.
5572         Rewritten algorithm to use both alignment and misalign if
5573         !allow_unaligned and handle bitfield stores with gaps.
5574         (imm_store_chain_info::output_merged_store): Set start_byte_pos
5575         from bitregion_start instead of start.  Compute allow_unaligned
5576         here, if true, do 2 split_group dry runs to compute which one
5577         produces fewer stores and prefer aligned if equal.  Punt if
5578         new count is bigger or equal than original before emitting any
5579         statements, rather than during that.  Remove no longer needed
5580         new_ssa_names tracking.  Replace num_stmts with
5581         split_stores.length ().  Use 32-bit stack allocated entries
5582         in split_stores auto_vec.  Try to reuse original store lhs/rhs1
5583         if possible.  Handle bitfields with gaps.
5584         (pass_store_merging::execute): Ignore bitsize == 0 stores.
5585         Compute bitregion_{start,end} for the stores and construct
5586         store_immediate_info with that.  Formatting fixes.
5587
5588 2017-10-30  Uros Bizjak  <ubizjak@gmail.com>
5589
5590         PR target/82725
5591         * config/i386/i386.c (legitimate_pic_address_disp_p): Allow
5592         UNSPEC_DTPOFF and UNSPEC_NTPOFF with SImode immediate offset.
5593
5594 2017-10-29  Jim Wilson  <wilson@tuliptree.org>
5595
5596         * gimplify.c: Include tm_p.h.
5597
5598         * common.opt (gcoff): Re-add as ignored option.
5599         (gcoff1, gcoff2, gcoff3): Likewise.
5600
5601         * Makefile.in (OBJS): Delete sdbout.o.
5602         (GTFILES): Delete $(srcdir)/sdbout.c.
5603         * debug.h: Delete sdb_debug_hooks.
5604         * final.c: Delete sdbout.h include.
5605         (final_scan_insn): Delete SDB_DEBUG check.
5606         (rest_of_clean_state): Likewise.
5607         * output.h: Delete sdb_begin_function_line.
5608         * sdbout.c: Delete.
5609         * sdbout.h: Delete.
5610         * toplev.c: Delete sdbout.h include.
5611         (process_options): Delete SDB_DEBUG check.
5612         * tree-core.h (tree_type_common): Delete pointer field of
5613         tree_type_symtab.
5614         * tree.c (copy_node): Clear TYPE_SYMTAB_DIE instead of
5615         TYPE_SYMTAB_POINTER.
5616         * tree.h (TYPE_SYMTAB_POINTER): Delete.
5617         (TYPE_SYMTAB_IS_POINTER): Delete.
5618         (TYPE_SYMTAB_IS_DIE): Renumber.
5619         * xcoffout.c: Refer to former sdbout.c file.
5620         (xcoffout_begin_prologue): Use past tense for sdbout.c reference.
5621
5622         * doc/install.texi (--with-stabs): Delete COFF and ECOFF info.
5623         * doc/invoke.texi (SEEALSO): Delete adb and sdb references.
5624         (Debugging Options): Delete -gcoff.
5625         (-gstabs): Delete SDB reference.
5626         (-gcoff): Delete.
5627         (-gcoff@var{level}): Delete.
5628         * doc/passes.texi (Debugging information output): Delete SDB and
5629         sdbout.c references.
5630         * doc/tm.texi: Regenerate.
5631         * doc/tm.texi.in (DWARF_CIE_DATA_ALIGNMENT): Delete SDB from xref.
5632         (SDB and DWARF): Change node name to DWARF and delete SDB and COFF
5633         references.
5634         (DEBUGGER_AUTO_OFFSET): Delete COFF and SDB references.
5635         (PREFERRED_DEBUGGING_TYPE): Delete SDB_DEBUG and -gcoff references.
5636         (SDB_DEBUGGING_INFO): Delete.
5637         (PUT_SDB_@dots{}, SDB_DELIM, SDB_ALLOW_UNKNOWN_REFERENCES)
5638         SDB_ALLOW_FORWARD_REFERENCES, SDB_OUTPUT_SOURCE_LINE): Delete.
5639         * target.def (output_source_filename): Delete COFF reference.
5640
5641         * common.opt (gcoff): Delete.
5642         (gxcoff+): Update Negative chain.
5643         * defaults.h: Delete all references to SDB_DEBUGGING_INFO and
5644         SDB_DEBUG.
5645         * dwarf2out.c (gen_array_type_die): Change SDB to debuggers.
5646         * flag-types.h (enum debug_info_type): Delete SDB_DEBUG.
5647         * function.c (number_blocks): Delete SDB_DEBUGGING_INFO, SDB_DEBUG,
5648         and SDB references.
5649         (expand_function_start): Change sdb reference to past tense.
5650         (expand_function_end): Change sdb reference to past tense.
5651         * gcc.c (cpp_unique_options): Delete gcoff3 reference.
5652         * opts.c (debug_type_names): Delete coff entry.
5653         (common_handle_option): Delete OPT_gcoff case.
5654         * system.h (SDB_DEBUG, SDB_DEBUGGING_INFO): Poison.
5655
5656         * config/dbxcoff.h (PREFERRED_DEBUGGING_TYPE): Set to DBX_DEBUG.
5657         * config/cris/cris.h: Delete SDB reference in comment.
5658         * config/i386/cygming.h: Don't define SDB_DEBUGGING_INFO.
5659         (ASM_DECLARE_FUNCTION_NAME): Delete SDB reference from comment.
5660         * config/i386/gas.h: Don't define SDB_DEBUGGING_INFO.
5661         * config/i386/i386.c (svr4_dbx_register_map): Change SDB references
5662         to past tense.
5663         (ix86_expand_prologue): Likewise.
5664         * config/i386/winnt.c (i386_pe_start_function): Don't check SDB_DEBUG.
5665         * config/ia64/ia64.h: Likewise.
5666         * config/m68k/m68kelf.h (DBX_REGISTER_NUMBER): Delete SDB reference.
5667         * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Delete gcoff*
5668         support.
5669         * config/mmix/mmix.h: Likewise.
5670         * config/nds32/nds32.c: Likewise.
5671         * config/stormy/storym16.h: Likewise.
5672         * config/visium/visium.h: Likewise.
5673         * config/vx-common.h (SDB_DEBUGGING_INFO): Delete undef.
5674
5675 2017-10-28  Sandra Loosemore  <sandra@codesourcery.com>
5676
5677         * config/nios2/nios2.h (FRAME_GROWS_DOWNWARD): Define to 1.
5678         * config/nios2/nios2.c (nios2_initial_elimination_offset):  Make
5679         FRAME_POINTER_REGNUM point at high end of local var area.
5680
5681 2017-10-27  Eric Botcazou  <ebotcazou@adacore.com>
5682
5683         * bb-reorder.c (find_traces_1_round): Fix off-by-one index.
5684         Move comment around.  Do not reset best_edge for a copiable
5685         destination if the copy would cause a partition change.
5686         (better_edge_p): Remove redundant check.
5687
5688 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
5689
5690         * config/i386/i386-protos.h (ix86_fp_compare_mode): Remove prototype.
5691
5692 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
5693
5694         * builtins.c (CASE_MATHFN_FLOATN): New helper macro to add cases
5695         for math functions that have _Float<N> and _Float<N>X variants.
5696         (mathfn_built_in_2): Add support for math functions that have
5697         _Float<N> and _Float<N>X variants.
5698         (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro.
5699         (expand_builtin_mathfn_ternary): Add support for fma with
5700         _Float<N> and _Float<N>X variants.
5701         (expand_builtin): Likewise.
5702         (fold_builtin_3): Likewise.
5703         * builtins.def (DEF_EXT_LIB_FLOATN_NX_BUILTINS): New macro to
5704         create math function _Float<N> and _Float<N>X variants as external
5705         library builtins.
5706         (BUILT_IN_COPYSIGN _Float<N> and _Float<N>X variants) Use
5707         DEF_EXT_LIB_FLOATN_NX_BUILTINS to make built-in functions using
5708         the __builtin_ prefix and if not strict ansi, without the prefix.
5709         (BUILT_IN_FABS _Float<N> and _Float<N>X variants): Likewise.
5710         (BUILT_IN_FMA _Float<N> and _Float<N>X variants): Likewise.
5711         (BUILT_IN_FMAX _Float<N> and _Float<N>X variants): Likewise.
5712         (BUILT_IN_FMIN _Float<N> and _Float<N>X variants): Likewise.
5713         (BUILT_IN_NAN _Float<N> and _Float<N>X variants): Likewise.
5714         (BUILT_IN_SQRT _Float<N> and _Float<N>X variants): Likewise.
5715         * builtin-types.def (BT_FN_FLOAT16_FLOAT16_FLOAT16_FLOAT16): New
5716         function signatures for fma _Float<N> and _Float<N>X variants.
5717         (BT_FN_FLOAT32_FLOAT32_FLOAT32_FLOAT32): Likewise.
5718         (BT_FN_FLOAT64_FLOAT64_FLOAT64_FLOAT64): Likewise.
5719         (BT_FN_FLOAT128_FLOAT128_FLOAT128_FLOAT128): Likewise.
5720         (BT_FN_FLOAT32X_FLOAT32X_FLOAT32X_FLOAT32X): Likewise.
5721         (BT_FN_FLOAT64X_FLOAT64X_FLOAT64X_FLOAT64X): Likewise.
5722         (BT_FN_FLOAT128X_FLOAT128X_FLOAT128X_FLOAT128X): Likewise.
5723         * gencfn-macros.c (print_case_cfn): Add support for math functions
5724         that have _Float<N> and _Float<N>X variants.
5725         (print_define_operator_list): Likewise.
5726         (fltfn_suffixes): Likewise.
5727         (main): Likewise.
5728         * internal-fn.def (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro
5729         for math functions that have _Float<N> and _Float<N>X variants.
5730         (SQRT): Add support for sqrt, copysign, fmin and fmax _Float<N>
5731         and _Float<N>X variants.
5732         (COPYSIGN): Likewise.
5733         (FMIN): Likewise.
5734         (FMAX): Likewise.
5735         * fold-const.c (tree_call_nonnegative_warnv_p): Add support for
5736         copysign, fma, fmax, fmin, and sqrt _Float<N> and _Float<N>X
5737         variants.
5738         (integer_valued_read_call_p): Likewise.
5739         * fold-const-call.c (fold_const_call_ss): Likewise.
5740         (fold_const_call_sss): Add support for copysign, fmin, and fmax
5741         _Float<N> and _Float<N>X variants.
5742         (fold_const_call_ssss): Add support for fma _Float<N> and
5743         _Float<N>X variants.
5744         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Add
5745         support for copysign and fma _Float<N> and _Float<N>X variants.
5746         (backprop::process_builtin_call_use): Likewise.
5747         * tree-call-cdce.c (can_test_argument_range); Add support for
5748         sqrt _Float<N> and _Float<N>X variants.
5749         (edom_only_function): Likewise.
5750         (get_no_error_domain): Likewise.
5751         * tree-ssa-math-opts.c (internal_fn_reciprocal): Likewise.
5752         * tree-ssa-reassoc.c (attempt_builtin_copysign): Add support for
5753         copysign _Float<N> and _Float<N>X variants.
5754         * config/rs6000/rs6000-builtin.def (SQRTF128): Delete, this is now
5755         handled by machine independent code.
5756         (FMAF128): Likewise.
5757         * doc/cpp.texi (Common Predefined Macros): Document defining
5758         __FP_FAST_FMAF<N> and __FP_FAST_FMAF<N>X if the backend supports
5759         fma _Float<N> and _Float<N>X variants.
5760
5761 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
5762
5763         PR target/82692
5764         * config/i386/i386-modes.def (CCFPU): Remove definition.
5765         * config/i386/i386.c (put_condition_mode): Remove CCFPU mode handling.
5766         (ix86_cc_modes_compatible): Ditto.
5767         (ix86_expand_carry_flag_compare): Ditto.
5768         (ix86_expand_int_movcc): Ditto.
5769         (ix86_expand_int_addcc): Ditto.
5770         (ix86_reverse_condition): Ditto.
5771         (ix86_unordered_fp_compare): Rename from ix86_fp_compare_mode.
5772         Return true/false for unordered/ordered fp comparisons.
5773         (ix86_cc_mode): Always return CCFPmode for float mode comparisons.
5774         (ix86_prepare_fp_compare_args): Update for rename.
5775         (ix86_expand_fp_compare): Update for rename.  Generate unordered
5776         compare RTXes wrapped with UNSPEC_NOTRAP unspec.
5777         (ix86_expand_sse_compare_and_jump): Ditto.
5778         * config/i386/predicates.md (fcmov_comparison_operator):
5779         Remove CCFPU mode handling.
5780         (ix86_comparison_operator): Ditto.
5781         (ix86_carry_flag_operator): Ditto.
5782         * config/i386/i386.md (UNSPEC_NOTRAP): New unspec.
5783         (*cmpu<mode>_i387): Wrap compare RTX with UNSPEC_NOTRAP unspec.
5784         (*cmpu<mode>_cc_i387): Ditto.
5785         (FPCMP): Remove mode iterator.
5786         (unord): Remove mode attribute.
5787         (unord_subst): New define_subst transformation
5788         (unord): New define_subst attribute.
5789         (unordered): Ditto.
5790         (*cmpi<unord><MODEF:mode>): Rewrite using unord_subst transformation.
5791         (*cmpi<unord>xf_i387): Ditto.
5792         * config/i386/sse.md (<sse>_<unord>comi<round_saeonly_name>): Merge
5793         from <sse>_comi<round_saeonly_name> and <sse>_ucomi<round_saeonly_name>
5794         using unord_subst transformation.
5795         * config/i386/subst.md (SUBST_A): Remove CCFP and CCFPU modes.
5796         (round_saeonly): Also handle CCFP mode.
5797         * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_NOTRAP unspec.
5798         Remove UNSPEC_SAHF unspec handling.
5799
5800 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
5801
5802         * x86-tune.def (X86_TUNE_INTER_UNIT_MOVES_TO_VEC): Disable for Zen.
5803
5804 2017-10-27  Jeff Law  <law@redhat.com>
5805
5806         * gimple-ssa-sprintf.c: Include domwalk.h.
5807         (class sprintf_dom_walker): New class, derived from dom_walker.
5808         (sprintf_dom_walker::before_dom_children): New function.
5809         (struct call_info): Moved into sprintf_dom_walker class
5810         (compute_formath_length, handle_gimple_call): Likewise.
5811         (sprintf_length::execute): Call the dominator walker rather
5812         than walking the statements.
5813
5814         * tree-vrp.c (check_all_array_refs): Do not use wi->info to smuggle
5815         gimple statement locations.
5816         (check_array_bounds): Corresponding changes.  Get the statement's
5817         location directly from wi->stmt.
5818
5819 2017-10-27  Palmer Dabbelt  <palmer@dabbelt.com>
5820
5821         PR target/82717
5822         * doc/invoke.texi (RISC-V) <-mabi>: Correct and improve.
5823
5824 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
5825
5826         * config/i386/x86-tune.def (X86_TUNE_PARTIAL_REG_DEPENDENCY,
5827         X86_TUNE_MOVX): Disable for Haswell and newer CPUs.
5828
5829 2017-10-27  Jakub Jelinek  <jakub@redhat.com>
5830
5831         PR target/82703
5832         * config/i386/i386-protos.h (maybe_get_pool_constant): Removed.
5833         * config/i386/i386.c (maybe_get_pool_constant): Removed.
5834         (ix86_split_to_parts): Use avoid_constant_pool_reference instead of
5835         maybe_get_pool_constant.
5836         * config/i386/predicates.md (zero_extended_scalar_load_operand):
5837         Likewise.
5838
5839 2017-10-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5840
5841         * doc/install.texi (Specific, i?86-*-solaris2.10): Simplify gas
5842         2.26 caveat.  Update gas and gld versions.
5843         (Specific, *-*-solaris2*): Update binutils version.  Remove caveat
5844         reference.
5845
5846 2017-10-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5847
5848         * cgraph.h (set_malloc_flag): Declare.
5849         * cgraph.c (set_malloc_flag_1): New function.
5850         (set_malloc_flag): Likewise.
5851         * ipa-fnsummary.h (ipa_call_summary): Add new field is_return_callee.
5852         * ipa-fnsummary.c (ipa_call_summary::reset): Set is_return_callee to
5853         false.
5854         (read_ipa_call_summary): Add support for reading is_return_callee.
5855         (write_ipa_call_summary): Stream is_return_callee.
5856         * ipa-inline.c (ipa_inline): Remove call to ipa_free_fn_summary.
5857         * ipa-pure-const.c: Add headers ssa.h, alloc-pool.h, symbol-summary.h,
5858         ipa-prop.h, ipa-fnsummary.h.
5859         (pure_const_names): Change to static.
5860         (malloc_state_e): Define.
5861         (malloc_state_names): Define.
5862         (funct_state_d): Add field malloc_state.
5863         (varying_state): Set malloc_state to STATE_MALLOC_BOTTOM.
5864         (check_retval_uses): New function.
5865         (malloc_candidate_p): Likewise.
5866         (analyze_function): Add support for malloc attribute.
5867         (pure_const_write_summary): Stream malloc_state.
5868         (pure_const_read_summary): Add support for reading malloc_state.
5869         (dump_malloc_lattice): New function.
5870         (propagate_malloc): New function.
5871         (warn_function_malloc): New function.
5872         (ipa_pure_const::execute): Call propagate_malloc and
5873         ipa_free_fn_summary.
5874         (pass_local_pure_const::execute): Add support for malloc attribute.
5875         * ssa-iterators.h (RETURN_FROM_IMM_USE_STMT): New macro.
5876         * doc/invoke.texi: Document Wsuggest-attribute=malloc.
5877
5878 2017-10-27  Martin Liska  <mliska@suse.cz>
5879
5880         PR gcov-profile/82457
5881         * doc/invoke.texi: Document that one needs a non-strict ISO mode
5882         for fork-like functions to be properly instrumented.
5883
5884 2017-10-27  Richard Biener  <rguenther@suse.de>
5885
5886         PR middle-end/81659
5887         * tree-eh.c (pass_lower_eh_dispatch::execute): Free dominator
5888         info when we redirected EH.
5889
5890 2017-10-26  Michael Collison  <michael.collison@arm.com>
5891
5892         * config/aarch64/aarch64.md(<optab>_trunc><vf><GPI:mode>2):
5893         New pattern.
5894         (<optab>_trunchf<GPI:mode>2: New pattern.
5895         (<optab>_trunc<vgp><GPI:mode>2: New pattern.
5896         * config/aarch64/iterators.md (wv): New mode attribute.
5897         (vf, VF): New mode attributes.
5898         (vgp, VGP): New mode attributes.
5899         (s): Update attribute with SImode and DImode prefixes.
5900
5901 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
5902
5903         * config/nios2/constraints.md ("S"): Match r0rel_constant_p too.
5904         * config/nios2/nios2-protos.h (r0rel_constant_p): Declare.
5905         * config/nios2/nios2.c: (nios2_r0rel_sec_regex): New.
5906         (nios2_option_overide): Initialize it.  Don't allow R0-relative
5907         addressing with PIC.
5908         (nios2_rtx_costs): Handle r0rel_constant_p like gprel_constant_p.
5909         (nios2_symbolic_constant_p): Likewise.
5910         (nios2_legitimate_address_p): Likewise.
5911         (nios2_r0rel_section_name_p): New.
5912         (nios2_symbol_ref_in_r0rel_data_p): New.
5913         (nios2_emit_move_sequence): Handle r0rel_constant_p.
5914         (r0rel_constant_p): New.
5915         (nios2_print_operand_address): Handle r0rel_constant_p.
5916         (nios2_cdx_narrow_form_p): Likewise.
5917         * config/nios2/nios2.opt (mr0rel-sec=): New option.
5918         * doc/invoke.texi (Option Summary): Add -mr0rel-sec.
5919         (Nios II Options): Document -mr0rel-sec.
5920
5921 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
5922
5923         * config/nios2/nios2.c: Include xregex.h.
5924         (nios2_gprel_sec_regex): New.
5925         (nios2_option_overide): Initialize it.  Don't allow GP-relative
5926         addressing with PIC.
5927         (nios2_small_section_name_p): Check for regex match.
5928         * config/nios2/nios2.opt (mgprel-sec=): New option.
5929         * doc/invoke.texi (Option Summary): Add -mgprel-sec.
5930         (Nios II Options): Document -mgprel-sec.
5931
5932 2017-10-26  Jim Wilson  <wilson@tuliptree.org>
5933
5934         * doc/invoke.texi (-fdebug-prefix-map): Expand documentation.
5935
5936 2017-10-26  Tom de Vries  <tom@codesourcery.com>
5937
5938         PR tree-optimization/82707
5939         * gimple.c (gimple_copy): Fix unsharing of
5940         GIMPLE_OMP_{SINGLE,TARGET,TEAMS}.
5941
5942 2017-10-26  Olga Makhotina  <olga.makhotina@intel.com>
5943
5944         * config/i386/avx512fintrin.h (_mm512_cmpeq_pd_mask,
5945         _mm512_cmple_pd_mask, _mm512_cmplt_pd_mask,
5946         _mm512_cmpneq_pd_mask, _mm512_cmpnle_pd_mask,
5947         _mm512_cmpnlt_pd_mask, _mm512_cmpord_pd_mask,
5948         _mm512_cmpunord_pd_mask, _mm512_mask_cmpeq_pd_mask,
5949         _mm512_mask_cmple_pd_mask, _mm512_mask_cmplt_pd_mask,
5950         _mm512_mask_cmpneq_pd_mask, _mm512_mask_cmpnle_pd_mask,
5951         _mm512_mask_cmpnlt_pd_mask, _mm512_mask_cmpord_pd_mask,
5952         _mm512_mask_cmpunord_pd_mask, _mm512_cmpeq_ps_mask,
5953         _mm512_cmple_ps_mask, _mm512_cmplt_ps_mask,
5954         _mm512_cmpneq_ps_mask, _mm512_cmpnle_ps_mask,
5955         _mm512_cmpnlt_ps_mask, _mm512_cmpord_ps_mask,
5956         _mm512_cmpunord_ps_mask, _mm512_mask_cmpeq_ps_mask,
5957         _mm512_mask_cmple_ps_mask, _mm512_mask_cmplt_ps_mask,
5958         _mm512_mask_cmpneq_ps_mask, _mm512_mask_cmpnle_ps_mask,
5959         _mm512_mask_cmpnlt_ps_mask, _mm512_mask_cmpord_ps_mask,
5960         _mm512_mask_cmpunord_ps_mask): New intrinsics.
5961
5962 2017-10-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
5963
5964         * config/rs6000/aix.h (TARGET_IEEEQUAD_DEFAULT): Set long double
5965         default to IBM.
5966         * config/rs6000/darwin.h (TARGET_IEEEQUAD_DEFAULT): Likewise.
5967         * config/rs6000/rs6000.opt (-mabi=ieeelongdouble): Move the
5968         warning to rs6000.c.  Remove the Undocumented flag, since it has
5969         been documented.
5970         (-mabi=ibmlongdouble): Likewise.
5971         * config/rs6000/rs6000.c (TARGET_IEEEQUAD_DEFAULT): If it is not
5972         already set, set the default format for long double.
5973         (rs6000_debug_reg_global): Print whether long double is IBM or
5974         IEEE.
5975         (rs6000_option_override_internal): Rework setting long double
5976         format.  Only warn if the user is changing the long double default
5977         and they did not use -Wno-psabi.
5978         * doc/invoke.texi (PowerPC options): Update the documentation for
5979         -mabi=ieeelongdouble and -mabi=ibmlongdouble.
5980
5981 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
5982             Alan Hayward  <alan.hayward@arm.com>
5983             David Sherwood  <david.sherwood@arm.com>
5984
5985         * rtl.h (wider_subreg_mode): New function.
5986         * ira.h (ira_sort_regnos_for_alter_reg): Take a machine_mode *
5987         rather than an unsigned int *.
5988         * ira-color.c (regno_max_ref_width): Replace with...
5989         (regno_max_ref_mode): ...this new variable.
5990         (coalesced_pseudo_reg_slot_compare): Update accordingly.
5991         Use wider_subreg_mode.
5992         (ira_sort_regnos_for_alter_reg): Likewise.  Take a machine_mode *
5993         rather than an unsigned int *.
5994         * lra-constraints.c (uses_hard_regs_p): Use wider_subreg_mode.
5995         (process_alt_operands): Likewise.
5996         (invariant_p): Likewise.
5997         * lra-spills.c (assign_mem_slot): Likewise.
5998         (add_pseudo_to_slot): Likewise.
5999         * lra.c (collect_non_operand_hard_regs): Likewise.
6000         (add_regs_to_insn_regno_info): Likewise.
6001         * reload1.c (regno_max_ref_width): Replace with...
6002         (regno_max_ref_mode): ...this new variable.
6003         (reload): Update accordingly.  Update call to
6004         ira_sort_regnos_for_alter_reg.
6005         (alter_reg): Update to use regno_max_ref_mode.  Call wider_subreg_mode.
6006         (init_eliminable_invariants): Update to use regno_max_ref_mode.
6007         (scan_paradoxical_subregs): Likewise.
6008
6009 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
6010
6011         * config/aarch64/aarch64.h (EXIT_IGNORE_STACK): Set if alloca is used.
6012         (aarch64_frame): Add emit_frame_chain boolean.
6013         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
6014         Move eh_return case to aarch64_layout_frame.
6015         (aarch64_layout_frame): Initialize emit_frame_chain.
6016         (aarch64_expand_prologue): Use emit_frame_chain.
6017
6018 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
6019
6020         * config/aarch64/aarch64.c (aarch64_layout_frame):
6021         Ensure LR is always stored at the bottom of the callee-saves.
6022         Remove rarely used frame layout which saves callee-saves at top of
6023         frame, so the store of LR can be used as a valid probe in all cases.
6024
6025 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
6026
6027         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
6028         Improve unaligned TImode/TFmode base/offset split.
6029
6030 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
6031             Alan Hayward  <alan.hayward@arm.com>
6032             David Sherwood  <david.sherwood@arm.com>
6033
6034         * caller-save.c (mark_referenced_regs):  Use read_modify_subreg_p.
6035         * combine.c (find_single_use_1): Likewise.
6036         (expand_field_assignment): Likewise.
6037         (move_deaths): Likewise.
6038         * lra-constraints.c (simplify_operand_subreg): Likewise.
6039         (curr_insn_transform): Likewise.
6040         * lra.c (collect_non_operand_hard_regs): Likewise.
6041         (add_regs_to_insn_regno_info): Likewise.
6042         * rtlanal.c (reg_referenced_p): Likewise.
6043         (covers_regno_no_parallel_p): Likewise.
6044
6045 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
6046
6047         * wide-int-print.cc (print_hex): Loop based on extract_uhwi.
6048         Don't print any bits outside the precision of the value.
6049         * wide-int.cc (test_printing): Add some new tests.
6050
6051 2017-10-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6052
6053         * configure.ac (gcc_cv_as_ix86_xbrace_comment): Check if assembler
6054         supports -xbrace_comment option.
6055         * configure: Regenerate.
6056         * config.in: Regenerate.
6057         * config/i386/sol2.h (ASM_XBRACE_COMMENT_SPEC): Define.
6058         (ASM_CPU_SPEC): Use it.
6059
6060 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
6061
6062         * target.def (static_rtx_alignment): New hook.
6063         * targhooks.h (default_static_rtx_alignment): Declare.
6064         * targhooks.c (default_static_rtx_alignment): New function.
6065         * doc/tm.texi.in (TARGET_STATIC_RTX_ALIGNMENT): New hook.
6066         * doc/tm.texi: Regenerate.
6067         * varasm.c (force_const_mem): Use targetm.static_rtx_alignment
6068         instead of targetm.constant_alignment.  Remove call to
6069         set_mem_attributes.
6070         * config/cris/cris.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
6071         (cris_preferred_mininum_alignment): New function, split out from...
6072         (cris_constant_alignment): ...here.
6073         (cris_static_rtx_alignment): New function.
6074         * config/i386/i386.c (ix86_static_rtx_alignment): New function,
6075         split out from...
6076         (ix86_constant_alignment): ...here.
6077         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
6078         * config/mmix/mmix.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
6079         (mmix_static_rtx_alignment): New function.
6080         * config/spu/spu.c (spu_static_rtx_alignment): New function.
6081         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
6082
6083 2017-10-26  Tamar Christina  <tamar.christina@arm.com>
6084
6085         PR target/81800
6086         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2):
6087         Add flag_trapping_math and flag_fp_int_builtin_inexact.
6088
6089 2017-10-25  Palmer Dabbelt  <palmer@dabbelt.com>
6090
6091         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Define.
6092         * config/riscv/pic.md (local_pic_load): Rename to local_pic_load_s,
6093         mark as a sign-extending load.
6094         (local_pic_load_u): Define.
6095
6096 2017-10-25  Eric Botcazou  <ebotcazou@adacore.com>
6097
6098         PR middle-end/82062
6099         * fold-const.c (operand_equal_for_comparison_p): Also return true
6100         if ARG0 is a simple variant of ARG1 with narrower precision.
6101         (fold_ternary_loc): Always pass unstripped operands to the predicate.
6102
6103 2017-10-25  Jan Hubicka  <hubicka@ucw.cz>
6104
6105         * i386.c (ix86_builtin_vectorization_cost): Compute scatter/gather
6106         cost correctly.
6107         * i386.h (processor_costs): Add gather_static, gather_per_elt,
6108         scatter_static, scatter_per_elt.
6109         * x86-tune-costs.h: Add new cost entries.
6110
6111 2017-10-25  Richard Biener  <rguenther@suse.de>
6112
6113         * tree-ssa-sccvn.h (vn_eliminate): Declare.
6114         * tree-ssa-pre.c (class eliminate_dom_walker, eliminate,
6115         class pass_fre): Move to ...
6116         * tree-ssa-sccvn.c (class eliminate_dom_walker, vn_eliminate,
6117         class pass_fre): ... here and adjust for statistics.
6118
6119 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
6120
6121         PR libstdc++/81706
6122         * attribs.c (attribute_value_equal): Use omp_declare_simd_clauses_equal
6123         for comparison of OMP_CLAUSEs regardless of flag_openmp{,_simd}.
6124         (duplicate_one_attribute, copy_attributes_to_builtin): New functions.
6125         * attribs.h (duplicate_one_attribute, copy_attributes_to_builtin): New
6126         declarations.
6127
6128 2017-10-25  Richard Biener  <rguenther@suse.de>
6129
6130         * tree-ssa-pre.c (need_eh_cleanup, need_ab_cleanup, el_to_remove,
6131         el_to_fixup, el_todo, el_avail, el_avail_stack, eliminate_avail,
6132         eliminate_push_avail, eliminate_insert): Move inside...
6133         (class eliminate_dom_walker): ... this class in preparation
6134         of move.
6135         (fini_eliminate): Remove by merging with ...
6136         (eliminate): ... this function.  Adjust for class changes.
6137         (pass_pre::execute): Remove fini_eliminate call.
6138         (pass_fre::execute): Likewise.
6139
6140 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
6141
6142         PR target/82460
6143         * config/i386/sse.md (UNSPEC_VPERMI2, UNSPEC_VPERMI2_MASK): Remove.
6144         (VPERMI2, VPERMI2I): New mode iterators.
6145         (<avx512>_vpermi2var<mode>3_maskz): Remove 3 define_expand patterns.
6146         (<avx512>_vpermi2var<mode>3<sd_maskz_name>): Remove 3 define_insn
6147         patterns.
6148         (<avx512>_vpermi2var<mode>3_mask): New define_expand using VPERMI2
6149         mode iterator.  Remove 3 old define_insn patterns.
6150         (*<avx512>_vpermi2var<mode>3_mask): 2 new define_insn patterns.
6151         (<avx512>_vpermt2var<mode>3_maskz): Adjust 1 define_expand to use
6152         VPERMI2 mode iterator, remove the other two expanders.
6153         (<avx512>_vpermt2var<mode>3<sd_maskz_name>): Adjust 1 define_insn
6154         to use VPERMI2 mode iterator, add another alternative for vpermi2*
6155         instructions, remove the other two patterns.
6156         (<avx512>_vpermt2var<mode>3_mask): Adjust 1 define_insn to use VPERMI2
6157         mode iterator, remove the other two patterns.
6158         * config/i386/i386.c (ix86_expand_vec_perm_vpermi2): Renamed to ...
6159         (ix86_expand_vec_perm_vpermt2): ... this.  Swap mask and op0
6160         arguments, use gen_*vpermt2* expanders instead of gen_*vpermi2*
6161         and adjust argument order accordingly.
6162         (ix86_expand_vec_perm): Adjust caller.
6163         (expand_vec_perm_1): Likewise.
6164         (expand_vec_perm_vpermi2_vpshub2): Rename to ...
6165         (expand_vec_perm_vpermt2_vpshub2): ... this.
6166         (ix86_expand_vec_perm_const_1): Adjust caller.
6167         (ix86_vectorize_vec_perm_const_ok): Adjust comments.
6168
6169         PR target/82370
6170         * config/i386/sse.md (VIMAX_AVX2): Remove V4TImode.
6171         (VIMAX_AVX2_AVX512BW, VIMAX_AVX512VL): New mode iterators.
6172         (vec_shl_<mode>): Remove unused expander.
6173         (avx512bw_<shift_insn><mode>3): New define_insn.
6174         (<sse2_avx2>_ashl<mode>3, <sse2_avx2>_lshr<mode>3): Replaced by ...
6175         (<sse2_avx2>_<shift_insn><mode>3): ... this.  New define_insn.
6176
6177 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
6178
6179         PR c++/82466
6180         * doc/invoke.texi ([Wbuiltin-declaration-mismatch]): Extend
6181         description.
6182
6183 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
6184
6185         PR rtl-optimization/82396
6186         * gcc/haifa-sched.c (ready_sort_real): Remove qsort workaround.
6187         (autopref_multipass_init): Simplify initialization.
6188         (autopref_rank_data): Simplify sort order.
6189         * gcc/sched-int.h (autopref_multipass_data_): Remove
6190         multi_mem_insn_p, min_offset and max_offset.
6191
6192 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
6193
6194         PR middle-end/60580
6195         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
6196         Check special value of flag_omit_frame_pointer.
6197         (aarch64_can_eliminate): Likewise.
6198         (aarch64_override_options_after_change_1): Simplify handling of
6199         -fomit-frame-pointer and -fomit-leaf-frame-pointer.
6200
6201 2017-10-24  Richard Biener  <rguenther@suse.de>
6202
6203         PR tree-optimization/82697
6204         * tree-ssa-phiopt.c (cond_store_replacement): Use alias-set
6205         zero for conditional load and unconditional store.
6206
6207 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
6208
6209         * doc/install.texi: Document bootstrap-cet.
6210
6211 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
6212
6213         PR target/82659
6214         * config/i386/i386.c (rest_of_insert_endbranch): Don't insert
6215         ENDBR instruction at function entrance if function is only
6216         called directly.
6217
6218 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
6219
6220         PR target/82628
6221         * config/i386/i386.md (addcarry<mode>, subborrow<mode>): Change
6222         patterns to better describe from which operation the CF is computed.
6223         (addcarry<mode>_0, subborrow<mode>_0): New patterns.
6224         * config/i386/i386.c (ix86_expand_builtin) <case handlecarry>: Pass
6225         one LTU with [DT]Imode and another one with [SD]Imode.  If arg0
6226         is 0, use _0 suffixed expanders instead of emitting a comparison
6227         before it.
6228
6229 2017-10-06  Sergey Shalnov  <Sergey.Shalnov@intel.com>
6230
6231         * config/i386/i386.md(*movsf_internal, *movdf_internal):
6232         Avoid 512-bit AVX modes for TARGET_PREFER_AVX256.
6233
6234 2017-10-24  Eric Botcazou  <ebotcazou@adacore.com>
6235
6236         PR middle-end/82569
6237         * tree-outof-ssa.h (always_initialized_rtx_for_ssa_name_p): Delete.
6238         * expr.c (expand_expr_real_1) <expand_decl_rtl>: Revert latest change.
6239         * loop-iv.c (iv_get_reaching_def): Likewise.
6240         * cfgexpand.c (expand_one_ssa_partition): Initialize the RTX if the
6241         variable is promoted and the partition contains undefined values.
6242
6243 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
6244
6245         * config/nios2/nios2.c (nios2_rtx_costs): Make costs better
6246         reflect reality.
6247         (nios2_address_cost): Define.
6248         (nios2_legitimize_address): Recognize (exp + constant) directly.
6249         (TARGET_ADDRESS_COST): Define.
6250
6251 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
6252
6253         * config/nios2/nios2-protos.h (nios2_large_constant_p): Declare.
6254         (nios2_symbolic_memory_operand_p): Declare.
6255         (nios2_split_large_constant): Declare.
6256         (nios2_split_symbolic_memory_operand): Declare.
6257         * config/nios2/nios2.c: Adjust includes.
6258         (nios2_symbolic_constant_allowed): New.
6259         (nios2_symbolic_constant_p): New.
6260         (nios2_plus_symbolic_constant_p): New.
6261         (nios2_valid_addr_expr_p): Recognize addresses involving
6262         symbolic constants.
6263         (nios2_legitimate_address_p): Likewise, also LO_SUM.
6264         (nios2_symbolic_memory_operand_p): New.
6265         (nios2_large_constant_p): New.
6266         (nios2_split_large_constant): New.
6267         (nios2_split_plus_large_constant): New.
6268         (nios2_split_symbolic_memory_operand): New.
6269         (nios2_legitimize_address): Code refactoring.  Handle addresses
6270         involving symbolic constants.
6271         (nios2_emit_move_sequence): Likewise.
6272         (nios2_print_operand): Improve error output.
6273         (nios2_print_operand_address): Handle LO_SUM.
6274         (nios2_cdx_narrow_form_p): Likewise.
6275         * config/nios2/nios2.md (movqi_internal): Add splitter for memory
6276         operands involving symbolic constants.
6277         (movhi_internal, movsi_internal): Likewise.
6278         (zero_extendhisi2, zero_extendqi<mode>2): Likewise.
6279         (extendhisi2, extendqi<mode>2): Likewise.
6280
6281 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
6282
6283         * tree-pass.h (PROP_rtl_split_insns): Define.
6284         * recog.c (pass_data_split_all_insns): Provide PROP_rtl_split_insns.
6285
6286 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
6287
6288         * config/nios2/nios2.c (TARGET_LRA_P): Don't override.
6289
6290 2017-10-23  Jakub Jelinek  <jakub@redhat.com>
6291
6292         PR debug/82630
6293         * target.def (const_not_ok_for_debug_p): Default to
6294         default_const_not_ok_for_debug_p instead of hook_bool_rtx_false.
6295         * targhooks.h (default_const_not_ok_for_debug_p): New declaration.
6296         * targhooks.c (default_const_not_ok_for_debug_p): New function.
6297         * dwarf2out.c (const_ok_for_output_1): Only reject UNSPECs for
6298         which targetm.const_not_ok_for_debug_p returned true.
6299         * config/arm/arm.c (arm_const_not_ok_for_debug_p): Return true
6300         for UNSPECs.
6301         * config/powerpcspe/powerpcspe.c (rs6000_const_not_ok_for_debug_p):
6302         Likewise.
6303         * config/rs6000/rs6000.c (rs6000_const_not_ok_for_debug_p): Likewise.
6304         * config/i386/i386.c (ix86_delegitimize_address_1): Don't delegitimize
6305         UNSPEC_GOTOFF with addend into addend - _GLOBAL_OFFSET_TABLE_ + symbol
6306         if !base_term_p.
6307         (ix86_const_not_ok_for_debug_p): New function.
6308         (i386_asm_output_addr_const_extra): Handle UNSPEC_GOTOFF.
6309         (TARGET_CONST_NOT_OK_FOR_DEBUG_P): Redefine.
6310
6311 2017-10-23  David Malcolm  <dmalcolm@redhat.com>
6312
6313         PR bootstrap/82610
6314         * system.h: Conditionally include "unique-ptr.h" if
6315         INCLUDE_UNIQUE_PTR is defined.
6316         * unique-ptr-tests.cc: Remove include of "unique-ptr.h" in favor
6317         of defining INCLUDE_UNIQUE_PTR before including "system.h".
6318
6319 2017-10-23  Sebastian Perta  <sebastian.perta@renesas.com>
6320
6321         * config/rl78/rl78.md: New define_expand "subdi3".
6322
6323 2017-10-23  H.J. Lu  <hongjiu.lu@intel.com>
6324
6325         PR target/82673
6326         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Skip
6327         DF_REF_INSN if DF_REF_INSN_INFO is false.
6328
6329 2017-10-23  Jan Hubicka  <hubicka@ucw.cz>
6330
6331         * i386.c (dimode_scalar_chain::compute_convert_gain): Use
6332         xmm_move instead of sse_move.
6333         (sse_store_index): New function.
6334         (ix86_register_move_cost): Be more sensible about mismatch stall;
6335         model AVX moves correctly; make difference between sse->integer and
6336         integer->sse.
6337         (ix86_builtin_vectorization_cost): Model correctly aligned and unaligned
6338         moves; make difference between SSE and AVX.
6339         * i386.h (processor_costs): Remove sse_move; add xmm_move, ymm_move
6340         and zmm_move. Increase size of sse load and store tables;
6341         add unaligned load and store tables; add ssemmx_to_integer.
6342         * x86-tune-costs.h: Update all entries according to real
6343         move latencies from Agner Fog's manual and chip documentation.
6344
6345 2017-10-23  Jakub Jelinek  <jakub@redhat.com>
6346
6347         PR target/82628
6348         * config/i386/predicates.md (x86_64_dwzext_immediate_operand): New.
6349         * config/i386/constraints.md (Wf): New constraint.
6350         * config/i386/i386.md (UNSPEC_SBB): New unspec.
6351         (cmp<dwi>_doubleword): Removed.
6352         (sub<mode>3_carry_ccc, *sub<mode>3_carry_ccc_1): New patterns.
6353         (sub<mode>3_carry_ccgz): Use unspec instead of compare.
6354         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>: Don't
6355         expand with cmp<dwi>_doubleword.  For LTU and GEU use
6356         sub<mode>3_carry_ccc instead of sub<mode>3_carry_ccgz and use CCCmode.
6357
6358         * common.opt (gcolumn-info): Enable by default.
6359         * doc/invoke.texi (gcolumn-info): Document new default.
6360
6361 2017-10-23  Richard Biener  <rguenther@suse.de>
6362
6363         PR tree-optimization/82672
6364         * graphite-isl-ast-to-gimple.c (graphite_copy_stmts_from_block):
6365         Fold the stmt if we propagated into it.
6366
6367 2017-10-23  Richard Biener  <rguenther@suse.de>
6368
6369         * tree-ssa-pre.c (bitmap_remove_from_set): Rename to...
6370         (bitmap_remove_expr_from_set): ... this.  All callers call this
6371         for non-constant values.
6372         (bitmap_set_subtract): Rename to...
6373         (bitmap_set_subtract_expressions): ... this.  Adjust and
6374         optimize.
6375         (bitmap_set_contains_value): Remove superfluous check.
6376         (bitmap_set_replace_value): Inline into single caller ...
6377         (bitmap_value_replace_in_set): ... here and simplify.
6378         (dependent_clean): Merge into ...
6379         (clean): ... this using an overload.  Adjust.
6380         (prune_clobbered_mems): Adjust.
6381         (compute_antic_aux): Likewise.
6382         (compute_partial_antic_aux): Likewise.
6383
6384 2017-10-23  Richard Biener  <rguenther@suse.de>
6385
6386         PR tree-optimization/82129
6387         Revert
6388         2017-08-01  Richard Biener  <rguenther@suse.de>
6389
6390         PR tree-optimization/81181
6391         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
6392         (compute_antic): ... end of iteration here.
6393
6394 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
6395
6396         * target.def (starting_frame_offset): New hook.
6397         * doc/tm.texi (STARTING_FRAME_OFFSET): Remove in favor of...
6398         (TARGET_STARTING_FRAME_OFFSET): ...this new hook.
6399         * doc/tm.texi.in: Regenerate.
6400         * hooks.h (hook_hwi_void_0): Declare.
6401         * hooks.c (hook_hwi_void_0): New function.
6402         * doc/rtl.texi: Refer to TARGET_STARTING_FRAME_OFFSET instead of
6403         STARTING_FRAME_OFFSET.
6404         * builtins.c (expand_builtin_setjmp_receiver): Likewise.
6405         * reload1.c (reload): Likewise.
6406         * cfgexpand.c (expand_used_vars): Use targetm.starting_frame_offset
6407         instead of STARTING_FRAME_OFFSET.
6408         * function.c (try_fit_stack_local): Likewise.
6409         (assign_stack_local_1): Likewise
6410         (instantiate_virtual_regs): Likewise.
6411         * rtlanal.c (rtx_addr_can_trap_p_1): Likewise.
6412         * config/avr/avr.md (nonlocal_goto_receiver): Likewise.
6413         * config/aarch64/aarch64.h (STARTING_FRAME_OFFSET): Delete.
6414         * config/alpha/alpha.h (STARTING_FRAME_OFFSET): Likewise.
6415         * config/arc/arc.h (STARTING_FRAME_OFFSET): Likewise.
6416         * config/arm/arm.h (STARTING_FRAME_OFFSET): Likewise.
6417         * config/bfin/bfin.h (STARTING_FRAME_OFFSET): Likewise.
6418         * config/c6x/c6x.h (STARTING_FRAME_OFFSET): Likewise.
6419         * config/cr16/cr16.h (STARTING_FRAME_OFFSET): Likewise.
6420         * config/cris/cris.h (STARTING_FRAME_OFFSET): Likewise.
6421         * config/fr30/fr30.h (STARTING_FRAME_OFFSET): Likewise.
6422         * config/frv/frv.h (STARTING_FRAME_OFFSET): Likewise.
6423         * config/ft32/ft32.h (STARTING_FRAME_OFFSET): Likewise.
6424         * config/h8300/h8300.h (STARTING_FRAME_OFFSET): Likewise.
6425         * config/i386/i386.h (STARTING_FRAME_OFFSET): Likewise.
6426         * config/ia64/ia64.h (STARTING_FRAME_OFFSET): Likewise.
6427         * config/m32c/m32c.h (STARTING_FRAME_OFFSET): Likewise.
6428         * config/m68k/m68k.h (STARTING_FRAME_OFFSET): Likewise.
6429         * config/mcore/mcore.h (STARTING_FRAME_OFFSET): Likewise.
6430         * config/mn10300/mn10300.h (STARTING_FRAME_OFFSET): Likewise.
6431         * config/moxie/moxie.h (STARTING_FRAME_OFFSET): Likewise.
6432         * config/msp430/msp430.h (STARTING_FRAME_OFFSET): Likewise.
6433         * config/nds32/nds32.h (STARTING_FRAME_OFFSET): Likewise.
6434         * config/nios2/nios2.h (STARTING_FRAME_OFFSET): Likewise.
6435         * config/nvptx/nvptx.h (STARTING_FRAME_OFFSET): Likewise.
6436         * config/pdp11/pdp11.h (STARTING_FRAME_OFFSET): Likewise.
6437         * config/riscv/riscv.h (STARTING_FRAME_OFFSET): Likewise.
6438         * config/rl78/rl78.h (STARTING_FRAME_OFFSET): Likewise.
6439         * config/rx/rx.h (STARTING_FRAME_OFFSET): Likewise.
6440         * config/s390/s390.h (STARTING_FRAME_OFFSET): Likewise.
6441         * config/sh/sh.h (STARTING_FRAME_OFFSET): Likewise.
6442         * config/sparc/sparc.c (sparc_compute_frame_size): Likewise.
6443         * config/sparc/sparc.h (STARTING_FRAME_OFFSET): Likewise.
6444         * config/spu/spu.h (STARTING_FRAME_OFFSET): Likewise.
6445         * config/stormy16/stormy16.h (STARTING_FRAME_OFFSET): Likewise.
6446         * config/tilegx/tilegx.h (STARTING_FRAME_OFFSET): Likewise.
6447         * config/tilepro/tilepro.h (STARTING_FRAME_OFFSET): Likewise.
6448         * config/v850/v850.h (STARTING_FRAME_OFFSET): Likewise.
6449         * config/visium/visium.h (STARTING_FRAME_OFFSET): Likewise.
6450         * config/avr/avr.h (STARTING_FRAME_OFFSET): Likewise.
6451         * config/avr/avr-protos.h (avr_starting_frame_offset): Likewise.
6452         * config/avr/avr.c (avr_starting_frame_offset): Make static and
6453         return a HOST_WIDE_INT.
6454         (avr_builtin_setjmp_frame_value): Use it instead of
6455         STARTING_FRAME_OFFSET.
6456         (TARGET_STARTING_FRAME_OFFSET): Redefine.
6457         * config/epiphany/epiphany.h (STARTING_FRAME_OFFSET): Delete.
6458         * config/epiphany/epiphany.c (epiphany_starting_frame_offset):
6459         New function.
6460         (TARGET_STARTING_FRAME_OFFSET): Redefine.
6461         * config/iq2000/iq2000.h (STARTING_FRAME_OFFSET): Delete.
6462         * config/iq2000/iq2000.c (iq2000_starting_frame_offset): New function.
6463         (TARGET_CONSTANT_ALIGNMENT): Redefine.
6464         * config/lm32/lm32.h (STARTING_FRAME_OFFSET): Delete.
6465         * config/lm32/lm32.c (lm32_starting_frame_offset): New function.
6466         (TARGET_STARTING_FRAME_OFFSET): Redefine.
6467         * config/m32r/m32r.h (STARTING_FRAME_OFFSET): Delete.
6468         * config/m32r/m32r.c (m32r_starting_frame_offset): New function.
6469         (TARGET_STARTING_FRAME_OFFSET): Redefine.
6470         * config/microblaze/microblaze.h (STARTING_FRAME_OFFSET): Delete.
6471         * config/microblaze/microblaze.c (microblaze_starting_frame_offset):
6472         New function.
6473         (TARGET_STARTING_FRAME_OFFSET): Redefine.
6474         * config/mips/mips.h (STARTING_FRAME_OFFSET): Delete.
6475         * config/mips/mips.c (mips_compute_frame_info): Refer to
6476         TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
6477         (mips_starting_frame_offset): New function.
6478         (TARGET_STARTING_FRAME_OFFSET): Redefine.
6479         * config/mmix/mmix.h (STARTING_FRAME_OFFSET): Delete.
6480         * config/mmix/mmix-protos.h (mmix_starting_frame_offset): Delete.
6481         * config/mmix/mmix.c (mmix_starting_frame_offset): Make static
6482         and return a HOST_WIDE_INT.
6483         (TARGET_STARTING_FRAME_OFFSET): Redefine.
6484         (mmix_initial_elimination_offset): Refer to
6485         TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
6486         * config/pa/pa.h (STARTING_FRAME_OFFSET): Delete.
6487         * config/pa/pa.c (pa_starting_frame_offset): New function.
6488         (pa_compute_frame_size): Use it instead of STARTING_FRAME_OFFSET.
6489         (pa_expand_prologue): Likewise.
6490         (TARGET_STARTING_FRAME_OFFSET): Redefine.
6491         * config/powerpcspe/aix.h (STARTING_FRAME_OFFSET): Split out
6492         !FRAME_GROWS_DOWNWARD handling to...
6493         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
6494         * config/powerpcspe/darwin.h (STARTING_FRAME_OFFSET): Split out
6495         !FRAME_GROWS_DOWNWARD handling to...
6496         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
6497         * config/powerpcspe/powerpcspe.h (STARTING_FRAME_OFFSET): Split out
6498         !FRAME_GROWS_DOWNWARD handling to...
6499         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
6500         * config/powerpcspe/powerpcspe.c (TARGET_STARTING_FRAME_OFFSET):
6501         Redefine.
6502         (rs6000_starting_frame_offset): New function.
6503         * config/rs6000/aix.h (STARTING_FRAME_OFFSET): Split out
6504         !FRAME_GROWS_DOWNWARD handling to...
6505         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
6506         * config/rs6000/darwin.h (STARTING_FRAME_OFFSET): Split out
6507         !FRAME_GROWS_DOWNWARD handling to...
6508         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
6509         * config/rs6000/rs6000.h (STARTING_FRAME_OFFSET): Split out
6510         !FRAME_GROWS_DOWNWARD handling to...
6511         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
6512         * config/rs6000/rs6000.c (TARGET_STARTING_FRAME_OFFSET): Refine.
6513         (rs6000_starting_frame_offset): New function.
6514         * config/vax/elf.h (STARTING_FRAME_OFFSET): Delete.
6515         * config/vax/vax.h (STARTING_FRAME_OFFSET): Delete.
6516         * config/vax/vax.c (vax_starting_frame_offset): New function.
6517         (vax_expand_prologue): Use it instead of STARTING_FRAME_OFFSET.
6518         (TARGET_STARTING_FRAME_OFFSET): Redefine.
6519         * config/xtensa/xtensa.h (STARTING_FRAME_OFFSET): Delete.
6520         * config/xtensa/xtensa.c (xtensa_starting_frame_offset): New function.
6521         (TARGET_STARTING_FRAME_OFFSET): Redefine.
6522         * system.h (STARTING_FRAME_OFFSET): Poison.
6523
6524 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
6525
6526         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
6527         SCALAR_TYPE_MODE instead of TYPE_MODE.
6528
6529 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
6530             Alan Hayward  <alan.hayward@arm.com>
6531             David Sherwood  <david.sherwood@arm.com>
6532
6533         * dwarf2out.c (loc_list_from_tree_1): Use SCALAR_INT_TYPE_MODE
6534
6535 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
6536             Alan Hayward  <alan.hayward@arm.com>
6537             David Sherwood  <david.sherwood@arm.com>
6538
6539         * expmed.c (expand_shift_1): Use scalar_mode for scalar_mode.
6540
6541 2017-10-23  Richard Biener  <rguenther@suse.de>
6542
6543         PR tree-optimization/82129
6544         * tree-ssa-pre.c (bitmap_set_and): Remove.
6545         (compute_antic_aux): Compute ANTIC_OUT intersection in a way
6546         canonicalizing expressions in the set to those with lowest
6547         ID rather than taking that from the first edge.
6548
6549 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
6550
6551         * combine.c (rtx_equal_for_field_assignment_p): Use
6552         byte_lowpart_offset.
6553
6554 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
6555             Alan Hayward  <alan.hayward@arm.com>
6556             David Sherwood  <david.sherwood@arm.com>
6557
6558         * internal-fn.c (expand_direct_optab_fn): Don't assign directly
6559         to a SUBREG_PROMOTED_VAR.
6560
6561 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
6562             Alan Hayward  <alan.hayward@arm.com>
6563             David Sherwood  <david.sherwood@arm.com>
6564
6565         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_PRECISION.
6566         (expand_debug_source_expr): Likewise.
6567         * combine.c (combine_simplify_rtx): Likewise.
6568         * cse.c (fold_rtx): Likewise.
6569         * optabs.c (expand_float): Likewise.
6570         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
6571         (simplify_binary_operation_1): Likewise.
6572
6573 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
6574             Alan Hayward  <alan.hayward@arm.com>
6575             David Sherwood  <david.sherwood@arm.com>
6576
6577         * combine.c (simplify_comparison): Use HWI_COMPUTABLE_MODE_P.
6578         (record_promoted_value): Likewise.
6579         * expr.c (expand_expr_real_2): Likewise.
6580         * ree.c (update_reg_equal_equiv_notes): Likewise.
6581         (combine_set_extension): Likewise.
6582         * rtlanal.c (low_bitmask_len): Likewise.
6583         * simplify-rtx.c (neg_const_int): Likewise.
6584         (simplify_binary_operation_1): Likewise.
6585
6586 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
6587             Alan Hayward  <alan.hayward@arm.com>
6588             David Sherwood  <david.sherwood@arm.com>
6589
6590         * lra-spills.c (assign_mem_slot): Use subreg_size_lowpart_offset.
6591         * regcprop.c (maybe_mode_change): Likewise.
6592         * reload1.c (alter_reg): Likewise.
6593
6594 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
6595
6596         * inchash.h (inchash::hash::add_wide_int): New function.
6597         * lto-streamer-out.c (hash_tree): Use it.
6598
6599 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
6600
6601         * inchash.h (inchash::hash::add_wide_int): Rename to...
6602         (inchash::hash::add_hwi): ...this.
6603         * ipa-devirt.c (hash_odr_vtable): Update accordingly.
6604         (polymorphic_call_target_hasher::hash): Likewise.
6605         * ipa-icf.c (sem_function::get_hash, sem_function::init): Likewise.
6606         (sem_item::add_expr, sem_item::add_type, sem_variable::get_hash)
6607         (sem_item_optimizer::update_hash_by_addr_refs): Likewise.
6608         * lto-streamer-out.c (hash_tree): Likewise.
6609         * optc-save-gen.awk: Likewise.
6610         * tree.c (add_expr): Likewise.
6611
6612 2017-10-22  Uros Bizjak  <ubizjak@gmail.com>
6613
6614         PR target/52451
6615         * config/i386/i386.c (ix86_fp_compare_mode): Return CCFPmode
6616         for ordered inequality comparisons even with TARGET_IEEE_FP.
6617
6618 2017-10-22  Uros Bizjak  <ubizjak@gmail.com>
6619
6620         PR target/82628
6621         * config/i386/i386.md (cmp<dwi>_doubleword): New pattern.
6622         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
6623         Expand with cmp<dwi>_doubleword.
6624
6625 2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
6626
6627         * extend.texi: Add x86 specific to 'nocf_check' attribute.
6628         List CET intrinsics.
6629         * invoke.texi: Add -mcet, -mibt, -mshstk options.  Add x86
6630         specific to -fcf-protection option.
6631
6632 2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
6633
6634         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET): New.
6635         (OPTION_MASK_ISA_SHSTK_SET): Likewise.
6636         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
6637         (OPTION_MASK_ISA_SHSTK_UNSET): Likewise.
6638         (ix86_handle_option): Add -mibt, -mshstk, -mcet handling.
6639         * config.gcc (extra_headers): Add cetintrin.h for x86 targets.
6640         (extra_objs): Add cet.o for Linux/x86 targets.
6641         (tmake_file): Add i386/t-cet for Linux/x86 targets.
6642         * config/i386/cet.c: New file.
6643         * config/i386/cetintrin.h: Likewise.
6644         * config/i386/t-cet: Likewise.
6645         * config/i386/cpuid.h (bit_SHSTK): New.
6646         (bit_IBT): Likewise.
6647         * config/i386/driver-i386.c (host_detect_local_cpu): Detect and
6648         pass IBT and SHSTK bits.
6649         * config/i386/i386-builtin-types.def
6650         (VOID_FTYPE_UNSIGNED_PVOID): New.
6651         (VOID_FTYPE_UINT64_PVOID): Likewise.
6652         * config/i386/i386-builtin.def: Add CET intrinsics.
6653         * config/i386/i386-c.c (ix86_target_macros_internal): Add
6654         OPTION_MASK_ISA_IBT, OPTION_MASK_ISA_SHSTK handling.
6655         * config/i386/i386-passes.def: Add pass_insert_endbranch pass.
6656         * config/i386/i386-protos.h (make_pass_insert_endbranch): New
6657         prototype.
6658         * config/i386/i386.c (rest_of_insert_endbranch): New.
6659         (pass_data_insert_endbranch): Likewise.
6660         (pass_insert_endbranch): Likewise.
6661         (make_pass_insert_endbranch): Likewise.
6662         (ix86_notrack_prefixed_insn_p): Likewise.
6663         (ix86_target_string): Add -mibt, -mshstk flags.
6664         (ix86_option_override_internal): Add flag_cf_protection
6665         processing.
6666         (ix86_valid_target_attribute_inner_p): Set OPT_mibt, OPT_mshstk.
6667         (ix86_print_operand): Add 'notrack' prefix output.
6668         (ix86_init_mmx_sse_builtins): Add CET intrinsics.
6669         (ix86_expand_builtin): Expand CET intrinsics.
6670         (x86_output_mi_thunk): Add 'endbranch' instruction.
6671         * config/i386/i386.h (TARGET_IBT): New.
6672         (TARGET_IBT_P): Likewise.
6673         (TARGET_SHSTK): Likewise.
6674         (TARGET_SHSTK_P): Likewise.
6675         * config/i386/i386.md (unspecv): Add UNSPECV_NOP_RDSSP,
6676         UNSPECV_INCSSP, UNSPECV_SAVEPREVSSP, UNSPECV_RSTORSSP,
6677         UNSPECV_WRSS, UNSPECV_WRUSS, UNSPECV_SETSSBSY, UNSPECV_CLRSSBSY.
6678         (builtin_setjmp_setup): New pattern.
6679         (builtin_longjmp): Likewise.
6680         (rdssp<mode>): Likewise.
6681         (incssp<mode>): Likewise.
6682         (saveprevssp): Likewise.
6683         (rstorssp): Likewise.
6684         (wrss<mode>): Likewise.
6685         (wruss<mode>): Likewise.
6686         (setssbsy): Likewise.
6687         (clrssbsy): Likewise.
6688         (nop_endbr): Likewise.
6689         * config/i386/i386.opt: Add -mcet, -mibt, -mshstk and -mcet-switch
6690         options.
6691         * config/i386/immintrin.h: Include <cetintrin.h>.
6692         * config/i386/linux-common.h
6693         (file_end_indicate_exec_stack_and_cet): New prototype.
6694         (TARGET_ASM_FILE_END): New.
6695
6696 2017-10-20  Jan Hubicka  <hubicka@ucw.cz>
6697
6698         * i386.c (ix86_builtin_vectorization_cost): Use existing rtx_cost
6699         latencies instead of having separate table; make difference between
6700         integer and float costs.
6701         * i386.h (processor_costs): Remove scalar_stmt_cost,
6702         scalar_load_cost, scalar_store_cost, vec_stmt_cost, vec_to_scalar_cost,
6703         scalar_to_vec_cost, vec_align_load_cost, vec_unalign_load_cost,
6704         vec_store_cost.
6705         * x86-tune-costs.h: Remove entries which has been removed in
6706         procesor_costs from all tables; make cond_taken_branch_cost
6707         and cond_not_taken_branch_cost COST_N_INSNS based.
6708
6709 2017-10-20  Jan Hubicka  <hubicka@ucw.cz>
6710
6711         * x86-tune-costs.h (intel_cost, generic_cost): Fix move costs.
6712
6713 2017-10-20  Jakub Jelinek  <jakub@redhat.com>
6714
6715         * config/i386/i386.md (isa): Remove fma_avx512f.
6716         * config/i386/sse.md (<avx512>_fmadd_<mode>_mask<round_name>,
6717         <avx512>_fmadd_<mode>_mask3<round_name>,
6718         <avx512>_fmsub_<mode>_mask<round_name>,
6719         <avx512>_fmsub_<mode>_mask3<round_name>,
6720         <avx512>_fnmadd_<mode>_mask<round_name>,
6721         <avx512>_fnmadd_<mode>_mask3<round_name>,
6722         <avx512>_fnmsub_<mode>_mask<round_name>,
6723         <avx512>_fnmsub_<mode>_mask3<round_name>,
6724         <avx512>_fmaddsub_<mode>_mask<round_name>,
6725         <avx512>_fmaddsub_<mode>_mask3<round_name>,
6726         <avx512>_fmsubadd_<mode>_mask<round_name>,
6727         <avx512>_fmsubadd_<mode>_mask3<round_name>): Remove isa attribute.
6728         (*vec_widen_umult_even_v16si<mask_name>,
6729         *vec_widen_smult_even_v16si<mask_name>): Likewise.
6730         (<mask_codefor>avx512bw_dbpsadbw<mode><mask_name>): Likewise.
6731
6732 2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
6733
6734         * extend.texi: Add 'nocf_check' documentation.
6735         * gimple.texi: Add second parameter to
6736         gimple_build_call_from_tree.
6737         * invoke.texi: Add -fcf-protection documentation.
6738         * rtl.texi: Add REG_CALL_NOTRACK documenation.
6739
6740 2017-10-20  Richard Biener  <rguenther@suse.de>
6741
6742         PR tree-optimization/82473
6743         * tree-vect-loop.c (vectorizable_reduction): Properly get at
6744         the largest input type.
6745
6746 2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
6747
6748         * c-attribs.c (handle_nocf_check_attribute): New function.
6749         (c_common_attribute_table): Add 'nocf_check' handling.
6750         * gimple-parser.c: Add second argument NULL to
6751         gimple_build_call_from_tree.
6752         * attrib.c (comp_type_attributes): Check nocf_check attribute.
6753         * cfgexpand.c (expand_call_stmt): Set REG_CALL_NOCF_CHECK for
6754         call insn.
6755         * combine.c (distribute_notes): Add REG_CALL_NOCF_CHECK handling.
6756         * common.opt: Add fcf-protection flag.
6757         * emit-rtl.c (try_split): Add REG_CALL_NOCF_CHECK handling.
6758         * flag-types.h: Add enum cf_protection_level.
6759         * gimple.c (gimple_build_call_from_tree): Add second parameter.
6760         Add 'nocf_check' attribute propagation to gimple call.
6761         * gimple.h (gf_mask): Add GF_CALL_NOCF_CHECK.
6762         (gimple_build_call_from_tree): Update prototype.
6763         (gimple_call_nocf_check_p): New function.
6764         (gimple_call_set_nocf_check): Likewise.
6765         * gimplify.c: Add second argument to gimple_build_call_from_tree.
6766         * ipa-icf.c: Add nocf_check attribute in statement hash.
6767         * recog.c (peep2_attempt): Add REG_CALL_NOCF_CHECK handling.
6768         * reg-notes.def: Add REG_NOTE (CALL_NOCF_CHECK).
6769         * toplev.c (process_options): Add flag_cf_protection handling.
6770
6771 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
6772
6773         * x86-tune-costs.h (core_cost): Fix div, move and sqrt latencies.
6774
6775 2017-10-20  Richard Biener  <rguenther@suse.de>
6776
6777         PR tree-optimization/82603
6778         * tree-if-conv.c (predicate_mem_writes): Make sure to only
6779         remove false predicated stores.
6780
6781 2017-10-20  Richard Biener  <rguenther@suse.de>
6782
6783         * graphite-isl-ast-to-gimple.c
6784         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block):
6785         Remove return value and simplify, dump copied stmt after lhs
6786         adjustment.
6787         (translate_isl_ast_to_gimple::translate_isl_ast_node_user):
6788         Reduce dump verbosity.
6789         (gsi_insert_earliest): Likewise.
6790         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Adjust.
6791         * graphite.c (print_global_statistics): Adjust dumping.
6792         (print_graphite_scop_statistics): Likewise.
6793         (print_graphite_statistics): Do not dump loops here.
6794         (graphite_transform_loops): But here.
6795
6796 2017-10-20  Nicolas Roche  <roche@adacore.com>
6797
6798         * configure.ac (ACX_PROG_GNAT): Append "libgnat" to include search dir.
6799         * configure: Regenerate.
6800
6801 2017-10-20  Jakub Jelinek  <jakub@redhat.com>
6802
6803         PR target/82158
6804         * tree-cfg.c (pass_warn_function_return::execute): In noreturn
6805         functions when optimizing replace GIMPLE_RETURN stmts with
6806         calls to __builtin_unreachable ().
6807
6808         PR sanitizer/82595
6809         * config/gnu-user.h (LIBTSAN_EARLY_SPEC): Add libtsan_preinit.o
6810         for -fsanitize=thread link of executables.
6811         (LIBLSAN_EARLY_SPEC): Add liblsan_preinit.o for -fsanitize=leak
6812         link of executables.
6813
6814         PR target/82370
6815         * config/i386/sse.md (VI248_AVX2, VI248_AVX512BW, VI248_AVX512BW_2):
6816         New mode iterators.
6817         (<shift_insn><mode>3<mask_name>): Change the last of the 3
6818         define_insns for logical vector shifts to use VI248_AVX512BW
6819         iterator instead of VI48_AVX512, remove <mask_mode512bit_condition>
6820         condition, useless isa and prefix attributes.  Change the first
6821         2 of these define_insns to ...
6822         (<mask_codefor><shift_insn><mode>3<mask_name>): ... this, new
6823         define_insn for avx512vl.
6824         (<shift_insn><mode>3): ... and this, new define_insn without
6825         masking for non-avx512vl.
6826
6827         PR target/82370
6828         * config/i386/sse.md (*andnot<mode>3,
6829         <mask_codefor><code><mode>3<mask_name>, *<code><mode>3): Split
6830         (=v,v,vm) alternative into (=x,x,xm) and (=v,v,vm), for 128-bit
6831         and 256-bit vectors, the (=x,x,xm) alternative and when mask is
6832         not applied use empty suffix even for TARGET_AVX512VL.
6833         * config/i386/subst.md (mask_prefix3, mask_prefix4): When mask
6834         is applied, supply evex,evex or evex,evex,evex instead of just
6835         evex.
6836
6837 2017-10-20  Julia Koval  <julia.koval@intel.com>
6838
6839         * common/config/i386/i386-common.c (OPTION_MASK_ISA_GFNI_SET,
6840         (OPTION_MASK_ISA_GFNI_UNSET): New.
6841         (ix86_handle_option): Handle OPT_mgfni.
6842         * config/i386/cpuid.h (bit_GFNI): New.
6843         * config/i386/driver-i386.c (host_detect_local_cpu): Detect gfni.
6844         * config/i386/i386-c.c (ix86_target_macros_internal): Define __GFNI__.
6845         * config/i386/i386.c (ix86_target_string): Add -mgfni.
6846         (ix86_valid_target_attribute_inner_p): Add OPT_mgfni.
6847         * config/i386/i386.h (TARGET_GFNI, TARGET_GFNI_P): New.
6848         * config/i386/i386.opt: Add mgfni.
6849
6850 2017-10-20  Orlando Arias  <oarias@knights.ucf.edu>
6851
6852         * config/msp430/msp430.c (msp430_option_override): Disable
6853         -fdelete-null-pointer-checks.
6854         * doc/invoke.text (-fdelete-null-pointer-checks): Document that.
6855
6856 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
6857
6858         * x86-tune-costs.h (generic_cost, core_cost): Correct costs
6859         of x87 and SSE instructions.
6860
6861 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
6862
6863         * asan.c (create_cond_insert_point): Do not update edge count.
6864         * auto-profile.c (afdo_propagate_edge): Update for edge count removal.
6865         (afdo_propagate_circuit): Likewise.
6866         (afdo_calculate_branch_prob): Likewise.
6867         (afdo_annotate_cfg): Likewise.
6868         * basic-block.h (struct edge_def): Remove count.
6869         (edge_def::count): New accessor.
6870         * bb-reorder.c (rotate_loop): Update.
6871         (find_traces_1_round): Update.
6872         (connect_traces): Update.
6873         (sanitize_hot_paths): Update.
6874         * cfg.c (unchecked_make_edge): Update.
6875         (make_single_succ_edge): Update.
6876         (check_bb_profile): Update.
6877         (dump_edge_info): Update.
6878         (update_bb_profile_for_threading): Update.
6879         (scale_bbs_frequencies_int): Update.
6880         (scale_bbs_frequencies_gcov_type): Update.
6881         (scale_bbs_frequencies_profile_count): Update.
6882         (scale_bbs_frequencies): Update.
6883         * cfganal.c (connect_infinite_loops_to_exit): Update.
6884         * cfgbuild.c (compute_outgoing_frequencies): Update.
6885         (find_many_sub_basic_blocks): Update.
6886         * cfgcleanup.c (try_forward_edges): Update.
6887         (try_crossjump_to_edge): Update
6888         * cfgexpand.c (expand_gimple_cond): Update
6889         (expand_gimple_tailcall): Update
6890         (construct_exit_block): Update
6891         * cfghooks.c (verify_flow_info): Update
6892         (redirect_edge_succ_nodup): Update
6893         (split_edge): Update
6894         (make_forwarder_block): Update
6895         (duplicate_block): Update
6896         (account_profile_record): Update
6897         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
6898         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
6899         * cfgloopmanip.c (scale_loop_profile): Update.
6900         (loopify): Update.
6901         (lv_adjust_loop_entry_edge): Update.
6902         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
6903         (force_nonfallthru_and_redirect): Update.
6904         (purge_dead_edges): Update.
6905         (rtl_flow_call_edges_add): Update.
6906         * cgraphunit.c (init_lowered_empty_function): Update.
6907         (cgraph_node::expand_thunk): Update.
6908         * gimple-pretty-print.c (dump_probability): Update.
6909         (dump_edge_probability): Update.
6910         * gimple-ssa-isolate-paths.c (isolate_path): Update.
6911         * haifa-sched.c (sched_create_recovery_edges): Update.
6912         * hsa-gen.c (convert_switch_statements): Update.
6913         * ifcvt.c (dead_or_predicable): Update.
6914         * ipa-inline-transform.c (inline_transform): Update.
6915         * ipa-split.c (split_function): Update.
6916         * ipa-utils.c (ipa_merge_profiles): Update.
6917         * loop-doloop.c (add_test): Update.
6918         * loop-unroll.c (unroll_loop_runtime_iterations): Update.
6919         * lto-streamer-in.c (input_cfg): Update.
6920         (input_function): Update.
6921         * lto-streamer-out.c (output_cfg): Update.
6922         * modulo-sched.c (sms_schedule): Update.
6923         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
6924         * predict.c (maybe_hot_edge_p): Update.
6925         (unlikely_executed_edge_p): Update.
6926         (probably_never_executed_edge_p): Update.
6927         (dump_prediction): Update.
6928         (drop_profile): Update.
6929         (propagate_unlikely_bbs_forward): Update.
6930         (determine_unlikely_bbs): Update.
6931         (force_edge_cold): Update.
6932         * profile.c (compute_branch_probabilities): Update.
6933         * reg-stack.c (better_edge): Update.
6934         * shrink-wrap.c (handle_simple_exit): Update.
6935         * tracer.c (better_p): Update.
6936         * trans-mem.c (expand_transaction): Update.
6937         (split_bb_make_tm_edge): Update.
6938         * tree-call-cdce.c: Update.
6939         * tree-cfg.c (gimple_find_sub_bbs): Update.
6940         (gimple_split_edge): Update.
6941         (gimple_duplicate_sese_region): Update.
6942         (gimple_duplicate_sese_tail): Update.
6943         (gimple_flow_call_edges_add): Update.
6944         (insert_cond_bb): Update.
6945         (execute_fixup_cfg): Update.
6946         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update.
6947         * tree-complex.c (expand_complex_div_wide): Update.
6948         * tree-eh.c (lower_resx): Update.
6949         (unsplit_eh): Update.
6950         (cleanup_empty_eh_move_lp): Update.
6951         * tree-inline.c (copy_edges_for_bb): Update.
6952         (freqs_to_counts): Update.
6953         (copy_cfg_body): Update.
6954         * tree-ssa-dce.c (remove_dead_stmt): Update.
6955         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
6956         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
6957         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
6958         (unloop_loops): Update.
6959         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
6960         * tree-ssa-loop-split.c (connect_loops): Update.
6961         (split_loop): Update.
6962         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
6963         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
6964         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
6965         * tree-ssa-reassoc.c (branch_fixup): Update.
6966         * tree-ssa-tail-merge.c (replace_block_by): Update.
6967         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
6968         (compute_path_counts): Update.
6969         (update_profile): Update.
6970         (recompute_probabilities): Update.
6971         (update_joiner_offpath_counts): Update.
6972         (estimated_freqs_path): Update.
6973         (freqs_to_counts_path): Update.
6974         (clear_counts_path): Update.
6975         (ssa_fix_duplicate_block_edges): Update.
6976         (duplicate_thread_path): Update.
6977         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
6978         (case_bit_test_cmp): Update.
6979         (collect_switch_conv_info): Update.
6980         (gen_inbound_check): Update.
6981         (do_jump_if_equal): Update.
6982         (emit_cmp_and_jump_insns): Update.
6983         * tree-tailcall.c (decrease_profile): Update.
6984         (eliminate_tail_call): Update.
6985         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
6986         (vect_do_peeling): Update.
6987         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
6988         * ubsan.c (ubsan_expand_null_ifn): Update.
6989         (ubsan_expand_ptr_ifn): Update.
6990         * value-prof.c (gimple_divmod_fixed_value): Update.
6991         (gimple_mod_pow2): Update.
6992         (gimple_mod_subtract): Update.
6993         (gimple_ic): Update.
6994         (gimple_stringop_fixed_value): Update.
6995
6996 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
6997
6998         PR target/82618
6999         * config/i386/i386.md (sub to cmp): New peephole2 pattern.
7000
7001 2017-10-19  Alexander Monakov  <amonakov@ispras.ru>
7002
7003         PR rtl-optimization/82395
7004         * ira-color.c (allocno_priority_compare_func): Fix comparison step
7005         based on non_spilled_static_chain_regno_p.
7006
7007 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
7008
7009         * config/i386/i386.c (output_387_binary_op): Rewrite SSE part.
7010         (ix86_emit_mode_set): Rewrite insn mnemonic construction.
7011         (ix86_prepare_fp_compare_args): Redefine is_sse as bool.
7012
7013 2017-10-19  Martin Sebor  <msebor@redhat.com>
7014
7015         PR tree-optimization/82596
7016         * tree.c (array_at_struct_end_p): Handle STRING_CST.
7017
7018 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
7019
7020         * asan.c (handle_builtin_alloca): Deal with all alloca variants.
7021         (get_mem_refs_of_builtin_call): Likewise.
7022         * builtins.c (expand_builtin_apply): Adjust call to
7023         allocate_dynamic_stack_space.
7024         (expand_builtin_alloca): For __builtin_alloca_with_align_and_max, pass
7025         the third argument to allocate_dynamic_stack_space, otherwise -1.
7026         (expand_builtin): Deal with all alloca variants.
7027         (is_inexpensive_builtin): Likewise.
7028         * builtins.def (BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX): New.
7029         * calls.c (special_function_p): Deal with all alloca variants.
7030         (initialize_argument_information): Adjust call to
7031         allocate_dynamic_stack_space.
7032         (expand_call): Likewise.
7033         * cfgexpand.c (expand_call_stmt): Deal with all alloca variants.
7034         * doc/extend.texi (Built-ins): Add __builtin_alloca_with_align_and_max
7035         * explow.c (allocate_dynamic_stack_space): Add MAX_SIZE parameter and
7036         use it for the stack usage computation.
7037         * explow.h (allocate_dynamic_stack_space): Adjust prototype.
7038         * function.c (gimplify_parameters): Call build_alloca_call_expr.
7039         * gimple-ssa-warn-alloca.c (alloca_call_type): Simplify control flow.
7040         Take into account 3rd argument of __builtin_alloca_with_align_and_max.
7041         (in_loop_p): Remove first argument and useless check.
7042         (pass_walloca::execute): Remove useless test and adjust call to above.
7043         * gimple.c (gimple_build_call_from_tree): Deal with all alloc variants
7044         * gimplify.c (gimplify_vla_decl): Call build_alloca_call_expr.
7045         (gimplify_call_expr): Deal with all alloca variants.
7046         * hsa-gen.c (gen_hsa_alloca): Likewise.
7047         (gen_hsa_insns_for_call): Likewise.
7048         * ipa-pure-const.c (special_builtin_state): Likewise.
7049         * tree-chkp.c (chkp_build_returned_bound): Likewise.
7050         * tree-object-size.c (alloc_object_size): Likewise.
7051         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Likewise.
7052         (call_may_clobber_ref_p_1): Likewise.
7053         * tree-ssa-ccp.c (evaluate_stmt): Likewise.
7054         (ccp_fold_stmt): Likewise.
7055         (optimize_stack_restore): Likewise.
7056         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
7057         (mark_all_reaching_defs_necessary_1): Likewise.
7058         (propagate_necessity): Likewise.
7059         (eliminate_unnecessary_stmts): Likewise.
7060         * tree.c (build_common_builtin_nodes): Build
7061         BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX.
7062         (build_alloca_call_expr): New function.
7063         * tree.h (ALLOCA_FUNCTION_CODE_P): New macro.
7064         (CASE_BUILT_IN_ALLOCA): Likewise.
7065         (build_alloca_call_expr): Declare.
7066         * varasm.c (incorporeal_function_p): Deal with all alloca variants.
7067
7068 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
7069
7070         PR debug/82509
7071         * dwarf2out.c (new_die_raw): New static inline function.
7072         (new_die): Use it to create the DIE.
7073         (add_AT_external_die_ref): Likewise.
7074         (clone_die): Likewise.
7075         (clone_as_declaration): Likewise.
7076         (dwarf2out_vms_debug_main_pointer): Likewise.
7077         (base_type_die): Likewise.  Remove early return for corner cases.
7078         Do not call add_pubtype on the DIE here.
7079         (is_base_type): Remove ERROR_MARK and return 0 for VOID_TYPE.
7080         (modified_type_die): Adjust the lookup for reverse order DIEs.  Skip
7081         typedefs for base types with DW_AT_endianity.  Make sure a DIE with
7082         native order exists for base types, attach the DIE manually and call
7083         add_pubtype on it.  Do not equate a reverse order DIE to the type.
7084
7085 2017-10-19  Richard Earnshaw  <rearnsha@arm.com>
7086
7087         * config/arm/arm.c (align_ok_ldrd_strd): New function.
7088         (mem_ok_for_ldrd_strd): New parameter align.  Extract the alignment of
7089         the mem into it.
7090         (gen_operands_ldrd_strd): Validate the alignment of the accesses.
7091
7092 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
7093
7094         * flag-types.h (enum sanitize_code): Add SANITIZE_BUILTIN.  Or
7095         SANITIZE_BUILTIN into SANITIZE_UNDEFINED.
7096         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN,
7097         BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN_ABORT): New builtins.
7098         * opts.c (sanitizer_opts): Add builtin.
7099         * ubsan.c (instrument_builtin): New function.
7100         (pass_ubsan::execute): Call it.
7101         (pass_ubsan::gate): Enable even for SANITIZE_BUILTIN.
7102         * doc/invoke.texi: Document -fsanitize=builtin.
7103
7104         * ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
7105         builtins, store max (log2 (align), 0) into uchar field instead of
7106         align into uptr field.
7107         (ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
7108         store uchar 0 field instead of uptr 0 field.
7109         (instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
7110         instead of passing one address of struct with 2 locations pass
7111         two addresses of structs with 1 location each.
7112         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
7113         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
7114         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
7115         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
7116         (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
7117         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
7118         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
7119         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.
7120
7121 2017-10-19  Martin Liska  <mliska@suse.cz>
7122
7123         PR driver/81829
7124         * file-find.c (remove_prefix): Remove.
7125         * file-find.h (remove_prefix): Likewise.
7126         * gcc-ar.c: Remove smartness of lookup.
7127
7128 2017-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
7129
7130         * config/rs6000/rs6000.md (*call_indirect_aix<mode>,
7131         *call_value_indirect_aix<mode>, *call_indirect_elfv2<mode>,
7132         *call_value_indirect_elfv2<mode>): Add correct mode to the unspec.
7133
7134 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
7135
7136         PR target/82580
7137         * config/i386/i386.md (setcc + movzbl to xor + setcc): New peephole2.
7138         (setcc + and to xor + setcc): New peephole2.
7139
7140 2017-10-19  Tom de Vries  <tom@codesourcery.com>
7141
7142         * doc/sourcebuild.texi (Test Directives, Variants of
7143         dg-require-support): Add dg-require-stack-size.
7144
7145 2017-10-19  Martin Liska  <mliska@suse.cz>
7146
7147         PR sanitizer/82517
7148         * gimplify.c (gimplify_decl_expr): Do not instrument variables
7149         that have a large alignment.
7150         (gimplify_target_expr): Likewise.
7151
7152 2017-10-18  Segher Boessenkool  <segher@kernel.crashing.org>
7153
7154         PR rtl-optimization/82602
7155         * ira.c (rtx_moveable_p): Return false for volatile asm.
7156
7157 2017-10-18  Uros Bizjak  <ubizjak@gmail.com>
7158
7159         PR target/82580
7160         * config/i386/i386-modes.def (CCGZ): New CC mode.
7161         * config/i386/i386.md (sub<mode>3_carry_ccgz): New insn pattern.
7162         * config/i386/predicates.md (ix86_comparison_operator):
7163         Handle CCGZmode.
7164         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
7165         Emulate LE, LEU, GT, GTU, LT, LTU, GE and GEU double-word comparisons
7166         with double-word subtraction.
7167         (put_condition_code): Handle CCGZmode.
7168
7169 2017-10-18  Aldy Hernandez  <aldyh@redhat.com>
7170
7171         * wide-int.cc (debug (const wide_int &)): New.
7172         (debug (const wide_int *)): New.
7173         (debug (const widest_int &)): New.
7174         (debug (const widest_int *)): New.
7175
7176 2017-10-18  Vladimir Makarov  <vmakarov@redhat.com>
7177
7178         PR middle-end/82556
7179         * lra-constraints.c (curr_insn_transform): Use non-input operand
7180         instead of output one for matched reload.
7181
7182 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
7183
7184         * tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
7185         (tree-ssa-loop-ivopts.h): New header file.
7186         (struct builtin_info): New fields.
7187         (classify_builtin_1): Compute and record base and offset parts for
7188         memset builtin partition by calling strip_offset.
7189         (offset_cmp, fuse_memset_builtins): New functions.
7190         (finalize_partitions): Fuse adjacent memset partitions by calling
7191         above function.
7192         * tree-ssa-loop-ivopts.c (strip_offset): Delete static declaration.
7193         Expose the interface.
7194         * tree-ssa-loop-ivopts.h (strip_offset): New declaration.
7195
7196 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
7197
7198         PR tree-optimization/82574
7199         * tree-loop-distribution.c (find_single_drs): New parameter.  Check
7200         that data reference must be executed exactly once per iteration
7201         against the outermost loop in nest.
7202         (classify_partition): Update call to above function.
7203
7204 2017-10-18  Richard Biener  <rguenther@suse.de>
7205
7206         PR tree-optimization/82591
7207         * graphite.c (graphite_transform_loops): Move code gen message
7208         printing ...
7209         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
7210         Here.  Handle scop_to_isl_ast failing.
7211         (scop_to_isl_ast): Limit the number of ISL operations.
7212
7213 2017-10-18  Richard Biener  <rguenther@suse.de>
7214
7215         * graphite-isl-ast-to-gimple.c
7216         (translate_isl_ast_to_gimple::set_rename): Simplify.
7217         (translate_isl_ast_to_gimple::set_rename_for_each_def): Inline...
7218         (graphite_copy_stmts_from_block): ... here.
7219         (copy_bb_and_scalar_dependences): Simplify.
7220         (add_parameters_to_ivs_params): Canonicalize.
7221         (generate_entry_out_of_ssa_copies): Simplify.
7222         * graphite-sese-to-poly.c (extract_affine_name): Simplify
7223         by passing in ISL dimension.
7224         (parameter_index_in_region_1): Rename to ...
7225         (parameter_index_in_region): ... this.
7226         (extract_affine): Adjust assert, pass down parameter index.
7227         (add_param_constraints): Use range-info when available.
7228         (build_scop_context): Adjust.
7229         * sese.c (new_sese_info): Adjust.
7230         (free_sese_info): Likewise.
7231         * sese.h (bb_map_t, rename_map_t, phi_rename, init_back_edge_pair_t):
7232         Remove unused typedefs.
7233         (struct sese_info_t): Simplify rename_map, remove incomplete_phis.
7234
7235 2017-10-18  Martin Liska  <mliska@suse.cz>
7236
7237         * combine.c (simplify_compare_const): Add gcc_fallthrough.
7238
7239 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
7240
7241         * config/s390/s390.c (s390_bb_fallthru_entry_likely): New function.
7242         (s390_sched_init): Do not reset s390_sched_state if we entered the
7243         current basic block via a fallthru edge and all others are unlikely.
7244
7245 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
7246
7247         * config/s390/s390.c (NUM_SIDES): New variable.
7248         (LONGRUNNING_THRESHOLD): New variable.
7249         (LATENCY_FACTOR): New variable.
7250         (s390_sched_score): Decrease score for long-running instructions on
7251         wrong side.
7252         (s390_sched_variable_issue): Perform bookkeeping for long-running
7253         instructions.
7254
7255 2017-10-18  Richard Biener  <rguenther@suse.de>
7256
7257         * graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_ast_expr_id):
7258         Simplify with removal of the parameter rename map.
7259         (set_rename): Likewise.
7260         (should_copy_to_new_region): Likewise.
7261         (graphite_copy_stmts_from_block): Likewise.
7262         (copy_bb_and_scalar_dependences): Remove initialization of
7263         unused copied_bb_map.
7264         (copy_def): Remove.
7265         (copy_internal_parameters): Likewise.
7266         (graphite_regenerate_ast_isl): Do not call copy_internal_parameters.
7267         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7268         Use INTEGRAL_TYPE_P.
7269         (parameter_index_in_region_1): Rename to ...
7270         (assign_parameter_index_in_region): ... this.  Assert we have
7271         a parameter we handle.
7272         (scan_tree_for_params): Adjust.
7273         * sese.h (parameter_rename_map_t): Remove.
7274         (struct sese_info_t): Remove unused parameter_rename_map and
7275         copied_bb_map members.
7276         * sese.c (new_sese_info): Adjust.
7277         (free_sese_info): Likewise.
7278
7279 2017-10-18  Martin Liska  <mliska@suse.cz>
7280
7281         PR sanitizer/82545
7282         * asan.c (asan_expand_poison_ifn): Do not put gimple stmt
7283         on an abnormal edge.
7284
7285 2017-10-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7286
7287         * doc/invoke.texi (ffunction-sections and fdata-sections):
7288         Update.
7289
7290 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
7291
7292         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if
7293         the use statement can throw internally.
7294
7295 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
7296
7297         * config/visium/visium.c (visium_select_cc_mode): Return CCmode for
7298         any RTX present on the RHS of a SET.
7299         * compare-elim.c (try_eliminate_compare): Restore comment.
7300
7301 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
7302
7303         * langhooks.h (struct lang_hooks): Document that tree_size langhook
7304         may be also called on tcc_type nodes.
7305         * langhooks.c (lhd_tree_size): Likewise.
7306
7307 2017-10-17  David Malcolm  <dmalcolm@redhat.com>
7308
7309         * gimple-ssa-sprintf.c (fmtwarn): Update for changed signature of
7310         format_warning_at_substring.
7311         (maybe_warn): Convert source_range * param to a location_t.  Pass
7312         UNKNOWN_LOCATION rather than NULL to fmtwarn.
7313         (format_directive): Remove code to extract source_ranges and
7314         source_range * in favor of just a location_t.
7315         (parse_directive): Pass UNKNOWN_LOCATION rather than NULL to
7316         fmtwarn.
7317         * substring-locations.c (format_warning_va): Convert
7318         source_range * param to a location_t.
7319         (format_warning_at_substring): Likewise.
7320         * substring-locations.h (format_warning_va): Likewise.
7321         (format_warning_at_substring): Likewise.
7322
7323 2017-10-17  Jan Hubicka  <hubicka@ucw.cz>
7324
7325         * target.h (enum vect_cost_for_stmt): Add vec_gather_load and
7326         vec_scatter_store
7327         * tree-vect-stmts.c (record_stmt_cost): Make difference between normal
7328         and scatter/gather ops.
7329
7330         * aarch64/aarch64.c (aarch64_builtin_vectorization_cost): Add
7331         vec_gather_load and vec_scatter_store.
7332         * arm/arm.c (arm_builtin_vectorization_cost): Likewise.
7333         * powerpcspe/powerpcspe.c (rs6000_builtin_vectorization_cost): Likewise.
7334         * rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Likewise.
7335         * s390/s390.c (s390_builtin_vectorization_cost): Likewise.
7336         * spu/spu.c (spu_builtin_vectorization_cost): Likewise.
7337         * i386/i386.c (x86_builtin_vectorization_cost): Likewise.
7338
7339 2017-10-17  Uros Bizjak  <ubizjak@gmail.com>
7340
7341         * reg-stack.c (compare_for_stack_reg): Add bool argument.
7342         Detect FTST instruction and handle its register pops.  Only pop
7343         second operand if can_pop_second_op is true.
7344         (subst_stack_regs_pat) <case COMPARE>: Detect FCOMI instruction to
7345         set can_pop_second_op to false in the compare_for_stack_reg call.
7346
7347         * config/i386/i386.md (*cmpi<FPCMP:unord><MODEF:mode>): Only call
7348         output_fp_compare for stack register operands.
7349         * config/i386/i386.c (output_fp_compare): Do not output SSE compare
7350         instructions here.  Do not emit stack register pops here.  Assert
7351         that FCOMPP pops next to top stack register.  Rewrite function.
7352
7353 2017-10-17  Nathan Sidwell  <nathan@acm.org>
7354
7355         PR middle-end/82577
7356         * alias.c (compare_base_decls): Check HAS_DECL_ASSEMBLER_NAME_P,
7357         use DECL_ASSEMBLER_NAME_RAW.
7358
7359         PR middle-end/82546
7360         * tree.c (tree_code_size): Reformat.  Punt to lang hook for unknown
7361         TYPE nodes.
7362
7363 2017-10-17  Qing Zhao <qing.zhao@oracle.com>
7364             Wilco Dijkstra <wilco.dijkstra@arm.com>
7365
7366         * builtins.c (expand_builtin_update_setjmp_buf): Add a
7367         converstion to Pmode from the buf_addr.
7368
7369 2017-10-17  Richard Biener  <rguenther@suse.de>
7370
7371         * graphite-dependences.c (scop_get_reads_and_writes): Change
7372         output parameters to references.
7373
7374 2017-10-17  Jackson Woodruff  <jackson.woodruff@arm.com>
7375
7376         PR 71026/tree-optimization
7377         * fold-const.c (distribute_real_division): Removed.
7378         (fold_binary_loc): Remove calls to distribute_real_divison.
7379
7380 2017-10-17  Richard Biener  <rguenther@suse.de>
7381
7382         * graphite-scop-detection.c
7383         (scop_detection::stmt_has_simple_data_refs_p): Always use
7384         the full nest as region.
7385         (try_generate_gimple_bb): Likewise.
7386         * sese.c (scalar_evolution_in_region): Simplify now that
7387         SCEV can handle instantiation in regions.
7388         * tree-scalar-evolution.c (instantiate_scev_name): Also instantiate
7389         in the non-loop part of a function if requested.
7390
7391 2017-10-17  Richard Biener  <rguenther@suse.de>
7392
7393         PR tree-optimization/82563
7394         * graphite-isl-ast-to-gimple.c (generate_entry_out_of_ssa_copies):
7395         New function.
7396         (graphite_regenerate_ast_isl): Call it.
7397         * graphite-scop-detection.c (build_scops): Remove entry edge split.
7398
7399 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
7400
7401         PR tree-optimization/82549
7402         * fold-const.c (optimize_bit_field_compare, fold_truth_andor_1):
7403         Formatting fixes.  Instead of calling make_bit_field_ref with negative
7404         bitpos return 0.
7405
7406 2017-10-17  Olga Makhotina  <olga.makhotina@intel.com>
7407
7408         * config/i386/avx512dqintrin.h (_mm_mask_reduce_sd,
7409         _mm_maskz_reduce_sd, _mm_mask_reduce_ss,=20
7410         _mm_maskz_reduce_ss): New.
7411         * config/i386/i386-builtin.def (__builtin_ia32_reducesd_mask,
7412         __builtin_ia32_reducess_mask): Ditto..
7413         (__builtin_ia32_reducesd, __builtin_ia32_reducess): Remove.
7414         * config/i386/sse.md (reduces<mode>): Renamed to ...
7415         (reduces<mode><mask_scalar_name>): ... this.
7416         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}):
7417         Changed to ...
7418         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0<mask_scalar_operand4>|
7419         %0<mask_scalar_operand4>, %1, %2, %3}): ... this.
7420
7421 2017-10-16  David Malcolm  <dmalcolm@redhat.com>
7422
7423         * Makefile.in (OBJS): Add unique-ptr-tests.o.
7424         * selftest-run-tests.c (selftest::run_tests): Call
7425         selftest::unique_ptr_tests_cc_tests.
7426         * selftest.h (selftest::unique_ptr_tests_cc_tests): New decl.
7427         * unique-ptr-tests.cc: New file.
7428
7429 2017-10-16  Vladimir Makarov  <vmakarov@redhat.com>
7430
7431         PR sanitizer/82353
7432         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
7433         locations.
7434         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
7435         (make_hard_regno_born, make_hard_regno_dead): Update
7436         bb_killed_pseudos and bb_gen_pseudos for fixed regs.
7437
7438 2017-10-16  Jeff Law  <law@redhat.com>
7439
7440         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
7441
7442 2017-10-16  Jan Hubicka  <hubicka@ucw.cz>
7443
7444         * x86-tune-costs.h (znver1_cost): Fix move cost tables.
7445
7446 2017-10-16  Olivier Hainque  <hainque@adacore.com>
7447
7448         * gcc/config.gcc (powerpc*-*-*spe*): Pick 8548 as the default
7449         with_cpu if we were configured for an e500v2 target cpu name.
7450
7451 2017-10-16  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7452
7453         * config/arm/arm-cpus.in (cortex-m33): Add nodsp option.
7454         * doc/invoke.texi: Document +nodsp as a valid extension for
7455         -mcpu=cortex-m33.
7456
7457 2017-10-16  Martin Liska  <mliska@suse.cz>
7458
7459         * sbitmap.c (bitmap_bit_in_range_p_checking): New function.
7460         (test_set_range): Likewise.
7461         (test_range_functions): Rename to ...
7462         (test_bit_in_range): ... this.
7463         (sbitmap_c_tests): Add new test.
7464
7465 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
7466
7467         * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32):
7468         New.
7469         (vdot_lane_u32, vdot_laneq_u32, vdotq_lane_u32, vdotq_laneq_u32): New.
7470         (vdot_lane_s32, vdot_laneq_s32, vdotq_lane_s32, vdotq_laneq_s32): New.
7471
7472 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
7473
7474         * config/aarch64/aarch64-builtins.c
7475         (aarch64_types_quadopu_lane_qualifiers): New.
7476         (TYPES_QUADOPU_LANE): New.
7477         * config/aarch64/aarch64-simd.md (aarch64_<sur>dot<vsi2qi>): New.
7478         (<sur>dot_prod<vsi2qi>, aarch64_<sur>dot_lane<vsi2qi>): New.
7479         (aarch64_<sur>dot_laneq<vsi2qi>): New.
7480         * config/aarch64/aarch64-simd-builtins.def (sdot, udot): New.
7481         (sdot_lane, udot_lane, sdot_laneq, udot_laneq): New.
7482         * config/aarch64/iterators.md (sur): Add UNSPEC_SDOT, UNSPEC_UDOT.
7483         (Vdottype, DOTPROD): New.
7484         (sur): Add SDOT and UDOT.
7485
7486 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
7487
7488         * config/aarch64/aarch64.h (AARCH64_FL_DOTPROD): New.
7489         (AARCH64_ISA_DOTPROD, TARGET_DOTPROD): New.
7490         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
7491         Add TARGET_DOTPROD.
7492         * config/aarch64/aarch64-option-extensions.def (dotprod): New.
7493         * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75):
7494         Enable TARGET_DOTPROD.
7495         (cortex-a75.cortex-a55): Likewise.
7496         * doc/invoke.texi (aarch64-feature-modifiers): Document dotprod.
7497
7498 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
7499
7500         * config/arm/arm-builtins.c (arm_unsigned_uternop_qualifiers): New.
7501         (UTERNOP_QUALIFIERS, arm_umac_lane_qualifiers, UMAC_LANE_QUALIFIERS):
7502         New.
7503         * config/arm/arm_neon_builtins.def (sdot, udot, sdot_lane, udot_lane):
7504         New.
7505         * config/arm/iterators.md (DOTPROD, VSI2QI, vsi2qi): New.
7506         (UNSPEC_DOT_S, UNSPEC_DOT_U, opsuffix): New.
7507         * config/arm/neon.md (neon_<sup>dot<vsi2qi>): New.
7508         (neon_<sup>dot_lane<vsi2qi>, <sup>dot_prod<vsi2qi>): New.
7509         * config/arm/types.md (neon_dot, neon_dot_q): New.
7510         * config/arm/unspecs.md (sup): Add UNSPEC_DOT_S, UNSPEC_DOT_U.
7511
7512 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
7513
7514         * config/arm/arm.h (TARGET_DOTPROD): New.
7515         * config/arm/arm.c (arm_arch_dotprod): New.
7516         (arm_option_reconfigure_globals): Add arm_arch_dotprod.
7517         * config/arm/arm-c.c (__ARM_FEATURE_DOTPROD): New.
7518         * config/arm/arm-cpus.in (armv8.2-a): Enabled +dotprod.
7519         (feature dotprod, group dotprod, ALL_SIMD_INTERNAL): New.
7520         (ALL_FPU_INTERNAL): Use ALL_SIMD_INTERNAL.
7521         * config/arm/t-multilib (v8_2_a_simd_variants): Add dotprod.
7522         * doc/invoke.texi (armv8.2-a): Document dotprod
7523
7524 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
7525
7526         * i386.c (ix86_vec_cost): New function.
7527         (ix86_rtx_costs): Handle vector operations better.
7528         * i386.h (struct processor_costs): Add sse_op, fmasd, fmass.
7529         * x86-tune-costs.h: Add new costs to all tables.
7530
7531 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
7532
7533         * i386.c (ix86_rtx_costs): Make difference between x87 and SSE
7534         operations.
7535         * i386.h (struct processor_costs): Add addss, mulss, mulsd, divss,
7536         divsd, sqrtss and sqrtsd
7537         * x86-tune-costs.h: Add new entries to all costs.
7538         (znver1_cost): Fix to match real instruction latencies.
7539
7540 2017-10-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7541             Michael Collison <michael.collison@arm.com>
7542
7543         * compare-elim.c: Include emit-rtl.h.
7544         (can_merge_compare_into_arith): New function.
7545         (try_validate_parallel): Likewise.
7546         (try_merge_compare): Likewise.
7547         (try_eliminate_compare): Call the above when no previous clobber
7548         is available.
7549         (execute_compare_elim_after_reload): Add DF_UD_CHAIN and DF_DU_CHAIN
7550         dataflow problems.
7551
7552 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
7553
7554         PR middle-end/62263
7555         PR middle-end/82498
7556         * tree-ssa-phiopt.c (value_replacement): Comment fix.  Handle
7557         up to 2 preparation statements for ASSIGN in MIDDLE_BB.
7558
7559         PR middle-end/62263
7560         PR middle-end/82498
7561         * tree-ssa-forwprop.c (simplify_rotate): Allow def_arg1[N]
7562         to be any operand_equal_p operands.  For & (B - 1) require
7563         B to be power of 2.  Recognize
7564         (X << (Y & (B - 1))) | (X >> ((-Y) & (B - 1))) and similar patterns.
7565
7566 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
7567
7568         PR bootstrap/82553
7569         * optabs.c (expand_memory_blockage): Fix call of
7570         targetm.have_memory_blockage.
7571
7572 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
7573
7574         PR bootstrap/82548
7575         * config.gcc (*-*-solaris2*, i[34567]86-*-cygwin*,
7576         x86_64-*-cygwin*, i[34567]86-*-mingw* | x86_64-*-mingw*): Append
7577         objects to extra_objs instead of overwriting it.
7578
7579 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
7580
7581         * config/i386/sync.md (FILD_ATOMIC/FIST_ATOMIC FP load peephole2):
7582         Use any_fp_register_operand as operand[3] predicate.  Simplify
7583         equality test for operands[2] and operands[4] memory location.
7584         (LDX_ATOMIC/STX_ATOMIC FP load peephole2): Ditto.
7585         (FILD_ATOMIC/FIST_ATOMIC FP load peephole2 with mem blockage): New.
7586         (LDX_ATOMIC/LDX_ATOMIC FP load peephole2 with mem blockage): Ditto.
7587         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2): Use
7588         any_fp_register_operand as operand[1] predicate.  Simplify
7589         equality test for operands[0] and operands[3] memory location.
7590         (LDX_ATOMIC/STX_ATOMIC FP store peephole2): Ditto.
7591         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2 with mem blockage): New.
7592         (LDX_ATOMIC/LDX_ATOMIC FP storepeephole2 with mem blockage): Ditto.
7593
7594 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
7595
7596         * target-insns.def: Add memory_blockage.
7597         * optabs.c (expand_memory_blockage): New function.
7598         (expand_asm_memory_barrier): Rename ...
7599         (expand_asm_memory_blockage): ... to this.
7600         (expand_mem_thread_fence): Call expand_memory_blockage
7601         instead of expand_asm_memory_barrier.
7602         (expand_mem_singnal_fence): Ditto.
7603         (expand_atomic_load): Ditto.
7604         (expand_atomic_store): Ditto.
7605         * doc/md.texi (Standard Pattern Names For Generation):
7606         Document memory_blockage instruction pattern.
7607
7608 2017-10-13  Sebastian Perta  <sebastian.perta@renesas.com>
7609
7610         * config/rl78/rl78.c (rl78_emit_libcall): New function.
7611         * config/rl78/rl78-protos.h (rl78_emit_libcall): New function.
7612         * config/rl78/rl78.md: New define_expand "adddi3".
7613
7614 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
7615
7616         * cfghooks.c (verify_flow_info): Disable check that all probabilities
7617         are set correctly.
7618
7619 2017-10-13  Jeff Law  <law@redhat.com>
7620
7621         * tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly.
7622
7623 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
7624
7625         PR target/82274
7626         * internal-fn.c (expand_mul_overflow): If both operands have
7627         the same highpart of -1 or 0 and the topmost bit of lowpart
7628         is different, overflow is if res <= 0 rather than res < 0.
7629
7630 2017-10-13  Pat Haugen  <pthaugen@us.ibm.com>
7631
7632         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Remove
7633         TARGET_P9_VECTOR code for unaligned_load case.
7634
7635 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
7636
7637         * cfghooks.c (verify_flow_info): Check that edge probabilities are set.
7638
7639 2017-10-13  Nathan Sidwell  <nathan@acm.org>
7640
7641         * tree-core.h (tree_contains_struct): Make bool.
7642         * tree.c (tree_contains_struct): Likewise.
7643         * tree.h (MARK_TS_BASE): Remove do ... while (0) idiom.
7644         (MARK_TS_TYPED, MARK_TS_COMMON, MARK_TS_TYPE_COMMON,
7645         MARK_TS_TYPE_WITH_LANG_SPECIFIC, MARK_TS_DECL_MINIMAL,
7646         MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL, MARK_TS_DECL_WITH_VIS,
7647         MARK_TS_DECL_NON_COMMON): Likewise, use comma operator.
7648
7649 2017-10-13  Richard Biener  <rguenther@suse.de>
7650
7651         * graphite-isl-ast-to-gimple.c
7652         (translate_isl_ast_to_gimple::get_rename_from_scev): Remove unused
7653         parameters and dominance check.
7654         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block): Adjust.
7655         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Likewise.
7656         (translate_isl_ast_to_gimple::graphite_regenerate_ast_isl):
7657         Do not update SSA form here or do intermediate IL verification.
7658         * graphite.c: Include tree-ssa.h and tree-into-ssa.h.
7659         (graphite_initialize): Remove check on the number of loops in
7660         the function and inline into graphite_transform_loops.
7661         (graphite_finalize): Inline into graphite_transform_loops.
7662         (graphite_transform_loops): Perform SSA update and IL verification
7663         here.
7664         * params.def (PARAM_GRAPHITE_MIN_LOOPS_PER_FUNCTION): Remove.
7665
7666 2017-10-13  Richard Biener  <rguenther@suse.de>
7667
7668         * graphite-isl-ast-to-gimple.c (max_mode_int_precision,
7669         graphite_expression_type_precision): Avoid global constructor
7670         by moving ...
7671         (translate_isl_ast_to_gimple::translate_isl_ast_to_gimple): Here.
7672         (translate_isl_ast_to_gimple::graphite_expr_type): Add type member.
7673         (translate_isl_ast_to_gimple::translate_isl_ast_node_for): Use it.
7674         (translate_isl_ast_to_gimple::build_iv_mapping): Likewise.
7675         (translate_isl_ast_to_gimple::graphite_create_new_guard): Likewise.
7676         * graphite-sese-to-poly.c (build_original_schedule): Return nothing.
7677
7678 2017-10-13  H.J. Lu  <hongjiu.lu@intel.com>
7679
7680         PR target/82499
7681         * config/i386/i386.h (ix86_red_zone_size): New.
7682         * config/i386/i386.md (push peephole2s): Replace
7683         "!ix86_using_red_zone ()" with "ix86_red_zone_size == 0".
7684
7685 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
7686             Alan Hayward  <alan.hayward@arm.com>
7687             David Sherwood  <david.sherwood@arm.com>
7688
7689         * combine.c (can_change_dest_mode): Reject changes in
7690         REGMODE_NATURAL_SIZE.
7691
7692 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
7693             Alan Hayward  <alan.hayward@arm.com>
7694             David Sherwood  <david.sherwood@arm.com>
7695
7696         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_BITSIZE.
7697         (expand_debug_source_expr): Likewise.
7698         * combine.c (combine_simplify_rtx): Likewise.
7699         * cse.c (fold_rtx): Likewise.
7700         * fwprop.c (canonicalize_address): Likewise.
7701         * targhooks.c (default_shift_truncation_mask): Likewise.
7702
7703 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
7704             Alan Hayward  <alan.hayward@arm.com>
7705             David Sherwood  <david.sherwood@arm.com>
7706
7707         * optabs.c (add_equal_note): Use GET_MODE_UNIT_SIZE.
7708         (widened_mode): Likewise.
7709         (expand_unop): Likewise.
7710         * ree.c (transform_ifelse): Likewise.
7711         (merge_def_and_ext): Likewise.
7712         (combine_reaching_defs): Likewise.
7713         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
7714
7715 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
7716             Alan Hayward  <alan.hayward@arm.com>
7717             David Sherwood  <david.sherwood@arm.com>
7718
7719         * caller-save.c (replace_reg_with_saved_mem): Use byte_lowpart_offset.
7720         * combine.c (gen_lowpart_for_combine): Likewise.
7721         * dwarf2out.c (rtl_for_decl_location): Likewise.
7722         * final.c (alter_subreg): Likewise.
7723         * rtlhooks.c (gen_lowpart_general): Likewise.
7724         (gen_lowpart_if_possible): Likewise.
7725
7726 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
7727             Alan Hayward  <alan.hayward@arm.com>
7728             David Sherwood  <david.sherwood@arm.com>
7729
7730         * calls.c (expand_call): Use subreg_lowpart_offset.
7731         * cse.c (cse_insn): Likewise.
7732         * regcprop.c (copy_value): Likewise.
7733         (copyprop_hardreg_forward_1): Likewise.
7734
7735 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
7736
7737         PR target/82524
7738         * config/i386/i386.md (addqi_ext_1, andqi_ext_1,
7739         *andqi_ext_1_cc, *<code>qi_ext_1, *xorqi_ext_1_cc): Change
7740         =Q constraints to +Q and into insn condition add check
7741         that operands[0] and operands[1] are equal.
7742         (*addqi_ext_2, *andqi_ext_2, *<code>qi_ext_2): Change
7743         =Q constraints to +Q and into insn condition add check
7744         that operands[0] is equal to either operands[1] or operands[2].
7745
7746         PR target/82498
7747         * fold-const.c (fold_binary_loc) <bit_rotate>: Code cleanups,
7748         instead of handling MINUS_EXPR twice (once for each argument),
7749         canonicalize operand order and handle just once, use rtype where
7750         possible.  Handle (A << B) | (A >> (-B & (Z - 1))).
7751
7752         PR target/82498
7753         * config/i386/ia32intrin.h (__rold, __rord, __rolq, __rorq): Allow
7754         any values of __C while still being pattern recognizable as a simple
7755         rotate instruction.
7756
7757 2017-10-13  Richard Biener  <rguenther@suse.de>
7758
7759         PR tree-optimization/82451
7760         Revert
7761         2017-10-02  Richard Biener  <rguenther@suse.de>
7762
7763         PR tree-optimization/82355
7764         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
7765         a mapping for the enclosing loop but avoid generating one for
7766         the loop tree root.
7767         (copy_bb_and_scalar_dependences): Remove premature codegen
7768         error on PHIs in blocks duplicated into multiple places.
7769         * graphite-scop-detection.c
7770         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
7771         in the region use it as loop and nest to analyze the DR in.
7772         (try_generate_gimple_bb): Likewise.
7773         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
7774         (add_loop_constraints): For blocks in a loop not in the region
7775         create a dimension with a single iteration.
7776         * sese.h (gbb_loop_at_index): Remove assert.
7777
7778         * cfgloop.c (loop_preheader_edge): For the loop tree root
7779         return the single successor of the entry block.
7780         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
7781         Reset the SCEV hashtable and niters.
7782         * graphite-scop-detection.c
7783         (scop_detection::graphite_can_represent_scev): Add SCOP parameter,
7784         assert that we only have POLYNOMIAL_CHREC that vary in loops
7785         contained in the region.
7786         (scop_detection::graphite_can_represent_expr): Adjust.
7787         (scop_detection::stmt_has_simple_data_refs_p): For loops
7788         not in the region set loop to NULL.  The nest is now the
7789         entry edge to the region.
7790         (try_generate_gimple_bb): Likewise.
7791         * sese.c (scalar_evolution_in_region): Adjust for
7792         instantiate_scev change.
7793         * tree-data-ref.h (graphite_find_data_references_in_stmt):
7794         Make nest parameter the edge into the region.
7795         (create_data_ref): Likewise.
7796         * tree-data-ref.c (dr_analyze_indices): Make nest parameter an
7797         entry edge into a region and adjust instantiate_scev calls.
7798         (create_data_ref): Likewise.
7799         (graphite_find_data_references_in_stmt): Likewise.
7800         (find_data_references_in_stmt): Pass the loop preheader edge
7801         from the nest argument.
7802         * tree-scalar-evolution.h (instantiate_scev): Make instantiate_below
7803         parameter the edge into the region.
7804         (instantiate_parameters): Use the loop preheader edge as entry.
7805         * tree-scalar-evolution.c (analyze_scalar_evolution): Handle
7806         NULL loop.
7807         (get_instantiated_value_entry): Make instantiate_below parameter
7808         the edge into the region.
7809         (instantiate_scev_name): Likewise.  Adjust dominance checks,
7810         when we cannot use loop-based instantiation instantiate by
7811         walking use-def chains.
7812         (instantiate_scev_poly): Adjust.
7813         (instantiate_scev_binary): Likewise.
7814         (instantiate_scev_convert): Likewise.
7815         (instantiate_scev_not): Likewise.
7816         (instantiate_array_ref): Remove.
7817         (instantiate_scev_3): Likewise.
7818         (instantiate_scev_2): Likewise.
7819         (instantiate_scev_1): Likewise.
7820         (instantiate_scev_r): Do not blindly handle N-operand trees.
7821         Do not instantiate array-refs.  Handle all constants and invariants.
7822         (instantiate_scev): Make instantiate_below parameter
7823         the edge into the region.
7824         (resolve_mixers): Use the loop preheader edge for the region
7825         parameter to instantiate_scev_r.
7826         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Adjust.
7827
7828 2017-10-13  Richard Biener  <rguenther@suse.de>
7829
7830         PR tree-optimization/82525
7831         * graphite-isl-ast-to-gimple.c
7832         (translate_isl_ast_to_gimple::widest_int_from_isl_expr_int): Split
7833         out from ...
7834         (translate_isl_ast_to_gimple::gcc_expression_from_isl_expr_int): Here.
7835         Fail code generation when we cannot represent the isl integer.
7836         (binary_op_to_tree): Elide modulo operations that are no-ops
7837         in the type we code generate.  Remove now superfluous code
7838         generation errors.
7839
7840 2017-10-13  Richard Biener  <rguenther@suse.de>
7841
7842         * graphite-scop-detection.c (loop_ivs_can_be_represented): Remove.
7843         (scop_detection::harmful_loop_in_region): Remove premature
7844         IV type restriction.
7845         (scop_detection::graphite_can_represent_scev): We can handle
7846         pointer IVs just fine.
7847
7848 2017-10-13  Alan Modra  <amodra@gmail.com>
7849
7850         * doc/extend.texi (Extended Asm <Clobbers>): Rename to
7851         "Clobbers and Scratch Registers".  Add paragraph on
7852         alternative to clobbers for scratch registers and OpenBLAS
7853         example.
7854
7855 2017-10-13  Alan Modra  <amodra@gmail.com>
7856
7857         * doc/extend.texi (Clobbers): Correct vax example.  Delete old
7858         example of a memory input for a string of known length.  Move
7859         commentary out of table.  Add a number of new examples
7860         covering array memory inputs.
7861
7862 2017-10-12  Martin Liska  <mliska@suse.cz>
7863
7864         PR tree-optimization/82493
7865         * sbitmap.c (bitmap_bit_in_range_p): Fix the implementation.
7866         (test_range_functions): New function.
7867         (sbitmap_c_tests): Likewise.
7868         * selftest-run-tests.c (selftest::run_tests): Run new tests.
7869         * selftest.h (sbitmap_c_tests): New function.
7870
7871         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
7872
7873 2017-10-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
7874
7875         * config/rs6000/amo.h: Fix spacing issue.
7876
7877 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
7878
7879         PR target/82498
7880         * config/i386/i386.md (*ashl<mode>3_mask_1,
7881         *<shift_insn><mode>3_mask_1, *<rotate_insn><mode>3_mask_1,
7882         *<btsc><mode>_mask_1, *btr<mode>_mask_1): New define_insn_and_split
7883         patterns.
7884
7885 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
7886
7887         * profile-count.h (safe_scale_64bit): Fix GCC4.x path.
7888         (profile_probability): Set max_probability
7889         to (uint32_t) 1 << (n_bits - 2) and update accessors to avoid overlfows
7890         in temporaries.
7891         * profile-count.c (profile_probability::differs_from_p): Do not
7892         rely on max_probaiblity == 10000
7893
7894 2017-10-12  Jeff Law  <law@redhat.com>
7895
7896         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject ao_refs with
7897         negative offsets.
7898
7899 2017-10-12  Martin Sebor  <msebor@redhat.com>
7900
7901         PR other/82301
7902         PR c/82435
7903         * cgraphunit.c (maybe_diag_incompatible_alias): New function.
7904         (handle_alias_pairs): Call it.
7905         * common.opt (-Wattribute-alias): New option.
7906         * doc/extend.texi (ifunc attribute): Discuss C++ specifics.
7907         * doc/invoke.texi (-Wattribute-alias): Document.
7908
7909 2017-10-12  Vladimir Makarov  <vmakarov@redhat.com>
7910
7911         Revert
7912         2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
7913         PR sanitizer/82353
7914         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
7915         locations.
7916         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
7917         (make_hard_regno_born, make_hard_regno_dead): Update
7918         bb_killed_pseudos and bb_gen_pseudos.
7919
7920 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
7921
7922         * config/i386/x86-tune-sched.c (ix86_adjust_cost): Fix Zen support.
7923
7924 2017-10-12  Uros Bizjak  <ubizjak@gmail.com>
7925
7926         * config/alpha/alpha.c (alpha_split_conditional_move):
7927         Use std::swap instead of manually swapping.
7928         (alpha_stdarg_optimize_hook): Ditto.
7929         (alpha_canonicalize_comparison): Ditto.
7930
7931 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
7932
7933         * tree-loop-distribution.c (struct builtin_info): New struct.
7934         (struct partition): Refactor fields into struct builtin_info.
7935         (partition_free): Free struct builtin_info.
7936         (build_size_arg_loc, build_addr_arg_loc): Delete.
7937         (generate_memset_builtin, generate_memcpy_builtin): Get memory range
7938         information from struct builtin_info.
7939         (find_single_drs): New function refactored from classify_partition.
7940         Also moved builtin validity checks to this function.
7941         (compute_access_range, alloc_builtin): New functions.
7942         (classify_builtin_st, classify_builtin_ldst): New functions.
7943         (classify_partition): Refactor code into functions find_single_drs,
7944         classify_builtin_st and classify_builtin_ldst.
7945         (distribute_loop): Don't do runtime alias check when distributing
7946         loop nest.
7947         (find_seed_stmts_for_distribution): New function.
7948         (pass_loop_distribution::execute): Refactor code finding seed
7949         stmts into above function.  Support distribution for the innermost
7950         two-level loop nest.  Adjust dump information.
7951
7952 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
7953
7954         * tree-loop-distribution.c: Adjust the general comment.
7955         (NUM_PARTITION_THRESHOLD): New macro.
7956         (ssa_name_has_uses_outside_loop_p): Support loop nest distribution.
7957         (classify_partition): Skip builtin pattern of loop nest's inner loop.
7958         (merge_dep_scc_partitions): New parameter ignore_alias_p and use it
7959         in call to build_partition_graph.
7960         (finalize_partitions): New parameter.  Make loop distribution more
7961         conservative by fusing more partitions.
7962         (distribute_loop): Don't do runtime alias check in case of loop nest
7963         distribution.
7964         (find_seed_stmts_for_distribution): New function.
7965         (prepare_perfect_loop_nest): New function.
7966         (pass_loop_distribution::execute): Refactor code finding seed stmts
7967         and loop nest into above functions.  Support loop nest distribution.
7968         Adjust dump information accordingly.
7969
7970 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
7971
7972         * tree-loop-distribution.c (break_alias_scc_partitions): Add comment
7973         and set PTYPE_SEQUENTIAL for merged partition.
7974
7975 2017-10-12  Richard Biener  <rguenther@suse.de>
7976
7977         PR tree-optimization/69728
7978         Revert
7979         2017-09-19  Richard Biener  <rguenther@suse.de>
7980
7981         PR tree-optimization/69728
7982         * graphite-sese-to-poly.c (schedule_error): New global.
7983         (add_loop_schedule): Handle empty domain by failing the
7984         schedule.
7985         (build_original_schedule): Handle schedule_error.
7986
7987         * graphite-sese-to-poly.c (add_loop_schedule): Handle empty
7988         domain by returning an unchanged schedule.
7989
7990 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
7991
7992         * genrecog.c (validate_pattern): For VEC_SELECT verify that
7993         CONST_INT selectors are 0 to GET_MODE_NUNITS (imode) - 1.
7994
7995 2017-10-12  Aldy Hernandez  <aldyh@redhat.com>
7996
7997         * Makefile.in (TAGS): Merge all the *.def files into one pattern.
7998         Handle params.def.
7999
8000 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
8001
8002         PR c++/82159
8003         * expr.c (store_field): Don't optimize away bitsize == 0 store
8004         from CALL_EXPR with addressable return type.
8005
8006 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
8007
8008         * config/rs6000/rs6000.h (TARGET_ISEL64): Delete.
8009         * config/rs6000/rs6000.md (sel): Delete mode attribute.
8010         (mov<mode>cc, isel_signed_<mode>, isel_unsigned_<mode>,
8011         *isel_reversed_signed_<mode>, *isel_reversed_unsigned_<mode>): Use
8012         TARGET_ISEL instead of TARGET_ISEL<sel>.
8013
8014 2017-10-11  David Edelsohn  <dje.gcc@gmail.com>
8015
8016         * config/rs6000/rs6000.c
8017         (rs6000_xcoff_asm_output_aligned_decl_common): Test for NULL decl.
8018
8019 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
8020
8021         * config/rs6000/predicates.md (zero_constant, all_ones_constant):
8022         Move up in file.
8023         (reg_or_cint_operand): Fix comment.
8024         (reg_or_zero_operand): New predicate.
8025         * config/rs6000/rs6000-protos.h (output_isel): Delete.
8026         * config/rs6000/rs6000.c (output_isel): Delete.
8027         * config/rs6000/rs6000.md (isel_signed_<mode>): Use reg_or_zero_operand
8028         instead of reg_or_cint_operand.  Output instruction directly (not via
8029         output_isel).
8030         (isel_unsigned_<mode>): Ditto.
8031         (*isel_reversed_signed_<mode>): Use reg_or_zero_operand instead of
8032         gpc_reg_operand.  Add an instruction alternative for this.  Output
8033         instruction directly.
8034         (*isel_reversed_unsigned_<mode>): Ditto.
8035
8036 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
8037
8038         * config/i386/i386.c (ix86_canonicalize_comparison): New function.
8039         (TARGET_CANONICALIZE_COMPARISON): Define.
8040
8041 2017-10-11  Qing Zhao  <qing.zhao@oracle.com>
8042
8043         PR target/81422
8044         * config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
8045         Check whether the dest is REG before adding REG_EQUIV note.
8046
8047 2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
8048
8049         PR sanitizer/82353
8050         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
8051         locations.
8052         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
8053         (make_hard_regno_born, make_hard_regno_dead): Update
8054         bb_killed_pseudos and bb_gen_pseudos.
8055
8056 2017-10-11  Nathan Sidwell  <nathan@acm.org>
8057
8058         * incpath.h (enum incpath_kind): Name enum, prefix values.
8059         (add_path, add_cpp_dir_path, get_added_cpp_dirs): Use incpath_kind.
8060         * incpath.c (heads, tails): Use INC_MAX.
8061         (add_env_var_paths, add_standard_paths): Use incpath_kind.
8062         (merge_include_chains, split_quote_chain,
8063         register_include_chains): Update incpath_kind names.
8064         (add_cpp_dir_path, add_path, get_added_cpp_dirs): Use incpath_kind.
8065         * config/darwin-c.c (add_system_framework_path): Update incpath_kind
8066         names.
8067         (add_framework_path, darwin_register_objc_includes): Likewise.
8068         * config/vms/vms-c.c (vms_c_register_includes): Likewise.
8069
8070 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
8071
8072         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
8073         Do not use float_operator operator predicate.
8074         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
8075         * config/i386/predicates.md (float_operator): Remove predicate.
8076
8077 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
8078
8079         * config/i386/i386.md (*jcc<mode>_0_i387): Remove insn pattern.
8080         (*jccxf_i387): Ditto.
8081         (*jcc<mode>_i387): Ditto.
8082         (*jccu<mode>_i387): Ditto.
8083         (*jcc<X87MODEF:mode>_<SWI24:mode>_i387): Ditto.
8084         (*jcc_*_i387 splitters): Remove.
8085         * config/i386/i386-protos.h (ix86_split_fp_branch): Remove prototype.
8086         * config/i386/i386.c (ix86_split_fp_branch): Remove.
8087         * config/i386/predicates.md (ix86_swapped_fp_comparison_operator):
8088         Remove predicate.
8089
8090 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
8091
8092         * profile-count.h (slow_safe_scale_64bit): New function.
8093         (safe_scale_64bit): New inline.
8094         (profile_count::max_safe_multiplier): Remove; use safe_scale_64bit.
8095         * profile-count.c: Include wide-int.h
8096         (slow_safe_scale_64bit): New.
8097
8098 2017-10-11  Nathan Sidwell  <nathan@acm.org>
8099
8100         * tree.h (DECL_ASSEMBLER_NAME_SET_P): Don't check
8101         HAS_DECL_ASSEMBLER_NAME_P.
8102         * gimple-expr.c (gimple_decl_printable_name: Check
8103         HAS_DECL_ASSEMBLER_NAME_P too.
8104         * ipa-utils.h (type_in_anonymous_namespace_p): Check
8105         DECL_ASSEMBLER_NAME_SET_P of TYPE_NAME.
8106         (odr_type_p): No need to assert TYPE_NAME is a TYPE_DECL.
8107         * passes.c (rest_of_decl_compilation): Check
8108         HAS_DECL_ASSEMBLER_NAME_P too.
8109         * recog.c (verify_changes): Likewise.
8110         * tree-pretty-print.c (dump_decl_name): Likewise.
8111         * tree-ssa-structalias.c (alias_get_name): Likewise.  Reimplement.
8112
8113         * tree.h (DECL_ASSEMBLER_NAME_RAW): New.
8114         (SET_DECL_ASSEMBLER_NAME): Use it.
8115         (DECL_ASSEMBLER_NAME_SET_P): Likewise.
8116         (COPY_DECL_ASSEMBLER_NAME): Likewise.
8117         * tree.c (decl_assembler_name): Use DECL_ASSEMBLER_NAME_RAW.
8118
8119 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
8120
8121         * config.gcc (i386, x86_64): Add extra objects.
8122         * config/i386/i386-protos.h (ix86_rip_relative_addr_p): Declare.
8123         (ix86_min_insn_size): Declare.
8124         (ix86_issue_rate): Declare.
8125         (ix86_adjust_cost): Declare.
8126         (ia32_multipass_dfa_lookahead): Declare.
8127         (ix86_macro_fusion_p): Declare.
8128         (ix86_macro_fusion_pair_p): Declare.
8129         (ix86_bd_has_dispatch): Declare.
8130         (ix86_bd_do_dispatch): Declare.
8131         (ix86_core2i7_init_hooks): Declare.
8132         (ix86_atom_sched_reorder): Declare.
8133         * config/i386/i386.c Move all CPU cost tables to x86-tune-costs.h.
8134         (COSTS_N_BYTES): Move to x86-tune-costs.h.
8135         (DUMMY_STRINGOP_ALGS):Move to x86-tune-costs.h.
8136         (rip_relative_addr_p): Rename to ...
8137         (ix86_rip_relative_addr_p): ... this one; export.
8138         (memory_address_length): Update.
8139         (ix86_issue_rate): Move to x86-tune-sched.c.
8140         (ix86_flags_dependent): Move to x86-tune-sched.c.
8141         (ix86_agi_dependent): Move to x86-tune-sched.c.
8142         (exact_dependency_1): Move to x86-tune-sched.c.
8143         (exact_store_load_dependency): Move to x86-tune-sched.c.
8144         (ix86_adjust_cost): Move to x86-tune-sched.c.
8145         (ia32_multipass_dfa_lookahead): Move to x86-tune-sched.c.
8146         (ix86_macro_fusion_p): Move to x86-tune-sched.c.
8147         (ix86_macro_fusion_pair_p): Move to x86-tune-sched.c.
8148         (do_reorder_for_imul): Move to x86-tune-sched-atom.c.
8149         (swap_top_of_ready_list): Move to x86-tune-sched-atom.c.
8150         (ix86_sched_reorder): Move to x86-tune-sched-atom.c.
8151         (core2i7_first_cycle_multipass_init): Move to x86-tune-sched-core.c.
8152         (core2i7_dfa_post_advance_cycle): Move to x86-tune-sched-core.c.
8153         (min_insn_size): Rename to ...
8154         (ix86_min_insn_size): ... this one; export.
8155         (core2i7_first_cycle_multipass_begin): Move to x86-tune-sched-core.c.
8156         (core2i7_first_cycle_multipass_issue): Move to x86-tune-sched-core.c.
8157         (core2i7_first_cycle_multipass_backtrack): Move to
8158         x86-tune-sched-core.c.
8159         (core2i7_first_cycle_multipass_end): Move to x86-tune-sched-core.c.
8160         (core2i7_first_cycle_multipass_fini): Move to x86-tune-sched-core.c.
8161         (ix86_sched_init_global): Break up logic to ix86_core2i7_init_hooks.
8162         (ix86_avoid_jump_mispredicts): Update.
8163         (TARGET_SCHED_DISPATCH): Move to ix86-tune-sched-bd.c.
8164         (TARGET_SCHED_DISPATCH_DO): Move to ix86-tune-sched-bd.c.
8165         (TARGET_SCHED_REORDER): Move to ix86-tune-sched-bd.c.
8166         (DISPATCH_WINDOW_SIZE): Move to ix86-tune-sched-bd.c.
8167         (MAX_DISPATCH_WINDOWS): Move to ix86-tune-sched-bd.c.
8168         (MAX_INSN): Move to ix86-tune-sched-bd.c.
8169         (MAX_IMM): Move to ix86-tune-sched-bd.c.
8170         (MAX_IMM_SIZE): Move to ix86-tune-sched-bd.c.
8171         (MAX_IMM_32): Move to ix86-tune-sched-bd.c.
8172         (MAX_IMM_64): Move to ix86-tune-sched-bd.c.
8173         (MAX_LOAD): Move to ix86-tune-sched-bd.c.
8174         (MAX_STORE): Move to ix86-tune-sched-bd.c.
8175         (BIG): Move to ix86-tune-sched-bd.c.
8176         (enum dispatch_group): Move to ix86-tune-sched-bd.c.
8177         (enum insn_path): Move to ix86-tune-sched-bd.c.
8178         (get_mem_group): Move to ix86-tune-sched-bd.c.
8179         (is_cmp): Move to ix86-tune-sched-bd.c.
8180         (dispatch_violation): Move to ix86-tune-sched-bd.c.
8181         (is_branch): Move to ix86-tune-sched-bd.c.
8182         (is_prefetch): Move to ix86-tune-sched-bd.c.
8183         (init_window): Move to ix86-tune-sched-bd.c.
8184         (allocate_window): Move to ix86-tune-sched-bd.c.
8185         (init_dispatch_sched): Move to ix86-tune-sched-bd.c.
8186         (is_end_basic_block): Move to ix86-tune-sched-bd.c.
8187         (process_end_window): Move to ix86-tune-sched-bd.c.
8188         (allocate_next_window): Move to ix86-tune-sched-bd.c.
8189         (find_constant): Move to ix86-tune-sched-bd.c.
8190         (get_num_immediates): Move to ix86-tune-sched-bd.c.
8191         (has_immediate): Move to ix86-tune-sched-bd.c.
8192         (get_insn_path): Move to ix86-tune-sched-bd.c.
8193         (get_insn_group): Move to ix86-tune-sched-bd.c.
8194         (count_num_restricted): Move to ix86-tune-sched-bd.c.
8195         (fits_dispatch_window): Move to ix86-tune-sched-bd.c.
8196         (add_insn_window): Move to ix86-tune-sched-bd.c.
8197         (add_to_dispatch_window): Move to ix86-tune-sched-bd.c.
8198         (debug_dispatch_window_file): Move to ix86-tune-sched-bd.c.
8199         (debug_dispatch_window): Move to ix86-tune-sched-bd.c.
8200         (debug_insn_dispatch_info_file): Move to ix86-tune-sched-bd.c.
8201         (debug_ready_dispatch): Move to ix86-tune-sched-bd.c.
8202         (do_dispatch): Move to ix86-tune-sched-bd.c.
8203         (has_dispatch): Move to ix86-tune-sched-bd.c.
8204         * config/i386/t-i386: Add new object files.
8205         * config/i386/x86-tune-costs.h: New file.
8206         * config/i386/x86-tune-sched-atom.c: New file.
8207         * config/i386/x86-tune-sched-bd.c: New file.
8208         * config/i386/x86-tune-sched-core.c: New file.
8209         * config/i386/x86-tune-sched.c: New file.
8210
8211 2017-10-11  Liu Hao  <lh_mouse@126.com>
8212
8213         * pretty-print.c [_WIN32] (colorize_init): Remove.  Use
8214         the generic version below instead.
8215         (should_colorize): Recognize Windows consoles as terminals
8216         for MinGW targets.
8217         * pretty-print.c [__MINGW32__] (write_all): New function.
8218         [__MINGW32__] (find_esc_head): Likewise.
8219         [__MINGW32__] (find_esc_terminator): Likewise.
8220         [__MINGW32__] (eat_esc_sequence): Likewise.
8221         [__MINGW32__] (mingw_ansi_fputs): New function that handles
8222         ANSI escape codes.
8223         (pp_write_text_to_stream): Use mingw_ansi_fputs instead of fputs
8224         for MinGW targets.
8225
8226 2017-10-11  Richard Biener  <rguenther@suse.de>
8227
8228         * tree-ssa-loop-niter.c (infer_loop_bounds_from_pointer_arith):
8229         Properly call analyze_scalar_evolution with the loop of the stmt.
8230
8231 2017-10-11  Richard Biener  <rguenther@suse.de>
8232
8233         * tree.def (POLYNOMIAL_CHREC): Remove CHREC_VARIABLE tree operand.
8234         * tree-core.h (tree_base): Add chrec_var union member.
8235         * tree.h (CHREC_VAR): Remove.
8236         (CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Adjust.
8237         * tree-chrec.h (build_polynomial_chrec): Adjust.
8238         * tree-chrec.c (reset_evolution_in_loop): Use build_polynomial_chrec.
8239         * tree-pretty-print.c (dump_generic_node): Use CHREC_VARIABLE.
8240
8241 2017-10-11  Marc Glisse  <marc.glisse@inria.fr>
8242
8243         * fold-const.c (fold_binary_loc) [X +- Y CMP X]: Move ...
8244         * match.pd: ... here.
8245         ((T) X == (T) Y): Relax condition.
8246
8247 2017-10-11  Bin Cheng  <bin.cheng@arm.com>
8248
8249         PR tree-optimization/82472
8250         * tree-loop-distribution.c (sort_partitions_by_post_order): Refine
8251         comment.
8252         (break_alias_scc_partitions): Update postorder number.
8253
8254 2017-10-11  Martin Liska  <mliska@suse.cz>
8255
8256         PR sanitizer/82490
8257         * opts.c (parse_no_sanitize_attribute): Do not use error_value
8258         variable.
8259         * opts.h (parse_no_sanitize_attribute): Remove last argument.
8260
8261 2017-10-11  Martin Liska  <mliska@suse.cz>
8262
8263         * print-rtl.c (print_insn): Move declaration of idbuf
8264         to same scope as name.
8265
8266 2017-10-11  Martin Liska  <mliska@suse.cz>
8267
8268         Revert r253637:
8269
8270         PR sanitizer/82484
8271         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
8272         volatile arguments.
8273
8274 2017-10-11  Martin Liska  <mliska@suse.cz>
8275
8276         PR sanitizer/82484
8277         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
8278         volatile arguments.
8279
8280 2017-10-11  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
8281
8282         * config.gcc (default_gnu_indirect_function): Default to yes for
8283         arm*-*-linux* with glibc.
8284
8285 2017-10-11  Richard Biener  <rguenther@suse.de>
8286
8287         * tree-scalar-evolution.c (get_scalar_evolution): Handle
8288         default-defs and types we do not want to analyze.
8289         (interpret_loop_phi): Replace unreachable code with an assert.
8290         (compute_scalar_evolution_in_loop): Remove and inline ...
8291         (analyze_scalar_evolution_1): ... here, replacing condition with
8292         what makes the intent clearer.  Remove handling of cases
8293         get_scalar_evolution now handles.
8294
8295 2017-10-10  Jim Wilson  <wilson@tuliptree.org>
8296
8297         PR rtl-optimization/81434
8298         * haifa-sched.c (prune_ready_list): Init min_cost_group to 0.  Update
8299         comment for main loop.  In sched_group_found if, also add checks for
8300         pass and min_cost_group.
8301
8302 2017-10-10  Segher Boessenkool  <segher@kernel.crashing.org>
8303
8304         * config/rs6000/rs6000.c (TARGET_INSN_COST): New.
8305         (rs6000_insn_cost): New function.
8306         * config/rs6000/rs6000.md (cost): New attribute.
8307
8308 2017-10-10  Jakub Jelinek  <jakub@redhat.com>
8309             H.J. Lu  <hongjiu.lu@intel.com>
8310
8311         PR target/79565
8312         PR target/82483
8313         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Add
8314         OPTION_MASK_ISA_MMX for __builtin_ia32_maskmovq,
8315         __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi.
8316         (ix86_expand_builtin): Treat OPTION_MASK_ISA_MMX similarly
8317         to OPTION_MASK_ISA_AVX512VL - builtins that have both
8318         OPTION_MASK_ISA_MMX and some other bit set require both
8319         mmx and the ISAs without the mmx bit.
8320         * config/i386/i386-builtin.def (__builtin_ia32_cvtps2pi,
8321         __builtin_ia32_cvttps2pi, __builtin_ia32_cvtpi2ps,
8322         __builtin_ia32_pavgb, __builtin_ia32_pavgw, __builtin_ia32_pmulhuw,
8323         __builtin_ia32_pmaxub, __builtin_ia32_pmaxsw, __builtin_ia32_pminub,
8324         __builtin_ia32_pminsw, __builtin_ia32_psadbw, __builtin_ia32_pmovmskb,
8325         __builtin_ia32_pshufw, __builtin_ia32_cvtpd2pi,
8326         __builtin_ia32_cvttpd2pi, __builtin_ia32_cvtpi2pd,
8327         __builtin_ia32_pmuludq, __builtin_ia32_pabsb, __builtin_ia32_pabsw,
8328         __builtin_ia32_pabsd, __builtin_ia32_phaddw, __builtin_ia32_phaddd,
8329         __builtin_ia32_phaddsw, __builtin_ia32_phsubw, __builtin_ia32_phsubd,
8330         __builtin_ia32_phsubsw, __builtin_ia32_pmaddubsw,
8331         __builtin_ia32_pmulhrsw, __builtin_ia32_pshufb, __builtin_ia32_psignb,
8332         __builtin_ia32_psignw, __builtin_ia32_psignd, __builtin_ia32_movntq,
8333         __builtin_ia32_paddq, __builtin_ia32_psubq, __builtin_ia32_palignr):
8334         Add OPTION_MASK_ISA_MMX.
8335
8336 2017-10-10  Andreas Tobler  <andreast@gcc.gnu.org>
8337
8338         * config.gcc (armv7*-*-freebsd*): New target.
8339         (armv6*-*-freebsd*): Remove obsolete TARGET_FREEBSD_ARMv6 define.
8340
8341 2017-10-10  Jan Hubicka  <hubicka@ucw.cz>
8342
8343         * x86-tune.def (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI,
8344         X86_TUNE_ADJUST_UNROLL, X86_TUNE_ONE_IF_CONV_INSN): Move to right
8345         spot in the file.
8346
8347 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
8348
8349         * wide-int.h (wide_int_ref_storage): Make host_dependent_precision
8350         a template parameter.
8351         (WIDE_INT_REF_FOR): Update accordingly.
8352         * tree.h (wi::int_traits <const_tree>): Delete.
8353         (wi::tree_to_widest_ref, wi::tree_to_offset_ref): New typedefs.
8354         (wi::to_widest, wi::to_offset): Use them.  Expand commentary.
8355         (wi::tree_to_wide_ref): New typedef.
8356         (wi::to_wide): New function.
8357         * calls.c (get_size_range): Use wi::to_wide when operating on
8358         trees as wide_ints.
8359         * cgraph.c (cgraph_node::create_thunk): Likewise.
8360         * config/i386/i386.c (ix86_data_alignment): Likewise.
8361         (ix86_local_alignment): Likewise.
8362         * dbxout.c (stabstr_O): Likewise.
8363         * dwarf2out.c (add_scalar_info, gen_enumeration_type_die): Likewise.
8364         * expr.c (const_vector_from_tree): Likewise.
8365         * fold-const-call.c (host_size_t_cst_p, fold_const_call_1): Likewise.
8366         * fold-const.c (may_negate_without_overflow_p, negate_expr_p)
8367         (fold_negate_expr_1, int_const_binop_1, const_binop)
8368         (fold_convert_const_int_from_real, optimize_bit_field_compare)
8369         (all_ones_mask_p, sign_bit_p, unextend, extract_muldiv_1)
8370         (fold_div_compare, fold_single_bit_test, fold_plusminus_mult_expr)
8371         (pointer_may_wrap_p, expr_not_equal_to, fold_binary_loc)
8372         (fold_ternary_loc, multiple_of_p, fold_negate_const, fold_abs_const)
8373         (fold_not_const, round_up_loc): Likewise.
8374         * gimple-fold.c (gimple_fold_indirect_ref): Likewise.
8375         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Likewise.
8376         (alloca_call_type): Likewise.
8377         * gimple.c (preprocess_case_label_vec_for_gimple): Likewise.
8378         * godump.c (go_output_typedef): Likewise.
8379         * graphite-sese-to-poly.c (tree_int_to_gmp): Likewise.
8380         * internal-fn.c (get_min_precision): Likewise.
8381         * ipa-cp.c (ipcp_store_vr_results): Likewise.
8382         * ipa-polymorphic-call.c
8383         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Likewise.
8384         * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Likewise.
8385         (ipa_modify_call_arguments): Likewise.
8386         * match.pd: Likewise.
8387         * omp-low.c (scan_omp_1_op, lower_omp_ordered_clauses): Likewise.
8388         * print-tree.c (print_node_brief, print_node): Likewise.
8389         * stmt.c (expand_case): Likewise.
8390         * stor-layout.c (layout_type): Likewise.
8391         * tree-affine.c (tree_to_aff_combination): Likewise.
8392         * tree-cfg.c (group_case_labels_stmt): Likewise.
8393         * tree-data-ref.c (dr_analyze_indices): Likewise.
8394         (prune_runtime_alias_test_list): Likewise.
8395         * tree-dump.c (dequeue_and_dump): Likewise.
8396         * tree-inline.c (remap_gimple_op_r, copy_tree_body_r): Likewise.
8397         * tree-predcom.c (is_inv_store_elimination_chain): Likewise.
8398         * tree-pretty-print.c (dump_generic_node): Likewise.
8399         * tree-scalar-evolution.c (iv_can_overflow_p): Likewise.
8400         (simple_iv_with_niters): Likewise.
8401         * tree-ssa-address.c (addr_for_mem_ref): Likewise.
8402         * tree-ssa-ccp.c (ccp_finalize, evaluate_stmt): Likewise.
8403         * tree-ssa-loop-ivopts.c (constant_multiple_of): Likewise.
8404         * tree-ssa-loop-niter.c (split_to_var_and_offset)
8405         (refine_value_range_using_guard, number_of_iterations_ne_max)
8406         (number_of_iterations_lt_to_ne, number_of_iterations_lt)
8407         (get_cst_init_from_scev, record_nonwrapping_iv)
8408         (scev_var_range_cant_overflow): Likewise.
8409         * tree-ssa-phiopt.c (minmax_replacement): Likewise.
8410         * tree-ssa-pre.c (compute_avail): Likewise.
8411         * tree-ssa-sccvn.c (vn_reference_fold_indirect): Likewise.
8412         (vn_reference_maybe_forwprop_address, valueized_wider_op): Likewise.
8413         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise.
8414         * tree-ssa-uninit.c (is_pred_expr_subset_of): Likewise.
8415         * tree-ssanames.c (set_nonzero_bits, get_nonzero_bits): Likewise.
8416         * tree-switch-conversion.c (collect_switch_conv_info, array_value_type)
8417         (dump_case_nodes, try_switch_expansion): Likewise.
8418         * tree-vect-loop-manip.c (vect_gen_vector_loop_niters): Likewise.
8419         (vect_do_peeling): Likewise.
8420         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
8421         * tree-vect-stmts.c (vectorizable_load): Likewise.
8422         * tree-vrp.c (compare_values_warnv, vrp_int_const_binop): Likewise.
8423         (zero_nonzero_bits_from_vr, ranges_from_anti_range): Likewise.
8424         (extract_range_from_binary_expr_1, adjust_range_with_scev): Likewise.
8425         (overflow_comparison_p_1, register_edge_assert_for_2): Likewise.
8426         (is_masked_range_test, find_switch_asserts, maybe_set_nonzero_bits)
8427         (vrp_evaluate_conditional_warnv_with_ops, intersect_ranges): Likewise.
8428         (range_fits_type_p, two_valued_val_range_p, vrp_finalize): Likewise.
8429         (evrp_dom_walker::before_dom_children): Likewise.
8430         * tree.c (cache_integer_cst, real_value_from_int_cst, integer_zerop)
8431         (integer_all_onesp, integer_pow2p, integer_nonzerop, tree_log2)
8432         (tree_floor_log2, tree_ctz, mem_ref_offset, tree_int_cst_sign_bit)
8433         (tree_int_cst_sgn, get_unwidened, int_fits_type_p): Likewise.
8434         (get_type_static_bounds, num_ending_zeros, drop_tree_overflow)
8435         (get_range_pos_neg): Likewise.
8436         * ubsan.c (ubsan_expand_ptr_ifn): Likewise.
8437         * config/darwin.c (darwin_mergeable_constant_section): Likewise.
8438         * config/aarch64/aarch64.c (aapcs_vfp_sub_candidate): Likewise.
8439         * config/arm/arm.c (aapcs_vfp_sub_candidate): Likewise.
8440         * config/avr/avr.c (avr_fold_builtin): Likewise.
8441         * config/bfin/bfin.c (bfin_local_alignment): Likewise.
8442         * config/msp430/msp430.c (msp430_attr): Likewise.
8443         * config/nds32/nds32.c (nds32_insert_attributes): Likewise.
8444         * config/powerpcspe/powerpcspe-c.c
8445         (altivec_resolve_overloaded_builtin): Likewise.
8446         * config/powerpcspe/powerpcspe.c (rs6000_aggregate_candidate)
8447         (rs6000_expand_ternop_builtin): Likewise.
8448         * config/rs6000/rs6000-c.c
8449         (altivec_resolve_overloaded_builtin): Likewise.
8450         * config/rs6000/rs6000.c (rs6000_aggregate_candidate): Likewise.
8451         (rs6000_expand_ternop_builtin): Likewise.
8452         * config/s390/s390.c (s390_handle_hotpatch_attribute): Likewise.
8453
8454 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
8455
8456         * tree-vect-loop-manip.c (rename_variables_in_bb): Rename PHI nodes
8457         when copying loop nest with only one inner loop.
8458
8459 2017-10-10  Richard Biener  <rguenther@suse.de>
8460
8461         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Avoid compacting
8462         blocks if SCEV is active.
8463         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Remove
8464         dead code.
8465         (analyze_scalar_evolution): Handle cached evolutions the obvious way.
8466         (scev_initialize): Assert we are not yet initialized.
8467
8468 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
8469
8470         * tree-loop-distribution.c (generate_loops_for_partition): Remove
8471         inner loop's exit stmt by making it always exit the loop, otherwise
8472         we would generate an infinite empty loop.
8473
8474 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
8475
8476         * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip
8477         renaming variables in new preheader if it's deleted.
8478
8479 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
8480
8481         * tree-loop-distribution.c (struct partition): Remove unused field
8482         loops of the structure.
8483         (partition_alloc, partition_free): Ditto.
8484         (build_rdg_partition_for_vertex): Ditto.
8485
8486 2017-10-09  Jeff Law  <law@redhat.com>
8487
8488         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): Fix
8489         return type to match prototype and documentation.
8490
8491 2010-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
8492
8493         * config/rs6000/rs6000.c (processor_costs): Move to ...
8494         * config/rs6000/rs6000.h: ... here.
8495         (rs6000_cost): Declare.
8496
8497 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
8498
8499         * except.c (setjmp_fn): New global variable.
8500         (init_eh): Initialize it if DONT_USE_BUILTIN_SETJMP is defined.
8501         (sjlj_emit_function_enter): Call it instead of BUILTIN_SETJMP
8502         if DONT_USE_BUILTIN_SETJMP is defined.
8503
8504 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
8505
8506         * target.def (insn_cost): New hook.
8507         * doc/tm.texi.in (TARGET_INSN_COST): New hook.
8508         * doc/tm.texi: Regenerate.
8509         * rtlanal.c (insn_cost): Use the new hook.
8510
8511 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
8512
8513         * combine.c (combine_validate_cost): Compute the new insn_cost,
8514         not just pattern_cost.
8515         (try_combine): Adjust comment.
8516
8517 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
8518
8519         * cfgrtl.c (rtl_account_profile_record): Replace insn_rtx_cost with
8520         insn_cost.
8521         * combine.c (uid_insn_cost): Adjust comment.
8522         (combine_validate_cost): Adjust comment.  Use pattern_cost instead
8523         of insn_rtx_cost
8524         (combine_instructions): Use insn_cost instead of insn_rtx_cost.
8525         * dse.c (find_shift_sequence): Ditto.
8526         * ifcvt.c (cheap_bb_rtx_cost_p): Ditto.
8527         (bb_valid_for_noce_process_p): Use pattern_cost.
8528         * rtl.h (insn_rtx_cost): Delete.
8529         (pattern_cost): New prototype.
8530         (insn_cost): New prototype.
8531         * rtlanal.c (insn_rtx_cost): Rename to...
8532         (pattern_cost): ... this.
8533         (insn_cost): New.
8534
8535 2017-10-09  Uros Bizjak  <ubizjak@gmail.com>
8536
8537         * config/i386/i386.md (*jcc_2): Remove insn pattern.
8538         (*jcc<mode>_0_r_i387): Ditto.
8539         (*jccxf_r_i387): Ditto.
8540         (*jcc<mode>_r_i387): Ditto.
8541         (*jccu<mode>_r_i387): Ditto.
8542         (*jcc<X87MODEF:mode>_<SWI24:mode>_r_i387): Ditto.
8543         (*jcc): Rename from *jcc_1.
8544
8545 2017-10-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8546
8547         * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Process
8548         deferred rescans after the lvx/stvx recombination pre-pass.
8549
8550 2017-10-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
8551
8552         * config/rs6000/amo.h: New include file to provide ISA 3.0 atomic
8553         memory operation instruction support.
8554         * config.gcc (powerpc*-*-*): Include amo.h as an extra header.
8555         (rs6000-ibm-aix[789]*): Likewise.
8556         * doc/extend.texi (PowerPC Atomic Memory Operation Functions):
8557         Document new functions.
8558
8559 2017-10-09  Richard Biener  <rguenther@suse.de>
8560
8561         PR tree-optimization/82397
8562         * tree-data-ref.c (data_ref_compare_tree): Make sure to return
8563         equality only for semantically equal trees.
8564
8565 2017-10-09  Richard Biener  <rguenther@suse.de>
8566
8567         PR tree-optimization/82449
8568         * sese.c (scev_analyzable_p): Check whether the SCEV is linear.
8569         * tree-chrec.h (evolution_function_is_constant_p): Adjust to
8570         allow constant addresses.
8571         * tree-chrec.c (scev_is_linear_expression): Constant evolutions
8572         are linear.
8573
8574 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8575
8576         * config/s390/s390-builtins.def (vec_nabs, vec_vfi): Fix builtin
8577         flags.
8578
8579 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8580
8581         PR target/82463
8582         * config/s390/vecintrin.h (vec_madd, vec_msub): Fix macro
8583         definitions.
8584
8585 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8586
8587         PR target/82465
8588         * config/s390/s390-builtins.def (vec_sqrt): Fix builtin flags.
8589
8590 2017-10-09  Jakub Jelinek  <jakub@redhat.com>
8591
8592         PR target/82464
8593         * config/s390/s390-builtins.def (s390_vec_xor_flt_a,
8594         s390_vec_xor_flt_b, s390_vec_xor_flt_c): New.
8595
8596 2017-10-09  Richard Sandiford  <richard.sandiford@linaro.org>
8597
8598         * wide-int.h (WI_BINARY_OPERATOR_RESULT): New macro.
8599         (WI_BINARY_PREDICATE_RESULT): Likewise.
8600         (wi::binary_traits::operator_result): New type.
8601         (wi::binary_traits::predicate_result): Likewise.
8602         (generic_wide_int::operator~, unary generic_wide_int::operator-)
8603         (generic_wide_int::operator==, generic_wide_int::operator!=)
8604         (generic_wide_int::operator&, generic_wide_int::and_not)
8605         (generic_wide_int::operator|, generic_wide_int::or_not)
8606         (generic_wide_int::operator^, generic_wide_int::operator+
8607         (binary generic_wide_int::operator-, generic_wide_int::operator*):
8608         Delete.
8609         (operator~, unary operator-, operator==, operator!=, operator&)
8610         (operator|, operator^, operator+, binary operator-, operator*): New
8611         functions.
8612         * expr.c (get_inner_reference): Use wi::bit_and_not.
8613         * fold-const.c (fold_binary_loc): Likewise.
8614         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
8615         * tree-ssa-ccp.c (get_value_from_alignment): Likewise.
8616         (bit_value_binop): Likewise.
8617         * tree-ssa-math-opts.c (find_bswap_or_nop_load): Likewise.
8618         * tree-vrp.c (zero_nonzero_bits_from_vr): Likewise.
8619         (extract_range_from_binary_expr_1): Likewise.
8620         (masked_increment): Likewise.
8621         (simplify_bit_ops_using_ranges): Likewise.
8622
8623 2017-10-09  Martin Jambor  <mjambor@suse.cz>
8624
8625         PR hsa/82416
8626         * hsa-common.h (hsa_op_with_type): New method extend_int_to_32bit.
8627         * hsa-gen.c (hsa_extend_inttype_to_32bit): New function.
8628         (hsa_type_for_scalar_tree_type): Use it.  Always force min32int for
8629         COMPLEX types.
8630         (hsa_fixup_mov_insn_type): New function.
8631         (hsa_op_with_type::get_in_type): Use it.
8632         (hsa_build_append_simple_mov): Likewise.  Allow sub-32bit
8633         immediates in an assert.
8634         (hsa_op_with_type::extend_int_to_32bit): New method.
8635         (gen_hsa_insns_for_bitfield): Fixup instruction and intermediary
8636         types.  Convert to dest type if necessary.
8637         (gen_hsa_insns_for_bitfield_load): Fixup load type if necessary.
8638         (reg_for_gimple_ssa): Pass false as min32int to
8639         hsa_type_for_scalar_tree_type.
8640         (gen_hsa_addr): Fixup type when creating addresable temporary.
8641         (gen_hsa_cmp_insn_from_gimple): Extend operands if necessary.
8642         (gen_hsa_unary_operation): Extend operands and convert to dest type if
8643         necessary.  Call hsa_fixup_mov_insn_type.
8644         (gen_hsa_binary_operation): Changed operand types to hsa_op_with_type,
8645         extend operands and convert to dest type if necessary.
8646         (gen_hsa_insns_for_operation_assignment): Extend operands and convert
8647         to dest type if necessary.
8648         (set_output_in_type): Call hsa_fixup_mov_insn_type.  Just ude dest
8649         if conversion nt necessary and size matches.
8650         (gen_hsa_insns_for_load): Call hsa_fixup_mov_insn_type, convert
8651         to dest type if necessary.
8652         (gen_hsa_insns_for_store): Call hsa_fixup_mov_insn_type.
8653         (gen_hsa_insns_for_switch_stmt): Likewise. Also extend operands if
8654         necessary.
8655         (gen_hsa_clrsb): Likewise.
8656         (gen_hsa_ffs): Likewise.
8657         (gen_hsa_divmod): Extend operands and convert to dest type if
8658         necessary.
8659         (gen_hsa_atomic_for_builtin): Change type of op to hsa_op_with_type.
8660
8661 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
8662
8663         * config/rs6000/rs6000.md (conditional branch): Clean up formatting.
8664         Remove empty default arguments.  Use a brace block as output
8665         statement.
8666         (conditional return): Ditto.
8667         (jump): Ditto.
8668         (indirect_jump): Ditto.  Use b%T0 instead of bctr/blr.
8669         (tablejump, tablejumpsi, tablejumpdi, *tablejump<mode>_internal1):
8670         Ditto.
8671         (group_ending_nop): Ditto.
8672         (doloop_end): Ditto.
8673         (ctr<mode>, ctr<mode>_internal1, ctr<mode>_internal2): Ditto.
8674         (splitters for those): Ditto.
8675
8676 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
8677
8678         * config/rs6000/rs6000-string.c (expand_strncmp_align_check): Invert
8679         a conditional jump (and the compare for it) so that pc_rtx is the
8680         last operand.
8681         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Adjust
8682         for the deleted and renamed ctr<mode>_internal[234] patterns.
8683         * config/rs6000/rs6000.md: Delete second conditional branch pattern.
8684         Delete second conditional return pattern.
8685         (ctr<mode>_internal2): Delete this second bdnz pattern.
8686         (ctr<mode>_internal3): Rename to ctr<mode>_internal2.
8687         (ctr<mode>_internal4): Delete this second bdz pattern.
8688
8689 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
8690
8691         * tree-outof-ssa.h (ssaexpand): Add partitions_for_undefined_values.
8692         (always_initialized_rtx_for_ssa_name_p): New predicate.
8693         * tree-outof-ssa.c (remove_ssa_form): Initialize new field of SA.
8694         (finish_out_of_ssa): Free new field of SA.
8695         * tree-ssa-coalesce.h (get_undefined_value_partitions): Declare.
8696         * tree-ssa-coalesce.c: Include tree-ssa.h.
8697         (get_parm_default_def_partitions): Remove extern keyword.
8698         (get_undefined_value_partitions): New function.
8699         * expr.c (expand_expr_real_1) <expand_decl_rtl>: For a SSA_NAME, do
8700         not set SUBREG_PROMOTED_VAR_P on the sub-register if it may contain
8701         uninitialized bits.
8702         * loop-iv.c (iv_get_reaching_def): Disqualify all subregs.
8703
8704 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
8705
8706         * builtins.def (BUILT_IN_SETJMP): Revert latest change.
8707
8708 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
8709
8710         * config/i386/i386.c (ix86_expand_set_or_movmem): Disable 512bit loops
8711         for targets that preffer 128bit.
8712
8713 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
8714
8715         * config/i386/i386.c (has_dispatch): Disable for Ryzen.
8716
8717 2017-10-08  Olivier Hainque  <hainque@adacore.com>
8718
8719         * config/arm/arm.c (arm_set_return_address): Use MEM_VOLATILE_P
8720         on the target mem instead of RTX_FRAME_RELATED_P on the insn to
8721         prevent DSE.
8722         (thumb_set_return_address): Likewise.
8723
8724 2017-10-08  Olivier Hainque  <hainque@adacore.com>
8725
8726         * common/config/arm/arm-common.c (arm_except_unwind_info):
8727         Handle DWARF2_UNWIND_INFO.
8728
8729 2017-10-07  Michael Collison <michael.collison@arm.com>
8730
8731         * config/aarch64/aarch64.md (*aarch64_reg_<optab>_minus<mode>3):
8732         New pattern.
8733
8734 2017-10-07  Eric Botcazou  <ebotcazou@adacore.com>
8735
8736         * builtins.def (BUILT_IN_SETJMP): Declare as library builtin instead
8737         of GCC builtin if DONT_USE_BUILTIN_SETJMP is defined.
8738         * except.c (sjlj_emit_function_enter): If DONT_USE_BUILTIN_SETJMP is
8739         defined, force the creation of a new block for a dispatch label.
8740
8741 2017-10-07  Jan Hubicka  <hubicka@ucw.cz>
8742
8743         * invoke.texi (Wsuggest-attribute=cold): Document.
8744         * common.opt (Wsuggest-attribute=cold): New
8745         * ipa-pure-const.c (warn_function_cold): New function.
8746         * predict.c (compute_function_frequency): Use it.
8747         * predict.h (warn_function_cold): Declare.
8748
8749 2017-10-06  Jan Hubicka  <hubicka@ucw.cz>
8750
8751         * tree-switch-conversion.c (do_jump_if_equal, emit_cmp_and_jump_insns):
8752         Update profile.
8753
8754 2017-10-06  Martin Liska  <mliska@suse.cz>
8755
8756         * sanopt.c (struct sanopt_tree_triplet_hash): Remove inline
8757         keyword for member functions.
8758         (struct sanopt_tree_couple): New struct.
8759         (struct sanopt_tree_couple_hash): New function.
8760         (struct sanopt_ctx): Add new hash_map.
8761         (has_dominating_ubsan_ptr_check): New function.
8762         (record_ubsan_ptr_check_stmt): Likewise.
8763         (maybe_optimize_ubsan_ptr_ifn): Likewise.
8764         (sanopt_optimize_walker): Handle IFN_UBSAN_PTR.
8765         (pass_sanopt::execute): Handle also SANITIZE_POINTER_OVERFLOW.
8766
8767 2017-10-06  Sudakshina Das  <sudi.das@arm.com>
8768
8769         PR target/82440
8770         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Only call
8771         aarch64_simd_valid_immediate on CONST_VECTORs.
8772         (aarch64_reg_or_bic_imm): Likewise.
8773
8774 2017-10-06  Wilco Dijkstra  <wdijkstr@arm.com>
8775
8776         PR rtl-optimization/82396
8777         * haifa-sched.c (ready_sort_real): Disable qsort checking.
8778
8779 2017-10-06  Sebastian Pop  <sebpop@gmail.com>
8780
8781         * graphite-dependences.c (scop_get_reads): Move code to...
8782         (scop_get_must_writes): Move code to...
8783         (scop_get_may_writes): Move code to...
8784         (scop_get_reads_and_writes): ... here.
8785         (scop_get_dependences): Call scop_get_reads_and_writes.
8786
8787 2017-10-06  Jakub Jelinek  <jakub@redhat.com>
8788
8789         PR tree-optimization/82434
8790         * fold-const.h (can_native_encode_type_p,
8791         can_native_encode_string_p): Remove.
8792         * fold-const.c (native_encode_int): Formatting fixes.  If ptr is NULL,
8793         don't encode anything, just return what would be otherwise returned.
8794         (native_encode_fixed, native_encode_complex, native_encode_vector):
8795         Likewise.
8796         (native_encode_string): Likewise.  Inline by hand
8797         can_native_encode_string_p.
8798         (can_native_encode_type_p): Remove.
8799         (can_native_encode_string_p): Remove.
8800         * tree-vect-stmts.c (vectorizable_store): Instead of testing just
8801         STRING_CSTs using can_native_encode_string_p, test all
8802         CONSTANT_CLASS_P values using native_encode_expr with NULL ptr.
8803         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Remove last
8804         argument from native_encode_expr.
8805         (rhs_valid_for_store_merging_p): Use native_encode_expr with NULL ptr.
8806         (pass_store_merging::execute): Don't unnecessarily look for 3 stmts,
8807         but just 2.
8808
8809 2017-10-06  Richard Biener  <rguenther@suse.de>
8810
8811         PR tree-optimization/82397
8812         * tree-vect-data-refs.c (dr_group_sort_cmp): Do not use
8813         operand_equal_p but rely on data_ref_compare_tree for detecting
8814         equalities.
8815         (vect_analyze_data_ref_accesses): Use data_ref_compare_tree
8816         to match up with dr_group_sort_cmp.
8817
8818 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8819
8820         PR target/82322
8821         * config/s390/s390-builtins.def (s390_vfi): Define new overloaded
8822         builtin.
8823         * config/s390/s390-builtin-types.def: Regenerate.
8824
8825 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8826
8827         PR target/82317
8828         * config/s390/s390-builtin-types.def: Regenerate.
8829         * config/s390/s390-builtins.def (s390_vfmaxdb_4, s390_vfmindb_4):
8830         Change flag from B_VXE to B_VX.
8831         (s390_vec_min_dbl): Remove B_VXE flag.
8832
8833 2017-10-06  Richard Biener  <rguenther@suse.de>
8834
8835         * graphite-isl-ast-to-gimple.c: Include ssa.h and tree-ssa.h.
8836         (translate_isl_ast_to_gimple::translate_pending_phi_nodes,
8837         translate_isl_ast_to_gimple::is_valid_rename,
8838         translate_isl_ast_to_gimple::get_rename,
8839         translate_isl_ast_to_gimple::get_def_bb_for_const,
8840         translate_isl_ast_to_gimple::get_new_name,
8841         translate_isl_ast_to_gimple::collect_all_ssa_names,
8842         translate_isl_ast_to_gimple::copy_loop_phi_args,
8843         translate_isl_ast_to_gimple::collect_all_ssa_names,
8844         translate_isl_ast_to_gimple::copy_loop_phi_args,
8845         translate_isl_ast_to_gimple::copy_loop_phi_nodes,
8846         translate_isl_ast_to_gimple::add_close_phis_to_merge_points,
8847         translate_isl_ast_to_gimple::add_close_phis_to_outer_loops,
8848         translate_isl_ast_to_gimple::copy_loop_close_phi_args,
8849         translate_isl_ast_to_gimple::copy_loop_close_phi_nodes,
8850         translate_isl_ast_to_gimple::copy_cond_phi_args,
8851         translate_isl_ast_to_gimple::copy_cond_phi_nodes,
8852         translate_isl_ast_to_gimple::edge_for_new_close_phis,
8853         translate_isl_ast_to_gimple::add_phi_arg_for_new_expr,
8854         translate_isl_ast_to_gimple::rename_uses,
8855         translate_isl_ast_to_gimple::rename_all_uses): Remove.
8856         (translate_isl_ast_to_gimple::get_rename_from_scev): Simplify.
8857         (set_rename_for_each_def): Likewise.
8858         (graphite_copy_stmts_from_block): Handle debug stmt resetting
8859         here.  Handle rewriting SCEV analyzable uses here.
8860         (copy_bb_and_scalar_dependences): Generate code for PHI
8861         copy-in/outs.
8862         (graphite_regenerate_ast_isl): Adjust.
8863         * graphite-scop-detection.c (trivially_empty_bb_p): Move to sese.[ch].
8864         (add_write, add_read): New functions.
8865         (build_cross_bb_scalars_def): Use it and simplify.
8866         (build_cross_bb_scalars_use): Likewise.
8867         (graphite_find_cross_bb_scalar_vars): Inline into...
8868         (try_generate_gimple_bb): ...here.  Add dependences for PHIs,
8869         simulating out-of-SSA.  Compute liveout and add dependencies.
8870         (build_scops): Force an empty entry block.
8871         * sese.h (sese_info_t::liveout, sese_info_t::debug_liveout): New
8872         members.
8873         (sese_build_liveouts): Declare.
8874         (sese_trivially_empty_bb_p): Likewise.
8875         * sese.c (sese_build_liveouts_bb): Properly handle PHIs,
8876         compute liveout and debug_liveout.
8877         (sese_bad_liveouts_use): Remove.
8878         (sese_reset_debug_liveouts_bb): Likewise.
8879         (sese_reset_debug_liveouts): Rewrite in terms of debug_liveout.
8880         (sese_build_liveouts): Build liveout and debug_liveout and store
8881         it in region.
8882         (new_sese_info): Adjust.
8883         (free_sese_info): Likewise.
8884         (sese_insert_phis_for_liveouts): Reset debug stmts from here,
8885         do not build liveout here.
8886         (move_sese_in_condition): Adjust region entry.
8887         (scev_analyzable_p): Match up with chrec_apply requirements.
8888         (sese_trivially_empty_bb_p): New.
8889         * tree-into-ssa.c (get_reaching_def): Properly support generating
8890         default-defs for incremental rewrite of anonymous names.
8891
8892 2017-10-06  Richard Biener  <rguenther@suse.de>
8893
8894         * graphite-sese-to-poly.c (extract_affine): For casts increasing
8895         precision do not perform modulo reduction.
8896
8897 2017-10-06  Richard Biener  <rguenther@suse.de>
8898
8899         PR tree-optimization/82436
8900         * tree-vect-slp.c (vect_supported_load_permutation_p): More
8901         conservatively choose the vectorization factor when checking
8902         whether we can perform the required load permutation.
8903         (vect_transform_slp_perm_load): Assert when we may not fail.
8904
8905 2017-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
8906
8907         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Correct error
8908         message for incompatible -msdata=* and -mcall-* options.
8909
8910 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
8911
8912         * config/i386/i386.c (ia32_multipass_dfa_lookahead): Default to issue
8913         rate for post-reload scheduling.
8914
8915 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
8916
8917         * doc/sourcebuild.texi (vect_sizes_16B_8B, vect_sizes_32B_16B): New.
8918
8919 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
8920
8921         * config/i386/i386.c (znver1_cost): Set branch_cost to 3 (instead of 2)
8922         to improve monte carlo in scimark.
8923
8924 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
8925
8926         * config/i386/i386.c (ix86_size_cost, i386_cost, i486_cost,
8927         pentium_cost, lakemont_cost, pentiumpro_cost, geode_cost, k6_cost,
8928         athlon_cost, k8_cost, amdfam10_cost, btver1_cost, btver2_cost,
8929         pentium4_cost, nocona_cost): Set reassociation width to 1.
8930         (bdver1_cost, bdver2_cost, bdver3_cost, bdver4_cost): Set reassociation
8931         width to 2 for fp operations and 1 otherwise.
8932         (znver1_cost): Set scalar reassoc width to 4 and vector to 3 and 6
8933         for int and fp.
8934         (atom_cost): Set reassociation width to 2.
8935         (slm_cost, generic_cost): Set fp reassociation width
8936         to 2 and 1 otherwise.
8937         (intel_cost): Set fp reassociation width to 4 and 1 otherwise.
8938         (core_cost): Set fp reassociation width to 4 and vector to 2.
8939         (ix86_reassociation_width): Rewrite using cost table; special case
8940         plus/minus on Zen; honor X86_TUNE_SSE_SPLIT_REGS
8941         and TARGET_AVX128_OPTIMAL.
8942         * config/i386/i386.h (processor_costs): Add
8943         reassoc_int, reassoc_fp, reassoc_vec_int, reassoc_vec_fp.
8944         (TARGET_VECTOR_PARALLEL_EXECUTION, TARGET_REASSOC_INT_TO_PARALLEL,
8945         TARGET_REASSOC_FP_TO_PARALLEL): Remove.
8946         * x86-tune.def (X86_TUNE_REASSOC_INT_TO_PARALLEL): Remove.
8947         (X86_TUNE_REASSOC_FP_TO_PARALLEL): Remove.
8948         (X86_TUNE_VECTOR_PARALLEL_EXECUTION):  Remove.
8949
8950 2017-10-05  Nathan Sidwell  <nathan@acm.org>
8951
8952         * doc/invoke.texi (Wparentheses): Document C++ MVP behaviour.
8953
8954 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
8955
8956         * config/arm/arm.c (arm_test_fpu_data): New.
8957         (arm_run_selftests): Call arm_test_fpu_data.
8958
8959 2017-10-04  Nathan Sidwell  <nathan@acm.org>
8960
8961         * toplev.c (toplev::main): Remove excess parens on pretty_printer
8962         decl.
8963         * caller-save.c (insert_save): Remove excess parens on TO_SAVE parm.
8964
8965 2017-10-04  Sudakshina Das  <sudi.das@arm.com>
8966
8967         * config/aarch64/aarch64-protos.h (enum simd_immediate_check): New
8968         check type for aarch64_simd_valid_immediate.
8969         (aarch64_output_simd_mov_immediate): Update prototype.
8970         (aarch64_simd_valid_immediate): Update prototype.
8971         * config/aarch64/aarch64-simd.md (orr<mode>3): modified pattern to add
8972         support for ORR-immediate.
8973         (and<mode>3): modified pattern to add support for BIC-immediate.
8974         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Function
8975         now checks for valid immediate for BIC and ORR based on new enum
8976         argument.
8977         (aarch64_output_simd_mov_immediate): Function now used to output
8978         BIC/ORR imm as well based on new enum argument.
8979         * config/aarch64/constraints.md (Do): New vector immediate constraint.
8980         (Db) : Likewise.
8981         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): New predicate.
8982         (aarch64_reg_or_bic_imm): Likewise.
8983
8984 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8985
8986         * config/s390/vx-builtins.md ("vec_mergeh<mode>")
8987         ("vec_mergel<mode>"): Change mode iterator to V_128_NOSINGLE.
8988
8989 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
8990
8991         Revert r253399:
8992
8993         PR rtl-optimization/82396
8994         * haifa-sched.c (autopref_multipass_init): Simplify
8995         initialization.
8996         (autopref_rank_data): Simplify sort order.
8997         * sched-int.h (autopref_multipass_data_): Remove
8998         multi_mem_insn_p, min_offset and max_offset.
8999
9000 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9001
9002         * doc/sourcebuild.texi: Document vect_peeling_profitable.
9003
9004 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9005
9006         * doc/sourcebuild.texi: Document vect_intdouble_cvt and
9007         vect_doubleint_cvt.
9008
9009 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9010
9011         * doc/sourcebuild.texi: Document vect_long_mult.
9012
9013 2017-10-04  Richard Sandiford  <richard.sandiford@linaro.org>
9014
9015         PR tree-optimization/82413
9016         * fold-const.c (build_range_check): Use widest_int when comparing
9017         the maximum ETYPE value with HIGH.
9018
9019 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
9020
9021         PR rtl-optimization/82396
9022         * haifa-sched.c (autopref_multipass_init): Simplify
9023         initialization.
9024         (autopref_rank_data): Simplify sort order.
9025         * sched-int.h (autopref_multipass_data_): Remove
9026         multi_mem_insn_p, min_offset and max_offset.
9027
9028 2017-10-04  Jakub Jelinek  <jakub@redhat.com>
9029
9030         PR tree-optimization/82381
9031         * tree-ssa-reassoc.c (sort_by_operand_rank): Check for different
9032         oeN->rank first.  Return 1 or -1 if one op is SSA_NAME and the other
9033         is not.
9034
9035         PR tree-optimization/82374
9036         * omp-low.c (create_omp_child_function): Copy DECL_ATTRIBUTES,
9037         DECL_FUNCTION_SPECIFIC_OPTIMIZATION,
9038         DECL_FUNCTION_SPECIFIC_TARGET and DECL_FUNCTION_VERSIONED from
9039         current_function_decl to the new decl.
9040
9041 2017-10-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
9042
9043         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_2_HW): Define new
9044         helper macro for IEEE float128 hardware built-in functions.
9045         (SQRTF128_ODD): Add built-in functions with the round-to-odd
9046         semantics.
9047         (TRUNCF128_ODD): Likewise.
9048         (ADDF128_ODD): Likewise.
9049         (SUBF128_ODD): Likewise.
9050         (MULF128_ODD): Likewise.
9051         (DIVF128_ODD): Likewise.
9052         (FMAF128_ODD): Likewise.
9053         * config/rs6000/rs6000.md (UNSPEC_ROUND_TO_ODD): Rename to
9054         UNSPEC_TRUNC_ROUND_TO_ODD.
9055         (UNSPEC_TRUNC_ROUND_TO_ODD): Likewise.
9056         (UNSPEC_ADD_ROUND_TO_ODD): New unspec codes for the IEEE 128-bit
9057         floating point round to odd instructions.
9058         (UNSPEC_SUB_ROUND_TO_ODD): Likewise.
9059         (UNSPEC_MUL_ROUND_TO_ODD): Likewise.
9060         (UNSPEC_DIV_ROUND_TO_ODD): Likewise.
9061         (UNSPEC_FMA_ROUND_TO_ODD): Likewise.
9062         (UNSPEC_SQRT_ROUND_TO_ODD): Likewise.
9063         (trunc<mode>sf2_hw): Change the truncate with round to odd
9064         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.
9065         (add<mode>3_odd): Add insns for IEEE 128-bit floating point round
9066         to odd hardware instructions.
9067         (sub<mode>3_odd): Likewise.
9068         (mul<mode>3_odd): Likewise.
9069         (div<mode>3_odd): Likewise.
9070         (sqrt<mode>2_odd): Likewise.
9071         (fma<mode>4_odd): Likewise.
9072         (fms<mode>4_odd): Likewise.
9073         (nfma<mode>4_odd): Likewise.
9074         (nfms<mode>4_odd): Likewise.
9075         (trunc<mode>df2_odd): Change the truncate with round to odd
9076         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.  Add a generator
9077         function.
9078         * doc/extend.texi (PowerPC built-in functions): Update documentation
9079         for existing IEEE float128-bit built-in functions.  Add built-in
9080         functions that generate the IEEE 128-bit floating point round to
9081         odd instructions.
9082
9083 2017-10-03  Segher Boessenkool  <segher@kernel.crashing.org>
9084
9085         PR rtl-optimization/77729
9086         * simplify-rtx.c (simplify_binary_operation_1): Delete the (X&C1)|C2
9087         to (X&(C1&~C2))|C2 transformations.
9088
9089 2017-10-03  Martin Jambor  <mjambor@suse.cz>
9090
9091         PR tree-optimization/82363
9092         * tree-sra.c (propagate_subaccesses_across_link): In unrecoverable
9093         mismatch, mark lacc written regardless of racc.
9094
9095 2017-10-03  Jakub Jelinek  <jakub@redhat.com>
9096
9097         PR tree-optimization/82381
9098         * tree-ssa-reassoc.c (sort_by_operand_rank): Don't check
9099         stmt_to_insert nor wheather SSA_NAMEs are default defs.
9100         Return 1 or -1 if one of bba and bbb is NULL. If bb_rank is equal,
9101         fallthrough into reassoc_stmt_dominates_stmt_p.
9102
9103         PR target/82386
9104         * combine.c (combine_instructions): Don't combine in unreachable
9105         basic blocks.
9106
9107 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
9108
9109         PR target/80210
9110         * config/rs6000/rs6000.c (rs6000_option_override_internal): Rewrite
9111         function to not use the have_cpu variable.  Do not set cpu_index,
9112         rs6000_cpu_index or rs6000_tune_index if we end up using TARGET_DEFAULT
9113         or the default cpu.
9114         (rs6000_valid_attribute_p): Remove duplicate initializations of
9115         old_optimize and func_optimize.
9116         (rs6000_pragma_target_parse): Call rs6000_activate_target_options ().
9117         (rs6000_activate_target_options): Make global.
9118         * config/rs6000/rs6000-protos.h (rs6000_activate_target_options): Add
9119         prototype.
9120
9121 2017-10-02  Jakub Jelinek  <jakub@redhat.com>
9122
9123         * tree-dfa.c (get_ref_base_and_extent): Set *pmax_size to -1
9124         if *poffset + *pmax_size overflows in HOST_WIDE_INT.
9125         Set *poffset to 0 and *psize and *pmax_size to -1 if
9126         *poffset + *psize overflows in HOST_WIDE_INT.
9127
9128         PR tree-optimization/82387
9129         PR tree-optimization/82388
9130         PR tree-optimization/82389
9131         * tree-ssa-dse.c (dse_classify_store): Test byte_tracking_enabled
9132         instead of live_bytes non-NULL.
9133
9134 2017-10-02  Georg-Johann Lay  <avr@gjlay.de>
9135
9136         PR target/41076
9137         * confg/avr/avr.md (*iorhi3.ashift8-ext.zerox): Add "r,r,0"
9138         alternative.
9139
9140 2017-10-02  Richard Biener  <rguenther@suse.de>
9141
9142         * graphite-isl-ast-to-gimple.c (set_codegen_error): With
9143         -fchecking and --param graphite-allow-codegen-errors=0 ICE.
9144         * params.def (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): New param.
9145
9146 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
9147
9148         * tree.h (wi::int_traits <const_tree>::decompose): Assert that the
9149         requested precision matches the type's.
9150         * calls.c (alloc_max_size): Calculate the new candidate size as
9151         a widest_int and use wi::to_widest when comparing it with the
9152         current candidate size.
9153         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Compare with
9154         zero rather than integer_zero_node.
9155         * match.pd: Check for a no-op conversion before using wi::add
9156         rather than after.  Use tree_to_uhwi when summing small shift
9157         counts into an unsigned int.
9158
9159 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
9160             Alan Hayward  <alan.hayward@arm.com>
9161             David Sherwood  <david.sherwood@arm.com>
9162
9163         PR target/71307
9164         * config/aarch64/aarch64.h (POINTER_AND_FP_REGS): New reg class.
9165         (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
9166         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
9167         POINTER_AND_FP_REGS.
9168
9169 2017-10-02  Richard Biener  <rguenther@suse.de>
9170
9171         PR tree-optimization/82355
9172         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
9173         a mapping for the enclosing loop but avoid generating one for
9174         the loop tree root.
9175         (copy_bb_and_scalar_dependences): Remove premature codegen
9176         error on PHIs in blocks duplicated into multiple places.
9177         * graphite-scop-detection.c
9178         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
9179         in the region use it as loop and nest to analyze the DR in.
9180         (try_generate_gimple_bb): Likewise.
9181         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
9182         (add_loop_constraints): For blocks in a loop not in the region
9183         create a dimension with a single iteration.
9184         * sese.h (gbb_loop_at_index): Remove assert.
9185
9186 2017-10-01  Kevin Buettner  <kevinb@redhat.com>
9187
9188         * omp-expand.c (adjust_context_scope): New function.
9189         (expand_parallel_call): Call adjust_context_scope.
9190
9191 2017-10-01  Jeff Law  <law@redhat.com>
9192
9193         * tree-ssa-dom.c (optimize_stmt): Make this a method within the
9194         dom_opt_dom_walker class with direct access to private members.
9195         Add comments.  Call test_for_singularity.
9196         (dom_opt_dom_walker::before_dom_children): Corresponding changes.
9197         (dom_opt_dom_walker::after_dom_children): Do not lazily initialize
9198         m_dummy_cond anymore.
9199         (class dom_opt_dom_walker): Initialize m_dummy_cond member in the
9200         class ctor.
9201         (pass_dominator:execute): Build the dummy_cond here and pass it
9202         to the dom_opt_dom_walker ctor.
9203         (test_for_singularity): New function.
9204
9205 2017-09-30  Krister Walfridsson  <krister.walfridsson@gmail.com>
9206             Maya Rashish  <coypu@sdf.org>
9207
9208         * config.gcc (*-*-netbsd*): New variable nbsd_tm_file containing
9209         netbsd.h, netbsd-stdint.h, and netbsd-elf.h.
9210         (alpha*-*-netbsd*) Use nbsd_tm_file.
9211         (arm*-*-netbsdelf*) Likewise.
9212         (i[34567]86-*-netbsdelf*) Likewise.
9213         (x86_64-*-netbsd*) Likewise.
9214         (mips*-*-netbsd*) Likewise.
9215         (powerpc-*-netbsd*) Likewise.
9216         (sh*-*-netbsd*) Likewise.
9217         (sparc-*-netbsdelf*) Likewise.
9218         (sparc64-*-netbsd*) Likewise.
9219         (m68k*-*-netbsdelf*) Use nbsd_tm_file and add CHAR_FAST8/SHORT_FAST16
9220         to tm_defines.
9221         (vax-*-netbsdelf*) Likewise.
9222         * config/netbsd-stdint.h (INT_FAST8_TYPE): Check CHAR_FAST8.
9223         (UINT_FAST8_TYPE) Likewise.
9224         (INT_FAST16_TYPE) Check CHAR_FAST16.
9225         (UINT_FAST16_TYPE) Likewise.
9226
9227 2017-09-30  Jakub Jelinek  <jakub@redhat.com>
9228
9229         PR target/82361
9230         * config/i386/i386.md
9231         (TARGET_USE_8BIT_IDIV zext divmodsi4 splitter): New define_split.
9232         (divmodsi4_zext_1, divmodsi4_zext_2, *divmodsi4_zext_1,
9233         *divmodsi4_zext_2): New define_insn_and_split.
9234         (*divmodsi4_noext_zext_1, *divmodsi4_noext_zext_2): New define_insn.
9235         (TARGET_USE_8BIT_IDIV zext udivmodsi4 splitter): New define_split.
9236         (udivmodsi4_zext_1, udivmodsi4_zext_2, *udivmodsi4_zext_1,
9237         *udivmodsi4_zext_2, *udivmodsi4_pow2_zext_1, *udivmodsi4_pow2_zext_2):
9238         New define_insn_and_split.
9239         (*udivmodsi4_noext_zext_1, *udivmodsi4_noext_zext_2): New define_insn.
9240         * config/i386/i386.c (ix86_split_idivmod): Handle operands[0] or
9241         operands[1] having DImode when mode is SImode.
9242
9243         * config/i386/i386.c (ix86_split_idivmod): Use mode instead of
9244         always SImode for DIV and MOD in REG_EQUAL notes.
9245
9246 2017-09-29  Yury Gribov  <tetra2005@gmail.com>
9247
9248         PR middle-end/82319
9249         * match.pd: Fix handling of NaNs in pattern.
9250
9251 2017-09-29  Jeff Law  <law@redhat.com>
9252
9253         * sbitmap.c (bitmap_bit_in_range_p): New function.
9254         * sbitmap.h (bitmap_bit_in_range_p): Prototype.
9255         * tree-ssa-dse.c (live_bytes_read): New function.
9256         (dse_classify_store): Ignore reads of dead bytes.
9257
9258         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix
9259         typos and whitespace errors.
9260         * config/i386/predicates.md (address_no_seg_operand): Likewise.
9261         * config/s390/s390.c (s390_emit_prologue): Likewise.
9262
9263 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
9264
9265         PR target/81481
9266         * ira-costs.c (scan_one_insn): Don't take into account PIC equiv
9267         with a symbol for LRA.
9268
9269 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
9270
9271         PR rtl-optimization/82338
9272         * lra-constraints.c (inherit_in_ebb): Check usage_insns check.
9273
9274 2017-09-29  Alexander Monakov  <amonakov@ispras.ru>
9275
9276         * genmodes.c (calc_wider_mode): Suppress qsort macro.
9277         * system.h [CHECKING_P] (qsort): Redirect to qsort_chk.
9278         (qsort_chk): Declare.
9279         * vec.c [CHECKING_P] (qsort_chk_error): New static function.
9280         (qsort_chk): New function.
9281
9282 2017-09-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9283
9284         PR tree-optimization/82337
9285         * gimple-ssa-strength-reduction.c (find_phi_def): Don't record a
9286         phi definition if the PHI result appears in an abnormal PHI.
9287         (find_basis_for_base_expr): Don't record a basis if the LHS of the
9288         basis appears in an abnormal PHI.
9289
9290 2017-09-29  Richard Biener  <rguenther@suse.de>
9291
9292         * graphite-isl-ast-to-gimple.c
9293         (translate_isl_ast_to_gimple::set_codegen_error): New function.
9294         (binary_op_to_tree): Use it.
9295         (get_rename_from_scev): Likewise.
9296         (copy_loop_phi_nodes): Likewise.
9297         (copy_bb_and_scalar_dependences): Likewise.
9298         (translate_pending_phi_nodes): Likewise.
9299
9300 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
9301
9302         PR target/82339
9303         * config/i386/i386.md (*movdi_internal peephole2): New -Os peephole
9304         for movabsq $(i32 << shift), r64.
9305
9306 2017-09-28  Uros Bizjak  <ubizjak@gmail.com>
9307
9308         * config/i386/i386.c (ix86_print_operand_address_as): Do not check
9309         index when encoding %esp as %rsp to avoid 0x67 prefix.
9310
9311 2017-09-28  Sergey Shalnov  <Sergey.Shalnov@intel.com>
9312
9313         * config/i386/i386.md (*movsf_internal, *movdf_internal):
9314         Return 256-bit AVX modes for TARGET_PREFER_AVX256.
9315
9316 2017-09-28  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9317
9318         * config/arm/arm.c (arm_option_override): Forbid ARMv8-M Security
9319         Extensions with more than 16 double VFP registers.
9320         (cmse_nonsecure_entry_clear_before_return): Remove second entry of
9321         to_clear_mask and all code related to it.  Replace the remaining
9322         entry by a sbitmap and adapt code accordingly.
9323
9324 2017-09-28  Henry Linjamäki  <henry.linjamaki@parmance.com>
9325
9326         * brig-builtins.def: Change pure attributes to const.
9327
9328 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
9329
9330         * config.gcc (default_gnu_indirect_function): Default to yes for
9331         sparc*-*-linux* with glibc.
9332
9333 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
9334
9335         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
9336         (aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
9337         when creating .init_array and .fini_array sections with priority
9338         specified.
9339
9340 2017-09-27  Christophe Lyon  <christophe.lyon@linaro.org>
9341
9342         PR target/71727
9343         * config/aarch64/aarch64.c
9344         (aarch64_builtin_support_vector_misalignment): Always return false
9345         when misalignment is unknown.
9346
9347 2017-09-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9348
9349         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Revise
9350         this function to return false if the definition used by the swap
9351         instruction is artificial, or if the memory address from which the
9352         constant value is loaded is not represented by a base address held
9353         in a register or if the base address register is a frame or stack
9354         pointer.  Additionally, return false if the base address of the
9355         loaded constant is a SYMBOL_REF but is not considered to be a
9356         constant.
9357         (replace_swapped_load_constant): New function.
9358         (rs6000_analyze_swaps): Add a new pass to replace a swap of a
9359         loaded constant vector with a load of a swapped constant vector.
9360
9361 2017-09-27  Carl Love  <cel@us.ibm.com>
9362
9363         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
9364         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
9365         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
9366         fctiw instruction.
9367
9368 2017-09-27  Alexander Monakov  <amonakov@ispras.ru>
9369
9370         * haifa-sched.c (autopref_rank_for_schedule): Order 'irrelevant' insns
9371         first, always call autopref_rank_data otherwise.
9372
9373 2017-09-27  Richard Biener  <rguenther@suse.de>
9374
9375         * graphite-scop-detection.c (find_scop_parameters): Move
9376         loop bound handling ...
9377         (gather_bbs::before_dom_children): ... here, avoiding the need
9378         to build scop_info->loop_nest.
9379         (record_loop_in_sese): Remove.
9380         * sese.h (sese_info_t::loop_nest): Remove.
9381         * sese.c (new_sese_info): Do not allocate loop_nest.
9382         (free_sese_info): Do not free loop_nest.
9383
9384 2017-09-27  Jakub Jelinek  <jakub@redhat.com>
9385
9386         PR c++/82159
9387         * gimplify.c (gimplify_modify_expr): Don't optimize away zero sized
9388         lhs from calls if the lhs has addressable type.
9389
9390 2017-09-27  Richard Biener  <rguenther@suse.de>
9391
9392         * graphite.h (scop::max_alias_set): New member.
9393         * graphite-scop-detection.c: Remove references to non-existing
9394         --param in comments.
9395         (build_alias_sets): Record the maximum alias set used for drs.
9396         (build_scops): Support zero as unlimited for
9397         --param graphite-max-arrays-per-scop.
9398         * graphite-sese-to-poly.c (add_scalar_version_numbers): Remove
9399         and inline into ...
9400         (build_poly_sr_1): ... here.  Compute alias set based on the
9401         maximum alias set used for drs rather than
9402         PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP
9403
9404 2017-09-27  Richard Biener  <rguenther@suse.de>
9405
9406         * graphite-optimize-isl.c (get_schedule_for_node_st): Allow
9407         --param loop-block-tile-size=0 to disable tiling.
9408
9409 2017-09-27  Richard Biener  <rguenther@suse.de>
9410
9411         * doc/invoke.texi (graphite-max-bbs-per-function): Remove.
9412         (graphite-max-nb-scop-params): Document special value zero.
9413         * domwalk.h (dom_walker::STOP): New symbolical constant.
9414         (dom_walker::dom_walker): Add optional parameter for bb to
9415         RPO mapping.
9416         (dom_walker::~dom_walker): Declare.
9417         (dom_walker::before_dom_children): Document STOP return value.
9418         (dom_walker::m_user_bb_to_rpo): New member.
9419         (dom_walker::m_bb_to_rpo): Likewise.
9420         * domwalk.c (dom_walker::dom_walker): Compute bb to RPO
9421         mapping here if not provided by the user.
9422         (dom_walker::~dom_walker): Free bb to RPO mapping if not
9423         provided by the user.
9424         (dom_walker::STOP): Define.
9425         (dom_walker::walk): Do not compute bb to RPO mapping here.
9426         Support STOP return value from before_dom_children to stop
9427         walking.
9428         * graphite-optimize-isl.c (optimize_isl): If the schedule
9429         is the same still generate code if -fgraphite-identity
9430         or -floop-parallelize-all are given.
9431         * graphite-scop-detection.c: Include cfganal.h.
9432         (gather_bbs::gather_bbs): Get and pass through bb to RPO
9433         mapping.
9434         (gather_bbs::before_dom_children): Return STOP for BBs
9435         not in the region.
9436         (build_scops): Compute bb to RPO mapping and pass it to
9437         the domwalk.  Treat --param graphite-max-nb-scop-params=0
9438         as not limiting the number of params.
9439         * graphite.c (graphite_initialize): Remove limit on the
9440         number of basic-blocks in a function.
9441         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Remove.
9442         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Adjust to documented
9443         default value of 10.
9444
9445 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
9446
9447         * config/rs6000/vsx.md (peephole for optimizing move SF to GPR):
9448         Adjust code to eliminate needing to do the shift right 32-bits
9449         operation after XSCVDPSPN.
9450
9451 2017-09-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9452
9453         * match.pd ((X / Y) == 0 -> X < Y): New pattern.
9454         ((X / Y) != 0 -> X >= Y): Likewise.
9455
9456 2017-09-26  Carl Love  <cel@us.ibm.com>
9457
9458         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_XL_LEN_R,
9459         P9V_BUILTIN_VEC_XST_LEN_R): Add support for builtins
9460         vector unsigned char vec_xl_len_r (unsigned char *, size_t);
9461         void vec_xst_len_r (vector unsigned char, unsigned char *, size_t);
9462         * config/rs6000/altivec.h (vec_xl_len_r, vec_xst_len_r): Add defines.
9463         * config/rs6000/rs6000-builtin.def (XL_LEN_R, XST_LEN_R): Add
9464         definitions and overloading.
9465         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case
9466         statement for P9V_BUILTIN_XST_LEN_R.
9467         (altivec_init_builtins): Add def_builtin for P9V_BUILTIN_STXVLL.
9468         * config/rs6000/vsx.md (lxvll, stxvll, xl_len_r, xst_len_r): Add
9469         define_expand and define_insn for the instructions and builtins.
9470         * doc/extend.texi: Update the built-in documentation file for the new
9471         built-in functions.
9472         * config/rs6000/altivec.md (altivec_lvsl_reg, altivec_lvsr_reg): Add
9473         define_insn for the instructions
9474
9475 2017-09-26  Krister Walfridsson  <krister.walfridsson@gmail.com>
9476
9477         PR target/39570
9478         * gcc/config/netbsd-protos.h: New file.
9479         * gcc/config/netbsd.c: New file.
9480         * gcc/config/netbsd.h (SUBTARGET_INIT_BUILTINS): Define.
9481         * gcc/config/t-netbsd: New file.
9482         * gcc/config.gcc (tm_p_file): Add netbsd-protos.h.
9483         (tmake_file) Add t-netbsd.
9484         (extra_objs) Add netbsd.o.
9485
9486 2017-09-26  Janus Weil  <janus@gcc.gnu.org>
9487
9488         PR fortran/82143
9489         PR fortran/82324
9490         * doc/sourcebuild.texi: Document fortran_real_10 and fortran_real_16.
9491
9492 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
9493
9494         * config/rs6000/rs6000.md (extendsi<mode>2): Add a splitter to do
9495         sign extension from a vector register to a GPR by doing a 32-bit
9496         direct move and then an EXTSW.
9497         (extendsi<mode>2 splitter): Likewise.
9498         (movsi_from_sf): Adjust code to eliminate doing a 32-bit shift
9499         right or vector extract after doing XSCVDPSPN.  Use
9500         zero_extendsidi2 instead of p8_mfvsrd_4_disf to move the value to
9501         the GPRs.
9502         (movdi_from_sf_zero_ext): Likewise.
9503         (reload_gpr_from_vsxsf): Likewise.
9504         (p8_mfvsrd_4_disf): Delete, no longer used.
9505         (movsi_from_df): Optimize converting a DFmode to a SFmode, and
9506         then needing to move the SFmode to a GPR to use the XSCVDPSP
9507         instruction instead of FRSP and XSCVDPSPN.
9508         * config/rs6000/vsx.md (vsx_xscvspdp_scalar2): Move insn so that
9509         it is adjacent to the other XSCVSPDP insns.
9510         (vsx_xscvdpsp_scalar): Use "ww" constraint instead of "f" to allow
9511         SFmode to be in traditional Altivec registers.
9512         (vsx_xscvdpspn): Eliminate useless alternative constraint.
9513         (vsx_xscvspdpn): Likewise.
9514         (vsx_xscvspdpn_scalar): Likewise.
9515
9516 2017-09-26  Martin Jambor  <mjambor@suse.cz>
9517
9518         * tree-sra.c (compare_access_positions): Put integral types first,
9519         stabilize sorting of integral types, remove conditions putting
9520         non-full-precision integers last.
9521         (sort_and_splice_var_accesses): Disable scalarization if a
9522         non-integert would be represented by a non-full-precision integer.
9523
9524 2017-09-26  Joseph Myers  <joseph@codesourcery.com>
9525
9526         * config/microblaze/linux.h (TARGET_ASM_FILE_END): Likewise.
9527         * config/pa/pa.h (NEED_INDICATE_EXEC_STACK): Likewise.
9528         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Likewise.
9529         * config/pa/pa.c (pa_hpux_file_end): Rename to pa_file_end.
9530         Define unconditionally, with [ASM_OUTPUT_EXTERNAL_REAL]
9531         conditionals inside the function instead of around it.  Call
9532         file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK.
9533         (TARGET_ASM_FILE_END): Define unconditionally to pa_file_end.
9534
9535 2017-09-26  Richard Biener  <rguenther@suse.de>
9536
9537         * graphite-scop-detection.c (scop_detection::build_scop_depth): Rewrite,
9538         fold in ...
9539         (scop_detection::build_scop_breadth): ... this.  Removed.
9540         (scop_detection::loop_is_valid_in_scop): Fold into single caller.
9541         (scop_detection::harmful_stmt_in_bb): Likewise.
9542         (scop_detection::graphite_can_represent_stmt): Likewise.
9543         (scop_detection::loop_body_is_valid_scop): Likewise.  Remove recursion.
9544         (scop_detection::can_represent_loop): Remove recursion, fold in ...
9545         (scop_detection::can_represent_loop_1): ... this.  Removed.
9546         (scop_detection::harmful_loop_in_region): Simplify after inlining
9547         the above and remove more quadraticness.
9548         (build_scops): Adjust.
9549         * tree-data-ref.c (loop_nest_has_data_refs): Remove pointless
9550         quadraticness.
9551
9552 2017-09-26  Jakub Jelinek  <jakub@redhat.com>
9553
9554         PR target/82267
9555         * config/i386/i386.c (ix86_print_operand_address_as): Only test
9556         REGNO (base) == SP_REG if base is a REG.
9557
9558         PR middle-end/35691
9559         * tree-ssa-reassoc.c (update_range_test): Dump r->exp each time
9560         if it is different SSA_NAME.
9561         (optimize_range_tests_cmp_bitwise): New function.
9562         (optimize_range_tests): Call it.
9563
9564 2017-09-26  Richard Biener  <rguenther@suse.de>
9565
9566         PR tree-optimization/82321
9567         * graphite.c (canonicalize_loop_closed_ssa): Properly check
9568         for the def being inside the loop.
9569
9570 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9571
9572         * config/s390/vx-builtins.md ("vmslg"): Add missing operand in
9573         assembler output.
9574         * config/s390/s390-builtins.def: Fix constraint on op4.
9575
9576 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9577
9578         * config/s390/s390.c (s390_expand_vec_compare): Use the new mode
9579         independent expanders.
9580         * config/s390/vector.md ("vec_cmpuneq", "vec_cmpltgt")
9581         ("vec_ordered", "vec_unordered"): New expanders.
9582
9583 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9584
9585         * config/s390/s390.c (s390_preferred_simd_mode): Return V4SFmode
9586         for SFmode.
9587
9588 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9589
9590         * config/s390/vector.md ("vec_unpacks_low_v16qi"): Rename to
9591         vec_unpacks_lo_v16qi.
9592         ("vec_unpacku_low_v16qi"): Rename to vec_unpacku_lo_v16qi.
9593
9594 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9595
9596         * config/s390/vector.md ("vec_unpacks_lo_v4sf")
9597         ("vec_unpacks_hi_v4sf", "vec_unpacks_lo_v2df")
9598         ("vec_unpacks_hi_v2df", "vec_pack_trunc_v2df"): New expanders.
9599
9600 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9601
9602         * config/s390/predicates.md ("const_shift_by_byte_operand"): New
9603         predicate.
9604         * config/s390/vector.md ("*vec_srb<mode>"): Change modes to V_128
9605         and V16QI.
9606         ("*vec_slb<mode>"): New insn pattern.
9607         ("vec_shr_<mode>"): New expander.
9608         * config/s390/vx-builtins.md ("vec_slb<mode>"): Turn into expander
9609         and force the shift count operand to V16QImode.
9610         ("vec_srb<mode>"): Set shift count mode to V16QI.
9611
9612 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9613
9614         * config/s390/vector.md ("vec_widen_umult_lo_<mode>")
9615         ("vec_widen_umult_hi_<mode>", "vec_widen_smult_lo_<mode>")
9616         ("vec_widen_smult_hi_<mode>"): New expander definitions.
9617
9618 2017-09-26  Richard Earnshaw  <rearnsha@arm.com>
9619
9620         PR target/82175
9621         * config/arm/arm.h (DRIVER_SELF_SPECS): Separate sub-rules with commas.
9622
9623 2017-09-26  Richard Biener  <rguenther@suse.de>
9624
9625         PR tree-optimization/82320
9626         * tree-ssa-sccvn.c (set_ssa_val_to): Changing undef to undef
9627         isn't a change.
9628
9629 2017-09-25  Jeff Law  <law@redhat.com>
9630
9631         * config/rs6000/rs6000-protos.h (output_probe_stack_range): Update
9632         prototype for new argument.
9633         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack_1): New function,
9634         mostly extracted from rs6000_emit_allocate_stack.
9635         (rs6000_emit_probe_stack_range_stack_clash): New function.
9636         (rs6000_emit_allocate_stack): Call
9637         rs6000_emit_probe_stack_range_stack_clash as needed.
9638         (rs6000_emit_probe_stack_range): Add additional argument
9639         to call to gen_probe_stack_range{si,di}.
9640         (output_probe_stack_range): New.
9641         (output_probe_stack_range_1): Renamed from output_probe_stack_range.
9642         (output_probe_stack_range_stack_clash): New.
9643         (rs6000_emit_prologue): Emit notes into dump file as requested.
9644         * rs6000.md (allocate_stack): Handle -fstack-clash-protection.
9645         (probe_stack_range<P:mode>): Operand 0 is now early-clobbered.
9646         Add additional operand and pass it to output_probe_stack_range.
9647
9648 2017-09-25  Bin Cheng  <bin.cheng@arm.com>
9649
9650         PR tree-optimization/82163
9651         * tree-ssa-loop-manip.h (verify_loop_closed_ssa): New parameter.
9652         (checking_verify_loop_closed_ssa): New parameter.
9653         * tree-ssa-loop-manip.c (check_loop_closed_ssa_use): Delete.
9654         (check_loop_closed_ssa_stmt): Delete.
9655         (check_loop_closed_ssa_def, check_loop_closed_ssa_bb): New functions.
9656         (verify_loop_closed_ssa): Check loop closed ssa form for LOOP.
9657         (tree_transform_and_unroll_loop): Check loop closed ssa form only for
9658         changed loops.
9659
9660 2017-09-25  Pekka Jaaskelainen <pekka@parmance.com>
9661
9662         * brig-builtins.def: Treat HSAIL barrier builtins as
9663         setjmp/longjump style functions.
9664
9665 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
9666
9667         * target.def (constant_alignment): New hook.
9668         * defaults.h (CONSTANT_ALIGNMENT): Delete.
9669         * doc/tm.texi.in (CONSTANT_ALIGNMENT): Replace with...
9670         (TARGET_CONSTANT_ALIGNMENT): ...this new hook.
9671         * doc/tm.texi: Regenerate.
9672         * targhooks.h (default_constant_alignment): Declare.
9673         (constant_alignment_word_strings): Likewise.
9674         * targhooks.c (default_constant_alignment): New function.
9675         (constant_alignment_word_strings): Likewise.
9676         * builtins.c (get_object_alignment_2): Use targetm.constant_alignment
9677         instead of CONSTANT_ALIGNMENT.
9678         * varasm.c (align_variable, get_variable_align, build_constant_desc)
9679         (force_const_mem): Likewise.
9680         * config/aarch64/aarch64.h (CONSTANT_ALIGNMENT): Delete.
9681         * config/aarch64/aarch64.c (aarch64_constant_alignment): New function.
9682         (aarch64_classify_address): Call it instead of CONSTANT_ALIGNMENT.
9683         (TARGET_CONSTANT_ALIGNMENT): Redefine.
9684         * config/alpha/alpha.h (CONSTANT_ALIGNMENT): Delete commented-out
9685         definition.
9686         * config/arc/arc.h (CONSTANT_ALIGNMENT): Delete.
9687         * config/arc/arc.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9688         constant_alignment_word_strings.
9689         * config/arm/arm.h (CONSTANT_ALIGNMENT_FACTOR): Delete.
9690         (CONSTANT_ALIGNMENT): Likewise.
9691         * config/arm/arm.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9692         (arm_constant_alignment): New function.
9693         * config/bfin/bfin.h (CONSTANT_ALIGNMENT): Delete.
9694         * config/bfin/bfin.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9695         constant_alignment_word_strings.
9696         * config/cr16/cr16.h (CONSTANT_ALIGNMENT): Delete.
9697         * config/cr16/cr16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9698         constant_alignment_word_strings.
9699         * config/cris/cris.h (CONSTANT_ALIGNMENT): Delete.
9700         * config/cris/cris.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9701         (cris_constant_alignment): New function.
9702         * config/epiphany/epiphany.h (CONSTANT_ALIGNMENT): Delete.
9703         * config/epiphany/epiphany.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9704         (epiphany_constant_alignment): New function.
9705         * config/fr30/fr30.h (CONSTANT_ALIGNMENT): Delete.
9706         * config/fr30/fr30.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9707         constant_alignment_word_strings.
9708         * config/frv/frv.h (CONSTANT_ALIGNMENT): Delete.
9709         * config/frv/frv.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9710         constant_alignment_word_strings.
9711         * config/ft32/ft32.h (CONSTANT_ALIGNMENT): Delete.
9712         * config/ft32/ft32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9713         constant_alignment_word_strings.
9714         * config/i386/i386.h (CONSTANT_ALIGNMENT): Delete.
9715         * config/i386/i386-protos.h (ix86_constant_alignment): Delete.
9716         * config/i386/i386.c (ix86_constant_alignment): Make static.
9717         Use the same interface as the target hook.
9718         (TARGET_CONSTANT_ALIGNMENT): Redefine.
9719         * config/ia64/ia64.h (CONSTANT_ALIGNMENT): Delete.
9720         * config/ia64/ia64.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9721         constant_alignment_word_strings.
9722         * config/iq2000/iq2000.h (CONSTANT_ALIGNMENT): Delete.
9723         * config/iq2000/iq2000.c (iq2000_constant_alignment): New function.
9724         (TARGET_CONSTANT_ALIGNMENT): Redefine.
9725         * config/lm32/lm32.h (CONSTANT_ALIGNMENT): Delete.
9726         * config/lm32/lm32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9727         constant_alignment_word_strings.
9728         * config/m32r/m32r.h (CONSTANT_ALIGNMENT): Delete.
9729         * config/m32r/m32r.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9730         constant_alignment_word_strings.
9731         * config/mcore/mcore.h (CONSTANT_ALIGNMENT): Delete.
9732         * config/mcore/mcore.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9733         constant_alignment_word_strings.
9734         * config/microblaze/microblaze.h (CONSTANT_ALIGNMENT): Delete.
9735         * config/microblaze/microblaze.c (microblaze_constant_alignment):
9736         New function.
9737         (TARGET_CONSTANT_ALIGNMENT): Redefine.
9738         * config/mips/mips.h (CONSTANT_ALIGNMENT): Delete.
9739         * config/mips/mips.c (mips_constant_alignment): New function.
9740         (TARGET_CONSTANT_ALIGNMENT): Redefine.
9741         * config/mmix/mmix.h (CONSTANT_ALIGNMENT): Delete.
9742         * config/mmix/mmix-protos.h (mmix_constant_alignment): Delete.
9743         * config/mmix/mmix.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9744         (mmix_constant_alignment): Make static.  Use the same interface
9745         as the target hook.
9746         * config/moxie/moxie.h (CONSTANT_ALIGNMENT): Delete.
9747         * config/moxie/moxie.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9748         constant_alignment_word_strings.
9749         * config/nios2/nios2.h (CONSTANT_ALIGNMENT): Delete.
9750         * config/nios2/nios2.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9751         constant_alignment_word_strings.
9752         * config/pa/pa.h (CONSTANT_ALIGNMENT): Delete.
9753         * config/pa/pa.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9754         constant_alignment_word_strings.
9755         * config/powerpcspe/powerpcspe.h (CONSTANT_ALIGNMENT): Delete.
9756         * config/powerpcspe/powerpcspe.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9757         (rs6000_constant_alignment): New function.
9758         * config/riscv/riscv.h (CONSTANT_ALIGNMENT): Delete.
9759         * config/riscv/riscv.c (riscv_constant_alignment): New function.
9760         (TARGET_CONSTANT_ALIGNMENT): Redefine.
9761         * config/rs6000/rs6000.h (CONSTANT_ALIGNMENT): Delete.
9762         * config/rs6000/rs6000.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9763         (rs6000_constant_alignment): New function.
9764         * config/s390/s390.h (CONSTANT_ALIGNMENT): Delete.
9765         * config/s390/s390.c (s390_constant_alignment): New function.
9766         (TARGET_CONSTANT_ALIGNMENT): Redefine.
9767         * config/sh/sh.h (CONSTANT_ALIGNMENT): Delete.
9768         * config/sh/sh.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9769         constant_alignment_word_strings.
9770         * config/sparc/sparc.h (CONSTANT_ALIGNMENT): Delete.
9771         * config/sparc/sparc.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9772         (sparc_constant_alignment): New function.
9773         * config/spu/spu.h (CONSTANT_ALIGNMENT): Delete.
9774         * config/spu/spu.c (spu_constant_alignment): New function.
9775         (TARGET_CONSTANT_ALIGNMENT): Redefine.
9776         * config/stormy16/stormy16.h (CONSTANT_ALIGNMENT): Delete.
9777         * config/stormy16/stormy16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9778         constant_alignment_word_strings.
9779         * config/tilegx/tilegx.h (CONSTANT_ALIGNMENT): Delete.
9780         * config/tilegx/tilegx.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9781         constant_alignment_word_strings.
9782         * config/tilepro/tilepro.h (CONSTANT_ALIGNMENT): Delete.
9783         * config/tilepro/tilepro.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9784         constant_alignment_word_strings.
9785         * config/visium/visium.h (CONSTANT_ALIGNMENT): Delete.
9786         * config/visium/visium.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9787         (visium_constant_alignment): New function.
9788         * config/xtensa/xtensa.h (CONSTANT_ALIGNMENT): Delete.
9789         * config/xtensa/xtensa.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9790         (xtensa_constant_alignment): New function.
9791         * system.h (CONSTANT_ALIGNMENT): Poison.
9792
9793 2017-09-25  Will Schmidt  <will_schmidt@vnet.ibm.com>
9794
9795         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
9796         for early folding of vector stores (ALTIVEC_BUILTIN_ST_*).
9797         (rs6000_builtin_valid_without_lhs): New helper function.
9798         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9799         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_ST.
9800
9801 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
9802
9803         * target.h (vec_perm_indices): Use unsigned short rather than
9804         unsigned char.
9805         (auto_vec_perm_indices): Likewise.
9806         * config/aarch64/aarch64.c (aarch64_vectorize_vec_perm_const_ok):
9807         Use unsigned int rather than unsigned char.
9808         * config/arm/arm.c (arm_vectorize_vec_perm_const_ok): Likewise.
9809
9810 2017-09-25  Richard Biener  <rguenther@suse.de>
9811
9812         * cfgloop.h (sort_sibling_loops): Declare.
9813         * cfgloop.c (sort_sibling_loops_cmp): New helper.
9814         (sort_sibling_loops): New function sorting the sibling loop list
9815         in RPO order.
9816         * graphite.c (graphite_transform_loops): Sort sibling loops.
9817
9818 2017-09-25  Richard Sandiford  <richard.sandifird@linaro.org>
9819
9820         * target.def (vec_perm_const_ok): Change sel parameter to
9821         vec_perm_indices.
9822         * optabs-query.c (can_vec_perm_p): Update accordingly.
9823         * doc/tm.texi: Regenerate.
9824         * config/aarch64/aarch64.c (expand_vec_perm_d): Change perm to
9825         auto_vec_perm_indices and remove separate nelt field.
9826         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
9827         (aarch64_evpc_ext, aarch64_evpc_rev, aarch64_evpc_dup)
9828         (aarch64_evpc_tbl, aarch64_expand_vec_perm_const_1)
9829         (aarch64_expand_vec_perm_const): Update accordingly.
9830         (aarch64_vectorize_vec_perm_const_ok): Likewise.  Change sel
9831         to vec_perm_indices.
9832         * config/arm/arm.c (expand_vec_perm_d): Change perm to
9833         auto_vec_perm_indices and remove separate nelt field.
9834         (arm_evpc_neon_vuzp, arm_evpc_neon_vzip, arm_evpc_neon_vrev)
9835         (arm_evpc_neon_vtrn, arm_evpc_neon_vext, arm_evpc_neon_vtbl)
9836         (arm_expand_vec_perm_const_1, arm_expand_vec_perm_const): Update
9837         accordingly.
9838         (arm_vectorize_vec_perm_const_ok): Likewise.  Change sel
9839         to vec_perm_indices.
9840         * config/i386/i386.c (ix86_vectorize_vec_perm_const_ok): Change
9841         sel to vec_perm_indices.
9842         * config/ia64/ia64.c (ia64_vectorize_vec_perm_const_ok): Likewise.
9843         * config/mips/mips.c (mips_vectorize_vec_perm_const_ok): Likewise.
9844         * config/powerpcspe/powerpcspe.c (rs6000_vectorize_vec_perm_const_ok):
9845         Likewise.
9846         * config/rs6000/rs6000.c (rs6000_vectorize_vec_perm_const_ok):
9847         Likewise.
9848
9849 2017-09-25  Pierre-Marie de Rodat  <derodat@adacore.com>
9850
9851         PR debug/82155
9852         * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
9853         on the FUNCTION_DECL function context if it has a DIE that is a
9854         declaration.
9855
9856 2017-09-25  Richard Biener  <rguenther@suse.de>
9857
9858         PR tree-optimization/82285
9859         * tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
9860         enumeral types.
9861
9862 2017-09-25  Tom de Vries  <tom@codesourcery.com>
9863
9864         PR target/80035
9865         PR target/81069
9866         * config/nvptx/nvptx.c (nvptx_output_call_insn): Add exit after call to
9867         noreturn function.
9868
9869 2017-09-25  Richard Biener  <rguenther@suse.de>
9870
9871         * graphite-optimize-isl.c (optimize_isl): Fail and dump if
9872         ISL errors other than isl_error_quota happen.  Dump if the
9873         schedule is the same.
9874         * graphite-sese-to-poly.c (build_poly_scop): Fail on ISL
9875         errors instead of aborting inside ISL.
9876
9877 2017-09-25  Iain Sandoe  <iain@codesourcery.com>
9878
9879         PR target/80556
9880         * config/i386/darwin.h (REAL_LIB_SPEC): New; put libSystem ahead
9881         of libgcc_eh for m64.
9882         * config/i386/darwin64.h: Likewise.
9883
9884 2017-09-25  Richard Biener  <rguenther@suse.de>
9885
9886         PR middle-end/82144
9887         * dwarf2out.c (gen_enumeration_type_die): Do not add alignment
9888         attribute for incomplete types nor twice for complete ones.
9889
9890 2017-09-24  Uros Bizjak  <ubizjak@gmail.com>
9891
9892         PR target/82267
9893         * config/i386/i386.c (ix86_print_operand_address_as): Encode
9894         %esp as %rsp to avoid 0x67 prefix if there is no index or base
9895         register.
9896
9897 2017-09-23  Uros Bizjak  <ubizjak@gmail.com>
9898
9899         PR bootstrap/82306
9900         * config/i386/i386.opt (mprefer-avx256): Use
9901         ix86_target_flags variable.
9902         * config/i386/i386.c (ix86_target_string): Move
9903         -mprefer-avx256 to flag2_opts.
9904
9905 2017-09-22  Jakub Jelinek  <jakub@redhat.com>
9906
9907         PR middle-end/35691
9908         * match.pd: Simplify x == -1 & y == -1 into (x & y) == -1
9909         and x != -1 | y != -1 into (x & y) != -1.
9910
9911 2017-09-22  Steve Ellcey  <sellcey@cavium.com>
9912
9913         * config.gcc: Add new case statement to set
9914         default_gnu_indirect_function.  Remove it from x86_64-*-linux*,
9915         i[34567]86-*, powerpc*-*-linux*spe*, powerpc*-*-linux*, s390-*-linux*,
9916         s390x-*-linux* case statements.   Added aarch64 to the list of
9917         supported architectures.
9918
9919 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
9920
9921         PR tree-optimization/82289
9922         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Check
9923         STMT_VINFO_RELEVANT_P.
9924
9925 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
9926             Alan Hayward  <alan.hayward@arm.com>
9927             David Sherwood  <david.sherwood@arm.com>
9928
9929         * tree-vrp.c (extract_range_from_multiplicative_op_1): Assert
9930         for VR_RANGE only; don't allow VR_ANTI_RANGE.
9931         (extract_range_from_binary_expr_1): Don't call
9932         extract_range_from_multiplicative_op_1 if !range_int_cst_p.
9933
9934 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
9935             Alan Hayward  <alan.hayward@arm.com>
9936             David Sherwood  <david.sherwood@arm.com>
9937
9938         * target.def (preferred_vector_alignment): New hook.
9939         * doc/tm.texi.in (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): New
9940         hook.
9941         * doc/tm.texi: Regenerate.
9942         * targhooks.h (default_preferred_vector_alignment): Declare.
9943         * targhooks.c (default_preferred_vector_alignment): New function.
9944         * tree-vectorizer.h (dataref_aux): Add a target_alignment field.
9945         Expand commentary.
9946         (DR_TARGET_ALIGNMENT): New macro.
9947         (aligned_access_p): Update commentary.
9948         (vect_known_alignment_in_bytes): New function.
9949         * tree-vect-data-refs.c (vect_calculate_required_alignment): New
9950         function.
9951         (vect_compute_data_ref_alignment): Set DR_TARGET_ALIGNMENT.
9952         Calculate the misalignment based on the target alignment rather than
9953         the vector size.
9954         (vect_update_misalignment_for_peel): Use DR_TARGET_ALIGMENT
9955         rather than TYPE_ALIGN / BITS_PER_UNIT to update the misalignment.
9956         (vect_enhance_data_refs_alignment): Mask the byte misalignment with
9957         the target alignment, rather than masking the element misalignment
9958         with the number of elements in a vector.  Also use the target
9959         alignment when calculating the maximum number of peels.
9960         (vect_find_same_alignment_drs): Use vect_calculate_required_alignment
9961         instead of TYPE_ALIGN_UNIT.
9962         (vect_duplicate_ssa_name_ptr_info): Remove stmt_info parameter.
9963         Measure DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT.
9964         (vect_create_addr_base_for_vector_ref): Update call accordingly.
9965         (vect_create_data_ref_ptr): Likewise.
9966         (vect_setup_realignment): Realign by ANDing with
9967         -DR_TARGET_MISALIGNMENT.
9968         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Calculate
9969         the number of peels based on DR_TARGET_ALIGNMENT.
9970         * tree-vect-stmts.c (get_group_load_store_type): Compare the gap
9971         with the guaranteed alignment boundary when deciding whether
9972         overrun is OK.
9973         (vectorizable_mask_load_store): Interpret DR_MISALIGNMENT
9974         relative to DR_TARGET_ALIGNMENT instead of TYPE_ALIGN_UNIT.
9975         (ensure_base_align): Remove stmt_info parameter.  Get the
9976         target base alignment from DR_TARGET_ALIGNMENT.
9977         (vectorizable_store): Update call accordingly.   Interpret
9978         DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT instead of
9979         TYPE_ALIGN_UNIT.
9980         (vectorizable_load): Likewise.
9981
9982 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
9983             Alan Hayward  <alan.hayward@arm.com>
9984             David Sherwood  <david.sherwood@arm.com>
9985
9986         * tree-vectorizer.h (vect_get_scalar_dr_size): New function.
9987         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use it.
9988         (vect_enhance_data_refs_alignment): Likewise.
9989
9990 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
9991
9992         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
9993         error.  Only quit immediately if parsing is complete.
9994         (BEGIN): Initialize fatal_err and parse_done.
9995         (begin fpu, end fpu): Check number of arguments.
9996         (begin arch, end arch): Likewise.
9997         (begin cpu, end cpu): Likewise.
9998         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
9999         (optalias): Likewise.
10000
10001 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
10002
10003         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
10004         * config/arm/arm-isa.h: Delete.  Move definitions to ...
10005         * arm-cpus.in: ... here.  Use new feature and fgroup values.
10006         * config/arm/arm.c (arm_option_override): Use lower case for feature
10007         bit names.
10008         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
10009         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
10010         * config/arm/parsecpu.awk (END): Add new command 'isa'.
10011         (isa_pfx): Delete.
10012         (print_isa_bits_for): New function.
10013         (gen_isa): New function.
10014         (gen_comm_data): Use print_isa_bits_for.
10015         (define feature): New keyword.
10016         (define fgroup): New keyword.
10017         * config/arm/t-arm (TM_H): Remove.
10018         (GTM_H): Add arm-isa.h.
10019         (arm-isa.h): Add rule to generate file.
10020         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
10021         case for feature bit names.
10022
10023 2017-09-22  Richard Biener  <rguenther@suse.de>
10024
10025         * graphite-isl-ast-to-gimple.c (graphite_verify): Inline into
10026         single caller.
10027         (graphite_regenerate_ast_isl): Do not reset SCEV.  Move debug
10028         print of no dependency loops ...
10029         * graphite.c (graphite_transform_loops): ... here.
10030         (canonicalize_loop_closed_ssa_form): Work from inner to outer
10031         loops.
10032         (same_close_phi_node, remove_duplicate_close_phi,
10033         make_close_phi_nodes_unique, defined_in_loop_p): Fold into ...
10034         (canonicalize_loop_closed_ssa): ... here and simplify.
10035         * graphite-optimize-isl.c: Include tree-vectorizer.h.
10036         (optimize_isl): Use dump_printf_loc to tell when we stopped
10037         optimizing because of an ISL timeout.
10038
10039 2017-09-22  Richard Biener  <rguenther@suse.de>
10040
10041         PR tree-optimization/82291
10042         * tree-if-conv.c (predicate_mem_writes): Make sure to
10043         remove writes in blocks predicated with false.
10044
10045 2017-09-22  Richard Biener  <rguenther@suse.de>
10046
10047         * sese.c: Include cfganal.h.
10048         (if_region_set_false_region): Remove.
10049         (create_if_region_on_edge): Likewise.
10050         (move_sese_in_condition): Re-implement without destroying
10051         dominators.
10052
10053 2017-09-22  Richard Biener  <rguenther@suse.de>
10054
10055         * graphite-isl-ast-to-gimple.c (translate_pending_phi_nodes):
10056         Verify both BBs contain loop PHI nodes before dispatching to
10057         copy_loop_phi_args.
10058         (graphite_regenerate_ast_isl): Do not recompute dominators,
10059         do not verify three times.  Restructure for clarity.
10060         * graphite-scop-detection.c (same_close_phi_node,
10061         remove_duplicate_close_phi, make_close_phi_nodes_unique,
10062         defined_in_loop_p, canonicalize_loop_closed_ssa,
10063         canonicalize_loop_closed_ssa_form): Simplify, remove excess
10064         checking and SSA rewrite, move to ...
10065         * graphite.c: ... here.  Include ssa.h and tree-ssa-loop-manip.h.
10066         (graphite_initialize): Do not pass in ctx, do not reset the
10067         SCEV cache, compute only dominators.
10068         (graphite_transform_loops): Allocate ISL ctx after
10069         graphite_initialize.  Call canonicalize_loop_closed_ssa_form.
10070         Maintain post-dominators only around build_scops.
10071         * sese.c (if_region_set_false_region): Make static.  Free
10072         and recompute dominators.
10073         (move_sese_in_condition): Assert we don't get called with
10074         post-dominators computed.
10075         * sese.h (if_region_set_false_region): Remove.
10076
10077 2017-09-22  Sergey Shalnov  <sergey.shalnov@intel.com>
10078
10079         * config/i386/sse.md ("mov<mode>_internal"): Use <sseinsnmode>
10080         mode attribute for TARGET_AVX512VL.
10081
10082 2017-09-21  Sergey Shalnov  <sergey.shalnov@intel.com>
10083
10084         * config/i386/i386.opt (mprefer-avx256): New option.
10085         * config/i386/i386.c (ix86_target_string): Add -mprefer-avx256
10086         to flag_opts.
10087         (ix86_preferred_simd_mode): Return 256-bit AVX modes
10088         for TARGET_PREFER_AVX256.
10089         * doc/invoke.texi (x86 Options): Document -mprefer-avx256.
10090
10091 2017-09-21  Jeff Law  <law@redhat.com>
10092
10093         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash):
10094         Fix dump output if the only stack space is for pushed registers.
10095
10096 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
10097
10098         * config/spu/spu.c (spu_sched_adjust_cost): Update after renaming
10099         of insn_cost.
10100
10101 2017-09-21  Martin Sebor  <msebor@redhat.com>
10102
10103         PR c/81882
10104         * doc/extend.texi (attribute ifunc): Avoid relying on ill-formed
10105         code (in C++) or code that triggers warnings.
10106
10107 2017-09-21  Eric Botcazou  <ebotcazou@adacore.com>
10108
10109         * stor-layout.c (bit_from_pos): Do not distribute the conversion.
10110
10111 2017-09-21  Segher Boessenkool  <segher@kernel.crashing.org>
10112
10113         * haifa-sched.c: Rename insn_cost to insn_sched_cost.
10114         * sched-rgn.c: Ditto.
10115         * sel-sched-ir.c: Ditto.
10116
10117 2017-09-21  Alexander Monakov  <amonakov@ispras.ru>
10118
10119         * toplev.h (set_random_seed): Adjust return type.
10120         * toplev.c (init_local_tick): Move eager initialization of random_seed
10121         to get_random_seed.  Adjust comment.
10122         (init_random_seed): Inline to get_random_seed, delete.
10123         (get_random_seed): Initialize random_seed lazily.
10124         (set_random_seed): Do not return previous value.
10125         (print_switch_value): Do not call get_random_seed.
10126
10127 2017-09-21  Evgeny Kudryashov  <kudryashov@ispras.ru>
10128
10129         * cgraph.c (delete_function_version): New, broken out from...
10130         (cgraph_node::delete_function_version): ...here.  Rename to
10131         cgraph_node::delete_function_version_by_decl.  Update all uses.
10132         (cgraph_node::remove): Call delete_function_version.
10133
10134 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
10135
10136         PR sanitizer/81715
10137         * tree-inline.c (expand_call_inline): Emit clobber stmts for
10138         VAR_DECLs to which addressable non-volatile parameters are mapped
10139         and for id->retvar after the return value assignment.  Clear
10140         id->retval and id->retbnd after inlining.
10141
10142 2017-09-21  Richard Biener  <rguenther@suse.de>
10143
10144         PR tree-optimization/82276
10145         PR tree-optimization/82244
10146         * tree-vrp.c (build_assert_expr_for): Set
10147         SSA_NAME_OCCURS_IN_ABNORMAL_PHI if the variable we assert on
10148         has it set.
10149         (remove_range_assertions): Revert earlier change.
10150
10151 2017-09-21  Wilco Dijkstra  <wdijkstr@arm.com>
10152
10153         PR target/71951
10154         * config/aarch64/aarch64.h (LIBGCC2_UNWIND_ATTRIBUTE): Define.
10155
10156 2017-09-21  Richard Biener  <rguenther@suse.de>
10157
10158         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
10159         Restore valid IL after code generation errors.
10160         * graphite.c (graphite_transform_loops): Diagnose code
10161         generation issues as MSG_MISSED_OPTIMIZATION and continue
10162         with processing SCOPs.
10163
10164 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
10165             Alan Hayward  <alan.hayward@arm.com>
10166             David Sherwood  <david.sherwood@arm.com>
10167
10168         * calls.c (compute_argument_addresses): Use simplify_gen_binary
10169         rather than choosing between plus_constant and gen_rtx_<CODE>.
10170         * expr.c (emit_push_insn): Likewise.
10171         (expand_expr_real_2): Likewise.
10172
10173 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
10174             Alan Hayward  <alan.hayward@arm.com>
10175             David Sherwood  <david.sherwood@arm.com>
10176
10177         * loop-unroll.c (split_iv): Call copy_rtx on the step.
10178
10179 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
10180             Alan Hayward  <alan.hayward@arm.com>
10181             David Sherwood  <david.sherwood@arm.com>
10182
10183         * tree.c (find_atomic_core_type): Check tree_fits_uhwi_p before
10184         calling tree_to_uhwi.
10185
10186 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
10187             Alan Hayward  <alan.hayward@arm.com>
10188             David Sherwood  <david.sherwood@arm.com>
10189
10190         * tree-ssa-ccp.c (get_value_for_expr): Use a positive test for
10191         INTEGER_CST rather than a negative test for ADDR_EXPR.
10192
10193 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
10194             Alan Hayward  <alan.hayward@arm.com>
10195             David Sherwood  <david.sherwood@arm.com>
10196
10197         * tree-vrp.c (extract_range_from_binary_expr_1): Check
10198         int_cst_rangeN before calling value_range_constant_singleton (&vrN).
10199
10200 2017-09-21  Richard Biener  <rguenther@suse.de>
10201
10202         PR tree-optimization/71351
10203         * graphite-isl-ast-to-gimple.c (translate_isl_ast_to_gimple::
10204         graphite_create_new_loop_guard): Remove, fold remaining parts
10205         into caller ...
10206         (translate_isl_ast_node_for): ... here and simplify.
10207
10208 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
10209
10210         PR target/82260
10211         * config/i386/i386.md (*movqi_internal): Replace (=q,q) alternative
10212         with (=Q,Q), (=R,R) and (=r,r) alternatives, only enable the
10213         latter two for 64-bit, renumber alternatives, for -Os imov (=q,n)
10214         alternative always use QI mode, for -Os imov (=R,R) alternative
10215         always use SI mode, for imov (=Q,Q) or (=r,r) alternatives
10216         ignore -Os.
10217
10218 2017-09-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10219             Jeff Law  <law@redhat.com>
10220
10221         * config/s390/s390.c (MIN_UNROLL_PROBES): Define.
10222         (allocate_stack_space): New function, partially extracted from
10223         s390_emit_prologue.
10224         (s390_emit_prologue): Track offset to most recent stack probe.
10225         Code to allocate space moved into allocate_stack_space.
10226         Dump actions when no stack is allocated.
10227         (s390_prologue_plus_offset): New function.
10228         (s390_emit_stack_probe): Likewise.
10229
10230 2017-09-20  Alexandre Oliva <aoliva@redhat.com>
10231
10232         * common.opt (Wa, Wl, Wp, g, gz=): Add
10233         RejectNegative.
10234         (gno-column-info): Remove.
10235         (gcolumn-info): Drop RejectNegative.
10236         (gno-): New prefix.
10237         (gno-record-gcc-switches): Remove.
10238         (grecord-gcc-switches): Drop RejectNegative.
10239         (gno-split-dwarf): Remove.
10240         (gsplit-dwarf): Drop RejectNegative.
10241         (gno-strict-dwarf): Remove.
10242         (gstrict-dwarf): Drop RejectNegative.
10243         * config/darwin.opt (gfull, gused): Add RejectNegative.
10244         * dwarf2out.c (gen_producer_string): Drop
10245         gno-record-gcc-switches handler.
10246         * optc-gen.awk: Add g to prefixes with negative forms.
10247         * opts-common.c (remapping_prefix_p): New.
10248         (find_opt): Check it.
10249         (generate_canonical_option): Test g prefix.
10250         (option_map): Add -gno- mapping.
10251         (add_misspelling_candidates): Check remapping_prefix_p.
10252
10253 2017-09-20  Jeff Law  <law@redhat.com>
10254
10255         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Fix
10256         thinko in stack clash protection support.
10257
10258         * explow.c (compute_stack_clash_protection_loop_data): Use
10259         CONST_INT_P instead of explicit test.  Verify object is a
10260         CONST_INT_P before looking at INTVAL.
10261         (anti_adjust_stack_and_probe_stack_clash): Use CONST_INT_P
10262         instead of explicit test.
10263
10264 2017-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
10265
10266         PR target/77687
10267         * config/rs6000/rs6000.md (stack_restore_tie): Store to a scratch
10268         address instead of to r1 and r11.
10269
10270 2017-09-20  Sebastian Peryt  <sebastian.peryt@intel.com>
10271
10272         * config.gcc: Support "knm".
10273         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "knm".
10274         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10275         PROCESSOR_KNM.
10276         * config/i386/i386.c (m_KNM): Define.
10277         (processor_target_table): Add "knm".
10278         (PTA_KNM): Define.
10279         (ix86_option_override_internal): Add "knm".
10280         (ix86_issue_rate): Add PROCESSOR_KNM.
10281         (ix86_adjust_cost): Ditto.
10282         (ia32_multipass_dfa_lookahead): Ditto.
10283         (get_builtin_code_for_version): Handle PROCESSOR_KNM.
10284         (fold_builtin_cpu): Add M_INTEL_KNM.
10285         * config/i386/i386.h (processor_costs): Define TARGET_KNM.
10286         (processor_type): Add PROCESSOR_KNM.
10287         * config/i386/x86-tune.def: Add m_KNM.
10288         * doc/invoke.texi: Add knm as x86 -march=/-mtune= CPU type.
10289
10290 2017-09-20  Richard Biener  <rguenther@suse.de>
10291
10292         PR tree-optimization/80213
10293         * graphite-scop-detection.c (trivially_empty_bb_p): Labels
10294         are allowed in empty BBs as well.
10295         (canonicalize_loop_closed_ssa): Also look for other complex
10296         edges.
10297         (scop_detection::get_sese): Include the loop-closed PHI block
10298         in loop SESEs.
10299         (scop_detection::merge_sese): Remove code adding extra blocks.
10300         (scop_detection::region_has_one_loop): Adjust for get_sese changes.
10301         (build_scops): Assert the final returned scop is invalid.
10302
10303 2017-09-20  Richard Biener  <rguenther@suse.de>
10304
10305         PR tree-optimization/82264
10306         * tree-ssa-sccvn.c (vn_phi_eq): Use safe_dyn_cast to check
10307         for GIMPLE_CONDs.
10308         (vn_phi_lookup): Likewise.
10309         (vn_phi_insert): Likewise.
10310
10311 2017-09-20  Jakub Jelinek  <jakub@redhat.com>
10312
10313         * dwarf2out.c (tree_add_const_value_attribute): For INTEGER_CST
10314         that fits into uhwi or shwi, add DW_AT_const_value regardless
10315         of early_dwarf without going through RTL, using add_AT_unsigned
10316         or add_AT_int.
10317
10318         * dwarf2out.c (DEBUG_LTO_DWO_INFO_SECTION): Reorder defines.
10319         (DEBUG_LTO_ABBREV_SECTION): Likewise.
10320         (DEBUG_LTO_MACINFO_SECTION): Likewise.
10321         (DEBUG_MACRO_SECTION): Likewise.
10322         (DEBUG_LTO_MACRO_SECTION): Likewise.
10323         (DEBUG_STR_DWO_SECTION): Likewise.
10324         (DEBUG_LTO_STR_DWO_SECTION): Likewise.
10325         (DEBUG_LTO_LINE_SECTION): Drop .dwo suffix from the name.
10326         (DEBUG_LTO_DWO_LINE_SECTION): Define.
10327         (DEBUG_LTO_LINE_STR_SECTION): Define.
10328         (init_sections_and_labels): Initialize debug_line_str_section
10329         variable.  Initialize debug_loc_section for -gdwarf-5 to
10330         DEBUG_LOCLISTS_SECTION.  Formatting fixes.
10331
10332 2017-09-20  Richard Biener  <rguenther@suse.de>
10333
10334         * graphite-sese-to-poly.c (extract_affine): Properly handle
10335         POINTER_PLUS_EXPR, BIT_NOT_EXPR and conversion to signed.
10336
10337 2017-09-20  Richard Biener  <rguenther@suse.de>
10338
10339         PR tree-optimization/81373
10340         * graphite-scop-detection.c (build_cross_bb_scalars_def):
10341         Force SESE live-out defs to be handled even if they are
10342         scev_analyzable_p.
10343
10344 2017-09-19  Jeff Law  <law@redhat.com>
10345
10346         * combine-stack-adj.c (combine_stack_adjustments_for_block): Do
10347         nothing for stack adjustments with REG_STACK_CHECK.
10348         * sched-deps.c (parse_add_or_inc): Reject insns with
10349         REG_STACK_CHECK from dependency breaking.
10350         * config/i386/i386.c (pro_epilogue_adjust_stack): Return insn.
10351         (ix86_adjust_satck_and_probe_stack_clash): Add REG_STACK_NOTEs.
10352         * reg-notes.def (STACK_CHECK): New note.
10353
10354         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): New.
10355         (ix86_expand_prologue): Dump stack clash info as needed.
10356         Call ix86_adjust_stack_and_probe_stack_clash as needed.
10357
10358         * function.c (dump_stack_clash_frame_info): New function.
10359         * function.h (dump_stack_clash_frame_info): Prototype.
10360         (enum stack_clash_probes): New enum.
10361
10362         * config/alpha/alpha.c (alpha_expand_prologue): Also check
10363         flag_stack_clash_protection.
10364         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Likewise.
10365         (arm_expand_prologue, thumb1_expand_prologue): Likewise.
10366         (arm_frame_pointer_required): Likewise.
10367         * config/ia64/ia64.c (ia64_compute_frame_size): Likewise.
10368         (ia64_expand_prologue): Likewise.
10369         * config/mips/mips.c (mips_expand_prologue): Likewise.
10370         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Likewise.
10371         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
10372         (sparc_flat_expand_prologue): Likewise.
10373         * config/spu/spu.c (spu_expand_prologue): Likewise.
10374
10375         * explow.c: Include "params.h".
10376         (anti_adjust_stack_and_probe_stack_clash): New function.
10377         (get_stack_check_protect): Likewise.
10378         (compute_stack_clash_protection_loop_data): Likewise.
10379         (emit_stack_clash_protection_loop_start): Likewise.
10380         (emit_stack_clash_protection_loop_end): Likewise.
10381         (allocate_dynamic_stack_space): Use get_stack_check_protect.
10382         Use anti_adjust_stack_and_probe_stack_clash.
10383         * explow.h (compute_stack_clash_protection_loop_data): Prototype.
10384         (emit_stack_clash_protection_loop_start): Likewise.
10385         (emit_stack_clash_protection_loop_end): Likewise.
10386         * rtl.h (get_stack_check_protect): Prototype.
10387         * target.def (stack_clash_protection_final_dynamic_probe): New hook.
10388         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): New.
10389         * targhooks.h (default_stack_clash_protection_final_dynamic_probe):
10390         Prototype.
10391         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE):
10392         Add @hook.
10393         * doc/tm.texi: Rebuilt.
10394         * config/aarch64/aarch64.c (aarch64_expand_prologue): Use
10395         get_stack_check_protect.
10396         * config/alpha/alpha.c (alpha_expand_prologue): Likewise.
10397         * config/arm/arm.c (arm_expand_prologue): Likewise.
10398         (arm_frame_pointer_required): Likewise.
10399         * config/i386/i386.c (ix86_expand_prologue): Likewise.
10400         * config/ia64/ia64.c (ia64_expand_prologue): Likewise.
10401         * config/mips/mips.c (mips_expand_prologue): Likewise.
10402         * config/powerpcspe/powerpcspe.c (rs6000_emit_prologue): Likewise.
10403         * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
10404         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
10405         (sparc_flat_expand_prologue): Likewise.
10406
10407         * common.opt (-fstack-clash-protection): New option.
10408         * flag-types.h (enum stack_check_type): Note difference between
10409         -fstack-check= and -fstack-clash-protection.
10410         * params.def (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE): New PARAM.
10411         (PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Likewise.
10412         * toplev.c (process_options): Issue warnings/errors for cases
10413         not handled with -fstack-clash-protection.
10414         * doc/invoke.texi (-fstack-clash-protection): Document new option.
10415         (-fstack-check): Note additional problem with -fstack-check=generic.
10416         Note that -fstack-check is primarily for Ada and refer users
10417         to -fstack-clash-protection for stack-clash-protection.
10418         Document new params for stack clash protection.
10419
10420 2017-09-19  Uros Bizjak  <ubizjak@gmail.com>
10421
10422         * config/i386/i386.c (ix86_split_long_move): Do not handle
10423         address used for LEA in a special way.
10424
10425 2017-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
10426
10427         * simplify-rtx.c (simplify_binary_operation_1): Fix typo in comment.
10428
10429 2017-09-19  Martin Sebor  <msebor@redhat.com>
10430
10431         PR c/81854
10432         * cgraphunit.c (handle_alias_pairs): Reject aliases between functions
10433         of incompatible types.
10434
10435 2017-09-19  Will Schmidt  <will_schmidt@vnet.ibm.com>
10436
10437         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
10438         for early folding of vector loads (ALTIVEC_BUILTIN_LVX_*).
10439         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10440         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_LD.
10441
10442 2017-09-19  Richard Biener  <rguenther@suse.de>
10443
10444         PR tree-optimization/82244
10445         * tree-vrp.c (remove_range_assertions): Do not propagate
10446         a constant to abnormals but replace the assert with a copy.
10447
10448 2017-09-19  Alexander Monakov  <amonakov@ispras.ru>
10449
10450         PR rtl-optimization/57878
10451         PR rtl-optimization/68988
10452         * lra-assigns.c (reload_pseudo_compare_func): Remove fragmentation
10453         avoidance test involving non_reload_pseudos.  Move frequency test
10454         below the general fragmentation avoidance test.
10455
10456 2017-09-19  Richard Biener  <rguenther@suse.de>
10457
10458         PR tree-optimization/69728
10459         * graphite-sese-to-poly.c (schedule_error): New global.
10460         (add_loop_schedule): Handle empty domain by failing the
10461         schedule.
10462         (build_original_schedule): Handle schedule_error.
10463
10464 2017-09-19  Richard Biener  <rguenther@suse.de>
10465
10466         * graphite-scop-detection.c (scop_detection::can_represent_loop):
10467         Do not iterate to sibling loops but only to siblings of inner
10468         loops.
10469
10470 2017-09-18  Andreas Schwab  <schwab@linux-m68k.org>
10471
10472         PR target/81613
10473         * config/m68k/m68k.md (moveq feeding equality comparison): Check
10474         that the registers are different.
10475
10476 2017-09-18  Uros Bizjak  <ubizjak@gmail.com>
10477
10478         * config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H
10479         to processor_model and "amdfam17h" to arch_names_table.
10480         * doc/extend.texi (__builtin_cpu_is): Document amdfam17h CPU name.
10481
10482 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
10483
10484         PR c/82234
10485         * doc/extend.texi: Add @findex entry for __builtin_shuffle.
10486
10487 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
10488             Alan Hayward  <alan.hayward@arm.com>
10489             David Sherwood  <david.sherwood@arm.com>
10490
10491         * tree-vectorizer.h (vect_slp_analyze_operations): Replace parameters
10492         with a vec_info *.
10493         * tree-vect-loop.c (vect_analyze_loop_operations): Update call
10494         accordingly.
10495         * tree-vect-slp.c (vect_slp_analyze_node_operations): Add vec_info *
10496         parameter.  Set SLP_TREE_NUMBER_OF_VEC_STMTS here rather than in
10497         vect_schedule_slp_instance.
10498         (vect_slp_analyze_operations): Replace parameters with a vec_info *.
10499         Update call to vect_slp_analyze_node_operations.  Simplify return
10500         value.
10501         (vect_slp_analyze_bb_1): Update call accordingly.
10502         (vect_schedule_slp_instance): Remove vectorization_factor parameter.
10503         Don't calculate SLP_TREE_NUMBER_OF_VEC_STMTS here.
10504         (vect_schedule_slp): Update call accordingly.
10505
10506 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
10507             Alan Hayward  <alan.hayward@arm.com>
10508             David Sherwood  <david.sherwood@arm.com>
10509
10510         * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Cope
10511         with types that aren't in fact scalar.
10512
10513 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
10514
10515         * tree-vect-slp.c (vect_record_max_nunits): New function,
10516         split out from...
10517         (vect_build_slp_tree_1): ...here.
10518         (vect_build_slp_tree_2): Call it for phis too.
10519
10520 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
10521
10522         * tree-vect-stmts.c (vectorizable_mask_load_store): Pass mask_vectype
10523         to vect_get_vec_def_for_operand when getting the mask operand.
10524
10525 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
10526             Alan Hayward  <alan.hayward@arm.com>
10527             David Sherwood  <david.sherwood@arm.com>
10528
10529         * tree-vect-loop.c (vectorizable_live_operation): Fix type of
10530         bitstart.
10531
10532 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
10533             Alan Hayward  <alan.hayward@arm.com>
10534             David Sherwood  <david.sherwood@arm.com>
10535
10536         * tree-vect-loop.c (vectorizable_live_operation): Fix element size
10537         calculation for vector booleans.
10538
10539 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
10540             Alan Hayward  <alan.hayward@arm.com>
10541             David Sherwood  <david.sherwood@arm.com>
10542
10543         * tree-vect-stmts.c (can_vectorize_live_stmts): New function,
10544         split out from...
10545         (vect_transform_stmt): ...here.
10546         (vect_analyze_stmt): Use it instead of calling
10547         vectorizable_live_operation directly.
10548
10549 2017-09-18  Cesar Philippidis  <cesar@codesourcery.com>
10550
10551         * omp-offload.c (oacc_xform_loop): Enable SIMD vectorization on
10552         non-SIMT targets in acc vector loops.
10553
10554 2017-09-18  Claudiu Zissulescu  <claziss@synopsys.com>
10555
10556         * configure.ac: Add arc and check if assembler supports gdwarf2.
10557         * configure: Regenerate.
10558
10559 2017-09-18  Richard Biener  <rguenther@suse.de>
10560
10561         PR tree-optimization/82220
10562         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Exclude
10563         epilogue niters from the min_profitable_iters compute.
10564
10565 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
10566
10567         PR target/82145
10568         * config/i386/i386.c (ix86_init_large_pic_reg): Revert 2017-09-01
10569         changes.  Turn CODE_LABEL into NOTE_INSN_DELETED_LABEL immediately.
10570         (ix86_init_pic_reg): Revert 2017-09-01 changes.
10571
10572 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
10573
10574         PR target/81361
10575         * dwarf2cfi.c (add_cfis_to_fde): Do not generate DW_CFA_set_loc after
10576         switching to a new text section.
10577
10578 2017-09-18  Richard Biener  <rguenther@suse.de>
10579
10580         * graphite-scop-detection.c (scop_detection::stmt_has_simple_data_ref):
10581         Simplify.
10582         (build_alias_set): Reject aliases with no access function.
10583
10584 2017-09-18  Richard Biener  <rguenther@suse.de>
10585
10586         PR tree-optimization/79622
10587         * graphite-scop-detection.c (build_cross_bb_scalars_def): Properly
10588         handle PHIs.
10589         (build_cross_bb_scalars_use): Likewise.
10590
10591 2017-09-18  Pierre-Marie de Rodat  <derodat@adacore.com>
10592
10593         * cgraph.h (cgraph_thunk_info): Fix a typo in a comment.
10594
10595 2017-09-18  Alan Modra  <amodra@gmail.com>
10596
10597         PR target/81996
10598         * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use
10599         stack_pointer_rtx for count 0.  Update comments.  Break up
10600         large rtl expression.
10601
10602 2017-09-17  Daniel Santos  <daniel.santos@pobox.com>
10603
10604         * config/i386/i386.c (xlogue_layout::STUB_NAME_MAX_LEN):
10605         Increase to 20 bytes.
10606         (xlogue_layout::s_stub_names): Add an additional size-2 diminsion.
10607         (xlogue_layout::get_stub_name): Modify to select the appropairate sse
10608         or avx version of the stub.
10609
10610 2017-09-17  H.J. Lu  <hongjiu.lu@intel.com>
10611
10612         PR target/82166
10613         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Properly
10614         compute the minimum stack alignment.  Also update preferred stack
10615         boundary for leaf functions.
10616
10617 2017-09-16  Richard Sandiford  <richard.sandiford@linaro.org>
10618
10619         PR tree-optimization/82228
10620         * tree-vect-loop.c (vectorizable_live_operation): Move initialization
10621         of ncopies.
10622
10623 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
10624
10625         * common/config/nds32/nds32-common.c
10626         (nds32_option_optimization_table): Refine formatting.
10627         (nds32_option_optimization_table): Use -fsched-pressure and
10628         -fomit-frame-pointer for specific optimization level.
10629
10630 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
10631
10632         * config/nds32/nds32.c: Refine formatting and comments.
10633         * config/nds32/nds32.h: Likewise.
10634         * config/nds32/nds32.md: Likewise.
10635         * config/nds32/nds32-cost.c: Likewise.
10636         * config/nds32/nds32-isr.c: Likewise.
10637         * config/nds32/nds32-md-auxiliary.c: Likewise.
10638         * config/nds32/nds32-multiple.md: Likewise.
10639         * config/nds32/nds32-predicates.c: Likewise.
10640
10641 2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
10642             Jakub Jelinek  <jakub@redhat.com>
10643
10644         Add support for -std=c++2a.
10645         * doc/cpp.texi (__cplusplus): Document value for -std=c++2a
10646         or -std=gnu+2a.
10647         * doc/invoke.texi: Document -std=c++2a and -std=gnu++2a.
10648
10649 2017-09-15  Steve Ellcey  <sellcey@cavium.com>
10650
10651         PR target/82066
10652         * doc/extend.texi (Common Function Attributes): Add 
10653         references to ARM, AArch64, and S/390 specific attributes.
10654         (Function Specific Option Pragmas): Add AArch64 and S/390
10655         to list of back ends that support the target pragma.
10656
10657 2017-09-15  Nathan Sidwell  <nathan@acm.org>
10658
10659         * doc/standards.texi: Fix C++17 description.  Update URLs for
10660         C++11 & 14.
10661
10662 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10663
10664         * common.opt (Wcast-align=strict): New warning option.
10665         * doc/invoke.texi: Document -Wcast-align=strict. 
10666
10667 2017-09-15  Pierre-Marie de Rodat  <derodat@adacore.com>
10668
10669         * cgraph.h (cgraph_thunk_info): Add comments.
10670         * cgraph.c (cgraph_node::create_thunk): Adjust comment, make
10671         assert for VIRTUAL_* arguments stricter.
10672
10673 2017-09-15  Jackson Woodruff  <jackson.woodruff@arm.com>
10674
10675         PR tree-optimization/71026
10676         * match.pd: Move RDIV patterns from fold-const.c
10677         * fold-const.c (distribute_real_division): Removed.
10678         (fold_binary_loc): Remove calls to distribute_real_divison.
10679
10680 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
10681
10682         * doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
10683         c++1z and gnu++1z as deprecated.  Change other references to
10684         -std=c++1z to -std=c++17 and -std=gnu++1z to -std=gnu++17.
10685         Change -Wc++1z-compat to -Wc++17-compat.
10686         * doc/cpp.texi: Document -std=c++17 defines __cplusplus 201703L.
10687         * dwarf2out.c (highest_c_language): Handle C++17.
10688         (gen_compile_unit_die): Likewise.
10689
10690 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
10691
10692         PR rtl-optimization/82192
10693         * combine.c (make_extraction): Don't look through non-paradoxical
10694         SUBREGs or TRUNCATE if pos + len is or might be bigger than
10695         inner's mode.
10696
10697 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
10698             Alan Hayward  <alan.hayward@arm.com>
10699             David Sherwood  <david.sherwood@arm.com>
10700
10701         * target.def (function_arg_offset): New hook.
10702         * targhooks.h (default_function_arg_offset): Declare.
10703         * targhooks.c (default_function_arg_offset): New function.
10704         * function.c (locate_and_pad_parm): Use
10705         targetm.calls.function_arg_offset instead of FUNCTION_ARG_OFFSET.
10706         * doc/tm.texi.in (FUNCTION_ARG_OFFSET): Replace with...
10707         (TARGET_FUNCTION_ARG_OFFSET): ...this.
10708         * doc/tm.texi: Regenerate.
10709         * config/spu/spu.h (FUNCTION_ARG_OFFSET): Delete.
10710         * config/spu/spu.c (spu_function_arg_offset): New function.
10711         (TARGET_FUNCTION_ARG_OFFSET): Redefine.
10712         * system.h (FUNCTION_ARG_OFFSET): Poison.
10713
10714 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
10715             Alan Hayard  <alan.hayward@arm.com>
10716             David Sherwood  <david.sherwood@arm.com>
10717
10718         * target.def (truly_noop_truncation): New hook.
10719         (mode_rep_extended): Refer to TARGET_TRULY_NOOP_TRUNCATION rather
10720         than TRULY_NOOP_TRUNCATION.
10721         * hooks.h (hook_bool_uint_uint_true): Declare.
10722         * hooks.c (hook_bool_uint_uint_true): New function.
10723         * doc/tm.texi.in (TRULY_NOOP_TRUNCATION): Replace with...
10724         (TARGET_TRULY_NOOP_TRUNCATION): ...this.
10725         * doc/tm.texi: Regenerate.
10726         * combine.c (make_extraction): Refer to TARGET_TRULY_NOOP_TRUNCATION
10727         rather than TRULY_NOOP_TRUNCATION in comments.
10728         (simplify_comparison): Likewise.
10729         (record_truncated_value): Likewise.
10730         * expmed.c (extract_bit_field_1): Likewise.
10731         (extract_split_bit_field): Likewise.
10732         * convert.c (convert_to_integer_1): Use targetm.truly_noop_truncation
10733         instead of TRULY_NOOP_TRUNCATION.
10734         * function.c (assign_parm_setup_block): Likewise.
10735         * machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Likewise.
10736         * rtlhooks.c: Include target.h.
10737         * config/aarch64/aarch64.h (TRULY_NOOP_TRUNCATION): Delete.
10738         * config/alpha/alpha.h (TRULY_NOOP_TRUNCATION): Delete.
10739         * config/arc/arc.h (TRULY_NOOP_TRUNCATION): Delete.
10740         * config/arm/arm.h (TRULY_NOOP_TRUNCATION): Delete.
10741         * config/avr/avr.h (TRULY_NOOP_TRUNCATION): Delete.
10742         * config/bfin/bfin.h (TRULY_NOOP_TRUNCATION): Delete.
10743         * config/c6x/c6x.h (TRULY_NOOP_TRUNCATION): Delete.
10744         * config/cr16/cr16.h (TRULY_NOOP_TRUNCATION): Delete.
10745         * config/cris/cris.h (TRULY_NOOP_TRUNCATION): Delete.
10746         * config/epiphany/epiphany.h (TRULY_NOOP_TRUNCATION): Delete.
10747         * config/fr30/fr30.h (TRULY_NOOP_TRUNCATION): Delete.
10748         * config/frv/frv.h (TRULY_NOOP_TRUNCATION): Delete.
10749         * config/ft32/ft32.h (TRULY_NOOP_TRUNCATION): Delete.
10750         * config/h8300/h8300.h (TRULY_NOOP_TRUNCATION): Delete.
10751         * config/i386/i386.h (TRULY_NOOP_TRUNCATION): Delete.
10752         * config/ia64/ia64.h (TRULY_NOOP_TRUNCATION): Delete.
10753         * config/iq2000/iq2000.h (TRULY_NOOP_TRUNCATION): Delete.
10754         * config/lm32/lm32.h (TRULY_NOOP_TRUNCATION): Delete.
10755         * config/m32c/m32c.h (TRULY_NOOP_TRUNCATION): Delete.
10756         * config/m32r/m32r.h (TRULY_NOOP_TRUNCATION): Delete.
10757         * config/m68k/m68k.h (TRULY_NOOP_TRUNCATION): Delete.
10758         * config/mcore/mcore.h (TRULY_NOOP_TRUNCATION): Delete.
10759         * config/microblaze/microblaze.h (TRULY_NOOP_TRUNCATION): Delete.
10760         * config/mips/mips.h (TRULY_NOOP_TRUNCATION): Delete.
10761         * config/mips/mips.c (mips_truly_noop_truncation): New function.
10762         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
10763         * config/mips/mips.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
10764         rather than TRULY_NOOP_TRUNCATION in comments.
10765         * config/mmix/mmix.h (TRULY_NOOP_TRUNCATION): Delete.
10766         * config/mn10300/mn10300.h (TRULY_NOOP_TRUNCATION): Delete.
10767         * config/moxie/moxie.h (TRULY_NOOP_TRUNCATION): Delete.
10768         * config/msp430/msp430.h (TRULY_NOOP_TRUNCATION): Delete.
10769         * config/nds32/nds32.h (TRULY_NOOP_TRUNCATION): Delete.
10770         * config/nios2/nios2.h (TRULY_NOOP_TRUNCATION): Delete.
10771         * config/nvptx/nvptx.h (TRULY_NOOP_TRUNCATION): Delete.
10772         * config/pa/pa.h (TRULY_NOOP_TRUNCATION): Delete.
10773         * config/pdp11/pdp11.h (TRULY_NOOP_TRUNCATION): Delete.
10774         * config/powerpcspe/powerpcspe.h (TRULY_NOOP_TRUNCATION): Delete.
10775         * config/riscv/riscv.h (TRULY_NOOP_TRUNCATION): Delete.
10776         * config/riscv/riscv.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
10777         rather than TRULY_NOOP_TRUNCATION in comments.
10778         * config/rl78/rl78.h (TRULY_NOOP_TRUNCATION): Delete.
10779         * config/rs6000/rs6000.h (TRULY_NOOP_TRUNCATION): Delete.
10780         * config/rx/rx.h (TRULY_NOOP_TRUNCATION): Delete.
10781         * config/s390/s390.h (TRULY_NOOP_TRUNCATION): Delete.
10782         * config/sh/sh.h (MAYBE_BASE_REGISTER_RTX_P): Remove
10783         TRULY_NOOP_TRUNCATION condition.
10784         (MAYBE_INDEX_REGISTER_RTX_P): Likewise.
10785         (TRULY_NOOP_TRUNCATION): Delete.
10786         * config/sparc/sparc.h (TRULY_NOOP_TRUNCATION): Delete.
10787         * config/spu/spu.h (TRULY_NOOP_TRUNCATION): Delete.
10788         * config/spu/spu.c (spu_truly_noop_truncation): New function.
10789         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
10790         * config/stormy16/stormy16.h (TRULY_NOOP_TRUNCATION): Delete.
10791         * config/tilegx/tilegx.h (TRULY_NOOP_TRUNCATION): Delete.
10792         * config/tilegx/tilegx.c (tilegx_truly_noop_truncation): New fuction.
10793         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
10794         * config/tilegx/tilegx.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
10795         rather than TRULY_NOOP_TRUNCATION in comments.
10796         * config/tilepro/tilepro.h (TRULY_NOOP_TRUNCATION): Delete.
10797         * config/v850/v850.h (TRULY_NOOP_TRUNCATION): Delete.
10798         * config/vax/vax.h (TRULY_NOOP_TRUNCATION): Delete.
10799         * config/visium/visium.h (TRULY_NOOP_TRUNCATION): Delete.
10800         * config/xtensa/xtensa.h (TRULY_NOOP_TRUNCATION): Delete.
10801         * system.h (TRULY_NOOP_TRUNCATION): Poison.
10802
10803 2017-09-15  Christophe Lyon  <christophe.lyon@linaro.org>
10804
10805         PR target/67591
10806         * config/arm/arm.md (*cmp_and): Add enabled_for_depr_it attribute.
10807         (*cmp_ior): Likewise.
10808         (*ior_scc_scc): Add alternative for enabled_for_depr_it attribute.
10809         (*ior_scc_scc_cmp): Likewise.
10810         (*and_scc_scc): Likewise.
10811         (*and_scc_scc_cmp): Likewise.
10812
10813 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
10814             Alan Hayard  <alan.hayward@arm.com>
10815             David Sherwood  <david.sherwood@arm.com>
10816
10817         * target.def (can_change_mode_class): New hook.
10818         (mode_rep_extended): Refer to it instead of CANNOT_CHANGE_MODE_CLASS.
10819         (hard_regno_nregs): Likewise.
10820         * hooks.h (hook_bool_mode_mode_reg_class_t_true): Declare.
10821         * hooks.c (hook_bool_mode_mode_reg_class_t_true): New function.
10822         * doc/tm.texi.in (CANNOT_CHANGE_MODE_CLASS): Replace with...
10823         (TARGET_CAN_CHANGE_MODE_CLASS): ...this.
10824         (LOAD_EXTEND_OP): Update accordingly.
10825         * doc/tm.texi: Regenerate.
10826         * doc/rtl.texi: Refer to TARGET_CAN_CHANGE_MODE_CLASS instead of
10827         CANNOT_CHANGE_MODE_CLASS.
10828         * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Replace with...
10829         (REG_CAN_CHANGE_MODE_P): ...this new macro.
10830         * combine.c (simplify_set): Update accordingly.
10831         * emit-rtl.c (validate_subreg): Likewise.
10832         * recog.c (general_operand): Likewise.
10833         * regcprop.c (mode_change_ok): Likewise.
10834         * reload1.c (choose_reload_regs): Likewise.
10835         (inherit_piecemeal_p): Likewise.
10836         * rtlanal.c (simplify_subreg_regno): Likewise.
10837         * postreload.c (reload_cse_simplify_set): Use REG_CAN_CHANGE_MODE_P
10838         instead of CANNOT_CHANGE_MODE_CLASS.
10839         (reload_cse_simplify_operands): Likewise.
10840         * reload.c (push_reload): Use targetm.can_change_mode_class
10841         instead of CANNOT_CHANGE_MODE_CLASS.
10842         (push_reload): Likewise.  Also use REG_CAN_CHANGE_MODE_P instead of
10843         REG_CANNOT_CHANGE_MODE_P.
10844         * config/alpha/alpha.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10845         * config/alpha/alpha.c (alpha_can_change_mode_class): New function.
10846         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10847         * config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10848         * config/arm/arm.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10849         (arm_can_change_mode_class): New function.
10850         * config/arm/neon.md: Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
10851         than CANNOT_CHANGE_MODE_CLASS in comments.
10852         * config/i386/i386.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10853         * config/i386/i386-protos.h (ix86_cannot_change_mode_class): Delete.
10854         * config/i386/i386.c (ix86_cannot_change_mode_class): Replace with...
10855         (ix86_can_change_mode_class): ...this new function, inverting the
10856         sense of the return value.
10857         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10858         * config/ia64/ia64.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10859         * config/ia64/ia64.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10860         (ia64_can_change_mode_class): New function.
10861         * config/m32c/m32c.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10862         * config/m32c/m32c-protos.h (m32c_cannot_change_mode_class): Delete.
10863         * config/m32c/m32c.c (m32c_cannot_change_mode_class): Replace with...
10864         (m32c_can_change_mode_class): ...this new function, inverting the
10865         sense of the return value.
10866         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10867         * config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10868         * config/mips/mips-protos.h (mips_cannot_change_mode_class): Delete.
10869         * config/mips/mips.c (mips_cannot_change_mode_class): Replace with...
10870         (mips_can_change_mode_class): ...this new function, inverting the
10871         sense of the return value.
10872         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10873         * config/msp430/msp430.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10874         * config/msp430/msp430.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10875         (msp430_can_change_mode_class): New function.
10876         * config/nvptx/nvptx.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10877         * config/nvptx/nvptx.c (nvptx_can_change_mode_class): New function.
10878         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10879         * config/pa/pa32-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10880         * config/pa/pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10881         * config/pa/pa-protos.h (pa_cannot_change_mode_class): Delete.
10882         * config/pa/pa.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10883         (pa_cannot_change_mode_class): Replace with...
10884         (pa_can_change_mode_class): ...this new function, inverting the
10885         sense of the return value.
10886         (pa_modes_tieable_p): Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
10887         than CANNOT_CHANGE_MODE_CLASS in comments.
10888         * config/pdp11/pdp11.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10889         * config/pdp11/pdp11-protos.h (pdp11_cannot_change_mode_class): Delete.
10890         * config/pdp11/pdp11.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10891         (pdp11_cannot_change_mode_class): Replace with...
10892         (pdp11_can_change_mode_class): ...this new function, inverting the
10893         sense of the return value.
10894         * config/powerpcspe/powerpcspe.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10895         * config/powerpcspe/powerpcspe-protos.h
10896         (rs6000_cannot_change_mode_class_ptr): Delete.
10897         * config/powerpcspe/powerpcspe.c
10898         (rs6000_cannot_change_mode_class_ptr): Delete.
10899         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10900         (rs6000_option_override_internal): Assign to
10901         targetm.can_change_mode_class instead of
10902         rs6000_cannot_change_mode_class_ptr.
10903         (rs6000_cannot_change_mode_class): Replace with...
10904         (rs6000_can_change_mode_class): ...this new function, inverting the
10905         sense of the return value.
10906         (rs6000_debug_cannot_change_mode_class): Replace with...
10907         (rs6000_debug_can_change_mode_class): ...this new function.
10908         * config/riscv/riscv.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10909         * config/riscv/riscv.c (riscv_can_change_mode_class): New function.
10910         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10911         * config/rs6000/rs6000.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10912         * config/rs6000/rs6000-protos.h (rs6000_cannot_change_mode_class_ptr):
10913         Delete.
10914         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class_ptr): Delete.
10915         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10916         (rs6000_option_override_internal): Assign to
10917         targetm.can_change_mode_class instead of
10918         rs6000_cannot_change_mode_class_ptr.
10919         (rs6000_cannot_change_mode_class): Replace with...
10920         (rs6000_can_change_mode_class): ...this new function, inverting the
10921         sense of the return value.
10922         (rs6000_debug_cannot_change_mode_class): Replace with...
10923         (rs6000_debug_can_change_mode_class): ...this new function.
10924         * config/s390/s390.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10925         * config/s390/s390-protos.h (s390_cannot_change_mode_class): Delete.
10926         * config/s390/s390.c (s390_cannot_change_mode_class): Replace with...
10927         (s390_can_change_mode_class): ...this new function, inverting the
10928         sense of the return value.
10929         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10930         * config/sh/sh.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10931         * config/sh/sh-protos.h (sh_cannot_change_mode_class): Delete.
10932         * config/sh/sh.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10933         (sh_cannot_change_mode_class): Replace with...
10934         (sh_can_change_mode_class): ...this new function, inverting the
10935         sense of the return value.
10936         * config/sparc/sparc.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10937         * config/sparc/sparc.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10938         (sparc_can_change_mode_class): New function.
10939         * config/spu/spu.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10940         * config/spu/spu.c (spu_can_change_mode_class): New function.
10941         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10942         * config/visium/visium.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10943         * config/visium/visium.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10944         (visium_can_change_mode_class): New function.
10945         * system.h (CANNOT_CHANGE_MODE_CLASS): Poison.
10946
10947 2017-09-15  Richard Biener  <rguenther@suse.de>
10948
10949         PR tree-optimization/82217
10950         * tree-ssa-sccvn.c (visit_phi): Properly handle all VN_TOP
10951         but not undefined case.
10952
10953 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
10954
10955         PR target/82145
10956         * postreload.c (reload_cse_simplify_operands): Skip
10957         NOTE_INSN_DELETED_LABEL similarly to skipping CODE_LABEL.
10958
10959 2017-09-15  Richard Biener  <rguenther@suse.de>
10960
10961         PR tree-optimization/68823
10962         * graphite-scop-detection.c (build_alias_set): If we have a
10963         possible dependence check whether we can handle them by just
10964         looking at the DRs DR_ACCESS_FNs.
10965         (build_scops): If build_alias_set fails, fail the SCOP.
10966
10967 2017-09-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
10968
10969         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1_HW): New macros
10970         to support float128 built-in functions that require the ISA 3.0
10971         hardware.
10972         (BU_FLOAT128_3_HW): Likewise.
10973         (SQRTF128): Add support for the IEEE 128-bit square root and fma
10974         built-in functions.
10975         (FMAF128): Likewise.
10976         (FMAQ): Likewise.
10977         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
10978         support for built-in functions that need the ISA 3.0 IEEE 128-bit
10979         floating point instructions.
10980         (rs6000_invalid_builtin): Likewise.
10981         (rs6000_builtin_mask_names): Likewise.
10982         * config/rs6000/rs6000.h (MASK_FLOAT128_HW): Likewise.
10983         (RS6000_BTM_FLOAT128_HW): Likewise.
10984         (RS6000_BTM_COMMON): Likewise.
10985         * config/rs6000/rs6000.md (fma<mode>4_hw): Add a generator
10986         function.
10987         * doc/extend.texi (RS/6000 built-in functions): Document the
10988         IEEE 128-bit floating point square root and fused multiply-add
10989         built-in functions.
10990
10991 2017-09-14  Pat Haugen  <pthaugen@us.ibm.com>
10992
10993         * config/rs6000/rs6000.c (rs6000_set_up_by_prologue): Make sure the TOC
10994         reg (r2) isn't in the set of registers defined in the prologue.
10995
10996 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
10997             Alan Hayward  <alan.hayward@arm.com>
10998             David Sherwood  <david.sherwood@arm.com>
10999
11000         * tree-vectorizer.h (_loop_vec_info): Add max_vectorization_factor.
11001         (LOOP_VINFO_MAX_VECT_FACTOR): New macro.
11002         (LOOP_VINFO_ORIG_VECT_FACTOR): Replace with...
11003         (LOOP_VINFO_ORIG_MAX_VECT_FACTOR): ...this new macro.
11004         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Update
11005         accordingly.
11006         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11007         max_vectorization_factor.
11008         (vect_analyze_loop_2): Set LOOP_VINFO_MAX_VECT_FACTOR.
11009
11010 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
11011             Alan Hayward  <alan.hayward@arm.com>
11012             David Sherwood  <david.sherwood@arm.com>
11013
11014         * tree-vectorizer.h (vect_min_worthwhile_factor): Delete.
11015         (vect_worthwhile_without_simd_p): Declare.
11016         * tree-vect-loop.c (vect_worthwhile_without_simd_p): New function.
11017         (vectorizable_reduction): Use it.
11018         * tree-vect-stmts.c (vectorizable_shift): Likewise.
11019         (vectorizable_operation): Likewise.
11020
11021 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
11022             Alan Hayward  <alan.hayward@arm.com>
11023             David Sherwood  <david.sherwood@arm.com>
11024
11025         * tree-vectorizer.h (vect_get_num_copies): New function.
11026         * tree-vect-data-refs.c (vect_get_data_access_cost): Use it.
11027         * tree-vect-loop.c (vectorizable_reduction): Likewise.
11028         (vectorizable_induction): Likewise.
11029         (vectorizable_live_operation): Likewise.
11030         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
11031         (vectorizable_bswap): Likewise.
11032         (vectorizable_call): Likewise.
11033         (vectorizable_conversion): Likewise.
11034         (vectorizable_assignment): Likewise.
11035         (vectorizable_shift): Likewise.
11036         (vectorizable_operation): Likewise.
11037         (vectorizable_store): Likewise.
11038         (vectorizable_load): Likewise.
11039         (vectorizable_condition): Likewise.
11040         (vectorizable_comparison): Likewise.
11041         (vect_analyze_stmt): Pass the slp node to vectorizable_live_operation.
11042
11043 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
11044             Alan Hayward  <alan.hayward@arm.com>
11045             David Sherwood  <david.sherwood@arm.com>
11046
11047         * tree-vect-loop.c (vectorizable_induction): Use gimple_build instead
11048         of vect_init_vector.
11049
11050 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
11051             Alan Hayward  <alan.hayward@arm.com>
11052             David Sherwood  <david.sherwood@arm.com>
11053
11054         * gimple-fold.h (gimple_build_vector_from_val): Declare, and provide
11055         an inline wrapper that provides a location.
11056         (gimple_build_vector): Likewise.
11057         * gimple-fold.c (gimple_build_vector_from_val): New function.
11058         (gimple_build_vector): Likewise.
11059         * tree-vect-loop.c (get_initial_def_for_reduction): Use the new
11060         functions to build the initial value.  Always return a gimple value.
11061         (get_initial_defs_for_reduction): Likewise.  Only compute
11062         neutral_vec once.
11063         (vect_create_epilog_for_reduction): Don't call force_gimple_operand or
11064         vect_init_vector on the results from get_initial_def(s)_for_reduction.
11065         (vectorizable_induction): Use gimple_build_vector rather than
11066         vect_init_vector.
11067
11068 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
11069             Alan Hayward  <alan.hayward@arm.com>
11070             David Sherwood  <david.sherwood@arm.com>
11071
11072         * target.h (vec_perm_indices): New typedef.
11073         (auto_vec_perm_indices): Likewise.
11074         * optabs-query.h: Include target.h
11075         (can_vec_perm_p): Take a vec_perm_indices *.
11076         * optabs-query.c (can_vec_perm_p): Likewise.
11077         (can_mult_highpart_p): Update accordingly.  Use auto_vec_perm_indices.
11078         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
11079         * tree-vect-generic.c (lower_vec_perm): Likewise.
11080         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
11081         (vect_grouped_load_supported): Likewise.
11082         (vect_shift_permute_load_chain): Likewise.
11083         (vect_permute_store_chain): Use auto_vec_perm_indices.
11084         (vect_permute_load_chain): Likewise.
11085         * fold-const.c (fold_vec_perm): Take vec_perm_indices.
11086         (fold_ternary_loc): Update accordingly.  Use auto_vec_perm_indices.
11087         Update uses of can_vec_perm_p.
11088         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Replace the
11089         mode with a number of elements.  Take a vec_perm_indices *.
11090         (vect_create_epilog_for_reduction): Update accordingly.
11091         Use auto_vec_perm_indices.
11092         (have_whole_vector_shift): Likewise.  Update call to can_vec_perm_p.
11093         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
11094         (vect_transform_slp_perm_load): Likewise.
11095         (vect_schedule_slp_instance): Use auto_vec_perm_indices.
11096         * tree-vectorizer.h (vect_gen_perm_mask_any): Take a vec_perm_indices.
11097         (vect_gen_perm_mask_checked): Likewise.
11098         * tree-vect-stmts.c (vect_gen_perm_mask_any): Take a vec_perm_indices.
11099         (vect_gen_perm_mask_checked): Likewise.
11100         (vectorizable_mask_load_store): Use auto_vec_perm_indices.
11101         (vectorizable_store): Likewise.
11102         (vectorizable_load): Likewise.
11103         (perm_mask_for_reverse): Likewise.  Update call to can_vec_perm_p.
11104         (vectorizable_bswap): Likewise.
11105
11106 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
11107             Alan Hayward  <alan.hayward@arm.com>
11108             David Sherwood  <david.sherwood@arm.com>
11109
11110         * tree.h (build_vector): Take a vec<tree> instead of a tree *.
11111         * tree.c (build_vector): Likewise.
11112         (build_vector_from_ctor): Update accordingly.
11113         (build_vector_from_val): Likewise.
11114         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
11115         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
11116         * tree-vect-generic.c (add_rshift): Likewise.
11117         (expand_vector_divmod): Likewise.
11118         (optimize_vector_constructor): Likewise.
11119         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
11120         (vect_transform_slp_perm_load): Likewise.
11121         (vect_schedule_slp_instance): Likewise.
11122         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
11123         (vectorizable_call): Likewise.
11124         (vect_gen_perm_mask_any): Likewise.  Add elements in order.
11125         * expmed.c (make_tree): Likewise.
11126         * fold-const.c (fold_negate_expr_1): Use auto_vec<tree> when building
11127         a vector passed to build_vector.
11128         (fold_convert_const): Likewise.
11129         (exact_inverse): Likewise.
11130         (fold_ternary_loc): Likewise.
11131         (fold_relational_const): Likewise.
11132         (const_binop): Likewise.  Use VECTOR_CST_ELT directly when operating
11133         on VECTOR_CSTs, rather than going through vec_cst_ctor_to_array.
11134         (const_unop): Likewise.  Store the reduction accumulator in a
11135         variable rather than an array.
11136         (vec_cst_ctor_to_array): Take the number of elements as a parameter.
11137         (fold_vec_perm): Update calls accordingly.  Use auto_vec<tree> for
11138         the new vector, rather than constructing it after the input arrays.
11139         (native_interpret_vector): Use auto_vec<tree> when building
11140         a vector passed to build_vector.  Add elements in order.
11141         * tree-vect-loop.c (get_initial_defs_for_reduction): Use
11142         auto_vec<tree> when building a vector passed to build_vector.
11143         (vect_create_epilog_for_reduction): Likewise.
11144         (vectorizable_induction): Likewise.
11145         (get_initial_def_for_reduction): Likewise.  Fix indentation of
11146         case statements.
11147         * config/sparc/sparc.c (sparc_handle_vis_mul8x16): Change n_elts
11148         to a vec<tree> *.
11149         (sparc_fold_builtin): Use auto_vec<tree> when building a vector
11150         passed to build_vector.
11151
11152 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
11153             Alan Hayward  <alan.hayward@arm.com>
11154             David Sherwood  <david.sherwood@arm.com>
11155
11156         * tree-core.h (tree_base::u): Add an "nelts" field.
11157         (tree_vector): Use VECTOR_CST_NELTS as the length.
11158         * tree.c (tree_size): Likewise.
11159         (make_vector): Initialize VECTOR_CST_NELTS.
11160         * tree.h (VECTOR_CST_NELTS): Use the u.nelts field.
11161         * cfgexpand.c (expand_debug_expr): Use VECTOR_CST_NELTS instead of
11162         TYPE_VECTOR_SUBPARTS.
11163         * expr.c (const_vector_mask_from_tree): Consistently use "units"
11164         as the number of units, setting it from VECTOR_CST_NELTS.
11165         (const_vector_from_tree): Likewise.
11166         * fold-const.c (negate_expr_p): Use VECTOR_CST_NELTS instead of
11167         TYPE_VECTOR_SUBPARTS for the number of elements in a VECTOR_CST.
11168         (fold_negate_expr_1): Likewise.
11169         (fold_convert_const): Likewise.
11170         (const_binop): Likewise.  Differentiate the number of output and
11171         input elements.
11172         (const_unop): Likewise.
11173         (fold_ternary_loc): Use VECTOR_CST_NELTS for the number of elements
11174         in a VECTOR_CST, asserting that it is the same as TYPE_VECTOR_SUBPARTS
11175         in cases that did the opposite.
11176
11177 2017-09-14  Richard Biener  <rguenther@suse.de>
11178
11179         * tree-ssa-sccvn.c (visit_phi): Merge undefined values similar
11180         to VN_TOP.
11181
11182 2017-09-14  Eric Botcazou  <ebotcazou@adacore.com>
11183
11184         * dwarf2out.c (dwarf2out_source_line): Remove superfluous test.
11185
11186 2017-09-14  Jakub Jelinek  <jakub@redhat.com>
11187
11188         PR target/81325
11189         * cfgbuild.c (find_bb_boundaries): Ignore debug insns in decisions
11190         if and where to split a bb, except for splitting before debug insn
11191         sequences followed by non-label real insn.  Delete debug insns
11192         in between basic blocks.
11193
11194         * combine.c (make_compound_operation_int): Formatting fixes.
11195
11196         * config/alpha/elf.h (LINK_EH_SPEC): Add -static-pie support.
11197         * config/alpha/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
11198         * config/netbsd.h (LINK_EH_SPEC): Likewise.
11199         * config/sol2.h (LINK_EH_SPEC): Likewise.
11200         * config/arm/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
11201         * config/s390/linux.h (LINK_SPEC): Likewise.
11202         * config/freebsd.h (LINK_EH_SPEC): Likewise.
11203         * config/openbsd.h (LINK_EH_SPEC): Likewise.
11204         * config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
11205         * config/aarch64/aarch64-linux.h (LINUX_TARGET_LINK_SPEC): Likewise.
11206         * config/powerpcspe/sysv4.h (LINK_EH_SPEC): Likewise.
11207         * config/bfin/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
11208         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Fix a typo.
11209         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Formatting fix.
11210
11211 2017-09-13  Jakub Jelinek  <jakub@redhat.com>
11212
11213         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Add -static-pie
11214         support.
11215         (ENDFILE_LINUX_SPEC): Likewise.
11216         (LINK_EH_SPEC): Likewise.
11217         * config/rs6000/linux64.h (LINK_SHLIB_SPEC): Likewise.
11218         (LINK_OS_LINUX_SPEC32): Likewise.
11219         (LINK_OS_LINUX_SPEC64): Likewise.
11220         * config/rs6000/linux.h (LINK_SHLIB_SPEC): Likewise.
11221         (LINK_OS_LINUX_SPEC): Likewise.
11222
11223 2017-09-13  Martin Liska  <mliska@suse.cz>
11224
11225         PR middle-end/82154
11226         * stmt.c (expand_sjlj_dispatch_table): Use CASE_LOW when
11227         CASE_HIGH is NULL_TREE.
11228
11229 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
11230             Alan Hayward  <alan.hayward@arm.com>
11231             David Sherwood  <david.sherwood@arm.com>
11232
11233         * target.def (secondary_memory_needed): New hook.
11234         (secondary_reload): Refer to TARGET_SECONDARY_MEMORY_NEEDED
11235         instead of SECONDARY_MEMORY_NEEDED.
11236         (secondary_memory_needed_mode): Likewise.
11237         * hooks.h (hook_bool_mode_reg_class_t_reg_class_t_false): Declare.
11238         * hooks.c (hook_bool_mode_reg_class_t_reg_class_t_false): New function.
11239         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED): Replace with...
11240         (TARGET_SECONDARY_MEMORY_NEEDED): ...this.
11241         (SECONDARY_MEMORY_NEEDED_RTX): Update reference accordingly.
11242         * doc/tm.texi: Regenerate.
11243         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED): Delete.
11244         * config/alpha/alpha.c (alpha_secondary_memory_needed): New function.
11245         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
11246         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED): Delete.
11247         * config/i386/i386-protos.h (ix86_secondary_memory_needed): Delete.
11248         * config/i386/i386.c (inline_secondary_memory_needed): Put the
11249         mode argument first and change the reg_class arguments to reg_class_t.
11250         (ix86_secondary_memory_needed): Likewise.  Remove the strict parameter.
11251         Make static.  Update the call to inline_secondary_memory_needed.
11252         (ix86_register_move_cost): Update the call to
11253         inline_secondary_memory_needed.
11254         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
11255         * config/ia64/ia64.h (SECONDARY_MEMORY_NEEDED): Delete commented-out
11256         definition.
11257         * config/ia64/ia64.c (spill_xfmode_rfmode_operand): Refer to
11258         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
11259         in comment.
11260         * config/mips/mips.h (SECONDARY_MEMORY_NEEDED): Delete.
11261         * config/mips/mips-protos.h (mips_secondary_memory_needed): Delete.
11262         * config/mips/mips.c (mips_secondary_memory_needed): Make static
11263         and match hook interface.  Add comment from mips.h.
11264         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
11265         * config/mmix/mmix.md (truncdfsf2): Refer to
11266         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
11267         in comment.
11268         * config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED): Rename to...
11269         (PA_SECONDARY_MEMORY_NEEDED): ...this, and put the mode argument first.
11270         * config/pa/pa.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
11271         (pa_secondary_memory_needed): New function.
11272         * config/pdp11/pdp11.h (SECONDARY_MEMORY_NEEDED): Delete.
11273         * config/pdp11/pdp11-protos.h (pdp11_secondary_memory_needed): Delete.
11274         * config/pdp11/pdp11.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
11275         (pdp11_secondary_memory_needed): Make static and match hook interface.
11276         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED): Delete.
11277         * config/powerpcspe/powerpcspe-protos.h
11278         (rs6000_secondary_memory_needed_ptr): Delete.
11279         * config/powerpcspe/powerpcspe.c (rs6000_secondary_memory_needed_ptr):
11280         Delete.
11281         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
11282         (rs6000_option_override_internal): Assign to
11283         targetm.secondary_memory_needed rather than
11284         rs6000_secondary_memory_needed_ptr.
11285         (rs6000_secondary_memory_needed): Match hook interface.
11286         (rs6000_debug_secondary_memory_needed): Likewise.
11287         * config/riscv/riscv.h (SECONDARY_MEMORY_NEEDED): Delete.
11288         * config/riscv/riscv.c (riscv_secondary_memory_needed): New function.
11289         (riscv_register_move_cost): Use it instead of SECONDARY_MEMORY_NEEDED.
11290         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
11291         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED): Delete.
11292         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_ptr):
11293         Delete.
11294         * config/rs6000/rs6000.c (rs6000_secondary_memory_needed_ptr): Delete.
11295         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
11296         (rs6000_option_override_internal): Assign to
11297         targetm.secondary_memory_needed rather than
11298         rs6000_secondary_memory_needed_ptr.
11299         (rs6000_secondary_memory_needed): Match hook interface.
11300         (rs6000_debug_secondary_memory_needed): Likewise.
11301         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED): Delete.
11302         * config/s390/s390.c (s390_secondary_memory_needed): New function.
11303         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
11304         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Delete.
11305         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
11306         (sparc_secondary_memory_needed): New function.
11307         * lra-constraints.c (check_and_process_move): Refer to
11308         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
11309         in comment.
11310         (curr_insn_transform): Likewise.
11311         (process_alt_operands): Use targetm.secondary_memory_needed
11312         instead of TARGET_SECONDARY_MEMORY_NEEDED.
11313         (check_secondary_memory_needed_p): Likewise.
11314         (choose_split_class): Likewise.
11315         * reload.c: Unconditionally include code that was previously
11316         conditional on SECONDARY_MEMORY_NEEDED.
11317         (push_secondary_reload): Use targetm.secondary_memory_needed
11318         instead of TARGET_SECONDARY_MEMORY_NEEDED.
11319         (push_reload): Likewise.
11320         * reload1.c: Unconditionally include code that was previously
11321         conditional on SECONDARY_MEMORY_NEEDED.
11322         (choose_reload_regs): Use targetm.secondary_memory_needed
11323         instead of TARGET_SECONDARY_MEMORY_NEEDED.
11324         (gen_reload): Likewise.
11325         * system.h (SECONDARY_MEMORY_NEEDED): Poison.
11326
11327 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
11328             Alan Hayward  <alan.hayward@arm.com>
11329             David Sherwood  <david.sherwood@arm.com>
11330
11331         * target.def (secondary_memory_needed_mode): New hook:
11332         * targhooks.c (default_secondary_memory_needed_mode): Declare.
11333         * targhooks.h (default_secondary_memory_needed_mode): New function.
11334         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED_MODE): Replace with...
11335         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): ...this.
11336         * doc/tm.texi: Regenerate.
11337         * lra-constraints.c (check_and_process_move): Use
11338         targetm.secondary_memory_needed_mode instead of
11339         TARGET_SECONDARY_MEMORY_NEEDED_MODE.
11340         (curr_insn_transform): Likewise.
11341         * reload.c (get_secondary_mem): Likewise.
11342         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
11343         * config/alpha/alpha.c (alpha_secondary_memory_needed_mode): New
11344         function.
11345         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
11346         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
11347         * config/i386/i386.c (ix86_secondary_memory_needed_mode): New function.
11348         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
11349         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED_MODE):
11350         Delete.
11351         * config/powerpcspe/powerpcspe-protos.h
11352         (rs6000_secondary_memory_needed_mode): Delete.
11353         * config/powerpcspe/powerpcspe.c
11354         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
11355         (rs6000_secondary_memory_needed_mode): Make static.
11356         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
11357         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_mode):
11358         Delete.
11359         * config/rs6000/rs6000.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
11360         Redefine.
11361         (rs6000_secondary_memory_needed_mode): Make static.
11362         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
11363         * config/s390/s390.c (s390_secondary_memory_needed_mode): New function.
11364         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
11365         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
11366         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
11367         Redefine.
11368         (sparc_secondary_memory_needed_mode): New function.
11369         * system.h (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Poison.
11370
11371 2017-09-13  Jackson Woodruff  <jackson.woodruff@arm.com>
11372
11373         * config/aarch64/constraints.md (Umq): New constraint.
11374         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>):
11375         Change to use Umq.
11376         (mov<mode>): Update condition.
11377
11378 2017-09-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11379
11380         * gimple-ssa-store-merging.c (sort_by_bitpos): Compare store order
11381         when bitposition is the same.
11382
11383 2017-09-13  Richard Biener  <rguenther@suse.de>
11384
11385         * dwarf2out.c (output_die_symbol): Remove.
11386         (output_die): Do not output a DIEs symbol.
11387
11388 2017-09-13  Richard Biener  <rguenther@suse.de>
11389
11390         PR middle-end/82128
11391         * gimple-fold.c (gimple_fold_call): Update SSA name in-place to
11392         default-def to avoid breaking iterator update with the weird
11393         interaction with cgraph_update_edges_for_call_stmt_node.
11394
11395 2017-09-13  Richard Biener  <rguenther@suse.de>
11396
11397         * tree-cfg.c (verify_gimple_assign_binary): Add verification
11398         for WIDEN_SUM_EXPR, VEC_WIDEN_MULT_{HI,LO,EVEN,ODD}_EXPR,
11399         VEC_PACK_{TRUNC,SAT,FIX_TRUNC}_EXPR.
11400         (verify_gimple_assign_ternary): Add verification for DOT_PROD_EXPR.
11401
11402 2017-09-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
11403
11404         * config/aarch64/aarch64.c (aarch64_override_options_after_change_1):
11405         Disable pc relative literal load irrespective of
11406         TARGET_FIX_ERR_A53_84341 for default.
11407
11408 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
11409
11410         * config/sparc/sparc.c (output_return): Output the source location of
11411         the insn in the delay slot, if any.
11412         (output_sibcall): Likewise.
11413
11414 2017-09-12  H.J. Lu  <hongjiu.lu@intel.com>
11415
11416         PR driver/81498
11417         * common.opt (-static-pie): New alias.
11418         (shared): Negate static-pie.
11419         (-no-pie): Update help text.
11420         (-pie): Likewise.
11421         (static-pie): New option.
11422         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add
11423         -static-pie support.
11424         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
11425         (LINK_EH_SPEC): Likewise.
11426         (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
11427         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
11428         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
11429         * gcc.c (LINK_COMMAND_SPEC): Likewise.
11430         (init_gcc_specs): Likewise.
11431         (init_spec): Likewise.
11432         (display_help): Update help message for -pie.
11433         * doc/invoke.texi: Update -pie, -no-pie and -static.  Document
11434         -static-pie.
11435
11436 2017-09-12  Wilco Dijkstra  <wdijkstr@arm.com>
11437
11438         * config/aarch64/aarch64.md (movsi_aarch64): Remove all '*'.
11439         (movdi_aarch64): Likewise.
11440         (movti_aarch64): Likewise.
11441
11442 2017-09-12 Simon Wright <simon@pushface.org>
11443
11444         PR target/80204
11445         * config/darwin-driver.c (darwin_find_version_from_kernel): Eliminate
11446         calculation of the minor version, always output as 0.
11447
11448 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
11449
11450         PR target/82112
11451         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
11452         ALTIVEC_BUILTIN_VEC_LD if arg1 has array type call default_conversion
11453         on it early, rather than manual conversion late.  For
11454         ALTIVEC_BUILTIN_VEC_ST if arg2 has array type call default_conversion
11455         instead of performing manual conversion.
11456
11457 2017-09-12  Carl Love  <cel@us.ibm.com>
11458
11459         * config/rs6000/altivec.md (vec_widen_umult_even_v4si,
11460         vec_widen_smult_even_v4si): Add define expands for vmuleuw, vmulesw,
11461         vmulouw, vmulosw.
11462         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
11463         VMULOSW): Add definitions.
11464         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
11465         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
11466         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
11467         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
11468         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
11469
11470 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
11471
11472         * config/aarch64/aarch64.md (movdi_aarch64): Set load/store
11473         types correctly.
11474         (movti_aarch64): Likewise.
11475         (movdf_aarch64): Likewise.
11476         (movtf_aarch64): Likewise.
11477         (load_pairdi): Likewise.
11478         (store_pairdi): Likewise.
11479         (load_pairdf): Likewise.
11480         (store_pairdf): Likewise.
11481         (loadwb_pair<GPI:mode>_<P:mode>): Likewise.
11482         (storewb_pair<GPI:mode>_<P:mode>): Likewise.
11483         (ldr_got_small_<mode>): Likewise.
11484         (ldr_got_small_28k_<mode>): Likewise.
11485         (ldr_got_tiny): Likewise.
11486         * config/aarch64/iterators.md (ldst_sz): New.
11487         (ldpstp_sz): Likewise.
11488         * config/aarch64/thunderx.md (thunderx_storepair): Split store_8
11489         to store_16.
11490         (thunderx_load): Split load_8 to load_16.
11491         * config/aarch64/thunderx2t99.md (thunderx2t99_loadpair): Split
11492         load_8 to load_16.
11493         (thunderx2t99_storepair_basic): Split store_8 to store_16.
11494         * config/arm/xgene1.md (xgene1_load_pair): Split load_8 to load_16.
11495         (xgene1_store_pair): Split store_8 to store_16.
11496         * config/aarch64/falkor.md (falkor_ld_3_ld): Split load_8 to load_16.
11497         (falkor_st_0_st_sd): Split store_8 to store_16.
11498
11499 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
11500
11501         * config/arm/types.md (type): Rename load1/2/3/4 to load_4/8/12/16
11502         and store1/2/3/4 to store_4/8/12/16.
11503         * config/aarch64/aarch64.md: Update for rename.
11504         * config/arm/arm.md: Likewise.: Likewise.
11505         * config/arm/arm.c: Likewise.
11506         * config/arm/thumb1.md: Likewise.
11507         * config/arm/thumb2.md: Likewise.
11508         * config/arm/vfp.md: Likewise.
11509         * config/arm/arm-generic.md: Likewise.
11510         * config/arm/arm1020e.md: Likewise.
11511         * config/arm/arm1026ejs.md: Likewise.
11512         * config/arm/arm1136jfs.md: Likewise.
11513         * config/arm/arm926ejs.md: Likewise.
11514         * config/arm/cortex-a15.md: Likewise.
11515         * config/arm/cortex-a17.md: Likewise.
11516         * config/arm/cortex-a5.md: Likewise.
11517         * config/arm/cortex-a53.md: Likewise.
11518         * config/arm/cortex-a57.md: Likewise.
11519         * config/arm/cortex-a7.md: Likewise.
11520         * config/arm/cortex-a8.md: Likewise.
11521         * config/arm/cortex-a9.md: Likewise.
11522         * config/arm/cortex-m4.md: Likewise.
11523         * config/arm/cortex-m7.md: Likewise.
11524         * config/arm/cortex-r4.md: Likewise.
11525         * config/arm/exynos-m1.md: Likewise.
11526         * config/arm/fa526.md: Likewise.
11527         * config/arm/fa606te.md: Likewise.
11528         * config/arm/fa626te.md: Likewise.
11529         * config/arm/fa726te.md: Likewise.
11530         * config/arm/fmp626.md: Likewise.
11531         * config/arm/iwmmxt.md: Likewise.
11532         * config/arm/ldmstm.md: Likewise.
11533         * config/arm/marvell-pj4.md: Likewise.
11534         * config/arm/xgene1.md: Likewise.
11535         * config/aarch64/thunderx.md: Likewise.
11536         * config/aarch64/thunderx2t99.md: Likewise.
11537         * config/aarch64/falkor.md: Likewise.
11538
11539 2017-09-12  Martin Liska  <mliska@suse.cz>
11540
11541         * attribs.c (private_lookup_attribute): New function.
11542         * attribs.h (private_lookup_attribute): Declared here.
11543         (lookup_attribute): Called from this place.
11544
11545 2017-09-12  Richard Biener  <rguenther@suse.de>
11546
11547         PR tree-optimization/82157
11548         * tree-ssa-pre.c (remove_dead_inserted_code): Do not remove
11549         stmts with side-effects.
11550
11551 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
11552             Alan Hayward  <alan.hayward@arm.com>
11553             David Sherwood <david.sherwood@arm.com>
11554
11555         * target.def (hard_regno_nregs): New hook.
11556         (class_max_nregs): Refer to it instead of HARD_REGNO_NREGS.
11557         * targhooks.h (default_hard_regno_nregs): Declare.
11558         * targhooks.c (default_hard_regno_nregs): New function.
11559         * doc/tm.texi.in (HARD_REGNO_NREGS): Replace with...
11560         (TARGET_HARD_REGNO_NREGS): ...this hook.
11561         (HARD_REGNO_NREGS_HAS_PADDING): Update accordingly.
11562         (CLASS_MAX_NREGS): Likewise.
11563         * doc/tm.texi: Regenerate.
11564         * reginfo.c (init_reg_modes_target): Use targetm.hard_regno_nregs
11565         instead of HARD_REGNO_NREGS.
11566         * rtl.h (REG_NREGS): Refer to TARGET_HARD_REGNO_NREGS rather than
11567         HARD_REGNO_NREGS in the comment.
11568         * config/aarch64/aarch64.h (HARD_REGNO_NREGS): Delete.
11569         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_nregs): Delete.
11570         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs): Make static.
11571         Return an unsigned int.
11572         (TARGET_HARD_REGNO_NREGS): Redefine.
11573         * config/alpha/alpha.h (HARD_REGNO_NREGS): Delete.
11574         * config/arc/arc.h (HARD_REGNO_NREGS): Delete.
11575         * config/arc/arc.c (TARGET_HARD_REGNO_NREGS): Redefine.
11576         (arc_hard_regno_nregs): New function.
11577         * config/arm/arm.h (HARD_REGNO_NREGS): Delete.
11578         * config/arm/arm.c (TARGET_HARD_REGNO_NREGS): Redefine.
11579         (arm_hard_regno_nregs): New function.
11580         * config/avr/avr.h (HARD_REGNO_NREGS): Delete.
11581         * config/bfin/bfin.h (HARD_REGNO_NREGS): Delete.
11582         * config/bfin/bfin.c (bfin_hard_regno_nregs): New function.
11583         (TARGET_HARD_REGNO_NREGS): Redefine.
11584         * config/c6x/c6x.h (HARD_REGNO_NREGS): Delete.
11585         * config/cr16/cr16.h (LONG_REG_P): Use targetm.hard_regno_nregs.
11586         (HARD_REGNO_NREGS): Delete.
11587         * config/cr16/cr16.c (TARGET_HARD_REGNO_NREGS): Redefine.
11588         (cr16_hard_regno_nregs): New function.
11589         (cr16_memory_move_cost): Use it instead of HARD_REGNO_NREGS.
11590         * config/cris/cris.h (HARD_REGNO_NREGS): Delete.
11591         * config/cris/cris.c (TARGET_HARD_REGNO_NREGS): Redefine.
11592         (cris_hard_regno_nregs): New function.
11593         * config/epiphany/epiphany.h (HARD_REGNO_NREGS): Delete.
11594         * config/fr30/fr30.h (HARD_REGNO_NREGS): Delete.
11595         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
11596         * config/frv/frv.h (HARD_REGNO_NREGS): Delete.
11597         (CLASS_MAX_NREGS): Remove outdated copy of documentation.
11598         * config/frv/frv-protos.h (frv_hard_regno_nregs): Delete.
11599         * config/frv/frv.c (TARGET_HARD_REGNO_NREGS): Redefine.
11600         (frv_hard_regno_nregs): Make static.  Take and return an
11601         unsigned int.
11602         (frv_class_max_nregs): Remove outdated copy of documentation.
11603         * config/ft32/ft32.h (HARD_REGNO_NREGS): Delete.
11604         * config/h8300/h8300.h (HARD_REGNO_NREGS): Delete.
11605         * config/h8300/h8300-protos.h (h8300_hard_regno_nregs): Delete.
11606         * config/h8300/h8300.c (h8300_hard_regno_nregs): Delete.
11607         * config/i386/i386.h (HARD_REGNO_NREGS): Delete.
11608         * config/i386/i386.c (ix86_hard_regno_nregs): New function.
11609         (TARGET_HARD_REGNO_NREGS): Redefine.
11610         * config/ia64/ia64.h (HARD_REGNO_NREGS): Delete.
11611         (CLASS_MAX_NREGS): Update comment.
11612         * config/ia64/ia64.c (TARGET_HARD_REGNO_NREGS): Redefine.
11613         (ia64_hard_regno_nregs): New function.
11614         * config/iq2000/iq2000.h (HARD_REGNO_NREGS): Delete.
11615         * config/lm32/lm32.h (HARD_REGNO_NREGS): Delete.
11616         * config/m32c/m32c.h (HARD_REGNO_NREGS): Delete.
11617         * config/m32c/m32c-protos.h (m32c_hard_regno_nregs): Delete.
11618         * config/m32c/m32c.c (m32c_hard_regno_nregs_1): Take and return
11619         an unsigned int.
11620         (m32c_hard_regno_nregs): Likewise.  Make static.
11621         (TARGET_HARD_REGNO_NREGS): Redefine.
11622         * config/m32r/m32r.h (HARD_REGNO_NREGS): Delete.
11623         * config/m68k/m68k.h (HARD_REGNO_NREGS): Delete.
11624         * config/m68k/m68k.c (TARGET_HARD_REGNO_NREGS): Redefine.
11625         (m68k_hard_regno_nregs): New function.
11626         * config/mcore/mcore.h (HARD_REGNO_NREGS): Delete.
11627         * config/microblaze/microblaze.h (HARD_REGNO_NREGS): Delete.
11628         * config/mips/mips.h (HARD_REGNO_NREGS): Delete.
11629         * config/mips/mips-protos.h (mips_hard_regno_nregs): Delete.
11630         * config/mips/mips.c (mips_hard_regno_nregs): Make static.
11631         Take and return an unsigned int.
11632         (TARGET_HARD_REGNO_NREGS): Redefine.
11633         * config/mmix/mmix.h (HARD_REGNO_NREGS): Delete.
11634         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
11635         * config/mn10300/mn10300.h (HARD_REGNO_NREGS): Delete.
11636         * config/moxie/moxie.h (HARD_REGNO_NREGS): Delete.
11637         * config/msp430/msp430.h (HARD_REGNO_NREGS): Delete.
11638         * config/msp430/msp430-protos.h (msp430_hard_regno_nregs): Delete.
11639         * config/msp430/msp430.c (TARGET_HARD_REGNO_NREGS): Redefine.
11640         (msp430_hard_regno_nregs): Make static.  Take and return an
11641         unsigned int.
11642         * config/nds32/nds32.h (HARD_REGNO_NREGS): Delete.
11643         * config/nds32/nds32-protos.h (nds32_hard_regno_nregs): Delete.
11644         * config/nds32/nds32.c (nds32_hard_regno_nregs): Delete.
11645         (nds32_hard_regno_mode_ok): Use targetm.hard_regno_nregs.
11646         * config/nios2/nios2.h (HARD_REGNO_NREGS): Delete.
11647         * config/nvptx/nvptx.h (HARD_REGNO_NREGS): Delete.
11648         * config/nvptx/nvptx.c (nvptx_hard_regno_nregs): New function.
11649         (TARGET_HARD_REGNO_NREGS): Redefine.
11650         * config/pa/pa32-regs.h (HARD_REGNO_NREGS): Rename to...
11651         (PA_HARD_REGNO_NREGS): ...this.
11652         * config/pa/pa64-regs.h (HARD_REGNO_NREGS): Rename to...
11653         (PA_HARD_REGNO_NREGS): ...this.
11654         * config/pa/pa.c (TARGET_HARD_REGNO_NREGS): Redefine.
11655         (pa_hard_regno_nregs): New function.
11656         * config/pdp11/pdp11.h (HARD_REGNO_NREGS): Delete.
11657         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_NREGS): Redefine.
11658         (pdp11_hard_regno_nregs): New function.
11659         * config/powerpcspe/powerpcspe.h (HARD_REGNO_NREGS): Delete.
11660         * config/powerpcspe/powerpcspe.c (TARGET_HARD_REGNO_NREGS): Redefine.
11661         (rs6000_hard_regno_nregs_hook): New function.
11662         * config/riscv/riscv.h (HARD_REGNO_NREGS): Delete.
11663         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
11664         * config/riscv/riscv.c (riscv_hard_regno_nregs): Make static.
11665         Take and return an unsigned int.  Move earlier in file.
11666         (TARGET_HARD_REGNO_NREGS): Redefine.
11667         * config/rl78/rl78.h (HARD_REGNO_NREGS): Delete.
11668         * config/rl78/rl78-protos.h (rl78_hard_regno_nregs): Delete.
11669         * config/rl78/rl78.c (TARGET_HARD_REGNO_NREGS): Reefine.
11670         (rl78_hard_regno_nregs): Make static.  Take and return an
11671         unsigned int.
11672         * config/rs6000/rs6000.h (HARD_REGNO_NREGS): Delete.
11673         * config/rs6000/rs6000.c (TARGET_HARD_REGNO_NREGS): Redefine.
11674         (rs6000_hard_regno_nregs_hook): New function.
11675         * config/rx/rx.h (HARD_REGNO_NREGS): Delete.
11676         * config/rx/rx.c (rx_hard_regno_nregs): New function.
11677         (TARGET_HARD_REGNO_NREGS): Redefine.
11678         * config/s390/s390.h (HARD_REGNO_NREGS): Delete.
11679         * config/s390/s390.c (REGNO_PAIR_OK): Use s390_hard_regno_nregs
11680         instead of HARD_REGNO_NREGS.
11681         (s390_hard_regno_nregs): New function.
11682         (s390_hard_regno_mode_ok): Add comment from s390.h.
11683         (TARGET_HARD_REGNO_NREGS): Redefine.
11684         * config/sh/sh.h (HARD_REGNO_NREGS): Delete.
11685         * config/sh/sh.c (TARGET_HARD_REGNO_NREGS): Redefine.
11686         (sh_hard_regno_nregs): New function.
11687         (sh_pass_in_reg_p): Use it.
11688         * config/sparc/sparc.h (HARD_REGNO_NREGS): Delete.
11689         * config/sparc/sparc.c (TARGET_HARD_REGNO_NREGS): Redefine.
11690         (sparc_hard_regno_nregs): New function.
11691         * config/spu/spu.h (HARD_REGNO_NREGS): Delete.
11692         * config/spu/spu.c (spu_hard_regno_nregs): New function.
11693         (spu_function_arg_advance): Use it, supplying a valid register number.
11694         (TARGET_HARD_REGNO_NREGS): Redefine.
11695         * config/stormy16/stormy16.h (HARD_REGNO_NREGS): Delete.
11696         * config/tilegx/tilegx.h (HARD_REGNO_NREGS): Delete.
11697         * config/tilepro/tilepro.h (HARD_REGNO_NREGS): Delete.
11698         * config/v850/v850.h (HARD_REGNO_NREGS): Delete.
11699         * config/vax/vax.h (HARD_REGNO_NREGS): Delete.
11700         * config/visium/visium.h (HARD_REGNO_NREGS): Delete.
11701         (CLASS_MAX_NREGS): Remove copy of old documentation.
11702         * config/visium/visium.c (TARGET_HARD_REGNO_NREGS): Redefine.
11703         (visium_hard_regno_nregs): New function.
11704         (visium_hard_regno_mode_ok): Use it instead of HARD_REGNO_NREGS.
11705         * config/xtensa/xtensa.h (HARD_REGNO_NREGS): Delete.
11706         * config/xtensa/xtensa.c (TARGET_HARD_REGNO_NREGS): Redefine.
11707         xtensa_hard_regno_nregs): New function.
11708         * system.h (HARD_REGNO_NREGS): Poison.
11709
11710 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
11711
11712         * config/arm/arm.h (THUMB_SECONDARY_INPUT_RELOAD_CLASS): Use
11713         hard_regno_nregs instead of HARD_REGNO_NREGS.
11714         (THUMB_SECONDARY_OUTPUT_RELOAD_CLASS): Likewise.
11715         * config/c6x/c6x.c (c6x_expand_prologue): Likewise.
11716         (c6x_expand_epilogue): Likewise.
11717         * config/frv/frv.c (frv_alloc_temp_reg): Likewise.
11718         (frv_read_iacc_argument): Likewise.
11719         * config/sh/sh.c: Include regs.h.
11720         (sh_print_operand): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
11721         (regs_used): Likewise.
11722         (output_stack_adjust): Likewise.
11723         * config/xtensa/xtensa.c (xtensa_copy_incoming_a7): Likewise.
11724         * expmed.c: Include regs.h.
11725         (store_bit_field_1): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
11726         * ree.c: Include regs.h.
11727         (combine_reaching_defs): Use hard_regno_nregs instead of
11728         HARD_REGNO_NREGS.
11729         (add_removable_extension): Likewise.
11730
11731 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
11732
11733         * regs.h (hard_regno_nregs): Turn into a function.
11734         (end_hard_regno): Update accordingly.
11735         * caller-save.c (setup_save_areas): Likewise.
11736         (save_call_clobbered_regs): Likewise.
11737         (replace_reg_with_saved_mem): Likewise.
11738         (insert_restore): Likewise.
11739         (insert_save): Likewise.
11740         * combine.c (can_change_dest_mode): Likewise.
11741         (move_deaths): Likewise.
11742         (distribute_notes): Likewise.
11743         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): Likewise.
11744         * config/powerpcspe/powerpcspe.c (rs6000_cannot_change_mode_class)
11745         (rs6000_split_multireg_move): Likewise.
11746         (rs6000_register_move_cost): Likewise.
11747         (rs6000_memory_move_cost): Likewise.
11748         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class): Likewise.
11749         (rs6000_split_multireg_move): Likewise.
11750         (rs6000_register_move_cost): Likewise.
11751         (rs6000_memory_move_cost): Likewise.
11752         * cselib.c (cselib_reset_table): Likewise.
11753         (cselib_lookup_1): Likewise.
11754         * emit-rtl.c (set_mode_and_regno): Likewise.
11755         * function.c (aggregate_value_p): Likewise.
11756         * ira-color.c (setup_profitable_hard_regs): Likewise.
11757         (check_hard_reg_p): Likewise.
11758         (calculate_saved_nregs): Likewise.
11759         (assign_hard_reg): Likewise.
11760         (improve_allocation): Likewise.
11761         (calculate_spill_cost): Likewise.
11762         * ira-emit.c (modify_move_list): Likewise.
11763         * ira-int.h (ira_hard_reg_set_intersection_p): Likewise.
11764         (ira_hard_reg_in_set_p): Likewise.
11765         * ira.c (setup_reg_mode_hard_regset): Likewise.
11766         (clarify_prohibited_class_mode_regs): Likewise.
11767         (check_allocation): Likewise.
11768         * lra-assigns.c (find_hard_regno_for_1): Likewise.
11769         (lra_setup_reg_renumber): Likewise.
11770         (setup_try_hard_regno_pseudos): Likewise.
11771         (spill_for): Likewise.
11772         (assign_hard_regno): Likewise.
11773         (setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
11774         * lra-constraints.c (in_class_p): Likewise.
11775         (lra_constraint_offset): Likewise.
11776         (simplify_operand_subreg): Likewise.
11777         (lra_constraints): Likewise.
11778         (split_reg): Likewise.
11779         (split_if_necessary): Likewise.
11780         (invariant_p): Likewise.
11781         (inherit_in_ebb): Likewise.
11782         * lra-lives.c (process_bb_lives): Likewise.
11783         * lra-remat.c (reg_overlap_for_remat_p): Likewise.
11784         (get_hard_regs): Likewise.
11785         (do_remat): Likewise.
11786         * lra-spills.c (assign_spill_hard_regs): Likewise.
11787         * mode-switching.c (create_pre_exit): Likewise.
11788         * postreload.c (reload_combine_recognize_pattern): Likewise.
11789         * recog.c (peep2_find_free_register): Likewise.
11790         * regcprop.c (kill_value_regno): Likewise.
11791         (set_value_regno): Likewise.
11792         (copy_value): Likewise.
11793         (maybe_mode_change): Likewise.
11794         (find_oldest_value_reg): Likewise.
11795         (copyprop_hardreg_forward_1): Likewise.
11796         * regrename.c (check_new_reg_p): Likewise.
11797         (regrename_do_replace): Likewise.
11798         * reload.c (push_reload): Likewise.
11799         (combine_reloads): Likewise.
11800         (find_dummy_reload): Likewise.
11801         (operands_match_p): Likewise.
11802         (find_reloads): Likewise.
11803         (find_equiv_reg): Likewise.
11804         (reload_adjust_reg_for_mode): Likewise.
11805         * reload1.c (count_pseudo): Likewise.
11806         (count_spilled_pseudo): Likewise.
11807         (find_reg): Likewise.
11808         (clear_reload_reg_in_use): Likewise.
11809         (free_for_value_p): Likewise.
11810         (allocate_reload_reg): Likewise.
11811         (choose_reload_regs): Likewise.
11812         (reload_adjust_reg_for_temp): Likewise.
11813         (emit_reload_insns): Likewise.
11814         (delete_output_reload): Likewise.
11815         * rtlanal.c (subreg_get_info): Likewise.
11816         * sched-deps.c (sched_analyze_reg): Likewise.
11817         * sel-sched.c (init_regs_for_mode): Likewise.
11818         (mark_unavailable_hard_regs): Likewise.
11819         (choose_best_reg_1): Likewise.
11820         (verify_target_availability): Likewise.
11821         * valtrack.c (dead_debug_insert_temp): Likewise.
11822         * var-tracking.c (track_loc_p): Likewise.
11823         (emit_note_insn_var_location): Likewise.
11824         * varasm.c (make_decl_rtl): Likewise.
11825         * reginfo.c (choose_hard_reg_mode): Likewise.
11826         (init_reg_modes_target): Refer directly to
11827         this_target_regs->x_hard_regno_nregs.
11828
11829 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
11830
11831         * ira-costs.c (record_operand_costs): Use in_hard_reg_set_p
11832         instead of hard_regno_nregs.
11833
11834 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
11835
11836         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Use
11837         end_hard_regno instead of hard_regno_nregs.
11838         * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
11839         * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): Likewise.
11840         * config/visium/visium.c (visium_hard_regno_mode_ok): Likewise.
11841         * ira-color.c (improve_allocation): Likewise.
11842         * lra-assigns.c (find_hard_regno_for_1): Likewise.
11843         * lra-lives.c (mark_regno_live): Likewise.
11844         (mark_regno_dead): Likewise.
11845         * lra-remat.c (operand_to_remat): Likewise.
11846         * lra.c (collect_non_operand_hard_regs): Likewise.
11847         * postreload.c (reload_combine_note_store): Likewise.
11848         (move2add_valid_value_p): Likewise.
11849         * reload.c (regno_clobbered_p): Likewise.
11850
11851 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
11852
11853         * config/frv/frv.c (FOR_EACH_REGNO): Use END_REGNO instead of
11854         hard_regno_nregs.
11855         * config/v850/v850.c (v850_reorg): Likewise.
11856         * reload.c (refers_to_regno_for_reload_p): Likewise.
11857         (find_equiv_reg): Likewise.
11858         * reload1.c (reload_reg_reaches_end_p): Likewise.
11859
11860 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
11861
11862         * caller-save.c (add_used_regs): Use REG_NREGS instead of
11863         hard_regno_nregs.
11864         * config/aarch64/aarch64.c (aarch64_split_combinev16qi): Likewise.
11865         * config/arm/arm.c (output_move_neon): Likewise.
11866         (arm_attr_length_move_neon): Likewise.
11867         (neon_split_vcombine): Likewise.
11868         * config/c6x/c6x.c (c6x_mark_reg_read): Likewise.
11869         (c6x_mark_reg_written): Likewise.
11870         (c6x_dwarf_register_span): Likewise.
11871         * config/i386/i386.c (ix86_save_reg): Likewise.
11872         * config/ia64/ia64.c (mark_reg_gr_used_mask): Likewise.
11873         (rws_access_reg): Likewise.
11874         * config/s390/s390.c (s390_call_saved_register_used): Likewise.
11875         * mode-switching.c (create_pre_exit): Likewise.
11876         * ree.c (combine_reaching_defs): Likewise.
11877         (add_removable_extension): Likewise.
11878         * regcprop.c (find_oldest_value_reg): Likewise.
11879         (copyprop_hardreg_forward_1): Likewise.
11880         * reload.c (reload_inner_reg_of_subreg): Likewise.
11881         (push_reload): Likewise.
11882         (combine_reloads): Likewise.
11883         (find_dummy_reload): Likewise.
11884         (reload_adjust_reg_for_mode): Likewise.
11885         * reload1.c (find_reload_regs): Likewise.
11886         (forget_old_reloads_1): Likewise.
11887         (reload_reg_free_for_value_p): Likewise.
11888         (reload_adjust_reg_for_temp): Likewise.
11889         (emit_reload_insns): Likewise.
11890         (delete_output_reload): Likewise.
11891         * sel-sched.c (choose_best_reg_1): Likewise.
11892         (choose_best_pseudo_reg): Likewise.
11893
11894 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
11895             Alan Hayward  <alan.hayward@arm.com>
11896             David Sherwood <david.sherwood@arm.com>
11897
11898         * defaults.h (SLOW_UNALIGNED_ACCESS): Delete.
11899         * target.def (slow_unaligned_access): New hook.
11900         * targhooks.h (default_slow_unaligned_access): Declare.
11901         * targhooks.c (default_slow_unaligned_access): New function.
11902         * doc/tm.texi.in (SLOW_UNALIGNED_ACCESS): Replace with...
11903         (TARGET_SLOW_UNALIGNED_ACCESS): ...this.
11904         * doc/tm.texi: Regenerate.
11905         * config/alpha/alpha.h (SLOW_UNALIGNED_ACCESS): Delete.
11906         * config/arm/arm.h (SLOW_UNALIGNED_ACCESS): Delete.
11907         * config/i386/i386.h (SLOW_UNALIGNED_ACCESS): Delete commented-out
11908         definition.
11909         * config/powerpcspe/powerpcspe.h (SLOW_UNALIGNED_ACCESS): Delete.
11910         * config/powerpcspe/powerpcspe.c (TARGET_SLOW_UNALIGNED_ACCESS):
11911         Redefine.
11912         (rs6000_slow_unaligned_access): New function.
11913         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
11914         (expand_block_compare): Likewise.
11915         (expand_strn_compare): Likewise.
11916         (rs6000_rtx_costs): Likewise.
11917         * config/riscv/riscv.h (SLOW_UNALIGNED_ACCESS): Delete.
11918         (riscv_slow_unaligned_access): Likewise.
11919         * config/riscv/riscv.c (riscv_slow_unaligned_access): Rename to...
11920         (riscv_slow_unaligned_access_p): ...this and make static.
11921         (riscv_option_override): Update accordingly.
11922         (riscv_slow_unaligned_access): New function.
11923         (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
11924         * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Delete.
11925         * config/rs6000/rs6000.c (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
11926         (rs6000_slow_unaligned_access): New function.
11927         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
11928         (rs6000_rtx_costs): Likewise.
11929         * config/rs6000/rs6000-string.c (expand_block_compare)
11930         (expand_strn_compare): Use targetm.slow_unaligned_access instead
11931         of SLOW_UNALIGNED_ACCESS.
11932         * config/tilegx/tilegx.h (SLOW_UNALIGNED_ACCESS): Delete.
11933         * config/tilepro/tilepro.h (SLOW_UNALIGNED_ACCESS): Delete.
11934         * calls.c (expand_call): Use targetm.slow_unaligned_access instead
11935         of SLOW_UNALIGNED_ACCESS.
11936         * expmed.c (simple_mem_bitfield_p): Likewise.
11937         * expr.c (alignment_for_piecewise_move): Likewise.
11938         (emit_group_load_1): Likewise.
11939         (emit_group_store): Likewise.
11940         (copy_blkmode_from_reg): Likewise.
11941         (emit_push_insn): Likewise.
11942         (expand_assignment): Likewise.
11943         (store_field): Likewise.
11944         (expand_expr_real_1): Likewise.
11945         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
11946         * lra-constraints.c (simplify_operand_subreg): Likewise.
11947         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
11948         * gimple-ssa-store-merging.c: Likewise in block comment at start
11949         of file.
11950         * tree-ssa-strlen.c: Include target.h.
11951         (handle_builtin_memcmp): Use targetm.slow_unaligned_access instead
11952         of SLOW_UNALIGNED_ACCESS.
11953         * system.h (SLOW_UNALIGNED_ACCESS): Poison.
11954
11955 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
11956
11957         PR rtl-optimization/82185
11958         * expmed.c (emit_store_flag_int): Only test tem if it has been
11959         initialized.
11960
11961 2017-09-12  Richard Biener  <rguenther@suse.de>
11962
11963         PR middle-end/82149
11964         * match.pd ((FTYPE) N CMP CST): Fix typo.
11965
11966 2017-09-12  Simon Atanasyan  <simon.atanasyan@imgtec.com>
11967
11968         * config/mips/mips.c (mips_attribute_table): Add 'short_call'
11969         attribute.
11970         (mips_near_type_p): Add 'short_call' attribute as a synonym
11971         for 'near'.
11972         * doc/extend.texi (short_call): Document new function attribute.
11973
11974 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
11975
11976         PR target/82112
11977         * c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()
11978         assertion check that in the condition.
11979         (get_atomic_generic_size): Likewise.  Before testing if parameter
11980         has pointer type, if it has array type, call for C++
11981         default_conversion to perform array-to-pointer conversion.
11982
11983 2017-09-12  Richard Biener  <rguenther@suse.de>
11984
11985         * tree-vect-generic.c (expand_vector_operations_1): Do nothing
11986         for operations we cannot scalarize.
11987
11988 2017-09-12  Aldy Hernandez  <aldyh@redhat.com>
11989
11990         * tree-ssa-threadbackward.c (fsm_find_thread_path): Make GC
11991         vectors heap vectors.  Clean up comments.
11992         Make visited_bbs a reference.
11993         (profitable_jump_thread_path): Make GC
11994         vectors heap vectors.  Clean up comments.
11995         Misc cleanups.
11996         (convert_and_register_jump_thread_path): Make GC vectors heap
11997         vectors.
11998         (check_subpath_and_update_thread_path): Same.  Clean up comments.
11999         Make visited_bbs a reference.
12000         (handle_phi): Abstract common code to to
12001         register_jump_thread_path_if_profitable.
12002         Rename VAR_BB to DEF_BB.
12003         Update comments.
12004         Make GC vectors heap vectors.
12005         Make visited_bbs a reference.
12006         (handle_assignment): Same.
12007         (register_jump_thread_path_if_profitable): New.
12008         (fsm_find_control_statement_thread_paths): Rename VAR_BB to
12009         DEF_BB.
12010         Make GC vectors heap vectors.  Clean up comments.
12011         Make visited_bbs a reference.
12012         (find_jump_threads_backwards): Make visited_bbs live in the stack.
12013         * tree-ssa-threadupdate.c (delete_jump_thread_path): Fix typo in
12014         comment.
12015
12016 2017-09-11  Max Filippov  <jcmvbkbc@gmail.com>
12017
12018         PR target/82181
12019         * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
12020         words of E_DImode object are reachable by xtensa_uimm8x4 access.
12021
12022 2017-09-11  Vidya Praveen  <vidyapraveen@arm.com>
12023
12024         Revert r251800 and r251799.
12025
12026 2017-09-11  Martin Jambor  <mjambor@suse.cz>
12027
12028         PR hsa/82119
12029         * hsa-gen.c (gen_hsa_phi_from_gimple_phi): Process ADDR_EXPRs in
12030         arguments in advance.
12031         * hsa-regalloc.c (naive_process_phi): New parameter predecessors,
12032         use it to find predecessor edges.
12033         (naive_outof_ssa): Collect vector of predecessors.
12034
12035 2017-09-08  Jason Merrill  <jason@redhat.com>
12036
12037         PR c++/70029 - ICE with ref-qualifier and -flto
12038         * langhooks.h (struct lang_hooks_for_types): Add
12039         copy_lang_qualifiers.
12040         * attribs.c (build_type_attribute_qual_variant): Use it.
12041         * langhooks-def.h (LANG_HOOKS_COPY_LANG_QUALIFIERS): Default to
12042         NULL.
12043         (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
12044         * tree.c (verify_type): Re-enable TYPE_CANONICAL main variant check.
12045
12046 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
12047
12048         PR target/81988
12049         * config/sparc/sparc.md (mulsi3): Rename into *mulsi3_sp32.
12050         (*mulsi3_sp64): New instruction.
12051         (mulsi3): New expander.
12052
12053 2017-09-08  Uros Bizjak  <ubizjak@gmail.com>
12054
12055         * config/alpha/alpha.c (alpha_print_operand) <case 'S'>: Remove.
12056
12057 2017-09-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12058
12059         * sancov.c: Include memmodel.h.
12060
12061 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
12062
12063         PR target/80897
12064         * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Deal with too
12065         large offsets.
12066
12067 2017-09-07  Carl Love  <cel@us.ibm.com>
12068
12069         * config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
12070         the sldi instruction.
12071
12072 2017-09-07  David Edelsohn  <dje.gcc@gmail.com>
12073
12074         * sancov.c: Include tm_p.h.
12075
12076 2017-09-07  Jakub Jelinek  <jakub@redhat.com>
12077
12078         PR target/81979
12079         * output.h (switch_to_other_text_partition): New declaration.
12080         * varasm.c (switch_to_other_text_partition): New function.
12081         * config/rs6000/rs6000.c (uses_TOC): Return 2 if
12082         NOTE_INSN_SWITCH_TEXT_SECTIONS is seen before finding load_toc_* insn.
12083         (rs6000_elf_declare_function_name): If uses_TOC returned 2, switch
12084         to the other text partition before emitting LCL label and switch back
12085         after emitting the word after it.
12086
12087 2017-09-07  Richard Biener  <rguenther@suse.de>
12088
12089         * passes.def (pass_split_crit_edges): Remove instance before PRE.
12090         * tree-ssa-pre.c (pass_pre::execute): Instead manually split
12091         critical edges here, after loop init.
12092         (pass_data_pre): Remove PROP_no_crit_edges flags.
12093         * tree-ssa-sccvn.c (vn_reference_lookup_3): Use vn_valueize
12094         for valueization of call args to avoid leaking VN_TOP.
12095         (visit_use): Assert we do not visit default defs.
12096         (init_scc_vn): Use build_decl for VN_TOP to make name nicer.
12097         Use error_mark_node to more easily detect leaking VN_TOP.
12098         All default-defs are varying, not VN_TOP.  Mark them visited.
12099         (run_scc_vn): Make code match comment.
12100
12101 2017-09-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
12102
12103         * config/rs6000/rs6000-cpus.def (OTHER_VSX_VECTOR_MASKS): Delete
12104         OPTION_MASK_FLOAT128_KEYWORD.
12105         (POWERPC_MASKS): Likewise.
12106         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Delete
12107         support for the -mfloat128-type option, and make -mfloat128
12108         default on PowerPC Linux systems.  Define or undefine
12109         __FLOAT128__ and  __FLOAT128_HARDWARE__ for the current options.
12110         Define __float128 to be __ieee128 if IEEE 128-bit support is
12111         enabled, or undefine it.
12112         (rs6000_cpu_cpp_builtins): Delete defining __FLOAT128__ here.
12113         Delete defining __FLOAT128_TYPE__.
12114         * config/rs6000/rs6000.opt (x_TARGET_FLOAT128_TYPE): Delete the
12115         -mfloat128-type option and make -mfloat128 default on PowerPC
12116         Linux systems.
12117         (TARGET_FLOAT128_TYPE): Likewise.
12118         (-mfloat128-type): Likewise.
12119         * config/rs6000/rs6000.c (rs6000_option_override_internal):
12120         Delete the -mfloat128-type option and make -mfloat128 default on
12121         PowerPC Linux systems.  Always use __ieee128 to be the keyword for
12122         the IEEE 128-bit type, and map __float128 to __ieee128 if IEEE
12123         128-bit floating point is enabled.  Change tests from using
12124         -mfloat128-type to -mfloat128.
12125         (rs6000_mangle_type): Use the correct mangling for the __float128
12126         type even if normal long double is restricted to 64-bits.
12127         (floatn_mode): Enable the _Float128 type by default on VSX Linux
12128         systems.
12129         * config/rs6000/rs6000.h (MASK_FLOAT128_TYPE): Delete.
12130         (MASK_FLOAT128_KEYWORD): Define new shortcut macro.
12131         (RS6000BTM_FLOAT128): Define in terms of -mfloat128, not
12132         -mfloat128-type.
12133         * doc/invoke.texi (RS/6000 and PowerPC Options): Update
12134         documentation for -mfloat128.
12135
12136 2017-09-06  Olivier Hainque  <hainque@adacore.com>
12137
12138         * config.gcc (powerpc-wrs-vxworksspe): Now match as vxworks*spe.
12139
12140 2017-09-06  Wish Wu  <wishwu007@gmail.com>
12141             Jakub Jelinek  <jakub@redhat.com>
12142
12143         * asan.c (initialize_sanitizer_builtins): Add
12144         BT_FN_VOID_UINT8_UINT8, BT_FN_VOID_UINT16_UINT16,
12145         BT_FN_VOID_UINT32_UINT32, BT_FN_VOID_UINT64_UINT64,
12146         BT_FN_VOID_FLOAT_FLOAT, BT_FN_VOID_DOUBLE_DOUBLE and
12147         BT_FN_VOID_UINT64_PTR variables.
12148         * builtin-types.def (BT_FN_VOID_UINT8_UINT8): New fn type.
12149         (BT_FN_VOID_UINT16_UINT16): Likewise.
12150         (BT_FN_VOID_UINT32_UINT32): Likewise.
12151         (BT_FN_VOID_FLOAT_FLOAT): Likewise.
12152         (BT_FN_VOID_DOUBLE_DOUBLE): Likewise.
12153         (BT_FN_VOID_UINT64_PTR): Likewise.
12154         * common.opt (flag_sanitize_coverage): New variable.
12155         (fsanitize-coverage=trace-pc): Remove.
12156         (fsanitize-coverage=): Add.
12157         * flag-types.h (enum sanitize_coverage_code): New enum.
12158         * fold-const.c (fold_range_test): Disable non-short-circuit
12159         optimization if flag_sanitize_coverage.
12160         (fold_truth_andor): Likewise.
12161         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
12162         * opts.c (COVERAGE_SANITIZER_OPT): Define.
12163         (coverage_sanitizer_opts): New array.
12164         (get_closest_sanitizer_option): Add OPTS argument, handle also
12165         OPT_fsanitize_coverage_.
12166         (parse_sanitizer_options): Adjusted to also handle
12167         OPT_fsanitize_coverage_.
12168         (common_handle_option): Add OPT_fsanitize_coverage_.
12169         * sancov.c (instrument_comparison, instrument_switch): New function.
12170         (sancov_pass): Add trace-cmp support.
12171         * sanitizer.def (BUILT_IN_SANITIZER_COV_TRACE_CMP1,
12172         BUILT_IN_SANITIZER_COV_TRACE_CMP2, BUILT_IN_SANITIZER_COV_TRACE_CMP4,
12173         BUILT_IN_SANITIZER_COV_TRACE_CMP8,
12174         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP1,
12175         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP2,
12176         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP4,
12177         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP8,
12178         BUILT_IN_SANITIZER_COV_TRACE_CMPF, BUILT_IN_SANITIZER_COV_TRACE_CMPD,
12179         BUILT_IN_SANITIZER_COV_TRACE_SWITCH): New builtins.
12180         * doc/invoke.texi: Document -fsanitize-coverage=trace-cmp.
12181
12182 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
12183
12184         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
12185         error.  Only quit immediately if parsing is complete.
12186         (BEGIN): Initialize fatal_err and parse_done.
12187         (begin fpu, end fpu): Check number of arguments.
12188         (begin arch, end arch): Likewise.
12189         (begin cpu, end cpu): Likewise.
12190         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
12191         (optalias): Likewise.
12192
12193 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
12194
12195         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
12196         * config/arm/arm-isa.h: Delete.  Move definitions to ...
12197         * arm-cpus.in: ... here.  Use new feature and fgroup values.
12198         * config/arm/arm.c (arm_option_override): Use lower case for feature
12199         bit names.
12200         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
12201         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
12202         * config/arm/parsecpu.awk (END): Add new command 'isa'.
12203         (isa_pfx): Delete.
12204         (print_isa_bits_for): New function.
12205         (gen_isa): New function.
12206         (gen_comm_data): Use print_isa_bits_for.
12207         (define feature): New keyword.
12208         (define fgroup): New keyword.
12209         * config/arm/t-arm (OPTIONS_H_EXTRA): Add arm-isa.h
12210         (arm-isa.h): Add rule to generate file.
12211         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
12212         case for feature bit names.
12213
12214 2017-09-06  Richard Biener  <rguenther@suse.de>
12215
12216         * tree-ssa-pre.c (NECESSARY): Remove.
12217         (create_expression_by_pieces): Do not touch pass-local flags.
12218         (insert_into_preds_of_block): Likewise.
12219         (do_pre_regular_insertion): Likewise.
12220         (eliminate_insert): Likewise.
12221         (eliminate_dom_walker::before_dom_children): Likewise.
12222         (fini_eliminate): Do not look at inserted_exprs.
12223         (mark_operand_necessary): Remove.
12224         (remove_dead_inserted_code): Replace with simple work-list
12225         algorithm based on inserted_exprs and SSA uses.
12226         (pass_pre::execute): Re-order fini_eliminate and
12227         remove_dead_inserted_code.
12228
12229 2017-09-06  Olivier Hainque  <hainque@adacore.com>
12230
12231         * config/powerpcspe/vxworks.h (VXCPU_FOR_8548): Correct definition
12232         for VxWorks 7.  Adjust surrounding comments.
12233
12234 2017-09-06  Richard Biener  <rguenther@suse.de>
12235
12236         * gimple-ssa-strength-reduction.c
12237         (find_candidates_dom_walker::before_dom_children): Also allow
12238         pointer types.
12239
12240 2017-09-06  Richard Biener  <rguenther@suse.de>
12241
12242         PR tree-optimization/82108
12243         * tree-vect-stmts.c (vectorizable_load): Fix pointer adjustment
12244         for gap in the non-permutation SLP case.
12245
12246 2017-09-06  Martin Jambor  <mjambor@suse.cz>
12247
12248         PR tree-optimization/82078
12249         * tree-sra.c (sort_and_splice_var_accesses): Move call to
12250         add_access_to_work_queue...
12251         (build_accesses_from_assign): ...here.
12252         (propagate_all_subaccesses): Make sure racc is the group
12253         representative, if there is one.
12254
12255 2017-09-06  Jakub Jelinek  <jakub@redhat.com>
12256
12257         PR middle-end/82095
12258         * varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars with
12259         NULL DECL_INITIAL.
12260
12261 2017-09-06  Richard Biener  <rguenther@suse.de>
12262
12263         * gimple-ssa-strength-reduction.c
12264         (find_candidates_dom_walker::before_doom_children): Use a
12265         type and not a mode check.
12266
12267 2017-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12268
12269         PR target/77308
12270         * config/arm/predicates.md (arm_general_adddi_operand): Create new
12271         non-vfp predicate.
12272         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Use new predicates.
12273
12274 2017-09-05  Jeff Law  <law@redhat.com>
12275
12276         PR tree-optimization/64910
12277         * tree-ssa-reassoc.c (reassociate_bb): Restrict last change to
12278         cases where we have 3 or more operands.
12279
12280 2017-09-05  Jakub Jelinek  <jakub@redhat.com>
12281
12282         PR middle-end/81768
12283         * omp-low.c (lower_omp_for): Recompute tree invariant if
12284         gimple_omp_for_initial/final is ADDR_EXPR.
12285
12286         PR middle-end/81768
12287         * omp-expand.c (expand_omp_simd): Force second operands of COND_EXPR
12288         into gimple val before gimplification fo the COND_EXPR.
12289
12290 2017-09-05  Aldy Hernandez  <aldyh@redhat.com>
12291
12292         * tree-ssa-threadupdate.c (duplicate_thread_path): Remove unused
12293         REGION_COPY argument.
12294         (thread_through_all_blocks): Remove unused argument to
12295         duplicate_thread_path.
12296
12297 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
12298             Alan Hayward  <alan.hayward@arm.com>
12299             David Sherwood  <david.sherwood@arm.com>
12300
12301         * config/aarch64/aarch64-protos.h (aarch64_gen_adjusted_ldpstp):
12302         Take a scalar_mode rather than a machine_mode.
12303         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
12304         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Likewise.
12305         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
12306         (aarch64_gen_adjusted_ldpstp): Likewise.
12307         (aarch64_expand_vector_init): Use scalar_mode instead of machine_mode.
12308
12309 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
12310             Alan Hayward  <alan.hayward@arm.com>
12311             David Sherwood  <david.sherwood@arm.com>
12312
12313         * config/aarch64/aarch64-protos.h (aarch64_is_extend_from_extract):
12314         Take a scalar_int_mode instead of a machine_mode.
12315         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
12316         (aarch64_output_scalar_simd_mov_immediate): Likewise.
12317         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
12318         (aarch64_simd_attr_length_rglist): Delete.
12319         * config/aarch64/aarch64.c (aarch64_is_extend_from_extract): Take
12320         a scalar_int_mode instead of a machine_mode.
12321         (aarch64_add_offset): Likewise.
12322         (aarch64_internal_mov_immediate): Likewise
12323         (aarch64_add_constant_internal): Likewise.
12324         (aarch64_add_constant): Likewise.
12325         (aarch64_movw_imm): Likewise.
12326         (aarch64_rtx_arith_op_extract_p): Likewise.
12327         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
12328         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
12329         Remove assert that the mode isn't a vector.
12330         (aarch64_output_scalar_simd_mov_immediate): Likewise.
12331         (aarch64_expand_mov_immediate): Update calls after above changes.
12332         (aarch64_output_casesi): Use as_a <scalar_int_mode>.
12333         (aarch64_and_bitmask_imm): Check for scalar integer modes.
12334         (aarch64_move_imm): Likewise.
12335         (aarch64_can_const_movi_rtx_p): Likewise.
12336         (aarch64_strip_extend): Likewise.
12337         (aarch64_extr_rtx_p): Likewise.
12338         (aarch64_rtx_costs): Likewise, using wode_mode as the mode of
12339         a CONST_INT when the mode parameter is VOIDmode.
12340         (aarch64_float_const_rtx_p): Use scalar_int_mode for a temporary.
12341
12342 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
12343
12344         * machmode.h (bitwise_mode_for_mode): Return opt_mode.
12345         * stor-layout.c (bitwise_mode_for_mode): Likewise.
12346         (bitwise_type_for_mode): Update accordingly.
12347
12348 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
12349
12350         * stor-layout.h (mode_for_size_tree): Return an opt_mode.
12351         * stor-layout.c (mode_for_size_tree): Likewise.
12352         (mode_for_array): Update accordingly.
12353         (layout_decl): Likewise.
12354         (compute_record_mode): Likewise.  Only set the mode once.
12355
12356 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
12357
12358         * target.def (get_mask_mode): Change return type to opt_mode.
12359         Expand commentary.
12360         * doc/tm.texi: Regenerate.
12361         * targhooks.h (default_get_mask_mode): Return an opt_mode.
12362         * targhooks.c (default_get_mask_mode): Likewise.
12363         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
12364         * optabs-query.c (can_vec_mask_load_store_p): Update use of
12365         targetm.get_mask_mode.
12366         * tree.c (build_truth_vector_type): Likewise.
12367
12368 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
12369
12370         * machmode.h (mode_for_vector): Return an opt_mode.
12371         * stor-layout.c (mode_for_vector): Likewise.
12372         (mode_for_int_vector): Update accordingly.
12373         (layout_type): Likewise.
12374         * config/i386/i386.c (emit_memmov): Likewise.
12375         (ix86_expand_set_or_movmem): Likewise.
12376         (ix86_expand_vector_init): Likewise.
12377         (ix86_get_mask_mode): Likewise.
12378         * config/powerpcspe/powerpcspe.c (rs6000_expand_vec_perm_const_1):
12379         Likewise.
12380         * config/rs6000/rs6000.c (rs6000_expand_vec_perm_const_1): Likewise.
12381         * expmed.c (extract_bit_field_1): Likewise.
12382         * expr.c (expand_expr_real_2): Likewise.
12383         * optabs-query.c (can_vec_perm_p): Likewise.
12384         (can_vec_mask_load_store_p): Likewise.
12385         * optabs.c (expand_vec_perm): Likewise.
12386         * targhooks.c (default_get_mask_mode): Likewise.
12387         * tree-vect-stmts.c (vectorizable_store): Likewise.
12388         (vectorizable_load): Likewise.
12389         (get_vectype_for_scalar_type_and_size): Likewise.
12390
12391 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
12392
12393         * machmode.h (mode_for_int_vector): New function.
12394         * stor-layout.c (mode_for_int_vector): Likewise.
12395         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Use it.
12396         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Likewise.
12397         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
12398         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
12399         (s390_expand_vcond): Likewise.
12400
12401 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
12402
12403         * machmode.h (opt_machine_mode): New type.
12404         (opt_mode<T>): Allow construction from anything that can be
12405         converted to a T.
12406         (is_a, as_a, dyn_cast): Add overloads for opt_mode.
12407         (mode_for_size): Return an opt_machine_mode.
12408         * stor-layout.c (mode_for_size): Likewise.
12409         (mode_for_size_tree): Update call accordingly.
12410         (bitwise_mode_for_mode): Likewise.
12411         (make_fract_type): Likewise.
12412         (make_accum_type): Likewise.
12413         * caller-save.c (replace_reg_with_saved_mem): Update call
12414         accordingly.
12415         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
12416         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
12417         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
12418         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
12419         * expmed.c (extract_bit_field_1): Likewise.
12420         * reload.c (get_secondary_mem): Likewise.
12421         * varasm.c (assemble_integer): Likewise.
12422         * lower-subreg.c (simplify_subreg_concatn): Likewise.  Move
12423         early-out.
12424
12425 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
12426
12427         * machmode.h (decimal_float_mode_for_size): New function.
12428         * real.h (REAL_VALUE_TO_TARGET_LONG_DOUBLE): Use float_mode_for_size.
12429         (REAL_VALUE_TO_TARGET_DOUBLE): Likewise.
12430         (REAL_VALUE_TO_TARGET_SINGLE): Likewise.
12431         (REAL_VALUE_TO_TARGET_DECIMAL128): Use decimal_float_mode_for_size.
12432         (REAL_VALUE_TO_TARGET_DECIMAL64): Likewise.
12433         (REAL_VALUE_TO_TARGET_DECIMAL32): Likewise.
12434
12435 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
12436
12437         * builtins.c (expand_builtin_powi): Use int_mode_for_size.
12438         (get_builtin_sync_mode): Likewise.
12439         (expand_ifn_atomic_compare_exchange): Likewise.
12440         (expand_builtin_atomic_clear): Likewise.
12441         (expand_builtin_atomic_test_and_set): Likewise.
12442         (fold_builtin_atomic_always_lock_free): Likewise.
12443         * calls.c (compute_argument_addresses): Likewise.
12444         (emit_library_call_value_1): Likewise.
12445         (store_one_arg): Likewise.
12446         * combine.c (combine_instructions): Likewise.
12447         * config/aarch64/aarch64.c (aarch64_function_value): Likewise.
12448         * config/arm/arm.c (arm_function_value): Likewise.
12449         (aapcs_allocate_return_reg): Likewise.
12450         * config/c6x/c6x.c (c6x_expand_movmem): Likewise.
12451         * config/i386/i386.c (construct_container): Likewise.
12452         (ix86_gimplify_va_arg): Likewise.
12453         (ix86_expand_sse_cmp): Likewise.
12454         (emit_memmov): Likewise.
12455         (emit_memset): Likewise.
12456         (expand_small_movmem_or_setmem): Likewise.
12457         (ix86_expand_pextr): Likewise.
12458         (ix86_expand_pinsr): Likewise.
12459         * config/lm32/lm32.c (lm32_block_move_inline): Likewise.
12460         * config/microblaze/microblaze.c (microblaze_block_move_straight):
12461         Likewise.
12462         * config/mips/mips.c (mips_function_value_1) Likewise.
12463         (mips_block_move_straight): Likewise.
12464         (mips_expand_ins_as_unaligned_store): Likewise.
12465         * config/powerpcspe/powerpcspe.c
12466         (rs6000_darwin64_record_arg_advance_flush): Likewise.
12467         (rs6000_darwin64_record_arg_flush): Likewise.
12468         * config/rs6000/rs6000.c
12469         (rs6000_darwin64_record_arg_advance_flush): Likewise.
12470         (rs6000_darwin64_record_arg_flush): Likewise.
12471         * config/sparc/sparc.c (sparc_function_arg_1): Likewise.
12472         (sparc_function_value_1): Likewise.
12473         * config/spu/spu.c (adjust_operand): Likewise.
12474         (spu_emit_branch_or_set): Likewise.
12475         (arith_immediate_p): Likewise.
12476         * emit-rtl.c (gen_lowpart_common): Likewise.
12477         * expr.c (expand_expr_real_1): Likewise.
12478         * function.c (assign_parm_setup_block): Likewise.
12479         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
12480         * reload1.c (alter_reg): Likewise.
12481         * stor-layout.c (mode_for_vector): Likewise.
12482         (layout_type): Likewise.
12483
12484 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
12485
12486         * config/spu/spu.c (exp2_immediate_p): Use int_mode_for_mode.
12487         (spu_convert_move): Likewise.
12488         * lower-subreg.c (resolve_simple_move): Likewise.
12489
12490 2017-09-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12491
12492         PR target/81833
12493         * config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
12494         define_insn to a define_expand.
12495         (altivec_vsum2sws_direct): New define_insn.
12496         (altivec_vsumsws): Convert from a define_insn to a define_expand.
12497
12498 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
12499
12500         * config/arm/arm.c (arm_option_params_internal): Improve setting of
12501         max_insns_skipped.
12502
12503 2017-09-05  H.J. Lu  <hongjiu.lu@intel.com>
12504
12505         PR target/59501
12506         PR target/81624
12507         PR target/81769
12508         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
12509         realign stack if stack alignment needed is less than incoming
12510         stack boundary.
12511
12512 2017-09-05  Marek Polacek  <polacek@redhat.com>
12513
12514         PR sanitizer/82072
12515         * convert.c (convert_to_integer_1) <case NEGATE_EXPR>: Move the ubsan
12516         check earlier.
12517
12518 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
12519
12520         * explow.c (get_dynamic_stack_size): Improve dynamic alignment.
12521
12522 2017-09-05  Richard Biener  <rguenther@suse.de>
12523
12524         PR tree-optimization/82084
12525         * fold-const.c (can_native_encode_string_p): Handle wide characters.
12526
12527 2017-09-05  Richard Biener  <rguenther@suse.de>
12528
12529         PR tree-optimization/82102
12530         * tree-ssa-pre.c (fini_eliminate): Check if lhs is NULL.
12531
12532 2017-09-05  Martin Liska  <mliska@suse.cz>
12533
12534         PR tree-optimization/82032
12535         * tree-cfg.c (generate_range_test): New function.
12536         * tree-cfg.h (generate_range_test): Declared here.
12537         * tree-cfgcleanup.c (convert_single_case_switch): New function.
12538         (cleanup_control_expr_graph): Use it.
12539         * tree-switch-conversion.c (try_switch_expansion): Remove
12540         assert.
12541         (emit_case_nodes): Use generate_range_test.
12542
12543 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
12544
12545         PR target/82098
12546         * config/i386/i386.md (*<btsc><mode>_mask): Add
12547         TARGET_USE_BT to insn constraint.
12548         (*btr<mode>_mask): Ditto.
12549
12550 2017-09-04  Wilco Dijkstra  <wdijkstr@arm.com>
12551
12552         * config/arm/arm.c (arm_legitimate_index_p): Add comment.
12553         (thumb2_legitimate_index_p): Use correct range for DI/DF mode.
12554
12555 2017-09-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12556
12557         PR target/77308
12558         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Split early except for
12559         TARGET_NEON and TARGET_IWMMXT.
12560         (anddi3, iordi3, xordi3, one_cmpldi2): Split while expanding except for
12561         TARGET_NEON and TARGET_IWMMXT.
12562         (*one_cmpldi2_insn): Moved the body of one_cmpldi2 here.
12563
12564 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
12565
12566         * config/i386/i386-protos.h (ix86_tls_address_pattern_p) New prototype.
12567         (ix86_rewrite_tls_address): Ditto.
12568         * config/i386/i386.c (ix86_tls_address_pattern_p) New function.
12569         (ix86_rewrite_tls_address_1): Ditto.
12570         (ix86_rewrite_tls_address): Ditto.
12571         * config/i386/predicates.md (tls_address_pattern): New predicate.
12572         * config/i386/i386.md (TLS address splitter): New splitter.
12573
12574 2017-09-04  Richard Biener  <rguenther@suse.de>
12575
12576         PR tree-optimization/82084
12577         * fold-const.h (can_native_encode_string_p): Declare.
12578         * fold-const.c (can_native_encode_string_p): Factor out from ...
12579         (native_encode_string): ... here.
12580         * tree-vect-stmts.c (vectorizable_store): Call it to avoid
12581         vectorizing stores from constants we later cannot handle.
12582
12583 2017-09-04  Marek Polacek  <polacek@redhat.com>
12584
12585         PR c/81783
12586         * doc/invoke.texi: Update -Wtautological-compare documentation.
12587
12588 2017-09-04  Jeff Law  <law@redhat.com>
12589
12590         PR tree-optimization/64910
12591         * tree-ssa-reassoc.c (reassociate_bb): For bitwise binary ops,
12592         swap the first and last operand if the last is a constant.
12593
12594 2017-09-04  Marek Polacek  <polacek@redhat.com>
12595
12596         PR sanitizer/82072
12597         * convert.c (do_narrow): When sanitizing signed integer overflows,
12598         bail out for signed types.
12599         (convert_to_integer_1) <case NEGATE_EXPR>: Likewise.
12600
12601 2017-09-04  Richard Biener  <rguenther@suse.de>
12602
12603         PR tree-optimization/82060
12604         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
12605         Move devirtualization after stmt folding and before EH/AB/noreturn
12606         cleanup to get the stmt refs canonicalized.  Use a bool instead
12607         of gimple_modified_p since that doesn't work for NOPs.  Schedule
12608         NOPs generated by folding for removal.
12609
12610 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
12611             Alan Hayward  <alan.hayward@arm.com>
12612             David Sherwood  <david.sherwood@arm.com>
12613
12614         * coretypes.h (pad_direction): New enum.
12615         * defaults.h (DEFAULT_FUNCTION_ARG_PADDING): Delete.
12616         (FUNCTION_ARG_PADDING): Likewise.
12617         * target.def (function_arg_padding): New hook.
12618         * targhooks.h (default_function_arg_padding): Declare.
12619         * targhooks.c (default_function_arg_padding): New function.
12620         * doc/tm.texi.in (FUNCTION_ARG_PADDING): Replace with...
12621         (TARGET_FUNCTION_ARG_PADDING): ...this.
12622         * doc/tm.texi: Regenerate.
12623         * calls.c (store_unaligned_arguments_into_pseudos): Use pad_direction
12624         instead of direction.
12625         (compute_argument_addresses): Likewise.
12626         (load_register_parameters): Likewise.
12627         (emit_library_call_value_1): Likewise.
12628         (store_one_arg): Use targetm.calls.function_arg_padding instead
12629         of FUNCTION_ARG_PADDING.
12630         (must_pass_in_stack_var_size_or_pad): Likewise.
12631         * expr.c (emit_group_load_1): Use pad_direction instead of direction.
12632         (emit_group_store): Likewise.
12633         (emit_single_push_insn_1): Use targetm.calls.function_arg_padding
12634         instead of FUNCTION_ARG_PADDING.
12635         (emit_push_insn): Likewise, and propagate enum change throughout
12636         function.
12637         * function.h (direction): Delete.
12638         (locate_and_pad_arg_data::where_pad): Use pad_direction instead
12639         of direction.
12640         * function.c (assign_parm_find_stack_rtl): Likewise.
12641         (assign_parm_setup_block_p): Likewise.
12642         (assign_parm_setup_block): Likewise.
12643         (gimplify_parameters): Likewise.
12644         (locate_and_pad_parm): Use targetm.calls.function_arg_padding
12645         instead of FUNCTION_ARG_PADDING, and propagate enum change throughout
12646         function.
12647         * config/aarch64/aarch64.h (FUNCTION_ARG_PADDING): Delete.
12648         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
12649         * config/aarch64/aarch64-protos.h (aarch64_pad_arg_upward): Delete.
12650         * config/aarch64/aarch64.c (aarch64_pad_arg_upward): Replace with...
12651         (aarch64_function_arg_padding): ...this new function.
12652         (aarch64_gimplify_va_arg_expr): Use pad_direction instead of direction.
12653         (TARGET_FUNCTION_ARG_PADDING): Redefine.
12654         * config/arm/arm.h (FUNCTION_ARG_PADDING): Delete.
12655         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
12656         * config/arm/arm-protos.h (arm_pad_arg_upward): Delete.
12657         * config/arm/arm.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
12658         (arm_pad_arg_upward): Replace with...
12659         (arm_function_arg_padding): ...this new function.
12660         * config/c6x/c6x.h (BLOCK_REG_PADDING): Use pad_direction instead
12661         of direction.
12662         * config/ia64/hpux.h (FUNCTION_ARG_PADDING): Delete.
12663         * config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): Delete.
12664         * config/ia64/ia64.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
12665         (ia64_hpux_function_arg_padding): Replace with...
12666         (ia64_function_arg_padding): ...this new function.  Use pad_direction
12667         instead of direction.  Check for TARGET_HPUX.
12668         * config/iq2000/iq2000.h (FUNCTION_ARG_PADDING): Delete.
12669         * config/iq2000/iq2000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
12670         (iq2000_function_arg_padding): New function.
12671         * config/mips/mips-protos.h (mips_pad_arg_upward): Delete.
12672         * config/mips/mips.c (mips_pad_arg_upward): Replace with...
12673         (mips_function_arg_padding): ...this new function.
12674         (mips_pad_reg_upward): Update accordingly.
12675         (TARGET_FUNCTION_ARG_PADDING): Redefine.
12676         * config/mips/mips.h (PAD_VARARGS_DOWN): Use
12677         targetm.calls.function_arg_padding.
12678         (FUNCTION_ARG_PADDING): Delete.
12679         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
12680         * config/nios2/nios2.h (FUNCTION_ARG_PADDING): Delete.
12681         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
12682         * config/nios2/nios2-protos.h (nios2_function_arg_padding): Delete.
12683         (nios2_block_reg_padding): Return pad_direction instead of direction.
12684         * config/nios2/nios2.c (nios2_block_reg_padding): Return pad_direction
12685         instead of direction.
12686         (nios2_function_arg_padding): Likewise.  Make static.
12687         (TARGET_FUNCTION_ARG_PADDING): Redefine.
12688         * config/pa/pa.h (FUNCTION_ARG_PADDING): Delete.
12689         (BLOCK_REG_PADDING): Use targetm.calls.function_arg_padding.
12690         * config/pa/pa-protos.h (pa_function_arg_padding): Delete.
12691         * config/pa/pa.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
12692         (pa_function_arg_padding): Make static.  Return pad_direction instead
12693         of direction.
12694         * config/powerpcspe/powerpcspe.h (FUNCTION_ARG_PADDING): Delete.
12695         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
12696         * config/powerpcspe/aix.h (BLOCK_REG_PADDING): Use pad_direction
12697         instead of direction.  Use targetm.calls.function_arg_padding.
12698         * config/powerpcspe/darwin.h (BLOCK_REG_PADDING): Likewise.
12699         * config/powerpcspe/freebsd64.h (BLOCK_REG_PADDING): Likewise.
12700         * config/powerpcspe/linux64.h (BLOCK_REG_PADDING): Likewise.
12701         * config/powerpcspe/powerpcspe-protos.h (function_arg_padding): Delete.
12702         * config/powerpcspe/powerpcspe.c (TARGET_FUNCTION_ARG_PADDING):
12703         Redefine.
12704         (function_arg_padding): Rename to...
12705         (rs6000_function_arg_padding): ...this.  Make static.  Return
12706         pad_direction instead of direction.
12707         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
12708         * config/rs6000/rs6000.h (FUNCTION_ARG_PADDING): Delete.
12709         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
12710         * config/rs6000/aix.h (BLOCK_REG_PADDING): Use pad_direction
12711         instead of direction.  Use targetm.calls.function_arg_padding.
12712         * config/rs6000/darwin.h (BLOCK_REG_PADDING): Likewise.
12713         * config/rs6000/freebsd64.h (BLOCK_REG_PADDING): Likewise.
12714         * config/rs6000/linux64.h (BLOCK_REG_PADDING): Likewise.
12715         * config/rs6000/rs6000-protos.h (function_arg_padding): Delete.
12716         * config/rs6000/rs6000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
12717         (function_arg_padding): Rename to...
12718         (rs6000_function_arg_padding): ...this.  Make static.  Return
12719         pad_direction instead of direction.
12720         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
12721         * config/s390/s390.h (FUNCTION_ARG_PADDING): Delete.
12722         * config/s390/s390.c (s390_function_arg_padding): New function.
12723         (TARGET_FUNCTION_ARG_PADDING): Redefine.
12724         * config/sparc/sparc.h (FUNCTION_ARG_PADDING): Delete.
12725         * config/sparc/sparc-protos.h (function_arg_padding): Delete.
12726         * config/sparc/sparc.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
12727         (function_arg_padding): Rename to...
12728         (sparc_function_arg_padding): ...this.  Make static.  Return
12729         pad_direction instead of direction.
12730         * config/spu/spu.h (FUNCTION_ARG_PADDING): Delete.
12731         * config/spu/spu.c (spu_function_arg_padding): New function.
12732         (TARGET_FUNCTION_ARG_PADDING): Redefine.
12733         * system.h (FUNCTION_ARG_PADDING): Poison.
12734
12735 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
12736             Alan Hayward  <alan.hayward@arm.com>
12737             David Sherwood  <david.sherwood@arm.com>
12738
12739         * target.def (modes_tieable_p): New hook.
12740         * doc/tm.texi (MODES_TIEABLE_P): Replace with...
12741         (TARGET_MODES_TIEABLE_P): ...this.
12742         * doc/tm.texi.in: Regenerate.
12743         * hooks.h (hook_bool_mode_mode_true): Declare.
12744         * hooks.c (hook_bool_mode_mode_true): New function.
12745         * combine.c (subst): Use targetm.modes_tieable_p instead of
12746         MODES_TIEABLE_P.
12747         * dse.c (find_shift_sequence): Likewise.
12748         * expmed.c (extract_low_bits): Likewise.
12749         * lower-subreg.c: Include target.h.
12750         (find_decomposable_subregs): Use targetm.modes_tieable_p instead of
12751         MODES_TIEABLE_P.
12752         * rtlanal.c (rtx_cost): Likewise.
12753         * config/aarch64/aarch64.h (MODES_TIEABLE_P): Delete.
12754         * config/aarch64/aarch64-protos.h (aarch64_modes_tieable_p): Delete.
12755         * config/aarch64/aarch64.c (aarch64_modes_tieable_p): Make static.
12756         (TARGET_MODES_TIEABLE_P): Redefine.
12757         * config/alpha/alpha.h (MODES_TIEABLE_P): Delete.
12758         * config/alpha/alpha.c (alpha_modes_tieable_p): New function.
12759         (TARGET_MODES_TIEABLE_P): Redefine.
12760         * config/arc/arc.h (MODES_TIEABLE_P): Delete.
12761         * config/arc/arc.c (TARGET_MODES_TIEABLE_P): Redefine.
12762         (arc_modes_tieable_p): New function.
12763         * config/arm/arm.h (MODES_TIEABLE_P): Delete.
12764         * config/arm/arm-protos.h (arm_modes_tieable_p): Delete.
12765         * config/arm/arm.c (TARGET_MODES_TIEABLE_P): Redefine.
12766         (arm_modes_tieable_p): Make static.
12767         * config/avr/avr.h (MODES_TIEABLE_P): Delete.
12768         * config/bfin/bfin.h (MODES_TIEABLE_P): Delete.
12769         * config/bfin/bfin.c (bfin_modes_tieable_p): New function.
12770         (TARGET_MODES_TIEABLE_P): Redefine.
12771         * config/c6x/c6x.h (MODES_TIEABLE_P): Delete.
12772         * config/c6x/c6x.c (c6x_modes_tieable_p): New function.
12773         (TARGET_MODES_TIEABLE_P): Redefine.
12774         * config/cr16/cr16.h (MODES_TIEABLE_P): Delete.
12775         * config/cr16/cr16.c (TARGET_MODES_TIEABLE_P): Redefine.
12776         (cr16_modes_tieable_p): New function.
12777         * config/cris/cris.h (MODES_TIEABLE_P): Delete.
12778         * config/epiphany/epiphany.h (MODES_TIEABLE_P): Delete.
12779         * config/fr30/fr30.h (MODES_TIEABLE_P): Delete.
12780         (TRULY_NOOP_TRUNCATION): Update comment.
12781         * config/frv/frv.h (MODES_TIEABLE_P): Delete.
12782         (TRULY_NOOP_TRUNCATION): Update comment.
12783         * config/frv/frv.c (TARGET_MODES_TIEABLE_P): Redefine.
12784         (frv_modes_tieable_p): New function.
12785         * config/ft32/ft32.h (MODES_TIEABLE_P): Delete.
12786         * config/h8300/h8300.h (MODES_TIEABLE_P): Delete.
12787         * config/h8300/h8300.c (h8300_modes_tieable_p): New function.
12788         (TARGET_MODES_TIEABLE_P): Redefine.
12789         * config/i386/i386.h (MODES_TIEABLE_P): Delete.
12790         * config/i386/i386-protos.h (ix86_modes_tieable_p): Delete.
12791         * config/i386/i386.c (ix86_modes_tieable_p): Make static.
12792         (TARGET_MODES_TIEABLE_P): Redefine.
12793         * config/ia64/ia64.h (MODES_TIEABLE_P): Delete.
12794         * config/ia64/ia64.c (TARGET_MODES_TIEABLE_P): Redefine.
12795         (ia64_modes_tieable_p): New function.
12796         * config/iq2000/iq2000.h (MODES_TIEABLE_P): Delete.
12797         * config/iq2000/iq2000.c (TARGET_MODES_TIEABLE_P): Redefine.
12798         (iq2000_modes_tieable_p): New function.
12799         * config/lm32/lm32.h (MODES_TIEABLE_P): Delete.
12800         * config/lm32/lm32.c (TARGET_MODES_TIEABLE_P): Redefine.
12801         (lm32_modes_tieable_p): New function.
12802         * config/m32c/m32c.h (MODES_TIEABLE_P): Delete.
12803         * config/m32c/m32c-protos.h (m32c_modes_tieable_p): Delete.
12804         * config/m32c/m32c.c (m32c_modes_tieable_p): Make static.
12805         (TARGET_MODES_TIEABLE_P): Redefine.
12806         * config/m32r/m32r.h (MODES_TIEABLE_P): Delete.
12807         * config/m32r/m32r.c (TARGET_MODES_TIEABLE_P): Redefine.
12808         (m32r_modes_tieable_p): New function.
12809         * config/m68k/m68k.h (MODES_TIEABLE_P): Delete.
12810         * config/m68k/m68k.c (TARGET_MODES_TIEABLE_P): Redefine.
12811         (m68k_modes_tieable_p): New function.
12812         * config/mcore/mcore.h (MODES_TIEABLE_P): Delete.
12813         * config/mcore/mcore.c (TARGET_MODES_TIEABLE_P): Redefine.
12814         (mcore_modes_tieable_p): New function.
12815         * config/microblaze/microblaze.h (MODES_TIEABLE_P): Delete.
12816         * config/microblaze/microblaze.c (microblaze_modes_tieable_p): New
12817         function.
12818         (TARGET_MODES_TIEABLE_P): Redefine.
12819         * config/mips/mips.h (MODES_TIEABLE_P): Delete.
12820         * config/mips/mips-protos.h (mips_modes_tieable_p): Delete.
12821         * config/mips/mips.c (mips_modes_tieable_p): Make static.
12822         (TARGET_MODES_TIEABLE_P): Redefine.
12823         * config/mmix/mmix.h (MODES_TIEABLE_P): Delete.
12824         * config/mn10300/mn10300.h (MODES_TIEABLE_P): Delete.
12825         * config/mn10300/mn10300-protos.h (mn10300_modes_tieable): Delete.
12826         * config/mn10300/mn10300.c (mn10300_modes_tieable): Rename to...
12827         (mn10300_modes_tieable_p): ...this and make static.
12828         (TARGET_MODES_TIEABLE_P): Redefine.
12829         * config/moxie/moxie.h (MODES_TIEABLE_P): Delete.
12830         * config/msp430/msp430.h (MODES_TIEABLE_P): Delete.
12831         * config/msp430/msp430-protos.h (msp430_modes_tieable_p): Delete.
12832         * config/msp430/msp430.c (TARGET_MODES_TIEABLE_P): Redefine.
12833         (msp430_modes_tieable_p): Make static.
12834         * config/nds32/nds32.h (MODES_TIEABLE_P): Delete.
12835         * config/nds32/nds32.c (nds32_modes_tieable_p): New function.
12836         (TARGET_MODES_TIEABLE_P): Redefine.
12837         * config/nios2/nios2.h (MODES_TIEABLE_P): Delete.
12838         * config/nvptx/nvptx.h (MODES_TIEABLE_P): Delete.
12839         * config/nvptx/nvptx.c (nvptx_modes_tieable_p): New function.
12840         (TARGET_MODES_TIEABLE_P): Redefine.
12841         * config/pa/pa.h (MODES_TIEABLE_P): Delete.
12842         * config/pa/pa-protos.h (pa_modes_tieable_p): Delete.
12843         * config/pa/pa.c (pa_modes_tieable_p): Make static.
12844         (TARGET_MODES_TIEABLE_P): Redefine.
12845         * config/pdp11/pdp11.h (MODES_TIEABLE_P): Delete.
12846         * config/pdp11/pdp11.c (TARGET_MODES_TIEABLE_P): Redefine.
12847         (pdp11_modes_tieable_p): New function.
12848         * config/powerpcspe/powerpcspe.h (MODES_TIEABLE_P): Delete.
12849         * config/powerpcspe/powerpcspe.c (TARGET_MODES_TIEABLE_P): Redefine.
12850         (rs6000_modes_tieable_p): New function.
12851         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
12852         * config/powerpcspe/powerpcspe.md: Update comment.
12853         * config/riscv/riscv.h (MODES_TIEABLE_P): Delete.
12854         * config/riscv/riscv.c (riscv_modes_tieable_p): New function.
12855         (TARGET_MODES_TIEABLE_P): Redefine.
12856         * config/rl78/rl78.h (MODES_TIEABLE_P): Delete.
12857         * config/rl78/rl78.c (TARGET_MODES_TIEABLE_P): Redefine.
12858         (rl78_modes_tieable_p): New function.
12859         * config/rs6000/rs6000.h (MODES_TIEABLE_P): Delete.
12860         * config/rs6000/rs6000.c (TARGET_MODES_TIEABLE_P): Redefine.
12861         (rs6000_modes_tieable_p): New function.
12862         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
12863         * config/rs6000/rs6000.md: Update comment.
12864         * config/rx/rx.h (MODES_TIEABLE_P): Delete.
12865         * config/rx/rx.c (rx_modes_tieable_p): New function.
12866         (TARGET_MODES_TIEABLE_P): Redefine.
12867         * config/s390/s390.h (MODES_TIEABLE_P): Delete.
12868         * config/s390/s390.c (s390_modes_tieable_p): New function.
12869         (TARGET_MODES_TIEABLE_P): Redefine.
12870         * config/sh/sh.h (MODES_TIEABLE_P): Delete.
12871         * config/sh/sh.c (TARGET_MODES_TIEABLE_P): Redefine.
12872         (sh_modes_tieable_p): New function.
12873         * config/sparc/sparc.h (MODES_TIEABLE_P): Delete.
12874         * config/sparc/sparc-protos.h (sparc_modes_tieable_p): Delete.
12875         * config/sparc/sparc.c (TARGET_MODES_TIEABLE_P): Redefine.
12876         (sparc_modes_tieable_p): Make static.
12877         * config/spu/spu.h (MODES_TIEABLE_P): Delete.
12878         * config/spu/spu.c (spu_modes_tieable_p): New function.
12879         (TARGET_MODES_TIEABLE_P): Redefine.
12880         * config/stormy16/stormy16.h (MODES_TIEABLE_P): Delete.
12881         * config/stormy16/stormy16.c (xstormy16_modes_tieable_p): New function.
12882         (TARGET_MODES_TIEABLE_P): Redefine.
12883         * config/tilegx/tilegx.h (MODES_TIEABLE_P): Delete.
12884         * config/tilepro/tilepro.h (MODES_TIEABLE_P): Delete.
12885         * config/v850/v850.h (MODES_TIEABLE_P): Delete.
12886         * config/v850/v850.c (v850_modes_tieable_p): New function.
12887         (TARGET_MODES_TIEABLE_P): Redefine.
12888         * config/vax/vax.h (MODES_TIEABLE_P): Delete.
12889         * config/visium/visium.h (MODES_TIEABLE_P): Delete.
12890         * config/visium/visium.c (TARGET_MODES_TIEABLE_P): Redefine.
12891         (visium_modes_tieable_p): New function.
12892         * config/xtensa/xtensa.h (MODES_TIEABLE_P): Delete.
12893         * config/xtensa/xtensa.c (TARGET_MODES_TIEABLE_P): Redefine.
12894         (xtensa_modes_tieable_p): New function.
12895         * system.h (MODES_TIEABLE_P): Poison.
12896
12897 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
12898             Alan Hayward  <alan.hayward@arm.com>
12899             David Sherwood  <david.sherwood@arm.com>
12900
12901         * target.def (hard_regno_mode_ok): New hook.
12902         * doc/tm.texi (HARD_REGNO_MODE_OK): Replace with...
12903         (TARGET_HARD_REGNO_MODE_OK): ...this.
12904         * doc/tm.texi.in: Regenerate.
12905         * hooks.h (hook_bool_uint_mode_true): Declare.
12906         * hooks.c (hook_bool_uint_mode_true): New function.
12907         * doc/md.texi: Refer to targetm.hard_regno_mode_ok instead of
12908         HARD_REGNO_MODE_OK.
12909         * genpreds.c (write_insn_preds_c): Add an include of target.h.
12910         * alias.c (init_alias_target): Use targetm.hard_regno_mode_ok
12911         instead of HARD_REGNO_MODE_OK.
12912         * caller-save.c: Include target.h.
12913         (reg_save_code): Use targetm.hard_regno_mode_ok instead of
12914         HARD_REGNO_MODE_OK.
12915         * combine.c (can_combine_p): Likewise.
12916         (combinable_i3pat): Likewise.
12917         (can_change_dest_mode): Likewise.
12918         * expr.c (init_expr_target): Likewise.
12919         (convert_move): Likewise.
12920         (convert_modes): Likewise.
12921         * ira.c (setup_prohibited_class_mode_regs): Likewise.
12922         (setup_prohibited_mode_move_regs): Likewise.
12923         * ira.h (target_ira): Likewise.
12924         * lra-assigns.c (find_hard_regno_for_1): Likewise.
12925         * lra-constraints.c (process_alt_operands): Likewise.
12926         (split_reg): Likewise.
12927         * recog.c (peep2_find_free_register): Likewise.
12928         * ree.c (combine_reaching_defs): Likewise.
12929         * regcprop.c (maybe_mode_change): Likewise.
12930         * reginfo.c (init_reg_sets_1): Likewise.
12931         (choose_hard_reg_mode): Likewise.
12932         (simplifiable_subregs): Likewise.
12933         * regrename.c (check_new_reg_p): Likewise.
12934         * reload.c (find_valid_class): Likewise.
12935         (find_valid_class_1): Likewise.
12936         (reload_inner_reg_of_subreg): Likewise.
12937         (push_reload): Likewise.
12938         (combine_reloads): Likewise.
12939         (find_dummy_reload): Likewise.
12940         (find_reloads): Likewise.
12941         * reload1.c (find_reg): Likewise.
12942         (set_reload_reg): Likewise.
12943         (allocate_reload_reg): Likewise.
12944         (choose_reload_regs): Likewise.
12945         (reload_adjust_reg_for_temp): Likewise.
12946         * rtlanal.c (subreg_size_offset_from_lsb): Likewise.
12947         (simplify_subreg_regno): Likewise.
12948         * sel-sched.c (init_regs_for_mode): Likewise.
12949         * varasm.c (make_decl_rtl): Likewise.
12950         * config/aarch64/aarch64.h (HARD_REGNO_MODE_OK): Delete.
12951         (MODES_TIEABLE_P): Use targetm.hard_regno_mode_ok instead of
12952         HARD_REGNO_MODE_OK.
12953         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_mode_ok): Delete.
12954         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Make static.
12955         (TARGET_HARD_REGNO_MODE_OK): Redefine.
12956         * config/alpha/alpha.h (HARD_REGNO_MODE_OK): Delete.
12957         * config/alpha/alpha.c (alpha_hard_regno_mode_ok): New function.
12958         (TARGET_HARD_REGNO_MODE_OK): Redefine.
12959         * config/arc/arc.h (arc_hard_regno_mode_ok): Delete.
12960         (arc_mode_class): Delete.
12961         (HARD_REGNO_MODE_OK): Delete.
12962         * config/arc/arc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12963         (arc_hard_regno_mode_ok): Rename old array to...
12964         (arc_hard_regno_mode_ok_modes): ...this.
12965         (arc_conditional_register_usage): Update accordingly.
12966         (arc_mode_class): Make static.
12967         (arc_hard_regno_mode_ok): New function.
12968         * config/arm/arm.h (HARD_REGNO_MODE_OK): Delete.
12969         * config/arm/arm-protos.h (arm_hard_regno_mode_ok): Delete.
12970         * config/arm/arm.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12971         (arm_hard_regno_mode_ok): Make static.
12972         * config/arm/arm.md (movdi): Use targetm.hard_regno_mode_ok instead of
12973         HARD_REGNO_MODE_OK.
12974         * config/avr/avr-protos.h (avr_hard_regno_mode_ok): Delete.
12975         * config/avr/avr.h (HARD_REGNO_MODE_OK): Delete.
12976         * config/avr/avr.c (avr_hard_regno_mode_ok): Make static and
12977         return a bool.
12978         (TARGET_HARD_REGNO_MODE_OK): Redefine.
12979         * config/bfin/bfin-protos.h (hard_regno_mode_ok): Delete.
12980         * config/bfin/bfin.h (HARD_REGNO_MODE_OK): Delete.
12981         * config/bfin/bfin.c (hard_regno_mode_ok): Rename to...
12982         (bfin_hard_regno_mode_ok): ...this.  Make static and return a bool.
12983         (TARGET_HARD_REGNO_MODE_OK): Redefine.
12984         * config/bfin/predicates.md (valid_reg_operand): Use
12985         targetm.hard_regno_mode_ok instead of HARD_REGNO_MODE_OK.
12986         * config/c6x/c6x.h (HARD_REGNO_MODE_OK): Delete.
12987         * config/c6x/c6x.c (c6x_hard_regno_mode_ok): New function.
12988         (TARGET_HARD_REGNO_MODE_OK): Redefine.
12989         * config/cr16/cr16.h (HARD_REGNO_MODE_OK): Delete.
12990         * config/cr16/cr16-protos.h (cr16_hard_regno_mode_ok): Delete.
12991         * config/cr16/cr16.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12992         (cr16_hard_regno_mode_ok): Make static and return a bool.
12993         * config/cris/cris.h (HARD_REGNO_MODE_OK): Delete.
12994         * config/cris/cris.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12995         (cris_hard_regno_mode_ok): New function.
12996         * config/epiphany/epiphany.h (epiphany_hard_regno_mode_ok): Delete.
12997         (epiphany_mode_class): Delete.
12998         (HARD_REGNO_MODE_OK): Delete.
12999         * config/epiphany/epiphany-protos.h (hard_regno_mode_ok): Delete.
13000         * config/epiphany/epiphany.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
13001         (hard_regno_mode_ok): Rename to...
13002         (epiphany_hard_regno_mode_ok): ...this.  Make static and return a bool.
13003         * config/fr30/fr30.h (HARD_REGNO_MODE_OK): Delete.
13004         * config/fr30/fr30.md: Refer to targetm.hard_regno_mode_ok instead of
13005         HARD_REGNO_MODE_OK.
13006         * config/frv/frv.h (HARD_REGNO_MODE_OK): Delete.
13007         * config/frv/frv-protos.h (frv_hard_regno_mode_ok): Delete.
13008         * config/frv/frv.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
13009         (frv_hard_regno_mode_ok): Make static and return a bool.
13010         * config/frv/frv.md: Refer to targetm.hard_regno_mode_ok instead of
13011         HARD_REGNO_MODE_OK.
13012         * config/ft32/ft32.h (HARD_REGNO_MODE_OK): Delete.
13013         * config/h8300/h8300.h (HARD_REGNO_MODE_OK): Delete.
13014         * config/h8300/h8300-protos.h (h8300_hard_regno_mode_ok): Delete.
13015         * config/h8300/h8300.c (h8300_hard_regno_mode_ok): Make static
13016         and return a bool.
13017         (TARGET_HARD_REGNO_MODE_OK): Redefine.
13018         * config/i386/i386.h (HARD_REGNO_MODE_OK): Delete.
13019         * config/i386/i386-protos.h (ix86_hard_regno_mode_ok): Delete.
13020         * config/i386/i386.c (ix86_hard_regno_mode_ok): Make static and
13021         return a bool.
13022         (TARGET_HARD_REGNO_MODE_OK): Redefine.
13023         * config/ia64/ia64.h (HARD_REGNO_MODE_OK): Delete.
13024         * config/ia64/ia64.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
13025         (ia64_hard_regno_mode_ok): New function.
13026         * config/iq2000/iq2000.h (HARD_REGNO_MODE_OK): Delete.
13027         * config/iq2000/iq2000.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
13028         (iq2000_hard_regno_mode_ok): New function.
13029         * config/lm32/lm32.h (HARD_REGNO_MODE_OK): Delete.
13030         * config/lm32/lm32.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
13031         (lm32_hard_regno_mode_ok): New function.
13032         * config/m32c/m32c.h (HARD_REGNO_MODE_OK): Delete.
13033         * config/m32c/m32c-protos.h (m32c_hard_regno_ok): Delete.
13034         * config/m32c/m32c.c (class_can_hold_mode): Use m32c_hard_regno_mode_ok
13035         instead of HARD_REGNO_MODE_OK.
13036         (m32c_hard_regno_ok): Rename to...
13037         (m32c_hard_regno_mode_ok): ...this.  Make static and return a bool.
13038         (m32c_cannot_change_mode_class): Update accordingly.
13039         (TARGET_HARD_REGNO_MODE_OK): Redefine.
13040         * config/m32r/m32r.h (m32r_hard_regno_mode_ok): Delete.
13041         (m32r_mode_class): Delete.
13042         (HARD_REGNO_MODE_OK): Delete.
13043         * config/m32r/m32r.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
13044         (m32r_hard_regno_mode_ok): Rename to...
13045         (m32r_hard_regno_modes): ...this.
13046         (m32r_mode_class): Make static.
13047         (m32r_hard_regno_mode_ok): New function.
13048         * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Delete.
13049         * config/m68k/m68k-protos.h (m68k_regno_mode_ok): Delete.
13050         * config/m68k/m68k.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
13051         (m68k_hard_regno_mode_ok): Make static.
13052         * config/mcore/mcore.h (HARD_REGNO_MODE_OK): Delete.
13053         * config/mcore/mcore.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
13054         (mcore_hard_regno_mode_ok): New function.
13055         * config/microblaze/microblaze.h (microblaze_hard_regno_mode_ok)
13056         (HARD_REGNO_MODE_OK): Delete.
13057         * config/microblaze/microblaze.c (microblaze_hard_regno_mode_ok):
13058         Rename to...
13059         (microblaze_hard_regno_mode_ok_p): ...this and make static.
13060         (microblaze_hard_regno_mode_ok): New function.
13061         (TARGET_HARD_REGNO_MODE_OK): Redefine.
13062         * config/mips/mips.h (HARD_REGNO_MODE_OK): Delete.
13063         (mips_hard_regno_mode_ok): Delete.
13064         * config/mips/mips.c (mips_hard_regno_mode_ok): Rename to...
13065         (mips_hard_regno_mode_ok_p): ...this and make static.
13066         (mips_hard_regno_mode_ok_p): Rename to...
13067         (mips_hard_regno_mode_ok_uncached): ...this.
13068         (mips_hard_regno_mode_ok): New function.
13069         (mips_class_max_nregs): Use mips_hard_regno_mode_ok instead
13070         of HARD_REGNO_MODE_OK.
13071         (mips_option_override): Update after above name changes.
13072         (TARGET_HARD_REGNO_MODE_OK): Redefine.
13073         * config/mmix/mmix.h (HARD_REGNO_MODE_OK): Delete.
13074         * config/mn10300/mn10300.h (HARD_REGNO_MODE_OK): Delete.
13075         * config/mn10300/mn10300-protos.h (mn10300_hard_regno_mode_ok): Delete.
13076         * config/mn10300/mn10300.c (mn10300_hard_regno_mode_ok): Make static.
13077         (TARGET_HARD_REGNO_MODE_OK): Redefine.
13078         * config/moxie/moxie.h (HARD_REGNO_MODE_OK): Delete.
13079         * config/msp430/msp430.h (HARD_REGNO_MODE_OK): Delete.
13080         * config/msp430/msp430-protos.h (msp430_hard_regno_mode_ok): Delete.
13081         * config/msp430/msp430.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
13082         (msp430_hard_regno_mode_ok): Make static and return a bool.
13083         * config/nds32/nds32.h (HARD_REGNO_MODE_OK): Delete.
13084         * config/nds32/nds32-protos.h (nds32_hard_regno_mode_ok): Delete.
13085         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Make static
13086         and return a bool.
13087         (TARGET_HARD_REGNO_MODE_OK): Redefine.
13088         * config/nios2/nios2.h (HARD_REGNO_MODE_OK): Delete.
13089         * config/nvptx/nvptx.h (HARD_REGNO_MODE_OK): Delete.
13090         * config/pa/pa.h (MODES_TIEABLE_P): Update commentary.
13091         * config/pa/pa32-regs.h (HARD_REGNO_MODE_OK): Rename to...
13092         (PA_HARD_REGNO_MODE_OK): ...this
13093         * config/pa/pa64-regs.h (HARD_REGNO_MODE_OK): Rename to...
13094         (PA_HARD_REGNO_MODE_OK): ...this.
13095         * config/pa/pa.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
13096         (pa_hard_regno_mode_ok): New function.
13097         * config/pdp11/pdp11.h (HARD_REGNO_MODE_OK): Delete.
13098         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
13099         (pdp11_hard_regno_mode_ok): New function.
13100         * config/powerpcspe/powerpcspe.h (HARD_REGNO_MODE_OK): Delete.
13101         * config/powerpcspe/powerpcspe-protos.h (rs6000_hard_regno_mode_ok_p):
13102         Delete.
13103         * config/powerpcspe/powerpcspe.c (rs6000_hard_regno_mode_ok_p):
13104         Make static.
13105         (TARGET_HARD_REGNO_MODE_OK): Redefine.
13106         (rs6000_hard_regno_mode_ok): Rename to...
13107         (rs6000_hard_regno_mode_ok_uncached): ...this.
13108         (rs6000_init_hard_regno_mode_ok): Update accordingly.
13109         (rs6000_hard_regno_mode_ok): New function.
13110         * config/riscv/riscv.h (HARD_REGNO_MODE_OK): Delete.
13111         * config/riscv/riscv-protos.h (riscv_hard_regno_mode_ok_p): Delete.
13112         * config/riscv/riscv.c (riscv_hard_regno_mode_ok_p): Rename to...
13113         (riscv_hard_regno_mode_ok): ...this and make static.
13114         (TARGET_HARD_REGNO_MODE_OK): Redefine.
13115         * config/rl78/rl78.h (HARD_REGNO_MODE_OK): Delete.
13116         * config/rl78/rl78-protos.h (rl78_hard_regno_mode_ok): Delete.
13117         * config/rl78/rl78.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
13118         (rl78_hard_regno_mode_ok): Make static and return bool.
13119         * config/rs6000/rs6000.h (HARD_REGNO_MODE_OK): Delete.
13120         * config/rs6000/rs6000-protos.h (rs6000_hard_regno_mode_ok_p):
13121         Delete.
13122         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok_p): Make static.
13123         (TARGET_HARD_REGNO_MODE_OK): Redefine.
13124         (rs6000_hard_regno_mode_ok): Rename to...
13125         (rs6000_hard_regno_mode_ok_uncached): ...this.
13126         (rs6000_init_hard_regno_mode_ok): Update accordingly.
13127         (rs6000_hard_regno_mode_ok): New function.
13128         * config/rx/rx.h (HARD_REGNO_MODE_OK): Delete.
13129         * config/rx/rx.c (rx_hard_regno_mode_ok): New function.
13130         (TARGET_HARD_REGNO_MODE_OK): Redefine.
13131         * config/s390/s390.h (HARD_REGNO_MODE_OK): Delete.
13132         * config/s390/s390-protos.h (s390_hard_regno_mode_ok): Delete.
13133         * config/s390/s390.c (s390_hard_regno_mode_ok): Make static.
13134         (TARGET_HARD_REGNO_MODE_OK): Redefine.
13135         * config/sh/sh.h (HARD_REGNO_MODE_OK): Delete.
13136         * config/sh/sh-protos.h (sh_hard_regno_mode_ok): Delete.
13137         * config/sh/sh.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
13138         (sh_hard_regno_mode_ok): Make static.
13139         * config/sparc/constraints.md: Refer to targetm.hard_regno_mode_ok
13140         instead of HARD_REGNO_MODE_OK.
13141         * config/sparc/sparc.h (hard_regno_mode_classes): Delete.
13142         (sparc_mode_class): Delete.
13143         (HARD_REGNO_MODE_OK): Delete.
13144         * config/sparc/sparc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
13145         (hard_regno_mode_classes): Make static.
13146         (sparc_mode_class): Likewise.
13147         (sparc_hard_regno_mode_ok): New function.
13148         * config/spu/spu.h (HARD_REGNO_MODE_OK): Delete.
13149         * config/stormy16/stormy16.h (HARD_REGNO_MODE_OK): Delete.
13150         * config/stormy16/stormy16.c (xstormy16_hard_regno_mode_ok): New
13151         function.
13152         (TARGET_HARD_REGNO_MODE_OK): Redefine.
13153         * config/tilegx/tilegx.h (HARD_REGNO_MODE_OK): Delete.
13154         * config/tilepro/tilepro.h (HARD_REGNO_MODE_OK): Delete.
13155         * config/v850/v850.h (HARD_REGNO_MODE_OK): Delete.
13156         * config/v850/v850.c (v850_hard_regno_mode_ok): New function.
13157         (TARGET_HARD_REGNO_MODE_OK): Redefine.
13158         * config/vax/vax.h (HARD_REGNO_MODE_OK): Delete.
13159         * config/visium/visium.h (HARD_REGNO_MODE_OK): Delete.
13160         * config/visium/visium.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
13161         (visium_hard_regno_mode_ok): New function.
13162         * config/visium/visium.md: Refer to targetm.hard_regno_mode_ok
13163         instead of HARD_REGNO_MODE_OK.
13164         * config/xtensa/xtensa.h (xtensa_hard_regno_mode_ok): Delete.
13165         (HARD_REGNO_MODE_OK): Delete.
13166         * config/xtensa/xtensa.c (xtensa_hard_regno_mode_ok): Rename to...
13167         (xtensa_hard_regno_mode_ok_p): ...this and make static.
13168         (xtensa_option_override): Update accordingly.
13169         (TARGET_HARD_REGNO_MODE_OK): Redefine.
13170         (xtensa_hard_regno_mode_ok): New function.
13171         * system.h (HARD_REGNO_MODE_OK): Poison.
13172
13173 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
13174             Alan Hayward  <alan.hayward@arm.com>
13175             David Sherwood  <david.sherwood@arm.com>
13176
13177         * target.def (hard_regno_call_part_clobbered): New hook.
13178         * doc/tm.texi.in (HARD_REGNO_CALL_PART_CLOBBERED): Replace with...
13179         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): ...this hook.
13180         * doc/tm.texi: Regenerate.
13181         * hooks.h (hook_bool_uint_mode_false): Declare.
13182         * hooks.c (hook_bool_uint_mode_false): New function.
13183         * regs.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
13184         * cselib.c (cselib_process_insn): Use
13185         targetm.hard_regno_call_part_clobbered instead of
13186         HARD_REGNO_CALL_PART_CLOBBERED.
13187         * ira-conflicts.c (ira_build_conflicts): Likewise.
13188         * ira-costs.c (ira_tune_allocno_costs): Likewise.
13189         * lra-constraints.c (need_for_call_save_p): Likewise.
13190         * lra-lives.c: Include target.h.
13191         (check_pseudos_live_through_calls): Use
13192         targetm.hard_regno_call_part_clobbered instead of
13193         HARD_REGNO_CALL_PART_CLOBBERED.
13194         * regcprop.c: Include target.h.
13195         (copyprop_hardreg_forward_1): Use
13196         targetm.hard_regno_call_part_clobbered instead of
13197         HARD_REGNO_CALL_PART_CLOBBERED.
13198         * reginfo.c (choose_hard_reg_mode): Likewise.
13199         * regrename.c (check_new_reg_p): Likewise.
13200         * reload.c (find_equiv_reg): Likewise.
13201         * reload1.c (emit_reload_insns): Likewise.
13202         * sched-deps.c (deps_analyze_insn): Likewise.
13203         * sel-sched.c (init_regs_for_mode): Likewise.
13204         (mark_unavailable_hard_regs): Likewise.
13205         * targhooks.c (default_dwarf_frame_reg_mode): Likewise.
13206         * config/aarch64/aarch64.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
13207         * config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered):
13208         New function.
13209         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
13210         * config/avr/avr.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
13211         * config/avr/avr-protos.h (avr_hard_regno_call_part_clobbered):
13212         Delete.
13213         * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Make static
13214         and return a bool.
13215         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
13216         * config/i386/i386.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
13217         * config/i386/i386.c (ix86_hard_regno_call_part_clobbered): New
13218         function.
13219         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
13220         * config/mips/mips.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
13221         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): New
13222         function.
13223         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
13224         * config/powerpcspe/powerpcspe.h (HARD_REGNO_CALL_PART_CLOBBERED):
13225         Delete.
13226         * config/powerpcspe/powerpcspe.c
13227         (rs6000_hard_regno_call_part_clobbered): New function.
13228         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
13229         * config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
13230         * config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered):
13231         New function.
13232         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
13233         * config/s390/s390.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
13234         * config/s390/s390.c (s390_hard_regno_call_part_clobbered): New
13235         function.
13236         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
13237         * config/sh/sh.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
13238         * system.h (HARD_REGNO_CALL_PART_CLOBBERED): Poison.
13239
13240 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
13241             Alan Hayward  <alan.hayward@arm.com>
13242             David Sherwood  <david.sherwood@arm.com>
13243
13244         * rtl.h (subreg_memory_offset): Declare.
13245         * emit-rtl.c (subreg_memory_offset): New function.
13246         * expmed.c (store_bit_field_1): Use it.
13247         * expr.c (undefined_operand_subword_p): Likewise.
13248         * simplify-rtx.c (simplify_subreg): Likewise.
13249
13250 2017-09-04  Alexander Monakov  <amonakov@ispras.ru>
13251
13252         PR rtl-optimization/57448
13253         PR target/67458
13254         PR target/81316
13255         * optabs.c (expand_atomic_load): Place compiler memory barriers if
13256         using atomic_load pattern.
13257         (expand_atomic_store): Likewise.
13258
13259 2017-09-04  Jakub Jelinek  <jakub@redhat.com>
13260
13261         PR sanitizer/81981
13262         * gimple-fold.c (gimple_fold_call): Optimize away useless UBSAN_PTR
13263         and UBSAN_BOUNDS internal calls.  Clean up IFN_UBSAN_OBJECT_SIZE
13264         handling.  Use replace_call_with_value with NULL instead of
13265         gsi_replace, unlink_stmt_vdef and release_defs.
13266
13267         * gdbhooks.py (OptMachineModePrinter.to_string): Use 8 spaces
13268         instead of tab.
13269
13270         * lra-remat.c (reg_overlap_for_remat_p): Fix a pasto.
13271
13272 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
13273
13274         PR bootstrap/82045
13275         * rtl.h (emit_library_call_value_1): Declare.
13276         (emit_library_call): Replace declaration with a series of overloads.
13277         Remove the parameter count argument.
13278         (emit_library_call_value): Likewise.
13279         * calls.c (emit_library_call_value_1): Make global.  Replace varargs
13280         with an "rtx_mode_t *".
13281         (emit_library_call_value): Delete.
13282         (emit_library_call): Likewise.
13283         * asan.c (asan_emit_stack_protection): Update calls accordingly.
13284         (asan_emit_allocas_unpoison): Likewise.
13285         * builtins.c (expand_builtin_powi): Likewise.
13286         (expand_asan_emit_allocas_unpoison): Likewise.
13287         * cfgexpand.c (expand_main_function): Likewise.
13288         * config/aarch64/aarch64.c (aarch64_trampoline_init): Likewise.
13289         * config/aarch64/aarch64.h (PROFILE_HOOK): Likewise.
13290         * config/alpha/alpha.c (alpha_trampoline_init): Likewise.
13291         * config/arm/arm.c (arm_trampoline_init): Likewise.
13292         (arm_call_tls_get_addr): Likewise.
13293         (arm_expand_divmod_libfunc): Likewise.
13294         * config/bfin/bfin.md (umulsi3_highpart): Likewise.
13295         (smulsi3_highpart): Likewise.
13296         * config/c6x/c6x.c (c6x_initialize_trampoline): Likewise.
13297         (c6x_expand_compare): Likewise.
13298         (c6x_expand_movmem): Likewise.
13299         * config/frv/frv.c (frv_trampoline_init): Likewise.
13300         * config/i386/i386.c (ix86_trampoline_init): Likewise.
13301         (ix86_expand_divmod_libfunc): Likewise.
13302         * config/ia64/ia64.c (ia64_expand_tls_address): Likewise.
13303         (ia64_expand_compare): Likewise.
13304         (ia64_profile_hook): Likewise.
13305         * config/ia64/ia64.md (save_stack_nonlocal): Likewise.
13306         (nonlocal_goto): Likewise.
13307         (restore_stack_nonlocal): Likewise.
13308         * config/m32r/m32r.c (block_move_call): Likewise.
13309         (m32r_trampoline_init): Likewise.
13310         * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise.
13311         * config/m68k/m68k.c (m68k_call_tls_get_addr): Likewise.
13312         (m68k_call_m68k_read_tp): Likewise.
13313         * config/microblaze/microblaze.c (microblaze_call_tls_get_addr)
13314         (microblaze_expand_divide): Likewise.
13315         * config/mips/mips.h (mips_args): Likewise.
13316         * config/mips/sdemtk.h (mips_sync_icache): Likewise.
13317         (MIPS_ICACHE_SYNC): Likewise.
13318         * config/nios2/nios2.c (nios2_emit_expensive_div): Likewise.
13319         (nios2_trampoline_init): Likewise.
13320         * config/pa/pa.c (hppa_tls_call): Likewise.
13321         (pa_trampoline_init): Likewise.
13322         * config/pa/pa.md (canonicalize_funcptr_for_compare): Likewise.
13323         * config/powerpcspe/powerpcspe.c (rs6000_legitimize_tls_address)
13324         (expand_strn_compare): Likewise.
13325         (rs6000_generate_compare): Likewise.
13326         (rs6000_expand_float128_convert): Likewise.
13327         (output_profile_hook): Likewise.
13328         (rs6000_trampoline_init): Likewise.
13329         * config/powerpcspe/powerpcspe.md (neg<mode>2): Likewise.
13330         * config/riscv/riscv.h (PROFILE_HOOK): Likewise.
13331         * config/rs6000/rs6000-string.c (expand_strn_compare): Likewise.
13332         * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.
13333         (rs6000_generate_compare): Likewise.
13334         (rs6000_expand_float128_convert): Likewise.
13335         (output_profile_hook): Likewise.
13336         (rs6000_trampoline_init): Likewise.
13337         * config/rs6000/rs6000.md (neg<mode>2): Likewise.
13338         * config/sh/sh.c (sh_trampoline_init): Likewise.
13339         * config/sparc/sparc.c (emit_soft_tfmode_libcall): Likewise.
13340         (sparc_emit_float_lib_cmp): Likewise.
13341         (sparc32_initialize_trampoline): Likewise.
13342         (sparc64_initialize_trampoline): Likewise.
13343         (sparc_profile_hook): Likewise.
13344         * config/spu/spu.c (ea_load_store): Likewise.
13345         * config/spu/spu.md (floatunssidf2): Likewise.
13346         * config/tilegx/tilegx.c (tilegx_trampoline_init): Likewise.
13347         * config/tilepro/tilepro.c (tilepro_trampoline_init): Likewise.
13348         * config/visium/visium.c (expand_block_move_4): Likewise.
13349         (expand_block_move_2): Likewise.
13350         (expand_block_move_1): Likewise.
13351         (expand_block_set_4): Likewise.
13352         (expand_block_set_2): Likewise.
13353         (expand_block_set_1): Likewise.
13354         (visium_trampoline_init): Likewise.
13355         (visium_profile_hook): Likewise.
13356         * config/xtensa/xtensa.c (xtensa_expand_nonlocal_goto): Likewise.
13357         (xtensa_setup_frame_addresses): Likewise.
13358         (xtensa_trampoline_init): Likewise.
13359         * except.c (sjlj_emit_function_enter): Likewise.
13360         (sjlj_emit_function_exit): Likewise.
13361         * explow.c (allocate_dynamic_stack_space): Likewise.
13362         (probe_stack_range): Likewise.
13363         * expr.c (convert_mode_scalar): Likewise.
13364         * optabs.c (expand_binop): Likewise.
13365         (expand_twoval_binop_libfunc): Likewise.
13366         (expand_unop): Likewise.
13367         (prepare_cmp_insn): Likewise.
13368         (prepare_float_lib_cmp): Likewise.
13369         (expand_float): Likewise.
13370         (expand_fix): Likewise.
13371         (expand_fixed_convert): Likewise.
13372         (maybe_emit_sync_lock_test_and_set): Likewise.
13373         (expand_atomic_compare_and_swap): Likewise.
13374         (expand_mem_thread_fence): Likewise.
13375         (expand_atomic_fetch_op): Likewise.
13376
13377 2017-09-03  Gerald Pfeifer  <gerald@pfeifer.com>
13378
13379         * doc/generic.texi (OpenACC): Adjust URL.
13380         * doc/invoke.texi (C Dialect Options): Ditto.
13381
13382 2017-09-03  Uros Bizjak  <ubizjak@gmail.com>
13383
13384         * config/i386/i386.md (*bt<mode>): Use nonimmediate_operand
13385         predicate for operand 1.  Add (m,<S>) constraint.
13386         (*jcc_bt<mode>): Use nonimmediate_operand predicate for operand 1.
13387         Prevent memory operand 1 with register operand 2.
13388
13389 2017-09-01  Segher Boessenkool  <segher@kernel.crashing.org>
13390
13391         PR rtl-optimization/82024
13392         * combine.c (try_combine): If the combination result is a PARALLEL,
13393         and we only need to retain the SET in there that would be placed
13394         at I2, check that we can place that at I3 instead, before doing so.
13395
13396 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
13397
13398         PR target/81766
13399         * config/i386/i386.c (ix86_init_large_pic_reg): Return label
13400         instead of void.
13401         (ix86_init_pic_reg): Remember label from ix86_init_large_pic_reg,
13402         if non-NULL and preceded by NOTE_INSN_BASIC_BLOCK, swap the note
13403         and label.
13404
13405 2017-09-01  Joerg Sonnenberger  <joerg@bec.de>
13406             Jeff Law  <law@redhat.com>
13407
13408         * varasm.c (bss_initializer_p): Do not put constants into .bss
13409         (categorize_decl_for_section): Handle bss_initializer_p returning
13410         false when DECL_INITIAL is NULL.
13411
13412 2017-09-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13413
13414         PR target/82012
13415         * config/s390/s390.c (s390_can_inline_p): New function.
13416
13417 2017-09-01  Jeff Law  <law@redhat.com>
13418
13419         PR tree-optimization/82052
13420         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
13421         Always initialize the returned slot after a hash table miss
13422         when INSERT is true.
13423
13424 2017-09-01  Alexander Monakov  <amonakov@ispras.ru>
13425
13426         * config/s390/s390.md (mem_signal_fence): Remove.
13427         * doc/md.texi (mem_signal_fence): Remove.
13428         * optabs.c (expand_mem_signal_fence): Remove uses of mem_signal_fence.
13429         Update comments.
13430         * target-insns.def (mem_signal_fence): Remove.
13431
13432 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
13433
13434         PR sanitizer/81902
13435         * doc/invoke.texi: Document -fsanitize=pointer-overflow.
13436
13437         PR sanitizer/81923
13438         * asan.c (create_odr_indicator): Strip name encoding from assembler
13439         name before appending it after __odr_asan_.
13440
13441 2017-09-01  Martin Liska  <mliska@suse.cz>
13442
13443         PR tree-optimization/82059
13444         * gimple-ssa-isolate-paths.c (isolate_path): Add profile and
13445         frequency only when an edge is redirected.
13446
13447 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
13448
13449         * config/arc/arc-c.c (__ARC_LPC_WIDTH__): Add builtin define.
13450         * config/arc/arc.c (ARC_MAX_LOOP_LENGTH): Define.
13451         (arc_conditional_register_usage): Remove ARC600 lp_count
13452         exception.
13453         (arc_file_start): Emit Tag_ARC_CPU_variation.
13454         (arc_can_use_doloop_p): New conditions to use ZOLs.
13455         (hwloop_fail): New function.
13456         (hwloop_optimize): Likewise.
13457         (hwloop_pattern_reg): Likewise.
13458         (arc_doloop_hooks): New struct, to be used with reorg_loops.
13459         (arc_reorg_loops): New function, calls reorg_loops.
13460         (arc_reorg): Call arc_reorg_loops.  Remove old ZOL handling.
13461         (arc600_corereg_hazard): Remove ZOL checking, case handled by
13462         hwloop_optimize.
13463         (arc_loop_hazard): Remove function, functionality moved into
13464         hwloop_optimize.
13465         (arc_hazard): Remove arc_loop_hazard call.
13466         (arc_adjust_insn_length): Remove ZOL handling, functionality moved
13467         into hwloop_optimize.
13468         (arc_label_align): Remove ZOL handling.
13469         * config/arc/arc.h (LOOP_ALIGN): Changed to 0.
13470         * config/arc/arc.md (doloop_begin): Remove pattern.
13471         (doloop_begin_i): Likewise.
13472         (doloop_end_i): Likewise.
13473         (doloop_fallback): Likewise.
13474         (doloop_fallback_m): Likewise.
13475         (doloop_end): Reimplement expand.
13476         (arc_lp): New pattern for LP instruction.
13477         (loop_end): New pattern.
13478         (loop_fail): Likewise.
13479         (decrement_and_branch_until_zero): Likewise.
13480         * config/arc/arc.opt (mlpc-width): New option.
13481         * doc/invoke.texi (mlpc-width): Document option.
13482
13483 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
13484
13485         * config/arc/arc.c (arc_ifcvt): Remove use of merge_blocks call.
13486         (arc_ccfsm_advance): Fix checking for delay slots.
13487         (arc_reorg): Add rtl dump after each call to arc_ifcvt.
13488
13489 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
13490
13491         * config/arc/arc.md (movqi_insn): Add stores to save constant long
13492         immediates.
13493         (movhi_insn): Update store instruction constraint which are saving
13494         6-bit short immediates.
13495         (movsi_insn): Consider also short scaled load operations.
13496         (zero_extendhisi2_i): Use Usd constraint instead of T.
13497         (extendhisi2_i): Add q constraint.
13498         (arc_clzsi2): Add type and length attributes.
13499         (arc_ctzsi2): Likewise.
13500         * config/arc/constraints.md (Usc): Update constraint, the
13501         assembler can parse two relocations for a single instruction.
13502
13503 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
13504
13505         * config/arc/arc.c (arc_use_anchors_for_symbol_p): New function.
13506         (TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.
13507
13508 2017-08-31  Olivier Hainque  <hainque@adacore.com>
13509
13510         * config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now
13511         match as powerpc-wrs-vxworks*.
13512
13513 2017-08-31  James Greenhalgh  <james.greenhalgh@arm.com>
13514
13515         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): Fix
13516         register constraint for by-element operand.
13517         (aarch64_mls_elt_merge<mode>): Likewise.
13518
13519 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
13520
13521         * config/arc/arc.c (arc_can_follow_jump): Check for short
13522         branches.
13523
13524 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
13525
13526         * config.gcc: Use g.opt for arc.
13527         * config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted,
13528         functionality moved to ...
13529         (legitimate_scaled_address_p): New function, ...here.
13530         (LEGITIMATE_SMALL_DATA_OFFSET_P): New define.
13531         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Use the above define.
13532         (legitimate_offset_address_p): Delete TARGET_NO_SDATA_SET
13533         condition.
13534         (arc_override_options): Handle G option.
13535         (arc_output_pic_addr_const): Correct function definition.
13536         (arc_legitimate_address_p): Use legitimate_scaled_address_p.
13537         (arc_decl_anon_ns_mem_p): Delete.
13538         (arc_in_small_data_p): Overhaul this function to take into
13539         consideration the value given via G option.
13540         (arc_rewrite_small_data_1): Renamed and corrected old
13541         arc_rewrite_small_data function.
13542         (arc_rewrite_small_data): New function.
13543         (small_data_pattern): Don't use pic_offset_table_rtx.
13544         * config/arc/arc.h (CC1_SPEC): Recognize G option.
13545         * config/arc/simdext.md (movmisalignv2hi): Use
13546         prepare_move_operands function.
13547         (mov*): Likewise.
13548         (movmisalign*): Likewise.
13549         * doc/invoke.texi (ARC options): Document -G option.
13550
13551 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
13552
13553         * config/arc/arc-protos.h (compact_sda_memory_operand): Update
13554         prototype.
13555         * config/arc/arc.c (arc_print_operand): Output scalled address for
13556         sdata whenever is possible.
13557         (arc_in_small_data_p): Allow sdata for 64bit datum when double
13558         load/stores are available.
13559         (compact_sda_memory_operand): Check for the alignment required by
13560         code density instructions.
13561         * config/arc/arc.md (movsi_insn): Use newly introduced Us0
13562         constraint.
13563         * config/arc/constraints.md (Usd): Update constraint.
13564         (Us0): New constraint.
13565         (Usc): Update constraint.
13566
13567 2017-08-31  Richard Biener  <rguenther@suse.de>
13568
13569         PR middle-end/82054
13570         * dwarf2out.c (dwarf2out_early_global_decl): Process each
13571         function only once.
13572
13573 2017-08-31  Tamar Christina  <tamar.christina@arm.com>
13574
13575         * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins):
13576         Resize type_signature.
13577
13578 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
13579             Alan Hayward  <alan.hayward@arm.com>
13580             David Sherwood  <david.sherwood@arm.com>
13581
13582         * config/aarch64/aarch64.c (aarch64_base_register_rtx_p): Only allow
13583         subregs whose inner modes can be stored in GPRs.
13584         (aarch64_classify_index): Likewise.
13585
13586 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
13587             Alan Hayward  <alan.hayward@arm.com>
13588             David Sherwood  <david.sherwood@arm.com>
13589
13590         * config/aarch64/iterators.md (V_cmp_result): Rename to...
13591         (V_INT_EQUIV): ...this.
13592         (v_cmp_result): Rename to...
13593         (v_int_equiv): ...this.
13594         * config/aarch64/aarch64.md (xorsign<mode>3): Update accordingly.
13595         * config/aarch64/aarch64-simd.md (xorsign<mode>3): Likewise.
13596         (copysign<mode>3): Likewise.
13597         (aarch64_simd_bsl<mode>_internal): Likewise.
13598         (aarch64_simd_bsl<mode>): Likewise.
13599         (vec_cmp<mode><mode>): Likewise.
13600         (vcond<mode><mode>): Likewise.
13601         (vcond<v_cmp_mixed><mode>): Likewise.
13602         (vcondu<mode><v_cmp_mixed>): Likewise.
13603         (aarch64_cm<optab><mode>): Likewise.
13604         (aarch64_cmtst<mode>): Likewise.
13605         (aarch64_fac<optab><mode>): Likewise.
13606         (vec_perm_const<mode>): Likewise.
13607         (vcond_mask_<mode><v_cmp_result>): Rename to...
13608         (vcond_mask_<mode><v_int_equiv>): ...this.
13609         (vec_cmp<mode><v_cmp_result>): Rename to...
13610         (vec_cmp<mode><v_int_equiv>): ...this.
13611
13612 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
13613             Alan Hayward  <alan.hayward@arm.com>
13614             David Sherwood  <david.sherwood@arm.com>
13615
13616         * config/aarch64/aarch64-modes.def: Remove 32-, 48- and 64-byte
13617         vector modes.
13618         * config/aarch64/iterators.md (VRL2, VRL3, VRL4): Delete.
13619         * config/aarch64/aarch64.md (UNSPEC_LD2_DREG, UNSPEC_LD3_DREG)
13620         (UNSPEC_LD4_DREG): New unspecs.
13621         * config/aarch64/aarch64-simd.md (aarch64_ld2<mode>_dreg_le)
13622         (aarch64_ld2<mode>_dreg_be): Replace with...
13623         (aarch64_ld2<mode>_dreg): ...this pattern and use the new DREG
13624         unspec.
13625         (aarch64_ld3<mode>_dreg_le)
13626         (aarch64_ld3<mode>_dreg_be): Replace with...
13627         (aarch64_ld3<mode>_dreg): ...this pattern and use the new DREG
13628         unspec.
13629         (aarch64_ld4<mode>_dreg_le)
13630         (aarch64_ld4<mode>_dreg_be): Replace with...
13631         (aarch64_ld4<mode>_dreg): ...this pattern and use the new DREG
13632         unspec.
13633
13634 2017-08-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13635
13636         PR tree-optimization/81987
13637         * gimple-ssa-strength-reduction.c (insert_initializers): Don't
13638         insert an initializer in a location not dominated by the stride
13639         definition.
13640
13641 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
13642
13643         * tree-eh.c (lower_try_finally_switch): Set the location of the finally
13644         on the entire header of the finally block in the fallthru case.
13645
13646 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
13647
13648         * varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.
13649
13650 2017-08-30  Pat Haugen  <pthaugen@us.ibm.com>
13651
13652         * config/rs6000/rs6000.c (rs6000_emit_prologue_move_from_cr): Rename from
13653         rs6000_emit_move_from_cr and call renamed function.
13654         (rs6000_emit_prologue): Call renamed functions.
13655         * config/rs6000/rs6000.md (prologue_movesi_from_cr): Rename from
13656         movesi_from_cr, remove volatile CRs.
13657
13658 2017-08-30  Jon Beniston  <jon@beniston.com>
13659             Richard Biener  <rguenther@suse.de>
13660
13661         * tree-vect-patterns.c (vect_pattern_recog_1): Use VECTOR_TYPE_P instead
13662         of VECTOR_MODE_P check.
13663         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Allow single
13664         element vector types.
13665
13666 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13667
13668         * df.h (df_read_modify_subreg_p): Remove in favor of...
13669         * rtl.h (read_modify_subreg_p): ...this new function.  Take a
13670         const_rtx instead of an rtx.
13671         * cprop.c (local_cprop_find_used_regs): Update accordingly.
13672         * df-problems.c (df_word_lr_mark_ref): Likewise.
13673         * ira-lives.c (mark_pseudo_reg_live): Likewise.
13674         (mark_pseudo_reg_dead): Likewise.
13675         (mark_ref_dead): Likewise.
13676         * reginfo.c (init_subregs_of_mode): Likewise.
13677         * sched-deps.c (sched_analyze_1): Likewise.
13678         * df-scan.c (df_def_record_1): Likewise.
13679         (df_uses_record): Likewise.
13680         (df_read_modify_subreg_p): Remove in favor of...
13681         * rtlanal.c (read_modify_subreg_p): ...this new function.  Take a
13682         const_rtx instead of an rtx.
13683
13684 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13685             Alan Hayward  <alan.hayward@arm.com>
13686             David Sherwood  <david.sherwood@arm.com>
13687
13688         * rtl.h (partial_subreg_p): New function.
13689         * caller-save.c (save_call_clobbered_regs): Use it.
13690         * calls.c (expand_call): Likewise.
13691         * combine.c (combinable_i3pat): Likewise.
13692         (simplify_set): Likewise.
13693         (make_extraction): Likewise.
13694         (make_compound_operation_int): Likewise.
13695         (gen_lowpart_or_truncate): Likewise.
13696         (force_to_mode): Likewise.
13697         (make_field_assignment): Likewise.
13698         (reg_truncated_to_mode): Likewise.
13699         (record_truncated_value): Likewise.
13700         (move_deaths): Likewise.
13701         * cse.c (record_jump_cond): Likewise.
13702         (cse_insn): Likewise.
13703         * cselib.c (cselib_lookup_1): Likewise.
13704         * expmed.c (extract_bit_field_using_extv): Likewise.
13705         * function.c (assign_parm_setup_reg): Likewise.
13706         * ifcvt.c (noce_convert_multiple_sets): Likewise.
13707         * ira-build.c (create_insn_allocnos): Likewise.
13708         * lra-coalesce.c (merge_pseudos): Likewise.
13709         * lra-constraints.c (match_reload): Likewise.
13710         (simplify_operand_subreg): Likewise.
13711         (curr_insn_transform): Likewise.
13712         * lra-lives.c (process_bb_lives): Likewise.
13713         * lra.c (new_insn_reg): Likewise.
13714         (lra_substitute_pseudo): Likewise.
13715         * regcprop.c (mode_change_ok): Likewise.
13716         (maybe_mode_change): Likewise.
13717         (copyprop_hardreg_forward_1): Likewise.
13718         * reload.c (push_reload): Likewise.
13719         (find_reloads): Likewise.
13720         (find_reloads_subreg_address): Likewise.
13721         * reload1.c (alter_reg): Likewise.
13722         (eliminate_regs_1): Likewise.
13723         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13724
13725 2017-08-30  David Edelsohn  <dje.gcc@gmail.com>
13726
13727         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Revert
13728         back to if statements, including unpack.
13729
13730 2017-08-30  Martin Liska  <mliska@suse.cz>
13731
13732         PR inline-asm/82001
13733         * ipa-icf-gimple.c (func_checker::compare_tree_list_operand):
13734         Rename to ...
13735         (func_checker::compare_asm_inputs_outputs): ... this function.
13736         (func_checker::compare_gimple_asm): Use the function to compare
13737         also ASM constrains.
13738         * ipa-icf-gimple.h: Rename the function.
13739
13740 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13741             Alan Hayward  <alan.hayward@arm.com>
13742             David Sherwood  <david.sherwood@arm.com>
13743
13744         * coretypes.h (complex_mode): New type.
13745         * gdbhooks.py (build_pretty_printer): Handle it.
13746         * machmode.h (complex_mode): New class.
13747         (complex_mode::includes_p): New function.
13748         (is_complex_int_mode): Likewise.
13749         (is_complex_float_mode): Likewise.
13750         * genmodes.c (get_mode_class): Handle complex mode classes.
13751         * function.c (expand_function_end): Use is_complex_int_mode.
13752
13753 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13754             Alan Hayward  <alan.hayward@arm.com>
13755             David Sherwood  <david.sherwood@arm.com>
13756
13757         * coretypes.h (scalar_mode_pod): New typedef.
13758         * gdbhooks.py (build_pretty_printer): Handle it.
13759         * machmode.h (gt_ggc_mx, gt_pch_nx): New functions.
13760         * fixed-value.h (fixed_value::mode): Change type to scalar_mode_pod.
13761         * fold-const.c (fold_convert_const_int_from_fixed): Use scalar_mode.
13762         * tree-streamer-in.c (unpack_ts_fixed_cst_value_fields): Use
13763         as_a <scalar_mode>.
13764
13765 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13766             Alan Hayward  <alan.hayward@arm.com>
13767             David Sherwood  <david.sherwood@arm.com>
13768
13769         * machmode.h (mode_for_vector): Take a scalar_mode instead
13770         of a machine_mode.
13771         * stor-layout.c (mode_for_vector): Likewise.
13772         * explow.c (promote_mode): Use as_a <scalar_mode>.
13773         * sdbout.c (sdbout_parms): Use is_a <scalar_mode>.
13774
13775 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13776             Alan Hayward  <alan.hayward@arm.com>
13777             David Sherwood  <david.sherwood@arm.com>
13778
13779         * target.def (preferred_simd_mode): Take a scalar_mode
13780         instead of a machine_mode.
13781         * targhooks.h (default_preferred_simd_mode): Likewise.
13782         * targhooks.c (default_preferred_simd_mode): Likewise.
13783         * config/arc/arc.c (arc_preferred_simd_mode): Likewise.
13784         * config/arm/arm.c (arm_preferred_simd_mode): Likewise.
13785         * config/c6x/c6x.c (c6x_preferred_simd_mode): Likewise.
13786         * config/epiphany/epiphany.c (epiphany_preferred_simd_mode): Likewise.
13787         * config/i386/i386.c (ix86_preferred_simd_mode): Likewise.
13788         * config/mips/mips.c (mips_preferred_simd_mode): Likewise.
13789         * config/nvptx/nvptx.c (nvptx_preferred_simd_mode): Likewise.
13790         * config/powerpcspe/powerpcspe.c (rs6000_preferred_simd_mode):
13791         Likewise.
13792         * config/rs6000/rs6000.c (rs6000_preferred_simd_mode): Likewise.
13793         * config/s390/s390.c (s390_preferred_simd_mode): Likewise.
13794         * config/sparc/sparc.c (sparc_preferred_simd_mode): Likewise.
13795         * config/aarch64/aarch64.c (aarch64_preferred_simd_mode): Likewise.
13796         (aarch64_simd_scalar_immediate_valid_for_move): Update accordingly.
13797         * doc/tm.texi: Regenerate.
13798         * optabs-query.c (can_vec_mask_load_store_p): Return false for
13799         non-scalar modes.
13800
13801 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13802             Alan Hayward  <alan.hayward@arm.com>
13803             David Sherwood  <david.sherwood@arm.com>
13804
13805         * target.def (scalar_mode_supported_p): Take a scalar_mode
13806         instead of a machine_mode.
13807         * targhooks.h (default_scalar_mode_supported_p): Likewise.
13808         * targhooks.c (default_scalar_mode_supported_p): Likewise.
13809         * config/aarch64/aarch64.c (aarch64_scalar_mode_supported_p): Likewise.
13810         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
13811         * config/arm/arm.c (arm_scalar_mode_supported_p): Likewise.
13812         * config/avr/avr.c (avr_scalar_mode_supported_p): Likewise.
13813         * config/c6x/c6x.c (c6x_scalar_mode_supported_p): Likewise.
13814         * config/i386/i386.c (ix86_scalar_mode_supported_p): Likewise.
13815         * config/ia64/ia64.c (ia64_scalar_mode_supported_p): Likewise.
13816         * config/mips/mips.c (mips_scalar_mode_supported_p): Likewise.
13817         * config/msp430/msp430.c (msp430_scalar_mode_supported_p): Likewise.
13818         * config/pa/pa.c (pa_scalar_mode_supported_p): Likewise.
13819         * config/pdp11/pdp11.c (pdp11_scalar_mode_supported_p): Likewise.
13820         * config/powerpcspe/powerpcspe.c (rs6000_scalar_mode_supported_p):
13821         Likewise.
13822         * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Likewise.
13823         * config/s390/s390.c (s390_scalar_mode_supported_p): Likewise.
13824         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
13825         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
13826         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p):
13827         Likewise.
13828         * doc/tm.texi: Regenerate.
13829
13830 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13831             Alan Hayward  <alan.hayward@arm.com>
13832             David Sherwood  <david.sherwood@arm.com>
13833
13834         * coretypes.h (opt_scalar_mode): New typedef.
13835         * gdbhooks.py (build_pretty_printers): Handle it.
13836         * machmode.h (mode_iterator::get_2xwider): Add overload for
13837         opt_mode<T>.
13838         * emit-rtl.c (init_emit_once): Use opt_scalar_mode when iterating
13839         over scalar modes.
13840         * expr.c (convert_mode_scalar): Likewise.
13841         * omp-low.c (omp_clause_aligned_alignment): Likewise.
13842         * optabs.c (expand_float): Likewise.
13843         (expand_fix): Likewise.
13844         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
13845
13846 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13847             Alan Hayward  <alan.hayward@arm.com>
13848             David Sherwood  <david.sherwood@arm.com>
13849
13850         * optabs.c (expand_float): Explicitly check for scalars before
13851         using a branching expansion.
13852         (expand_fix): Likewise.
13853
13854 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13855             Alan Hayward  <alan.hayward@arm.com>
13856             David Sherwood  <david.sherwood@arm.com>
13857
13858         * expr.c (convert_mode): Split scalar handling out into...
13859         (convert_mode_scalar): ...this new function.  Treat the modes
13860         as scalar_modes.
13861
13862 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13863             Alan Hayward  <alan.hayward@arm.com>
13864             David Sherwood  <david.sherwood@arm.com>
13865
13866         * omp-expand.c (expand_omp_atomic): Use is_int_mode, is_float_mode
13867         and scalar_mode.
13868         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Likewise.
13869
13870 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13871             Alan Hayward  <alan.hayward@arm.com>
13872             David Sherwood  <david.sherwood@arm.com>
13873
13874         * fixed-value.h (fixed_from_double_int): Take a scalar_mode
13875         rather than a machine_mode.
13876         (fixed_from_string): Likewise.
13877         (fixed_convert): Likewise.
13878         (fixed_convert_from_int): Likewise.
13879         (fixed_convert_from_real): Likewise.
13880         (real_convert_from_fixed): Likewise.
13881         * fixed-value.c (fixed_from_double_int): Likewise.
13882         (fixed_from_string): Likewise.
13883         (fixed_convert): Likewise.
13884         (fixed_convert_from_int): Likewise.
13885         (fixed_convert_from_real): Likewise.
13886         (real_convert_from_fixed): Likewise.
13887         * config/avr/avr.c (avr_out_round): Use as_a <scalar_mode>.
13888
13889 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13890             Alan Hayward  <alan.hayward@arm.com>
13891             David Sherwood  <david.sherwood@arm.com>
13892
13893         * emit-rtl.c (immed_double_const): Use is_a <scalar_mode> instead
13894         of separate mode class checks.  Do not allow vector modes here.
13895         (immed_wide_int_const): Use as_a <scalar_mode>.
13896         * explow.c (trunc_int_for_mode): Likewise.
13897         * rtl.h (wi::int_traits<rtx_mode_t>::get_precision): Likewise.
13898         (wi::shwi): Likewise.
13899         (wi::min_value): Likewise.
13900         (wi::max_value): Likewise.
13901         * dwarf2out.c (loc_descriptor): Likewise.
13902         * simplify-rtx.c (simplify_immed_subreg): Fix rtx_mode_t argument
13903         for CONST_WIDE_INT.
13904
13905 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13906             Alan Hayward  <alan.hayward@arm.com>
13907             David Sherwood  <david.sherwood@arm.com>
13908
13909         * tree.h (SCALAR_TYPE_MODE): New macro.
13910         * expr.c (expand_expr_addr_expr_1): Use it.
13911         (expand_expr_real_2): Likewise.
13912         * fold-const.c (fold_convert_const_fixed_from_fixed): Likeise.
13913         (fold_convert_const_fixed_from_int): Likewise.
13914         (fold_convert_const_fixed_from_real): Likewise.
13915         (native_encode_fixed): Likewise
13916         (native_encode_complex): Likewise
13917         (native_encode_vector): Likewise.
13918         (native_interpret_fixed): Likewise.
13919         (native_interpret_real): Likewise.
13920         (native_interpret_complex): Likewise.
13921         (native_interpret_vector): Likewise.
13922         * omp-simd-clone.c (simd_clone_adjust_return_type): Likewise.
13923         (simd_clone_adjust_argument_types): Likewise.
13924         (simd_clone_init_simd_arrays): Likewise.
13925         (simd_clone_adjust): Likewise.
13926         * stor-layout.c (layout_type): Likewise.
13927         * tree.c (build_minus_one_cst): Likewise.
13928         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
13929         * tree-inline.c (estimate_move_cost): Likewise.
13930         * tree-ssa-math-opts.c (convert_plusminus_to_widen): Likewise.
13931         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise.
13932         (vectorizable_reduction): Likewise.
13933         * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Likewise.
13934         (vect_recog_mixed_size_cond_pattern): Likewise.
13935         (check_bool_pattern): Likewise.
13936         (adjust_bool_pattern): Likewise.
13937         (search_type_for_mask_1): Likewise.
13938         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
13939         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
13940         (vectorizable_load): Likewise.
13941         (vectorizable_store): Likewise.
13942         * ubsan.c (ubsan_encode_value): Likewise.
13943         * varasm.c (output_constant): Likewise.
13944
13945 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13946             Alan Hayward  <alan.hayward@arm.com>
13947             David Sherwood  <david.sherwood@arm.com>
13948
13949         * coretypes.h (scalar_mode): New class.
13950         * machmode.h (scalar_mode): Likewise.
13951         (scalar_mode::includes_p): New function.
13952         (mode_to_inner): Return a scalar_mode rather than a machine_mode.
13953         * gdbhooks.py (build_pretty_printers): Handle scalar_mode.
13954         * genmodes.c (get_mode_class): Handle remaining scalar modes.
13955         * cfgexpand.c (expand_debug_expr): Use scalar_mode.
13956         * expmed.c (store_bit_field_1): Likewise.
13957         (extract_bit_field_1): Likewise.
13958         * expr.c (write_complex_part): Likewise.
13959         (read_complex_part): Likewise.
13960         (emit_move_complex_push): Likewise.
13961         (expand_expr_real_2): Likewise.
13962         * function.c (assign_parm_setup_reg): Likewise.
13963         (assign_parms_unsplit_complex): Likewise.
13964         * optabs.c (expand_binop): Likewise.
13965         * rtlanal.c (subreg_get_info): Likewise.
13966         * simplify-rtx.c (simplify_immed_subreg): Likewise.
13967         * varasm.c (output_constant_pool_2): Likewise.
13968
13969 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13970             Alan Hayward  <alan.hayward@arm.com>
13971             David Sherwood  <david.sherwood@arm.com>
13972
13973         * expmed.c (extract_high_half): Use scalar_int_mode and remove
13974         assertion.
13975         (expmed_mult_highpart_optab): Likewise.
13976         (expmed_mult_highpart): Likewise.
13977
13978 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13979             Alan Hayward  <alan.hayward@arm.com>
13980             David Sherwood  <david.sherwood@arm.com>
13981
13982         * builtins.h (builtin_strncpy_read_str): Take a scalar_int_mode
13983         instead of a machine_mode.
13984         (builtin_memset_read_str): Likewise.
13985         * builtins.c (c_readstr): Likewise.
13986         (builtin_memcpy_read_str): Likewise.
13987         (builtin_strncpy_read_str): Likewise.
13988         (builtin_memset_read_str): Likewise.
13989         (builtin_memset_gen_str): Likewise.
13990         (expand_builtin_signbit): Use scalar_int_mode for local variables.
13991         * cfgexpand.c (convert_debug_memory_address): Take a scalar_int_mode
13992         instead of a machine_mode.
13993         * combine.c (simplify_if_then_else): Use scalar_int_mode for local
13994         variables.
13995         (make_extraction): Likewise.
13996         (try_widen_shift_mode): Take and return scalar_int_modes instead
13997         of machine_modes.
13998         * config/aarch64/aarch64.c (aarch64_libgcc_cmp_return_mode): Return
13999         a scalar_int_mode instead of a machine_mode.
14000         * config/avr/avr.c (avr_addr_space_address_mode): Likewise.
14001         (avr_addr_space_pointer_mode): Likewise.
14002         * config/cr16/cr16.c (cr16_unwind_word_mode): Likewise.
14003         * config/msp430/msp430.c (msp430_addr_space_pointer_mode): Likewise.
14004         (msp430_unwind_word_mode): Likewise.
14005         * config/spu/spu.c (spu_unwind_word_mode): Likewise.
14006         (spu_addr_space_pointer_mode): Likewise.
14007         (spu_addr_space_address_mode): Likewise.
14008         (spu_libgcc_cmp_return_mode): Likewise.
14009         (spu_libgcc_shift_count_mode): Likewise.
14010         * config/rl78/rl78.c (rl78_addr_space_address_mode): Likewise.
14011         (rl78_addr_space_pointer_mode): Likewise.
14012         (fl78_unwind_word_mode): Likewise.
14013         (rl78_valid_pointer_mode): Take a scalar_int_mode instead of a
14014         machine_mode.
14015         * config/alpha/alpha.c (vms_valid_pointer_mode): Likewise.
14016         * config/ia64/ia64.c (ia64_vms_valid_pointer_mode): Likewise.
14017         * config/mips/mips.c (mips_mode_rep_extended): Likewise.
14018         (mips_valid_pointer_mode): Likewise.
14019         * config/tilegx/tilegx.c (tilegx_mode_rep_extended): Likewise.
14020         * config/ft32/ft32.c (ft32_valid_pointer_mode): Likewise.
14021         (ft32_addr_space_pointer_mode): Return a scalar_int_mode instead
14022         of a machine_mode.
14023         (ft32_addr_space_address_mode): Likewise.
14024         * config/m32c/m32c.c (m32c_valid_pointer_mode): Take a
14025         scalar_int_mode instead of a machine_mode.
14026         (m32c_addr_space_pointer_mode): Return a scalar_int_mode instead
14027         of a machine_mode.
14028         (m32c_addr_space_address_mode): Likewise.
14029         * config/powerpcspe/powerpcspe.c (rs6000_abi_word_mode): Likewise.
14030         (rs6000_eh_return_filter_mode): Likewise.
14031         * config/rs6000/rs6000.c (rs6000_abi_word_mode): Likewise.
14032         (rs6000_eh_return_filter_mode): Likewise.
14033         * config/s390/s390.c (s390_libgcc_cmp_return_mode): Likewise.
14034         (s390_libgcc_shift_count_mode): Likewise.
14035         (s390_unwind_word_mode): Likewise.
14036         (s390_valid_pointer_mode): Take a scalar_int_mode rather than a
14037         machine_mode.
14038         * target.def (mode_rep_extended): Likewise.
14039         (valid_pointer_mode): Likewise.
14040         (addr_space.valid_pointer_mode): Likewise.
14041         (eh_return_filter_mode): Return a scalar_int_mode rather than
14042         a machine_mode.
14043         (libgcc_cmp_return_mode): Likewise.
14044         (libgcc_shift_count_mode): Likewise.
14045         (unwind_word_mode): Likewise.
14046         (addr_space.pointer_mode): Likewise.
14047         (addr_space.address_mode): Likewise.
14048         * doc/tm.texi: Regenerate.
14049         * dojump.c (prefer_and_bit_test): Take a scalar_int_mode rather than
14050         a machine_mode.
14051         (do_jump): Use scalar_int_mode for local variables.
14052         * dwarf2cfi.c (init_return_column_size): Take a scalar_int_mode
14053         rather than a machine_mode.
14054         * dwarf2out.c (convert_descriptor_to_mode): Likewise.
14055         (scompare_loc_descriptor_wide): Likewise.
14056         (scompare_loc_descriptor_narrow): Likewise.
14057         * emit-rtl.c (adjust_address_1): Use scalar_int_mode for local
14058         variables.
14059         * except.c (sjlj_emit_dispatch_table): Likewise.
14060         (expand_builtin_eh_copy_values): Likewise.
14061         * explow.c (convert_memory_address_addr_space_1): Likewise.
14062         Take a scalar_int_mode rather than a machine_mode.
14063         (convert_memory_address_addr_space): Take a scalar_int_mode rather
14064         than a machine_mode.
14065         (memory_address_addr_space): Use scalar_int_mode for local variables.
14066         * expmed.h (expand_mult_highpart_adjust): Take a scalar_int_mode
14067         rather than a machine_mode.
14068         * expmed.c (mask_rtx): Likewise.
14069         (init_expmed_one_conv): Likewise.
14070         (expand_mult_highpart_adjust): Likewise.
14071         (extract_high_half): Likewise.
14072         (expmed_mult_highpart_optab): Likewise.
14073         (expmed_mult_highpart): Likewise.
14074         (expand_smod_pow2): Likewise.
14075         (expand_sdiv_pow2): Likewise.
14076         (emit_store_flag_int): Likewise.
14077         (adjust_bit_field_mem_for_reg): Use scalar_int_mode for local
14078         variables.
14079         (extract_low_bits): Likewise.
14080         * expr.h (by_pieces_constfn): Take a scalar_int_mode rather than
14081         a machine_mode.
14082         * expr.c (pieces_addr::adjust):  Likewise.
14083         (can_store_by_pieces): Likewise.
14084         (store_by_pieces): Likewise.
14085         (clear_by_pieces_1): Likewise.
14086         (expand_expr_addr_expr_1): Likewise.
14087         (expand_expr_addr_expr): Use scalar_int_mode for local variables.
14088         (expand_expr_real_1): Likewise.
14089         (try_casesi): Likewise.
14090         * final.c (shorten_branches): Likewise.
14091         * fold-const.c (fold_convert_const_int_from_fixed): Change the
14092         type of "mode" to machine_mode.
14093         * internal-fn.c (expand_arith_overflow_result_store): Take a
14094         scalar_int_mode rather than a machine_mode.
14095         (expand_mul_overflow): Use scalar_int_mode for local variables.
14096         * loop-doloop.c (doloop_modify): Likewise.
14097         (doloop_optimize): Likewise.
14098         * optabs.c (expand_subword_shift): Take a scalar_int_mode rather
14099         than a machine_mode.
14100         (expand_doubleword_shift_condmove): Likewise.
14101         (expand_doubleword_shift): Likewise.
14102         (expand_doubleword_clz): Likewise.
14103         (expand_doubleword_popcount): Likewise.
14104         (expand_doubleword_parity): Likewise.
14105         (expand_absneg_bit): Use scalar_int_mode for local variables.
14106         (prepare_float_lib_cmp): Likewise.
14107         * rtl.h (convert_memory_address_addr_space_1): Take a scalar_int_mode
14108         rather than a machine_mode.
14109         (convert_memory_address_addr_space): Likewise.
14110         (get_mode_bounds): Likewise.
14111         (get_address_mode): Return a scalar_int_mode rather than a
14112         machine_mode.
14113         * rtlanal.c (get_address_mode): Likewise.
14114         * stor-layout.c (get_mode_bounds): Take a scalar_int_mode rather
14115         than a machine_mode.
14116         * targhooks.c (default_mode_rep_extended): Likewise.
14117         (default_valid_pointer_mode): Likewise.
14118         (default_addr_space_valid_pointer_mode): Likewise.
14119         (default_eh_return_filter_mode): Return a scalar_int_mode rather
14120         than a machine_mode.
14121         (default_libgcc_cmp_return_mode): Likewise.
14122         (default_libgcc_shift_count_mode): Likewise.
14123         (default_unwind_word_mode): Likewise.
14124         (default_addr_space_pointer_mode): Likewise.
14125         (default_addr_space_address_mode): Likewise.
14126         * targhooks.h (default_eh_return_filter_mode): Likewise.
14127         (default_libgcc_cmp_return_mode): Likewise.
14128         (default_libgcc_shift_count_mode): Likewise.
14129         (default_unwind_word_mode): Likewise.
14130         (default_addr_space_pointer_mode): Likewise.
14131         (default_addr_space_address_mode): Likewise.
14132         (default_mode_rep_extended): Take a scalar_int_mode rather than
14133         a machine_mode.
14134         (default_valid_pointer_mode): Likewise.
14135         (default_addr_space_valid_pointer_mode): Likewise.
14136         * tree-ssa-address.c (addr_for_mem_ref): Use scalar_int_mode for
14137         local variables.
14138         * tree-ssa-loop-ivopts.c (get_shiftadd_cost): Take a scalar_int_mode
14139         rather than a machine_mode.
14140         * tree-switch-conversion.c (array_value_type): Use scalar_int_mode
14141         for local variables.
14142         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
14143         * var-tracking.c (use_narrower_mode): Take a scalar_int_mode rather
14144         than a machine_mode.
14145
14146 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14147             Alan Hayward  <alan.hayward@arm.com>
14148             David Sherwood  <david.sherwood@arm.com>
14149
14150         * dojump.c (do_jump_by_parts_greater_rtx): Change the type of
14151         the mode argument to scalar_int_mode.
14152         (do_jump_by_parts_zero_rtx): Likewise.
14153         (do_jump_by_parts_equality_rtx): Likewise.
14154         (do_jump_by_parts_greater): Take a mode argument.
14155         (do_jump_by_parts_equality): Likewise.
14156         (do_jump_1): Update calls accordingly.
14157
14158 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14159             Alan Hayward  <alan.hayward@arm.com>
14160             David Sherwood  <david.sherwood@arm.com>
14161
14162         * is-a.h (safe_dyn_cast): New function.
14163         * rtl.h (rtx_jump_table_data::get_data_mode): New function.
14164         (jump_table_for_label): Likewise.
14165         * final.c (final_addr_vec_align): Take an rtx_jump_table_data *
14166         instead of an rtx_insn *.
14167         (shorten_branches): Use dyn_cast instead of LABEL_P and
14168         JUMP_TABLE_DATA_P.  Use jump_table_for_label and
14169         rtx_jump_table_data::get_data_mode.
14170         (final_scan_insn): Likewise.
14171
14172 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14173             Alan Hayward  <alan.hayward@arm.com>
14174             David Sherwood  <david.sherwood@arm.com>
14175
14176         * combine.c (try_combine): Use is_a <scalar_int_mode> when
14177         trying to combine a full-register integer set with a subreg
14178         integer set.
14179
14180 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14181             Alan Hayward  <alan.hayward@arm.com>
14182             David Sherwood  <david.sherwood@arm.com>
14183
14184         * expr.c (expand_expr_addr_expr): Add a new_tmode local variable
14185         that is always either address_mode or pointer_mode.
14186
14187 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14188             Alan Hayward  <alan.hayward@arm.com>
14189             David Sherwood  <david.sherwood@arm.com>
14190
14191         * expr.c (expand_expr_real_2): Use word_mode instead of innermode
14192         when the two are known to be equal.
14193
14194 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14195             Alan Hayward  <alan.hayward@arm.com>
14196             David Sherwood  <david.sherwood@arm.com>
14197
14198         * simplify-rtx.c (simplify_const_unary_operation): Use
14199         is_a <scalar_int_mode> instead of checking for a nonzero
14200         precision.  Forcibly convert op_mode to a scalar_int_mode
14201         in that case.  More clearly differentiate the operand and
14202         result modes and use the former when deciding what the value
14203         of a count-bits operation should be.  Use is_int_mode instead
14204         of checking for a MODE_INT.  Remove redundant check for whether
14205         this mode has a zero precision.
14206
14207 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14208             Alan Hayward  <alan.hayward@arm.com>
14209             David Sherwood  <david.sherwood@arm.com>
14210
14211         * optabs.c (widen_leading): Change the type of the mode argument
14212         to scalar_int_mode.  Use opt_scalar_int_mode for the mode iterator.
14213         (widen_bswap): Likewise.
14214         (expand_parity): Likewise.
14215         (expand_ctz): Change the type of the mode argument to scalar_int_mode.
14216         (expand_ffs): Likewise.
14217         (epand_unop): Check for scalar integer modes before calling the
14218         above routines.
14219
14220 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14221             Alan Hayward  <alan.hayward@arm.com>
14222             David Sherwood  <david.sherwood@arm.com>
14223
14224         * expr.c (const_scalar_mask_from_tree): Add a mode argument.
14225         Expand commentary.
14226         (expand_expr_real_1): Update call accordingly.
14227
14228 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14229             Alan Hayward  <alan.hayward@arm.com>
14230             David Sherwood  <david.sherwood@arm.com>
14231
14232         * expmed.c (store_bit_field_using_insv): Add op0_mode and
14233         value_mode arguments.  Use scalar_int_mode internally.
14234         (store_bit_field_1): Rename the new integer mode from imode
14235         to op0_mode and use it instead of GET_MODE (op0).  Update calls
14236         to store_split_bit_field, store_bit_field_using_insv and
14237         store_fixed_bit_field.
14238         (store_fixed_bit_field): Add op0_mode and value_mode arguments.
14239         Use scalar_int_mode internally.  Use a bit count rather than a mode
14240         when calculating the largest bit size for get_best_mode.
14241         Update calls to store_split_bit_field and store_fixed_bit_field_1.
14242         (store_fixed_bit_field_1): Add mode and value_mode arguments.
14243         Remove assertion that OP0 has a scalar integer mode.
14244         (store_split_bit_field): Add op0_mode and value_mode arguments.
14245         Update calls to extract_fixed_bit_field.
14246         (extract_bit_field_using_extv): Add an op0_mode argument.
14247         Use scalar_int_mode internally.
14248         (extract_bit_field_1): Rename the new integer mode from imode to
14249         op0_mode and use it instead of GET_MODE (op0).  Update calls to
14250         extract_split_bit_field, extract_bit_field_using_extv and
14251         extract_fixed_bit_field.
14252         (extract_fixed_bit_field): Add an op0_mode argument.  Update calls
14253         to extract_split_bit_field and extract_fixed_bit_field_1.
14254         (extract_fixed_bit_field_1): Add a mode argument.  Remove assertion
14255         that OP0 has a scalar integer mode.  Use as_a <scalar_int_mode>
14256         on the target mode.
14257         (extract_split_bit_field): Add an op0_mode argument.  Update call
14258         to extract_fixed_bit_field.
14259
14260 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14261             Alan Hayward  <alan.hayward@arm.com>
14262             David Sherwood  <david.sherwood@arm.com>
14263
14264         * cse.c (cse_insn): Use opt_scalar_int_mode for the mode iterator.
14265         * explow.c (hard_function_value): Likewise.
14266         * expmed.c (extract_fixed_bit_field_1): Likewise.  Move the
14267         convert_to_mode call outside the loop.
14268         * expr.c (alignment_for_piecewise_move): Use opt_scalar_int_mode
14269         for the mode iterator.  Require the mode specified by max_pieces
14270         to exist.
14271         (emit_block_move_via_movmem): Use opt_scalar_int_mode for the
14272         mode iterator.
14273         (copy_blkmode_to_reg): Likewise.
14274         (set_storage_via_setmem): Likewise.
14275         * optabs.c (prepare_cmp_insn): Likewise.
14276         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
14277         * stor-layout.c (finish_bitfield_representative): Likewise.
14278
14279 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14280             Alan Hayward  <alan.hayward@arm.com>
14281             David Sherwood  <david.sherwood@arm.com>
14282
14283         * rtl.h (subreg_unpromoted_mode, subreg_promoted_mode): New functions.
14284         * expr.c (convert_move): Use them.
14285         (convert_modes): Likewise.
14286         (store_expr_with_bounds): Likewise.
14287
14288 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14289             Alan Hayward  <alan.hayward@arm.com>
14290             David Sherwood  <david.sherwood@arm.com>
14291
14292         * rtl.h (rtl_hooks::reg_nonzero_bits): Add a scalar_int_mode
14293         parameter for the mode of "x".  Remove the "known_x", "known_mode"
14294         and "known_ret" arguments.  Change the type of the mode argument
14295         to scalar_int_mode.
14296         (rtl_hooks:reg_num_sign_bit_copies): Likewise.
14297         * combine.c (reg_nonzero_bits_for_combine): Update accordingly.
14298         (reg_num_sign_bit_copies_for_combine): Likewise.
14299         * rtlanal.c (nonzero_bits1): Likewise.
14300         (num_sign_bit_copies1): Likewise.
14301         * rtlhooks-def.h (reg_nonzero_bits_general): Likewise.
14302         (reg_num_sign_bit_copies_general): Likewise.
14303         * rtlhooks.c (reg_num_sign_bit_copies_general): Likewise.
14304         (reg_nonzero_bits_general): Likewise.
14305
14306 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14307             Alan Hayward  <alan.hayward@arm.com>
14308             David Sherwood  <david.sherwood@arm.com>
14309
14310         * rtlanal.c (num_sign_bit_copies): Handle VOIDmode here rather
14311         than in subroutines.  Return 1 for non-integer modes.
14312         (cached_num_sign_bit_copies): Change the type of the mode parameter
14313         to scalar_int_mode.
14314         (num_sign_bit_copies1): Likewise.  Remove early exit for other mode
14315         classes.  Handle CONST_INT_P first and then check whether X also
14316         has a scalar integer mode.  Check the same thing for inner registers
14317         of a SUBREG and for values that are being extended or truncated.
14318
14319 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14320             Alan Hayward  <alan.hayward@arm.com>
14321             David Sherwood  <david.sherwood@arm.com>
14322
14323         * rtlanal.c (nonzero_bits): Handle VOIDmode here rather than
14324         in subroutines.  Return the mode mask for non-integer modes.
14325         (cached_nonzero_bits): Change the type of the mode parameter
14326         to scalar_int_mode.
14327         (nonzero_bits1): Likewise.  Remove early exit for other mode
14328         classes.  Handle CONST_INT_P first and then check whether X
14329         also has a scalar integer mode.
14330
14331 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14332             Alan Hayward  <alan.hayward@arm.com>
14333             David Sherwood  <david.sherwood@arm.com>
14334
14335         * expr.c (widest_int_mode_for_size): Make the comment match the code.
14336         Return a scalar_int_mode and assert that the size is greater than
14337         one byte.
14338         (by_pieces_ninsns): Update accordingly and remove VOIDmode handling.
14339         (op_by_pieces_d::op_by_pieces_d): Likewise.
14340         (op_by_pieces_d::run): Likewise.
14341         (can_store_by_pieces): Likewise.
14342
14343 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14344             Alan Hayward  <alan.hayward@arm.com>
14345             David Sherwood  <david.sherwood@arm.com>
14346
14347         * combine.c (extract_left_shift): Add a mode argument and update
14348         recursive calls.
14349         (make_compound_operation_int): Change the type of the mode parameter
14350         to scalar_int_mode and update the call to extract_left_shift.
14351
14352 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14353             Alan Hayward  <alan.hayward@arm.com>
14354             David Sherwood  <david.sherwood@arm.com>
14355
14356         * combine.c (simplify_and_const_int): Change the type of the mode
14357         parameter to scalar_int_mode.
14358         (simplify_and_const_int_1): Likewise.  Update recursive call.
14359
14360 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14361             Alan Hayward  <alan.hayward@arm.com>
14362             David Sherwood  <david.sherwood@arm.com>
14363
14364         * combine.c (simplify_compare_const): Check that the mode is a
14365         scalar_int_mode (rather than VOIDmode) before testing its
14366         precision.
14367         (simplify_comparison): Move COMPARISON_P handling out of the
14368         loop and restrict the latter part of the loop to scalar_int_modes.
14369         Check is_a <scalar_int_mode> before calling HWI_COMPUTABLE_MODE_P
14370         and when considering SUBREG_REGs.  Use is_int_mode instead of
14371         checking GET_MODE_CLASS against MODE_INT.
14372
14373 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14374             Alan Hayward  <alan.hayward@arm.com>
14375             David Sherwood  <david.sherwood@arm.com>
14376
14377         * combine.c (try_widen_shift_mode): Move check for equal modes to...
14378         (simplify_shift_const_1): ...here.  Use scalar_int_mode for
14379         shift_unit_mode and for modes involved in scalar shifts.
14380
14381 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14382             Alan Hayward  <alan.hayward@arm.com>
14383             David Sherwood  <david.sherwood@arm.com>
14384
14385         * combine.c (force_int_to_mode): New function, split out from...
14386         (force_to_mode): ...here.  Keep xmode up-to-date and use it
14387         instead of GET_MODE (x).
14388
14389 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14390             Alan Hayward  <alan.hayward@arm.com>
14391             David Sherwood  <david.sherwood@arm.com>
14392
14393         * optabs-query.h (extraction_insn::struct_mode): Change type to
14394         opt_scalar_int_mode and update comment.
14395         (extraction_insn::field_mode): Change type to scalar_int_mode.
14396         (extraction_insn::pos_mode): Likewise.
14397         * combine.c (make_extraction): Update accordingly.
14398         * optabs-query.c (get_traditional_extraction_insn): Likewise.
14399         (get_optab_extraction_insn): Likewise.
14400         * recog.c (simplify_while_replacing): Likewise.
14401         * expmed.c (narrow_bit_field_mem): Change the type of the mode
14402         parameter to opt_scalar_int_mode.
14403
14404 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14405             Alan Hayward  <alan.hayward@arm.com>
14406             David Sherwood  <david.sherwood@arm.com>
14407
14408         * machmode.h (bit_field_mode_iterator::next_mode): Take a pointer
14409         to a scalar_int_mode instead of a machine_mode.
14410         (bit_field_mode_iterator::m_mode): Change type to opt_scalar_int_mode.
14411         (get_best_mode): Return a boolean and use a pointer argument to store
14412         the selected mode.  Replace the limit mode parameter with a bit limit.
14413         * expmed.c (adjust_bit_field_mem_for_reg): Use scalar_int_mode
14414         for the values returned by bit_field_mode_iterator::next_mode.
14415         (store_bit_field): Update call to get_best_mode.
14416         (store_fixed_bit_field): Likewise.
14417         (extract_fixed_bit_field): Likewise.
14418         * expr.c (optimize_bitfield_assignment_op): Likewise.
14419         * fold-const.c (optimize_bit_field_compare): Likewise.
14420         (fold_truth_andor_1): Likewise.
14421         * stor-layout.c (bit_field_mode_iterator::next_mode): As above.
14422         Update for new type of m_mode.
14423         (get_best_mode): As above.
14424
14425 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14426             Alan Hayward  <alan.hayward@arm.com>
14427             David Sherwood  <david.sherwood@arm.com>
14428
14429         * expmed.c (strict_volatile_bitfield_p): Change the type of fieldmode
14430         to scalar_int_mode.  Remove check for SCALAR_INT_MODE_P.
14431         (store_bit_field): Check is_a <scalar_int_mode> before calling
14432         strict_volatile_bitfield_p.
14433         (extract_bit_field): Likewise.
14434
14435 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14436             Alan Hayward  <alan.hayward@arm.com>
14437             David Sherwood  <david.sherwood@arm.com>
14438
14439         * target.def (cstore_mode): Return a scalar_int_mode.
14440         * doc/tm.texi: Regenerate.
14441         * config/sparc/sparc.c (sparc_cstore_mode): Return a scalar_int_mode.
14442         * targhooks.h (default_cstore_mode): Likewise.
14443         * targhooks.c (default_cstore_mode): Likewise, using a forced
14444         conversion.
14445         * expmed.c (emit_cstore): Expect the target of the cstore to be
14446         a scalar_int_mode.
14447
14448 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14449             Alan Hayward  <alan.hayward@arm.com>
14450             David Sherwood  <david.sherwood@arm.com>
14451
14452         * cfgloop.h (rtx_iv): Change type of extend_mode and mode to
14453         scalar_int_mode.
14454         (niter_desc): Likewise mode.
14455         (iv_analyze): Add a mode parameter.
14456         (biv_p): Likewise.
14457         (iv_analyze_expr): Pass the mode paraeter before the rtx it describes
14458         and change its type to scalar_int_mode.
14459         * loop-iv.c: Update commentary at head of file.
14460         (iv_constant): Pass the mode paraeter before the rtx it describes
14461         and change its type to scalar_int_mode.  Remove VOIDmode handling.
14462         (iv_subreg): Change the type of the mode parameter to scalar_int_mode.
14463         (iv_extend): Likewise.
14464         (shorten_into_mode): Likewise.
14465         (iv_add): Use scalar_int_mode.
14466         (iv_mult): Likewise.
14467         (iv_shift): Likewise.
14468         (canonicalize_iv_subregs): Likewise.
14469         (get_biv_step_1): Pass the outer_mode parameter before the rtx
14470         it describes and change its mode to scalar_int_mode.   Also change
14471         the type of the returned inner_mode to scalar_int_mode.
14472         (get_biv_step): Likewise, turning outer_mode from a pointer
14473         into a direct parameter.  Update call to get_biv_step_1.
14474         (iv_analyze_biv): Add an outer_mode parameter.  Update calls to
14475         iv_constant and get_biv_step.
14476         (iv_analyze_expr): Pass the mode parameter before the rtx it describes
14477         and change its type to scalar_int_mode.  Don't initialise iv->mode
14478         to VOIDmode and remove later checks for its still being VOIDmode.
14479         Update calls to iv_analyze_op and iv_analyze_expr.  Check
14480         is_a <scalar_int_mode> when changing the mode under consideration.
14481         (iv_analyze_def): Ignore registers that don't have a scalar_int_mode.
14482         Update call to iv_analyze_expr.
14483         (iv_analyze_op): Add a mode parameter.  Reject subregs whose
14484         inner register is not also a scalar_int_mode.  Update call to
14485         iv_analyze_biv.
14486         (iv_analyze): Add a mode parameter.  Update call to iv_analyze_op.
14487         (biv_p): Add a mode parameter.  Update call to iv_analyze_biv.
14488         (iv_number_of_iterations): Use is_a <scalar_int_mode> instead of
14489         separate mode class checks.  Update calls to iv_analyze.  Remove
14490         fix-up of VOIDmodes after iv_analyze_biv.
14491         * loop-unroll.c (analyze_iv_to_split_insn): Reject registers that
14492         don't have a scalar_int_mode.  Update call to biv_p.
14493
14494 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14495             Alan Hayward  <alan.hayward@arm.com>
14496             David Sherwood  <david.sherwood@arm.com>
14497
14498         * cfgexpand.c (convert_debug_memory_address): Use
14499         as_a <scalar_int_mode>.
14500         * combine.c (expand_compound_operation): Likewise.
14501         (make_extraction): Likewise.
14502         (change_zero_ext): Likewise.
14503         (simplify_comparison): Likewise.
14504         * cse.c (cse_insn): Likewise.
14505         * dwarf2out.c (minmax_loc_descriptor): Likewise.
14506         (mem_loc_descriptor): Likewise.
14507         (loc_descriptor): Likewise.
14508         * expmed.c (init_expmed_one_mode): Likewise.
14509         (synth_mult): Likewise.
14510         (emit_store_flag_1): Likewise.
14511         (expand_divmod): Likewise.  Use HWI_COMPUTABLE_MODE_P instead
14512         of a comparison with size.
14513         * expr.c (expand_assignment): Use as_a <scalar_int_mode>.
14514         (reduce_to_bit_field_precision): Likewise.
14515         * function.c (expand_function_end): Likewise.
14516         * internal-fn.c (expand_arith_overflow_result_store): Likewise.
14517         * loop-doloop.c (doloop_modify): Likewise.
14518         * optabs.c (expand_binop): Likewise.
14519         (expand_unop): Likewise.
14520         (expand_copysign_absneg): Likewise.
14521         (prepare_cmp_insn): Likewise.
14522         (maybe_legitimize_operand): Likewise.
14523         * recog.c (const_scalar_int_operand): Likewise.
14524         * rtlanal.c (get_address_mode): Likewise.
14525         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
14526         (simplify_cond_clz_ctz): Likewise.
14527         * tree-nested.c (get_nl_goto_field): Likewise.
14528         * tree.c (build_vector_type_for_mode): Likewise.
14529         * var-tracking.c (use_narrower_mode): Likewise.
14530
14531 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14532             Alan Hayward  <alan.hayward@arm.com>
14533             David Sherwood  <david.sherwood@arm.com>
14534
14535         * tree.h (SCALAR_INT_TYPE_MODE): New macro.
14536         * builtins.c (expand_builtin_signbit): Use it.
14537         * cfgexpand.c (expand_debug_expr): Likewise.
14538         * dojump.c (do_jump): Likewise.
14539         (do_compare_and_jump): Likewise.
14540         * dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Likewise.
14541         * expmed.c (make_tree): Likewise.
14542         * expr.c (expand_expr_real_2): Likewise.
14543         (expand_expr_real_1): Likewise.
14544         (try_casesi): Likewise.
14545         * fold-const-call.c (fold_const_call_ss): Likewise.
14546         * fold-const.c (unextend): Likewise.
14547         (extract_muldiv_1): Likewise.
14548         (fold_single_bit_test): Likewise.
14549         (native_encode_int): Likewise.
14550         (native_encode_string): Likewise.
14551         (native_interpret_int): Likewise.
14552         * gimple-fold.c (gimple_fold_builtin_memset): Likewise.
14553         * internal-fn.c (expand_addsub_overflow): Likewise.
14554         (expand_neg_overflow): Likewise.
14555         (expand_mul_overflow): Likewise.
14556         (expand_arith_overflow): Likewise.
14557         * match.pd: Likewise.
14558         * stor-layout.c (layout_type): Likewise.
14559         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
14560         * tree-ssa-math-opts.c (convert_mult_to_widen): Likewise.
14561         * tree-ssanames.c (get_range_info): Likewise.
14562         * tree-switch-conversion.c (array_value_type) Likewise.
14563         * tree-vect-patterns.c (vect_recog_rotate_pattern): Likewise.
14564         (vect_recog_divmod_pattern): Likewise.
14565         (vect_recog_mixed_size_cond_pattern): Likewise.
14566         * tree-vrp.c (extract_range_basic): Likewise.
14567         (simplify_float_conversion_using_ranges): Likewise.
14568         * tree.c (int_fits_type_p): Likewise.
14569         * ubsan.c (instrument_bool_enum_load): Likewise.
14570         * varasm.c (mergeable_string_section): Likewise.
14571         (narrowing_initializer_constant_valid_p): Likewise.
14572         (output_constant): Likewise.
14573
14574 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14575             Alan Hayward  <alan.hayward@arm.com>
14576             David Sherwood  <david.sherwood@arm.com>
14577
14578         * machmode.h (NARROWEST_INT_MODE): New macro.
14579         * expr.c (alignment_for_piecewise_move): Use it instead of
14580         GET_CLASS_NARROWEST_MODE (MODE_INT).
14581         (push_block): Likewise.
14582         * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
14583         Likewise.
14584         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
14585
14586 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14587             Alan Hayward  <alan.hayward@arm.com>
14588             David Sherwood  <david.sherwood@arm.com>
14589
14590         * postreload.c (move2add_valid_value_p): Change the type of the
14591         mode parameter to scalar_int_mode.
14592         (move2add_use_add2_insn): Add a mode parameter and use it instead
14593         of GET_MODE (reg).
14594         (move2add_use_add3_insn): Likewise.
14595         (reload_cse_move2add): Update accordingly.
14596
14597 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14598             Alan Hayward  <alan.hayward@arm.com>
14599             David Sherwood  <david.sherwood@arm.com>
14600
14601         * expr.c (expand_expr_real_2): Use scalar_int_mode for the
14602         double-word mode.
14603         * lower-subreg.c (resolve_shift_zext): Use is_a <scalar_int_mode>.
14604         * optabs.c (expand_unop): Likewise.
14605
14606 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14607             Alan Hayward  <alan.hayward@arm.com>
14608             David Sherwood  <david.sherwood@arm.com>
14609
14610         * dwarf2out.c (typed_binop): Change mode parameter to scalar_int_mode.
14611         (clz_loc_descriptor): Likewise.  Remove SCALAR_INT_MODE_P check.
14612         (popcount_loc_descriptor): Likewise.
14613         (bswap_loc_descriptor): Likewise.
14614         (rotate_loc_descriptor): Likewise.
14615         (mem_loc_descriptor): Add is_a <scalar_int_mode> checks before
14616         calling the functions above.
14617
14618 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14619             Alan Hayward  <alan.hayward@arm.com>
14620             David Sherwood  <david.sherwood@arm.com>
14621
14622         * combine.c (sign_extend_short_imm): Add is_a <scalar_int_mode>
14623         checks.
14624         (try_combine): Likewise.
14625         (simplify_if_then_else): Likewise.
14626         * cse.c (cse_insn): Likewise.
14627         * dwarf2out.c (mem_loc_descriptor): Likewise.
14628         * emit-rtl.c (gen_lowpart_common): Likewise.
14629         * simplify-rtx.c (simplify_truncation): Likewise.
14630         (simplify_binary_operation_1): Likewise.
14631         (simplify_const_relational_operation): Likewise.
14632         (simplify_ternary_operation): Likewise.
14633         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
14634
14635 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14636             Alan Hayward  <alan.hayward@arm.com>
14637             David Sherwood  <david.sherwood@arm.com>
14638
14639         * cse.c (cse_insn): Add is_a <scalar_int_mode> checks.
14640         * reload.c (push_reload): Likewise.
14641         (find_reloads): Likewise.
14642
14643 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14644             Alan Hayward  <alan.hayward@arm.com>
14645             David Sherwood  <david.sherwood@arm.com>
14646
14647         * combine.c (find_split_point): Add is_a <scalar_int_mode> checks.
14648         (make_compound_operation_int): Likewise.
14649         (change_zero_ext): Likewise.
14650         * expr.c (convert_move): Likewise.
14651         (convert_modes): Likewise.
14652         * fwprop.c (forward_propagate_subreg): Likewise.
14653         * loop-iv.c (get_biv_step_1): Likewise.
14654         * optabs.c (widen_operand): Likewise.
14655         * postreload.c (move2add_valid_value_p): Likewise.
14656         * recog.c (simplify_while_replacing): Likewise.
14657         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
14658         (simplify_binary_operation_1): Likewise.  Remove redundant
14659         mode equality check.
14660
14661 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14662             Alan Hayward  <alan.hayward@arm.com>
14663             David Sherwood  <david.sherwood@arm.com>
14664
14665         * combine.c (combine_simplify_rtx): Add checks for
14666         is_a <scalar_int_mode>.
14667         (simplify_if_then_else): Likewise.
14668         (make_field_assignment): Likewise.
14669         (simplify_comparison): Likewise.
14670         * ifcvt.c (noce_try_bitop): Likewise.
14671         * loop-invariant.c (canonicalize_address_mult): Likewise.
14672         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
14673
14674 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14675             Alan Hayward  <alan.hayward@arm.com>
14676             David Sherwood  <david.sherwood@arm.com>
14677
14678         * gimple-fold.c (gimple_fold_builtin_memory_op): Use
14679         is_a <scalar_int_mode> instead of != BLKmode.
14680
14681 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14682             Alan Hayward  <alan.hayward@arm.com>
14683             David Sherwood  <david.sherwood@arm.com>
14684
14685         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>
14686         instead of != VOIDmode.
14687         * combine.c (if_then_else_cond): Likewise.
14688         (change_zero_ext): Likewise.
14689         * dwarf2out.c (mem_loc_descriptor): Likewise.
14690         (loc_descriptor): Likewise.
14691         * rtlanal.c (canonicalize_condition): Likewise.
14692         * simplify-rtx.c (simplify_relational_operation_1): Likewise.
14693
14694 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14695             Alan Hayward  <alan.hayward@arm.com>
14696             David Sherwood  <david.sherwood@arm.com>
14697
14698         * simplify-rtx.c (simplify_binary_operation_1): Use
14699         is_a <scalar_int_mode> instead of !VECTOR_MODE_P.
14700
14701 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14702             Alan Hayward  <alan.hayward@arm.com>
14703             David Sherwood  <david.sherwood@arm.com>
14704
14705         * wide-int.h (int_traits<unsigned char>) New class.
14706         (int_traits<unsigned short>) Likewise.
14707         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>.
14708         Use GET_MODE_UNIT_PRECISION and remove redundant test for
14709         SCALAR_INT_MODE_P.
14710         * combine.c (set_nonzero_bits_and_sign_copies): Use
14711         is_a <scalar_int_mode>.
14712         (find_split_point): Likewise.
14713         (combine_simplify_rtx): Likewise.
14714         (simplify_logical): Likewise.
14715         (expand_compound_operation): Likewise.
14716         (expand_field_assignment): Likewise.
14717         (make_compound_operation): Likewise.
14718         (extended_count): Likewise.
14719         (change_zero_ext): Likewise.
14720         (simplify_comparison): Likewise.
14721         * dwarf2out.c (scompare_loc_descriptor): Likewise.
14722         (ucompare_loc_descriptor): Likewise.
14723         (minmax_loc_descriptor): Likewise.
14724         (mem_loc_descriptor): Likewise.
14725         (loc_descriptor): Likewise.
14726         * expmed.c (init_expmed_one_mode): Likewise.
14727         * lra-constraints.c (lra_constraint_offset): Likewise.
14728         * optabs.c (prepare_libcall_arg): Likewise.
14729         * postreload.c (move2add_note_store): Likewise.
14730         * reload.c (operands_match_p): Likewise.
14731         * rtl.h (load_extend_op): Likewise.
14732         * rtlhooks.c (gen_lowpart_general): Likewise.
14733         * simplify-rtx.c (simplify_truncation): Likewise.
14734         (simplify_unary_operation_1): Likewise.
14735         (simplify_binary_operation_1): Likewise.
14736         (simplify_const_binary_operation): Likewise.
14737         (simplify_const_relational_operation): Likewise.
14738         (simplify_subreg): Likewise.
14739         * stor-layout.c (bitwise_mode_for_mode): Likewise.
14740         * var-tracking.c (adjust_mems): Likewise.
14741         (prepare_call_arguments): Likewise.
14742
14743 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14744             Alan Hayward  <alan.hayward@arm.com>
14745             David Sherwood  <david.sherwood@arm.com>
14746
14747         * machmode.h (is_int_mode): New fuction.
14748         * combine.c (find_split_point): Use it.
14749         (combine_simplify_rtx): Likewise.
14750         (simplify_if_then_else): Likewise.
14751         (simplify_set): Likewise.
14752         (simplify_shift_const_1): Likewise.
14753         (simplify_comparison): Likewise.
14754         * config/aarch64/aarch64.c (aarch64_rtx_costs): Likewise.
14755         * cse.c (notreg_cost): Likewise.
14756         (cse_insn): Likewise.
14757         * cselib.c (cselib_lookup_1): Likewise.
14758         * dojump.c (do_jump_1): Likewise.
14759         (do_compare_rtx_and_jump): Likewise.
14760         * dse.c (get_call_args): Likewise.
14761         * dwarf2out.c (rtl_for_decl_init): Likewise.
14762         (native_encode_initializer): Likewise.
14763         * expmed.c (emit_store_flag_1): Likewise.
14764         (emit_store_flag): Likewise.
14765         * expr.c (convert_modes): Likewise.
14766         (store_field): Likewise.
14767         (expand_expr_real_1): Likewise.
14768         * fold-const.c (fold_read_from_constant_string): Likewise.
14769         * gimple-ssa-sprintf.c (get_format_string): Likewise.
14770         * optabs-libfuncs.c (gen_int_libfunc): Likewise.
14771         * optabs.c (expand_binop): Likewise.
14772         (expand_unop): Likewise.
14773         (expand_abs_nojump): Likewise.
14774         (expand_one_cmpl_abs_nojump): Likewise.
14775         * simplify-rtx.c (mode_signbit_p): Likewise.
14776         (val_signbit_p): Likewise.
14777         (val_signbit_known_set_p): Likewise.
14778         (val_signbit_known_clear_p): Likewise.
14779         (simplify_relational_operation_1): Likewise.
14780         * tree.c (vector_type_mode): Likewise.
14781
14782 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14783             Alan Hayward  <alan.hayward@arm.com>
14784             David Sherwood  <david.sherwood@arm.com>
14785
14786         * machmode.h (smallest_mode_for_size): Fix formatting.
14787         (smallest_int_mode_for_size): New function.
14788         * cfgexpand.c (expand_debug_expr): Use smallest_int_mode_for_size
14789         instead of smallest_mode_for_size.
14790         * combine.c (make_extraction): Likewise.
14791         * config/arc/arc.c (arc_expand_movmem): Likewise.
14792         * config/arm/arm.c (arm_expand_divmod_libfunc): Likewise.
14793         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
14794         * config/s390/s390.c (s390_expand_insv): Likewise.
14795         * config/sparc/sparc.c (assign_int_registers): Likewise.
14796         * config/spu/spu.c (spu_function_value): Likewise.
14797         (spu_function_arg): Likewise.
14798         * coverage.c (get_gcov_type): Likewise.
14799         (get_gcov_unsigned_t): Likewise.
14800         * dse.c (find_shift_sequence): Likewise.
14801         * expmed.c (store_bit_field_1): Likewise.
14802         * expr.c (convert_move): Likewise.
14803         (store_field): Likewise.
14804         * internal-fn.c (expand_arith_overflow): Likewise.
14805         * optabs-query.c (get_best_extraction_insn): Likewise.
14806         * optabs.c (expand_twoval_binop_libfunc): Likewise.
14807         * stor-layout.c (layout_type): Likewise.
14808         (initialize_sizetypes): Likewise.
14809         * targhooks.c (default_get_mask_mode): Likewise.
14810         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Likewise.
14811
14812 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14813             Alan Hayward  <alan.hayward@arm.com>
14814             David Sherwood  <david.sherwood@arm.com>
14815
14816         * machmode.h (opt_mode::else_blk): New function.
14817         (int_mode_for_mode): Declare.
14818         * stor-layout.c (int_mode_for_mode): Return an opt_scalar_int_mode.
14819         * builtins.c (expand_builtin_signbit): Adjust for new int_mode_for_mode
14820         return type.
14821         * cfgexpand.c (expand_debug_expr): Likewise.
14822         * combine.c (gen_lowpart_or_truncate): Likewise.
14823         (gen_lowpart_for_combine): Likewise.
14824         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Likewise.
14825         * config/avr/avr.c (avr_to_int_mode): Likewise.
14826         (avr_out_plus_1): Likewise.
14827         (avr_out_plus): Likewise.
14828         (avr_out_round): Likewise.
14829         * config/i386/i386.c (ix86_split_to_parts): Likewise.
14830         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
14831         (s390_expand_vcond): Likewise.
14832         * config/spu/spu.c (spu_split_immediate): Likewise.
14833         (spu_expand_mov): Likewise.
14834         * dse.c (get_stored_val): Likewise.
14835         * expmed.c (store_bit_field_1): Likewise.
14836         (convert_extracted_bit_field): Use int_mode_for_mode instead of
14837         int_mode_for_size.
14838         (extract_bit_field_1): Adjust for new int_mode_for_mode return type.
14839         (extract_low_bits): Likewise.
14840         * expr.c (emit_group_load_1): Likewise.  Separate out the BLKmode
14841         handling rather than repeating the check.
14842         (emit_group_store): Likewise.
14843         (emit_move_via_integer): Adjust for new int_mode_for_mode return type.
14844         * optabs.c (expand_absneg_bit): Likewise.
14845         (expand_copysign_absneg): Likewise.
14846         (expand_copysign_bit): Likewise.
14847         * tree-if-conv.c (ifcvt_can_use_mask_load_store): Likewise.
14848         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
14849         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
14850         * var-tracking.c (prepare_call_arguments):  Likewise.
14851         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Use
14852         int_mode_for_mode instead of mode_for_size.
14853         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
14854
14855 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14856             Alan Hayward  <alan.hayward@arm.com>
14857             David Sherwood  <david.sherwood@arm.com>
14858
14859         * machmode.h (int_mode_for_size): New function.
14860         * builtins.c (set_builtin_user_assembler_name): Use int_mode_for_size
14861         instead of mode_for_size.
14862         * calls.c (save_fixed_argument_area): Likewise.  Make use of BLKmode
14863         explicit.
14864         * combine.c (expand_field_assignment): Use int_mode_for_size
14865         instead of mode_for_size.
14866         (make_extraction): Likewise.
14867         (simplify_shift_const_1): Likewise.
14868         (simplify_comparison): Likewise.
14869         * dojump.c (do_jump): Likewise.
14870         * dwarf2out.c (mem_loc_descriptor): Likewise.
14871         * emit-rtl.c (init_derived_machine_modes): Likewise.
14872         * expmed.c (flip_storage_order): Likewise.
14873         (convert_extracted_bit_field): Likewise.
14874         * expr.c (copy_blkmode_from_reg): Likewise.
14875         * graphite-isl-ast-to-gimple.c (max_mode_int_precision): Likewise.
14876         * internal-fn.c (expand_mul_overflow): Likewise.
14877         * lower-subreg.c (simple_move): Likewise.
14878         * optabs-libfuncs.c (init_optabs): Likewise.
14879         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
14880         * tree.c (vector_type_mode): Likewise.
14881         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
14882         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Likewise.
14883         * tree-vect-generic.c (expand_vector_parallel): Likewise.
14884         * tree-vect-stmts.c (vectorizable_load): Likewise.
14885         (vectorizable_store): Likewise.
14886
14887 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14888             Alan Hayward  <alan.hayward@arm.com>
14889             David Sherwood  <david.sherwood@arm.com>
14890
14891         * coretypes.h (pod_mode): New type.
14892         (scalar_int_mode_pod): New typedef.
14893         * machmode.h (pod_mode): New class.
14894         (int_n_data_t::m): Change type to scalar_int_mode_pod.
14895         * genmodes.c (emit_mode_int_n): Update accordingly.
14896         * lower-subreg.h (target_lower_subreg): Change type to
14897         scalar_int_mode_pod.
14898         * gdbhooks.py (build_pretty_printer): Handle pod_mode and
14899         scalar_int_mode_pod.
14900
14901 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14902             Alan Hayward  <alan.hayward@arm.com>
14903             David Sherwood  <david.sherwood@arm.com>
14904
14905         * config/powerpcspe/powerpcspe.h (rs6000_pmode): Change type from
14906         machine_mode to scalar_int_mode.
14907         * config/powerpcspe/powerpcspe.c (rs6000_pmode): Likewise.
14908         (rs6000_option_override_internal): Remove cast to int.
14909         * config/rs6000/rs6000.h (rs6000_pmode): Change type from
14910         machine_mode to scalar_int_mode.
14911         * config/rs6000/rs6000.c (rs6000_pmode): Likewise.
14912         (rs6000_option_override_internal): Remove cast to int.
14913         * config/s390/s390.h (Pmode): Remove cast to machine_mode.
14914         * config/epiphany/epiphany.h (RTX_OK_FOR_OFFSET_P): Add cast
14915         to machine_mode.
14916         * config/s390/s390.c (s390_expand_builtin): Likewise.
14917         * coretypes.h (scalar_int_mode): New type.
14918         (opt_scalar_int_mode): New typedef.
14919         * machmode.h (scalar_int_mode): New class.
14920         (scalar_int_mode::includes_p): New function.
14921         (byte_mode): Change type to scalar_int_mode.
14922         (word_mode): Likewise.
14923         (ptr_mode): Likewise.
14924         * emit-rtl.c (byte_mode): Likewise.
14925         (word_mode): Likewise.
14926         (ptr_mode): Likewise.
14927         (init_derived_machine_modes): Update accordingly.
14928         * genmodes.c (get_mode_class): Return scalar_int_mode for MODE_INT
14929         and MODE_PARTIAL_INT.
14930         * gdbhooks.py (build_pretty_printer): Handle scalar_int_mode and
14931         opt_scalar_int_mode.
14932
14933 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14934             Alan Hayward  <alan.hayward@arm.com>
14935             David Sherwood  <david.sherwood@arm.com>
14936
14937         * target.def (libgcc_floating_mode_supported_p): Take a
14938         scalar_float_mode.
14939         * doc/tm.texi: Regenerate.
14940         * targhooks.h (default_libgcc_floating_mode_supported_p): Take a
14941         scalar_float_mode.
14942         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
14943         * config/aarch64/aarch64.c (aarch64_libgcc_floating_mode_supported_p):
14944         Likewise.
14945
14946 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14947             Alan Hayward  <alan.hayward@arm.com>
14948             David Sherwood  <david.sherwood@arm.com>
14949
14950         * target.def (default_floatn_mode): Return an opt_scalar_float_mode.
14951         * doc/tm.texi: Regenerate.
14952         * config/arm/arm.c (arm_floatn_mode): Return an opt_scalar_float_mode.
14953         * config/powerpcspe/powerpcspe.c (rs6000_floatn_mode): Likewise.
14954         * config/rs6000/rs6000.c (rs6000_floatn_mode): Likewise.
14955         * targhooks.h (default_floatn_mode): Likewise.
14956         * targhooks.c (default_floatn_mode): Likewise.
14957         * tree.c (build_common_tree_nodes): Update accordingly.
14958
14959 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14960             Alan Hayward  <alan.hayward@arm.com>
14961             David Sherwood  <david.sherwood@arm.com>
14962
14963         * machmode.h (mode_iterator::start): Provide overload for opt_modes.
14964         (mode_iterator::iterate_p): Likewise.
14965         (mode_iterator::get_wider): Likewise.
14966         * expr.c (init_expr_target): Use opt_scalar_float_mode.
14967
14968 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14969             Alan Hayward  <alan.hayward@arm.com>
14970             David Sherwood  <david.sherwood@arm.com>
14971
14972         * coretypes.h (opt_scalar_float_mode): New typedef.
14973         * machmode.h (float_mode_for_size): New function.
14974         * emit-rtl.c (double_mode): Delete.
14975         (init_emit_once): Use float_mode_for_size.
14976         * stor-layout.c (layout_type): Likewise.
14977         * gdbhooks.py (build_pretty_printer): Handle opt_scalar_float_mode.
14978
14979 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14980             Alan Hayward  <alan.hayward@arm.com>
14981             David Sherwood  <david.sherwood@arm.com>
14982
14983         * output.h (assemble_real): Take a scalar_float_mode.
14984         * config/arm/arm.c (arm_assemble_integer): Update accordingly.
14985         * config/arm/arm.md (consttable_4): Likewise.
14986         (consttable_8): Likewise.
14987         (consttable_16): Likewise.
14988         * config/mips/mips.md (consttable_float): Likewise.
14989         * config/s390/s390.c (s390_output_pool_entry): Likewise.
14990         * varasm.c (assemble_real): Take a scalar_float_mode.
14991         (output_constant_pool_2): Update accordingly.
14992         (output_constant): Likewise.
14993
14994 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14995             Alan Hayward  <alan.hayward@arm.com>
14996             David Sherwood  <david.sherwood@arm.com>
14997
14998         * tree.h (SCALAR_FLOAT_TYPE_MODE): New macro.
14999         * builtins.c (expand_builtin_signbit): Use it instead of TYPE_MODE.
15000         * fold-const.c (fold_convert_const_real_from_fixed): Likewise.
15001         (native_encode_real): Likewise.
15002         (native_interpret_real): Likewise.
15003         * hsa-brig.c (emit_immediate_scalar_to_buffer): Likewise.
15004         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
15005
15006 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15007             Alan Hayward  <alan.hayward@arm.com>
15008             David Sherwood  <david.sherwood@arm.com>
15009
15010         * optabs-libfuncs.c (gen_trunc_conv_libfunc): Use is_a
15011         <scalar_float_mode>.  Simplify.
15012         (gen_extend_conv_libfunc): Likewise.
15013
15014 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15015             Alan Hayward  <alan.hayward@arm.com>
15016             David Sherwood  <david.sherwood@arm.com>
15017
15018         * coretypes.h (scalar_float_mode): New type.
15019         * machmode.h (mode_traits::from_int): Use machine_mode if
15020         USE_ENUM_MODES is defined.
15021         (is_a): New function.
15022         (as_a): Likewise.
15023         (dyn_cast): Likewise.
15024         (scalar_float_mode): New class.
15025         (scalar_float_mode::includes_p): New function.
15026         (is_float_mode): Likewise.
15027         * gdbhooks.py (MachineModePrinter): New class.
15028         (build_pretty_printer): Use it for scalar_float_mode.
15029         * real.h (FLOAT_MODE_FORMAT): Use as_a <scalar_float_mode>.
15030         (format_helper::format_helper): Turn into a template.
15031         * genmodes.c (get_mode_class): New function.
15032         (emit_insn_modes_h): Give modes the class returned by get_mode_class,
15033         or machine_mode if none.
15034         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Use
15035         as_a <scalar_float_mode>.
15036         * dwarf2out.c (mem_loc_descriptor): Likewise.
15037         (insert_float): Likewise.
15038         (add_const_value_attribute): Likewise.
15039         * simplify-rtx.c (simplify_immed_subreg): Likewise.
15040         * optabs.c (expand_absneg_bit): Take a scalar_float_mode.
15041         (expand_unop): Update accordingly.
15042         (expand_abs_nojump): Likewise.
15043         (expand_copysign_absneg): Take a scalar_float_mode.
15044         (expand_copysign_bit): Likewise.
15045         (expand_copysign): Update accordingly.
15046
15047 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15048             Alan Hayward  <alan.hayward@arm.com>
15049             David Sherwood  <david.sherwood@arm.com>
15050
15051         * coretypes.h (opt_mode): New class.
15052         * machmode.h (opt_mode): Likewise.
15053         (opt_mode::else_void): New function.
15054         (opt_mode::require): Likewise.
15055         (opt_mode::exists): Likewise.
15056         (GET_MODE_WIDER_MODE): Turn into a function and return an opt_mode.
15057         (GET_MODE_2XWIDER_MODE): Likewise.
15058         (mode_iterator::get_wider): Update accordingly.
15059         (mode_iterator::get_2xwider): Likewise.
15060         (mode_iterator::get_known_wider): Likewise, turning into a template.
15061         * combine.c (make_extraction): Update use of GET_MODE_WIDER_MODE,
15062         forcing a wider mode to exist.
15063         * config/cr16/cr16.h (LONG_REG_P): Likewise.
15064         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
15065         * config/c6x/c6x.c (c6x_rtx_costs): Update use of
15066         GET_MODE_2XWIDER_MODE, forcing a wider mode to exist.
15067         * lower-subreg.c (init_lower_subreg): Likewise.
15068         * optabs-libfuncs.c (init_sync_libfuncs_1): Likewise, but not
15069         on the final iteration.
15070         * config/i386/i386.c (ix86_expand_set_or_movmem): Check whether
15071         a wider mode exists before asking for a move pattern.
15072         (get_mode_wider_vector): Update use of GET_MODE_WIDER_MODE,
15073         forcing a wider mode to exist.
15074         (expand_vselect_vconcat): Update use of GET_MODE_2XWIDER_MODE,
15075         returning false if no such mode exists.
15076         * config/ia64/ia64.c (expand_vselect_vconcat): Likewise.
15077         * config/mips/mips.c (mips_expand_vselect_vconcat): Likewise.
15078         * expmed.c (init_expmed_one_mode): Update use of GET_MODE_WIDER_MODE.
15079         Avoid checking for a MODE_INT if we already know the mode is not a
15080         SCALAR_INT_MODE_P.
15081         (extract_high_half): Update use of GET_MODE_WIDER_MODE,
15082         forcing a wider mode to exist.
15083         (expmed_mult_highpart_optab): Likewise.
15084         (expmed_mult_highpart): Likewise.
15085         * expr.c (expand_expr_real_2): Update use of GET_MODE_WIDER_MODE,
15086         using else_void.
15087         * lto-streamer-in.c (lto_input_mode_table): Likewise.
15088         * optabs-query.c (find_widening_optab_handler_and_mode): Likewise.
15089         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
15090         * internal-fn.c (expand_mul_overflow): Update use of
15091         GET_MODE_2XWIDER_MODE.
15092         * omp-low.c (omp_clause_aligned_alignment): Likewise.
15093         * tree-ssa-math-opts.c (convert_mult_to_widen): Update use of
15094         GET_MODE_WIDER_MODE.
15095         (convert_plusminus_to_widen): Likewise.
15096         * tree-switch-conversion.c (array_value_type): Likewise.
15097         * var-tracking.c (emit_note_insn_var_location): Likewise.
15098         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
15099         Return false inside rather than outside the loop if no wider mode
15100         exists
15101         * optabs.c (expand_binop): Update use of GET_MODE_WIDER_MODE
15102         and GET_MODE_2XWIDER_MODE
15103         (can_compare_p): Use else_void.
15104         * gdbhooks.py (OptMachineModePrinter): New class.
15105         (build_pretty_printer): Use it for opt_mode.
15106
15107 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15108             Alan Hayward  <alan.hayward@arm.com>
15109             David Sherwood  <david.sherwood@arm.com>
15110
15111         * tree-switch-conversion.c (array_value_type): Only read TYPE_MODE
15112         once.  Use get_narrowest_mode instead of GET_CLASS_NARROWEST_MODE.
15113
15114 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15115             Alan Hayward  <alan.hayward@arm.com>
15116             David Sherwood  <david.sherwood@arm.com>
15117
15118         * machmode.h (mode_traits): New structure.
15119         (get_narrowest_mode): New function.
15120         (mode_iterator::start): Likewise.
15121         (mode_iterator::iterate_p): Likewise.
15122         (mode_iterator::get_wider): Likewise.
15123         (mode_iterator::get_known_wider): Likewise.
15124         (mode_iterator::get_2xwider): Likewise.
15125         (FOR_EACH_MODE_IN_CLASS): New mode iterator.
15126         (FOR_EACH_MODE): Likewise.
15127         (FOR_EACH_MODE_FROM): Likewise.
15128         (FOR_EACH_MODE_UNTIL): Likewise.
15129         (FOR_EACH_WIDER_MODE): Likewise.
15130         (FOR_EACH_2XWIDER_MODE): Likewise.
15131         * builtins.c (expand_builtin_strlen): Use new mode iterators.
15132         * combine.c (simplify_comparison): Likewise
15133         * config/i386/i386.c (type_natural_mode): Likewise.
15134         * cse.c (cse_insn): Likewise.
15135         * dse.c (find_shift_sequence): Likewise.
15136         * emit-rtl.c (init_derived_machine_modes): Likewise.
15137         (init_emit_once): Likewise.
15138         * explow.c (hard_function_value): Likewise.
15139         * expmed.c (extract_fixed_bit_field_1): Likewise.
15140         (extract_bit_field_1): Likewise.
15141         (expand_divmod): Likewise.
15142         (emit_store_flag_1): Likewise.
15143         * expr.c (init_expr_target): Likewise.
15144         (convert_move): Likewise.
15145         (alignment_for_piecewise_move): Likewise.
15146         (widest_int_mode_for_size): Likewise.
15147         (emit_block_move_via_movmem): Likewise.
15148         (copy_blkmode_to_reg): Likewise.
15149         (set_storage_via_setmem): Likewise.
15150         (compress_float_constant): Likewise.
15151         * omp-low.c (omp_clause_aligned_alignment): Likewise.
15152         * optabs-query.c (get_best_extraction_insn): Likewise.
15153         * optabs.c (expand_binop): Likewise.
15154         (expand_twoval_unop): Likewise.
15155         (expand_twoval_binop): Likewise.
15156         (widen_leading): Likewise.
15157         (widen_bswap): Likewise.
15158         (expand_parity): Likewise.
15159         (expand_unop): Likewise.
15160         (prepare_cmp_insn): Likewise.
15161         (prepare_float_lib_cmp): Likewise.
15162         (expand_float): Likewise.
15163         (expand_fix): Likewise.
15164         (expand_sfix_optab): Likewise.
15165         * postreload.c (move2add_use_add2_insn): Likewise.
15166         * reg-stack.c (reg_to_stack): Likewise.
15167         * reginfo.c (choose_hard_reg_mode): Likewise.
15168         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
15169         * stor-layout.c (mode_for_size): Likewise.
15170         (smallest_mode_for_size): Likewise.
15171         (mode_for_vector): Likewise.
15172         (finish_bitfield_representative): Likewise.
15173         * tree-ssa-math-opts.c (target_supports_divmod_p): Likewise.
15174         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
15175         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
15176         * var-tracking.c (prepare_call_arguments): Likewise.
15177
15178 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15179             Alan Hayward  <alan.hayward@arm.com>
15180             David Sherwood  <david.sherwood@arm.com>
15181
15182         * genconditions.c (write_header): Add a "#define USE_ENUM_MODES".
15183         * genmodes.c (emit_insn_modes_h): Define FOOmode to E_FOOmode if
15184         USE_ENUM_MODES is defined and to ((void) 0, E_FOOmode) otherwise.
15185         * machmode.h (mode_size): Move earlier in file.
15186         (mode_precision): Likewise.
15187         (mode_inner): Likewise.
15188         (mode_nunits): Likewise.
15189         (mode_unit_size): Likewise.
15190         (unit_unit_precision): Likewise.
15191         (mode_wider): Likewise.
15192         (mode_2xwider): Likewise.
15193         (machine_mode): New class.
15194         (mode_to_bytes): New function.
15195         (mode_to_bits): Likewise.
15196         (mode_to_precision): Likewise.
15197         (mode_to_inner): Likewise.
15198         (mode_to_unit_size): Likewise.
15199         (mode_to_unit_precision): Likewise.
15200         (mode_to_nunits): Likewise.
15201         (GET_MODE_SIZE): Use mode_to_bytes.
15202         (GET_MODE_BITSIZE): Use mode_to_bits.
15203         (GET_MODE_PRECISION): Use mode_to_precision.
15204         (GET_MODE_INNER): Use mode_to_inner.
15205         (GET_MODE_UNIT_SIZE): Use mode_to_unit_size.
15206         (GET_MODE_UNIT_PRECISION): Use mode_to_unit_precision.
15207         (GET_MODE_NUNITS): Use mode_to_nunits.
15208         * system.h (ALWAYS_INLINE): New macro.
15209         * config/powerpcspe/powerpcspe-c.c
15210         (altivec_resolve_overloaded_builtin): Use machine_mode instead of
15211         int for arg1_mode and arg2_mode.
15212
15213 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15214             Alan Hayward  <alan.hayward@arm.com>
15215             David Sherwood  <david.sherwood@arm.com>
15216
15217         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
15218         Prefix mode names with E_ in case statements.
15219         * config/aarch64/aarch64-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15220         * config/aarch64/aarch64.c (aarch64_split_simd_combine): Likewise.
15221         (aarch64_split_simd_move): Likewise.
15222         (aarch64_gen_storewb_pair): Likewise.
15223         (aarch64_gen_loadwb_pair): Likewise.
15224         (aarch64_gen_store_pair): Likewise.
15225         (aarch64_gen_load_pair): Likewise.
15226         (aarch64_get_condition_code_1): Likewise.
15227         (aarch64_constant_pool_reload_icode): Likewise.
15228         (get_rsqrte_type): Likewise.
15229         (get_rsqrts_type): Likewise.
15230         (get_recpe_type): Likewise.
15231         (get_recps_type): Likewise.
15232         (aarch64_gimplify_va_arg_expr): Likewise.
15233         (aarch64_simd_container_mode): Likewise.
15234         (aarch64_emit_load_exclusive): Likewise.
15235         (aarch64_emit_store_exclusive): Likewise.
15236         (aarch64_expand_compare_and_swap): Likewise.
15237         (aarch64_gen_atomic_cas): Likewise.
15238         (aarch64_emit_bic): Likewise.
15239         (aarch64_emit_atomic_swap): Likewise.
15240         (aarch64_emit_atomic_load_op): Likewise.
15241         (aarch64_evpc_trn): Likewise.
15242         (aarch64_evpc_uzp): Likewise.
15243         (aarch64_evpc_zip): Likewise.
15244         (aarch64_evpc_ext): Likewise.
15245         (aarch64_evpc_rev): Likewise.
15246         (aarch64_evpc_dup): Likewise.
15247         (aarch64_gen_ccmp_first): Likewise.
15248         (aarch64_gen_ccmp_next): Likewise.
15249         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
15250         (alpha_emit_xfloating_libcall): Likewise.
15251         (emit_insxl): Likewise.
15252         (alpha_arg_type): Likewise.
15253         * config/arc/arc.c (arc_vector_mode_supported_p): Likewise.
15254         (arc_preferred_simd_mode): Likewise.
15255         (arc_secondary_reload): Likewise.
15256         (get_arc_condition_code): Likewise.
15257         (arc_print_operand): Likewise.
15258         (arc_legitimate_constant_p): Likewise.
15259         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15260         * config/arc/arc.md (casesi_load): Likewise.
15261         (casesi_compact_jump): Likewise.
15262         * config/arc/predicates.md (proper_comparison_operator): Likewise.
15263         (cc_use_register): Likewise.
15264         * config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15265         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
15266         (arm_init_iwmmxt_builtins): Likewise.
15267         * config/arm/arm.c (thumb1_size_rtx_costs): Likewise.
15268         (neon_expand_vector_init): Likewise.
15269         (arm_attr_length_move_neon): Likewise.
15270         (maybe_get_arm_condition_code): Likewise.
15271         (arm_emit_vector_const): Likewise.
15272         (arm_preferred_simd_mode): Likewise.
15273         (arm_output_iwmmxt_tinsr): Likewise.
15274         (thumb1_output_casesi): Likewise.
15275         (thumb2_output_casesi): Likewise.
15276         (arm_emit_load_exclusive): Likewise.
15277         (arm_emit_store_exclusive): Likewise.
15278         (arm_expand_compare_and_swap): Likewise.
15279         (arm_evpc_neon_vuzp): Likewise.
15280         (arm_evpc_neon_vzip): Likewise.
15281         (arm_evpc_neon_vrev): Likewise.
15282         (arm_evpc_neon_vtrn): Likewise.
15283         (arm_evpc_neon_vext): Likewise.
15284         (arm_validize_comparison): Likewise.
15285         * config/arm/neon.md (neon_vc<cmp_op><mode>): Likewise.
15286         * config/avr/avr-c.c (avr_resolve_overloaded_builtin): Likewise.
15287         * config/avr/avr.c (avr_rtx_costs_1): Likewise.
15288         * config/c6x/c6x.c (c6x_vector_mode_supported_p): Likewise.
15289         (c6x_preferred_simd_mode): Likewise.
15290         * config/epiphany/epiphany.c (get_epiphany_condition_code): Likewise.
15291         (epiphany_rtx_costs): Likewise.
15292         * config/epiphany/predicates.md (proper_comparison_operator):
15293         Likewise.
15294         * config/frv/frv.c (condexec_memory_operand): Likewise.
15295         (frv_emit_move): Likewise.
15296         (output_move_single): Likewise.
15297         (output_condmove_single): Likewise.
15298         (frv_hard_regno_mode_ok): Likewise.
15299         (frv_matching_accg_mode): Likewise.
15300         * config/h8300/h8300.c (split_adds_subs): Likewise.
15301         (h8300_rtx_costs): Likewise.
15302         (h8300_print_operand): Likewise.
15303         (compute_mov_length): Likewise.
15304         (output_logical_op): Likewise.
15305         (compute_logical_op_length): Likewise.
15306         (compute_logical_op_cc): Likewise.
15307         (h8300_shift_needs_scratch_p): Likewise.
15308         (output_a_shift): Likewise.
15309         (compute_a_shift_length): Likewise.
15310         (compute_a_shift_cc): Likewise.
15311         (expand_a_rotate): Likewise.
15312         (output_a_rotate): Likewise.
15313         * config/i386/i386.c (classify_argument): Likewise.
15314         (function_arg_advance_32): Likewise.
15315         (function_arg_32): Likewise.
15316         (function_arg_64): Likewise.
15317         (function_value_64): Likewise.
15318         (ix86_gimplify_va_arg): Likewise.
15319         (ix86_legitimate_constant_p): Likewise.
15320         (put_condition_code): Likewise.
15321         (split_double_mode): Likewise.
15322         (ix86_avx256_split_vector_move_misalign): Likewise.
15323         (ix86_expand_vector_logical_operator): Likewise.
15324         (ix86_split_idivmod): Likewise.
15325         (ix86_expand_adjust_ufix_to_sfix_si): Likewise.
15326         (ix86_build_const_vector): Likewise.
15327         (ix86_build_signbit_mask): Likewise.
15328         (ix86_match_ccmode): Likewise.
15329         (ix86_cc_modes_compatible): Likewise.
15330         (ix86_expand_branch): Likewise.
15331         (ix86_expand_sse_cmp): Likewise.
15332         (ix86_expand_sse_movcc): Likewise.
15333         (ix86_expand_int_sse_cmp): Likewise.
15334         (ix86_expand_vec_perm_vpermi2): Likewise.
15335         (ix86_expand_vec_perm): Likewise.
15336         (ix86_expand_sse_unpack): Likewise.
15337         (ix86_expand_int_addcc): Likewise.
15338         (ix86_split_to_parts): Likewise.
15339         (ix86_vectorize_builtin_gather): Likewise.
15340         (ix86_vectorize_builtin_scatter): Likewise.
15341         (avx_vpermilp_parallel): Likewise.
15342         (inline_memory_move_cost): Likewise.
15343         (ix86_tieable_integer_mode_p): Likewise.
15344         (x86_maybe_negate_const_int): Likewise.
15345         (ix86_expand_vector_init_duplicate): Likewise.
15346         (ix86_expand_vector_init_one_nonzero): Likewise.
15347         (ix86_expand_vector_init_one_var): Likewise.
15348         (ix86_expand_vector_init_concat): Likewise.
15349         (ix86_expand_vector_init_interleave): Likewise.
15350         (ix86_expand_vector_init_general): Likewise.
15351         (ix86_expand_vector_set): Likewise.
15352         (ix86_expand_vector_extract): Likewise.
15353         (emit_reduc_half): Likewise.
15354         (ix86_emit_i387_round): Likewise.
15355         (ix86_mangle_type): Likewise.
15356         (ix86_expand_round_sse4): Likewise.
15357         (expand_vec_perm_blend): Likewise.
15358         (canonicalize_vector_int_perm): Likewise.
15359         (ix86_expand_vec_one_operand_perm_avx512): Likewise.
15360         (expand_vec_perm_1): Likewise.
15361         (expand_vec_perm_interleave3): Likewise.
15362         (expand_vec_perm_even_odd_pack): Likewise.
15363         (expand_vec_perm_even_odd_1): Likewise.
15364         (expand_vec_perm_broadcast_1): Likewise.
15365         (ix86_vectorize_vec_perm_const_ok): Likewise.
15366         (ix86_expand_vecop_qihi): Likewise.
15367         (ix86_expand_mul_widen_hilo): Likewise.
15368         (ix86_expand_sse2_abs): Likewise.
15369         (ix86_expand_pextr): Likewise.
15370         (ix86_expand_pinsr): Likewise.
15371         (ix86_preferred_simd_mode): Likewise.
15372         (ix86_simd_clone_compute_vecsize_and_simdlen): Likewise.
15373         * config/i386/sse.md (*andnot<mode>3): Likewise.
15374         (<mask_codefor><code><mode>3<mask_name>): Likewise.
15375         (*<code><mode>3): Likewise.
15376         * config/ia64/ia64.c (ia64_expand_vecint_compare): Likewise.
15377         (ia64_expand_atomic_op): Likewise.
15378         (ia64_arg_type): Likewise.
15379         (ia64_mode_to_int): Likewise.
15380         (ia64_scalar_mode_supported_p): Likewise.
15381         (ia64_vector_mode_supported_p): Likewise.
15382         (expand_vec_perm_broadcast): Likewise.
15383         * config/iq2000/iq2000.c (iq2000_move_1word): Likewise.
15384         (iq2000_function_arg_advance): Likewise.
15385         (iq2000_function_arg): Likewise.
15386         * config/m32c/m32c.c (m32c_preferred_reload_class): Likewise.
15387         * config/m68k/m68k.c (output_dbcc_and_branch): Likewise.
15388         (m68k_libcall_value): Likewise.
15389         (m68k_function_value): Likewise.
15390         (sched_attr_op_type): Likewise.
15391         * config/mcore/mcore.c (mcore_output_move): Likewise.
15392         * config/microblaze/microblaze.c (microblaze_function_arg_advance):
15393         Likewise.
15394         (microblaze_function_arg): Likewise.
15395         * config/mips/mips.c (mips16_build_call_stub): Likewise.
15396         (mips_print_operand): Likewise.
15397         (mips_mode_ok_for_mov_fmt_p): Likewise.
15398         (mips_vector_mode_supported_p): Likewise.
15399         (mips_preferred_simd_mode): Likewise.
15400         (mips_expand_vpc_loongson_even_odd): Likewise.
15401         (mips_expand_vec_unpack): Likewise.
15402         (mips_expand_vi_broadcast): Likewise.
15403         (mips_expand_vector_init): Likewise.
15404         (mips_expand_vec_reduc): Likewise.
15405         (mips_expand_msa_cmp): Likewise.
15406         * config/mips/mips.md (casesi_internal_mips16_<mode>): Likewise.
15407         * config/mn10300/mn10300.c (mn10300_print_operand): Likewise.
15408         (cc_flags_for_mode): Likewise.
15409         * config/msp430/msp430.c (msp430_print_operand): Likewise.
15410         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Likewise.
15411         (nds32_output_casesi_pc_relative): Likewise.
15412         * config/nds32/nds32.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15413         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Likewise.
15414         (nvptx_gen_unpack): Likewise.
15415         (nvptx_gen_pack): Likewise.
15416         (nvptx_gen_shuffle): Likewise.
15417         (nvptx_gen_wcast): Likewise.
15418         (nvptx_preferred_simd_mode): Likewise.
15419         * config/pa/pa.c (pa_secondary_reload): Likewise.
15420         * config/pa/predicates.md (base14_operand): Likewise.
15421         * config/powerpcspe/powerpcspe-c.c
15422         (altivec_resolve_overloaded_builtin): Likewise.
15423         * config/powerpcspe/powerpcspe.c (rs6000_setup_reg_addr_masks):
15424         Likewise.
15425         (rs6000_preferred_simd_mode): Likewise.
15426         (output_vec_const_move): Likewise.
15427         (rs6000_expand_vector_extract): Likewise.
15428         (rs6000_split_vec_extract_var): Likewise.
15429         (reg_offset_addressing_ok_p): Likewise.
15430         (rs6000_legitimate_offset_address_p): Likewise.
15431         (rs6000_legitimize_address): Likewise.
15432         (rs6000_emit_set_const): Likewise.
15433         (rs6000_const_vec): Likewise.
15434         (rs6000_emit_move): Likewise.
15435         (spe_build_register_parallel): Likewise.
15436         (rs6000_darwin64_record_arg_recurse): Likewise.
15437         (swap_selector_for_mode): Likewise.
15438         (spe_init_builtins): Likewise.
15439         (paired_init_builtins): Likewise.
15440         (altivec_init_builtins): Likewise.
15441         (do_load_for_compare): Likewise.
15442         (rs6000_generate_compare): Likewise.
15443         (rs6000_expand_float128_convert): Likewise.
15444         (emit_load_locked): Likewise.
15445         (emit_store_conditional): Likewise.
15446         (rs6000_output_function_epilogue): Likewise.
15447         (rs6000_handle_altivec_attribute): Likewise.
15448         (rs6000_function_value): Likewise.
15449         (emit_fusion_gpr_load): Likewise.
15450         (emit_fusion_p9_load): Likewise.
15451         (emit_fusion_p9_store): Likewise.
15452         * config/powerpcspe/predicates.md (easy_fp_constant): Likewise.
15453         (fusion_gpr_mem_load): Likewise.
15454         (fusion_addis_mem_combo_load): Likewise.
15455         (fusion_addis_mem_combo_store): Likewise.
15456         * config/rs6000/predicates.md (easy_fp_constant): Likewise.
15457         (fusion_gpr_mem_load): Likewise.
15458         (fusion_addis_mem_combo_load): Likewise.
15459         (fusion_addis_mem_combo_store): Likewise.
15460         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
15461         Likewise.
15462         * config/rs6000/rs6000-string.c (do_load_for_compare): Likewise.
15463         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
15464         (rs6000_preferred_simd_mode): Likewise.
15465         (output_vec_const_move): Likewise.
15466         (rs6000_expand_vector_extract): Likewise.
15467         (rs6000_split_vec_extract_var): Likewise.
15468         (reg_offset_addressing_ok_p): Likewise.
15469         (rs6000_legitimate_offset_address_p): Likewise.
15470         (rs6000_legitimize_address): Likewise.
15471         (rs6000_emit_set_const): Likewise.
15472         (rs6000_const_vec): Likewise.
15473         (rs6000_emit_move): Likewise.
15474         (rs6000_darwin64_record_arg_recurse): Likewise.
15475         (swap_selector_for_mode): Likewise.
15476         (paired_init_builtins): Likewise.
15477         (altivec_init_builtins): Likewise.
15478         (rs6000_expand_float128_convert): Likewise.
15479         (emit_load_locked): Likewise.
15480         (emit_store_conditional): Likewise.
15481         (rs6000_output_function_epilogue): Likewise.
15482         (rs6000_handle_altivec_attribute): Likewise.
15483         (rs6000_function_value): Likewise.
15484         (emit_fusion_gpr_load): Likewise.
15485         (emit_fusion_p9_load): Likewise.
15486         (emit_fusion_p9_store): Likewise.
15487         * config/rx/rx.c (rx_gen_move_template): Likewise.
15488         (flags_from_mode): Likewise.
15489         * config/s390/predicates.md (s390_alc_comparison): Likewise.
15490         (s390_slb_comparison): Likewise.
15491         * config/s390/s390.c (s390_handle_vectorbool_attribute): Likewise.
15492         (s390_vector_mode_supported_p): Likewise.
15493         (s390_cc_modes_compatible): Likewise.
15494         (s390_match_ccmode_set): Likewise.
15495         (s390_canonicalize_comparison): Likewise.
15496         (s390_emit_compare_and_swap): Likewise.
15497         (s390_branch_condition_mask): Likewise.
15498         (s390_rtx_costs): Likewise.
15499         (s390_secondary_reload): Likewise.
15500         (__SECONDARY_RELOAD_CASE): Likewise.
15501         (s390_expand_cs): Likewise.
15502         (s390_preferred_simd_mode): Likewise.
15503         * config/s390/vx-builtins.md (vec_packsu_u<mode>): Likewise.
15504         * config/sh/sh.c (sh_print_operand): Likewise.
15505         (dump_table): Likewise.
15506         (sh_secondary_reload): Likewise.
15507         * config/sh/sh.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15508         * config/sh/sh.md (casesi_worker_1): Likewise.
15509         (casesi_worker_2): Likewise.
15510         * config/sparc/predicates.md (icc_comparison_operator): Likewise.
15511         (fcc_comparison_operator): Likewise.
15512         * config/sparc/sparc.c (sparc_expand_move): Likewise.
15513         (emit_soft_tfmode_cvt): Likewise.
15514         (sparc_preferred_simd_mode): Likewise.
15515         (output_cbranch): Likewise.
15516         (sparc_print_operand): Likewise.
15517         (sparc_expand_vec_perm_bmask): Likewise.
15518         (vector_init_bshuffle): Likewise.
15519         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
15520         (spu_vector_mode_supported_p): Likewise.
15521         (spu_expand_insv): Likewise.
15522         (spu_emit_branch_or_set): Likewise.
15523         (spu_handle_vector_attribute): Likewise.
15524         (spu_builtin_splats): Likewise.
15525         (spu_builtin_extract): Likewise.
15526         (spu_builtin_promote): Likewise.
15527         (spu_expand_sign_extend): Likewise.
15528         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
15529         (tilegx_simd_int): Likewise.
15530         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p): Likewise.
15531         (tilepro_simd_int): Likewise.
15532         * config/v850/v850.c (const_double_split): Likewise.
15533         (v850_print_operand): Likewise.
15534         (ep_memory_offset): Likewise.
15535         * config/vax/vax.c (vax_rtx_costs): Likewise.
15536         (vax_output_int_move): Likewise.
15537         (vax_output_int_add): Likewise.
15538         (vax_output_int_subtract): Likewise.
15539         * config/visium/predicates.md (visium_branch_operator): Likewise.
15540         * config/visium/visium.c (rtx_ok_for_offset_p): Likewise.
15541         (visium_print_operand_address): Likewise.
15542         * config/visium/visium.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15543         * config/xtensa/xtensa.c (xtensa_mem_offset): Likewise.
15544         (xtensa_expand_conditional_branch): Likewise.
15545         (xtensa_copy_incoming_a7): Likewise.
15546         (xtensa_output_literal): Likewise.
15547         * dfp.c (decimal_real_maxval): Likewise.
15548         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
15549
15550 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15551             Alan Hayward  <alan.hayward@arm.com>
15552             David Sherwood  <david.sherwood@arm.com>
15553
15554         * genmodes.c (mode_size_inline): Add an E_ prefix to mode names.
15555         (mode_nunits_inline): Likewise.
15556         (mode_inner_inline): Likewise.
15557         (mode_unit_size_inline): Likewise.
15558         (mode_unit_precision_inline): Likewise.
15559         (emit_insn_modes_h): Likewise.  Also emit a #define of the
15560         unprefixed name.
15561         (emit_mode_wider): Add an E_ prefix to mode names.
15562         (emit_mode_complex): Likewise.
15563         (emit_mode_inner): Likewise.
15564         (emit_mode_adjustments): Likewise.
15565         (emit_mode_int_n): Likewise.
15566         * config/aarch64/aarch64-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP)
15567         (v2si_UP, v2sf_UP, v1df_UP, di_UP, df_UP, v16qi_UP, v8hi_UP, v8hf_UP)
15568         (v4si_UP, v4sf_UP, v2di_UP, v2df_UP, ti_UP, oi_UP, ci_UP, xi_UP)
15569         (si_UP, sf_UP, hi_UP, hf_UP, qi_UP): Likewise.
15570         (CRC32_BUILTIN, ENTRY): Likewise.
15571         * config/aarch64/aarch64.c (aarch64_push_regs): Likewise.
15572         (aarch64_pop_regs): Likewise.
15573         (aarch64_process_components): Likewise.
15574         * config/alpha/alpha.c (alpha_emit_conditional_move): Likewise.
15575         * config/arm/arm-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP, v2si_UP)
15576         (v2sf_UP, di_UP, v16qi_UP, v8hi_UP, v8hf_UP, v4si_UP, v4sf_UP)
15577         (v2di_UP, ti_UP, ei_UP, oi_UP, hf_UP, si_UP, void_UP): Likewise.
15578         * config/arm/arm.c (arm_init_libfuncs): Likewise.
15579         * config/i386/i386-builtin-types.awk (ix86_builtin_type_vect_mode):
15580         Likewise.
15581         * config/i386/i386-builtin.def (pcmpestr): Likewise.
15582         (pcmpistr): Likewise.
15583         * config/microblaze/microblaze.c (double_memory_operand): Likewise.
15584         * config/mmix/mmix.c (mmix_output_condition): Likewise.
15585         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
15586         Likewise.
15587         * config/rl78/rl78.c (mduc_regs): Likewise.
15588         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
15589         (htm_expand_builtin): Likewise.
15590         * config/sh/sh.h (REGISTER_NATURAL_MODE): Likewise.
15591         * config/sparc/sparc.c (emit_save_or_restore_regs): Likewise.
15592         * config/xtensa/xtensa.c (print_operand): Likewise.
15593         * expmed.h (NUM_MODE_PARTIAL_INT): Likewise.
15594         (NUM_MODE_VECTOR_INT): Likewise.
15595         * genoutput.c (null_operand): Likewise.
15596         (output_operand_data): Likewise.
15597         * genrecog.c (print_parameter_value): Likewise.
15598         * lra.c (debug_operand_data): Likewise.
15599
15600 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15601
15602         * dwarf2out.c (scompare_loc_descriptor_wide)
15603         (scompare_loc_descriptor_narrow): New functions, split out from...
15604         (scompare_loc_descriptor): ...here.
15605         * expmed.c (emit_store_flag_int): New function, split out from...
15606         (emit_store_flag): ...here.
15607
15608 2017-08-30  Richard Biener  <rguenther@suse.de>
15609
15610         * dwarf2out.c (dwarf2out_finish): Remove setting AT_pubnames.
15611         (dwarf2out_early_finish): Move setting of AT_pubnames from
15612         early debug output to early finish.
15613
15614 2017-08-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
15615
15616         * gcc/config/msp430/msp430.h: Pass -mcode/data-region to the linker
15617         and -mdata-region to the assembler.
15618
15619 2017-08-30  Richard Biener  <rguenther@suse.de>
15620
15621         * dwarf2out.c (add_dwarf_attr): Check we don't add duplicate
15622         attributes.
15623         (gen_subprogram_die): Add DW_AT_object_pointer only early.
15624         (dwarf2out_early_global_decl): Only generate a DIE for the
15625         abstract origin if it doesn't already exist or is a declaration DIE.
15626         (resolve_addr): Do not add the linkage name twice when
15627         generating a stub DIE for the DW_TAG_GNU_call_site target.
15628
15629 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15630
15631         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
15632         Use machine_mode rather than int for arg1_mode.
15633
15634 2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
15635
15636         PR target/82015
15637         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Insure
15638         that the second argument of the built-in functions to unpack
15639         128-bit scalar types to 64-bit values is 0 or 1.  Change to use a
15640         switch statement instead a lot of if statements.
15641         * config/rs6000/rs6000.md (unpack<mode>, FMOVE128_VSX iterator):
15642         Allow 64-bit values to be in Altivec registers as well as
15643         traditional floating point registers.
15644         (pack<mode>, FMOVE128_VSX iterator): Likewise.
15645
15646 2017-08-29  Alexander Monakov  <amonakov@ispras.ru>
15647
15648         * ira-costs.c (record_address_regs): Handle both operands of PLUS for
15649         MAX_REGS_PER_ADDRESS == 1.
15650
15651 2017-08-29  Uros Bizjak  <ubizjak@gmail.com>
15652
15653         * config/i386/i386.opt (flag_fentry): Do not init to -1.
15654         * config/i386/i386.c (ix86_option_override_internal): Simplify
15655         setting of opts->x_flag_entry.
15656
15657 2017-08-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15658             Jakub Jelinek  <jakub@redhat.com>
15659             Richard Biener  <rguenther@suse.de>
15660
15661         PR tree-optimization/81503
15662         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Ensure
15663         folded constant fits in the target type; reorder tests for clarity.
15664
15665 2017-08-29  Martin Liska  <mliska@suse.cz>
15666
15667         * passes.def: Include pass_lower_switch.
15668         * stmt.c (dump_case_nodes): Remove and move to
15669         tree-switch-conversion.
15670         (case_values_threshold): Likewise.
15671         (expand_switch_as_decision_tree_p): Likewise.
15672         (emit_case_decision_tree): Likewise.
15673         (expand_case): Likewise.
15674         (balance_case_nodes): Likewise.
15675         (node_has_low_bound): Likewise.
15676         (node_has_high_bound): Likewise.
15677         (node_is_bounded): Likewise.
15678         (emit_case_nodes): Likewise.
15679         (struct simple_case_node): New struct.
15680         (add_case_node): Remove.
15681         (emit_case_dispatch_table): Use vector instead of case_list.
15682         (reset_out_edges_aux): Remove.
15683         (compute_cases_per_edge): Likewise.
15684         (expand_case): Build list of simple_case_node.
15685         (expand_sjlj_dispatch_table): Use it.
15686         * tree-switch-conversion.c (struct case_node): Moved from
15687         stmt.c and adjusted.
15688         (emit_case_nodes): Likewise.
15689         (node_has_low_bound): Likewise.
15690         (node_has_high_bound): Likewise.
15691         (node_is_bounded): Likewise.
15692         (case_values_threshold): Likewise.
15693         (reset_out_edges_aux): Likewise.
15694         (compute_cases_per_edge): Likewise.
15695         (add_case_node): Likewise.
15696         (dump_case_nodes): Likewise.
15697         (balance_case_nodes): Likewise.
15698         (expand_switch_as_decision_tree_p): Likewise.
15699         (emit_jump): Likewise.
15700         (emit_case_decision_tree): Likewise.
15701         (try_switch_expansion): Likewise.
15702         (do_jump_if_equal): Likewise.
15703         (emit_cmp_and_jump_insns): Likewise.
15704         (fix_phi_operands_for_edge): New function.
15705         (record_phi_operand_mapping): Likewise.
15706         (class pass_lower_switch): New pass.
15707         (pass_lower_switch::execute): New function.
15708         (make_pass_lower_switch): Likewise.
15709         (conditional_probability):
15710         * timevar.def: Add TV_TREE_SWITCH_LOWERING.
15711         * tree-pass.h: Add make_pass_lower_switch.
15712
15713 2017-08-29  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
15714
15715         PR target/80993
15716         * gcc/config/msp430/msp430.c (msp430_attr): Mark interrupt
15717         handlers as used.
15718
15719 2017-08-29  Richard Biener  <rguenther@suse.de>
15720
15721         * dwarf2out.c (add_dwarf_attr): When checking is enabled verify
15722         we do not add a DW_AT_inline attribute twice.
15723         (gen_subprogram_die): Remove code setting DW_AT_inline on
15724         DECL_ABSTRACT_P nodes.
15725
15726 2017-08-29  Richard Sandiford  <richard.sandiford@linaro.org>
15727
15728         * gimplify.c (gimplify_call_expr): Copy the nothrow flag to
15729         calls to internal functions.
15730         (gimplify_modify_expr): Likewise.
15731         * tree-call-cdce.c (use_internal_fn): Likewise.
15732         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
15733         (convert_to_divmod): Set the nothrow flag.
15734         * tree-if-conv.c (predicate_mem_writes):  Likewise.
15735         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
15736         (vectorizable_call): Likewise.
15737         (vectorizable_store): Likewise.
15738         (vectorizable_load): Likewise.
15739         * tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
15740         (vect_recog_mask_conversion_pattern): Likewise.
15741
15742 2017-08-29  Martin Liska  <mliska@suse.cz>
15743
15744         PR other/39851
15745         * gcc.c (driver_handle_option): Add new argument.
15746         * opts-common.c (handle_option): Pass
15747         target_option_override_hook.
15748         * opts-global.c (lang_handle_option): Add new option.
15749         (set_default_handlers):  Add new argument.
15750         (decode_options): Likewise.
15751         * opts.c (target_handle_option): Likewise.
15752         (common_handle_option): Call target_option_override_hook.
15753         * opts.h (struct cl_option_handler_func): Add hook for
15754         target option override.
15755         (struct cl_option_handlers): Likewise.
15756         (set_default_handlers): Add new argument.
15757         (decode_options): Likewise.
15758         (common_handle_option): Likewise.
15759         (target_handle_option): Likewise.
15760         * toplev.c (toplev::main): Pass targetm.target_option.override
15761         hook.
15762
15763 2017-08-29  Richard Biener  <rguenther@suse.de>
15764         Dominik Infuehr <dominik.infuehr@theobroma-systems.com>
15765
15766         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Properly confine
15767         life to the active subtree.
15768
15769 2017-08-28  Jeff Law  <law@redhat.com>
15770
15771         * tree-ssa-dom.c (edge_info::record_simple_equiv): Call
15772         derive_equivalences.
15773         (derive_equivalences_from_bit_ior, record_temporary_equivalences):
15774         Code moved into....
15775         (edge_info::derive_equivalences): New private member function
15776
15777         * tree-ssa-dom.c (class edge_info): Changed from a struct
15778         to a class.  Add ctor/dtor, methods and data members.
15779         (edge_info::edge_info): Renamed from allocate_edge_info.
15780         Initialize additional members.
15781         (edge_info::~edge_info): New.
15782         (free_dom_edge_info): Delete the edge info.
15783         (record_edge_info): Use new class & associated member functions.
15784         Tighten forms for testing for edge equivalences.
15785         (record_temporary_equivalences): Iterate over the simple
15786         equivalences rather than assuming there's only one per edge.
15787         (cprop_into_successor_phis): Iterate over the simple
15788         equivalences rather than assuming there's only one per edge.
15789         (optimize_stmt): Use operand_equal_p rather than pointer
15790         equality for mini-DSE code.
15791
15792 2017-08-28  Nathan Sidwell  <nathan@acm.org>
15793
15794         * gcc.c (execute): Fold SIGPIPE handling into switch
15795         statement.  Adjust internal error message.
15796
15797 2017-08-28  Richard Biener  <rguenther@suse.de>
15798
15799         PR debug/81993
15800         * dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
15801         Do nothing for removed DIEs.
15802
15803 2017-08-28  Richard Biener  <rguenther@suse.de>
15804
15805         PR tree-optimization/81977
15806         * tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
15807         memcpy.
15808
15809 2017-08-28  Alexander Monakov  <amonakov@ispras.ru>
15810
15811         PR target/80640
15812         * doc/md.texi (mem_thread_fence): Remove mention of mode.  Rewrite.
15813         * optabs.c (expand_mem_thread_fence): Emit a compiler barrier when
15814         using targetm.gen_mem_thread_fence.
15815
15816 2017-08-27  Uros Bizjak  <ubizjak@gmail.com>
15817
15818         PR target/81995
15819         * config/i386/i386.md (*<btsc><mode>): Change operand 2
15820         predicate to register_operand.  Reorder operands.
15821         (*btr<mode>): Ditto.
15822         (*<btsc><mode>_mask): Change operand 3 predicate to register_operand.
15823         (*btr<mode>_mask): Ditto.
15824
15825 2017-08-25  Steven Munroe  <munroesj@gcc.gnu.org>
15826
15827         * config.gcc (powerpc*-*-*): Add xmmintrin.h and mm_malloc.h.
15828         * config/rs6000/xmmintrin.h: New file.
15829         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include xmmintrin.h.
15830
15831 2017-08-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15832
15833         PR target/81504
15834         * config/rs6000/rs6000-p8swap.c (find_alignment_op): Add reference
15835         parameter and_insn and return it.
15836         (recombine_lvx_pattern): Insert a copy to ensure availability of
15837         the base register of the copied masking operation at the point of
15838         the instruction replacement.
15839         (recombine_stvx_pattern): Likewise.
15840
15841 2017-08-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
15842
15843         * config/rs6000/rs6000.opt (-mpower9-dform-scalar): Delete
15844         undocumented switches.
15845         (-mpower9-dform-vector): Likewise.
15846         (-mpower9-dform): Likewise.
15847         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
15848         comments to delete references to -mpower9-dform* switches.
15849         * config/rs6000/predicates.md (vsx_quad_dform_memory_operand):
15850         Delete reference to -mpower9-dform* switches, test for
15851         -mpower9-vector instead.
15852         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Likewise.
15853         (OTHER_P9_VECTOR_MASKS): Likewise.
15854         (POWERPC_MASKS): Likewise.
15855         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Change
15856         tests against -mpower9-dform* to -mpower9-vector.  Delete code
15857         that checked for -mpower9-dform* consistancy with other options.
15858         Add test for -mpower9-misc to enable other power9 switches.
15859         (rs6000_init_hard_regno_mode_ok): Likewise.
15860         (rs6000_option_override_internal): Likewise.
15861         (rs6000_emit_prologue): Likewise.
15862         (rs6000_emit_epilogue): Likewise.
15863         (rs6000_opt_masks): Delete -mpower9-dform-{scalar,vector}.
15864         (rs6000_disable_incompatiable_switches): Delete -mpower9-dform.
15865         (emit_fusion_p9_load): Change tests for -mpower9-dform-scalar
15866         -mpower9-vector.
15867         (emit_fusion_p9_store): Likewise.
15868         * config/rs6000/rs6000.h (TARGET_P9_DFORM_SCALAR): Delete
15869         resetting these macros if the assembler does not support ISA 3.0
15870         instructions.
15871         (TARGET_P9_DFORM_VECTOR): Likewise.
15872         * config/rs6000/rs6000.md (peepholes to optimize altivec memory):
15873         Change to use -mpower9-vector instead of -mpower9-dform-scalar.
15874
15875 2017-08-25  Alan Modra  <amodra@gmail.com>
15876
15877         PR rtl-optimization/81747
15878         * cse.c (cse_extended_basic_block): Don't attempt to record
15879         equivalences for degenerate conditional branches that branch
15880         to their fall-through.
15881
15882 2017-08-24  Martin Sebor  <msebor@redhat.com>
15883
15884         PR middle-end/81908
15885         * gimple-fold.c (size_must_be_zero_p): New function.
15886         (gimple_fold_builtin_memory_op): Call it.
15887
15888 2017-08-24  Steven Munroe  <munroesj@gcc.gnu.org>
15889
15890         * config/rs6000/mm_malloc.h: New file.
15891
15892 2017-08-24  Bin Cheng  <bin.cheng@arm.com>
15893
15894         PR tree-optimization/81913
15895         * tree-ssa-loop-niter.c (number_of_iterations_cond): Skip niter
15896         analysis when either IVs in condition can wrap.
15897
15898 2017-08-24  Uros Bizjak  <ubizjak@gmail.com>
15899
15900         * dwarf2out.c (MAX_ARTIFICIAL_LABEL_BYTES): Increase to 40.
15901         * dwarf2cfi.c (MAX_ARTIFICIAL_LABEL_BYTES): Remove.
15902
15903 2017-08-24  Richard Biener  <rguenther@suse.de>
15904
15905         PR target/81921
15906         * targhooks.c (default_target_can_inline_p): Properly
15907         use target_option_default_node when no DECL_FUNCTION_SPECIFIC_TARGET
15908         is present and always compare.
15909         * config/i386/i386.c (ix86_valid_target_attribute_tree): Do not
15910         infer -mfpmath=sse from TARGET_SSE_P.
15911         (ix86_can_inline_p): Properly use target_option_default_node when
15912         no DECL_FUNCTION_SPECIFIC_TARGET is present and always compare.
15913
15914 2017-08-24  Richard Biener  <rguenther@suse.de>
15915
15916         PR debug/81936
15917         * dwarf2out.c (output_die): Handle flag_generate_offload like
15918         flag_generate_lto.
15919         (output_comp_unit): Likewise.
15920         (gen_array_type_die): Likewise.
15921         (dwarf2out_early_finish): Likewise.
15922         (note_variable_value_in_expr): Likewise.
15923         (dwarf2out_finish): Likewise.  Adjust assert.
15924         * cgraphunit.c (symbol_table::compile): Move setting of
15925         flag_generate_offload earlier ...
15926         (symbol_table::finalize_compilation_unit): ... here, before
15927         early debug finalization.
15928
15929 2017-08-24  Richard Biener  <rguenther@suse.de>
15930
15931         * config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
15932         and ipa-fnsummary.h.
15933         (ix86_can_inline_p): When ix86_fpmath flags do not match
15934         check whether the callee uses FP math at all.
15935
15936 2017-08-24  Aldy Hernandez  <aldyh@redhat.com>
15937
15938         PR middle-end/81931
15939         * tree-ssanames.c (get_nonzero_bits): Use element_precision
15940         instead of TYPE_PRECISION.
15941
15942 2017-08-24  Richard Sandiford  <richard.sandiford@linaro.org>
15943             Alan Hayward  <alan.hayward@arm.com>
15944             David Sherwood  <david.sherwood@arm.com>
15945
15946         * combine.c (make_extraction): Use subreg_offset_from_lsb.
15947
15948 2017-08-23  Daniel Santos  <daniel.santos@pobox.com>
15949
15950         * config/i386/i386.h (ix86_frame::stack_realign_allocate_offset):
15951         Remove field.
15952         (ix86_frame::stack_realign_allocate): New field.
15953         (struct machine_frame_state): Modify comments.
15954         (machine_frame_state::sp_realigned_fp_end): New field.
15955         * config/i386/i386.c (ix86_compute_frame_layout): Rework stack frame
15956         layout calculation.
15957         (sp_valid_at): Add assertion to assure no attempt to access invalid
15958         offset of a realigned stack.
15959         (fp_valid_at): Likewise.
15960         (choose_baseaddr): Modify comments.
15961         (ix86_emit_outlined_ms2sysv_save): Adjust to changes in
15962         ix86_expand_prologue.
15963         (ix86_expand_prologue): Modify stack realignment and allocation.
15964         (ix86_expand_epilogue): Modify comments.
15965         * doc/sourcebuild.texi: Add documentation for target selectors avx2,
15966         avx2_runtime, avx512f, and avx512f_runtime.
15967
15968 2017-08-23  Uros Bizjak  <ubizjak@gmail.com>
15969
15970         * config/i386/i386.opt: Remove unneeded Init(0) initializations.
15971         (mstackrealign): Do not init to -1.
15972         * config/i386/i386.c (ix86_option_override_internal):
15973         Check opts_set, not opts when setting default value of
15974         opts->x_ix86_force_align_arg_pointer.
15975
15976 2017-08-23  Richard Biener  <rguenther@suse.de>
15977
15978         * function.c (fndecl_name): Use verbosity 1 (no arguments) for
15979         lang_hooks.decl_printable_name.
15980         * print-rtl-function.c (print_rtx_function): Likewise.
15981         * tree-pretty-print.c (dump_function_header): Likewise.
15982
15983 2017-08-23  Richard Biener  <rguenther@suse.de>
15984
15985         PR lto/81940
15986         * dwarf2out.c (dwarf2out_abstract_function): Handle LTO with
15987         -g0 at compile-time.
15988
15989 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
15990
15991         PR middle-end/19706
15992         * doc/sourcebuild.texi (Other hardware attributes):
15993         Document xorsign.
15994
15995 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
15996
15997         PR middle-end/19706
15998         * tree-ssa-math-opts.c (convert_expand_mult_copysign):
15999         Fix single-use check.
16000
16001 2017-08-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
16002
16003         * gcc.c (execute): Only test for SIGKILL and SIGQUIT if available.
16004
16005 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
16006
16007         * doc/install.texi: Modify to add more details on running selected
16008         tests.
16009
16010 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
16011
16012         * config/i386/i386.c (ix86_option_override_internal): Error when -mx32
16013         is combined with -mabi=ms.
16014         (ix86_function_type_abi): Limit errors for mixing -mx32 with attribute
16015         ms_abi.
16016
16017 2017-08-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16018
16019         PR tree-optimization/81488
16020         * gimple-ssa-strength-reduction (struct slsr_cand_d): Add visited
16021         and cached_basis fields.
16022         (MAX_SPREAD): New constant.
16023         (alloc_cand_and_find_basis): Initialize new fields.
16024         (clear_visited): New function.
16025         (create_phi_basis_1): Rename from create_phi_basis, set visited
16026         and cached_basis fields.
16027         (create_phi_basis): New wrapper function.
16028         (phi_add_costs_1): Rename from phi_add_costs, add spread
16029         parameter, set visited field, short-circuit when limits reached.
16030         (phi_add_costs): New wrapper function.
16031         (record_phi_increments_1): Rename from record_phi_increments, set
16032         visited field.
16033         (record_phi_increments): New wrapper function.
16034         (phi_incr_cost_1): Rename from phi_incr_cost, set visited field.
16035         (phi_incr_cost): New wrapper function.
16036         (all_phi_incrs_profitable_1): Rename from
16037         all_phi_incrs_profitable, set visited field.
16038         (all_phi_incrs_profitable): New wrapper function.
16039
16040 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
16041             Alan Hayward  <alan.hayward@arm.com>
16042             David Sherwood  <david.sherwood@arm.com>
16043
16044         * rtl.h (paradoxical_subreg_p): Define inline, and add a version
16045         that takes the outer and inner modes.
16046         * doc/rtl.texi: Use paradoxical_subreg_p instead of a GET_MODE_SIZE
16047         comparison as the canonical test for a paradoxical subreg.
16048         * combine.c (simplify_set): Use paradoxical_subreg_p.
16049         (make_extraction): Likewise.
16050         (force_to_mode): Likewise.
16051         (rtx_equal_for_field_assignment_p): Likewise.
16052         (gen_lowpart_for_combine): Likewise.
16053         (simplify_comparison): Likewise.
16054         * cse.c (equiv_constant): Likewise.
16055         * expmed.c (store_bit_field_1): Likewise.
16056         * final.c (alter_subreg): Likewise.
16057         * fwprop.c (propagate_rtx): Likewise.
16058         (forward_propagate_subreg): Likewise.
16059         * ira-conflicts.c (ira_build_conflicts): Likewise.
16060         * lower-subreg.c (simplify_gen_subreg_concatn): Likewise.
16061         * lra-constraints.c (curr_insn_transform): Likewise.
16062         (split_reg): Likewise.
16063         * lra-eliminations.c (move_plus_up): Likewise.
16064         (lra_eliminate_regs_1): Likewise.
16065         * recog.c (general_operand): Likewise.
16066         * ree.c (combine_reaching_defs): Likewise.
16067         * reload.c (push_reload): Likewise.
16068         (find_reloads): Likewise.
16069         * reload1.c (elimination_effects): Likewise.
16070         (compute_reload_subreg_offset): Likewise.
16071         (choose_reload_regs): Likewise.
16072         * rtlanal.c (subreg_lsb_1): Likewise.
16073         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
16074         (simplify_subreg): Likewise.
16075         * var-tracking.c (track_loc_p): Likewise.
16076         * emit-rtl.c (byte_lowpart_offset): Likewise.
16077         (paradoxical_subreg_p): Delete out-of-line definition.
16078
16079 2017-08-22  Jeff Law  <law@redhat.com>
16080
16081         PR tree-optimization/81741
16082         PR tree-optimization/71947
16083         * tree-ssa-dom.c: Include tree-inline.h.
16084         (record_temporary_equivalences): Only record SSA_NAME = SSA_NAME
16085         equivalences if one is more expensive to compute than the other.
16086         * tree-ssa-scopedtables.h (class const_or_copies): Make
16087         record_const_or_copy_raw method private.
16088         (class avail_exprs_stack): New method simplify_binary_operation.
16089         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr): Call
16090         avail_exprs_stack::simplify_binary_operation as needed.
16091         (avail_exprs_stack::simplify_binary_operation): New function.
16092
16093 2017-08-22  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16094
16095         * config.gcc (powerpc-*-rtems*): Add rs6000/linux64.opt.
16096         * config/rs6000/rtems.h (ASM_PREFERRED_EH_DATA_FORMAT): New define.
16097         (DOT_SYMBOLS): Likewise.
16098         (MINIMAL_TOC_SECTION_ASM_OP): Likewise.
16099         (RELOCATABLE_NEEDS_FIXUP): Likewise.
16100         (RS6000_ABI_NAME): Likewise.
16101         (TARGET_CMODEL): Likewise.
16102         (TOC_SECTION_ASM_OP): Likewise.
16103         (SET_CMODEL): New macro.
16104         (SUBSUBTARGET_OVERRIDE_OPTIONS): Evaluate cmodel options.
16105
16106 2017-08-22  Richard Biener  <rguenther@suse.de>
16107
16108         * tree-inline.c (remap_type_1): Change asserts on TYPE_SIZE[_UNIT]
16109         to allow for free-lang-data replacements similar to verify_type_variant.
16110
16111 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
16112             Alan Hayward  <alan.hayward@arm.com>
16113             David Sherwood  <david.sherwood@arm.com>
16114
16115         * config/aarch64/aarch64.md (casesi): Use DImode rather than
16116         VOIDmode for the LABEL_REF.
16117
16118 2017-08-22  Richard Biener  <rguenther@suse.de>
16119
16120         * tree-cfg.c (gimple_split_edge): Avoid reallocating target PHI nodes.
16121
16122 2017-08-22  Richard Biener  <rguenther@suse.de>
16123
16124         * common.opt (feliminate-dwarf2-dups): Ignore.
16125         * doc/invoke.texi (feliminate-dwarf2-dups): Remove documentation.
16126         * dwarf2out.c (push_new_compile_unit, pop_compile_unit,
16127         same_die_p_wrap, compute_section_prefix,
16128         is_symbol_die, assign_symbol_names, break_out_includes): Remove.
16129         (comdat_symbol_id, comdat_symbol_number): Likewise.
16130         (cu_hash_table_entry, cu_hash_table_entry_hasher, cu_hash_type):
16131         Likewise.
16132         (check_duplicate_cu, record_comdat_symbol_number): Likewise.
16133         (output_die): Mark unreachable path unreachable.
16134         (dwarf2out_start_source_file): Do not create DW_TAG_GNU_BINCL.
16135         (dwarf2out_end_source_file): Do not create DW_TAG_GNU_EINCL.
16136         (dwarf2out_init): Remove code handling flag_eliminate_dwarf2_dups.
16137         (dwarf2out_early_finish): Likewise.
16138
16139 2017-08-22  Aldy Hernandez  <aldyh@redhat.com>
16140
16141         * wide-int.h (hwi_with_prec::hwi_with_prec): Sign extend.
16142
16143 2017-08-22  Georg-Johann Lay  <avr@gjlay.de>
16144
16145         PR target/81910
16146         * config/avr/avr.c (avr_handle_addr_attribute): Early return if
16147         not VAR_P. Filter attribute warnings with OPT_Wattributes.
16148         (avr_attribute_table) <io, io_low, address>: Initialize
16149         .decl_required with true.
16150
16151 2017-08-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
16152
16153         * config/rs6000/rs6000-cpus.def (-mvsx-scalar-float): Delete
16154         undocumented debugging options.
16155         (-mvsx-scalar-double): Likewise.
16156         (-mallow-df-permute): Likewise.
16157         (-mvectorize-builtins): Likewise.
16158         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
16159         (rs6000_builtin_vectorized_function): Likewise.
16160         (rs6000_builtin_md_vectorized_function): Likewise.
16161         (rs6000_opt_vars): Likewise.
16162
16163 2017-08-21  Uros Bizjak  <ubizjak@gmail.com>
16164
16165         PR target/46091
16166         * config/i386/i386.md (*btsq_imm): Rename from *btsq.
16167         (*btrq_imm): Rename from *btrq.
16168         (*btcq_imm): Rename from *btcq.
16169         (btsc): New code attribute.
16170         (*<btsc><mode>): New insn pattern.
16171         (*btr<mode>): Ditto.
16172         (*<btsc><mode>_mask): New insn_and_split pattern.
16173         (*btr<mode>_mask): Ditto.
16174
16175 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
16176             Alan Hayward  <alan.hayward@arm.com>
16177             David Sherwood  <david.sherwood@arm.com>
16178
16179         * function.c (pad_below): Simplify padding calculation.
16180
16181 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
16182             Alan Hayward  <alan.hayward@arm.com>
16183             David Sherwood  <david.sherwood@arm.com>
16184
16185         * target.def (function_prologue): Remove frame size argument.
16186         (function_epilogue): Likewise.
16187         * doc/tm.texi: Regenerate.
16188         * final.c (final_start_function): Update call to function_prologue.
16189         (final_end_function): Update call to function_epilogue.
16190         (default_function_pro_epilogue): Remove frame size argument.
16191         * output.h (default_function_pro_epilogue): Likewise.
16192         * config/arm/arm.c (arm_output_function_epilogue): Likewise.
16193         (arm_output_function_prologue): Likewise.
16194         * config/frv/frv.c (frv_function_prologue): Likewise.
16195         (frv_function_epilogue): Likewise.
16196         * config/i386/i386.c (ix86_output_function_epilogue): Likewise.
16197         * config/ia64/ia64.c (ia64_output_function_prologue): Likewise.
16198         (ia64_output_function_epilogue): Likewise.
16199         * config/m32r/m32r.c (m32r_output_function_prologue): Likewise.
16200         (m32r_output_function_epilogue): Likewise.
16201         * config/microblaze/microblaze.c (microblaze_function_prologue)
16202         (microblaze_function_epilogue): Likewise.
16203         * config/mips/mips.c (mips_output_function_prologue): Likewise.
16204         (mips_output_function_epilogue): Likewise.
16205         * config/mmix/mmix.c (mmix_target_asm_function_prologue): Likewise.
16206         (mmix_target_asm_function_epilogue): Likewise.
16207         * config/msp430/msp430.c (msp430_start_function): Likewise.
16208         * config/nds32/nds32.c (nds32_asm_function_prologue): Likewise.
16209         (nds32_asm_function_epilogue): Likewise.
16210         * config/nios2/nios2.c (nios2_asm_function_prologue): Likewise.
16211         * config/pa/pa.c (pa_output_function_prologue): Likewise.
16212         (pa_output_function_epilogue): Likewise.
16213         * config/powerpcspe/powerpcspe.c (rs6000_output_function_prologue)
16214         (rs6000_output_function_epilogue): Likewise.
16215         * config/rl78/rl78.c (rl78_start_function): Likewise.
16216         * config/rs6000/rs6000.c (rs6000_output_function_prologue): Likewise.
16217         (rs6000_output_function_epilogue): Likewise.
16218         * config/rx/rx.c (rx_output_function_prologue): Likewise.
16219         * config/sh/sh.c (sh_output_function_epilogue): Likewise.
16220         * config/sparc/sparc.c (sparc_asm_function_prologue): Likewise.
16221         (sparc_asm_function_epilogue): Likewise.
16222
16223 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
16224
16225         * tree.h (type_has_mode_precision_p): New function.
16226         * convert.c (convert_to_integer_1): Use it.
16227         * expr.c (expand_expr_real_2): Likewise.
16228         (expand_expr_real_1): Likewise.
16229         * fold-const.c (fold_single_bit_test_into_sign_test): Likewise.
16230         * match.pd: Likewise.
16231         * tree-ssa-forwprop.c (simplify_rotate): Likewise.
16232         * tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
16233         * tree-tailcall.c (process_assignment): Likewise.
16234         * tree-vect-loop.c (vectorizable_reduction): Likewise.
16235         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern)
16236         (vect_recog_mult_pattern, vect_recog_divmod_pattern): Likewise.
16237         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
16238         (vectorizable_assignment): Likewise.
16239         (vectorizable_shift): Likewise.
16240         (vectorizable_operation): Likewise.
16241         * tree-vrp.c (register_edge_assert_for_2): Likewise.
16242
16243 2017-08-21  Wilco Dijkstra  <wdijkstr@arm.com>
16244
16245         * match.pd: Add pow (C, x) simplification.
16246
16247 2017-08-21  Richard Biener  <rguenther@suse.de>
16248
16249         PR tree-optimization/81900
16250         * tree-ssa-pre.c (compute_antic_aux): Properly compute changed
16251         for blocks with abnormal predecessors.
16252         (compute_antic): Do not set visited flag prematurely.
16253
16254 2017-08-21  Georg-Johann Lay  <avr@gjlay.de>
16255
16256         PR target/79883
16257         * config/avr/avr.c (avr_set_current_function): Typo in diagnostic.
16258
16259 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
16260
16261         * stor-layout.h (vector_type_mode): Move to...
16262         * tree.h (vector_type_mode): ...here.
16263         * stor-layout.c (vector_type_mode): Move to...
16264         * tree.c (vector_type_mode): ...here.  Include rtl.h and regs.h.
16265
16266 2017-08-21  Richard Biener  <rguenther@suse.de>
16267
16268         * debug.h (struct gcc_debug_hooks): Add die_ref_for_decl and
16269         register_external_die hooks.
16270         (debug_false_tree_charstarstar_uhwistar): Declare.
16271         (debug_nothing_tree_charstar_uhwi): Likewise.
16272         * debug.c (do_nothing_debug_hooks): Adjust.
16273         (debug_false_tree_charstarstar_uhwistar): New do nothing.
16274         (debug_nothing_tree_charstar_uhwi): Likewise.
16275         * dbxout.c (dbx_debug_hooks): Adjust.
16276         (xcoff_debug_hooks): Likewise.
16277         * sdbout.c (sdb_debug_hooks): Likewise.
16278         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
16279         * dwarf2out.c (macinfo_label_base): New global.
16280         (dwarf2out_register_external_die): New function for the
16281         register_external_die hook.
16282         (dwarf2out_die_ref_for_decl): Likewise for die_ref_for_decl.
16283         (dwarf2_debug_hooks): Use them.
16284         (dwarf2_lineno_debug_hooks): Adjust.
16285         (struct die_struct): Add with_offset flag.
16286         (DEBUG_LTO_DWO_INFO_SECTION, DEBUG_LTO_INFO_SECTION,
16287         DEBUG_LTO_DWO_ABBREV_SECTION, DEBUG_LTO_ABBREV_SECTION,
16288         DEBUG_LTO_DWO_MACINFO_SECTION, DEBUG_LTO_MACINFO_SECTION,
16289         DEBUG_LTO_DWO_MACRO_SECTION, DEBUG_LTO_MACRO_SECTION,
16290         DEBUG_LTO_LINE_SECTION, DEBUG_LTO_DWO_STR_OFFSETS_SECTION,
16291         DEBUG_LTO_STR_DWO_SECTION, DEBUG_STR_LTO_SECTION): New macros
16292         defining section names for the early LTO debug variants.
16293         (reset_indirect_string): New helper.
16294         (add_AT_external_die_ref): Helper for dwarf2out_register_external_die.
16295         (print_dw_val): Add support for offsetted symbol references.
16296         (get_ultimate_context): Split out from is_cxx.
16297         (is_cxx): Use get_ultimate_context.
16298         (is_fortran): Add decl overload.
16299         (compute_comp_unit_symbol): Split out worker from
16300         compute_section_prefix.
16301         (compute_section_prefix): Call compute_comp_unit_symbol and
16302         set comdat_type_p here.
16303         (output_die): Skip DIE symbol output for the LTO added one.
16304         Handle DIE symbol references with offset.
16305         (output_comp_unit): Guard section name mangling properly.
16306         For LTO debug sections emit a symbol at the section beginning
16307         which we use to refer to its DIEs.
16308         (add_abstract_origin_attribute): For DIEs registered via
16309         dwarf2out_register_external_die directly refer to the early
16310         DIE rather than indirectly through the shadow one we created.
16311         Remove obsolete call to dwarf2out_abstract_function for
16312         non-function/block origins.
16313         (gen_array_type_die): When generating early LTO debug do
16314         not emit DW_AT_string_length.
16315         (gen_formal_parameter_die): Do not re-create DIEs for PARM_DECLs
16316         late when in LTO.  As suggested place a gcc_unreachable for
16317         the DECL_ABSTRACT_P case.
16318         (gen_subprogram_die): Avoid another specification DIE
16319         for early built declarations/definitions for the late LTO case.
16320         (gen_variable_die): Add type references for late duplicated VLA dies
16321         when in late LTO.
16322         (gen_inlined_subroutine_die): Do not call dwarf2out_abstract_function,
16323         we have the abstract instance already.
16324         (process_scope_var): Adjust decl DIE contexts in LTO which
16325         first puts them in limbo.
16326         (gen_decl_die): Do not generate type DIEs late apart from
16327         types for VLAs or for decls we do not yet have a DIE.  Do not
16328         call dwarf2out_abstract_function late.
16329         (dwarf2out_early_global_decl): Make sure to create DIEs
16330         for abstract instances of a decl first.
16331         (dwarf2out_late_global_decl): Adjust comment.
16332         (output_macinfo_op): With multiple macro sections use
16333         macinfo_label_base to distinguish labels.
16334         (output_macinfo): Likewise.  Update macinfo_label_base.
16335         Pass in the line info label.
16336         (note_variable_value_in_expr): When generating LTO resolve
16337         all variable values here by generating DIEs as needed.
16338         (init_sections_and_labels): Add early LTO debug flag parameter
16339         and generate different sections and names if set.  Add generation
16340         counter for the labels so we can have multiple of them.
16341         (reset_dies): Helper to allow DIEs to be output multiple times.
16342         (dwarf2out_finish): When outputting DIEs to the fat part of an
16343         LTO object first reset DIEs.
16344         (dwarf2out_early_finish): Output early DIEs when generating LTO.
16345         (modified_type_die): Check for decl_ultimate_origin being self
16346         before recursing.
16347         (gen_type_die_with_usage): Likewise.
16348         (gen_typedef_die): Allow decl_ultimate_origin being self.
16349         (set_decl_abstract_flags): Remove.
16350         (set_block_abstract_flags): Likewise.
16351         (dwarf2out_abstract_function): Treat the early generated DIEs
16352         as the abstract copy and only add DW_AT_inline and
16353         DW_AT_artificial here and call set_decl_origin_self.
16354         If the DIE has an abstract origin don't do anything.
16355         * tree.c (free_lang_data): Build a dummy TRANSLATION_UNIT_DECL
16356         if we have none yet (Go fails to build one, PR78628).
16357         (variably_modified_type_p): Prevent endless recursion for Ada
16358         cyclic pointer types.
16359         * lto-streamer-in.c: Include debug.h.
16360         (dref_queue): New global.
16361         (lto_read_tree_1): Stream in DIE references.
16362         (lto_input_tree): Register DIE references.
16363         (input_function): Stream DECL_DEBUG_ARGS.
16364         * lto-streamer-out.c: Include debug.h.
16365         (lto_write_tree_1): Output DIE references.
16366         (DFS::DFS_write_tree_body): Follow DECL_ABSTRACT_ORIGIN.
16367         Force a TRANSLATION_UNIT_DECL DECL_CONTEXT for file-scope decls.
16368         (output_function): Stream DECL_DEBUG_ARGS.
16369         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
16370         Stream DECL_ABSTRACT_ORIGIN.
16371         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
16372         (write_ts_decl_minimal_tree_pointers): Force a TRANSLATION_UNIT_DECL
16373         DECL_CONTEXT for file-scope decls.
16374         * lto-streamer.h (struct dref_entry): Declare.
16375         (dref_queue): Likewise.
16376         * cfgexpand.c (pass_expand::execute): Do not call the
16377         outlining_inline_function hook here.
16378         * lto-wrapper.c (debug_obj): New global.
16379         (tool_cleanup): Unlink it if required.
16380         (debug_objcopy): New function.
16381         (run_gcc): Handle early debug sections in the IL files by
16382         extracting them to separate files, partially linkin them and
16383         feeding the result back as result to the linker.
16384         * config/darwin.h (DEBUG_LTO_INFO_SECTION, DEBUG_LTO_ABBREV_SECTION,
16385         DEBUG_LTO_MACINFO_SECTION, DEBUG_LTO_LINE_SECTION,
16386         DEBUG_STR_LTO_SECTION, DEBUG_LTO_MACRO_SECTION): Put early debug
16387         sections into a separate segment.
16388         * config/darwin.c (darwin_asm_named_section): Handle __GNU_DWARF_LTO
16389         segments.
16390         (darwin_asm_dwarf_section): Likewise.
16391         (darwin_asm_output_dwarf_offset): Likewise.
16392         * config/i386/i386.c (make_resolver_func): Set DECL_IGNORED_P.
16393
16394 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
16395             Alan Hayward  <alan.hayward@arm.com>
16396             David Sherwood  <david.sherwood@arm.com>
16397
16398         * read-md.h (md_reader::record_potential_iterator_use): Replace
16399         pointer argument with an rtx and an index.
16400         * read-rtl.c (iterator_group::apply_iterator): Likewise.
16401         (apply_mode_iterator): Likewise.
16402         (apply_code_iterator): Likewise.
16403         (apply_int_iterator): Likewise.
16404         (apply_subst_iterator): Likewise.
16405         (record_iterator_use): Likewise.
16406         (record_attribute_use): Likewise.
16407         (md_reader::record_potential_iterator_use): Likewise.  Update calls
16408         to record_iterator_use and apply_iterator.
16409         (iterator_use): Replace ptr with x and index.
16410         (attribute_use): Likewise.
16411         (apply_attribute_uses): Update calls to apply_iterator.
16412         (apply_iterators): Likewise.  Update initialization of iterator_use.
16413         (rtx_reader::read_rtx_code): Update calls to record_iterator_use
16414         and record_potential_iterator_use.
16415         (rtx_reader::read_rtx_operand): Likewise.
16416
16417 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
16418             Alan Hayward  <alan.hayward@arm.com>
16419             David Sherwood  <david.sherwood@arm.com>
16420
16421         * varasm.c (const_rtx_hash_1): Don't hash in the mode of a
16422         CONST_WIDE_INT.
16423
16424 2017-08-21  Richard Biener  <rguenther@suse.de>
16425
16426         PR middle-end/81884
16427         * tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
16428         at struct end conservatively when comparing common bases.
16429
16430 2017-08-21  Richard Biener  <rguenther@suse.de>
16431
16432         * tree-ssa-loop-im.c (struct lim_aux_data): Add ref index member.
16433         (mem_ref_in_stmt): Remove.
16434         (determine_max_movement): Use ref index to get at the reference.
16435         (invariantness_dom_walker::before_dom_children): Deal with
16436         lim data already initialized.
16437         (gather_mem_refs_stmt): Initialize lim data and record ref index.
16438
16439 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
16440
16441         * config/i386/i386.h (OPTION_MASK_ISA_ROUND): Remove.
16442         (TARGET_ISA_ROUND): Ditto.
16443         (TARGET_ROUND): Ditto.
16444         * config/i386/i386.c: Substitute TARGET_ROUND with TARGET_SSE4_1.
16445         * config/i386/i386.md: Ditto.
16446         * config/i386/sse.md: Ditto.
16447         * config/i386/i386-builtin.def: Substitute OPTION_MASK_ISA_ROUND
16448         with OPTION_MASK_ISA_SSE4_1.
16449
16450 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
16451
16452         PR target/81894
16453         * doc/extend.texi (x86 Built-in Functions): Correct the name of
16454         __builtin_ia32_lzcnt_u16.
16455
16456 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
16457
16458         PR target/80210
16459         * config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
16460         (rs6000_set_current_function): Rewrite function to use it.
16461
16462 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
16463
16464         PR c/53037
16465         * print-tree.c (print_node): Support DECL_WARN_IF_NOT_ALIGN
16466         and TYPE_WARN_IF_NOT_ALIGN.
16467         * stor-layout.c (do_type_align): Merge DECL_WARN_IF_NOT_ALIGN.
16468         (handle_warn_if_not_align): New.
16469         (place_union_field): Call handle_warn_if_not_align.
16470         (place_field): Call handle_warn_if_not_align.
16471         Copy TYPE_WARN_IF_NOT_ALIGN.
16472         (finish_builtin_struct): Copy TYPE_WARN_IF_NOT_ALIGN.
16473         (layout_type): Likewise.
16474         * tree-core.h (tree_type_common): Add warn_if_not_align.  Set
16475         spare to 18.
16476         (tree_decl_common): Add warn_if_not_align.
16477         * tree.c (build_range_type_1): Copy TYPE_WARN_IF_NOT_ALIGN.
16478         * tree.h (TYPE_WARN_IF_NOT_ALIGN): New.
16479         (SET_TYPE_WARN_IF_NOT_ALIGN): Likewise.
16480         (DECL_WARN_IF_NOT_ALIGN): Likewise.
16481         (SET_DECL_WARN_IF_NOT_ALIGN): Likewise.
16482         * doc/extend.texi: Document warn_if_not_aligned attribute.
16483         * doc/invoke.texi: Document -Wif-not-aligned and -Wpacked-not-aligned.
16484
16485 2017-08-17  Martin Liska  <mliska@suse.cz>
16486
16487         PR bootstrap/81864
16488         * tree-loop-distribution.c (ddrs_table): Change type to pointer type.
16489         (get_data_dependence): Use it as pointer type.
16490         (distribute_loop): Likewise.
16491
16492 2017-08-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16493
16494         * config/rs6000/altivec.md (UNSPEC_VMRGOW_DIRECT): New constant.
16495         (p8_vmrgew_v4sf_direct): Generalize to p8_vmrgew_<mode>_direct.
16496         (p8_vmrgow_<mode>_direct): New define_insn.
16497         * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Properly
16498         handle endianness for vmrgew and vmrgow permute patterns.
16499
16500 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
16501
16502         * config/rs6000/altivec.md (VParity): Remove TARGET_VSX_TIMODE.
16503         * config/rs6000/rs6000-cpus.def: Remove comment.
16504         (ISA_2_7_MASKS_SERVER): Delete OPTION_MASK_VSX_TIMODE;
16505         (POWERPC_MASKS): Likewise.
16506         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Remove unneeded
16507         use of TARGET_VSX_TIMODE.
16508         (rs6000_setup_reg_addr_masks): Change TARGET_VSX_TIMODE to TARGET_VSX.
16509         (rs6000_init_hard_regno_mode_ok): Remove unneeded uses of
16510         TARGET_VSX_TIMODE.  Change use of TARGET_VSX_TIMODE to TARGET_VSX.
16511         (rs6000_option_override_internal): Remove dead code.
16512         (rs6000_legitimize_address): Change TARGET_VSX_TIMODE to TARGET_VSX.
16513         (rs6000_legitimize_reload_address): Likewise.
16514         (rs6000_legitimate_address_p): Likewise.
16515         (rs6000_opt_masks): Delete "vsx-timode".
16516         (rs6000_disable_incompatible_switches): Remove mention of -mvsx-timode
16517         from function comment.
16518         * config/rs6000/rs6000.h (MASK_VSX_TIMODE): Delete.
16519         * config/rs6000/rs6000.md (FMOVE128_GPR): Remove TARGET_VSX_TIMODE.
16520         (V16QI, V8HI, V4SI, V4SF, V2DI, V2DF, V1TI): Remove useless empty
16521         condition.
16522         * config/rs6000/rs6000.opt (mvsx-timode): Replace with stub.
16523         * config/rs6000/vector.md (VEC_IP): Remove TARGET_VSX_TIMODE.
16524         * config/rs6000/vsx.md (VSX_LE_128): Likewise.
16525         (VSX_TI): Likewise.
16526         (VSX_M): Likewise.
16527         (define_peephole2): Likewise.
16528
16529 2017-08-17  Martin Sebor  <msebor@redhat.com>
16530
16531         PR c/81859
16532         * pretty-print.c (pp_format): Use strnlen in %.*s to avoid reading
16533         past the end of an array.
16534         (test_pp_format): Add test cases.
16535
16536 2017-08-17  Richard Sandiford  <richard.sandiford@linaro.org>
16537
16538         * internal-fn.def (CLRSB, CLZ, CTZ, FFS, PARITY, POPCOUNT): Add
16539         missing ECF_NOTHROW flags.
16540
16541 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
16542
16543         PR target/72804
16544         * config/rs6000/vsx.md (*vsx_le_permute_<mode>): Add support for
16545         operands residing in integer registers.
16546         (*vsx_le_perm_load_<mode>): Likewise.
16547         (*vsx_le_perm_store_<mode>): Likewise.
16548         (define_peephole2): Add peepholes to optimize the above.
16549
16550 2017-08-17  Marek Polacek  <polacek@redhat.com>
16551
16552         PR middle-end/81814
16553         * fold-const.c (operand_equal_for_comparison_p): Remove code that used
16554         to mimic what shorten_compare did.  Change the return type to bool.
16555         (fold_cond_expr_with_comparison): Update call to
16556         operand_equal_for_comparison_p.
16557         (fold_ternary_loc): Likewise.
16558
16559 2017-08-17  Jackson Woodruff  <jackson.woodruff@arm.com>
16560
16561         * aarch64-simd.md (mov<mode>): No longer force zero immediate into
16562         register.
16563         (*aarch64_simd_mov<mode>): Add new case for stp using zero immediate.
16564
16565 2017-08-17  Richard Biener  <rguenther@suse.de>
16566
16567         * tree-ssa-structalias.c (solve_graph): When propagating
16568         to successors update the graphs succ edges and avoid duplicate work.
16569
16570 2017-08-17  Maxim Ostapenko  <m.ostapenko@samsung.com>
16571
16572         PR target/81861
16573         * config/i386/i386.c (ix86_option_override_internal): Save target
16574         specific options after ix86_stack_protector_guard_reg was changed.
16575
16576 2017-08-17  Richard Biener  <rguenther@suse.de>
16577
16578         PR tree-optimization/81827
16579         * tree-ssa-structalias.c (struct variable_info): Add is_reg_var flag.
16580         (new_var_info): Initialize it conservatively.
16581         (get_call_vi): Mark register vars.
16582         (new_scalar_tmp_constraint_exp): Likewise.
16583         (handle_rhs_call): Likewise.
16584         (handle_const_call): Likewise.
16585         (create_function_info_for): Likewise.
16586         (solve_constraints): Sort varinfos to separate register from
16587         non-register vars to pack points-to solution bitmaps during
16588         iteration.
16589
16590 2017-08-17  Marek Polacek  <polacek@redhat.com>
16591
16592         * gimplify.c (gimplify_adjust_omp_clauses): Compare with 0 instead of 1.
16593
16594 2017-08-17  Richard Biener  <rguenther@suse.de>
16595
16596         * tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p
16597         to true when overflow is undefined and we saturated the result.
16598
16599 2017-08-17  Alan Modra  <amodra@gmail.com>
16600
16601         PR target/80938
16602         * config/rs6000/rs6000.c (rs6000_savres_strategy): Revert 2017-08-09.
16603         Don't use store multiple if only one reg needs saving.
16604         (interesting_frame_related_regno): New function.
16605         (rs6000_frame_related): Don't emit frame info for regs that
16606         don't need saving.
16607         (rs6000_emit_epilogue): Likewise.
16608
16609 2017-08-16  Nathan Sidwell  <nathan@acm.org>
16610
16611         * tree-core.h (tree_type_non_common): Rename binfo to lang_1.
16612         * tree.h (TYPE_BINFO): Use type_non_common.maxval.
16613         (TYPE_LANG_SLOT_1): Use type_non_common.lang_1, for any type.
16614         * tree.c (free_lang_data_in_type): Use else-if chain.  Always
16615         clear TYPE_LANG_1.  Remove obsolete member-function stripping.
16616         (find_decls_types_r): Comment about TYPE_MAX_VALUES_RAW.
16617         (verify_type): Adjust for TYPE_BINFO move.
16618         * lto-streamer-out.c (DFS::DFS_write_tree_body): No need to
16619         process TYPE_BINFO directly.
16620         (hash_tree): Likewise.
16621         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
16622         Likewise.
16623         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
16624         Likewise.
16625
16626 2017-08-16  David Malcolm  <dmalcolm@redhat.com>
16627
16628         * diagnostic-show-locus.c (colorizer::m_caret): Remove unused field.
16629
16630 2017-08-16  Uros Bizjak  <ubizjak@gmail.com>
16631
16632         PR target/46091
16633         * config/i386/i386.md (*anddi_1_btr): Change predicates of
16634         operand 0 and operand 1 to nomimmediate_operand. Add "m" constraint.
16635         Add ix86_binary_operator_ok to insn constraint.
16636         (*iordi_1_bts): Ditto.
16637         (*xordi_1_btc): Ditto.
16638         (*btsq): Change predicate of operand 0 to nonimmediate_operand.
16639         Update corresponding peephole2 pattern.
16640         (*btrq): Ditto.
16641         (*btcq): Ditto.
16642
16643 2017-08-16  Bin Cheng  <bin.cheng@arm.com>
16644
16645         PR tree-optimization/81832
16646         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Don't
16647         copy loop header which has IFN_LOOP_DIST_ALIAS call.
16648
16649 2017-08-16  Marek Polacek  <polacek@redhat.com>
16650
16651         PR middle/81695
16652         * fold-const.c (fold_indirect_ref_1): Restore original behavior
16653         regarding size_zero_node.
16654
16655 2017-08-16  Martin Liska  <mliska@suse.cz>
16656
16657         PR target/81753
16658         * config.gcc: Respect previously set extra_objs in case
16659         of darwin target.
16660
16661 2017-08-16  Richard Sandiford  <richard.sandiford@linaro.org>
16662
16663         PR tree-optimization/81835
16664         * tree-vect-loop.c (vect_is_simple_reduction): Simply checks for
16665         the phi SSA_NAME.  Check that the condition in a COND_EXPR does
16666         not depend on the phi.
16667
16668 2017-08-16  Alan Modra  <amodra@gmail.com>
16669
16670         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Delete
16671         dead code.
16672
16673 2017-08-16  Alan Modra  <amodra@gmail.com>
16674
16675         * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Merge..
16676         (save_reg_p): ..into this.  Update all callers.
16677         (first_reg_to_save): Simplify.
16678
16679 2017-08-16  Alan Modra  <amodra@gmail.com>
16680
16681         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't restore
16682         fixed regs.
16683
16684 2017-08-15  Joseph Myers  <joseph@codesourcery.com>
16685
16686         PR target/78460
16687         PR target/67712
16688         * config/sh/sh-mem.cc (sh_expand_cmpnstr): Only unroll for
16689         constant count if that count is less than 32.
16690
16691 2017-08-15  Nathan Sidwell  <nathan@acm.org>
16692
16693         * gcc.c (execute): Emit friendlier message if inferior is killed
16694         by an external cause.
16695
16696 2017-08-15  Richard Biener  <rguenther@suse.de>
16697
16698         PR tree-optimization/81790
16699         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Handle both
16700         CONSTRUCTORs from simplifying and VN.
16701
16702 2017-08-14  Martin Sebor  <msebor@redhat.com>
16703
16704         * builtin-attrs.def: Add comments.
16705
16706 2017-08-14  Martin Sebor  <msebor@redhat.com>
16707
16708         PR c/81117
16709         * doc/extend.texi (attribute nonstring): Document new attribute.
16710
16711 2017-08-14  Martin Sebor  <msebor@redhat.com>
16712
16713         PR c/81117
16714         * tree-diagnostic.c (default_tree_printer): Handle %G.
16715         * gimple-pretty-print.h (percent_G_format): Declare new function.
16716         * gimple-pretty-print.c (percent_G_format): Define.
16717         * tree-pretty-print.c (percent_K_format): Add argument.
16718
16719 2017-08-14  Martin Sebor  <msebor@redhat.com>
16720
16721         PR translation/79998
16722         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
16723         Remove a stray space.
16724
16725 2017-08-14  Uros Bizjak  <ubizjak@gmail.com>
16726
16727         PR target/46091
16728         * config/i386/i386.md (*anddi_1_btr): New insn_and_split pattern.
16729         (*iordi_1_bts): Ditto.
16730         (*xordi_1_btc): Ditto.
16731
16732 2017-08-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16733
16734         PR target/79845
16735         * config/rs6000/linux64.h (INVALID_64BIT): Use quoted strings.
16736         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
16737         Likewise.
16738         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Use
16739         quoted strings, and make more translator-friendly.
16740         (darwin_rs6000_override_options): Likewise.
16741         (rs6000_option_override_internal): Likewise.
16742         (rs6000_return_in_memory): Fix overlong line.
16743         (init_cmulative_args): Use quoted strings, and make more
16744         translator-friendly.
16745         (rs6000_pass_by_reference): Fix overlong line.
16746         (def_builtin): Use quoted strings.
16747         (altivec_expand_predicate_builtin): Use quoted strings, and make
16748         more translator-friendly.
16749         (htm_expand_builtin): Use quoted strings.
16750         (cpu_expand_builtin): Use quoted strings, and make more
16751         translator-friendly.
16752         (altivec_expand_builtin): Likewise.
16753         (paired_expand_predicate_builtin): Likewise.
16754         (rs6000_invalid_builtin): Likewise.
16755         (builtin_function_type): Use quoted strings.
16756         (rs6000_expand_split_stack_prologue): Use quoted strings, and make
16757         more translator-friendly.
16758         (rs6000_trampoline_init): Likewise.
16759         (rs6000_handle_altivec_attribute): Likewise.
16760         (rs6000_inner_target_options): Use quoted strings.
16761         (rs6000_disable_incompatible_switches): Likewise.
16762         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Use quoted
16763         strings, and make more translator-friendly.
16764         (SUBSUBTARGET_OVERRIDE_OPTIONS): Use quoted strings.
16765
16766 2017-08-14  Bin Cheng  <bin.cheng@arm.com>
16767
16768         PR tree-optimization/81799
16769         * tree-loop-distribution.c (version_loop_by_alias_check): Force
16770         cond_expr to simple gimple operand.
16771
16772 2017-08-14  Wilco Dijkstra  <wdijkstr@arm.com>
16773
16774         PR middle-end/46932
16775         * doc/sourcebuild.texi (autoincdec): Add autoincdec description.
16776
16777 2017-08-14  Georg-Johann Lay  <avr@gjlay.de>
16778
16779         PR target/81754
16780         PR target/81268
16781         * config/avr/avr.opt (mgas-isr-prologues): New Var avr_gasisr_prologues.
16782         * config/avr/avr.md (gasisr, *gasisr): Use it instead of
16783         TARGET_GASISR_PROLOGUES.
16784         * config/avr/avr.c (avr_option_override): Same.
16785         (avr_pass_pre_proep::execute): Same.
16786
16787 2017-08-13  H.J. Lu  <hongjiu.lu@intel.com>
16788
16789         PR target/81820
16790         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Replace
16791         frame pointer with stack pointer - UNITS_PER_WORD in debug insns.
16792
16793 2017-08-13  Uros Bizjak  <ubizjak@gmail.com>
16794
16795         * config/i386/i386.md (*load_tp_<mode>): Redefine as
16796         define_insn_and_split.  Split to a memory load from 0 in
16797         DEFAULT_TLS_SEG_REG address space.  Merge with *load_tp_x32
16798         using PTR mode iterator.
16799         (*load_tp_x32_zext"): Redefine as define_insn_and_split.
16800         Split to a memory load from 0 in DEFAULT_TLS_SEG_REG address space.
16801         (*add_tp_<mode>): Redefine as define_insn_and_split.
16802         Split to an add with a memory load from 0 in DEFAULT_TLS_SEG_REG
16803         address space.  Merge with *add_tp_x32 using PTR mode iterator.
16804         (*add_tp_x32_zext"): Redefine as define_insn_and_split.
16805         Split to an add with a  memory load from 0 in
16806         DEFAULT_TLS_SEG_REG address space.
16807
16808 2017-08-12  Andrew Pinski  <apinski@cavium.com>
16809
16810         * config/aarch64/aarch64-option-extensions.def (rdma):
16811         Fix feature string to what Linux prints out in /proc/cpuinfo.
16812
16813 2017-08-12  Pierre-Marie de Rodat  <derodat@adacore.com>
16814
16815         PR ada/79542
16816         * dwarf2out.c (modified_type_die): For C typedef types that have
16817         an ultimate origin, process the ultimate origin instead of the
16818         input type.
16819         (gen_typedef_die): Assert that input DECLs have no ultimate
16820         origin.
16821         (gen_type_die_with_usage): For typedef variants that have an
16822         ultimate origin, just call gen_decl_die on the original DECL.
16823         (process_scope_var): Avoid creating DIEs for local typedefs and
16824         concrete static variables.
16825
16826 2017-08-12  Alan Modra  <amodra@gmail.com>
16827
16828         PR target/81170
16829         PR target/81295
16830         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
16831         match gnu-user.h startfile.
16832         (ENDFILE_LINUX_SPEC): Similarly.
16833
16834 2017-08-11  Thomas Schwinge  <thomas@codesourcery.com>
16835
16836         PR lto/81430
16837         * config/nvptx/nvptx.c (nvptx_override_options_after_change):
16838         Remove function.
16839         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Remove definition.
16840
16841 2017-08-11  Tamar Christina  <tamar.christina@arm.com>
16842         * config/aarch64/aarch64.md (mov<mode>): Change.
16843         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
16844         aarch64_reg_or_fp_float into aarch64_reg_or_fp_zero.
16845         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): Removed.
16846
16847 2017-08-11  Eric Botcazou  <ebotcazou@adacore.com>
16848
16849         * tree-sra.c (build_access_from_expr_1): Use more precise diagnostics
16850         for storage order barriers.
16851
16852 2017-08-11  Martin Liska  <mliska@suse.cz>
16853
16854         PR tree-opt/79987
16855         * tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
16856         variables of void type.
16857
16858 2017-08-11  Martin Liska  <mliska@suse.cz>
16859
16860         * asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with
16861         TARGET_SUPPORTS_ALIASES.
16862         * cgraph.c (cgraph_node::create_same_body_alias): Likewise.
16863         * ipa-visibility.c (can_replace_by_local_alias): Likewise.
16864         (optimize_weakref): Likewise.
16865         * symtab.c (symtab_node::noninterposable_alias): Likewise.
16866         * varpool.c (varpool_node::create_extra_name_alias): Likewise.
16867         * defaults.h: Introduce TARGET_SUPPORTS_ALIASES.
16868
16869 2017-08-11  Martin Liska  <mliska@suse.cz>
16870
16871         PR ipa/81213
16872         * config/i386/i386.c (make_resolver_func): Do complete
16873         refactoring of the function.
16874
16875 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
16876
16877         PR target/81708
16878         * config/i386/i386.opt (mstack-protector-guard-symbol=): New option
16879         * config/i386/i386.c (ix86_stack_protect_guard): Use
16880         ix86_stack_protect_guard_symbol_str to generate varible declaration.
16881         * doc/invoke.texi (x86 Options): Document
16882         -mstack-protector-guard-symbol= option.
16883
16884 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
16885
16886         * config/i386/i386-protos.h (ix86_split_stack_guard): New prototype.
16887         * config/i386/i386.c (ix86_split_stack_guard): New function.
16888         (ix86_xpand_split_stack_prologue): Call ix86_split_stack_guard.
16889         (ix86_legitimate_address_p) <case UNSPEC_STACK_CHECK>: Remove.
16890         (i386_asm_output_addr_const_extra) <case UNSPEC_STACK_CHECK>: Ditto.
16891         (optput_pic_addr_const): Remove UNSPEC_STACK_CHECK handling.
16892         * config/i386/i386.md (unspec): Remove UNSPEC_STACK_CHECK.
16893         (split_stack_space_check): Call ix86_split_stack_guard.
16894
16895 2017-08-10  Martin Sebor  <msebor@redhat.com>
16896
16897         * print-tree.c (print_node): Print location using the established
16898         format %s:%i%i.
16899         Replace spaces with colons.
16900         (debug_raw, debug): Ditto.
16901
16902 2017-08-10  Martin Sebor  <msebor@redhat.com>
16903
16904         PR c++/81586
16905         * pretty-print.c (pp_format): Correct the handling of %s precision.
16906
16907 2017-08-10  H.J. Lu  <hongjiu.lu@intel.com>
16908
16909         PR target/81736
16910         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
16911         to ...
16912         (ix86_finalize_stack_frame_flags): This.  Also clear
16913         frame_pointer_needed if -fno-omit-frame-pointer is used without
16914         stack access.
16915         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
16916         with ix86_finalize_stack_frame_flags.
16917         (ix86_expand_epilogue): Likewise.
16918         (ix86_expand_split_stack_prologue): Likewise.
16919         * doc/invoke.texi: Add a note for -fno-omit-frame-pointer.
16920
16921 2017-08-10  Martin Liska  <mliska@suse.cz>
16922
16923         PR c++/81355
16924         * c-attribs.c (handle_target_attribute):
16925         Report warning for an empty string argument of target attribute.
16926
16927 2017-08-09  Jakub Jelinek  <jakub@redhat.com>
16928
16929         PR c/81687
16930         * omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
16931         LABEL_DECLs.
16932         * tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
16933         or DECL_NONLOCAL labels.
16934         (move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
16935         or DECL_NONLOCAL labels here.
16936
16937 2017-08-09  Will Schmidt  <will_schmidt@vnet.ibm.com>
16938
16939         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add blurb
16940         to indicate when early gimple folding has been disabled.
16941         (rs6000_gimple_fold_builtin): Add debug content.
16942         (rs6000_invalid_builtin): Fix whitespace.
16943         (rs6000_expand_builtin): Fix whitespace.
16944         * config/rs6000/rs6000.opt: Add option for -mfold-gimple.
16945
16946 2017-08-09  Segher Boessenkool  <segher@kernel.crashing.org>
16947
16948         PR target/80938
16949         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't use
16950         SAVE_MULTIPLE if not all the registers that saves, should be saved.
16951
16952 2017-08-09  Jim Wilson  <jim.wilson@linaro.org>
16953
16954         * config/aarch64/aarch64-cores.def (falkor): Use falkor pipeline.
16955         (qdf24xx): Likewise.
16956         * config/aarch64/aarch64.md: Include falkor.md.
16957         * config/aarch64/falkor.md: New.
16958
16959 2017-08-09  Marek Polacek  <polacek@redhat.com>
16960
16961         PR c/81233
16962         * diagnostic-core.h (emit_diagnostic_valist): Add declaration.
16963         * diagnostic.c (emit_diagnostic): Add a comment.
16964         (emit_diagnostic_valist): New function.
16965
16966 2017-08-09  Marek Polacek  <polacek@redhat.com>
16967
16968         PR c/81417
16969         * input.c (make_location): New overload.
16970         * input.h (make_location): Declare.
16971
16972 2017-08-08  Alan Modra  <amodra@gmail.com>
16973             H.J. Lu  <hongjiu.lu@intel.com>
16974
16975         PR driver/81523
16976         * gcc.c (NO_PIE_SPEC): Delete.
16977         (PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
16978         exclusion..
16979         (LINK_PIE_SPEC): ..to here.
16980         (LINK_COMMAND_SPEC): Support -no-pie.
16981         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
16982         chain of crtbegin*.o selection, update for PIE_SPEC changes and
16983         format.
16984         (GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
16985         * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
16986         (ENDFILE_CRTEND_SPEC): Similarly.
16987
16988 2017-08-08  Uros Bizjak  <ubizjak@gmail.com>
16989
16990         PR target/81708
16991         * config/i386/i386.opt (mstack-protector-guard-reg=): New option
16992         (mstack-protector-guard-offset=): Ditto.
16993         * config/i386/i386.c (ix86_option_override): Handle
16994         -mstack-protector-guard-reg= and -mstack-protector-guard-offset=
16995         options.
16996         (ix86_stack_protect_guard): Use ix86_stack_protect_guard_reg and
16997         ix86_stack_protect_guard_offset variables.
16998         (TARGET_STACK_PROTECT_GUARD): Always define.
16999         * doc/invoke.texi (x86 Options): Document -mstack-protector-guard-reg=
17000         and -mstack-protector-guard-offset= options.
17001
17002 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
17003
17004         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle
17005         boundary case for the last candidate.
17006
17007 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
17008
17009         * doc/invoke.texi: Document -ftree-loop-distribution for O3.
17010         * opts.c (default_options_table): Add OPT_ftree_loop_distribution.
17011
17012 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
17013
17014         PR middle-end/19706
17015         * config/aarch64/aarch64.md (xorsign<mode>3): New optabs.
17016         * config/aarch64/aarch64-builtins.c
17017         (aarch64_builtin_vectorized_function): Added CASE_CFN_XORSIGN.
17018         * config/aarch64/aarch64-simd-builtins.def: Added xorsign BINOP.
17019         * config/aarch64/aarch64-simd.md: Added xorsign<mode>3
17020
17021 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
17022             Andrew Pinski <pinskia@gmail.com>
17023
17024         PR middle-end/19706
17025         * internal-fn.def (XORSIGN): New.
17026         * optabs.def (xorsign_optab): New.
17027         * tree-ssa-math-opts.c (is_copysign_call_with_1): New.
17028         (convert_expand_mult_copysign): New.
17029         (pass_optimize_widening_mul::execute): Call
17030         convert_expand_mult_copysign.
17031
17032 2017-08-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17033
17034         PR tree-optimization/81354
17035         * gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
17036         Insert on edges rather than explicitly creating landing pads.
17037         (analyze_candidates_and_replace): Commit edge inserts.
17038
17039 2017-08-08  Richard Biener  <rguenther@suse.de>
17040
17041         PR middle-end/81719
17042         * tree-ssa-loop-niter.c: Include tree-dfa.h.
17043         (expand_simple_operations): Also look through ADDR_EXPRs with
17044         MEM_REF bases treating them as POINTER_PLUS_EXPR.
17045
17046 2017-08-08  Richard Biener  <rguenther@suse.de>
17047
17048         PR tree-optimization/81723
17049         * tree-vect-slp.c (struct bst_traits): New hash traits.
17050         (bst_fail): New global.
17051         (vect_build_slp_tree_2): New worker, split out from ...
17052         (vect_build_slp_tree): ... this now wrapping it with using
17053         bst_fail set to cache SLP tree build fails.  Properly handle
17054         max_tree_size.
17055         (vect_analyze_slp_instance): Allocate and free bst_fail.
17056
17057 2017-08-08  Martin Liska  <mliska@suse.cz>
17058
17059         PR tree-opt/81696
17060         * ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
17061         LABEL_DECLs that can be from a different function.
17062
17063 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
17064
17065         PR tree-optimization/81744
17066         * tree-predcom.c (prepare_finalizers_chain): Deep copy expr of
17067         loop's number of iterations.
17068
17069 2017-08-08  Martin Liska  <mliska@suse.cz>
17070
17071         * asan.c: Include header files.
17072         * attribs.c (build_decl_attribute_variant): New function moved
17073         from tree.[ch].
17074         (build_type_attribute_qual_variant): Likewise.
17075         (cmp_attrib_identifiers): Likewise.
17076         (simple_cst_list_equal): Likewise.
17077         (omp_declare_simd_clauses_equal): Likewise.
17078         (attribute_value_equal): Likewise.
17079         (comp_type_attributes): Likewise.
17080         (build_type_attribute_variant): Likewise.
17081         (lookup_ident_attribute): Likewise.
17082         (remove_attribute): Likewise.
17083         (merge_attributes): Likewise.
17084         (merge_type_attributes): Likewise.
17085         (merge_decl_attributes): Likewise.
17086         (merge_dllimport_decl_attributes): Likewise.
17087         (handle_dll_attribute): Likewise.
17088         (attribute_list_equal): Likewise.
17089         (attribute_list_contained): Likewise.
17090         * attribs.h (lookup_attribute): New function moved from tree.[ch].
17091         (lookup_attribute_by_prefix): Likewise.
17092         * bb-reorder.c: Include header files.
17093         * builtins.c: Likewise.
17094         * calls.c: Likewise.
17095         * cfgexpand.c: Likewise.
17096         * cgraph.c: Likewise.
17097         * cgraphunit.c: Likewise.
17098         * convert.c: Likewise.
17099         * dwarf2out.c: Likewise.
17100         * final.c: Likewise.
17101         * fold-const.c: Likewise.
17102         * function.c: Likewise.
17103         * gimple-expr.c: Likewise.
17104         * gimple-fold.c: Likewise.
17105         * gimple-pretty-print.c: Likewise.
17106         * gimple.c: Likewise.
17107         * gimplify.c: Likewise.
17108         * hsa-common.c: Likewise.
17109         * hsa-gen.c: Likewise.
17110         * internal-fn.c: Likewise.
17111         * ipa-chkp.c: Likewise.
17112         * ipa-cp.c: Likewise.
17113         * ipa-devirt.c: Likewise.
17114         * ipa-fnsummary.c: Likewise.
17115         * ipa-inline.c: Likewise.
17116         * ipa-visibility.c: Likewise.
17117         * ipa.c: Likewise.
17118         * lto-cgraph.c: Likewise.
17119         * omp-expand.c: Likewise.
17120         * omp-general.c: Likewise.
17121         * omp-low.c: Likewise.
17122         * omp-offload.c: Likewise.
17123         * omp-simd-clone.c: Likewise.
17124         * opts-global.c: Likewise.
17125         * passes.c: Likewise.
17126         * predict.c: Likewise.
17127         * sancov.c: Likewise.
17128         * sanopt.c: Likewise.
17129         * symtab.c: Likewise.
17130         * toplev.c: Likewise.
17131         * trans-mem.c: Likewise.
17132         * tree-chkp.c: Likewise.
17133         * tree-eh.c: Likewise.
17134         * tree-into-ssa.c: Likewise.
17135         * tree-object-size.c: Likewise.
17136         * tree-parloops.c: Likewise.
17137         * tree-profile.c: Likewise.
17138         * tree-ssa-ccp.c: Likewise.
17139         * tree-ssa-live.c: Likewise.
17140         * tree-ssa-loop.c: Likewise.
17141         * tree-ssa-sccvn.c: Likewise.
17142         * tree-ssa-structalias.c: Likewise.
17143         * tree-ssa.c: Likewise.
17144         * tree-streamer-in.c: Likewise.
17145         * tree-vectorizer.c: Likewise.
17146         * tree-vrp.c: Likewise.
17147         * tsan.c: Likewise.
17148         * ubsan.c: Likewise.
17149         * varasm.c: Likewise.
17150         * varpool.c: Likewise.
17151         * tree.c: Remove functions moved to attribs.[ch].
17152         * tree.h: Likewise.
17153         * config/aarch64/aarch64.c: Add attrs.h header file.
17154         * config/alpha/alpha.c: Likewise.
17155         * config/arc/arc.c: Likewise.
17156         * config/arm/arm.c: Likewise.
17157         * config/avr/avr.c: Likewise.
17158         * config/bfin/bfin.c: Likewise.
17159         * config/c6x/c6x.c: Likewise.
17160         * config/cr16/cr16.c: Likewise.
17161         * config/cris/cris.c: Likewise.
17162         * config/darwin.c: Likewise.
17163         * config/epiphany/epiphany.c: Likewise.
17164         * config/fr30/fr30.c: Likewise.
17165         * config/frv/frv.c: Likewise.
17166         * config/ft32/ft32.c: Likewise.
17167         * config/h8300/h8300.c: Likewise.
17168         * config/i386/winnt.c: Likewise.
17169         * config/ia64/ia64.c: Likewise.
17170         * config/iq2000/iq2000.c: Likewise.
17171         * config/lm32/lm32.c: Likewise.
17172         * config/m32c/m32c.c: Likewise.
17173         * config/m32r/m32r.c: Likewise.
17174         * config/m68k/m68k.c: Likewise.
17175         * config/mcore/mcore.c: Likewise.
17176         * config/microblaze/microblaze.c: Likewise.
17177         * config/mips/mips.c: Likewise.
17178         * config/mmix/mmix.c: Likewise.
17179         * config/mn10300/mn10300.c: Likewise.
17180         * config/moxie/moxie.c: Likewise.
17181         * config/msp430/msp430.c: Likewise.
17182         * config/nds32/nds32-isr.c: Likewise.
17183         * config/nds32/nds32.c: Likewise.
17184         * config/nios2/nios2.c: Likewise.
17185         * config/nvptx/nvptx.c: Likewise.
17186         * config/pa/pa.c: Likewise.
17187         * config/pdp11/pdp11.c: Likewise.
17188         * config/powerpcspe/powerpcspe.c: Likewise.
17189         * config/riscv/riscv.c: Likewise.
17190         * config/rl78/rl78.c: Likewise.
17191         * config/rx/rx.c: Likewise.
17192         * config/s390/s390.c: Likewise.
17193         * config/sh/sh.c: Likewise.
17194         * config/sol2.c: Likewise.
17195         * config/sparc/sparc.c: Likewise.
17196         * config/spu/spu.c: Likewise.
17197         * config/stormy16/stormy16.c: Likewise.
17198         * config/tilegx/tilegx.c: Likewise.
17199         * config/tilepro/tilepro.c: Likewise.
17200         * config/v850/v850.c: Likewise.
17201         * config/vax/vax.c: Likewise.
17202         * config/visium/visium.c: Likewise.
17203         * config/xtensa/xtensa.c: Likewise.
17204
17205 2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
17206
17207         PR target/81593
17208         * config/rs6000/vsx.md (vsx_concat_<mode>, VSX_D): Cleanup
17209         constraints since the -mupper-regs-* switches have been
17210         eliminated.
17211         (vsx_concat_<mode>_1): New combiner insns to recognize inserting
17212         into a vector from a double word element that was extracted from
17213         another vector, and eliminate extra XXPERMDI instructions.
17214         (vsx_concat_<mode>_2): Likewise.
17215         (vsx_concat_<mode>_3): Likewise.
17216         (vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
17217         concat to allow optimizing inserts from previous extracts.
17218
17219 2017-08-07  Uros Bizjak  <ubizjak@gmail.com>
17220
17221         * config/i386/i386.c (ix86_stack_protect_guard): Generate
17222         memory reference to a SSP offset in TLS address space.
17223         (ix86_print_operand) <case '@'>: Remove.
17224         (ix86_print_operand_punct_valid_p): Remove '@' code.
17225         * config/i386/i386.md (unspec): Remove UNSPEC_SP_TLS_SET and
17226         UNSPEC_SP_TLS_TEST.
17227         (stack_tls_protect_set_<mode>): Remove.
17228         (stack_protect_set): Do not call gen_stack_tls_protect_set_<mode>.
17229         (stack_tls_protect_test_<mode>): Remove.
17230         (stack_protect_test): Do not call gen_stack_tls_protect_test_<mode>.
17231
17232 2017-08-07  Olivier Hainque  <hainque@adacore.com>
17233
17234         PR target/81755
17235         * config/vxworksae.h (VXWORKS_HAVE_TLS): Define.
17236
17237 2017-08-07  Douglas Rupp  <rupp@adacore.com>
17238
17239         * Makefile.in (install-mkheaders): Fix typo, where the multi_dir
17240         variable was referenced as multidir in command.
17241
17242 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
17243
17244         PR c/69389
17245         * gimplify.c (goa_stabilize_expr): Handle BIT_INSERT_EXPR and
17246         BIT_FIELD_REF.
17247
17248 2017-08-07  Martin Liska  <mliska@suse.cz>
17249
17250         * config/m32c/m32c.c: Add include of stringpool.h and attribs.h.
17251         * config/rl78/rl78.c: Add include of attribs.h.
17252         * config/sh/sh.c: Likewise.
17253         * config/v850/v850.c: Likewise.
17254
17255 2017-08-07  Tom de Vries  <tom@codesourcery.com>
17256
17257         PR middle-end/78266
17258         * omp-expand.c (expand_oacc_for): Ensure diff_type is large enough.
17259
17260 2017-08-07  Martin Liska  <mliska@suse.cz>
17261
17262         * config/mips/mips.c: Include attribs.h.
17263
17264 2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
17265
17266         PR fortran/68829
17267         * doc/invoke.texi: Document change in behvaior for -Ofast for
17268         Fortran.
17269
17270 2017-08-07  Wilco Dijkstra  <wdijkstr@arm.com>
17271
17272         * config/aarch64/aarch64.c (aarch64_pushwb_single_reg):
17273         Use gen_frame_mem.
17274         (aarch64_pop_regs): Likewise.
17275         (aarch64_gen_load_pair): Likewise.
17276         (aarch64_save_callee_saves): Likewise.
17277         (aarch64_restore_callee_saves): Likewise.
17278
17279 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
17280
17281         * config/i386/i386.c: Revert the last change.
17282
17283 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
17284
17285         PR target/81736
17286         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
17287         to ...
17288         (ix86_finalize_stack_frame_flags): This.  Also clear
17289         frame_pointer_needed if -fno-omit-frame-pointer is used without
17290         stack access.
17291         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
17292         with ix86_finalize_stack_frame_flags.
17293         (ix86_expand_epilogue): Likewise.
17294         (ix86_expand_split_stack_prologue): Likewise.
17295
17296 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
17297
17298         PR target/81743
17299         * config/i386/i386.c (get_builtin_code_for_version): Set priority
17300         to P_AES for Westmere.
17301
17302 2017-08-07  Jonathan Yong  <10walls@gmail.com>
17303
17304         * config/i386/mingw.opt (fset-stack-executable): Removed.
17305         * config/i386/cygming.opt (fset-stack-executable): Moved
17306         from mingw.opt.
17307         * config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED.
17308
17309 2017-08-07  Segher Boessenkool  <segher@kernel.crashing.org>
17310
17311         * print-rtl.c (print_exp): Print NOT as "~" instead of as "!".
17312
17313 2017-08-07  Marek Polacek  <polacek@redhat.com>
17314
17315         PR middle-end/81737
17316         * fold-const.c (fold_indirect_ref_1): Check type_domain.
17317
17318 2017-08-07  Martin Liska  <mliska@suse.cz>
17319
17320         * attribs.h (canonicalize_attr_name): New function.
17321         (cmp_attribs): Move from c-format.c and adjusted.
17322         (is_attribute_p): Moved from tree.h.
17323         * tree-inline.c: Add new includes.
17324         * tree.c (cmp_attrib_identifiers): Use cmp_attribs.
17325         (private_is_attribute_p): Remove.
17326         (private_lookup_attribute): Likewise.
17327         (private_lookup_attribute_by_prefix): Simplify.
17328         (remove_attribute): Use is_attribute_p.
17329         * tree.h: Remove removed declarations.
17330
17331 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
17332
17333         PR middle-end/81698
17334         * stmt.c (emit_case_dispatch_table): Add DEFAULT_EDGE argument,
17335         instead of computing it in the function.  Formatting fix.
17336         (expand_case): Don't rely on default_edge being the first edge,
17337         clear it if removing it, pass default_edge to
17338         emit_case_dispatch_table.
17339         (expand_sjlj_dispatch_table): Pass NULL as DEFAULT_EDGE, formatting
17340         fix.
17341
17342 2017-08-06  Uros Bizjak  <ubizjak@gmail.com>
17343
17344         * config/alpha/alpha.c (alpha_reorg): If trap is the last active
17345         insn in the function, emit NOP after the insn.
17346
17347 2017-08-06  Tom de Vries  <tom@codesourcery.com>
17348
17349         * omp-expand.c (expand_oacc_for): Add missing edge probability for tile
17350         and element loops.
17351
17352 2017-08-06  Tom de Vries  <tom@codesourcery.com>
17353
17354         * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk
17355         loop.
17356
17357 2017-08-04  Yury Gribov  <tetra2005@gmail.com>
17358
17359         PR tree-optimization/57371
17360         * match.pd: New pattern.
17361
17362 2017-08-04  Marek Polacek  <polacek@redhat.com>
17363
17364         PR middle-end/81695
17365         * fold-const.c (fold_indirect_ref_1): For ((int *)&a + 4 -> a[1],
17366         perform the computation in offset_int.
17367
17368 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
17369
17370         PR tree-optimization/81136
17371         * tree-vectorizer.h: Include tree-hash-traits.h.
17372         (vec_base_alignments): New typedef.
17373         (vec_info): Add a base_alignments field.
17374         (vect_record_base_alignments): Declare.
17375         * tree-data-ref.h (data_reference): Add an is_conditional_in_stmt
17376         field.
17377         (DR_IS_CONDITIONAL_IN_STMT): New macro.
17378         (create_data_ref): Add an is_conditional_in_stmt argument.
17379         * tree-data-ref.c (create_data_ref): Likewise.  Use it to initialize
17380         the is_conditional_in_stmt field.
17381         (data_ref_loc): Add an is_conditional_in_stmt field.
17382         (get_references_in_stmt): Set the is_conditional_in_stmt field.
17383         (find_data_references_in_stmt): Update call to create_data_ref.
17384         (graphite_find_data_references_in_stmt): Likewise.
17385         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
17386         * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
17387         (vect_record_base_alignment): New function.
17388         (vect_record_base_alignments): Likewise.
17389         (vect_compute_data_ref_alignment): Adjust base_addr and aligned_to
17390         for nested statements even if we fail to compute a misalignment.
17391         Use pooled base alignments for unconditional references.
17392         (vect_find_same_alignment_drs): Compare base addresses instead
17393         of base objects.
17394         (vect_analyze_data_refs_alignment): Call vect_record_base_alignments.
17395         * tree-vect-slp.c (vect_slp_analyze_bb_1): Likewise.
17396
17397 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
17398
17399         * tree-vectorizer.h (vec_info): Add a constructor and destructor.
17400         Add an explicit name for the enum.  Use auto_vec for slp_instances
17401         and grouped_stores.
17402         (_loop_vec_info): Add a constructor and destructor.  Use auto_vec
17403         for all vectors.
17404         (_bb_vec_info): Add a constructor and destructor.
17405         (vinfo_for_stmt): Return NULL for uids of -1 as well.
17406         (destroy_loop_vec_info): Delete.
17407         (vect_destroy_datarefs): Likewise.
17408         * tree-vectorizer.c (vect_destroy_datarefs): Delete.
17409         (vec_info::vec_info): New function.
17410         (vec_info::~vec_info): Likewise.
17411         (vectorize_loops): Use delete instead of destroy_loop_vec_info.
17412         * tree-parloops.c (gather_scalar_reductions): Use delete instead of
17413         destroy_loop_vec_info.
17414         * tree-vect-loop.c (new_loop_vec_info): Replace with...
17415         (_loop_vec_info::_loop_vec_info): ...this.
17416         (destroy_loop_vec_info): Replace with...
17417         (_loop_vec_info::~_loop_vec_info): ...this.  Unconditionally delete
17418         the stmt_vec_infos.  Leave handling of vec_info information to its
17419         destructor.  Remove explicit vector releases.
17420         (vect_analyze_loop_form): Use new instead of new_loop_vec_info.
17421         (vect_analyze_loop): Use delete instead of destroy_loop_vec_info.
17422         * tree-vect-slp.c (new_bb_vec_info): Replace with...
17423         (_bb_vec_info::_bb_vec_info): ...this.  Don't reserve space in
17424         BB_VINFO_GROUPED_STORES or BB_VINFO_SLP_INSTANCES.
17425         (destroy_bb_vec_info): Replace with...
17426         (_bb_vec_info::~_bb_vec_info): ...this.  Leave handling of vec_info
17427         information to its destructor.
17428         (vect_slp_analyze_bb_1): Use new and delete instead of
17429         new_bb_vec_info and destroy_bb_vec_info.
17430         (vect_slp_bb): Replace 2 calls to destroy_bb_vec_info with a
17431         single delete.
17432
17433 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
17434
17435         * tree-data-ref.h (subscript): Add access_fn field.
17436         (data_dependence_relation): Add could_be_independent_p.
17437         (SUB_ACCESS_FN, DDR_COULD_BE_INDEPENDENT_P): New macros.
17438         (same_access_functions): Move to tree-data-ref.c.
17439         * tree-data-ref.c (ref_contains_union_access_p): New function.
17440         (access_fn_component_p): Likewise.
17441         (access_fn_components_comparable_p): Likewise.
17442         (dr_analyze_indices): Add a reference to access_fn_component_p.
17443         (dump_data_dependence_relation): Use SUB_ACCESS_FN instead of
17444         DR_ACCESS_FN.
17445         (constant_access_functions): Likewise.
17446         (add_other_self_distances): Likewise.
17447         (same_access_functions): Likewise.  (Moved from tree-data-ref.h.)
17448         (initialize_data_dependence_relation): Use XCNEW and remove
17449         explicit zeroing of DDR_REVERSED_P.  Look for a subsequence
17450         of access functions that have the same type.  Allow the
17451         subsequence to end with different bases in some circumstances.
17452         Record the chosen access functions in SUB_ACCESS_FN.
17453         (build_classic_dist_vector_1): Replace ddr_a and ddr_b with
17454         a_index and b_index.  Use SUB_ACCESS_FN instead of DR_ACCESS_FN.
17455         (subscript_dependence_tester_1): Likewise dra and drb.
17456         (build_classic_dist_vector): Update calls accordingly.
17457         (subscript_dependence_tester): Likewise.
17458         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Check
17459         DDR_COULD_BE_INDEPENDENT_P.
17460         * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Test
17461         comp_alias_ddrs instead of may_alias_ddrs.
17462         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
17463         New function.
17464         (vect_analyze_data_ref_dependence): Use it if
17465         DDR_COULD_BE_INDEPENDENT_P, but fall back to using the recorded
17466         distance vectors if that fails.
17467         (dependence_distance_ge_vf): New function.
17468         (vect_prune_runtime_alias_test_list): Use it.  Don't clear
17469         LOOP_VINFO_MAY_ALIAS_DDRS.
17470
17471 2017-08-04  Richard Biener  <rguenther@suse.de>
17472
17473         PR middle-end/81705
17474         * fold-const.c (fold_binary_loc): Properly restrict
17475         minus_var0 && minus_var1 case when associating undefined overflow
17476         entities.
17477
17478 2017-08-04  Tom de Vries  <tom@codesourcery.com>
17479
17480         * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability.
17481
17482 2017-08-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17483
17484         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
17485         Don't start diagnostic messages with a capital letter.
17486         * config/rs6000/rs6000.c (rs6000_option_override_internal):
17487         Likewise.
17488         (rs6000_invalid_builtin): Likewise.
17489         (rs6000_trampoline_init): Likewise.
17490
17491 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
17492
17493         PR target/81621
17494         * bb-reorder.c (pass_partition_blocks::execute): Return TODO_df_finish
17495         after setting changeable df flags.
17496
17497 2017-08-03  Richard Biener  <rguenther@suse.de>
17498
17499         * tree-ssa-reassoc.c (should_break_up_subtract): Also break
17500         up if the use is in USE - X.
17501
17502 2017-08-03  Alexander Monakov  <amonakov@ispras.ru>
17503
17504         * toplev.c (dumpfile.h): New include.
17505         (internal_error_reentered): New static function.  Use it...
17506         (internal_error_function): ...here to handle reentered internal_error.
17507
17508 2017-08-03  Richard Biener  <rguenther@suse.de>
17509
17510         PR middle-end/81148
17511         * fold-const.c (split_tree): Add minus_var and minus_con
17512         arguments, remove unused loc arg.  Never generate NEGATE_EXPRs
17513         here but always use minus_*.
17514         (associate_trees): Assert we never associate with MINUS_EXPR
17515         and NULL first operand.  Do not recurse for PLUS_EXPR operands
17516         when associating as MINUS_EXPR either.
17517         (fold_binary_loc): Track minus_var and minus_con.
17518
17519 2017-08-03  Tom de Vries  <tom@codesourcery.com>
17520
17521         PR lto/81430
17522         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): If
17523         ACCEL_COMPILER, apply finish_options on
17524         DECL_FUNCTION_SPECIFIC_OPTIMIZATION.
17525
17526 2017-08-03  Tom de Vries  <tom@codesourcery.com>
17527
17528         PR target/81662
17529         * config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if
17530         function_entry_patch_area_size > 0.
17531
17532 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
17533
17534         PR driver/81650
17535         * calls.c (alloc_max_size): Use HOST_WIDE_INT_UC (10??)
17536         instead of 10??LU, perform unit multiplication in wide_int,
17537         don't change alloc_object_size_limit if the limit is larger
17538         than SSIZE_MAX.
17539
17540         PR tree-optimization/81655
17541         PR tree-optimization/81588
17542         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Handle also
17543         the case when ranges[i].low and high are 1 for unsigned type with
17544         precision 1.
17545
17546         PR middle-end/81052
17547         * omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
17548         (pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.
17549
17550 2017-08-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17551
17552         * tree-vrp.h: Add include guard.
17553
17554 2017-08-02  Uros Bizjak  <ubizjak@gmail.com>
17555
17556         PR target/81644
17557         * config/i386/i386.md (unspecv): Add UNSPECV_UD2.
17558         (ud2): New insn pattern.
17559         * config/i386/i386.c (ix86_expand_epilogue):
17560         For naked functions, generate ud2 instead of trap insn.
17561
17562 2017-08-02  Marek Polacek  <polacek@redhat.com>
17563
17564         PR other/81667
17565         * alloc-pool.h (base_pool_allocator): Initialize m_elt_size.
17566
17567 2017-08-02  Tom de Vries  <tom@codesourcery.com>
17568             Cesar Philippidis  <cesar@codesourcery.com>
17569
17570         * config/nvptx/nvptx.c (nvptx_lockless_update, nvptx_lockfull_update):
17571         Add missing edge probabilities.
17572
17573 2017-08-02  Tamar Christina  <tamar.christina@arm.com>
17574
17575         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
17576         Correct endianness.
17577
17578 2017-08-02  Jakub Jelinek  <jakub@redhat.com>
17579
17580         PR middle-end/79499
17581         * function.c (thread_prologue_and_epilogue_insns): Determine blocks
17582         for find_many_sub_basic_blocks bitmap by looking up BLOCK_FOR_INSN
17583         of first NONDEBUG_INSN_P in each of the split_prologue_seq and
17584         prologue_seq sequences - if any.
17585
17586 2017-08-02  Richard Biener  <rguenther@suse.de>
17587
17588         * tree-vect-stmts.c (vectorizable_store): Perform vector extracts
17589         via vectors if supported, integer extracts via punning if supported
17590         or otherwise vector extracts.
17591
17592 2017-08-02  Richard Biener  <rguenther@suse.de>
17593
17594         * tree-ssa-pre.c (bitmap_insert_into_set_1): Remove and inline
17595         into ...
17596         (bitmap_insert_into_set): ... this.
17597
17598 2017-08-02  Richard Biener  <rguenther@suse.de>
17599
17600         PR tree-optimization/81633
17601         Revert
17602         2015-08-17  Alan Hayward  <alan.hayward@arm.com>
17603
17604         PR tree-optimization/71752
17605         * tree-vect-slp.c (vect_get_slp_defs): Handle null operands.
17606
17607 2017-08-01  Daniel Santos  <daniel.santos@pobox.com>
17608
17609         * config/i386/i386.h (ix86_frame::outlined_save_offset): Remove field.
17610         (machine_function::call_ms2sysv_pad_out): Remove field.
17611         * config/i386/i386.c (xlogue_layout::get_stack_space_used): Modify.
17612         (ix86_compute_frame_layout): Likewise.
17613
17614 2017-08-01  H.J. Lu  <hongjiu.lu@intel.com>
17615
17616         PR target/81654
17617         * config/i386/i386.c (ix86_set_func_type): Disallow naked
17618         attribute with interrupt attribute.
17619
17620 2017-08-01  Andrew Pinski  <apinski@cavium.com>
17621
17622         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Check
17623         BIT_INSERT_EXPR's operand 1
17624         to see if the types precision matches.
17625
17626 2017-08-01  Martin Liska  <mliska@suse.cz>
17627
17628         PR middle-end/70140
17629         * builtins.c (expand_builtin_memcpy_args): Remove.
17630         (expand_builtin_memcpy): Call newly added function
17631         expand_builtin_memory_copy_args.
17632         (expand_builtin_memcpy_with_bounds): Likewise.
17633         (expand_builtin_mempcpy): Remove last argument.
17634         (expand_builtin_mempcpy_with_bounds): Likewise.
17635         (expand_builtin_memory_copy_args): New function created from
17636         expand_builtin_mempcpy_args with small modifications.
17637         (expand_builtin_mempcpy_args): Remove.
17638         (expand_builtin_stpcpy): Remove unused argument.
17639         (expand_builtin): Likewise.
17640         (expand_builtin_with_bounds): Likewise.
17641
17642 2017-08-01  Martin Liska  <mliska@suse.cz>
17643
17644         Revert r250771
17645         Make mempcpy more optimal (PR middle-end/70140).
17646
17647 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
17648
17649         PR target/81622
17650         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
17651         __builtin_vec_cmpne verify both arguments are compatible vectors
17652         before looking at TYPE_MODE on the element type.  For __builtin_vec_ld
17653         verify arg1_type is a pointer or array type.  For __builtin_vec_st,
17654         move computation of aligned to after checking the argument types.
17655         Formatting fixes.
17656
17657         PR target/80846
17658         * config/rs6000/vsx.md (vextract_fp_from_shorth,
17659         vextract_fp_from_shortl): Add element mode after mode in gen_vec_init*
17660         calls.
17661
17662 2017-08-01  Jerome Lambourg  <lambourg@adacore.com>
17663             Doug Rupp  <rupp@adacore.com>
17664             Olivier Hainque  <hainque@adacore.com>
17665
17666         * config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as
17667         well as arm-wrs-vxworks. Update target_cpu_name from arm6 (arch v3) to
17668         arm8 (arch v4).
17669         * config/arm/vxworks.h (MAYBE_TARGET_BPABI_CPP_BUILTINS): New, helper
17670         for TARGET_OS_CPP_BUILTIN.
17671         (TARGET_OS_CPP_BUILTIN): Invoke MAYBE_TARGET_BPABI_CPP_BUILTINS(),
17672         refine CPU definitions for arm_arch5 and add those for arm_arch6 and
17673         arm_arch7.
17674         (MAYBE_ASM_ABI_SPEC): New, helper for SUBTARGET_EXTRA_ASM_SPEC,
17675         passing required abi options to the assembler for EABI configurations.
17676         (EXTRA_CC1_SPEC): New macro, to help prevent the implicit production
17677         of .text.hot and .text.unlikely sections for kernel modules when
17678         using ARM style exceptions.
17679         (CC1_SPEC): Remove obsolete attempt at mimicking Diab toolchain
17680         options. Add EXTRA_CC1_SPEC.
17681         (VXWORKS_ENDIAN_SPEC): Adjust comment and remove handling of Diab
17682         toolchain options.
17683         (DWARF2_UNWIND_INFO): Redefine to handle the pre/post VxWorks 7
17684         transition.
17685         (ARM_TARGET2_DWARF_FORMAT): Define.
17686         * config/arm/t-vxworks: Adjust multilib control to removal of the
17687         Diab command line options.
17688
17689 2017-08-01  Martin Liska  <mliska@suse.cz>
17690
17691         PR gcov-profile/81561
17692         * gcov.c (unblock): Make unblocking safe as we need to preserve
17693         index correspondence of blocks and block_lists.
17694
17695 2017-08-01  Richard Biener  <rguenther@suse.de>
17696
17697         PR tree-optimization/81181
17698         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
17699         (compute_antic): ... end of iteration here.
17700
17701 2017-08-01  James Greenhalgh  <james.greenhalgh@arm.com>
17702
17703         * common.opt (ftree-vectorize): No longer set flag_tree_vectorize.
17704         (ftree-loop-vectorize): Set as EnabledBy ftree-vectorize.
17705         (ftree-slp-vectorize): Likewise.
17706         * omp-expand (expand_omp_simd): Remove flag_tree_vectorize, as it
17707         can no longer be set independent of flag_tree_loop_vectorize.
17708         * omp-general.c (emp_max_vf): Likewise.
17709         * opts.c (enable_fdo_optimizations): Remove references to
17710         flag_tree_vectorize, these are now implicit.
17711         (common_handle_option): Remove handling for OPT_ftree_vectorize,
17712         and leave it for the options machinery.
17713
17714 2017-08-01  Martin Liska  <mliska@suse.cz>
17715
17716         PR middle-end/70140
17717         * builtins.c (expand_builtin_memcpy_args): Remove.
17718         (expand_builtin_memcpy): Call newly added function
17719         expand_builtin_memory_copy_args.
17720         (expand_builtin_memcpy_with_bounds): Likewise.
17721         (expand_builtin_mempcpy): Remove last argument.
17722         (expand_builtin_mempcpy_with_bounds): Likewise.
17723         (expand_builtin_memory_copy_args): New function created from
17724         expand_builtin_mempcpy_args with small modifications.
17725         (expand_builtin_mempcpy_args): Remove.
17726         (expand_builtin_stpcpy): Remove unused argument.
17727         (expand_builtin): Likewise.
17728         (expand_builtin_with_bounds): Likewise.
17729
17730 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
17731
17732         PR target/81641
17733         * config/i386/i386.c (ix86_print_operand_address_as): For -masm=intel
17734         print "ds:" only for immediates in generic address space.
17735
17736 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
17737
17738         PR target/81639
17739         * config/i386/i386.c (ix86_funciton_naked): New prototype.
17740         (ix86_function_ok_for_sibcall): Return false for naked functions.
17741
17742 2017-08-01  Richard Biener  <rguenther@suse.de>
17743
17744         * tree-ssa-pre.c (print_pre_expr): Handle NULL expr.
17745         (compute_antic): Seed worklist with exit block predecessors.
17746         * cfganal.c (dfs_find_deadend): For a cycle return the source
17747         of the edge closing it.
17748
17749 2017-08-01  Tamar Christina  <tamar.christina@arm.com>
17750
17751         * config/aarch64/aarch64.c
17752         (aarch64_can_const_movi_rtx_p): Move 0 check.
17753
17754 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
17755
17756         * tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete.
17757         * fold-const.c (fold_comparison, fold_binary_loc): Delete use of
17758         above macro.
17759         * match.pd: Ditto in address comparison pattern.
17760
17761 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
17762
17763         PR tree-optimization/81627
17764         * tree-predcom.c (prepare_finalizers): Always rewrite into loop
17765         closed ssa form for store-store chain.
17766
17767 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
17768
17769         PR tree-optimization/81620
17770         * tree-predcom.c (add_ref_to_chain): Don't set has_max_use_after
17771         for store-store chain.
17772
17773 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
17774
17775         PR tree-optimization/81588
17776         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
17777         ranges[i].in_p, invert comparison code ccode.  For >/>=,
17778         swap rhs1 and rhs2 and comparison code unconditionally,
17779         for </<= don't do that.  Don't swap rhs1/rhs2 again if
17780         ranges[i].in_p, instead invert comparison code ccode if
17781         opcode or oe->rank is BIT_IOR_EXPR.
17782
17783         PR target/80846
17784         * optabs.def (vec_extract_optab, vec_init_optab): Change from
17785         a direct optab to conversion optab.
17786         * optabs.c (expand_vector_broadcast): Use convert_optab_handler
17787         with GET_MODE_INNER as last argument instead of optab_handler.
17788         * expmed.c (extract_bit_field_1): Likewise.  Use vector from
17789         vector extraction if possible and optab is available.
17790         * expr.c (store_constructor): Use convert_optab_handler instead
17791         of optab_handler.  Use vector initialization from smaller
17792         vectors if possible and optab is available.
17793         * tree-vect-stmts.c (vectorizable_load): Likewise.
17794         * doc/md.texi (vec_extract, vec_init): Document that the optabs
17795         now have two modes.
17796         * config/i386/i386.c (ix86_expand_vector_init): Handle expansion
17797         of vec_init from half-sized vectors with the same element mode.
17798         * config/i386/sse.md (ssehalfvecmode): Add V4TI case.
17799         (ssehalfvecmodelower, ssescalarmodelower): New mode attributes.
17800         (reduc_plus_scal_v8df, reduc_plus_scal_v4df, reduc_plus_scal_v2df,
17801         reduc_plus_scal_v16sf, reduc_plus_scal_v8sf, reduc_plus_scal_v4sf,
17802         reduc_<code>_scal_<mode>, reduc_umin_scal_v8hi): Add element mode
17803         after mode in gen_vec_extract* calls.
17804         (vec_extract<mode>): Renamed to ...
17805         (vec_extract<mode><ssescalarmodelower>): ... this.
17806         (vec_extract<mode><ssehalfvecmodelower>): New expander.
17807         (rotl<mode>3, rotr<mode>3, <shift_insn><mode>3, ashrv2di3): Add
17808         element mode after mode in gen_vec_init* calls.
17809         (VEC_INIT_HALF_MODE): New mode iterator.
17810         (vec_init<mode>): Renamed to ...
17811         (vec_init<mode><ssescalarmodelower>): ... this.
17812         (vec_init<mode><ssehalfvecmodelower>): New expander.
17813         * config/i386/mmx.md (vec_extractv2sf): Renamed to ...
17814         (vec_extractv2sfsf): ... this.
17815         (vec_initv2sf): Renamed to ...
17816         (vec_initv2sfsf): ... this.
17817         (vec_extractv2si): Renamed to ...
17818         (vec_extractv2sisi): ... this.
17819         (vec_initv2si): Renamed to ...
17820         (vec_initv2sisi): ... this.
17821         (vec_extractv4hi): Renamed to ...
17822         (vec_extractv4hihi): ... this.
17823         (vec_initv4hi): Renamed to ...
17824         (vec_initv4hihi): ... this.
17825         (vec_extractv8qi): Renamed to ...
17826         (vec_extractv8qiqi): ... this.
17827         (vec_initv8qi): Renamed to ...
17828         (vec_initv8qiqi): ... this.
17829         * config/rs6000/vector.md (VEC_base_l): New mode attribute.
17830         (vec_init<mode>): Renamed to ...
17831         (vec_init<mode><VEC_base_l>): ... this.
17832         (vec_extract<mode>): Renamed to ...
17833         (vec_extract<mode><VEC_base_l>): ... this.
17834         * config/rs6000/paired.md (vec_initv2sf): Renamed to ...
17835         (vec_initv2sfsf): ... this.
17836         * config/rs6000/altivec.md (splitter, altivec_copysign_v4sf3,
17837         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
17838         vec_unpacku_lo_v8hi, mulv16qi3, altivec_vreve<mode>2): Add
17839         element mode after mode in gen_vec_init* calls.
17840         * config/aarch64/aarch64-simd.md (vec_init<mode>): Renamed to ...
17841         (vec_init<mode><Vel>): ... this.
17842         (vec_extract<mode>): Renamed to ...
17843         (vec_extract<mode><Vel>): ... this.
17844         * config/aarch64/iterators.md (Vel): New mode attribute.
17845         * config/s390/s390.c (s390_expand_vec_strlen, s390_expand_vec_movstr):
17846         Add element mode after mode in gen_vec_extract* calls.
17847         * config/s390/vector.md (non_vec_l): New mode attribute.
17848         (vec_extract<mode>): Renamed to ...
17849         (vec_extract<mode><non_vec_l>): ... this.
17850         (vec_init<mode>): Renamed to ...
17851         (vec_init<mode><non_vec_l>): ... this.
17852         * config/s390/s390-builtins.def (s390_vlgvb, s390_vlgvh, s390_vlgvf,
17853         s390_vlgvf_flt, s390_vlgvg, s390_vlgvg_dbl): Add element mode after
17854         vec_extract mode.
17855         * config/arm/iterators.md (V_elem_l): New mode attribute.
17856         * config/arm/neon.md (vec_extract<mode>): Renamed to ...
17857         (vec_extract<mode><V_elem_l>): ... this.
17858         (vec_extractv2di): Renamed to ...
17859         (vec_extractv2didi): ... this.
17860         (vec_init<mode>): Renamed to ...
17861         (vec_init<mode><V_elem_l>): ... this.
17862         (reduc_plus_scal_<mode>, reduc_plus_scal_v2di, reduc_smin_scal_<mode>,
17863         reduc_smax_scal_<mode>, reduc_umin_scal_<mode>,
17864         reduc_umax_scal_<mode>, neon_vget_lane<mode>, neon_vget_laneu<mode>):
17865         Add element mode after gen_vec_extract* calls.
17866         * config/mips/mips-msa.md (vec_init<mode>): Renamed to ...
17867         (vec_init<mode><unitmode>): ... this.
17868         (vec_extract<mode>): Renamed to ...
17869         (vec_extract<mode><unitmode>): ... this.
17870         * config/mips/loongson.md (vec_init<mode>): Renamed to ...
17871         (vec_init<mode><unitmode>): ... this.
17872         * config/mips/mips-ps-3d.md (vec_initv2sf): Renamed to ...
17873         (vec_initv2sfsf): ... this.
17874         (vec_extractv2sf): Renamed to ...
17875         (vec_extractv2sfsf): ... this.
17876         (reduc_plus_scal_v2sf, reduc_smin_scal_v2sf, reduc_smax_scal_v2sf):
17877         Add element mode after gen_vec_extract* calls.
17878         * config/mips/mips.md (unitmode): New mode iterator.
17879         * config/spu/spu.c (spu_expand_prologue, spu_allocate_stack,
17880         spu_builtin_extract): Add element mode after gen_vec_extract* calls.
17881         * config/spu/spu.md (inner_l): New mode attribute.
17882         (vec_init<mode>): Renamed to ...
17883         (vec_init<mode><inner_l>): ... this.
17884         (vec_extract<mode>): Renamed to ...
17885         (vec_extract<mode><inner_l>): ... this.
17886         * config/sparc/sparc.md (veltmode): New mode iterator.
17887         (vec_init<VMALL:mode>): Renamed to ...
17888         (vec_init<VMALL:mode><VMALL:veltmode>): ... this.
17889         * config/ia64/vect.md (vec_initv2si): Renamed to ...
17890         (vec_initv2sisi): ... this.
17891         (vec_initv2sf): Renamed to ...
17892         (vec_initv2sfsf): ... this.
17893         (vec_extractv2sf): Renamed to ...
17894         (vec_extractv2sfsf): ... this.
17895         * config/powerpcspe/vector.md (VEC_base_l): New mode attribute.
17896         (vec_init<mode>): Renamed to ...
17897         (vec_init<mode><VEC_base_l>): ... this.
17898         (vec_extract<mode>): Renamed to ...
17899         (vec_extract<mode><VEC_base_l>): ... this.
17900         * config/powerpcspe/paired.md (vec_initv2sf): Renamed to ...
17901         (vec_initv2sfsf): ... this.
17902         * config/powerpcspe/altivec.md (splitter, altivec_copysign_v4sf3,
17903         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
17904         vec_unpacku_lo_v8hi, mulv16qi3): Add element mode after mode in
17905         gen_vec_init* calls.
17906
17907 2017-08-01  Richard Biener  <rguenther@suse.de>
17908
17909         PR tree-optimization/81297
17910         * tree-vrp.c (get_single_symbol): Remove assert, instead drop
17911         TREE_OVERFLOW from INTEGER_CSTs.
17912
17913 2017-07-31  Segher Boessenkool  <segher@kernel.crashing.org>
17914
17915         * config/rs6000/rs6000.c (enum rs6000_reg_type): Delete trailing comma.
17916
17917 2017-07-31  Carl Love  <cel@us.ibm.com>
17918
17919         * config/rs6000/rs6000-c: Add support for built-in functions
17920         vector signed char vec_xl_be (signed long long, signed char *);
17921         vector unsigned char vec_xl_be (signed long long, unsigned char *);
17922         vector signed int vec_xl_be (signed long long, signed int *);
17923         vector unsigned int vec_xl_be (signed long long, unsigned int *);
17924         vector signed long long vec_xl_be (signed long long, signed long long *);
17925         vector unsigned long long vec_xl_be (signed long long, unsigned long long *);
17926         vector signed short vec_xl_be (signed long long, signed short *);
17927         vector unsigned short vec_xl_be (signed long long, unsigned short *);
17928         vector double vec_xl_be (signed long long, double *);
17929         vector float vec_xl_be (signed long long, float *);
17930         * config/rs6000/altivec.h (vec_xl_be): Add #define.
17931         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI, XL_BE_V8HI, XL_BE_V4SI)
17932         XL_BE_V2DI, XL_BE_V4SF, XL_BE_V2DF, XL_BE): Add definitions
17933         for the builtins.
17934         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Add function.
17935         (altivec_expand_builtin): Add switch statement to call
17936         altivec_expand_xl_be for each builtin.
17937         (altivec_init_builtins): Add def_builtin for _builtin_vsx_le_be_v8hi,
17938         __builtin_vsx_le_be_v4si, __builtin_vsx_le_be_v2di,
17939         __builtin_vsx_le_be_v4sf, __builtin_vsx_le_be_v2df,
17940         __builtin_vsx_le_be_v16qi.
17941         * doc/extend.texi: Update the built-in documentation file for the
17942         new built-in functions.
17943
17944 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
17945
17946         PR target/25967
17947         * config/i386/i386.c (ix86_allocate_stack_slots_for_args):
17948         New function.
17949         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
17950
17951 2017-07-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17952
17953         * config.gcc: Add z14.
17954         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
17955         CPU model numbers for z13s and z14.
17956         * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
17957         arch12 with z14.
17958         * config/s390/s390-opts.h (enum processor_type): Rename
17959         PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
17960         * config/s390/s390.c (processor_table): Add field for CPU name to
17961         be passed to Binutils.
17962         (s390_asm_output_machine_for_arch): Use the new field in
17963         processor_table for Binutils.
17964         (s390_expand_builtin): Replace arch12 with z14.
17965         (s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
17966         (s390_get_sched_attrmask): Likewise.
17967         (s390_get_unit_mask): Likewise.
17968         * config/s390/s390.opt: Add z14 to processor_type enum.
17969
17970 2017-07-31  Martin Jambor  <mjambor@suse.cz>
17971
17972         PR hsa/81477
17973         * ipa-fnsummary.c (ipa_fn_summary_generate): Set versionable
17974         regardless of optimization level.
17975
17976 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
17977             Martin Liska  <mliska@suse.cz>
17978
17979         * predict.def: Remove old comment and adjust probability.
17980         * gimplify.c (should_warn_for_implicit_fallthrough): Ignore
17981         PREDICT statements.
17982
17983 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
17984
17985         PR target/25967
17986         * config/i386/i386.c (ix86_function_naked): New function.
17987         (ix86_can_use_return_insn_p): Return false for naked functions.
17988         (ix86_expand_prologue): Skip prologue for naked functions.
17989         (ix86_expand_epilogue): Skip epilogue for naked functions
17990         and emit trap instruction.
17991         (ix86_warn_func_return): New function.
17992         (ix86_attribute_table): Add "naked" attribute specification.
17993         (TARGET_WARN_FUNC_RETURN): Define.
17994         * doc/extend.texi (x86 Function Attributes) <naked>: Document it.
17995
17996 2017-07-31  Martin Liska  <mliska@suse.cz>
17997
17998         * gimple-pretty-print.c (dump_gimple_label): Never dump BB info.
17999         (dump_gimple_bb_header): Always dump BB info.
18000         (pp_cfg_jump): Do not append info about BB when dumping a jump.
18001
18002 2017-07-31  Martin Liska  <mliska@suse.cz>
18003
18004         PR sanitize/81530
18005         * convert.c (convert_to_integer_1): Guard condition with flag_sanitize_p
18006         also with current_function_decl non-null equality.
18007
18008 2017-07-31  Jakub Jelinek  <jakub@redhat.com>
18009
18010         PR sanitizer/81604
18011         * ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't
18012         change type to the element type, instead add eltype variable and
18013         use it where we are interested in the element type.
18014
18015         PR tree-optimization/81603
18016         * ipa-polymorphic-call.c
18017         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Perform
18018         offset arithmetic in offset_int, bail out if the resulting bit offset
18019         doesn't fit into shwi.
18020
18021 2017-07-31  Martin Liska  <mliska@suse.cz>
18022
18023         * gimplify.c (mostly_copy_tree_r): Remove Java specific hunk.
18024         (gimplify_save_expr): Fix comment.
18025
18026 2017-07-30  H.J. Lu  <hongjiu.lu@intel.com>
18027
18028         PR target/79793
18029         * config/i386/i386.c (ix86_function_arg): Update arguments for
18030         exception handler.
18031         (ix86_compute_frame_layout): Set the initial stack offset to
18032         INCOMING_FRAME_SP_OFFSET.  Update red-zone offset with
18033         INCOMING_FRAME_SP_OFFSET.
18034         (ix86_expand_epilogue): Don't pop the 'ERROR_CODE' off the
18035         stack before exception handler returns.
18036         * config/i386/i386.h (INCOMING_FRAME_SP_OFFSET): Add the
18037         the 'ERROR_CODE' for exception handler.
18038
18039 2017-07-30  Uros Bizjak  <ubizjak@gmail.com>
18040
18041         * config/i386/i386.h (ASM_PRINTF_EXTENSIONS): New macro.
18042         (ASM_OUTPUT_REG_PUSH): Rewrite with new operand modifiers.
18043         (ASM_OUTPUT_REG_POP): Ditto.
18044         * config/i386/i386.c (ix86_asm_output_function_label): Use fputs
18045         instead of asm_fprintf to output pure string.
18046
18047 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
18048
18049         * debug.h (struct gcc_debug_hooks): Add IMPLICIT argument
18050         to imported_module_or_decl hook.
18051         (debug_nothing_tree_tree_tree_bool): Remove.
18052         (debug_nothing_tree_tree_tree_bool_bool): New declaration.
18053         * debug.c (do_nothing_debug_hooks): Use
18054         debug_nothing_tree_tree_tree_bool_bool instead of
18055         debug_nothing_tree_tree_tree_bool.
18056         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
18057         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
18058         * sdbout.c (sdb_debug_hooks): Likewise.
18059         * dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise.
18060         (gen_namespace_die): Add DW_AT_export_symbols attribute if
18061         langhook wants it.
18062         (dwarf2out_imported_module_or_decl): Add IMPLICIT argument,
18063         if true, -gdwarf-5 and decl will have DW_AT_export_symbols
18064         attribute, don't add anything.
18065
18066 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18067
18068         * fold-const.c (fold_build1_stat_loc): Remove _stat from name.
18069         (fold_build2_stat_loc): Likewise.
18070         (fold_build3_stat_loc): Likewise.
18071         * fold-const.h (fold_build1, fold_build2, fold_build3): Adjust.
18072         (fold_build1_loc): Remove macro.
18073         (fold_build2_loc): Likewise.
18074         (fold_build3_loc): Likewise.
18075
18076 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18077
18078         * gimple.c (gimple_build_debug_bind_stat): Remove _stat from name.
18079         (gimple_build_debug_bind_source_stat): Likewise.
18080         * gimple.h (gimple_build_debug_bind): Remove macro.
18081         (gimple_build_debug_bind_source): Likewise.
18082
18083 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18084
18085         * bitmap.c (bitmap_alloc): Adjust.
18086         (bitmap_gc_alloc): Likewise.
18087         * bitmap.h (bitmap_initialize_stat): Remove _stat from name.
18088
18089 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18090
18091         * bitmap.c (bitmap_obstack_alloc_stat): Rename to bitmap_alloc.
18092         (bitmap_gc_alloc_stat): Rename to bitmap_gc_alloc.
18093         * bitmap.h (bitmap_obstack_alloc_stat): Adjust prototype.
18094         (bitmap_gc_alloc_stat): Likewise.
18095         (BITMAP_ALLOC, BITMAP_GGC_ALLOC): Adjust.
18096
18097 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18098
18099         * rtl.c (shallow_copy_rtx_stat): Remove _stat from name.
18100         * rtl.h (shallow_copy_rtx): Remove macro.
18101
18102 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18103
18104         * emit-rtl.c (gen_raw_REG): Adjust.
18105         * gengenrtl.c (gendef): Likewise.
18106         * rtl.c (rtx_alloc_stat): Remove _stat from name.
18107         * rtl.h (rtx_alloc): Remove macro.
18108
18109 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18110
18111         * tree.c (build_tree_list_vec_stat): Remove _stat from name.
18112         (build_tree_list_stat): Likewise.
18113         * tree.h (build_tree_list): Remove macro.
18114         (build_tree_list_vec): Likewise.
18115
18116 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18117
18118         * tree.c (make_vector_stat): Remove _stat from name.
18119         (build_vector_stat): Likewise.
18120         * tree.h (make_vector_stat): Remove macro.
18121         (build_vector_stat): Likewise.
18122
18123 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18124
18125         * tree.h (build_var_debug_value): Remove prototype.
18126
18127 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18128
18129         * tree.c (tree_cons_stat): Remove _stat from name.
18130         * tree.h (tree_cons): Remove macro.
18131
18132 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18133
18134         * tree.c (build_vl_exp_stat): Remove _stat from name.
18135         * tree.h (build_vl_exp): Remove macro.
18136
18137 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18138
18139         * tree.c (build_decl_stat): Remove _stat from name.
18140         * tree.h (build_decl): Remove macro.
18141
18142 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18143
18144         * gimple.c (gimple_build_with_ops_stat): Adjust.
18145         (gimple_alloc_stat): Remove _stat from name.
18146         * gimple.h (gimple_alloc): Remove macro.
18147
18148 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18149
18150         * tree.c (make_tree_vec_stat): Remove _stat from name.
18151         (grow_tree_vec_stat): Likewise.
18152         * tree.h (make_tree_vec_stat): Adjust prototype.
18153         (grow_tree_vec_stat): Likewise.
18154         (make_tree_vec): Remove macro.
18155         (grow_tree_vec): Likewise.
18156
18157 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18158
18159         * fold-const.c (fold_build1_stat_loc): Adjust.
18160         (fold_build2_stat_loc): Likewise.
18161         (fold_build3_stat_loc): Likewise.
18162         * tree.c (build0_stat): Remove _stat from name.
18163         (build1_stat): Likewise.
18164         (build2_stat): Likewise.
18165         (build3_stat): Likewise.
18166         (build4_stat): Likewise.
18167         (build5_stat): Likewise.
18168         * tree.h (build1_loc): Remove macro, and rename _stat function
18169         to this.
18170         (build2_loc): Likewise.
18171         (build3_loc): Likewise.
18172         (build4_loc): Likewise.
18173         (build5_loc): Likewise.
18174
18175 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18176
18177         * tree.c (make_int_cst_stat): Remove _stat from name.
18178         * tree.h (make_int_cst_stat): Adjust prototype.
18179         (make_int_cst): Remove macro.
18180
18181 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18182
18183         * tree.c (make_tre_binfo_stat): Remove _stat from name.
18184         * tree.h (make_tree_binfo_stat): Adjust prototype.
18185         (make_tree_binfo): Remove.
18186
18187 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18188
18189         * tree.c (copy_node_stat): Rename to copy_node.
18190         (build_distinct_type_copy): Adjust.
18191         * tree.h (copy_node_stat): Adjust prototype.
18192         (copy_node): Remove macro.
18193
18194 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
18195
18196         * tree.c (make_node_stat): rename to make_node.
18197         (build_tree_list_stat): Adjust.
18198         (build0_stat): Likewise.
18199         (build2_stat): Likewise.
18200         (build3_stat): Likewise.
18201         (build4_stat): Likewise.
18202         (build5_stat): Likewise.
18203         (build_decl_stat): Likewise.
18204         * tree.h (make_node_stat): Adjust prototype.
18205         (make_node): remove macro.
18206
18207 2017-07-28  Peter Bergner  <bergner@vnet.ibm.com>
18208
18209         * config/rs6000/ppc-auxv.h (PPC_FEATURE2_DARN): New define.
18210         (PPC_FEATURE2_SCV): Likewise.
18211         * config/rs6000/rs6000.c (cpu_supports_info): Use them.
18212
18213 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
18214
18215         * config/aarch64/aarch64.c
18216         (aarch64_internal_mov_immediate): Add new special pattern.
18217         * config/aarch64/aarch64.md (*movdi_aarch64):
18218         Add reg/32bit const mov case.
18219
18220 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
18221             Richard Sandiford <richard.sandiford@linaro.org>
18222
18223         * config/aarch64/aarch64.md (mov<mode>): Generalize.
18224         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
18225         Add integer and movi cases.
18226         (movi-split-hf-df-sf split, fp16): New.
18227         (enabled): Added TARGET_FP_F16INST.
18228         * config/aarch64/iterators.md (GPF_HF): New.
18229         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): New.
18230
18231 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
18232
18233         * config/aarch64/aarch64.c
18234         (aarch64_simd_container_mode): Add prototype.
18235         (aarch64_expand_mov_immediate): Add HI support.
18236         (aarch64_reinterpret_float_as_int, aarch64_float_const_rtx_p: New.
18237         (aarch64_can_const_movi_rtx_p): New.
18238         (aarch64_preferred_reload_class):
18239         Remove restrictions of using FP registers for certain SIMD operations.
18240         (aarch64_rtx_costs): Added new cost for CONST_DOUBLE moves.
18241         (aarch64_valid_floating_const): Add integer move validation.
18242         (aarch64_simd_imm_scalar_p): Remove.
18243         (aarch64_output_scalar_simd_mov_immediate): Generalize function.
18244         (aarch64_legitimate_constant_p): Expand list of supported cases.
18245         * config/aarch64/aarch64-protos.h
18246         (aarch64_float_const_rtx_p, aarch64_can_const_movi_rtx_p): New.
18247         (aarch64_reinterpret_float_as_int): New.
18248         (aarch64_simd_imm_scalar_p): Remove.
18249         * config/aarch64/constraints.md (Uvi): New.
18250         (Dd): Split into Ds and new Dd.
18251         * config/aarch64/aarch64.md (*movsi_aarch64):
18252         Add SIMD mov case.
18253         (*movdi_aarch64): Add SIMD mov case.
18254
18255 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
18256
18257         * tree-predcom.c: (struct chain): Handle store-store chain in which
18258         stores for elimination only store loop invariant values.
18259         (execute_pred_commoning_chain): Ditto.
18260         (prepare_initializers_chain_store_elim): Ditto.
18261         (prepare_finalizers): Ditto.
18262         (is_inv_store_elimination_chain): New function.
18263         (initialize_root_vars_store_elim_1): New function.
18264
18265 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
18266
18267         * tree-predcom.c: Revise general description of the pass.
18268         (enum chain_type): New enum type for store elimination.
18269         (struct chain): New field supporting store elimination.
18270         (struct component): Ditto.
18271         (dump_chain): Dump store-stores chain.
18272         (release_chain): Release resources.
18273         (split_data_refs_to_components): Compute and create component
18274         contains only stores for elimination.
18275         (get_chain_last_ref_at): New function.
18276         (make_invariant_chain): Initialization.
18277         (make_rooted_chain): Specify chain type in parameter and record it.
18278         (add_looparound_copies): Skip for store-stores chain.
18279         (determine_roots_comp): Compute type of chain and pass it to
18280         make_rooted_chain.
18281         (initialize_root_vars_store_elim_2): New function.
18282         (finalize_eliminated_stores): New function.
18283         (remove_stmt): Handle store for elimination.
18284         (execute_pred_commoning_chain): Execute predictive commoning on
18285         store-store chains.
18286         (determine_unroll_factor): Skip unroll for store-stores chain.
18287         (prepare_initializers_chain_store_elim): New function.
18288         (prepare_initializers_chain): Hanlde store-store chain.
18289         (prepare_finalizers_chain, prepare_finalizers): New function.
18290         (tree_predictive_commoning_loop): Return integer value indicating
18291         if loop is unrolled or lcssa form is corrupted.
18292         (tree_predictive_commoning): Rewrite for lcssa form if necessary.
18293
18294 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
18295
18296         * tree-predcom.c (initialize_root): Delete.
18297         (execute_pred_commoning_chain): Initialize root vars and replace
18298         reference of non-combined chain directly, rather than call above
18299         function.
18300
18301 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
18302
18303         * tree-predcom.c (ref_at_iteration): Add parameter NITERS.  Compute
18304         memory reference to DR at (NITERS + ITERS)-th iteration of loop.
18305
18306 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
18307
18308         * tree-predcom.c (struct chain): New field init_seq.
18309         (release_chain): Release init_seq.
18310         (prepare_initializers_chain): Record intialization stmts in above
18311         field.
18312         (insert_init_seqs): New function.
18313         (tree_predictive_commoning_loop): Call insert_init_seqs.
18314
18315 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
18316
18317         * tree-predcom.c (determine_roots_comp): Skip trivial components.
18318
18319 2017-07-28  Richard Biener  <rguenther@suse.de>
18320
18321         * match.pd: Remove superfluous :c.
18322         * genmatch.c (simplify::id): Add member.
18323         (lower_commutative, lower_opt_convert, lower_cond, lower_for):
18324         Copy id.
18325         (current_id): New global.
18326         (dt_node::parent): Move from ...
18327         (dt_operand::parent): ... here.  Add for_id member.
18328         (is_a_helper <dt_operand *>::test): DT_TRUE is also a dt_operand.
18329         (decision_tree::find_node): Relax order requirement when
18330         merging DT_TRUE nodes to ones inbetween the current simplify
18331         and the one we try to merge with.  Add diagnostic whenever
18332         we need to enforce pattern order by not merging.
18333         (decision_tree::insert): Set current_id.
18334         (decision_tree::print_node): Dump parent node and for_id.
18335         (parser::last_id): Add member.
18336         (parser::push_simplify): Assign unique id.
18337         (parser::parser): Initialize last_id.
18338
18339 2017-07-28  Martin Liska  <mliska@suse.cz>
18340
18341         PR sanitizer/81340
18342         * sanopt.c (sanitize_rewrite_addressable_params): Set VALUE_EXPR after
18343         gimple_build_debug_bind.
18344
18345 2017-07-28  Richard Biener  <rguenther@suse.de>
18346
18347         PR tree-optimization/81502
18348         * match.pd: Add pattern combining BIT_INSERT_EXPR with
18349         BIT_FIELD_REF.
18350         * tree-cfg.c (verify_expr): Verify types of BIT_FIELD_REF
18351         size/pos operands.
18352         (verify_gimple_assign_ternary): Likewise for BIT_INSERT_EXPR pos.
18353         * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Use bitsizetype
18354         for BIT_FIELD_REF args.
18355         * fold-const.c (make_bit_field_ref): Likewise.
18356         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
18357
18358 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
18359
18360         PR sanitizer/80998
18361         * sanopt.c (pass_sanopt::execute): Handle IFN_UBSAN_PTR.
18362         * tree-ssa-alias.c (call_may_clobber_ref_p_1): Likewise.
18363         * flag-types.h (enum sanitize_code): Add SANITIZER_POINTER_OVERFLOW.
18364         Or it into SANITIZER_UNDEFINED.
18365         * ubsan.c: Include gimple-fold.h and varasm.h.
18366         (ubsan_expand_ptr_ifn): New function.
18367         (instrument_pointer_overflow): New function.
18368         (maybe_instrument_pointer_overflow): New function.
18369         (instrument_object_size): Formatting fix.
18370         (pass_ubsan::execute): Call instrument_pointer_overflow
18371         and maybe_instrument_pointer_overflow.
18372         * internal-fn.c (expand_UBSAN_PTR): New function.
18373         * ubsan.h (ubsan_expand_ptr_ifn): Declare.
18374         * sanitizer.def (__ubsan_handle_pointer_overflow,
18375         __ubsan_handle_pointer_overflow_abort): New builtins.
18376         * tree-ssa-tail-merge.c (merge_stmts_p): Handle IFN_UBSAN_PTR.
18377         * internal-fn.def (UBSAN_PTR): New internal function.
18378         * opts.c (sanitizer_opts): Add pointer-overflow.
18379         * lto-streamer-in.c (input_function): Handle IFN_UBSAN_PTR.
18380         * fold-const.c (build_range_check): Compute pointer range check in
18381         integral type if pointer arithmetics would be needed.  Formatting
18382         fixes.
18383
18384 2017-07-28  Martin Liska  <mliska@suse.cz>
18385
18386         PR sanitizer/81460
18387         * sanopt.c (sanitize_rewrite_addressable_params): Do not rewrite
18388         parameters that are of a variable-length.
18389
18390 2017-07-28  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18391
18392         * config.gcc (powerpc-*-rtems*): Remove rs6000/eabi.h.  Add
18393         rs6000/biarch64.h.
18394         * config/rs6000/rtems.h (ASM_DECLARE_FUNCTION_SIZE): New macro.
18395         (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
18396         (CRT_CALL_STATIC_FUNCTION): Likewise.
18397         (ASM_DEFAULT_SPEC): New define.
18398         (ASM_SPEC32): Likewise.
18399         (ASM_SPEC64): Likewise.
18400         (ASM_SPEC_COMMON): Likewise.
18401         (ASM_SPEC): Likewise.
18402         (INVALID_64BIT): Likewise.
18403         (LINK_OS_DEFAULT_SPEC): Likewise.
18404         (LINK_OS_SPEC32): Likewise.
18405         (LINK_OS_SPEC64): Likewise.
18406         (POWERPC_LINUX): Likewise.
18407         (PTRDIFF_TYPE): Likewise.
18408         (RESTORE_FP_PREFIX): Likewise.
18409         (RESTORE_FP_SUFFIX): Likewise.
18410         (SAVE_FP_PREFIX): Likewise.
18411         (SAVE_FP_SUFFIX): Likewise.
18412         (SIZE_TYPE): Likewise.
18413         (SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise.
18414         (TARGET_64BIT): Likewise.
18415         (TARGET_64BIT): Likewise.
18416         (TARGET_AIX): Likewise.
18417         (WCHAR_TYPE_SIZE): Likewise.
18418         (WCHAR_TYPE): Undefine.
18419         (TARGET_OS_CPP_BUILTINS): Add 64-bit PowerPC defines.
18420         (CPP_OS_DEFAULT_SPEC): Use previous CPP_OS_RTEMS_SPEC.
18421         (CPP_OS_RTEMS_SPEC): Delete.
18422         (SUBSUBTARGET_EXTRA_SPECS): Remove cpp_os_rtems.  Add
18423         asm_spec_common, asm_spec32, asm_spec64, link_os_spec32, and
18424         link_os_spec64.
18425         * config/rs6000/t-rtems: Add mcpu=e6500/m64 multilibs.
18426
18427 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
18428
18429         PR tree-optimization/81578
18430         * tree-parloops.c (build_new_reduction): Bail out if
18431         reduction_code isn't one of the standard OpenMP reductions.
18432         Move the details printing after that decision.
18433
18434 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
18435
18436         * config/rs6000/predicates.md (volatile_mem_operand): Remove code
18437         related to reload_in_progress.
18438         (splat_input_operand): Likewise.
18439         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_rtx):
18440         Delete prototype.
18441         * config/rs6000/rs6000.c (machine_function): Remove sdmode_stack_slot
18442         field.
18443         (TARGET_EXPAND_TO_RTL_HOOK): Delete.
18444         (TARGET_INSTANTIATE_DECLS): Likewise.
18445         (legitimate_indexed_address_p): Delete reload_in_progress code.
18446         (rs6000_debug_legitimate_address_p): Likewise.
18447         (rs6000_eliminate_indexed_memrefs): Likewise.
18448         (rs6000_emit_le_vsx_store): Likewise.
18449         (rs6000_emit_move_si_sf_subreg): Likewise.
18450         (rs6000_emit_move): Likewise.
18451         (register_to_reg_type): Likewise.
18452         (rs6000_pre_atomic_barrier): Likewise.
18453         (rs6000_machopic_legitimize_pic_address): Likewise.
18454         (rs6000_allocate_stack_temp): Likewise.
18455         (rs6000_address_for_fpconvert): Likewise.
18456         (rs6000_address_for_altivec): Likewise.
18457         (rs6000_secondary_memory_needed_rtx): Delete function.
18458         (rs6000_check_sdmode): Likewise.
18459         (rs6000_alloc_sdmode_stack_slot): Likewise.
18460         (rs6000_instantiate_decls): Likewise.
18461         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_RTX): Delete.
18462         * config/rs6000/rs6000.md (splitter for *movsi_got_internal):
18463         Delete reload_in_progress.
18464         (*vec_reload_and_plus_<mptrsize>): Likewise.
18465         * config/rs6000/vsx.md (vsx_mul_v2di): Likewise.
18466         (vsx_div_v2di): Likewise.
18467         (vsx_udiv_v2di): Likewise.
18468
18469 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
18470
18471         * config/rs6000/rs6000.opt (mlra): Replace with stub.
18472         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete OPTION_MASK_LRA.
18473         * config/rs6000/rs6000.c (TARGET_LRA_P): Delete.
18474         (rs6000_debug_reg_global): Delete print of LRA status.
18475         (rs6000_option_override_internal): Delete dead LRA related code.
18476         (rs6000_lra_p): Delete function.
18477         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mlra.
18478
18479 2017-07-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18480
18481         * config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*).
18482         * config/riscv/rtems.h: New file.
18483
18484 2017-07-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18485             Sudakshina Das  <sudi.das@arm.com>
18486
18487         * config/aarch64/aarch64.md
18488         (define_split for and<mode>3nr_compare): Move
18489         non aarch64_logical_operand to a register.
18490         (define_split for and_<SHIFT:optab><mode>3nr_compare0): Move non
18491         register immediate operand to a register.
18492         * config/aarch64/predicates.md (aarch64_mov_imm_operand): New.
18493
18494 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
18495
18496         PR middle-end/81564
18497         * tree-cfg.c (group_case_labels_stmt): Handle already deleted blocks.
18498
18499 2017-07-27  Richard Biener  <rguenther@suse.de>
18500
18501         PR tree-optimization/81573
18502         PR tree-optimization/81494
18503         * tree-vect-loop.c (vect_create_epilog_for_reduction): Handle
18504         multi defuse cycle case.
18505
18506 2017-07-27  Richard Biener  <rguenther@suse.de>
18507
18508         PR tree-optimization/81571
18509         * tree-vect-slp.c (vect_build_slp_tree): Properly verify reduction
18510         PHIs.
18511
18512 2017-07-27  Eric Botcazou  <ebotcazou@adacore.com>
18513
18514         * config/sparc/sparc.c (sparc_option_override): Set MASK_FSMULD flag
18515         earlier and only if MASK_FPU is set.  Adjust formatting.
18516
18517 2017-07-27  Martin Liska  <mliska@suse.cz>
18518
18519         * opt-functions.awk: Add validation of value of Init.
18520         * optc-gen.awk: Pass new argument.
18521
18522 2017-07-27  Martin Liska  <mliska@suse.cz>
18523
18524         * auto-profile.c (autofdo_source_profile::update_inlined_ind_target):
18525         Fix wrong condition.
18526
18527 2017-07-27  Martin Liska  <mliska@suse.cz>
18528
18529         * auto-profile.c (afdo_annotate_cfg): Assign zero counts to
18530         BBs and edges seen by autoFDO.
18531
18532 2017-07-27  Richard Biener  <rguenther@suse.de>
18533
18534         PR tree-optimization/81502
18535         * tree-ssa.c (non_rewritable_lvalue_p): Handle BIT_INSERT_EXPR
18536         with incompatible but same sized type.
18537         (execute_update_addresses_taken): Likewise.
18538
18539 2017-07-27  James Greenhalgh  <james.greenhalgh@arm.com>
18540
18541         * tree-ssa-loop-ch.c (pass_ch::process_loop_p): Guard on
18542         flag_tree_loop_vectorize rather than flag_tree_vectorize.
18543
18544 2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18545
18546         PR target/81534
18547         * config/s390/s390.md ("*atomic_compare_and_swap<mode>_1")
18548         ("*atomic_compare_and_swapdi_2", "*atomic_compare_and_swapsi_3"):
18549         Change s_operand to memory_operand.
18550
18551 2017-07-27  Richard Sandiford  <richard.sandiford@linaro.org>
18552
18553         * config/rs6000/rs6000-protos.h (rs6000_emit_le_vsx_permute): Declare.
18554         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Replace with...
18555         (rs6000_emit_le_vsx_permute): ...this.  Take the destination as input.
18556         Emit instructions rather than returning an expression.  Handle TFmode
18557         and KFmode by casting to TImode.
18558         (rs6000_emit_le_vsx_load): Update to use rs6000_emit_le_vsx_permute.
18559         (rs6000_emit_le_vsx_store): Likewise.
18560         * config/rs6000/vsx.md (VSX_TI): New iterator.
18561         (*vsx_le_permute_<mode>): Use it instead of VSX_LE_128.
18562         (*vsx_le_undo_permute_<mode>): Likewise.
18563         (*vsx_le_perm_load_<mode>): Use rs6000_emit_le_vsx_permute to
18564         emit the split sequence.
18565         (*vsx_le_perm_store_<mode>): Likewise.
18566
18567 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
18568
18569         PR tree-optimization/81555
18570         PR tree-optimization/81556
18571         * tree-ssa-reassoc.c (rewrite_expr_tree): Add NEXT_CHANGED argument,
18572         if true, force CHANGED for the recursive invocation.
18573         (reassociate_bb): Remember original length of ops array, pass
18574         len != orig_len as NEXT_CHANGED in rewrite_expr_tree call.
18575
18576         * attribs.c (decl_attributes): Imply noinline, noclone and no_icf
18577         attributes for noipa attribute.  For naked attribute use
18578         lookup_attribute first before lookup_attribute_spec.
18579         * final.c (rest_of_handle_final): Disable IPA RA for functions with
18580         noipa attribute.
18581         * ipa-visibility.c (non_local_p): Fix comment typos.  Return true
18582         for functions with noipa attribute.
18583         (cgraph_externally_visible_p): Return true for functions with noipa
18584         attribute.
18585         * cgraph.c (cgraph_node::get_availability): Return AVAIL_INTERPOSABLE
18586         for functions with noipa attribute.
18587         * doc/extend.texi: Document noipa function attribute.
18588         * tree-ssa-structalias.c (refered_from_nonlocal_fn): Set *nonlocal_p
18589         also for functions with noipa attribute.
18590         (ipa_pta_execute): Set nonlocal_p also for nodes with noipa attribute.
18591
18592 2017-07-26  Andrew Pinski  <apinski@cavium.com>
18593
18594         * config/aarch64/aarch64.c (thunderx_vector_cost): Decrease cost of
18595         vec_unalign_load_cost and vec_unalign_store_cost.
18596
18597 2017-07-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
18598
18599         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Delete
18600         -mvsx-small-integer option.
18601         (ISA_3_0_MASKS_IEEE): Likewise.
18602         (OTHER_VSX_VECTOR_MASKS): Likewise.
18603         (POWERPC_MASKS): Likewise.
18604         * config/rs6000/rs6000.opt (-mvsx-small-integer): Likewise.
18605         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Simplify
18606         code, only testing for DImode being allowed in non-VSX floating
18607         point registers.
18608         (rs6000_init_hard_regno_mode_ok): Change TARGET_VSX_SMALL_INTEGER
18609         to TARGET_P8_VECTOR test.  Remove redundant VSX test inside of
18610         another VSX test.
18611         (rs6000_option_override_internal): Delete -mvsx-small-integer.
18612         (rs6000_expand_vector_set): Change TARGET_VSX_SMALL_INTEGER to
18613         TARGET_P8_VECTOR test.
18614         (rs6000_secondary_reload_simple_move): Likewise.
18615         (rs6000_preferred_reload_class): Delete TARGET_VSX_SMALL_INTEGER,
18616         since TARGET_P9_VECTOR was already tested.
18617         (rs6000_opt_masks): Remove -mvsx-small-integer.
18618         * config/rs6000/vsx.md (vsx_extract_<mode>): Delete
18619         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
18620         used.
18621         (vsx_extract_<mode>_p9): Delete TARGET_VSX_SMALL_INTEGER, since a
18622         test for TARGET_VEXTRACTUB was used, and that uses
18623         TARGET_P9_VECTOR.
18624         (p9 extract splitter): Likewise.
18625         (vsx_extract_<mode>_di_p9): Likewise.
18626         (vsx_extract_<mode>_store_p9): Likewise.
18627         (vsx_extract_si): Delete TARGET_VSX_SMALL_INTEGER, since a test
18628         for TARGET_P9_VECTOR was used.  Delete code that is now dead with
18629         the elimination of TARGET_VSX_SMALL_INTEGER.
18630         (vsx_extract_<mode>_p8): Likewise.
18631         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_fl_<FL_CONV:mode>): Likewise.
18632         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_ufl_<FL_CONV:mode>): Likewise.
18633         (vsx_set_<mode>_p9): Likewise.
18634         (vsx_set_v4sf_p9): Likewise.
18635         (vsx_set_v4sf_p9_zero): Likewise.
18636         (vsx_insert_extract_v4sf_p9): Likewise.
18637         (vsx_insert_extract_v4sf_p9_2): Likewise.
18638         * config/rs6000/rs6000.md (sign extend splitter): Change
18639         TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test.
18640         (floatsi<mode>2_lfiwax_mem): Likewise.
18641         (floatunssi<mode>2_lfiwzx_mem): Likewise.
18642         (float<QHI:mode><FP_ISA3:mode>2): Delete TARGET_VSX_SMALL_INTEGER,
18643         since a test for TARGET_P9_VECTOR was used.
18644         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
18645         (floatuns<QHI:mode><FP_ISA3:mode>2): Likewise.
18646         (floatuns<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
18647         (fix_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
18648         TARGET_P8_VECTOR test.
18649         (fix_trunc<mode>si2_stfiwx): Likewise.
18650         (fix_trunc<mode>si2_internal): Likewise.
18651         (fix_trunc<SFDF:mode><QHI:mode>2): Delete
18652         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
18653         used.
18654         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18655         (fixuns_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
18656         TARGET_P8_VECTOR test.
18657         (fixuns_trunc<mode>si2_stfiwx): Likewise.
18658         (fixuns_trunc<SFDF:mode><QHI:mode>2): Delete
18659         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
18660         used.
18661         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18662         (fctiw<u>z_<mode>_smallint): Delete TARGET_VSX_SMALL_INTEGER,
18663         since a test for TARGET_P9_VECTOR was used.
18664         (splitter for loading small constants): Likewise.
18665
18666 2017-07-26  Andrew Pinski  <apinski@cavium.com>
18667
18668         * config/aarch64/aarch64.c (thunderx_vector_cost): Fix
18669         vec_fp_stmt_cost.
18670
18671 2017-07-26  H.J. Lu  <hongjiu.lu@intel.com>
18672
18673         PR target/81563
18674         * config/i386/i386.c (sp_valid_at): Properly check CFA offset.
18675         (fp_valid_at): Likewise.
18676
18677 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
18678
18679         * config/aarch64/aarch64.c (cortexa57_addrcost_table): Remove.
18680         (qdf24xx_addrcost_table): Likewise.
18681         (cortexa57_tunings): Update to use generic_branch_cost.
18682         (cortexa72_tunings): Likewise.
18683         (cortexa73_tunings): Likewise.
18684         (qdf24xx_tunings): Likewise.
18685
18686 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
18687
18688         * config/aarch64/aarch64.c (cortexa57_branch_cost): Remove.
18689         (thunderx2t99_branch_cost): Likewise.
18690         (cortexa35_tunings): Update to use generic_branch_cost.
18691         (cortexa53_tunings): Likewise.
18692         (cortexa57_tunings): Likewise.
18693         (cortexa72_tunings): Likewise.
18694         (cortexa73_tunings): Likewise.
18695         (thunderx2t99_tunings): Likewise.
18696
18697 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18698
18699         * config/sparc/sparc.c (dump_target_flag_bits): Dump MASK_FSMULD.
18700         (sparc_option_override): Honour MASK_FSMULD.
18701         * config/sparc/sparc.h (MASK_FEATURES): Add MASK_FSMULD.
18702         * config/sparc/sparc.md (muldf3_extend): Use TARGET_FSMULD.
18703         * config/sparc/sparc.opt (mfsmuld): New option.
18704         * doc/invoke.texi (mfsmuld): Document option.
18705
18706 2017-07-26  Marek Polacek  <polacek@redhat.com>
18707
18708         PR middle-end/70992
18709         * tree.c (build2_stat): Don't set TREE_CONSTANT on divisions by zero.
18710
18711 2017-07-26  Richard Biener  <rguenther@suse.de>
18712
18713         * gimple-match-head.c (do_valueize): Return OP if valueize
18714         returns NULL_TREE.
18715         (get_def): New helper to get at the def stmt of a SSA name
18716         if valueize allows.
18717         * genmatch.c (dt_node::gen_kids_1): Use get_def instead of
18718         do_valueize to get at the def stmt.
18719         (dt_operand::gen_gimple_expr): Simplify do_valueize calls.
18720
18721 2017-07-26  Wilco Dijkstra  <wdijkstr@arm.com>
18722
18723         PR middle-end/46932
18724         * auto-inc-dec.c (parse_add_or_inc): Block autoinc on sfp.
18725
18726 2017-07-26  Martin Liska  <mliska@suse.cz>
18727
18728         PR sanitize/81186
18729         * function.c (expand_function_start): Make expansion of
18730         nonlocal_goto_save_area after parm_birth_insn.
18731
18732 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18733
18734         * config/sparc/sparc.c (sparc_option_override): Remove MASK_FPU
18735         from all CPU target flags enable members.
18736
18737 2017-07-26  Richard Biener  <rguenther@suse.de>
18738
18739         * genmatch.c (dt_simplify::gen): Make iterator vars const.
18740         (decision_tree::gen): Make 'type' const.
18741         (write_predicate): Likewise.
18742
18743 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
18744
18745         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok):
18746         Eliminate TARGET_UPPER_REGS_{DF,DI,SF} usage.
18747         (rs6000_option_override_internal): Likewise.
18748         (rs6000_expand_vector_set): Likewise.
18749         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Delete.
18750         (TARGET_UPPER_REGS_SF): Likewise.
18751         (TARGET_UPPER_REGS_DI): Likewise.
18752         (TARGET_VEXTRACTUB): Eliminate TARGET_UPPER_REGS_{DF,DI,SF}.
18753         (TARGET_DIRECT_MOVE_64BIT): Likewise.
18754         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Likewise.
18755         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
18756         (Splitters for DI constants in Altivec registers): Likewise.
18757         * config/rs6000/vsx.md (vsx_set_<mode>_p9): Likewise.
18758         (vsx_set_v4sf_p9): Likewise.
18759         (vsx_set_v4sf_p9_zero): Likewise.
18760         (vsx_insert_extract_v4sf_p9): Likewise.
18761         (vsx_insert_extract_v4sf_p9_2): Likewise.
18762
18763 2017-07-25  Carl Love  <cel@us.ibm.com>
18764
18765         * doc/extend.texi: Update the built-in documentation file for the
18766         existing built-in functions
18767         vector signed char vec_cnttz (vector signed char);
18768         vector unsigned char vec_cnttz (vector unsigned char);
18769         vector signed short vec_cnttz (vector signed short);
18770         vector unsigned short vec_cnttz (vector unsigned short);
18771         vector signed int vec_cnttz (vector signed int);
18772         vector unsigned int vec_cnttz (vector unsigned int);
18773         vector signed long long vec_cnttz (vector signed long long);
18774         vector unsigned long long vec_cnttz (vector unsigned long long);
18775
18776 2017-07-25  Andrew Pinski  <apinski@cavium.com>
18777
18778         * tree-ssa-uninit.c (warn_uninitialized_vars): Don't warn about memory
18779         accesses where the use is for the first operand of a BIT_INSERT.
18780
18781 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
18782
18783         PR bootstrap/81521
18784         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
18785         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
18786
18787 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
18788
18789         * config/i386/gstabs.h: Delete.
18790         * config/i386/openbsd.h, config/i386/t-openbsd: Likewise.
18791
18792 2017-07-25  Uros Bizjak  <ubizjak@gmail.com>
18793
18794         * config/i386/i386.c (ix86_decompose_address): Do not check for
18795         register RTX when looking at index_reg or base_reg.
18796         * config/i386/i386.h (INCOMING_RETURN_ADDR_RTX): Use stack_pointer_rtx.
18797
18798 2017-07-25  Eric Botcazou  <ebotcazou@adacore.com>
18799
18800         * gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace
18801         to update EH info here.
18802
18803 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
18804
18805         * match.pd ((X * CST1) * CST2): Simplify to X * (CST1 * CST2).
18806
18807 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
18808
18809         * match.pd ((X * CST) * Y): Reassociate to (X * Y) * CST.
18810
18811 2017-07-25  Torsten Duwe  <duwe@suse.de>
18812
18813         * common.opt: Introduce -fpatchable-function-entry
18814         command line option, and its variables function_entry_patch_area_size
18815         and function_entry_patch_area_start.
18816         * opts.c (common_handle_option): Add -fpatchable_function_entry_ case,
18817         including a two-value parser.
18818         * target.def (print_patchable_function_entry): New target hook.
18819         * targhooks.h (default_print_patchable_function_entry): New function.
18820         * targhooks.c (default_print_patchable_function_entry): Likewise.
18821         * toplev.c (process_options): Switch off IPA-RA if
18822         patchable function entries are being generated.
18823         * varasm.c (assemble_start_function): Look at the
18824         patchable-function-entry command line switch and current
18825         function attributes and maybe generate NOP instructions by
18826         calling the print_patchable_function_entry hook.
18827         * doc/extend.texi: Document patchable_function_entry attribute.
18828         * doc/invoke.texi: Document -fpatchable_function_entry
18829         command line option.
18830         * doc/tm.texi.in (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
18831         New target hook.
18832         * doc/tm.texi: Re-generate.
18833
18834 2017-07-25  Jakub Jelinek  <jakub@redhat.com>
18835
18836         PR target/81532
18837         * config/i386/constraints.md (Yd, Ye): Use ALL_SSE_REGS for
18838         TARGET_AVX512DQ rather than TARGET_AVX512BW.
18839
18840 2017-07-25  Tamar Christina  <tamar.christina@arm.com>
18841
18842         * config/arm/parsecpu.awk (all_cores): Remove duplicates.
18843
18844 2017-07-25  Richard Biener  <rguenther@suse.de>
18845
18846         PR tree-optimization/81455
18847         * tree-ssa-loop-unswitch.c (find_loop_guard): Make sure to
18848         not walk in cycles when looking for guards.
18849
18850 2017-07-25  Richard Biener  <rguenther@suse.de>
18851
18852         PR tree-optimization/81529
18853         * tree-vect-stmts.c (process_use): Disregard live induction PHIs
18854         when optimizing backedge uses.
18855
18856 2017-07-25  David Edelsohn  <dje.gcc@gmail.com>
18857
18858         * dwarf2asm.c (dw2_asm_output_nstring): Encode double quote
18859         character for AIX.
18860         * dwarf2out.c (output_macinfo): Copy debug_line_section_label
18861         to dl_section_ref.  On AIX, append an expression to subtract
18862         the size of the section length to dl_section_ref.
18863
18864 2017-07-25  Segher Boessenkool  <segher@kernel.crashing.org>
18865
18866         * configure.ac: If any of the config.* scripts fail, exit 1.
18867         * configure: Regenerate.
18868
18869 2017-07-25  Richard Biener  <rguenther@suse.de>
18870
18871         PR middle-end/81546
18872         * tree-ssa-operands.c (verify_imm_links): Remove cap on number
18873         of immediate uses, be more verbose on errors.
18874
18875 2017-07-25  Richard Biener  <rguenther@suse.de>
18876
18877         PR tree-optimization/81510
18878         * tree-vect-loop.c (vect_is_simple_reduction): When the
18879         reduction stmt is not inside the loop bail out.
18880
18881 2017-07-25  Richard Biener  <rguenther@suse.de>
18882
18883         PR tree-optimization/81303
18884         * tree-vect-loop-manip.c (vect_loop_versioning): Build
18885         profitability check against LOOP_VINFO_NITERSM1.
18886
18887 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
18888
18889         * domwalk.c (cmp_bb_postorder): Simplify.
18890         (sort_bbs_postorder): New function.  Use it...
18891         (dom_walker::walk): ...here to optimize common cases.
18892
18893 2017-07-25  Martin Liska  <mliska@suse.cz>
18894
18895         PR ipa/81520
18896         * ipa-visibility.c (function_and_variable_visibility): Make the
18897         redirection just on target that supports aliasing.
18898         Fix GNU coding style.
18899
18900 2017-07-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18901
18902         PR libgcc/61152
18903         * config/aarch64/rtems.h: Add GCC Runtime Library Exception.
18904         Format changes.
18905         * config/arm/rtems.h: Likewise.
18906         * config/bfin/rtems.h: Likewise.
18907         * config/i386/rtemself.h: Likewise.
18908         * config/lm32/rtems.h: Likewise.
18909         * config/m32c/rtems.h: Likewise.
18910         * config/m68k/rtemself.h: Likewise.
18911         * config/microblaze/rtems.h: Likewise.
18912         * config/mips/rtems.h: Likewise.
18913         * config/moxie/rtems.h: Likewise.
18914         * config/nios2/rtems.h: Likewise.
18915         * config/powerpcspe/rtems.h: Likewise.
18916         * config/rs6000/rtems.h: Likewise.
18917         * config/rtems.h: Likewise.
18918         * config/sh/rtems.h: Likewise.
18919         * config/sh/rtemself.h: Likewise.
18920         * config/sparc/rtemself.h: Likewise.
18921
18922 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
18923
18924         PR 81487
18925         * hsa-brig.c (brig_init): Use xasprintf instead of asprintf.
18926         * gimple-pretty-print.c (dump_profile, dump_probability): Same.
18927         * tree-ssa-structalias.c (alias_get_name): Same.
18928
18929 2017-07-25  Bin Cheng  <bin.cheng@arm.com>
18930
18931         PR target/81414
18932         * config/aarch64/cortex-a57-fma-steering.c (analyze): Skip fmul/fmac
18933         instructions if no du chain is found.
18934
18935 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
18936
18937         * config/avr/avr-log.c (avr_log_vadump) ['T']: Print NULL-TREE.
18938
18939 2017-07-25  Richard Biener  <rguenther@suse.de>
18940
18941         PR middle-end/81505
18942         * fold-const.c (fold_negate_const): TREE_OVERFLOW should be
18943         sticky.
18944
18945 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
18946
18947         * config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Delete
18948         upper-regs options.
18949         (ISA_2_7_MASKS_SERVER): Likewise.
18950         (ISA_3_0_MASKS_IEEE): Likewise.
18951         (OTHER_P8_VECTOR_MASKS): Likewise.
18952         (OTHER_VSX_VECTOR_MASKS): Likewise.
18953         (POWERPC_MASKS): Likewise.
18954         (power7 cpu): Use ISA_2_6_MASKS_SERVER instead of using a
18955         duplicate list of options.
18956         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove
18957         explicit -mupper-regs options.
18958         * config/rs6000/rs6000.opt (-mvsx-scalar-memory): Delete
18959         -mupper-regs* options.  Delete -mvsx-scalar-memory, which was an
18960         alias for -mupper-regs-df.
18961         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
18962         (rs6000_init_hard_regno_mode_ok): Likewise.
18963         (rs6000_option_override_internal): Likewise.
18964         (rs6000_opt_masks): Likewise.
18965         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Define upper regs
18966         options in terms of whether -mvsx or -mpower8-vector was used.
18967         (TARGET_UPPER_REGS_DI): Likewise.
18968         (TARGET_UPPER_REGS_SF): Likewise.
18969         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete the
18970         -mupper-regs-* options.
18971
18972 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
18973
18974         * passes.c (emergency_dump_function): Print some empty lines and a
18975         header before the RTL dump.
18976
18977 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
18978
18979         * cfgrtl.c (rtl_dump_bb): Don't call NEXT_INSN on NULL.
18980
18981 2017-07-24  Wilco Dijkstra  <wdijkstr@arm.com>
18982
18983         PR target/79041
18984         * config/aarch64/aarch64.c (aarch64_classify_symbol):
18985         Avoid SYMBOL_SMALL_ABSOLUTE for literals with pc-relative literals.
18986
18987 2017-07-24  Carl Love  <cel@us.ibm.com>
18988
18989         * config/rs6000/rs6000-c.c: Add support for built-in functions
18990         vector float vec_extract_fp32_from_shorth (vector unsigned short);
18991         vector float vec_extract_fp32_from_shortl (vector unsigned short);
18992         * config/rs6000/altivec.h (vec_extract_fp_from_shorth,
18993         vec_extract_fp_from_shortl): Add defines for the two builtins.
18994         * config/rs6000/rs6000-builtin.def (VEXTRACT_FP_FROM_SHORTH,
18995         VEXTRACT_FP_FROM_SHORTL): Add BU_P9V_OVERLOAD_1 and BU_P9V_VSX_1
18996         new builtins.
18997         * config/rs6000/vsx.md vsx_xvcvhpsp): Add define_insn.
18998         (vextract_fp_from_shorth, vextract_fp_from_shortl): Add define_expands.
18999         * doc/extend.texi: Update the built-in documentation file for the
19000         new built-in function.
19001
19002 2017-07-24  Jakub Jelinek  <jakub@redhat.com>
19003
19004         PR bootstrap/81521
19005         * tree.def: Remove TYPE_METHODS documentation, adjust TYPE_FIELDS
19006         documentation.
19007         * doc/generic.texi: Likewise.
19008         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
19009         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
19010
19011 2017-07-24  Jackson Woodruff  <jackson.woodruff@arm.com>
19012
19013         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): New.
19014         (aarch64_mls_elt_merge<mode>): Likewise.
19015
19016 2017-07-23  Krister Walfridsson  <krister.walfridsson@gmail.com>
19017
19018         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
19019         having __cxa_atexit.
19020
19021 2017-07-23  Michael Collison  <michael.collison@arm.com>
19022
19023         * config/arm/arm.c (arm_option_override): Deprecate
19024         use of -mstructure-size-boundary.
19025         * config/arm/arm.opt: Deprecate -mstructure-size-boundary.
19026         * doc/invoke.texi: Deprecate -mstructure-size-boundary.
19027
19028 2017-07-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19029
19030         PR target/80695
19031         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
19032         Reduce cost estimate for direct moves.
19033
19034 2017-07-23  Uros Bizjak  <ubizjak@gmail.com>
19035
19036         PR target/80569
19037         * config/i386/i386.c (ix86_option_override_internal): Disable
19038         BMI, BMI2 and TBM instructions for -m16.
19039
19040 2017-07-21  Carl Love  <cel@us.ibm.com>
19041
19042         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
19043         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
19044         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
19045         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
19046         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
19047         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
19048         VMULOSW): New enum "unspec" values.
19049         (altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
19050         altivec_vmulosw): New patterns.
19051         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
19052         VMULOSW): Add definitions.
19053
19054 2017-07-21  Jim Wilson  <jim.wilson@linaro.org>
19055
19056         * config/aarch64/aarch64-cores.def (falkor): Add AARCH64_FL_RDMA.
19057         (qdf24xx): Likewise.
19058         * config/aarch64/aarch64-options-extensions.def (rdma); New.
19059         * config/aarch64/aarch64.h (AARCH64_FL_RDMA): New.
19060         (AARCH64_FL_V8_1): Renumber.
19061         (AARCH64_FL_FOR_ARCH8_1): Add AARCH64_FL_RDMA.
19062         (AARCH64_ISA_RDMA): Use AARCH64_FL_RDMA.
19063         * config/aarch64/arm_neon.h: Use +rdma instead of arch=armv8.1-a.
19064         * doc/invoke.texi (AArch64 Options): Mention +rmda in -march docs.  Add
19065         rdma to feature modifiers list.
19066
19067 2017-07-21  Yury Gribov  <tetra2005@gmail.com>
19068
19069         PR middle-end/56727
19070         * ipa-visibility (function_and_variable_visibility): Convert
19071         recursive PLT call to direct call if appropriate.
19072
19073 2017-07-21  Andrew Pinski  <apinski@cavium.com>
19074
19075         * tree-ssa-sccvn.c (vn_nary_op_eq): Check BIT_INSERT_EXPR's
19076         operand 1 to see if the types precision matches.
19077         * fold-const.c (operand_equal_p): Likewise.
19078
19079 2017-07-21  Richard Biener  <rguenther@suse.de>
19080
19081         PR tree-optimization/81303
19082         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Pass
19083         in datarefs vector.  Allow NULL dr0 for no peeling cost estimate.
19084         (vect_peeling_hash_get_lowest_cost): Adjust.
19085         (vect_enhance_data_refs_alignment): Likewise.  Use
19086         vect_get_peeling_costs_all_drs to compute the penalty for no
19087         peeling to match up costs.
19088
19089 2017-07-21  Richard Biener  <rguenther@suse.de>
19090
19091         PR tree-optimization/81500
19092         * tree-vect-loop.c (vect_is_simple_reduction): Properly fail if
19093         we didn't identify a reduction path.
19094
19095 2017-07-21  Tom de Vries  <tom@codesourcery.com>
19096             Cesar Philippidis  <cesar@codesourcery.com>
19097
19098         PR gcov-profile/81442
19099         * config/nvptx/nvptx.c (nvptx_goacc_reduction_init): Add missing edge
19100         probabilities.
19101
19102 2017-07-21  Tom de Vries  <tom@codesourcery.com>
19103
19104         PR lto/81430
19105         * config/nvptx/nvptx.c (nvptx_override_options_after_change): New
19106         function.
19107         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define to
19108         nvptx_override_options_after_change.
19109
19110 2017-07-21  Ulrich Drepper  <drepper@redhat.com>
19111
19112         * dwarf2out.c (output_file_names): Avoid double testing for
19113         dwarf_version >= 5.
19114
19115 2017-07-21  Georg-Johann Lay  <avr@gjlay.de>
19116
19117         * doc/invoke.texi (AVR Built-in Functions): Re-layout section.
19118
19119 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
19120
19121         * cfgcleanup.c (flow_find_cross_jump): Do not crossjump across
19122         hot/cold regions.
19123         (try_crossjump_to_edge): Do not punt on partitioned functions.
19124
19125 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
19126
19127         * bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
19128         Put all BBs reachable only via paths crossing cold region to cold
19129         region.
19130         * cfgrtl.c (find_bbs_reachable_by_hot_paths): New function.
19131
19132 2016-07-21  Richard Biener  <rguenther@suse.de>
19133
19134         PR tree-optimization/81303
19135         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Take
19136         into account prologue and epilogue iterations when raising
19137         min_profitable_iters to sth at least covering one vector iteration.
19138
19139 2017-07-21  Tamar Christina  <tamar.christina@arm.com>
19140
19141         * config/arm/arm.c (arm_test_cpu_arch_dat):
19142         Check for overlap.
19143
19144 2017-07-20  Nathan Sidwell  <nathan@acm.org>
19145
19146         Remove TYPE_METHODS.
19147         * tree.h (TYPE_METHODS): Delete.
19148         * dwarf2out.c (gen_member_die): Member fns are on TYPE_FIELDS.
19149         * dbxout.c (dbxout_type_fields): Ignore FUNCTION_DECLs.
19150         (dbxout_type_methods): Scan TYPE_FIELDS.
19151         (dbxout_type): Don't check TYPE_METHODS here.
19152         * function.c (use_register_for_decl): Always ignore register for
19153         class types when not optimizing.
19154         * ipa-devirt.c (odr_types_equivalent_p): Delete TYPE_METHODS scan.
19155         * tree.c (free_lang_data_in_type): Stitch out member functions and
19156         templates from TYPE_FIELDS.
19157         (build_distinct_type_copy, verify_type_variant,
19158         verify_type): Member fns are on TYPE_FIELDS.
19159         * tree-dump.c (dequeue_and_dump): No TYPE_METHODS.
19160         * tree-pretty-print.c (dump_generic_node): Likewise.
19161
19162 2017-07-20  Jakub Jelinek  <jakub@redhat.com>
19163
19164         PR target/80846
19165         * config/i386/i386.c (ix86_expand_vector_init_general): Handle
19166         V2TImode and V4TImode.
19167         (ix86_expand_vector_extract): Likewise.
19168         * config/i386/sse.md (VMOVE): Enable V4TImode even for just
19169         TARGET_AVX512F, instead of only for TARGET_AVX512BW.
19170         (ssescalarmode): Handle V4TImode and V2TImode.
19171         (VEC_EXTRACT_MODE): Add V4TImode and V2TImode.
19172         (*vec_extractv2ti, *vec_extractv4ti): New insns.
19173         (VEXTRACTI128_MODE): New mode iterator.
19174         (splitter for *vec_extractv?ti first element): New.
19175         (VEC_INIT_MODE): New mode iterator.
19176         (vec_init<mode>): Consolidate 3 expanders into one using
19177         VEC_INIT_MODE mode iterator.
19178
19179 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
19180
19181         * lra-assigns.c (pseudo_compare_func): Fix comparison step based on
19182         non_spilled_static_chain_regno_p.
19183
19184 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
19185
19186         * gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.
19187
19188 2017-07-20  Jan Hubicka  <hubicka@ucw.cz>
19189
19190         * bb-reorder.c (connect_traces): Allow copying of blocks within
19191         single partition.
19192
19193 2017-07-20  Richard Biener  <rguenther@suse.de>
19194
19195         * gimple.h (gimple_phi_result): Add gphi * overload.
19196         (gimple_phi_result_ptr): Likewise.
19197         (gimple_phi_arg): Likewise.  Adjust index assert to only
19198         allow actual argument accesses rather than all slots available
19199         by capacity.
19200         (gimple_phi_arg_def): Add gphi * overload.
19201         * tree-phinodes.c (make_phi_node): Initialize only actual
19202         arguments.
19203         (resize_phi_node): Clear memory not covered by old node,
19204         do not initialize excess argument slots.
19205         (reserve_phi_args_for_new_edge): Initialize new argument slot
19206         completely.
19207
19208 2017-07-20  Bin Cheng  <bin.cheng@arm.com>
19209
19210         PR tree-optimization/81388
19211         Revert r238585:
19212         2016-07-21  Bin Cheng  <bin.cheng@arm.com>
19213
19214         * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up
19215         by removing computation of may_be_zero.
19216
19217 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
19218             Tom de Vries  <tom@codesourcery.com>
19219
19220         PR middle-end/81030
19221         * cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
19222         when gimple level profile disagrees with what RTL expander did.
19223
19224 2017-07-20  Richard Biener  <rguenther@suse.de>
19225
19226         PR tree-optimization/61171
19227         * tree-vectorizer.h (slp_instance): Add reduc_phis member.
19228         (vect_analyze_stmt): Add slp instance parameter.
19229         (vectorizable_reduction): Likewise.
19230         * tree-vect-loop.c (vect_analyze_loop_operations): Adjust.
19231         (vect_is_simple_reduction): Deal with chains not detected
19232         as SLP reduction chain, specifically not properly associated
19233         chains containing a mix of plus/minus.
19234         (get_reduction_op): Remove.
19235         (get_initial_defs_for_reduction): Simplify, pass in whether
19236         this is a reduction chain, pass in the SLP node for the PHIs.
19237         (vect_create_epilog_for_reduction): Get the SLP instance as
19238         arg and adjust.
19239         (vectorizable_reduction): Get the SLP instance as arg.
19240         During analysis remember the SLP node with the PHIs in the
19241         instance.  Simplify getting at the vectorized reduction PHIs.
19242         * tree-vect-slp.c (vect_slp_analyze_node_operations): Pass
19243         through SLP instance.
19244         (vect_slp_analyze_operations): Likewise.
19245         * tree-vect-stms.c (vect_analyze_stmt): Likewise.
19246         (vect_transform_stmt): Likewise.
19247
19248 2017-07-20  Tom de Vries  <tom@codesourcery.com>
19249
19250         PR tree-optimization/81489
19251         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Move
19252         read of phi arg location to before loop that modifies phi.
19253
19254 2017-07-20  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
19255
19256         * match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0):
19257         New pattern.
19258
19259 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
19260
19261         PR middle-end/81331
19262         * except.c (execute): Fix ordering issue.
19263
19264 2018-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
19265
19266         PR rtl-optimization/81423
19267         * combine.c (make_compound_operation_int): Don't try to optimize
19268         the AND of a SUBREG of an LSHIFTRT if that SUBREG is paradoxical.
19269
19270 2017-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
19271
19272         PR rtl-optimization/81423
19273         * simplify-rtx.c (simplify_truncation): Handle truncating an IOR
19274         with a constant that is -1 in the truncated to mode.
19275
19276 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
19277
19278         * predict.c (propagate_unlikely_bbs_forward): Break out from ...
19279         (determine_unlikely_bbs): ... here.
19280         * predict.h (propagate_unlikely_bbs_forward): Declare.
19281         * cfgexpand.c (pass_expand::execute): Use it.
19282         * bb-reorder.c (sanitize_hot_paths): Do not consider known to be
19283         unlikely edges.
19284         (find_rarely_executed_basic_blocks_and_crossing_edges): Use
19285         propagate_unlikely_bbs_forward.
19286
19287 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
19288
19289         PR middle-end/81331
19290         * except.c (maybe_add_nop_after_section_switch): New function.
19291         (execute): Use it.
19292
19293 2017-07-19  Tom de Vries  <tom@codesourcery.com>
19294
19295         * gimple.h (gimple_phi_set_arg): Make assert more strict.
19296
19297 2017-07-19  Tom de Vries  <tom@codesourcery.com>
19298
19299         * gimple.h (gimple_phi_arg): Make assert more strict.
19300
19301 2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>
19302
19303         * config.gcc (powerpc*-*-*): Add mmintrin.h.
19304         * config/rs6000/mmintrin.h: New file.
19305         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include mmintrin.h.
19306
19307 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
19308
19309         PR tree-optimization/81346
19310         * match.pd: Optimize (X - 1U) <= INT_MAX-1U into (int) X > 0.
19311
19312 2017-07-19  Tom de Vries  <tom@codesourcery.com>
19313
19314         * config/nvptx/nvptx.md (VECIM): Add V2DI.
19315
19316 2017-07-19  Tom de Vries  <tom@codesourcery.com>
19317
19318         * config/nvptx/nvptx-modes.def: Add V2DImode.
19319         * config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare.
19320         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode.
19321         (nvptx_output_mov_insn): Handle lack of mov.b128.
19322         (nvptx_print_operand): Handle 'H' and 'L' codes.
19323         (nvptx_vector_mode_supported): Allow V2DImode.
19324         (nvptx_preferred_simd_mode): New function.
19325         (nvptx_data_alignment): New function.
19326         (TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to
19327         nvptx_preferred_simd_mode.
19328         * config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from
19329         64 to 128 bits.
19330         (DATA_ALIGNMENT): Define.  Set to nvptx_data_alignment.
19331
19332 2017-07-19  Tom de Vries  <tom@codesourcery.com>
19333
19334         * config/nvptx/nvptx-modes.def: New file.  Add V2SImode.
19335         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2SImode.
19336         (nvptx_vector_mode_supported): New function.  Allow V2SImode.
19337         (TARGET_VECTOR_MODE_SUPPORTED_P): Redefine to nvptx_vector_mode_supported.
19338         * config/nvptx/nvptx.md (VECIM): New mode iterator. Add V2SI.
19339         (mov<VECIM>_insn): New define_insn.
19340         (define_expand "mov<VECIM>): New define_expand.
19341
19342 2017-07-19  Tom de Vries  <tom@codesourcery.com>
19343
19344         * config/nvptx/nvptx.c (nvptx_print_operand): Handle v2 vector mode.
19345
19346 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
19347
19348         PR tree-optimization/81346
19349         * fold-const.h (fold_div_compare, range_check_type): Declare.
19350         * fold-const.c (range_check_type): New function.
19351         (build_range_check): Use range_check_type.
19352         (fold_div_compare): No longer static, rewritten into
19353         a match.pd helper function.
19354         (fold_comparison): Don't call fold_div_compare here.
19355         * match.pd (X / C1 op C2): New optimization using fold_div_compare
19356         as helper function.
19357
19358 2017-07-19  Nathan Sidwell  <nathan@acm.org>
19359
19360         * tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ...
19361         (TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these.
19362         * tree.c (find_decls_types_r, verify_type): Use
19363         TYPE_{MIN,MAX}_VALUE_RAW.
19364         * lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise.
19365         (hash_tree): Likewise.
19366         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
19367         Likewise.
19368         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
19369         Likewise.
19370
19371 2017-07-18  Tom de Vries  <tom@codesourcery.com>
19372
19373         PR middle-end/81464
19374         * omp-expand.c (expand_omp_for_static_chunk): Handle
19375         equal-argument loop exit phi.
19376
19377 2017-07-18  Uros Bizjak  <ubizjak@gmail.com>
19378
19379         PR target/81471
19380         * config/i386/i386.md (rorx_immediate_operand): New mode attribute.
19381         (*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
19382         operand 2 predicate.
19383         (*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
19384         operand 2 predicate.
19385         (ror,rol -> rorx splitters): Use const_int_operand as
19386         operand 2 predicate.
19387
19388 2017-06-18  Richard Biener  <rguenther@suse.de>
19389
19390         PR tree-optimization/81410
19391         * tree-vect-stmts.c (vectorizable_load): Properly adjust for
19392         the gap in the ! slp_perm SLP case after each group.
19393
19394 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
19395
19396         PR middle-end/81463
19397         * cfgloopmanip.c (scale_loop_profile): Watch out for zero frequency
19398         again.
19399
19400 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
19401
19402         PR middle-end/81462
19403         * predict.c (set_even_probabilities): Cleanup; do not affect
19404         probabilities that are already known.
19405         (combine_predictions_for_bb): Call even when count is set.
19406
19407 2017-07-18  Nathan Sidwell  <nathan@acm.org>
19408
19409         * tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
19410         TYPE_MAX_VALUE.
19411
19412 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
19413
19414         PR target/81408
19415         * tree-ssa-loop-niter.c (number_of_iterations_exit): Dump missed
19416         optimization for loop niter analysis.
19417
19418 2017-07-18  Georg-Johann Lay  <avr@gjlay.de>
19419
19420         PR target/81473
19421         * config/avr/avr.c (avr_optimize_casesi): Don't use
19422         INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX.
19423
19424 2017-07-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
19425
19426         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Remove
19427         body_cost_vec from _vect_peel_extended_info.
19428         (vect_peeling_hash_get_lowest_cost): Do not set body_cost_vec.
19429         (vect_peeling_hash_choose_best_peeling): Remove body_cost_vec and
19430         npeel.
19431
19432 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
19433
19434         * config/arm/arm.c (emit_unlikely_jump): Remove unused var.
19435
19436 2017-07-18  Richard Biener  <rguenther@suse.de>
19437
19438         PR tree-optimization/80620
19439         PR tree-optimization/81403
19440         * tree-ssa-pre.c (phi_translate_1): Clear range and points-to
19441         info when re-using a VN table entry.
19442
19443 2017-07-18  Richard Biener  <rguenther@suse.de>
19444
19445         PR tree-optimization/81418
19446         * tree-vect-loop.c (vectorizable_reduction): Properly compute
19447         vectype_in.  Verify that with lane-reducing reduction operations
19448         we have a single def-use cycle.
19449
19450 2017-07-17  Carl Love  <cel@us.ibm.com>
19451
19452         Revert commit r249424   2017-06-20  Carl Love  <cel@us.ibm.com>
19453
19454         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
19455         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
19456         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
19457         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
19458         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
19459         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
19460         VMULOSW): New enum "unspec" values.
19461         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
19462         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
19463         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
19464         altivec_vmulosw): New patterns.
19465         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
19466         VMULOSW): Add definitions.
19467 2017-07-17  Uros Bizjak  <ubizjak@gmail.com>
19468
19469         * config/alpha/alpha.c: Include predict.h.
19470
19471 2017-07-17  Yury Gribov  <tetra2005@gmail.com>
19472
19473         * tree-vrp.c (compare_assert_loc): Fix comparison function
19474         to return predictable results.
19475
19476 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
19477
19478         * config/arc/arc.md (adddi3): Remove support for mexpand-adddi
19479         option.
19480         (subdi3): Likewise.
19481         * config/arc/arc.opt (mexpand-adddi): Deprecate it.
19482         * doc/invoke.texi (mexpand-adddi): Update text.
19483
19484 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
19485
19486         * config/arc/arc.md (clzsi2): Expand to an arc_clzsi2 instruction
19487         that also clobbers the CC register. The old expand code is moved
19488         to ...
19489         (*arc_clzsi2): ... here.
19490         (ctzsi2): Expand to an arc_ctzsi2 instruction that also clobbers
19491         the CC register. The old expand code is moved to ...
19492         (arc_ctzsi2): ... here.
19493
19494 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
19495
19496         * config/arc/arc.opt (mindexed-loads): Use initial value
19497         TARGET_INDEXED_LOADS_DEFAULT.
19498         (mauto-modify-reg): Use initial value
19499         TARGET_AUTO_MODIFY_REG_DEFAULT.
19500         * config/arc/elf.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
19501         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
19502         * config/arc/linux.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
19503         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
19504
19505 2017-07-17  Martin Liska  <mliska@suse.cz>
19506
19507         PR sanitizer/81302
19508         * opts.c (finish_options): Do not allow -fgnu-tm
19509         w/ -fsanitize={kernel-,}address.  Say sorry.
19510
19511 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
19512
19513         PR target/81369
19514         * tree-loop-distribution.c (classify_partition): Only assert on
19515         numer of iterations.
19516         (merge_dep_scc_partitions): Delete prameter.  Update function call.
19517         (distribute_loop): Remove code handling loop with unknown niters.
19518         (pass_loop_distribution::execute): Skip loop with unknown niters.
19519
19520 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
19521
19522         PR target/81369
19523         * tree-loop-distribution.c (merge_dep_scc_partitions): Sink call to
19524         function sort_partitions_by_post_order.
19525
19526 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
19527
19528         PR tree-optimization/81374
19529         * tree-loop-distribution.c (pass_loop_distribution::execute): Record
19530         the max index of basic blocks, rather than number of basic blocks.
19531
19532 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
19533
19534         * config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
19535         proto.
19536         (arc_legitimate_pic_operand_p): Likewise.
19537         * config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
19538         function.
19539         (arc_needs_pcl_p): Likewise.
19540         (arc_legitimate_pc_offset_p): Likewise.
19541         (arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
19542         function is also used in constrains.md.
19543         (arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
19544         validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
19545         PLUS.  Only return true/false in known cases, otherwise assert.
19546         (arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
19547         is already called in arc_legitimate_constant_p.
19548         * config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
19549         pic addresses.
19550         (LEGITIMATE_PIC_OPERAND_P): Use
19551         arc_raw_symbolic_reference_mentioned_p function.
19552         * config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
19553         function.
19554         (Cal): Likewise.
19555         (C32): Likewise.
19556
19557 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
19558         Andrew Burgess  <andrew.burgess@embecosm.com>
19559
19560         * config/arc/arc-protos.h (arc_compute_function_type): Change prototype.
19561         (arc_return_address_register): New function.
19562         * config/arc/arc.c (arc_handle_fndecl_attribute): New function.
19563         (arc_handle_fndecl_attribute): Add naked attribute.
19564         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
19565         (TARGET_WARN_FUNC_RETURN): Likewise.
19566         (arc_allocate_stack_slots_for_args): New function.
19567         (arc_warn_func_return): Likewise.
19568         (machine_function): Change type fn_type.
19569         (arc_compute_function_type): Consider new naked function type,
19570         change function return type.
19571         (arc_must_save_register): Adapt to handle new
19572         arc_compute_function_type's return type.
19573         (arc_expand_prologue): Likewise.
19574         (arc_expand_epilogue): Likewise.
19575         (arc_return_address_regs): Delete.
19576         (arc_return_address_register): New function.
19577         (arc_epilogue_uses): Use above function.
19578         * config/arc/arc.h (arc_return_address_regs): Delete prototype.
19579         (arc_function_type): Change encoding, add naked type.
19580         (ARC_INTERRUPT_P): Change to handle the new encoding.
19581         (ARC_FAST_INTERRUPT_P): Likewise.
19582         (ARC_NORMAL_P): Define.
19583         (ARC_NAKED_P): Likewise.
19584         (arc_compute_function_type): Delete prototype.
19585         * config/arc/arc.md (in_ret_delay_slot): Use
19586         arc_return_address_register function.
19587         (simple_return): Likewise.
19588         (p_return_i): Likewise.
19589
19590 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
19591
19592         PR tree-optimization/81428
19593         * match.pd (X / X -> one): Don't optimize _Fract divisions, as 1
19594         can't be built for those types.
19595
19596 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
19597
19598         Remove stuff dead since r239246.
19599
19600         * config/avr/avr-arch.h (avr_inform_devices): Remove dead proto.
19601         * config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str)
19602         (avr_inform_devices): Remove dead stuff.
19603
19604 2017-07-17  Tamar Christina  <tamar.christina@arm.com>
19605
19606         * config/arm/arm_neon.h: Fix softp typo.
19607
19608 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
19609
19610         PR tree-optimization/81365
19611         * tree-ssa-phiprop.c (propagate_with_phi): When considering hoisting
19612         aggregate moves onto bb predecessor edges, make sure there are no
19613         loads that could alias the lhs in between the start of bb and the
19614         loads from *phi.
19615
19616 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
19617
19618         PR 80929
19619         * config/avr/avr.c (avr_mul_highpart_cost): New static function.
19620         (avr_rtx_costs_1) [TRUNCATE]: Use it to compute mul_highpart cost.
19621         [LSHIFTRT, outer_code = TRUNCATE]: Same.
19622
19623 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
19624
19625         PR tree-optimization/81396
19626         * tree-ssa-math-opts.c (struct symbolic_number): Add n_ops field.
19627         (init_symbolic_number): Initialize it to 1.
19628         (perform_symbolic_merge): Add n_ops from both operands into the new
19629         n_ops.
19630         (find_bswap_or_nop): Don't consider n->n == cmpnop computations
19631         without base_addr as useless if they need more than one operation.
19632         (bswap_replace): Handle !bswap case for NULL base_addr.
19633
19634 2017-07-17  Tom de Vries  <tom@codesourcery.com>
19635
19636         PR target/81069
19637         * config/nvptx/nvptx.c (nvptx_single): Insert diverging branch as late
19638         as possible.
19639
19640 2017-07-17  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19641
19642         * config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
19643         conditional builtin define __FIX_LEON3FT_B2BST.
19644
19645 2017-07-17  Daniel Cederman  <cederman@gaisler.com>
19646
19647         * config/sparc/t-rtems: Add mfix-gr712rc multilibs. Replace
19648         MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED. Match -mfix-gr712rc
19649         with -mfix-ut700.
19650
19651 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
19652
19653         PR rtl-optimization/81424
19654         * optabs.c (prepare_cmp_insn): Use copy_to_reg instead of force_reg
19655         to remove potential trapping from operands if -fnon-call-exceptions.
19656
19657 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
19658
19659         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Use
19660         profile_proability for scalling.
19661         * scale_profile_for_vect_loop.c (scale_profile_for_vect_loop): Likewise.
19662
19663 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
19664
19665         * cgraph.c (cgraph_edge::redirect_call_stmt_to_caller): Cleanup.
19666
19667 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
19668
19669         * cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE
19670         fixpoint arithmetics.
19671
19672 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
19673
19674         * tree-ssa-loop-unswitch.c (hoist_guard): Avoid use of REG_BR_PROB_BASE
19675         fixpoint arithmetics.
19676
19677 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
19678
19679         * asan.c (create_cond_insert_point): Avoid use of REG_BR_PROB_BASE
19680         fixpoint arithmetics.
19681
19682 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
19683
19684         * profile-count.h (profile_probability::from_reg_br_prob_note,
19685         profile_probability::to_reg_br_prob_note): New functions.
19686         * doc/rtl.texi (REG_BR_PROB_NOTE): Update documentation.
19687         * reg-notes.h (REG_BR_PROB, REG_BR_PRED): Update docs.
19688         * predict.c (probability_reliable_p): Update.
19689         (edge_probability_reliable_p): Update.
19690         (br_prob_note_reliable_p): Update.
19691         (invert_br_probabilities): Update.
19692         (add_reg_br_prob_note): New function.
19693         (combine_predictions_for_insn): Update.
19694         * asan.c (asan_clear_shadow): Update.
19695         * cfgbuild.c (compute_outgoing_frequencies): Update.
19696         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
19697         (update_br_prob_note): Update.
19698         (rtl_verify_edges): Update.
19699         (purge_dead_edges): Update.
19700         (fixup_reorder_chain): Update.
19701         * emit-rtl.c (try_split): Update.
19702         * ifcvt.c (cond_exec_process_insns): Update.
19703         (cond_exec_process_if_block): Update.
19704         (dead_or_predicable): Update.
19705         * internal-fn.c (expand_addsub_overflow): Update.
19706         (expand_neg_overflow): Update.
19707         (expand_mul_overflow): Update.
19708         * loop-doloop.c (doloop_modify): Update.
19709         * loop-unroll.c (compare_and_jump_seq): Update.
19710         * optabs.c (emit_cmp_and_jump_insn_1): Update.
19711         * predict.h: Update.
19712         * reorg.c (mostly_true_jump): Update.
19713         * rtl.h: Update.
19714         * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Update.
19715         * config/alpha/alpha.c (emit_unlikely_jump): Update.
19716         * config/arc/arc.c: (emit_unlikely_jump): Update.
19717         * config/arm/arm.c: (emit_unlikely_jump): Update.
19718         * config/bfin/bfin.c (cbranch_predicted_taken_p): Update.
19719         * config/frv/frv.c (frv_print_operand_jump_hint): Update.
19720         * config/i386/i386.c (ix86_expand_split_stack_prologue): Update.
19721         (ix86_print_operand): Update.
19722         (ix86_split_fp_branch): Update.
19723         (predict_jump): Update.
19724         * config/ia64/ia64.c (ia64_print_operand): Update.
19725         * config/mmix/mmix.c (mmix_print_operand): Update.
19726         * config/powerpcspe/powerpcspe.c (output_cbranch): Update.
19727         (rs6000_expand_split_stack_prologue): Update.
19728         * config/rs6000/rs6000.c: Update.
19729         * config/s390/s390.c (s390_expand_vec_strlen): Update.
19730         (s390_expand_vec_movstr): Update.
19731         (s390_expand_cs_tdsi): Update.
19732         (s390_expand_split_stack_prologue): Update.
19733         * config/sh/sh.c (sh_print_operand): Update.
19734         (expand_cbranchsi4): Update.
19735         (expand_cbranchdi4): Update.
19736         * config/sparc/sparc.c (output_v9branch): Update.
19737         * config/spu/spu.c (get_branch_target): Update.
19738         (ea_load_store_inline): Update.
19739         * config/tilegx/tilegx.c (cbranch_predicted_p): Update.
19740         * config/tilepro/tilepro.c: Update.
19741
19742 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
19743
19744         * gimplify.c (mostly_copy_tree_r): Revert latest change.
19745         (gimplify_save_expr): Likewise.
19746
19747 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
19748
19749         * ipa-visibility.c (function_and_variable_visibility): Fix pasto.
19750
19751 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
19752
19753         * ipa-fnsummary.c (pass_data_ipa_fn_summary): Use
19754         TV_IPA_FNSUMMARY.
19755         * timevar.def (TV_IPA_FNSUMMARY): Define.
19756
19757 2017-07-16  Daniel Cederman  <cederman@gaisler.com>
19758
19759         * config/sparc/sparc.md (divdf3_fix): Add NOP to prevent back
19760         to back store errata sensitive sequence from being generated.
19761         (sqrtdf2_fix): Likewise.
19762
19763 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
19764
19765         * tree-ssa-threadupdate.c (compute_path_counts,
19766         update_joiner_offpath_counts): Use profile_probability.
19767
19768 2017-07-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19769
19770         Revert:
19771         2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19772
19773         * config/arm/arm-c.c (arm_cpu_builtins): Define
19774         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
19775
19776 2017-07-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19777
19778         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
19779         array entries to represent __ieee128 versions of the
19780         scalar_test_data_class, scalar_test_neg, scalar_extract_exp,
19781         scalar_extract_sig, and scalar_insert_exp built-in functions.
19782         (altivec_resolve_overloaded_builtin): Add special case handling
19783         for the __builtin_scalar_insert_exp function, as represented by
19784         the P9V_BUILTIN_VEC_VSIEDP constant.
19785         * config/rs6000/rs6000-builtin.def (VSEEQP): Add scalar extract
19786         exponent support for __ieee128 argument.
19787         (VSESQP): Add scalar extract signature support for __ieee128
19788         argument.
19789         (VSTDCNQP): Add scalar test negative support for __ieee128
19790         argument.
19791         (VSIEQP): Add scalar insert exponent support for __int128 argument
19792         with __ieee128 result.
19793         (VSIEQPF): Add scalar insert exponent support for __ieee128
19794         argument with __ieee128 result.
19795         (VSTDCQP): Add scalar test data class support for __ieee128
19796         argument.
19797         (VSTDCNQP): Add overload support for scalar test negative with
19798         __ieee128 argument.
19799         (VSTDCQP): Add overload support for scalar test data class
19800         __ieee128 argument.
19801         * config/rs6000/vsx.md (UNSPEC_VSX_SXSIG) Replace
19802         UNSPEC_VSX_SXSIGDP.
19803         (UNSPEC_VSX_SIEXPQP): New constant.
19804         (xsxexpqp): New insn for VSX scalar extract exponent quad
19805         precision.
19806         (xsxsigqp): New insn for VSX scalar extract significand quad
19807         precision.
19808         (xsiexpqpf): New insn for VSX scalar insert exponent quad
19809         precision with floating point argument.
19810         (xststdcqp): New expand for VSX scalar test data class quad
19811         precision.
19812         (xststdcnegqp): New expand for VSX scalar test negative quad
19813         precision.
19814         (xststdcqp): New insn to match expansions for VSX scalar test data
19815         class quad precision and VSX scalar test negative quad precision.
19816         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
19817         special case operand checking to enforce that second operand of
19818         VSX scalar test data class with quad precision argument is a 7-bit
19819         unsigned literal.
19820         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
19821         prototypes and descriptions of __ieee128 versions of
19822         scalar_extract_exp, scalar_extract_sig, scalar_insert_exp,
19823         scalar_test_data_class, and scalar_test_neg built-in functions.
19824
19825 2016-07-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19826
19827         PR tree-optimization/81162
19828         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Don't
19829         replace a negate with an add.
19830
19831 2017-07-14  James Greenhalgh  <james.greenhalgh@arm.com>
19832
19833         * doc/invoke.texi (arm/-mcpu): Document +crypto.
19834
19835 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19836
19837         * config/arm/arm-c.c (arm_cpu_builtins): Define
19838         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
19839
19840 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19841
19842         * config/arm/arm-cpus.in (cortex-r52): Add new entry.
19843         (armv8-r): Set ARM Cortex-R52 as default CPU.
19844         * config/arm/arm-tables.opt: Regenerate.
19845         * config/arm/arm-tune.md: Regenerate.
19846         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
19847         Cortex-R52.
19848         * doc/invoke.texi: Mention -mtune=cortex-r52 and availability of fp.dp
19849         extension for -mcpu=cortex-r52.
19850
19851 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19852
19853         * config/arm/arm-isa.h (isa_bit_FP_ARMv8): Delete enumerator.
19854         (ISA_FP_ARMv8): Define as ISA_FPv5 and ISA_FP_D32.
19855         * config/arm/arm-cpus.in (armv8-r): Define fp.sp as enabling FPv5.
19856         (fp-armv8): Define it as FP_ARMv8 only.
19857         config/arm/arm.h (TARGET_FPU_ARMV8): Delete.
19858         (TARGET_VFP_FP16INST): Define using TARGET_VFP5 rather than
19859         TARGET_FPU_ARMV8.
19860         config/arm/arm.c (arm_rtx_costs_internal): Replace checks against
19861         TARGET_FPU_ARMV8 by checks against TARGET_VFP5.
19862         * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Define
19863         first ARM_CHECK_BUILTIN_MODE definition using TARGET_VFP5 rather
19864         than TARGET_FPU_ARMV8.
19865         * config/arm/arm-c.c (arm_cpu_builtins): Likewise for
19866         __ARM_FEATURE_NUMERIC_MAXMIN macro definition.
19867         * config/arm/arm.md (cmov<mode>): Condition on TARGET_VFP5 rather than
19868         TARGET_FPU_ARMV8.
19869         * config/arm/neon.md (neon_vrint): Likewise.
19870         (neon_vcvt): Likewise.
19871         (neon_<fmaxmin_op><mode>): Likewise.
19872         (<fmaxmin><mode>3): Likewise.
19873         * config/arm/vfp.md (l<vrint_pattern><su_optab><mode>si2): Likewise.
19874         * config/arm/predicates.md (arm_cond_move_operator): Check against
19875         TARGET_VFP5 rather than TARGET_FPU_ARMV8 and fix spacing.
19876
19877 2017-07-14  Jackson Woodruff  <jackson.woodruff@arm.com>
19878
19879         * config/aarch64/aarch64.c (aarch64_print_operand): Move comments
19880         to top of function.
19881
19882 2017-07-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19883
19884         * gimple-ssa-store-merging.c (clear_bit_region): Replace reference to
19885         loop in comment with memset.
19886
19887 2017-07-14  Martin Liska  <mliska@suse.cz>
19888
19889         * cfgexpand.c (expand_gimple_basic_block): Remove dead comment.
19890         * dwarf2out.c (is_java): Remove the function.
19891         (output_pubname): Remove usage of the function.
19892         (lower_bound_default): Remove usage of DW_LANG_Java.
19893         (gen_compile_unit_die): Likewise.
19894         * gcc.c: Remove compiler defaults for .java and .zip files.
19895         * gimple-expr.c (remove_suffix): Change as there's no longer
19896         extension than 4-letter one.
19897         * gimplify.c (mostly_copy_tree_r): Remove Java-special part.
19898         (gimplify_save_expr): Likewise.
19899         * ipa-utils.h (polymorphic_type_binfo_p): Remove the comment
19900         as it's possible even for other languages than Java.
19901         * langhooks.h (struct lang_hooks): Remove Java from a comment.
19902         * lto-opts.c (lto_write_options): Remove reference to Java.
19903         * opts.c (strip_off_ending): Update file extension handling.
19904         * tree-cfg.c (verify_gimple_call): Remove comment with Java.
19905         * tree-eh.c (lower_resx): Likewise.
19906         * tree.c (free_lang_data_in_type): Remove dead code.
19907         (find_decls_types_r): Likewise.
19908         (build_common_builtin_nodes): Remove Java from a comment.
19909         (verify_type): Remove dead code.
19910         * varasm.c (assemble_external): Remove Java from a comment.
19911
19912 2017-07-14  Martin Liska  <mliska@suse.cz>
19913
19914         * opts.c (finish_options): Add quotes.
19915         (common_handle_option): Likewise.
19916
19917 2017-07-14  Martin Liska  <mliska@suse.cz>
19918
19919         * dbxout.c (get_lang_number): Do not handle GNU Pascal.
19920         * dbxout.h (extern void dbxout_stab_value_internal_label_diff):
19921         Remove N_SO_PASCAL.
19922         * dwarf2out.c (lower_bound_default): Do not handle
19923         DW_LANG_Pascal83.
19924         (gen_compile_unit_die): Likewise.
19925         * gcc.c: Remove default extension binding for GNU Pascal.
19926         * stmt.c: Remove Pascal language from a comment.
19927         * xcoffout.c: Likewise.
19928
19929 2017-07-13  David Malcolm  <dmalcolm@redhat.com>
19930
19931         PR c/81405
19932         * diagnostic-show-locus.c (fixit_cmp): New function.
19933         (layout::layout): Sort m_fixit_hints.
19934         (column_range::column_range): Assert that the values are valid.
19935         (struct char_span): New struct.
19936         (correction::overwrite): New method.
19937         (struct source_line): New struct.
19938         (line_corrections::add_hint): Add assertions.  Reimplement memcpy
19939         calls in terms of classes source_line and char_span, and
19940         correction::overwrite.
19941         (selftest::test_overlapped_fixit_printing_2): New function.
19942         (selftest::diagnostic_show_locus_c_tests): Call it.
19943
19944 2017-07-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
19945
19946         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Return
19947         early if there is no lhs.
19948
19949 2017-07-13  Martin Liska  <mliska@suse.cz>
19950
19951         * dwarf2out.c (gen_pointer_type_die): Remove dead code.
19952         (gen_reference_type_die): Likewise.
19953         * stor-layout.c: Remove Pascal-related comment.
19954
19955 2017-07-13  Martin Liska  <mliska@suse.cz>
19956
19957         * opts.c (finish_options): Add quotes to error messages.
19958         (parse_sanitizer_options): Likewise.
19959
19960 2017-07-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19961
19962         * doc/invoke.texi (armv8-r): Document +fp.sp ARMv8-R extension.
19963
19964 2017-07-13  Richard Earnshaw  <rearnsha@arm.com>
19965
19966         * config/arm/vxworks.h (TARGET_ENDIAN_DEFAULT): Define.
19967
19968 2017-07-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
19969
19970         * asan.c (asan_emit_allocas_unpoison): Use ptr_mode for arguments
19971         during expansion.
19972         * builtins.c (expand_asan_emit_allocas_unpoison): Likewise.
19973
19974 2017-07-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
19975
19976         PR target/81193
19977         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If GLIBC
19978         provides the hardware capability bits, define the macro
19979         __BUILTIN_CPU_SUPPORTS__.
19980         * config/rs6000/rs6000.c (cpu_expand_builtin): Generate a warning
19981         if GLIBC does not provide the hardware capability bits.  Add a
19982         gcc_unreachable call if the built-in cpu function is neither
19983         __builtin_cpu_is nor __builtin_cpu_supports.
19984         (rs6000_get_function_versions_dispatcher): Change the warning
19985         that an old GLIBC is used which does not export the capability
19986         bits to be an error.
19987         * doc/extend.texi (target_clones attribute): Document the
19988         restriction that GLIBC 2.23 or newer is needed on the PowerPC.
19989         (PowerPC built-in functions): Document that GLIBC 2.23 or newer is
19990         needed by __builtin_cpu_is and __builtin_cpu_supports.  Document
19991         the macros defined by GCC if the newer GLIBC is available.
19992
19993 2017-07-12  Jeff Law  <law@redhat.com>
19994
19995         * config/riscv/riscv.c: Remove unnecessary includes.  Reorder
19996         remaining includes slightly.
19997         * config/riscv/riscv-builtins.c: Include profile-count.h.
19998
19999 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
20000
20001         PR target/79883
20002         * config/avr/avr.c (avr_set_current_function): In diagnostic
20003         messages: Quote keywords and (parts of) identifiers.
20004         [WITH_AVRLIBC]: Warn for functions named "ISR", "SIGNAL" or
20005         "INTERUPT".
20006
20007 2017-07-12  Carl Love  <cel@us.ibm.com>
20008
20009         * config/rs6000/rs6000-c.c: Add support for built-in functions
20010         vector bool char vec_revb (vector bool char);
20011         vector bool short vec_revb (vector short char);
20012         vector bool int vec_revb (vector bool int);
20013         vector bool long long vec_revb (vector bool long long);
20014         * doc/extend.texi: Update the built-in documentation file for the
20015         new built-in functions.
20016
20017 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20018
20019         * config/s390/s390.md: Remove movcc splitter.
20020
20021 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20022
20023         * config/s390/s390.c (s390_rtx_costs): Return proper costs for
20024         load/store on condition.
20025
20026 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
20027
20028         PR target/81407
20029         * config/avr/avr.c (avr_encode_section_info)
20030         [progmem && !TREE_READONLY]: Error if progmem object needs
20031         constructing.
20032
20033 2017-07-11  Michael Collison  <michael.collison@arm.com>
20034
20035         * config/aarch64/aarch64-simd.md (aarch64_sub<mode>_compare0):
20036         New pattern.
20037
20038 2017-07-11  Carl Love  <cel@us.ibm.com>
20039
20040         * config/rs6000/rs6000-c.c: Add support for builtins
20041         vector unsigned int vec_parity_lsbb (vector signed int);
20042         vector unsigned int vec_parity_lsbb (vector unsigned int);
20043         vector unsigned __int128 vec_parity_lsbb (vector signed __int128);
20044         vector unsigned __int128 vec_parity_lsbb (vector unsigned __int128);
20045         vector unsigned long long vec_parity_lsbb (vector signed long long);
20046         vector unsigned long long vec_parity_lsbb (vector unsigned long long);
20047         * config/rs6000/rs6000-builtin.def (VPARITY_LSBB): Add BU_P9V_OVERLOAD1.
20048         * config/rs6000/altivec.h (vec_parity_lsbb): Add define.
20049         * doc/extend.texi: Update the built-in documentation file for the
20050         new built-in functions.
20051
20052 2017-07-11  David Malcolm  <dmalcolm@redhat.com>
20053
20054         * diagnostic-show-locus.c: Include "gcc-rich-location.h".
20055         (layout::m_primary_loc): New field.
20056         (layout::layout): Initialize new field.  Move location filtering
20057         logic from here to...
20058         (layout::maybe_add_location_range): ...this new method.  Add
20059         support for filtering to just the lines already specified by other
20060         locations.
20061         (layout::will_show_line_p): New method.
20062         (gcc_rich_location::add_location_if_nearby): New method.
20063         (selftest::test_add_location_if_nearby): New test function.
20064         (selftest::diagnostic_show_locus_c_tests): Call it.
20065         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
20066         New method.
20067
20068 2017-07-11  Tom de Vries  <tom@codesourcery.com>
20069
20070         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG): New macro.
20071         (bb_first_real_insn): New function.
20072         (nvptx_single): Add extra initialization of broadcasted condition
20073         variables.
20074
20075 2017-07-11  Nathan Sidwell  <nathan@acm.org>
20076
20077         * dwarf2out.c (gen_member_die): Remove useless check for anon ctors.
20078
20079 2017-07-11  Georg-Johann Lay  <avr@gjlay.de>
20080
20081         * doc/extend.texi (AVR Function Attributes): Remove weblink to
20082         Binutils doc as TEXI will mess them up.
20083         * doc/invoke.texi (AVR Options): Same here.
20084
20085 2017-07-11  Daniel Cederman  <cederman@gaisler.com>
20086
20087         * config/sparc/sparc.opt (mfix-ut700): New option.
20088         (mfix-gr712rc): Likewise.
20089         (sparc_fix_b2bst): New variable.
20090         * doc/invoke.texi (SPARC options): Document them.
20091         (ARM options): Fix warnings.
20092         * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP
20093         instructions to prevent sequences that can trigger the store-store
20094         errata for certain LEON3FT processors.
20095         (pass_work_around_errata::gate): Also test sparc_fix_b2bst.
20096         (sparc_option_override): Set sparc_fix_b2bst appropriately.
20097         * config/sparc/sparc.md (fix_b2bst): New attribute.
20098         (in_branch_delay): Prevent stores in delay slot if fix_b2bst.
20099
20100 2017-07-10  Uros Bizjak  <ubizjak@gmail.com>
20101
20102         PR target/81375
20103         * config/i386/i386.md (divsf3): Add TARGET_SSE to TARGET_SSE_MATH.
20104         (rcpps): Ditto.
20105         (*rsqrtsf2_sse): Ditto.
20106         (rsqrtsf2): Ditto.
20107         (div<mode>3): Macroize insn from divdf3 and divsf3
20108         using MODEF mode iterator.
20109
20110 2017-07-10  Martin Sebor  <msebor@redhat.com>
20111
20112         PR tree-optimization/80397
20113         * gimple-ssa-sprintf.c (format_integer): Use INTEGRAL_TYPE_P()
20114         instead of testing for equality to INTEGER_TYPE.
20115
20116 2017-07-10  Vineet Gupta <vgupta@synopsys.com>
20117
20118         * config.gcc: Remove uclibc from arc target spec.
20119
20120 2017-07-10  Claudiu Zissulescu  <claziss@synopsys.com>
20121
20122         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Define.
20123
20124 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
20125
20126         PR lto/80838
20127         * lto-wrapper.c (remove_option): New function.
20128         (merge_and_complain): Merge PIC/PIE options more realistically.
20129
20130 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
20131
20132         Better ISR prologues by supporting GASes __gcc_isr pseudo insn.
20133
20134         PR target/20296
20135         PR target/81268
20136         * configure.ac [target=avr]: Add GAS check for -mgcc-isr.
20137         (HAVE_AS_AVR_MGCCISR_OPTION):  If so, AC_DEFINE it.
20138         * config.in: Regenerate.
20139         * configure: Regenerate.
20140         * doc/extend.texi (AVR Function Attributes) <no_gccisr>: Document it.
20141         * doc/invoke.texi (AVR Options) <-mgas-isr-prologues>: Document it.
20142         * config/avr/avr.opt (-mgas-isr-prologues): New option and...
20143         (TARGET_GASISR_PROLOGUES): ...target mask.
20144         * common/config/avr/avr-common.c
20145         (avr_option_optimization_table) [OPT_LEVELS_1_PLUS_NOT_DEBUG]:
20146         Set -mgas-isr-prologues.
20147         * config/avr/avr-passes.def (avr_pass_pre_proep): Add
20148         INSERT_PASS_BEFORE for it.
20149         * config/avr/avr-protos.h (make_avr_pass_pre_proep): New proto.
20150         * config/avr/avr.c (avr_option_override)
20151         [!HAVE_AS_AVR_MGCCISR_OPTION]: Unset TARGET_GASISR_PROLOGUES.
20152         (avr_no_gccisr_function_p, avr_hregs_split_reg): New static functions.
20153         (avr_attribute_table) <no_gccisr>: Add new function attribute.
20154         (avr_set_current_function) <is_no_gccisr>: Init machine field.
20155         (avr_pass_data_pre_proep, avr_pass_pre_proep): New pass data
20156         and rtl_opt_pass.
20157         (make_avr_pass_pre_proep): New function.
20158         (emit_push_sfr) <treg>: Add argument to function and use it
20159         instead of TMP_REG.
20160         (avr_expand_prologue) [machine->gasisr.maybe]: Emit gasisr insn
20161         and set machine->gasisr.yes.
20162         (avr_expand_epilogue) [machine->gasisr.yes]: Similar.
20163         (avr_asm_function_end_prologue) [machine->gasisr.yes]: Add
20164         __gcc_isr.n_pushed to .L__stack_usage.
20165         (TARGET_ASM_FINAL_POSTSCAN_INSN): Define to...
20166         (avr_asm_final_postscan_insn): ...this new static function.
20167         * config/avr/avr.h (machine_function)
20168         <is_no_gccisr, use_L__stack_usage>: New fields.
20169         <gasisr, gasisr.yes, gasisr.maybe, gasisr.regno>: New fields.
20170         * config/avr/avr.md (UNSPECV_GASISR): Add unspecv enum.
20171         (GASISR_Prologue, GASISR_Epilogue, GASISR_Done): New define_constants.
20172         (gasisr, *gasisr): New expander and insn.
20173         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
20174         [HAVE_AS_AVR_MGCCISR_OPTION]: Print asm_gccisr spec.
20175         * config/avr/specs.h (ASM_SPEC) <asm_gccisr>: Add sub spec.
20176
20177 2017-07-10  Richard Earnshaw  <rearnsha@arm.com>
20178
20179         * config/arm/parsecpu.awk (gen_comm_data): Do not escape single quotes
20180         in quoted strings.
20181
20182 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
20183
20184         Move jump-tables out of .text again.
20185
20186         PR target/81075
20187         * config/avr/avr.c (ASM_OUTPUT_ADDR_VEC_ELT): Remove function.
20188         (ASM_OUTPUT_ADDR_VEC): New function.
20189         (avr_adjust_insn_length) [JUMP_TABLE_DATA_P]: Return 0.
20190         (avr_final_prescan_insn) [avr_log.insn_addresses]: Dump
20191         INSN_ADDRESSes as asm comment.
20192         * config/avr/avr.h (JUMP_TABLES_IN_TEXT_SECTION): Adjust comment.
20193         (ASM_OUTPUT_ADDR_VEC_ELT): Remove define.
20194         (ASM_OUTPUT_ADDR_VEC): Define to avr_output_addr_vec.
20195         * config/avr/avr.md (*tablejump): Adjust comment.
20196         * config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove.
20197         * config/avr/avr-log.c (avr_log_set_avr_log) <insn_addresses>:
20198         New detail.
20199         * config/avr/avr-protos.h (avr_output_addr_vec_elt): Remove proto.
20200         (avr_output_addr_vec): New proto.
20201         (avr_log_t) <insn_addresses>: New field.
20202
20203 2017-07-09  H.J. Lu  <hongjiu.lu@intel.com>
20204
20205         PR target/81313
20206         * config/i386/i386.c (ix86_function_arg_advance): Set
20207         outgoing_args_on_stack to true if there are outgoing arguments
20208         on stack.
20209         (ix86_function_arg): Likewise.
20210         (ix86_get_drap_rtx): Use DRAP only if there are outgoing
20211         arguments on stack and ACCUMULATE_OUTGOING_ARGS is false.
20212         * config/i386/i386.h (machine_function): Add
20213         outgoing_args_on_stack.
20214
20215 2017-07-09  Krister Walfridsson  <krister.walfridsson@gmail.com>
20216
20217         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
20218         supporting pthreds.
20219         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always enable pthreads.
20220
20221 2017-07-08  Richard Sandiford  <richard.sandiford@linaro.org>
20222
20223         * Makefile.in (HOOKS_H, RTL_BASE_H, FUNCTION_H, EXPR_H, REGS_H)
20224         (REAL_H): Remove $(MACHMODE_H).
20225         (FIXED_VALUE_H, TREE_CORE_H, CFGLOOP_H): Remove $(MACHMODE_H) and
20226         double-int.h.
20227         (CORETYPES_H): Add signop.h, wide-int.h, wide-int-print.h,
20228         $(MACHMODE_H) and double-int.h.
20229         (build/min-insn-modes.o): Depend on $(CORETYPES_H) rather than
20230         $(MACHMODE_H).
20231         (gengtype-state.o, gengtype.o, build/gengtype.o): Don't depend on
20232         double-int.h.
20233
20234 2017-07-07  Andrew Pinski  <apinski@cavium.com>
20235
20236         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Check
20237         prev_set and curr_set for AARCH64_FUSE_ALU_BRANCH.
20238
20239 2017-07-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
20240
20241         * config/rs6000/rs6000.c (rs6000_get_function_versions_dispatcher):
20242         Add warning if GCC was not configured to link against a GLIBC that
20243         exports the hardware capability bits.
20244         (make_resolver_func): Make resolver function private and not a
20245         COMDAT function.  Create the name with clone_function_name instead
20246         of make_unique_name.
20247
20248         PR target/81348
20249         * config/rs6000/rs6000.md (HI sign_extend splitter): Use the
20250         correct operand in doing the split.
20251
20252 2017-07-07 Carl Love  <cel@us.ibm.com>
20253
20254         * config/rs6000/rs6000-c: Add support for built-in function
20255         vector unsigned short vec_pack_to_short_fp32 (vector float,
20256                                                       vector float).
20257         * config/rs6000/rs6000-builtin.def (CONVERT_4F32_8I16): Add
20258         BU_P9V_AV_2 and BU_P9V_OVERLOAD_2 definitions.
20259         * config/rs6000/altivec.h (vec_pack_to_short_fp32): Add define.
20260         * config/rs6000/altivec.md(UNSPEC_CONVERT_4F32_8I16): Add UNSPEC.
20261         (convert_4f32_8i16): Add define_expand.
20262         * doc/extend.texi: Update the built-in documentation file for the
20263         new built-in function.
20264
20265 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
20266
20267         * config/sparc/m8.md: New file.
20268         * config/sparc/sparc.md: Include m8.md.
20269
20270 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
20271
20272         * config/sparc/sparc.opt: New option -mvis4b.
20273         * config/sparc/sparc.c (dump_target_flag_bits): Handle MASK_VIS4B.
20274         (sparc_option_override): Handle VIS4B.
20275         (enum sparc_builtins): Define
20276         SPARC_BUILTIN_DICTUNPACK{8,16,32},
20277         SPARC_BUILTIN_FPCMP{LE,GT,EQ,NE}{8,16,32}SHL,
20278         SPARC_BUILTIN_FPCMPU{LE,GT}{8,16,32}SHL,
20279         SPARC_BUILTIN_FPCMPDE{8,16,32}SHL and
20280         SPARC_BUILTIN_FPCMPUR{8,16,32}SHL.
20281         (check_constant_argument): New function.
20282         (sparc_vis_init_builtins): Define builtins
20283         __builtin_vis_dictunpack{8,16,32},
20284         __builtin_vis_fpcmp{le,gt,eq,ne}{8,16,32}shl,
20285         __builtin_vis_fpcmpu{le,gt}{8,16,32}shl,
20286         __builtin_vis_fpcmpde{8,16,32}shl and
20287         __builtin_vis_fpcmpur{8,16,32}shl.
20288         (sparc_expand_builtin): Check that the constant operands to
20289         __builtin_vis_fpcmp*shl and _builtin_vis_dictunpack* are indeed
20290         constant and in range.
20291         * config/sparc/sparc-c.c (sparc_target_macros): Handle
20292         TARGET_VIS4B.
20293         * config/sparc/sparc.h (SPARC_IMM2_P): Define.
20294         (SPARC_IMM5_P): Likewise.
20295         * config/sparc/sparc.md (cpu_feature): Add new feagure "vis4b".
20296         (enabled): Handle vis4b.
20297         (UNSPEC_DICTUNPACK): New unspec.
20298         (UNSPEC_FPCMPSHL): Likewise.
20299         (UNSPEC_FPUCMPSHL): Likewise.
20300         (UNSPEC_FPCMPDESHL): Likewise.
20301         (UNSPEC_FPCMPURSHL): Likewise.
20302         (cpu_feature): New CPU feature `vis4b'.
20303         (dictunpack{8,16,32}): New insns.
20304         (FPCSMODE): New mode iterator.
20305         (fpcscond): New code iterator.
20306         (fpcsucond): Likewise.
20307         (fpcmp{le,gt,eq,ne}{8,16,32}{si,di}shl): New insns.
20308         (fpcmpu{le,gt}{8,16,32}{si,di}shl): Likewise.
20309         (fpcmpde{8,16,32}{si,di}shl): Likewise.
20310         (fpcmpur{8,16,32}{si,di}shl): Likewise.
20311         * config/sparc/constraints.md: Define constraints `q' for unsigned
20312         2-bit integer constants and `t' for unsigned 5-bit integer
20313         constants.
20314         * config/sparc/predicates.md (imm5_operand_dictunpack8): New
20315         predicate.
20316         (imm5_operand_dictunpack16): Likewise.
20317         (imm5_operand_dictunpack32): Likewise.
20318         (imm2_operand): Likewise.
20319         * doc/invoke.texi (SPARC Options): Document -mvis4b.
20320         * doc/extend.texi (SPARC VIS Built-in Functions): Document the
20321         ditunpack* and fpcmp*shl builtins.
20322
20323 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
20324
20325         * config.gcc: Handle m8 in --with-{cpu,tune} options.
20326         * config.in: Add HAVE_AS_SPARC6 define.
20327         * config/sparc/driver-sparc.c (cpu_names): Add entry for the SPARC
20328         M8.
20329         * config/sparc/sol2.h (CPP_CPU64_DEFAULT_SPEC): Define for
20330         TARGET_CPU_m8.
20331         (ASM_CPU32_DEFAUILT_SPEC): Likewise.
20332         (CPP_CPU_SPEC): Handle m8.
20333         (ASM_CPU_SPEC): Likewise.
20334         * config/sparc/sparc-opts.h (enum processor_type): Add
20335         PROCESSOR_M8.
20336         * config/sparc/sparc.c (m8_costs): New struct.
20337         (sparc_option_override): Handle TARGET_CPU_m8.
20338         (sparc32_initialize_trampoline): Likewise.
20339         (sparc64_initialize_trampoline): Likewise.
20340         (sparc_issue_rate): Likewise.
20341         (sparc_register_move_cost): Likewise.
20342         * config/sparc/sparc.h (TARGET_CPU_m8): Define.
20343         (CPP_CPU64_DEFAULT_SPEC): Define for M8.
20344         (ASM_CPU64_DEFAULT_SPEC): Likewise.
20345         (CPP_CPU_SPEC): Handle M8.
20346         (ASM_CPU_SPEC): Likewise.
20347         (AS_M8_FLAG): Define.
20348         * config/sparc/sparc.md: Add m8 to the cpu attribute.
20349         * config/sparc/sparc.opt: New option -mcpu=m8 for sparc targets.
20350         * configure.ac (HAVE_AS_SPARC6): Check for assembler support for
20351         M8 instructions.
20352         * configure: Regenerate.
20353         * doc/invoke.texi (SPARC Options): Document -mcpu=m8 and
20354         -mtune=m8.
20355
20356 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
20357
20358         * config/sparc/niagara7.md: Rework the DFA scheduler to use insn
20359         subtypes.
20360         * config/sparc/sparc.md: Remove the `v3pipe' insn attribute.
20361         ("*movdi_insn_sp32"): Do not set v3pipe.
20362         ("*movsi_insn"): Likewise.
20363         ("*movdi_insn_sp64"): Likewise.
20364         ("*movsf_insn"): Likewise.
20365         ("*movdf_insn_sp32"): Likewise.
20366         ("*movdf_insn_sp64"): Likewise.
20367         ("*zero_extendsidi2_insn_sp64"): Likewise.
20368         ("*sign_extendsidi2_insn"): Likewise.
20369         ("*mov<VM32:mode>_insn"): Likewise.
20370         ("*mov<VM64:mode>_insn_sp64"): Likewise.
20371         ("*mov<VM64:mode>_insn_sp32"): Likewise.
20372         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
20373         ("<vlop:code><VL:mode>3"): Likewise.
20374         ("*not_<vlop:code><VL:mode>3"): Likewise.
20375         ("*nand<VL:mode>_vis"): Likewise.
20376         ("*<vlnotop:code>_not1<VL:mode>_vis"): Likewise.
20377         ("*<vlnotop:code>_not2<VL:mode>_vis"): Likewise.
20378         ("one_cmpl<VL:mode>2"): Likewise.
20379         ("faligndata<VM64:mode>_vis"): Likewise.
20380         ("alignaddrsi_vis"): Likewise.
20381         ("alignaddrdi_vis"): Likweise.
20382         ("alignaddrlsi_vis"): Likewise.
20383         ("alignaddrldi_vis"): Likewise.
20384         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
20385         ("bmaskdi_vis"): Likewise.
20386         ("bmasksi_vis"): Likewise.
20387         ("bshuffle<VM64:mode>_vis"): Likewise.
20388         ("cmask8<P:mode>_vis"): Likewise.
20389         ("cmask16<P:mode>_vis"): Likewise.
20390         ("cmask32<P:mode>_vis"): Likewise.
20391         ("pdistn<P:mode>_vis"): Likewise.
20392         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
20393
20394 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
20395
20396         * config/sparc/sparc.md ("subtype"): New insn attribute.
20397         ("*wrgsr_sp64"): Set insn subtype.
20398         ("*rdgsr_sp64"): Likewise.
20399         ("alignaddrsi_vis"): Likewise.
20400         ("alignaddrdi_vis"): Likewise.
20401         ("alignaddrlsi_vis"): Likewise.
20402         ("alignaddrldi_vis"): Likewise.
20403         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
20404         ("fexpand_vis"): Likewise.
20405         ("fpmerge_vis"): Likewise.
20406         ("faligndata<VM64:mode>_vis"): Likewise.
20407         ("bshuffle<VM64:mode>_vis"): Likewise.
20408         ("cmask8<P:mode>_vis"): Likewise.
20409         ("cmask16<P:mode>_vis"): Likewise.
20410         ("cmask32<P:mode>_vis"): Likewise.
20411         ("fchksm16_vis"): Likewise.
20412         ("v<vis3_shift_patname><GCM:mode>3"): Likewise.
20413         ("fmean16_vis"): Likewise.
20414         ("fp<plusminus_insn>64_vis"): Likewise.
20415         ("<plusminus_insn>v8qi3"): Likewise.
20416         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
20417         ("<vis4_minmax_patname><VMMAX:mode>3"): Likewise.
20418         ("<vis4_uminmax_patname><VMMAX:mode>3"): Likewise.
20419         ("<vis3_addsub_ss_patname>v8qi3"): Likewise.
20420         ("<vis4_addsub_us_patname><VAUS:mode>3"): Likewise.
20421         ("*movqi_insn"): Likewise.
20422         ("*movhi_insn"): Likewise.
20423         ("*movsi_insn"): Likewise.
20424         ("movsi_pic_gotdata_op"): Likewise.
20425         ("*movdi_insn_sp32"): Likewise.
20426         ("*movdi_insn_sp64"): Likewise.
20427         ("movdi_pic_gotdata_op"): Likewise.
20428         ("*movsf_insn"): Likewise.
20429         ("*movdf_insn_sp32"): Likewise.
20430         ("*movdf_insn_sp64"): Likewise.
20431         ("*zero_extendhisi2_insn"): Likewise.
20432         ("*zero_extendqihi2_insn"): Likewise.
20433         ("*zero_extendqisi2_insn"): Likewise.
20434         ("*zero_extendqidi2_insn"): Likewise.
20435         ("*zero_extendhidi2_insn"): Likewise.
20436         ("*zero_extendsidi2_insn_sp64"): Likewise.
20437         ("ldfsr"): Likewise.
20438         ("prefetch_64"): Likewise.
20439         ("prefetch_32"): Likewise.
20440         ("tie_ld32"): Likewise.
20441         ("tie_ld64"): Likewise.
20442         ("*tldo_ldub_sp32"): Likewise.
20443         ("*tldo_ldub1_sp32"): Likewise.
20444         ("*tldo_ldub2_sp32"): Likewise.
20445         ("*tldo_ldub_sp64"): Likewise.
20446         ("*tldo_ldub1_sp64"): Likewise.
20447         ("*tldo_ldub2_sp64"): Likewise.
20448         ("*tldo_ldub3_sp64"): Likewise.
20449         ("*tldo_lduh_sp32"): Likewise.
20450         ("*tldo_lduh1_sp32"): Likewise.
20451         ("*tldo_lduh_sp64"): Likewise.
20452         ("*tldo_lduh1_sp64"): Likewise.
20453         ("*tldo_lduh2_sp64"): Likewise.
20454         ("*tldo_lduw_sp32"): Likewise.
20455         ("*tldo_lduw_sp64"): Likewise.
20456         ("*tldo_lduw1_sp64"): Likewise.
20457         ("*tldo_ldx_sp64"): Likewise.
20458         ("*mov<VM32:mode>_insn"): Likewise.
20459         ("*mov<VM64:mode>_insn_sp64"): Likewise.
20460         ("*mov<VM64:mode>_insn_sp32"): Likewise.
20461
20462 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
20463
20464         * config/sparc/sparc.md ("type"): New insn type viscmp.
20465         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Set insn type to
20466         viscmp.
20467         ("fpcmp<gcond:code>8<P:mode>_vis"): Likewise.
20468         ("fucmp<gcond:code>8<P:mode>_vis"): Likewise.
20469         ("fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
20470         * config/sparc/niagara7.md ("n7_vis_logical_v3pipe"): Handle
20471         viscmp.
20472         ("n7_vis_logical_11cycle"): Likewise.
20473         * config/sparc/niagara4.md ("n4_vis_logical"): Likewise.
20474         * config/sparc/niagara2.md ("niag3_vis": Likewise.
20475         * config/sparc/niagara.md ("niag_vis"): Likewise.
20476         * config/sparc/ultra3.md ("us3_fga"): Likewise.
20477         * config/sparc/ultra1_2.md ("us1_fga_double"): Likewise.
20478
20479 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
20480
20481         * config/sparc/sparc.md: New instruction type `bmask'.
20482         (bmaskdi_vis): Use the `bmask' type.
20483         (bmasksi_vis): Likewise.
20484         * config/sparc/ultra3.md (us3_array): Likewise.
20485         * config/sparc/niagara7.md (n7_array): Likewise.
20486         * config/sparc/niagara4.md (n4_array): Likewise.
20487         * config/sparc/niagara2.md (niag2_vis): Likewise.
20488         (niag3_vis): Likewise.
20489         * config/sparc/niagara.md (niag_vis): Likewise.
20490
20491 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
20492
20493         * ipa-comdats.c: Remove optimize check from gate.
20494         * ipa-fnsummary.c (ipa_fn_summary_generate): do not generate summary
20495         for functions not optimized.
20496         (ipa_fn_summary_read): Skip optimize check.
20497         (ipa_fn_summary_write): Likewise.
20498         * ipa-inline-analysis.c (do_estimate_growth_1): Check that caller
20499         is optimized.
20500         * ipa-inline.c (can_inline_edge_p): Not optimized functions are
20501         uninlinable.
20502         (can_inline_edge_p): Check flag_pcc_struct_return for match.
20503         (check_callers): Give up on caller which is not optimized.
20504         (inline_small_functions): Likewise.
20505         (ipa_inline): Do not give up when not optimizing.
20506         * ipa-visbility.c (function_and_variable_visibility): Do not optimize
20507         away unoptimizes cdtors.
20508         (whole_program_function_and_variable_visibility): Do
20509         ipa_discover_readonly_nonaddressable_vars in LTO mode.
20510         * ipa.c (process_references): Do not check optimize.
20511         (symbol_table::remove_unreachable_nodes): Update optimize check.
20512         (set_writeonly_bit): Update optimize check.
20513         (pass_ipa_cdtor_merge::gate): Do not check optimize.
20514         (pass_ipa_single_use::gate): Remove.
20515
20516 2017-07-06  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20517
20518         * config/rs6000/rs6000.c (union_defs, union_uses, insn_is_load_p,
20519         insn_is_store_p, insn_is_swap_p, const_load_sequence_p, v2df_reduction_p,
20520         rtx_is_swappable_p, insn_is_swappable_p, chain_contains_only_swaps,
20521         mark_swaps_for_removal, swap_const_vector_halves, adjust_subreg_index,
20522         permute_load, permute_store, adjust_extract, adjust_splat,
20523         adjust_xxpermdi, adjust_concat, adjust_vperm, handle_special_swappables,
20524         replace_swap_with_copy, dump_swap_insn_table,
20525         alignment_with_canonical_addr, alignment_mask, find_alignment_op,
20526         recombine_lvx_pattern, recombine_stvx_pattern,
20527         recombine_lvx_stvx_patterns, rs6000_analyze_swaps,
20528         make_pass_analyze_swaps): Move all code related to p8 swap optimizations
20529         to file rs6000-p8swap.c.
20530         * config/rs6000/rs6000-p8swap.c: New file.
20531         * config/rs6000/t-rs6000: Add rule to build rs6000-p8swap.o.
20532         * config.gcc: Add rs6000-p8swap.o to extra_objs for powerpc*-*-*
20533         and rs6000*-*-* targets.
20534
20535 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
20536
20537         * Makefile.in (selftest): Remove dependency on s-selftest-c++.
20538
20539 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
20540
20541         * lto-wrapper.c (merge_and_complain): Do not merge
20542         fexceptions, fnon_call_exceptions, ftrapv, ffp_contract_, fmath_errno,
20543         fsigned_zeros, ftrapping_math, fwrapv.
20544         (append_compiler_options): Do not track these options.
20545         (append_linker_options): Likewie
20546
20547 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
20548
20549         * cgraphunit.c (cgraph_node::finalize_function): When
20550         !flag_toplevel_reorde set no_reorder flag.
20551         (varpool_node::finalize_decl): Likewise.
20552         (symbol_table::compile): Drop no toplevel reorder path.
20553
20554 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
20555
20556         * bb-reorder.c (better_edge_p): Do not build traces across abnormal/eh
20557         edges; zero probability is not better than uninitialized.
20558
20559 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
20560
20561         * asan.h (asan_sanitize_allocas_p): Declare.
20562         * asan.c (asan_sanitize_allocas_p): New function.
20563         (handle_builtin_stack_restore): Bail out if !asan_sanitize_allocas_p.
20564         (handle_builtin_alloca): Likewise.
20565         * cfgexpand.c (expand_used_vars): Do not add allocas unpoisoning stuff
20566         if !asan_sanitize_allocas_p.
20567         * params.def (asan-instrument-allocas): Add new option.
20568         * params.h (ASAN_PROTECT_ALLOCAS): Define.
20569         * opts.c (common_handle_option): Disable allocas sanitization for
20570         KASan by default.
20571
20572 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
20573
20574         * asan.c: Include gimple-fold.h.
20575         (get_last_alloca_addr): New function.
20576         (handle_builtin_stackrestore): Likewise.
20577         (handle_builtin_alloca): Likewise.
20578         (asan_emit_allocas_unpoison): Likewise.
20579         (get_mem_refs_of_builtin_call): Add new parameter, remove const
20580         quallifier from first paramerer. Handle BUILT_IN_ALLOCA,
20581         BUILT_IN_ALLOCA_WITH_ALIGN and BUILT_IN_STACK_RESTORE builtins.
20582         (instrument_builtin_call): Pass gimple iterator to
20583         get_mem_refs_of_builtin_call.
20584         (last_alloca_addr): New global.
20585         * asan.h (asan_emit_allocas_unpoison): Declare.
20586         * builtins.c (expand_asan_emit_allocas_unpoison): New function.
20587         (expand_builtin): Handle BUILT_IN_ASAN_ALLOCAS_UNPOISON.
20588         * cfgexpand.c (expand_used_vars): Call asan_emit_allocas_unpoison
20589         if function calls alloca.
20590         * gimple-fold.c (replace_call_with_value): Remove static keyword.
20591         * gimple-fold.h (replace_call_with_value): Declare.
20592         * internal-fn.c: Include asan.h.
20593         * sanitizer.def (BUILT_IN_ASAN_ALLOCA_POISON,
20594         BUILT_IN_ASAN_ALLOCAS_UNPOISON): New builtins.
20595
20596 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
20597
20598         * Makefile.in (SELFTEST_FLAGS): Drop "-x c", moving it to...
20599         (C_SELFTEST_FLAGS): New.
20600         (CPP_SELFTEST_FLAGS): New.
20601         (SELFTEST_DEPS): New, from deps of s-selftest.
20602         (C_SELFTEST_DEPS): New, from deps of s-selftest.
20603         (CPP_SELFTEST_DEPS): New.
20604         (selftest): Add dependency on s-selftest-c++.
20605         (s-selftest): Rename to...
20606         (s-selftest-c): ...this, moving deps to SELFTEST_DEPS
20607         and C_SELFTEST_DEPS, and using C_SELFTEST_FLAGS rather
20608         than SELFTEST_FLAGS.
20609         (selftest-gdb): Rename to...
20610         (selftest-c-gdb): ...this, using C_SELFTEST_DEPS and
20611         C_SELFTEST_FLAGS.
20612         (selftest-gdb): Reintroduce as an alias for selftest-c-gdb.
20613         (selftest-valgrind): Rename to...
20614         (selftest-c-valgrind): ...this, using C_SELFTEST_DEPS and
20615         C_SELFTEST_FLAGS.
20616         (selftest-valgrind): Reintroduce as an alias for
20617         selftest-c-valgrind.
20618         (s-selftest-c++): New.
20619         (selftest-c++-gdb): New.
20620         (selftest-c++-valgrind): New.
20621
20622 2017-07-06  Olivier Hainque  <hainque@adacore.com>
20623
20624         * gcc.c (process_command): When deciding if undefined variables
20625         should be ignored when processing specs, accept "gcc -v" as well.
20626
20627 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
20628
20629         * auto-profile.c (afdo_set_bb_count, afdo_propagate_edge,
20630         afdo_annotate_cfg): Set counts/probabilities as determined by afdo.
20631
20632 2017-07-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
20633
20634         * config/arm/arm-cpus.in (armv8-r): Add new entry.
20635         * config/arm/arm-isa.h (ISA_ARMv8r): Define macro.
20636         * config/arm/arm-tables.opt: Regenerate.
20637         * config/arm/arm.h (enum base_architecture): Add BASE_ARCH_8R
20638         enumerator.
20639         * doc/invoke.texi: Mention -march=armv8-r and its extensions.
20640
20641 2017-07-06  Carl Love  <cel@us.ibm.com>
20642
20643         * ChangeLog: Clean up from mid air collision
20644
20645 2017-07-06  Carl Love  <cel@us.ibm.com>
20646
20647         * config/rs6000/rs6000-c.c: Add support for built-in functions
20648         vector signed int vec_subc (vector signed int, vector signed int);
20649         vector signed __int128 vec_subc (vector signed __int128,
20650                                          vector signed __int128);
20651         vector unsigned __int128 vec_subc (vector unsigned __int128,
20652                                            vector unsigned __int128);
20653         vector signed int vec_sube (vector signed int, vector signed int,
20654                                     vector signed int);
20655         vector unsigned int vec_sube (vector unsigned int,
20656                                       vector unsigned int,
20657                                       vector unsigned int);
20658         vector signed __int128 vec_sube (vector signed __int128,
20659                                          vector signed __int128,
20660                                          vector signed__int128);
20661         vector unsigned __int128 vec_sube (vector unsigned __int128,
20662                                            vector unsigned __int128,
20663                                            vector unsigned __int128);
20664         vector signed int vec_subec (vector signed int, vector signed int,
20665                                      vector signed int);
20666         vector unsigned int vec_subec (vector unsigned int,
20667                                        vector unsigned int,
20668                                        vector unsigned int);
20669         vector signed __int128 vec_subec (vector signed __int128,
20670                                           vector signed __int128,
20671                                           vector signed__int128);
20672         vector unsigned __int128 vec_subec (vector unsigned __int128,
20673                                             vector unsigned __int128,
20674                                             vector unsigned __int128);
20675         * config/rs6000/rs6000.c (ALTIVEC_BUILTIN_VEC_SUBE,
20676         ALTIVEC_BUILTIN_VEC_SUBEC): Add ef_builtins.
20677         * config/rs6000/rs6000-builtin.def (SUBE, SUBEC): Add
20678         BU_ALTIVEC_OVERLOAD_X definitions.
20679         * config/rs6000/altivec.h (vec_sube, vec_subec): Add builtin defines.
20680         * doc/extend.texi: Update the built-in documentation file for the new
20681         built-in functions.
20682
20683 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
20684
20685         PR c++/79300
20686         * diagnostic-show-locus.c (layout::layout): Use start and finish
20687         spelling location for the start and finish of each range.
20688         * genmatch.c (linemap_client_expand_location_to_spelling_point):
20689         Add unused aspect param.
20690         * input.c (expand_location_1): Add "aspect" param, and use it
20691         to access the correct part of the location.
20692         (expand_location): Pass LOCATION_ASPECT_CARET to new param of
20693         expand_location_1.
20694         (expand_location_to_spelling_point): Likewise.
20695         (linemap_client_expand_location_to_spelling_point): Add "aspect"
20696         param, and pass it to expand_location_1.
20697
20698 2017-07-06  Sebastian Peryt  <sebastian.peryt@intel.com>
20699
20700         * config/i386/avx512fintrin.h (_mm_mask_getexp_round_ss,
20701         _mm_maskz_getexp_round_ss, _mm_mask_getexp_round_sd,
20702         _mm_maskz_getexp_round_sd, _mm_mask_getmant_round_sd,
20703         _mm_maskz_getmant_round_sd, _mm_mask_getmant_round_ss,
20704         _mm_maskz_getmant_round_ss, _mm_mask_getexp_ss, _mm_maskz_getexp_ss,
20705         _mm_mask_getexp_sd, _mm_maskz_getexp_sd, _mm_mask_getmant_sd,
20706         _mm_maskz_getmant_sd, _mm_mask_getmant_ss,
20707         _mm_maskz_getmant_ss): New intrinsics.
20708         (__builtin_ia32_getexpss128_mask): Changed to ...
20709         __builtin_ia32_getexpss128_round ... this.
20710         (__builtin_ia32_getexpsd128_mask): Changed to ...
20711         __builtin_ia32_getexpsd128_round ... this.
20712         * config/i386/i386-builtin-types.def
20713         ((V2DF, V2DF, V2DF, INT, V2DF, UQI, INT),
20714         (V4SF, V4SF, V4SF, INT, V4SF, UQI, INT)): New function type aliases.
20715         * config/i386/i386-builtin.def (__builtin_ia32_getexpsd_mask_round,
20716         __builtin_ia32_getexpss_mask_round,     __builtin_ia32_getmantsd_mask_round,
20717         __builtin_ia32_getmantss_mask_round): New builtins.
20718         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI_INT,
20719         V4SF_FTYPE_V4SF_V4SF_INT_V4SF_UQI_INT): Handle new types.
20720         (CODE_FOR_avx512f_vgetmantv2df_mask_round,
20721         CODE_FOR_avx512f_vgetmantv4sf_mask_round): New cases.
20722         * config/i386/sse.md
20723         (avx512f_sgetexp<mode><round_saeonly_name>): Changed to ...
20724         avx512f_sgetexp<mode><mask_scalar_name>
20725         <round_saeonly_scalar_name> ... this.
20726         (vgetexp<ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|
20727         %0, %1, %2<round_saeonly_op3>}): Changed to ...
20728         vgetexp<ssescalarmodesuffix>
20729         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
20730         %0<mask_scalar_operand3>, %1, %2<round_saeonly_scalar_mask_op3>} ... this.
20731         (avx512f_vgetmant<mode><round_saeonly_name>): Changed to ...
20732         avx512f_vgetmant<mode><mask_scalar_name>
20733         <round_saeonly_scalar_name> ... this.
20734         (vgetmant<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
20735         %0, %1, %2<round_saeonly_op4>, %3}): Changed to ...
20736         vgetmant<ssescalarmodesuffix>
20737         \t{%3, <round_saeonly_scalar_mask_op4>%2, %1, %0<mask_scalar_operand4>|
20738         %0<mask_scalar_operand4>, %1, %2
20739         <round_saeonly_scalar_mask_op4>, %3} ... this.
20740         * config/i386/subst.md (mask_scalar_operand4,
20741         round_saeonly_scalar_mask_operand4,     round_saeonly_scalar_mask_op4,
20742         round_saeonly_scalar_nimm_predicate): New subst attributes.
20743
20744 2017-07-06  Julia Koval  <julia.koval@intel.com>
20745
20746         * config/i386/i386.c (ix86_erase_embedded_rounding):
20747         Remove code for old rounding pattern.
20748
20749 2017-07-06  Richard Earnshaw  <rearnsha@arm.com>
20750
20751         * config/arm/t-arm (GTM_H): Add arm-cpu.h.
20752
20753 2017-07-06  Christophe Lyon  <christophe.lyon@linaro.org>
20754
20755         * doc/sourcebuild.texi (Test Directives, Variants of
20756         dg-require-support): Add documentation for dg-require-stack-check.
20757
20758 2017-07-05  Sebastian Peryt  <sebastian.peryt@intel.com>
20759
20760         * config/i386/subst.md (mask_scalar, round_scalar,
20761         round_saeonly_scalar): New meta-templates.
20762         (mask_scalar_name, mask_scalar_operand3, round_scalar_name,
20763         round_scalar_mask_operand3, round_scalar_mask_op3,
20764         round_scalar_constraint, round_scalar_prefix, round_saeonly_scalar_name,
20765         round_saeonly_scalar_mask_operand3, round_saeonly_scalar_mask_op3,
20766         round_saeonly_scalar_constraint,
20767         round_saeonly_scalar_prefix): New subst attribute.
20768         * config/i386/sse.md
20769         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): Renamed to ...
20770         <sse>_vm<plusminus_insn><mode>3<mask_scalar_name>
20771         <round_scalar_name> ... this.
20772         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): Renamed to ...
20773         <sse>_vm<multdiv_mnemonic><mode>3<mask_scalar_name>
20774         <round_scalar_name> ... this.
20775         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): Renamed to ...
20776         <sse>_vm<code><mode>3<mask_scalar_name>
20777         <round_saeonly_scalar_name> ... this.
20778         (v<plusminus_mnemonic><ssescalarmodesuffix>
20779         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
20780         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
20781         v<plusminus_mnemonic><ssescalarmodesuffix>
20782         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
20783         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
20784         (v<multdiv_mnemonic><ssescalarmodesuffix>
20785         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
20786         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
20787         v<multdiv_mnemonic><ssescalarmodesuffix>
20788         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
20789         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
20790         (v<maxmin_float><ssescalarmodesuffix>
20791         \t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|
20792         %0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}): Changed to ...
20793         v<maxmin_float><ssescalarmodesuffix>
20794         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
20795         %0<mask_scalar_operand3>, %1, %<iptr>2
20796         <round_saeonly_scalar_mask_op3>} ... this.
20797
20798 2017-07-05  Richard Earnshaw  <rearnsha@arm.com>
20799
20800         * config/arm/arm.c (arm_fixed_condition_code_regs): New function.
20801         (TARGET_FIXED_CONDITION_CODE_REGS): Redefine.
20802
20803 2017-07-05  Richard Sandiford  <richard.sandiford@linaro.org>
20804             Alan Hayward  <alan.hayward@arm.com>
20805             David Sherwood  <david.sherwood@arm.com>
20806
20807         * combine.c (simplify_if_then_else): Remove "enum" before
20808         "machine_mode".
20809         * compare-elim.c (can_eliminate_compare): Likewise.
20810         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
20811         Likewise.
20812         (aarch64_lookup_simd_builtin_type): Likewise.
20813         (aarch64_simd_builtin_type): Likewise.
20814         (aarch64_init_simd_builtin_types): Likewise.
20815         (aarch64_simd_expand_args): Likewise.
20816         * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_rglist):
20817         Likewise.
20818         (aarch64_reverse_mask): Likewise.
20819         (aarch64_simd_emit_reg_reg_move): Likewise.
20820         (aarch64_gen_adjusted_ldpstp): Likewise.
20821         (aarch64_ccmp_mode_to_code): Likewise.
20822         (aarch64_operands_ok_for_ldpstp): Likewise.
20823         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
20824         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
20825         Likewise.
20826         (aarch64_min_divisions_for_recip_mul): Likewise.
20827         (aarch64_reassociation_width): Likewise.
20828         (aarch64_get_condition_code_1): Likewise.
20829         (aarch64_simd_emit_reg_reg_move): Likewise.
20830         (aarch64_simd_attr_length_rglist): Likewise.
20831         (aarch64_reverse_mask): Likewise.
20832         (aarch64_operands_ok_for_ldpstp): Likewise.
20833         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
20834         (aarch64_gen_adjusted_ldpstp): Likewise.
20835         * config/aarch64/cortex-a57-fma-steering.c (fma_node::rename):
20836         Likewise.
20837         * config/arc/arc.c (legitimate_offset_address_p): Likewise.
20838         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
20839         (arm_lookup_simd_builtin_type): Likewise.
20840         (arm_simd_builtin_type): Likewise.
20841         (arm_init_simd_builtin_types): Likewise.
20842         (arm_expand_builtin_args): Likewise.
20843         * config/arm/arm-protos.h (arm_expand_builtin): Likewise.
20844         * config/ft32/ft32.c (ft32_libcall_value): Likewise.
20845         (ft32_setup_incoming_varargs): Likewise.
20846         (ft32_function_arg): Likewise.
20847         (ft32_function_arg_advance): Likewise.
20848         (ft32_pass_by_reference): Likewise.
20849         (ft32_arg_partial_bytes): Likewise.
20850         (ft32_valid_pointer_mode): Likewise.
20851         (ft32_addr_space_pointer_mode): Likewise.
20852         (ft32_addr_space_legitimate_address_p): Likewise.
20853         * config/i386/i386-protos.h (ix86_operands_ok_for_move_multiple):
20854         Likewise.
20855         * config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise.
20856         (ix86_emit_outlined_ms2sysv_restore): Likewise.
20857         (iamcu_alignment): Likewise.
20858         (canonicalize_vector_int_perm): Likewise.
20859         (ix86_noce_conversion_profitable_p): Likewise.
20860         (ix86_mpx_bound_mode): Likewise.
20861         (ix86_operands_ok_for_move_multiple): Likewise.
20862         * config/microblaze/microblaze-protos.h
20863         (microblaze_expand_conditional_branch_reg): Likewise.
20864         * config/microblaze/microblaze.c
20865         (microblaze_expand_conditional_branch_reg): Likewise.
20866         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
20867         Likewise.
20868         (rs6000_reassociation_width): Likewise.
20869         (rs6000_invalid_binary_op): Likewise.
20870         (fusion_p9_p): Likewise.
20871         (emit_fusion_p9_load): Likewise.
20872         (emit_fusion_p9_store): Likewise.
20873         * config/riscv/riscv-protos.h (riscv_regno_mode_ok_for_base_p):
20874         Likewise.
20875         (riscv_hard_regno_mode_ok_p): Likewise.
20876         (riscv_address_insns): Likewise.
20877         (riscv_split_symbol): Likewise.
20878         (riscv_legitimize_move): Likewise.
20879         (riscv_function_value): Likewise.
20880         (riscv_hard_regno_nregs): Likewise.
20881         (riscv_expand_builtin): Likewise.
20882         * config/riscv/riscv.c (riscv_build_integer_1): Likewise.
20883         (riscv_build_integer): Likewise.
20884         (riscv_split_integer): Likewise.
20885         (riscv_legitimate_constant_p): Likewise.
20886         (riscv_cannot_force_const_mem): Likewise.
20887         (riscv_regno_mode_ok_for_base_p): Likewise.
20888         (riscv_valid_base_register_p): Likewise.
20889         (riscv_valid_offset_p): Likewise.
20890         (riscv_valid_lo_sum_p): Likewise.
20891         (riscv_classify_address): Likewise.
20892         (riscv_legitimate_address_p): Likewise.
20893         (riscv_address_insns): Likewise.
20894         (riscv_load_store_insns): Likewise.
20895         (riscv_force_binary): Likewise.
20896         (riscv_split_symbol): Likewise.
20897         (riscv_force_address): Likewise.
20898         (riscv_legitimize_address): Likewise.
20899         (riscv_move_integer): Likewise.
20900         (riscv_legitimize_const_move): Likewise.
20901         (riscv_legitimize_move): Likewise.
20902         (riscv_address_cost): Likewise.
20903         (riscv_subword): Likewise.
20904         (riscv_output_move): Likewise.
20905         (riscv_canonicalize_int_order_test): Likewise.
20906         (riscv_emit_int_order_test): Likewise.
20907         (riscv_function_arg_boundary): Likewise.
20908         (riscv_pass_mode_in_fpr_p): Likewise.
20909         (riscv_pass_fpr_single): Likewise.
20910         (riscv_pass_fpr_pair): Likewise.
20911         (riscv_get_arg_info): Likewise.
20912         (riscv_function_arg): Likewise.
20913         (riscv_function_arg_advance): Likewise.
20914         (riscv_arg_partial_bytes): Likewise.
20915         (riscv_function_value): Likewise.
20916         (riscv_pass_by_reference): Likewise.
20917         (riscv_setup_incoming_varargs): Likewise.
20918         (riscv_print_operand): Likewise.
20919         (riscv_elf_select_rtx_section): Likewise.
20920         (riscv_save_restore_reg): Likewise.
20921         (riscv_for_each_saved_reg): Likewise.
20922         (riscv_register_move_cost): Likewise.
20923         (riscv_hard_regno_mode_ok_p): Likewise.
20924         (riscv_hard_regno_nregs): Likewise.
20925         (riscv_class_max_nregs): Likewise.
20926         (riscv_memory_move_cost): Likewise.
20927         * config/rl78/rl78-protos.h (rl78_split_movsi): Likewise.
20928         * config/rl78/rl78.c (rl78_split_movsi): Likewise.
20929         (rl78_addr_space_address_mode): Likewise.
20930         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
20931         Likewise.
20932         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
20933         (rs6000_reassociation_width): Likewise.
20934         (rs6000_invalid_binary_op): Likewise.
20935         (fusion_p9_p): Likewise.
20936         (emit_fusion_p9_load): Likewise.
20937         (emit_fusion_p9_store): Likewise.
20938         * config/visium/visium-protos.h (prepare_move_operands): Likewise.
20939         (ok_for_simple_move_operands): Likewise.
20940         (ok_for_simple_move_strict_operands): Likewise.
20941         (ok_for_simple_arith_logic_operands): Likewise.
20942         (visium_legitimize_reload_address): Likewise.
20943         (visium_select_cc_mode): Likewise.
20944         (output_cbranch): Likewise.
20945         (visium_split_double_move): Likewise.
20946         (visium_expand_copysign): Likewise.
20947         (visium_expand_int_cstore): Likewise.
20948         (visium_expand_fp_cstore): Likewise.
20949         * config/visium/visium.c (visium_pass_by_reference): Likewise.
20950         (visium_function_arg): Likewise.
20951         (visium_function_arg_advance): Likewise.
20952         (visium_libcall_value): Likewise.
20953         (visium_setup_incoming_varargs): Likewise.
20954         (visium_legitimate_constant_p): Likewise.
20955         (visium_legitimate_address_p): Likewise.
20956         (visium_legitimize_address): Likewise.
20957         (visium_secondary_reload): Likewise.
20958         (visium_register_move_cost): Likewise.
20959         (visium_memory_move_cost): Likewise.
20960         (prepare_move_operands): Likewise.
20961         (ok_for_simple_move_operands): Likewise.
20962         (ok_for_simple_move_strict_operands): Likewise.
20963         (ok_for_simple_arith_logic_operands): Likewise.
20964         (visium_function_value_1): Likewise.
20965         (rtx_ok_for_offset_p): Likewise.
20966         (visium_legitimize_reload_address): Likewise.
20967         (visium_split_double_move): Likewise.
20968         (visium_expand_copysign): Likewise.
20969         (visium_expand_int_cstore): Likewise.
20970         (visium_expand_fp_cstore): Likewise.
20971         (visium_split_cstore): Likewise.
20972         (visium_select_cc_mode): Likewise.
20973         (visium_split_cbranch): Likewise.
20974         (output_cbranch): Likewise.
20975         (visium_print_operand_address): Likewise.
20976         * expmed.c (flip_storage_order): Likewise.
20977         * expmed.h (emit_cstore): Likewise.
20978         (flip_storage_order): Likewise.
20979         * genrecog.c (validate_pattern): Likewise.
20980         * hsa-gen.c (gen_hsa_addr): Likewise.
20981         * internal-fn.c (expand_arith_overflow): Likewise.
20982         * ira-color.c (allocno_copy_cost_saving): Likewise.
20983         * lra-assigns.c (find_hard_regno_for_1): Likewise.
20984         * lra-constraints.c (prohibited_class_reg_set_mode_p): Likewise.
20985         (process_invariant_for_inheritance): Likewise.
20986         * lra-eliminations.c (move_plus_up): Likewise.
20987         * omp-low.c (lower_oacc_reductions): Likewise.
20988         * simplify-rtx.c (simplify_subreg): Likewise.
20989         * target.def (TARGET_SETUP_INCOMING_VARARG_BOUNDS): Likewise.
20990         (TARGET_CHKP_BOUND_MODE): Likewise..
20991         * targhooks.c (default_chkp_bound_mode): Likewise.
20992         (default_setup_incoming_vararg_bounds): Likewise.
20993         * targhooks.h (default_chkp_bound_mode): Likewise.
20994         (default_setup_incoming_vararg_bounds): Likewise.
20995         * tree-ssa-math-opts.c (divmod_candidate_p): Likewise.
20996         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20997         (have_whole_vector_shift): Likewise.
20998         * tree-vect-stmts.c (vectorizable_load): Likewise.
20999         * doc/tm.texi: Regenerate.
21000
21001 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
21002
21003         Graceful degrade if Binutils PR21472 is not available.
21004
21005         PR target/81072
21006         * configure.ac [target=avr]: WARN instead of ERROR if avrxmega3
21007         .rodata in flash test fails.
21008         (HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH): Define it if test passes.
21009         * confgure: Regenerate.
21010         * config.in: Regenerate.
21011         * config/avr/avr.c (avr_asm_named_section)
21012         [HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH]: Only trigger
21013         __do_copy_data for stuff in .rodata if flash_pm_offset = 0.
21014         (avr_asm_init_sections): Same.
21015
21016 2017-07-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
21017
21018         * config/arm/neon.md (fma<VCVTF:mode>4): Remove %?.
21019         (fma<VH:mode>4_intrinsic): Likewise.
21020         (*fmsub<VCVTF:mode>4): Likewise.
21021         (*fmsub<VH:mode>4_intrinsic): Likewise.
21022
21023 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
21024
21025         PR target/81305
21026         * config/avr/avr.c (avr_out_movhi_mr_r_xmega) [CONSTANT_ADDRESS_P]:
21027         Don't depend on "optimize > 0".
21028         (out_movhi_r_mr, out_movqi_mr_r): Same.
21029         (out_movhi_mr_r, out_movqi_r_mr): Same.
21030         (avr_address_cost) [CONSTANT_ADDRESS_P]: Don't depend cost for
21031         io_address_operand on "optimize > 0".
21032
21033 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
21034
21035         * tree-loop-distribution.c: Add general explanantion on the pass.
21036         (generate_loops_for_partition): Mark distributed loop.
21037         (pg_add_dependence_edges): New parameter.  Handle alias data
21038         dependence specially and record it in the parameter if asked.
21039         (struct pg_vdata, pg_edata, pg_edge_callback_data): New structs.
21040         (init_partition_graph_vertices, add_partition_graph_edge): New.
21041         (pg_skip_alias_edge, free_partition_graph_edata_cb): New.
21042         (free_partition_graph_vdata, build_partition_graph): New.
21043         (sort_partitions_by_post_order, merge_dep_scc_partitions): New.
21044         (pg_collect_alias_ddrs, break_alias_scc_partitions): New.
21045         (data_ref_segment_size, latch_dominated_by_data_ref): New.
21046         (compute_alias_check_pairs, version_loop_by_alias_check): New.
21047         (version_for_distribution_p, finalize_partitions): New.
21048         (distribute_loop): Handle alias data dependence specially.  Factor
21049         out loop fusion code as functions and call these functions.
21050
21051 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
21052
21053         * tree-loop-distribution.c (classify_partition): New parameter and
21054         better handle reduction statement.
21055         (rdg_build_partitions): Revise comment.
21056         (distribute_loop): Compute statements in all partitions and pass it
21057         to classify_partition.
21058
21059 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
21060
21061         * tree-loop-distribution.c (enum partition_type): New.
21062         (struct partition): New field type.
21063         (partition_merge_into): Add parameter.  Update partition type.
21064         (data_dep_in_cycle_p, update_type_for_merge): New functions.
21065         (build_rdg_partition_for_vertex): Compute partition type.
21066         (rdg_build_partitions): Dump partition type.
21067         (distribute_loop): Update calls to partition_merge_into.
21068
21069 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
21070
21071         * tree-loop-distribution.c (struct ddr_hasher): New.
21072         (ddr_hasher::hash, ::equal, get_data_dependence): New function.
21073         (ddrs_table): New.
21074         (classify_partition): Call get_data_dependence.
21075         (pg_add_dependence_edges): Ditto.
21076         (distribute_loop): Release data dependence hash table.
21077
21078 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
21079
21080         * tree-loop-distribution.c (ref_base_address): Delete.
21081         (similar_memory_accesses): Rename ...
21082         (share_memory_accesses): ... to this.  Check if partitions access
21083         the same memory reference.
21084         (distribute_loop): Call share_memory_accesses.
21085
21086 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
21087
21088         * tree-loop-distribution.c (struct partition): New field recording
21089         its data reference.
21090         (partition_alloc, partition_free): Init and release data refs.
21091         (partition_merge_into): Merge data refs.
21092         (build_rdg_partition_for_vertex): Collect data refs for partition.
21093         (pg_add_dependence_edges): Change parameters from vector to bitmap.
21094         Update uses.
21095         (distribute_loop): Remve data refs from vertice data of partition
21096         graph.
21097
21098 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
21099
21100         * tree-loop-distribution.c (params.h): Include header file.
21101         (MAX_DATAREFS_NUM, DR_INDEX): New macro.
21102         (datarefs_vec): New global var.
21103         (create_rdg_vertices): Use datarefs_vec directly.
21104         (free_rdg): Don't free data references.
21105         (build_rdg): Update use.  Don't free data references.
21106         (distribute_loop): Compute global variable for data references.
21107         Bail out if there are too many data references.
21108
21109 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
21110
21111         * tree-loop-distribution.c (loop_nest): New global var.
21112         (build_rdg): Use loop directly, rather than loop nest.
21113         (pg_add_dependence_edges): Remove loop nest parameter.  Use global
21114         variable directly.
21115         (distribute_loop): Compute global variable loop nest.  Update use.
21116
21117 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
21118
21119         * tree-loop-distribution.c (enum fuse_type, fuse_message): New.
21120         (partition_merge_into): New parameter.  Dump reason for fusion.
21121         (distribute_loop): Update use of partition_merge_into.
21122
21123 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
21124
21125         * tree-loop-distribution.c (bb_top_order_index): New.
21126         (bb_top_order_index_size, bb_top_order_cmp): New.
21127         (stmts_from_loop): Use topological order.
21128         (pass_loop_distribution::execute): Compute and release topological
21129         order for basic blocks.
21130
21131 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
21132
21133         * tree-loop-distribution.c (pass_loop_distribution::execute): Skip
21134         if no loops.
21135
21136 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
21137
21138         * cfgloop.h (struct loop): Add comment.  New field orig_loop_num.
21139         * cfgloopmanip.c (lv_adjust_loop_entry_edge): Comment change.
21140         * internal-fn.c (expand_LOOP_DIST_ALIAS): New function.
21141         * internal-fn.def (LOOP_DIST_ALIAS): New.
21142         * tree-vectorizer.c (fold_loop_vectorized_call): Rename to ...
21143         (fold_loop_internal_call): ... this.
21144         (vect_loop_dist_alias_call): New function.
21145         (set_uid_loop_bbs): Call fold_loop_internal_call.
21146         (vectorize_loops): Fold IFN_LOOP_VECTORIZED and IFN_LOOP_DIST_ALIAS
21147         internal calls.
21148
21149 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
21150
21151         PR target/81300
21152         * config/i386/i386.md (setcc + movzbl/and to xor + setcc peepholes):
21153         Require dead FLAGS_REG at the beginning of a peephole.
21154
21155 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
21156
21157         PR target/81294
21158         * config/i386/adxintrin.h (_subborrow_u32): Swap _X and _Y
21159         arguments in the call to __builtin_ia32_sbb_u32.
21160         (_subborrow_u64): Swap _X and _Y arguments in the call to
21161         __builtin_ia32_sbb_u64.
21162
21163 2017-07-04  Jakub Jelinek  <jakub@redhat.com>
21164
21165         PR debug/81278
21166         * tree-vrp.c (compare_assert_loc): Turn into a function template
21167         with stable template parameter.  Only test if a->e is NULL,
21168         !a->e == !b->e has been verified already.  Use e == NULL or
21169         e != NULL instead of e or ! e tests.  If stable is true, don't use
21170         iterative_hash_expr, on the other side allow a or b or both NULL
21171         and sort the NULLs last.
21172         (process_assert_insertions): Sort using compare_assert_loc<false>
21173         instead of compare_assert_loc, later sort using
21174         compare_assert_loc<true> before calling process_assert_insertions_for
21175         in a loop.  Use break instead of continue once seen NULL pointer.
21176
21177 2017-07-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21178
21179         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
21180         Cortex-R7 and Cortex-R8 processors.
21181
21182 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
21183
21184         * ipa-utils.c (ipa_merge_profiles): Fix merging when dst is
21185         uninitialized while src is not.
21186
21187 2017-07-04  Richard Earnshaw  <rearnsha@arm.com>
21188
21189         * common/config/arm/arm-common.c: Adjust include path for
21190         arm-cpu-cdata.h
21191         * config/arm/t-arm (TM_H): Adjust path for arm-cpu.h.
21192         (arm-cpu.h): Create in build directory.  Adjust dependency rules.
21193         (arm-cpu-data.h): Likewise.
21194         (arm-cpu-cdata.h): Likewise.
21195         * config/arm/arm-cpu.h: Delete.
21196         * config/arm/arm-cpu-cdata.h: Delete.
21197         * config/arm/arm-cpu-data.h: Delete.
21198
21199 2017-07-04  James Greenhalgh  <james.greenhalgh@arm.com>
21200
21201         * config/arm/arm-cpus.in (cortex-a55): New.
21202         (cortex-a75): Likewise.
21203         (cortex-a75.cortex-a55): Likewise.
21204         * config/arm/driver-arm.c (arm_cpu_table): Add cortex-a55 and
21205         cortex-a75.
21206         * doc/invoke.texi (-mcpu): Document cortex-a55 and cortex-a75.
21207         * config/arm/arm-cpu-cdata.h: Regenerate.
21208         * config/arm/arm-cpu-data.h: Regenerate.
21209         * config/arm/arm-cpu.h: Regenerate.
21210         * config/arm/arm-tables.opt: Regenerate.
21211         * config/arm/arm-tune.md: Regenerate.
21212
21213 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
21214
21215         * haifa-sched.c (sched_create_recovery_edges): Update profile.
21216
21217 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
21218
21219         * bb-reorder.c (better_edge_p): Fix handling of uninitialized
21220         probability.
21221
21222 2017-07-04  Richard Sandiford  <richard.sandiford@linaro.org>
21223
21224         PR tree-optimization/81292
21225         * tree-ssa-strlen.c (handle_builtin_strlen): When setting
21226         full_string_p, also call adjust_related_strinfos if the adjustment
21227         is simple, otherwise invalidate related strinfos.
21228
21229 2017-07-04  Martin Liska  <mliska@suse.cz>
21230
21231         PR sanitizer/81040
21232         * sanopt.c (sanitize_rewrite_addressable_params): Mark the
21233         newly created variable as DECL_IGNORED_P.
21234
21235 2017-07-04  Martin Liska  <mliska@suse.cz>
21236
21237         PR ipa/81293
21238         * ipa-inline.c (inline_small_functions):
21239         Use xstrdup_for_dump.
21240
21241 2017-07-04  Tom de Vries  <tom@codesourcery.com>
21242
21243         * graph.c (draw_cfg_edges): Save and restore EDGE_DFS_BACK.
21244
21245 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
21246
21247         PR target/81033
21248         * config/darwin.c (darwin_function_switched_text_sections):
21249         Fix spaces.
21250
21251 2017-07-03  Jan Hubicka  <hubicka@ucw.cz>
21252
21253         * tree-vect-loop-manip.c (vect_do_peeling): Fix scaling up.
21254
21255 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
21256
21257         * doc/invoke.texi (ARM Options): Add -mbe8 and -mbe32 to option summary.
21258
21259 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
21260
21261         * tree-vect-loop.c (vect_analyze_loop_2): Treat min_scalar_loop_bound,
21262         min_profitable_iters, and th as inclusive lower bounds.
21263         Fix LOOP_VINFO_PEELING_FOR_GAPS condition.
21264         (vect_estimate_min_profitable_iters): Return inclusive lower bounds
21265         for min_profitable_iters and min_profitable_estimate.
21266         (vect_transform_loop): Treat th as an inclusive lower bound.
21267         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
21268
21269 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
21270
21271         PR target/81033
21272         * config/darwin.c (darwin_function_switched_text_sections):
21273         Replace DECL_NAME with DECL_ASSEMBLER_NAME, split assemble_name_raw
21274         in two pieces, and suppress the use of buf.
21275
21276 2017-07-03  Nathan Sidwell  <nathan@acm.org>
21277
21278         * hash-table.h (hash_table_mod1): Fix indentation.
21279
21280 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
21281
21282         PR middle-end/81290
21283         * predict.c (force_edge_cold): Be more careful about propagation
21284         backward.
21285         * profile-count.h (profile_probability::guessed,
21286         profile_probability::fdo, profile_count::guessed, profile_count::fdo):
21287         New.
21288         * tree-ssa-threadupdate.c (recompute_probabilities): Result is guessed.
21289
21290 2017-07-03  James Greenhalgh  <james.greenhalgh@arm.com>
21291
21292         * doc/invoke.texi (rcpc architecture extension): Document it.
21293
21294 2017-07-03  Richard Biener  <rguenther@suse.de>
21295
21296         PR tree-optimization/60510
21297         * tree-vect-loop.c (vect_create_epilog_for_reduction): Pass in
21298         the scalar reduction PHI and use it.
21299         (vectorizable_reduction): Properly guard the single_defuse_cycle
21300         path for non-SLP reduction chains where we cannot use it.
21301         Rework reduc_def/index and vector type deduction.  Rework
21302         vector operand gathering during reduction op code-gen.
21303         * tree-vect-slp.c (vect_analyze_slp): For failed SLP reduction
21304         chains dissolve the chain and leave it to non-SLP reduction
21305         handling.
21306
21307 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
21308
21309         * tree-data-ref.h (dr_alignment): Declare.
21310         * tree-data-ref.c (dr_alignment): New function.
21311         * tree-vectorizer.h (dataref_aux): Remove base_element_aligned.
21312         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21313         set it.
21314         * tree-vect-stmts.c (vectorizable_store): Use dr_alignment.
21315
21316 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
21317
21318         * tree-data-ref.h (innermost_loop_behavior): Add base_alignment
21319         and base_misalignment fields.
21320         (DR_BASE_ALIGNMENT, DR_BASE_MISALIGNMENT): New macros.
21321         * tree-data-ref.c: Include builtins.h.
21322         (dr_analyze_innermost): Set up the new innmost_loop_behavior fields.
21323         * tree-vectorizer.h (STMT_VINFO_DR_BASE_ALIGNMENT): New macro.
21324         (STMT_VINFO_DR_BASE_MISALIGNMENT): Likewise.
21325         * tree-vect-data-refs.c: Include tree-cfg.h.
21326         (vect_compute_data_ref_alignment): Use the new innermost_loop_behavior
21327         fields instead of calculating an alignment here.
21328         (vect_analyze_data_refs): Use dr_analyze_innermost.  Dump the new
21329         innermost_loop_behavior fields.
21330
21331 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
21332
21333         * tree-data-ref.h (innermost_loop_behavior): Add a step_alignment
21334         field.
21335         (DR_STEP_ALIGNMENT): New macro.
21336         * tree-vectorizer.h (STMT_VINFO_DR_STEP_ALIGNMENT): Likewise.
21337         * tree-data-ref.c (dr_analyze_innermost): Initalize step_alignment.
21338         (create_data_ref): Print it.
21339         * tree-vect-stmts.c (vectorizable_load): Use the step alignment
21340         to tell whether the step preserves vector (mis)alignment.
21341         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
21342         Move the check for an integer step and generalise to all INTEGER_CST.
21343         (vect_analyze_data_refs): Set DR_STEP_ALIGNMENT when setting DR_STEP.
21344         Print the outer step alignment.
21345
21346 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
21347
21348         * tree-data-ref.h (innermost_loop_behavior): Replace aligned_to
21349         with offset_alignment.
21350         (DR_ALIGNED_TO): Delete.
21351         (DR_OFFSET_ALIGNMENT): New macro.
21352         * tree-vectorizer.h (STMT_VINFO_DR_ALIGNED_TO): Delete.
21353         (STMT_VINFO_DR_OFFSET_ALIGNMENT): New macro.
21354         * tree-data-ref.c (dr_analyze_innermost): Update after above changes.
21355         (create_data_ref): Likewise.
21356         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
21357         (vect_analyze_data_refs): Likewise.
21358         * tree-if-conv.c (if_convertible_loop_p_1): Use memset before
21359         creating dummy innermost behavior.
21360
21361 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
21362
21363         * tree-data-ref.h (dr_analyze_innermost): Replace the dr argument
21364         with a "innermost_loop_behavior *" and refeence tree.
21365         * tree-data-ref.c (dr_analyze_innermost): Likewise.
21366         (create_data_ref): Update call accordingly.
21367         * tree-predcom.c (find_looparound_phi): Likewise.
21368
21369 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
21370
21371         * tree-vectorizer.h (_stmt_vec_info): Replace individual dr_*
21372         fields with dr_wrt_vec_loop.
21373         (STMT_VINFO_DR_BASE_ADDRESS, STMT_VINFO_DR_INIT, STMT_VINFO_DR_OFFSET)
21374         (STMT_VINFO_DR_STEP, STMT_VINFO_DR_ALIGNED_TO): Update accordingly.
21375         (STMT_VINFO_DR_WRT_VEC_LOOP): New macro.
21376         (vect_dr_behavior): New function.
21377         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
21378         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
21379         vect_dr_behavior.  Use a step_preserves_misalignment_p boolean to
21380         track whether the step preserves the misalignment.
21381         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
21382         Use vect_dr_behavior.
21383         (vect_setup_realignment): Update call accordingly.
21384         (vect_create_data_ref_ptr): Likewise.  Use vect_dr_behavior.
21385         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Update
21386         call to vect_create_addr_base_for_vector_ref.
21387         (vect_create_cond_for_align_checks): Likewise.
21388         * tree-vect-patterns.c (vect_recog_bool_pattern): Copy
21389         STMT_VINFO_DR_WRT_VEC_LOOP as a block.
21390         (vect_recog_mask_conversion_pattern): Likewise.
21391         * tree-vect-stmts.c (compare_step_with_zero): Use vect_dr_behavior.
21392         (new_stmt_vec_info): Remove redundant zeroing.
21393
21394 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
21395
21396         * common/config/arm/arm-common.c (arm_be8_option): New function.
21397         * config/arm/arm-isa.h (isa_feature): Add new feature bit isa_bit_be8.
21398         (ISA_ARMv6): Add isa_bit_be8.
21399         * config/arm/arm.h (arm_be8_option): Add prototype.
21400         (BE8_SPEC_FUNCTION): New define.
21401         (EXTRA_SPEC_FUNCTIONS): Add BE8_SPEC_FUNCTION.
21402         * config/arm/arm.opt (mbig-endian): Mark as Negative of mlittle-endian.
21403         (mlittle-endian): Similarly.
21404         (mbe8, mbe32): New options.
21405         * config/arm/bpabi.h (BE8_LINK_SPEC): Call arm_be8_option.
21406         * doc/invoke.texi (ARM Options): Document -mbe8 and -mbe32.
21407
21408 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
21409
21410         * tree-cfg.c (gimple_find_sub_bbs): Fix profile updating.
21411
21412 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
21413
21414         * tree-cfgcleanup.c (want_merge_blocks_p): New function.
21415         (cleanup_tree_cfg_bb): Use it.
21416         * profile-count.h (profile_count::of_for_merging, profile_count::merge):
21417         New functions.
21418         * tree-cfg.c (gimple_merge_blocks): Use profile_count::merge.
21419
21420 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
21421
21422         PR bootstrap/81285
21423         * loop-doloop.c (add_test): Update profile.
21424
21425 2017-07-03  Martin Liska  <mliska@suse.cz>
21426
21427         PR sanitize/81040
21428         * sanopt.c (rewrite_usage_of_param): New function.
21429         (sanitize_rewrite_addressable_params): Likewise.
21430         (pass_sanopt::execute): Call rewrite_usage_of_param.
21431
21432 2017-07-03  Richard Biener  <rguenther@suse.de>
21433
21434         * tree-vect-loop.c (vect_create_epilog_for_reduction): Revert
21435         back to using VIEW_CONVERT_EXPR.
21436
21437 2017-07-03  Martin Liska  <mliska@suse.cz>
21438
21439         PR other/78366
21440         * doc/extend.texi: Document when a resolver function is
21441         generated for target_clones.
21442
21443 2017-07-03  Martin Liska  <mliska@suse.cz>
21444
21445         * asan.c (asan_emit_stack_protection): Unpoison just red zones
21446         and shadow memory of auto variables which are subject of
21447         use-after-scope sanitization.
21448         (asan_expand_mark_ifn): Add do set only when is_poison.
21449
21450 2016-07-03  Richard Biener  <rguenther@suse.de>
21451
21452         * tree-vect-loop.c (vect_analyze_loop_operations): Also analyze
21453         reduction PHIs.
21454         (vect_force_simple_reduction): Record reduction def -> phi mapping.
21455         (vectorizable_reduction): Perform reduction PHI creation when
21456         visiting a reduction PHI and adjust and simplify code generation
21457         phase of the reduction op.  Cache dts, use fold_binary, not fold_build2.
21458         (vect_transform_loop): Visit reduction PHIs.
21459         * tree-vect-slp.c (vect_get_and_check_slp_defs): Record reduction
21460         defs into the SLP tree.
21461         (vect_build_slp_tree): Reduction defs terminate the recursion.
21462         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Allow lookup
21463         of reduction defs.
21464         (vect_get_vec_defs_for_stmt_copy): Export.
21465         (vect_get_vec_defs): Likewise.
21466         * tree-vectorizer.h (struct _stmt_vec_info): Amend reduc_def
21467         purpose.
21468         (vect_get_vec_defs_for_stmt_copy): Declare.
21469         (vect_get_vec_defs): Likewise.
21470
21471 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
21472
21473         * tree-data-ref.c (dr_analyze_innermost): Replace the "nest"
21474         parameter with a "loop" parameter and use it instead of the
21475         loop containing DR_STMT.  Don't check simple_iv when doing
21476         BB analysis.  Describe the two analysis modes in the comment.
21477
21478 2017-07-03  Tom de Vries  <tom@codesourcery.com>
21479
21480         PR tree-optimization/69468
21481         * tree-ssa-tail-merge.c (ignore_edge_flags): New constant.
21482         (find_same_succ_bb): Handle ignore_edge_flags.
21483
21484 2017-07-03  Tom de Vries  <tom@codesourcery.com>
21485
21486         PR tree-optimization/81192
21487         * tree-ssa-tail-merge.c (same_succ_hash): Use bb->loop_father->num in
21488         hash.
21489         (same_succ::equal): Don't find bbs to be equal if bb->loop_father
21490         differs.
21491         (find_same_succ_bb): Remove obsolete test on bb->loop_father->latch.
21492
21493 2017-07-03  Tom de Vries  <tom@codesourcery.com>
21494
21495         PR tree-optimization/81192
21496         * tree-ssa-tail-merge.c (same_succ_flush_bb): Handle
21497         BB_SAME_SUCC (bb) == NULL.
21498
21499 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
21500
21501         * cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
21502         consistency.
21503
21504 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
21505
21506         * dumpfile.c: Include profile-count.h
21507         * tree-cfg.c (gimple_duplicate_sese_tail): Drop UNUSED attributes;
21508         update profile.
21509         (insert_cond_bb): Update profile.
21510         * tree-cfg.h (insert_cond_bb): Update prototype.
21511         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Update.
21512         * tree-dump.c: Do not include tree-cfg.
21513
21514 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
21515
21516         * bb-reorder.c (fix_up_crossing_landing_pad): Update profile.
21517
21518 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
21519
21520         * expect.c (dw2_build_landing_pads): Update profile of the landing pad
21521         bb.
21522
21523 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
21524
21525         * tree-complex.c (expand_complex_div_wide): update profile.
21526
21527 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
21528             Alan Hayward  <alan.hayward@arm.com>
21529             David Sherwood  <david.sherwood@arm.com>
21530
21531         * Makefile.in (MACHMODE_H): Remove insn-modes.h
21532         (CORETYPES_H): New define.
21533         (MOSTLYCLEANFILES): Add insn-modes-inline.h.
21534         (insn-modes-inline.h, s-modes-inline-h): New rules.
21535         (generated_files): Add insn-modes-inline.h.
21536         (RTL_BASE_H, TREE_CORE_H): Use CORETYPES_H instead of coretypes.h.
21537         (build/gensupport.o, build/ggc-none.o, build/print-rtl.o): Likewise.
21538         (build/read-md.o, build/read-rtl.o, build/rtl.o): Likewise.
21539         (build/vec.o, build/hash-table.o, build/inchash.o): Likewise.
21540         (build/gencondmd.o, build/genattr.o, build/genattr-common.o): Likewise.
21541         (build/genattrtab.o, build/genautomata.o, build/gencheck.o): Likewise.
21542         (build/gencodes.o, build/genconditions.o): Likewise.
21543         (build/genconfig.o, build/genconstants.o, build/genemit.o): Likewise.
21544         (build/genenums.o, build/genextract.o, build/genflags.o): Likewise.
21545         (build/gentarget-def.o, build/genmddeps.o, build/genopinit.o)
21546         (build/genoutput.o, build/genpeep.o, build/genpreds.o): Likewise.
21547         (build/genrecog.o, build/genmddump.o, build/genmatch.o): Likewise.
21548         (build/gencfn-macros.o, build/gcov-iov.o): Likewise.
21549         * coretypes.h: Include everything up to real.h for generators.
21550         Include insn-modes.h first.  Include wide-int-print.h after
21551         wide-int.h.  Include insn-modes-inline.h and then machmode.h.
21552         * machmode.h: Don't include insn-modes.h here.
21553         * function-tests.c: Remove includes of signop.h, machmode.h,
21554         double-int.h and wide-int.h.
21555         * rtl.h: Likewise.
21556         * gcc-rich-location.c: Remove includes of machmode.h, double-int.h
21557         and wide-int.h.
21558         * optc-save-gen.awk: Likewise.
21559         * gencheck.c (BITS_PER_UNIT): Delete dummy definition.
21560         * godump.c: Remove include of wide-int-print.h.
21561         * pretty-print.h: Likewise.
21562         * wide-int-print.cc: Likewise.
21563         * wide-int.cc: Likewise.
21564         * hash-map-tests.c: Remove include of signop.h.
21565         * hash-set-tests.c: Likewise.
21566         * rtl-tests.c: Likewise.
21567         * mkconfig.sh: Remove include of machmode.h.
21568         * genmodes.c (emit_insn_modes_h): Split emission of inline functions
21569         into...
21570         (emit_insn_modes_inline_h): ...this new function.  Emit the code
21571         into an insn-modes-inline.h header file, adding appropriate
21572         include guards and end comments.
21573         (emit_insn_modes_c_header): Remove include of machmode.h.
21574         (emit_min_insn_modes_c_header): Include coretypes.h rather than
21575         machmode.h.
21576         (main): Handle -i flag and call emit_insn_modes_inline_h when
21577         it is passed.
21578
21579 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
21580
21581         * tree-ssa-strlen.c (strinfo): Rename the length field to
21582         nonzero_chars.  Add a full_string_p field.
21583         (compare_nonzero_chars, zero_length_string_p): New functions.
21584         (get_addr_stridx): Add an offset_out parameter.
21585         Use compare_nonzero_chars.
21586         (get_stridx): Update accordingly.  Use compare_nonzero_chars.
21587         (new_strinfo): Update after above changes to strinfo.
21588         (set_endptr_and_length): Set full_string_p.
21589         (get_string_length): Update after above changes to strinfo.
21590         (unshare_strinfo): Update call to new_strinfo.
21591         (maybe_invalidate): Likewise.
21592         (get_stridx_plus_constant): Change off to unsigned HOST_WIDE_INT.
21593         Use compare_nonzero_chars and zero_string_p.  Treat nonzero_chars
21594         as a uhwi instead of an shwi.  Update after above changes to
21595         strinfo and new_strinfo.
21596         (zero_length_string): Assert that chainsi contains full strings.
21597         Use zero_length_string_p.  Update call to new_strinfo.
21598         (adjust_related_strinfos): Update after above changes to strinfo.
21599         Copy full_string_p from origsi.
21600         (adjust_last_stmt): Use zero_length_string_p.
21601         (handle_builtin_strlen): Update after above changes to strinfo and
21602         new_strinfo.  Install the lhs as the string length if the previous
21603         entry didn't describe a full string.
21604         (handle_builtin_strchr): Update after above changes to strinfo
21605         and new_strinfo.
21606         (handle_builtin_strcpy): Likewise.
21607         (handle_builtin_strcat): Likewise.
21608         (handle_builtin_malloc): Likewise.
21609         (handle_pointer_plus): Likewise.
21610         (handle_builtin_memcpy): Likewise.  Track nonzero characters
21611         that aren't necessarily followed by a nul terminator.
21612         (handle_char_store): Likewise.
21613
21614 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
21615
21616         PR tree-optimization/80769
21617         * tree-ssa-strlen.c (strinfo): Document that "stmt" is also used
21618         for malloc and calloc.  Document the new invariant that all related
21619         strinfos have delayed lengths or none do.
21620         (verify_related_strinfos): Move earlier in file.
21621         (set_endptr_and_length): New function, split out from...
21622         (get_string_length): ...here.  Also set the lengths of related
21623         strinfos.
21624         (zero_length_string): Assert that chainsi has known (rather than
21625         delayed) lengths.
21626         (adjust_related_strinfos): Likewise.
21627
21628 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
21629
21630         PR tree-optimization/81136
21631         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Only
21632         assert that two references with the same misalignment have the same
21633         compile-time misalignment if those compile-time misalignments
21634         are known.
21635
21636 2017-07-01  Andi Kleen  <ak@linux.intel.com>
21637
21638         * print-tree.c (print_node): Print all attributes.
21639
21640 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
21641
21642         * cfg.c (scale_bbs_frequencies): New function.
21643         * cfg.h (scale_bbs_frequencies): Declare it.
21644         * cfgloopanal.c (single_likely_exit): Cleanup.
21645         * cfgloopmanip.c (scale_loop_frequencies): Take profile_probability
21646         as parameter.
21647         (scale_loop_profile): Likewise.
21648         (loop_version): Likewise.
21649         (create_empty_loop_on_edge): Update.
21650         * cfgloopmanip.h (scale_loop_frequencies, scale_loop_profile,
21651         scale_loop_frequencies, scale_loop_profile, loopify,
21652         loop_version): Update prototypes.
21653         * modulo-sched.c (sms_schedule): Update.
21654         * predict.c (unlikely_executed_edge_p): Also check probability.
21655         (probably_never_executed_edge_p): Fix typo.
21656         * tree-if-conv.c (version_loop_for_if_conversion): Update.
21657         * tree-parloops.c (gen_parallel_loop): Update.
21658         * tree-ssa-loop-ivcanon.c (try_peel_loop): Update.
21659         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
21660         * tree-ssa-loop-split.c (split_loop): Update.
21661         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
21662         * tree-vect-loop-manip.c (vect_do_peeling): Update.
21663         (vect_loop_versioning): Update.
21664         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
21665
21666 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
21667
21668         * trans-mem.c (split_bb_make_tm_edge): Update profile.
21669
21670 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
21671
21672         * tree-if-conv.c (combine_blocks): Use make_single_succ_edge
21673         to keep profile consistent.
21674
21675 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
21676
21677         * cfgrtl.c (rtl_flow_call_edges_add): Update profile.
21678         * tree-cfg.c (gimple_flow_call_edges_add): Likewise.
21679         * profile-count.h (max_safe_multiplier): Make unsigned.
21680         (profile_count::guessed_zero): New.
21681
21682 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
21683
21684         * bb-reorder.c (fix_up_crossing_landing_pad,
21685         fix_crossing_conditional_branches): Use make_single_succ_edge
21686         to keep profile consistent.
21687
21688 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
21689
21690         * tree-vect-loop.c (optimize_mask_stores): Use make_single_succ_edge
21691         to update profile.
21692
21693 2017-07-01  Jakub Jelinek  <jakub@redhat.com>
21694
21695         PR sanitizer/81262
21696         * bb-reorder.c (fix_up_fall_thru_edges): Move variable declarations to
21697         the right scopes, make sure cond_jump isn't preserved between multiple
21698         iterations.  Search for fallthru edge whenever there are 3+ edges and
21699         use find_fallthru_edge for it.
21700
21701 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
21702
21703         Patch by Alexander Monakov <amonakov@ispras.ru>
21704         * sel-sched-ir.c (compute_succs_info): Handle uninitialized
21705         probabilities consistently.
21706
21707 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
21708
21709         * pa.c (pa_expand_compare_and_swap_loop): Update call of
21710         emit_cmp_and_jump_insns.
21711
21712 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
21713
21714         PR ipa/81261
21715         * tree-inline.c (expand_call_inline): Combine profile statuses.
21716
21717 2017-06-30  Andrew Pinski  <apinski@cavium.com>
21718
21719         * tree-if-conv.c (predicate_scalar_phi): Update new_stmt if
21720         fold_stmt returned true.
21721
21722 2017-06-30  Nathan Sidwell  <nathan@acm.org>
21723
21724         * ggc.h (empty_string): Delete.
21725         * cfgexpand.c (expand_asm_stmt): Use plain "".
21726         * optabs.c (expand_asm_memory_barrier): Likewise.
21727         * stringpool.c (empty_string): Delete.
21728         (digit_vector, digit_string): Delete.
21729         (ggc_alloc_string): Use plain "", don't optimize single digit
21730         strings.  Use ggc_alloc_atomic.
21731
21732 2017-06-30  Richard Earnshaw  <rearnsha@arm.com>
21733
21734         * rtlanal.c (insn_rtx_cost): If a parallel contains exactly one
21735         comparison set and one other set, use the cost of the non-comparison
21736         set.
21737
21738 2017-06-30  Nathan Sidwell  <nathan@acm.org>
21739
21740         * ggc.h: Replace all 'static inline' with plain 'inline'.  Fix
21741         some formatting.
21742
21743 2017-06-30  Peter Bergner  <bergner@vnet.ibm.com>
21744
21745         * tree-cfg.c (group_case_labels_stmt): Merge scanning and compressing
21746         loops.  Remove now unneeded calls to gimple_switch_set_label() that
21747         just set removed labels to NULL_TREE.
21748
21749 2017-06-30  Aldy Hernandez  <aldyh@redhat.com>
21750
21751         * tree-ssanames.c (set_range_info_raw): Abstract from ...
21752         (set_range_info): ...here.  Only call set_range_info_raw if domain
21753         is useful.
21754         (set_nonzero_bits): Call set_range_info_raw.
21755         * tree-ssanames.h (set_range_info_raw): New.
21756
21757 2017-06-30  Jakub Jelinek  <jakub@redhat.com>
21758
21759         PR target/81225
21760         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): For V8FI,
21761         V16FI and VI8F_256 iterators, use <store_mask_predicate> instead
21762         of nonimmediate_operand and <store_mask_constraint> instead of m
21763         for the input operand.  For V8FI iterator, always split if input
21764         is a MEM.  For V16FI and V8SF_256 iterators, don't test if both
21765         operands are MEM if <mask_applied>.  For VI4F_256 iterator, use
21766         <store_mask_predicate> instead of register_operand and
21767         <store_mask_constraint> instead of v for the input operand.  Make
21768         sure both operands aren't MEMs for if not <mask_applied>.
21769
21770 2017-06-30  Sylvestre Ledru  <sylvestre@debian.org>
21771
21772         * lto-wrapper.c (copy_file) Close both file descriptors before
21773         exiting normally.
21774
21775 2017-06-30  Martin Liska  <mliska@suse.cz>
21776
21777         PR ipa/81214
21778         * multiple_target.c (create_dispatcher_calls): Make ifunc
21779         also for function that don't have calls or are not referenced.
21780
21781 2017-06-30  Richard Biener  <rguenther@suse.de>
21782
21783         * tree-vect-slp.c (vect_slp_analyze_node_operations): Only
21784         analyze the first scalar stmt.  Move vector type computation
21785         for the BB case here from ...
21786         * tree-vect-stmts.c (vect_analyze_stmt): ... here.  Guard
21787         live operation processing in the SLP case properly.
21788
21789 2017-06-30  Richard Biener  <rguenther@suse.de>
21790
21791         * graph.c (draw_cfg_node_succ_edges): Fix broken dot syntax.
21792
21793 2017-06-30  Martin Liska  <mliska@suse.cz>
21794
21795         PR sanitizer/81021
21796         * tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN
21797         before BUILT_IN_UNWIND_RESUME when ASAN is used.
21798
21799 2017-06-30  Yvan Roux  <yvan.roux@linaro.org>
21800
21801         * doc/invoke.texi (AArch64): Add missing options and remove redundant
21802         ones.
21803
21804 2017-06-30  Richard Biener  <rguenther@suse.de>
21805
21806         PR tree-optimization/81249
21807         * tree-vect-loop.c (vect_create_epilog_for_reduction): Convert
21808         condition reduction result to original scalar type.
21809
21810 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21811
21812         * profile-count.h (enum profile_quality): Fix typos and whitespace
21813         issues.
21814
21815 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21816
21817         * config/s390/s390.c (s390_expand_setmem): Adjust to the new data
21818         type for branch probabilities.
21819
21820 2017-06-29  Julian Brown  <julian@codesourcery.com>
21821             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
21822
21823         * config/aarch64/aarch64-fusion-pairs.def: Add ALU_BRANCH entry.
21824         * config/aarch64/aarch64.c (AARCH64_FUSE_ALU_BRANCH): New fusion type.
21825         (thunderx2t99_tunings): Set AARCH64_FUSE_ALU_BRANCH flag.
21826         (aarch_macro_fusion_pair_p): Add support for AARCH64_FUSE_ALU_BRANCH.
21827
21828 2017-06-29  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
21829
21830         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Push the
21831         check for CC usage into AARCH64_FUSE_CMP_BRANCH.
21832         * config/i386/i386.c (ix86_macro_fusion_pair_p): Push the check for
21833         CC usage from generic code to here.
21834         * sched-deps.c (sched_macro_fuse_insns): Move the condition for
21835         CC usage into the target macros.
21836
21837 2017-06-29  Maya Rashish  <coypu@sdf.org>
21838
21839         * config/netbsd.h (NETBSD_LIB_SPEC): Add -lc when creating shared
21840         objects.
21841
21842 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
21843
21844         * arm/arm-builtins.c: Include profile-count.h
21845         * except.c (sjlj_emit_function_enter): Use
21846         profile_probability::unlikely.
21847
21848 2017-06-29  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21849
21850         * config/rs6000/rs6000.c (toc_relative_expr_p): Make tocrel_base
21851         and tocrel_offset be pointer args rather than implicitly using
21852         static versions.
21853         (legitimate_constant_pool_address_p, rs6000_emit_move,
21854         const_load_sequence_p, adjust_vperm): Add local tocrel_base and
21855         tocrel_offset and use in toc_relative_expr_p call.
21856         (print_operand, print_operand_address): Use static tocrel_base_oac
21857         and tocrel_offset_oac.
21858         (rs6000_output_addr_const_extra): Use static tocrel_base_oac and
21859         tocrel_offset_oac.
21860
21861 2017-06-29  Maya Rashish  <coypu@sdf.org>
21862
21863         * config/vax/builtins.md (ffssi2_internal): Correct constraint.
21864
21865 2017-06-29  Eric Botcazou  <ebotcazou@adacore.com>
21866
21867         * expr.c (expand_expr) <normal_inner_ref>: When testing for unaligned
21868         objects, take into account only the alignment of 'op0' and 'mode1' if
21869         'op0' is a MEM.
21870
21871 2017-06-29  Steve Ellcey  <sellcey@cavium.com>
21872
21873         * ccmp.c (ccmp_tree_comparison_p): New function.
21874         (ccmp_candidate_p): Update to use above function.
21875         (get_compare_parts): New function.
21876         (expand_ccmp_next): Update to use new functions.
21877         (expand_ccmp_expr_1): Take tree arg instead of gimple, update to use
21878         new functions.
21879         (expand_ccmp_expr): Pass tree instead of gimple to expand_ccmp_expr_1,
21880         take mode as argument.
21881         * ccmp.h (expand_ccmp_expr): Add mode as argument.
21882         * expr.c (expand_expr_real_1): Pass mode as argument.
21883
21884 2017-06-29  Segher Boessenkool  <segher@kernel.crashing.org>
21885
21886         * combine.c (combine_instructions): Print insns to dump_file, together
21887         with their costs.
21888
21889 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
21890
21891         * asan.c (asan_emit_stack_protection): Update.
21892         (create_cond_insert_point): Update.
21893         * auto-profile.c (afdo_propagate_circuit): Update.
21894         * basic-block.h (struct edge_def): Turn probability to
21895         profile_probability.
21896         (EDGE_FREQUENCY): Update.
21897         * bb-reorder.c (find_traces_1_round): Update.
21898         (better_edge_p): Update.
21899         (sanitize_hot_paths): Update.
21900         * cfg.c (unchecked_make_edge): Initialize probability to uninitialized.
21901         (make_single_succ_edge): Update.
21902         (check_bb_profile): Update.
21903         (dump_edge_info): Update.
21904         (update_bb_profile_for_threading): Update.
21905         * cfganal.c (connect_infinite_loops_to_exit): Initialize new edge
21906         probabilitycount to 0.
21907         * cfgbuild.c (compute_outgoing_frequencies): Update.
21908         * cfgcleanup.c (try_forward_edges): Update.
21909         (outgoing_edges_match): Update.
21910         (try_crossjump_to_edge): Update.
21911         * cfgexpand.c (expand_gimple_cond): Update make_single_succ_edge.
21912         (expand_gimple_tailcall): Update.
21913         (construct_init_block): Use make_single_succ_edge.
21914         (construct_exit_block): Use make_single_succ_edge.
21915         * cfghooks.c (verify_flow_info): Update.
21916         (redirect_edge_succ_nodup): Update.
21917         (split_edge): Update.
21918         (account_profile_record): Update.
21919         * cfgloopanal.c (single_likely_exit): Update.
21920         * cfgloopmanip.c (scale_loop_profile): Update.
21921         (set_zero_probability): Remove.
21922         (duplicate_loop_to_header_edge): Update.
21923         * cfgloopmanip.h (loop_version): Update prototype.
21924         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
21925         (force_nonfallthru_and_redirect): Update.
21926         (update_br_prob_note): Update.
21927         (rtl_verify_edges): Update.
21928         (purge_dead_edges): Update.
21929         (rtl_lv_add_condition_to_bb): Update.
21930         * cgraph.c: (cgraph_edge::redirect_call_stmt_to_calle): Update.
21931         * cgraphunit.c (init_lowered_empty_function): Update.
21932         (cgraph_node::expand_thunk): Update.
21933         * cilk-common.c: Include profile-count.h
21934         * dojump.c (inv): Remove.
21935         (jumpifnot): Update.
21936         (jumpifnot_1): Update.
21937         (do_jump_1): Update.
21938         (do_jump): Update.
21939         (do_jump_by_parts_greater_rtx): Update.
21940         (do_compare_rtx_and_jump): Update.
21941         * dojump.h (jumpifnot, jumpifnot_1, jumpif_1, jumpif, do_jump,
21942         do_jump_1. do_compare_rtx_and_jump): Update prototype.
21943         * dwarf2cfi.c: Include profile-count.h
21944         * except.c (dw2_build_landing_pads): Use make_single_succ_edge.
21945         (sjlj_emit_dispatch_table): Likewise.
21946         * explow.c: Include profile-count.h
21947         * expmed.c (emit_store_flag_force): Update.
21948         (do_cmp_and_jump): Update.
21949         * expr.c (compare_by_pieces_d::generate): Update.
21950         (compare_by_pieces_d::finish_mode): Update.
21951         (emit_block_move_via_loop): Update.
21952         (store_expr_with_bounds): Update.
21953         (store_constructor): Update.
21954         (expand_expr_real_2): Update.
21955         (expand_expr_real_1): Update.
21956         * expr.h (try_casesi, try_tablejump): Update prototypes.
21957         * gimple-pretty-print.c (dump_probability): Update.
21958         (dump_profile): New.
21959         (dump_gimple_label): Update.
21960         (dump_gimple_bb_header): Update.
21961         * graph.c (draw_cfg_node_succ_edges): Update.
21962         * hsa-gen.c (convert_switch_statements): Update.
21963         * ifcvt.c (cheap_bb_rtx_cost_p): Update.
21964         (find_if_case_1): Update.
21965         (find_if_case_2): Update.
21966         * internal-fn.c (expand_arith_overflow_result_store): Update.
21967         (expand_addsub_overflow): Update.
21968         (expand_neg_overflow): Update.
21969         (expand_mul_overflow): Update.
21970         (expand_vector_ubsan_overflow): Update.
21971         * ipa-cp.c (good_cloning_opportunity_p): Update.
21972         * ipa-split.c (split_function): Use make_single_succ_edge.
21973         * ipa-utils.c (ipa_merge_profiles): Update.
21974         * loop-doloop.c (add_test): Update.
21975         (doloop_modify): Update.
21976         * loop-unroll.c (compare_and_jump_seq): Update.
21977         (unroll_loop_runtime_iterations): Update.
21978         * lra-constraints.c (lra_inheritance): Update.
21979         * lto-streamer-in.c (input_cfg): Update.
21980         * lto-streamer-out.c (output_cfg): Update.
21981         * mcf.c (adjust_cfg_counts): Update.
21982         * modulo-sched.c (sms_schedule): Update.
21983         * omp-expand.c (expand_omp_for_init_counts): Update.
21984         (extract_omp_for_update_vars): Update.
21985         (expand_omp_ordered_sink): Update.
21986         (expand_omp_for_ordered_loops): Update.
21987         (expand_omp_for_generic): Update.
21988         (expand_omp_for_static_nochunk): Update.
21989         (expand_omp_for_static_chunk): Update.
21990         (expand_cilk_for): Update.
21991         (expand_omp_simd): Update.
21992         (expand_omp_taskloop_for_outer): Update.
21993         (expand_omp_taskloop_for_inner): Update.
21994         * omp-simd-clone.c (simd_clone_adjust): Update.
21995         * optabs.c (expand_doubleword_shift): Update.
21996         (expand_abs): Update.
21997         (emit_cmp_and_jump_insn_1): Update.
21998         (expand_compare_and_swap_loop): Update.
21999         * optabs.h (emit_cmp_and_jump_insns): Update prototype.
22000         * predict.c (predictable_edge_p): Update.
22001         (edge_probability_reliable_p): Update.
22002         (set_even_probabilities): Update.
22003         (combine_predictions_for_insn): Update.
22004         (combine_predictions_for_bb): Update.
22005         (propagate_freq): Update.
22006         (estimate_bb_frequencies): Update.
22007         (force_edge_cold): Update.
22008         * profile-count.c (profile_count::dump): Add missing space into dump.
22009         (profile_count::debug): Add newline.
22010         (profile_count::differs_from_p): Explicitly convert to unsigned.
22011         (profile_count::stream_in): Update.
22012         (profile_probability::dump): New member function.
22013         (profile_probability::debug): New member function.
22014         (profile_probability::differs_from_p): New member function.
22015         (profile_probability::differs_lot_from_p): New member function.
22016         (profile_probability::stream_in): New member function.
22017         (profile_probability::stream_out): New member function.
22018         * profile-count.h (profile_count_quality): Rename to ...
22019         (profile_quality): ... this one.
22020         (profile_probability): New.
22021         (profile_count): Update.
22022         * profile.c (compute_branch_probabilities): Update.
22023         * recog.c (peep2_attempt): Update.
22024         * sched-ebb.c (schedule_ebbs): Update.
22025         * sched-rgn.c (find_single_block_region): Update.
22026         (compute_dom_prob_ps): Update.
22027         (schedule_region): Update.
22028         * sel-sched-ir.c (compute_succs_info): Update.
22029         * stmt.c (struct case_node): Update.
22030         (do_jump_if_equal): Update.
22031         (get_outgoing_edge_probs): Update.
22032         (conditional_probability): Update.
22033         (emit_case_dispatch_table): Update.
22034         (expand_case): Update.
22035         (expand_sjlj_dispatch_table): Update.
22036         (emit_case_nodes): Update.
22037         * targhooks.c: Update.
22038         * tracer.c (better_p): Update.
22039         (find_best_successor): Update.
22040         * trans-mem.c (expand_transaction): Update.
22041         * tree-call-cdce.c: Update.
22042         * tree-cfg.c (gimple_split_edge): Upate.
22043         (move_sese_region_to_fn): Upate.
22044         * tree-cfgcleanup.c (cleanup_control_expr_graph): Upate.
22045         * tree-eh.c (lower_resx): Upate.
22046         (cleanup_empty_eh_move_lp): Upate.
22047         * tree-if-conv.c (version_loop_for_if_conversion): Update.
22048         * tree-inline.c (copy_edges_for_bb): Update.
22049         (copy_cfg_body): Update.
22050         * tree-parloops.c (gen_parallel_loop): Update.
22051         * tree-profile.c (gimple_gen_ic_func_profiler): Update.
22052         (gimple_gen_time_profiler): Update.
22053         * tree-ssa-dce.c (remove_dead_stmt): Update.
22054         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
22055         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
22056         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
22057         (unloop_loops): Update.
22058         (try_peel_loop): Update.
22059         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
22060         * tree-ssa-loop-split.c (connect_loops): Update.
22061         (split_loop): Update.
22062         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
22063         (hoist_guard): Update.
22064         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
22065         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
22066         (value_replacement): Update.
22067         * tree-ssa-reassoc.c (branch_fixup): Update.
22068         * tree-ssa-tail-merge.c (replace_block_by): Update.
22069         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
22070         (create_edge_and_update_destination_phis): Update.
22071         (compute_path_counts): Update.
22072         (recompute_probabilities): Update.
22073         (update_joiner_offpath_counts): Update.
22074         (freqs_to_counts_path): Update.
22075         (duplicate_thread_path): Update.
22076         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
22077         (struct switch_conv_info): Update.
22078         (gen_inbound_check): Update.
22079         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
22080         (vect_do_peeling): Update.
22081         (vect_loop_versioning): Update.
22082         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
22083         (optimize_mask_stores): Update.
22084         * ubsan.c (ubsan_expand_null_ifn): Update.
22085         * value-prof.c (gimple_divmod_fixed_value): Update.
22086         (gimple_divmod_fixed_value_transform): Update.
22087         (gimple_mod_pow2): Update.
22088         (gimple_mod_pow2_value_transform): Update.
22089         (gimple_mod_subtract): Update.
22090         (gimple_mod_subtract_transform): Update.
22091         (gimple_ic): Update.
22092         (gimple_stringop_fixed_value): Update.
22093         (gimple_stringops_transform): Update.
22094         * value-prof.h: Update.
22095
22096 2017-06-29  Carl Love  <cel@us.ibm.com>
22097
22098         * config/rs6000/rs6000-c.c: Add support for built-in functions
22099         vector signed int vec_signed (vector float);
22100         vector signed long long vec_signed (vector double);
22101         vector signed int vec_signed2 (vector double, vector double);
22102         vector signed int vec_signede (vector double);
22103         vector signed int vec_signedo (vector double);
22104         * config/rs6000/rs6000.c (rs6000_generate_vsigned2_code): Add
22105         instruction generator.
22106         * config/rs6000/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
22107         UNSPEC_VSX_VSIGNED2): Add UNSPECS.
22108         (vsx_xvcvspsxws, vsx_xvcvdpuxds_scale, vsx_xvcvspuxws, vsigned2_v2df):
22109         Add define_insn.
22110         (vsignedo_v2df, vsignede_v2df, vunsigned2_v2df, vunsignedo_v2df,
22111         vunsignede_v2df): Add define_expands.
22112         * config/rs6000/rs6000-builtin.def (VEC_SIGNED, VEC_UNSIGNED,
22113         VEC_SIGNED2, VEC_UNSIGNED2, VEC_SIGNEDE, VEC_UNSIGNEDE, VEC_SIGNEDO,
22114         VEC_UNSIGNEDO): Add definitions.
22115         * config/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
22116         UNSPEC_VSX_VSIGNED2): Add UNSPECs.
22117         (vsx_xvcvspsxws, vsx_xvcvspuxws): Add define_insn.
22118         (vsigned2_v2df, vsigendo_v2df, vsignede_v2df,
22119         vunsigned2_v2df, vunsignedo_v2df, vunsignede_v2df): Add define_expands.
22120         * config/rs6000/altivec.h (vec_signed, vec_signed2,
22121         vec_signede and vec_signedo, vec_unsigned, vec_unsigned2,
22122         vec_unsignede, vec_unsignedo): Add builtin defines.
22123         * config/rs6000-protos.h (rs6000_generate_vsigned2_code): Add extern
22124         declaration.
22125         * doc/extend.texi: Update the built-in documentation file for the
22126         new built-in functions.
22127
22128 2017-06-29  Richard Biener  <rguenther@suse.de>
22129
22130         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Do not add
22131         reduction chains to LOOP_VINFO_REDUCTIONS.
22132         * tree-vect-slp.c (vect_analyze_slp): Continue looking for
22133         SLP reductions after processing reduction chains.
22134
22135 2017-06-29  Nathan Sidwell  <nathan@acm.org>
22136
22137         * builtins.c (fold_builtin_FUNCTION): Use
22138         lang_hooks.decl_printable_name.
22139
22140 2017-06-29  Peter Bergner  <bergner@vnet.ibm.com>
22141
22142         PR middle-end/81194
22143         * cfgexpand.c (expand_gimple_stmt_1): Handle switch statements
22144         with only one label.
22145         * stmt.c (expand_case): Assert NCASES is greater than one.
22146
22147 2017-06-29  Richard Biener  <rguenther@suse.de>
22148
22149         * tree-cfg.c (group_case_labels_stmt): Return whether we changed
22150         anything.
22151         (group_case_labels): Likewise.
22152         (find_taken_edge): Push sanity checking on val to workers...
22153         (find_taken_edge_cond_expr): ... here
22154         (find_taken_edge_switch_expr): ... and here, handle cases
22155         with just a default label.
22156         * tree-cfg.h (group_case_labels_stmt): Adjust prototype.
22157         (group_case_labels): Likewise.
22158         * tree-cfgcleanup.c (execute_cleanup_cfg_post_optimizing): When
22159         group_case_labels does anything cleanup the CFG again.
22160
22161 2017-06-29  Bin Cheng  <bin.cheng@arm.com>
22162
22163         PR tree-optimization/81196
22164         * tree-ssa-loop-niter.c (number_of_iterations_cond): Handle loop
22165         exit condition comparing two IVs.
22166
22167 2017-06-29  Richard Earnshaw  <rearnsha@arm.com>
22168
22169         * config/arm/parsecpu.awk (gen_comm_data): Add initializer for
22170         profile to the dummy entry at the end of the list of architectures.
22171         * config/arm/arm-cpu-cdata.h: Regenerated.
22172
22173 2017-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22174             Michael Collison <michael.collison@arm.com>
22175
22176         PR target/70119
22177         * config/aarch64/aarch64.md (*aarch64_<optab>_reg_<mode>3_mask1):
22178         New pattern.
22179         (*aarch64_reg_<mode>3_neg_mask2): New pattern.
22180         (*aarch64_reg_<mode>3_minus_mask): New pattern.
22181         (*aarch64_<optab>_reg_di3_mask2): New pattern.
22182         * config/aarch64/aarch64.c (aarch64_rtx_costs): Account for cost
22183         of shift when the shift amount is masked with constant equal to
22184         the size of the mode.
22185         * config/aarch64/predicates.md (subreg_lowpart_operator): New
22186         predicate.
22187
22188 2017-06-29  Martin Liska  <mliska@suse.cz>
22189
22190         * config/i386/i386.opt: Change range from [1,5] to [0,5].
22191
22192 2017-06-29  Yury Gribov  <tetra2005@gmail.com>
22193
22194         PR bootstrap/80565
22195         * ipa-cp.c (allocate_and_init_ipcp_value): Add initialization
22196         code.
22197         * ipa-inline.h
22198         (edge_growth_cache_entry::edge_growth_cache_entry): New
22199         function.
22200         (reset_edge_growth_cache): Update to use constructor.
22201
22202 2017-06-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22203
22204         * config/aarch64/aarch64.h (AARCH64_EXPAND_ALIGNMENT): New.
22205         (DATA_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
22206         (LOCAL_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
22207
22208 2017-06-28  Sebastian Peryt  <sebastian.peryt@intel.com>
22209
22210         * config/i386/avx512vlintrin.h (_mm256_permutexvar_epi64)
22211         (_mm256_permutexvar_epi32, _mm256_permutex_epi64): New intrinsics.
22212
22213 2017-06-28  Szabolcs Nagy  <szabolcs.nagy@arm.com>
22214
22215         * config.gcc (*-linux-musl*): Add t-musl tmake_file.
22216         (*-linux-uclibc*): Add t-uclibc tmake_file.
22217         * config/t-musl: New.
22218         * config/t-uclibc: New.
22219
22220 2017-06-28  Richard Earnshaw  <rearnsha@arm.com>
22221
22222         * config/arm/parsecpu.awk (profile): Parse new keyword in an arch
22223         context.
22224         (gen_comm_data): Emit architectural setting of arch_prof.
22225         * config/arm/arm-cpus.in (armv6-m, armv6s-m, armv7-a, armv7ve): Set the
22226         profile.
22227         (armv7-r, armv7-m, armv7e-m, armv8-a, armv8.1-a, armv8.2-a): Likewise.
22228         (armv8-m.base, armv8-m.main): Likewise.
22229         * arm-protos.h (arm_build_target): Add profile field.
22230         (arch_option): Likewise.
22231         * config/arm/arm.c (arm_configure_build_target): Copy the profile to
22232         the active target.
22233         * config/arm/arm.h (TARGET_ARM_ARCH_PROFILE): Use
22234         arm_active_target.profile.
22235
22236 2017-06-28  Richard Biener  <rguenther@suse.de>
22237
22238         PR middle-end/81227
22239         * fold-const.c (negate_expr_p): Use TYPE_UNSIGNED, not
22240         TYPE_OVERFLOW_WRAPS.
22241         * match.pd (negate_expr_p): Likewise.
22242         * tree-ssa-reassoc.c (optimize_range_tests_diff): Use
22243         fold_build2, not fold_binary.
22244
22245 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
22246
22247         * config/aarch64/aarch64 (aarch64_expand_mov_immediate):
22248         Convert memory address to Pmode.
22249         (aarch64_print_operand): Assert MEM operands are always Pmode.
22250
22251 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
22252
22253         PR target/79665
22254         * config/arm/aarch-common.c (arm_no_early_alu_shift_dep):
22255         Remove redundant if.
22256         (aarch_forward_to_shift_is_not_shifted_reg): Remove.
22257         * config/arm/aarch-common-protos.h
22258         (aarch_forward_to_shift_is_not_shifted_re): Remove.
22259         * config/arm/cortex-a53.md: Use arm_no_early_alu_shift_dep in bypass.
22260
22261 2017-06-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
22262
22263         PR ipa/81238
22264         * multiple_target.c (create_dispatcher_calls): Set the default
22265         clone to be static, not public.
22266
22267 2017-06-28  Richard Biener  <rguenther@suse.de>
22268
22269         * tree-vect-loop.c (vectorizable_reduction): Move special
22270         cond reduction IV var creation ...
22271         (vect_create_epilog_for_reduction): ... here.  Remove induction_index
22272         parameter.  Use STMT_VINFO_VECTYPE.
22273         * tree-vect-slp.c (vect_get_constant_vectors): Properly reset
22274         constant_p.
22275
22276 2017-06-28  Martin Liska  <mliska@suse.cz>
22277
22278         PR ipa/81128
22279         * ipa-visibility.c (non_local_p): Handle visibility.
22280
22281 2017-06-28  Martin Liska  <mliska@suse.cz>
22282
22283         PR driver/79659
22284         * common.opt: Add IntegerRange to various options.
22285         * opt-functions.awk (integer_range_info): New function.
22286         * optc-gen.awk: Add integer_range_info to cl_options struct.
22287         * opts-common.c (decode_cmdline_option): Handle
22288         CL_ERR_INT_RANGE_ARG.
22289         (cmdline_handle_error): Likewise.
22290         * opts.c (print_filtered_help): Show valid interval in
22291         when --help is provided.
22292         * opts.h (struct cl_option): Add range_min and range_max fields.
22293         * config/i386/i386.opt: Add IntegerRange for -mbranch-cost.
22294
22295 2017-06-28  Marc Glisse  <marc.glisse@inria.fr>
22296
22297         * match.pd ((X & ~Y) | (~X & Y)): Generalize to + and ^.
22298         (x * C EQ/NE y * C): New transformation.
22299
22300 2017-06-28  Christophe Lyon  <christophe.lyon@linaro.org>
22301
22302         * genmultilib (combination_space): Accept '+' in option names.
22303
22304 2017-06-28  Martin Liska  <mliska@suse.cz>
22305
22306         PR sanitizer/81224
22307         * asan.c (instrument_derefs): Bail out inner references
22308         that are hard register variables.
22309
22310 2017-06-28  Jakub Jelinek  <jakub@redhat.com>
22311
22312         PR target/81175
22313         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use def_builtin
22314         rather than def_builtin_pure for __builtin_ia32_gatherpf*.
22315
22316 2017-06-28  Richard Biener  <rguenther@suse.de>
22317
22318         * tree-vectorizer.h (vect_get_vec_defs): Remove.
22319         (vect_get_slp_defs): Adjust.
22320         * tree-vect-loop.c (get_initial_defs_for_reduction): Split
22321         out from ...
22322         * tree-vect-slp.c (vect_get_constant_vectors): ... here and
22323         simplify.
22324         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
22325         get_initial_defs_for_reduction instead of vect_get_vec_defs.
22326         (vectorizable_reduction): Adjust.
22327         * tree-vect-slp.c (vect_get_constant_vectors): Remove reduction
22328         handling.
22329         (vect_get_slp_defs): Likewise.
22330         * tree-vect-stmts.c (vect_get_vec_defs): Make static and adjust.
22331         (vectorizable_bswap): Adjust.
22332         (vectorizable_call): Likewise.
22333         (vectorizable_conversion): Likewise.
22334         (vectorizable_assignment): Likewise.
22335         (vectorizable_shift): Likewise.
22336         (vectorizable_operation): Likewise.
22337         (vectorizable_store): Likewise.
22338         (vectorizable_condition): Likewise.
22339         (vectorizable_comparison): Likewise.
22340
22341 2017-06-28  Michael Collison  <michael.collison@arm.com>
22342
22343         PR target/68535
22344         * config/arm/arm.c (gen_ldm_seq): Remove last unnecessary
22345         set of base_reg
22346         (arm_gen_movmemqi): Removed unused variable 'i'.
22347         Convert 'for' loop into 'while' loop.
22348         (arm_expand_prologue): Remove last unnecessary set of insn.
22349         (thumb_pop): Remove unused variable 'pushed_words'.
22350         (thumb_exit): Remove last unnecessary set of regs_to_pop.
22351
22352 2017-06-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22353
22354         * config/s390/predicates.md: Use s390_rel_address_ok_p.
22355         * config/s390/s390-protos.h: Add prototype of
22356         s390_rel_address_ok_p.
22357         * config/s390/s390.c (s390_got_symbol): New function.
22358         (s390_rel_address_ok_p): New function.
22359         (legitimize_pic_address): Use s390_rel_address_ok_p.
22360         (s390_load_got): Use s390_got_symbol.
22361         (s390_option_override): Issue error if
22362         -mno-pic-data-is-text-relative is used without -fpic/-fPIC.
22363         * config/s390/s390.h (TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE):
22364         New macro.
22365         * config/s390/s390.opt: New option mpic-data-is-text-relative.
22366
22367 2017-06-27  Andrew Pinski  <apinski@cavium.com>
22368
22369         * match.pd (X >/>=/</<= 0 ? 1.0 : -1.0): New patterns.
22370         (X * copysign (1.0, X)): New pattern.
22371         (X * copysign (1.0, -X)): New pattern.
22372         (copysign (-1.0, CST)): New pattern.
22373
22374 2017-06-27  Joseph Myers  <joseph@codesourcery.com>
22375
22376         * genmultilib (combination_space): Remove variable.
22377         Validate reuse rules against regular expression for any sequence
22378         of multilib options in any order.
22379
22380 2017-06-27  Michael Collison  <michael.collison@arm.com>
22381
22382         * config/aarch64/aarch64-simd.md (aarch64_combine<mode>): Directly
22383         call aarch64_split_simd_combine.
22384         * (aarch64_combine_internal<mode>): Delete pattern.
22385         * config/aarch64/aarch64.c (aarch64_split_simd_combine):
22386         Allow register and subreg operands.
22387
22388 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
22389
22390         * config/i386/vxworks.h (ASM_SPEC): Remove definition. No target
22391         specific need, just fallback on defaults.
22392         (ASM_OUTPUT_ALIGNED_BSS): Add #undef before #define.
22393
22394 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
22395             Olivier Hainque  <hainque@adacore.com>
22396
22397         * config/i386/vxworks.h (DBX_REGISTER_NUMBER): Pick distinct
22398         map for 64bits.
22399         (TARGET_OS_CPP_BUILTINS): builtin_define CPU to X86_64 for 64bit
22400         targets. Pick a default if no particular attempt applied.
22401         (STACK_CHECK_PROTECT): Double for 64bit targets, which have
22402         larger contexts.
22403
22404 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
22405
22406         * config.gcc (i*86-wrs-vxworks7): Handle new acceptable triplet.
22407         (x86_64-wrs-vxworks7): Likewise.
22408
22409 2017-06-27  Marek Polacek  <polacek@redhat.com>
22410
22411         PR sanitizer/81223
22412         * ubsan.c (instrument_null): Check get_base_address's result for null.
22413
22414 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
22415
22416         * match.pd ((A+-B)+(C-A), (A+B)-(A-C)): New transformations.
22417
22418 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
22419
22420         * builtin-types.def (BT_FENV_T_PTR, BT_CONST_FENV_T_PTR,
22421         BT_FEXCEPT_T_PTR, BT_CONST_FEXCEPT_T_PTR): New primitive types.
22422         (BT_FN_INT_FENV_T_PTR, BT_FN_INT_CONST_FENV_T_PTR,
22423         BT_FN_INT_FEXCEPT_T_PTR_INT, BT_FN_INT_CONST_FEXCEPT_T_PTR_INT):
22424         New function types.
22425         * builtins.def (BUILT_IN_FECLEAREXCEPT, BUILT_IN_FEGETENV,
22426         BUILT_IN_FEGETEXCEPTFLAG, BUILT_IN_FEGETROUND,
22427         BUILT_IN_FEHOLDEXCEPT, BUILT_IN_FERAISEEXCEPT,
22428         BUILT_IN_FESETENV, BUILT_IN_FESETEXCEPTFLAG,
22429         BUILT_IN_FESETROUND, BUILT_IN_FETESTEXCEPT,
22430         BUILT_IN_FEUPDATEENV): New builtins.
22431         * tree-core.h (TI_FENV_T_PTR_TYPE, TI_CONST_FENV_T_PTR_TYPE,
22432         TI_FEXCEPT_T_PTR_TYPE, TI_CONST_FEXCEPT_T_PTR_TYPE): New entries.
22433         * tree.h (fenv_t_ptr_type_node, const_fenv_t_ptr_type_node,
22434         fexcept_t_ptr_type_node, const_fexcept_t_ptr_type_node): New
22435         macros.
22436         (builtin_structptr_types): Adjust size.
22437         * tree.c (builtin_structptr_types): Add four entries.
22438
22439 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
22440             Olivier Hainque  <hainque@adacore.com>
22441
22442         * config/vxworks.h (VXWORKS_LIB_SPEC): Incorporate ...
22443         (TLS_SYM): New local macro, forcing reference to __tls__ on
22444         link command lines for VxWorks 7 RTPs, triggering initialization
22445         of tlsLib.
22446         (VXWORKS_HAVE_TLS): New macro. State whether the target VxWorks
22447         OS features TLS support, true for RTPs on VxWorks 7.
22448         * config/vxworks.c (vxworks_override_options): Setup emutls
22449         accordingly.
22450
22451 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
22452
22453         * predict.c (test_prediction_value_range): Use -1U instead of -1
22454         to avoid narrowing conversion warning.
22455         * dumpfile.c (dump_options): Wrap all value into dump_flags_t cast
22456         to avoid narrowing conversion warning.
22457         * opt-functions.awk (var_ref): Return (unsigned short) -1 instead of
22458         -1.
22459         * optc-gen.awk (END): Expect (unsigned short) -1 instead of -1.
22460
22461 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
22462
22463         * config/vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for
22464         64bit configurations.
22465         (PTR_DIFF_TYPE): Alternative definition for TARGET_LP64.
22466         (SIZE_TYPE): Likewise.
22467         * config/vxworks.c (vxworks_emutls_var_fields): Use
22468         long_unsigned_type_node instead of unsigned_type_node as the offset
22469         field type, which is "pointer" mode in emutls.c.
22470
22471 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
22472
22473         PR sanitizer/81209
22474         * ubsan.c (ubsan_encode_value): Initialize DECL_CONTEXT on var.
22475
22476         PR middle-end/81207
22477         * gimple-fold.c (replace_call_with_call_and_fold): Handle
22478         gimple_vuse copying separately from gimple_vdef copying.
22479
22480 2017-06-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22481
22482         * value-prof.c (free_hist): Remove call to memset and the enclosing if
22483         condition.
22484
22485 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
22486             Olivier Hainque  <hainque@adacore.com>
22487
22488         * config.gcc (*-*-vxworks*): Add TARGET_VXWORKS7=1 to tm_defines
22489         for all vxworks7 targets.
22490         * config/vxworks.h (TARGET_VXWORKS7): If not defined, define to 0.
22491         (VXWORKS_ADDITIONAL_CPP_SPEC): Alternative definition for VXWORKS7.
22492         (VXWORKS_LIBS_RTP, VXWORKS_LIBS_RTP_DIR): New macros, allowing
22493         variations for VX6/VX7 and 32/64bits later on in ...
22494         (VXWORKS_LIB_SPEC): Leverage new macros.
22495         (VXWORKS_OS_CPP_BUILTINS): Define _VSB_CONFIG_FILE for VXWORKS7,
22496         as well as _ALLOW_KEYWORD_MACROS when "inline" is not a keyword.
22497
22498 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
22499
22500         * config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): builtin_define
22501         _VX_TOOL_FAMILY and _VX_TOOL to gnu.
22502
22503 2017-06-26  Carl Love  <cel@us.ibm.com>
22504
22505         * config/rs6000/rs6000-c.c: Add support for built-in functions
22506         vector bool char vec_reve (vector bool char);
22507         vector signed char vec_reve (vector signed char);
22508         vector unsigned char vec_reve (vector unsigned char);
22509         vector bool int vec_reve (vector bool int);
22510         vector signed int vec_reve (vector signed int);
22511         vector unsigned int vec_reve (vector unsigned int);
22512         vector bool long long vec_reve (vector bool long long);
22513         vector signed long long vec_reve (vector signed long long);
22514         vector unsigned long long vec_reve (vector unsigned long long);
22515         vector bool short vec_reve (vector bool short);
22516         vector signed short vec_reve (vector signed short);
22517         vector double vec_reve (vector double);
22518         vector float vec_reve (vector float);
22519         * config/rs6000/rs6000-builtin.def (VREVE_V2DI, VREVE_V4SI,
22520         VREVE_V8HI, VREVE_V16QI, VREVE_V2DF, VREVE_V4SF, VREVE): New builtin.
22521         * config/rs6000/altivec.md (UNSPEC_VREVEV): New UNSPEC.
22522         (altivec_vreve): New pattern.
22523         * config/rs6000/altivec.h (vec_reve): New define.
22524         * doc/extend.texi (vec_rev): Update the built-in documentation file
22525         for the new built-in functions.
22526
22527 2016-06-26  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22528
22529         PR tree-optimization/71815
22530         * gimple-ssa-strength-reduction.c (uses_consumed_by_stmt): New
22531         function.
22532         (find_basis_for_candidate): Call uses_consumed_by_stmt rather than
22533         has_single_use.
22534         (slsr_process_phi): Likewise.
22535         (replace_uncond_cands_and_profitable_phis): Don't replace a
22536         multiply candidate with a stride of 1 (copy or cast).
22537         (phi_incr_cost): Call uses_consumed_by_stmt rather than
22538         has_single_use.
22539         (lowest_cost_path): Likewise.
22540         (total_savings): Likewise.
22541
22542 2017-06-26  Richard Biener  <rguenther@suse.de>
22543
22544         PR target/81175
22545         * config/i386/i386.c (ix86_init_mmx_sse_builtins):
22546         Use def_builtin_pure for all gather builtins.
22547
22548 2017-06-26  Richard Biener  <rguenther@suse.de>
22549
22550         PR tree-optimization/81203
22551         * tree-tailcall.c (find_tail_calls): Do not move stmts into
22552         non-dominating BBs.
22553
22554 2017-06-26  Marek Polacek  <polacek@redhat.com>
22555
22556         PR c/80116
22557         * doc/invoke.texi: Document -Wmultistatement-macros.
22558
22559 2017-06-26  Christophe Lyon  <christophe.lyon@linaro.org>
22560
22561         * doc/sourcebuild.texi (ARM-specific attributes): Document new
22562         arm_neon_ok_no_float_abi effective target.
22563
22564 2017-06-26  Richard Biener  <rguenther@suse.de>
22565
22566         PR tree-optimization/80928
22567         * cfghooks.c (duplicate_block): Do not copy BB_DUPLICATED flag.
22568         (copy_bbs): Set BB_DUPLICATED flag early.
22569         (execute_on_growing_pred): Do not execute for BB_DUPLICATED
22570         marked blocks.
22571         (execute_on_shrinking_pred): Likewise.
22572         * tree-ssa.c (ssa_redirect_edge): Do not look for PHI args in
22573         BB_DUPLICATED blocks.
22574         * tree-ssa-phionlycoprop.c (eliminate_degenerate_phis_1): Properly
22575         iterate over all PHIs considering removal of *gsi.
22576
22577 2017-06-23  Jim Wilson  <jim.wilson@linaro.org>
22578
22579         * doc/invoke.texi (AArch64 Options, -mtune): Re-add falkor and
22580         qdf24xx.
22581
22582 2017-06-23  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22583
22584         * config/rs6000/rs6000-string.c: (expand_block_clear,
22585         do_load_for_compare, select_block_compare_mode,
22586         compute_current_alignment, expand_block_compare,
22587         expand_strncmp_align_check, expand_strn_compare,
22588         expand_block_move, rs6000_output_load_multiple)
22589         Move functions related to string/block move/compare
22590         to a separate file.
22591         * config/rs6000/rs6000.c: Move above functions to rs6000-string.c.
22592         * config/rs6000/rs6000-protos.h (rs6000_emit_dot_insn): Add prototype
22593         for this function which is now used in two files.
22594         * config/rs6000/t-rs6000: Add rule to compile rs6000-string.o.
22595         * config.gcc: Add rs6000-string.o to extra_objs for
22596         targets powerpc*-*-* and rs6000*-*-*.
22597
22598 2017-06-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
22599
22600         PR target/80510
22601         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Do not allow DImode in
22602         32-bit, since indexed is not valid for DImode.
22603         (mov<mode>_hardfloat32): Reorder ISA 2.07 load/stores before ISA
22604         3.0 d-form load/stores to be the same as mov<mode>_hardfloat64.
22605         (define_peephole2 for Altivec d-form load): Add 32-bit support.
22606         (define_peephole2 for Altivec d-form store): Likewise.
22607
22608         PR ipa/81185
22609         * multiple_target.c (create_dispatcher_calls): Only create the
22610         dispatcher call if the function is the default clone of a
22611         versioned function.
22612
22613 2017-06-23  Segher Boessenkool  <segher@kernel.crashing.org>
22614
22615         PR middle-end/80902
22616         * builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
22617         a call, force the call to not be a tail call.
22618
22619 2017-06-23  Jeff Law  <law@redhat.com>
22620
22621         * doc/contrib.texi: Add entry for Steven Pemberton's work on
22622         enquire.
22623
22624 2017-06-23  Will Schmidt  <will_schmidt@vnet.ibm.com>
22625
22626         * config/rs6000/rs6000.c: Add include of ssa-propagate.h for
22627         update_call_from_tree().  (rs6000_gimple_fold_builtin): Add
22628         handling for early expansion of vector shifts (sl,sr,sra,rl).
22629         (builtin_function_type): Add vector shift right instructions
22630         to the unsigned argument list.
22631
22632 2017-06-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
22633
22634         rtl-optimizatoin/79286
22635         * ira.c (update_equiv_regs): Revert to using may_trap_or_fault_p again.
22636         * rtlanal.c (rtx_addr_can_trap_p_1): SYMBOL_REF_FUNCTION_P can never
22637         trap.  PIC register plus a const unspec without offset can never trap.
22638
22639 2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
22640
22641         * tree.h (builtin_structptr_type): New type.
22642         (builtin_structptr_types): Declare new array.
22643         * tree.c (builtin_structptr_types): New array.
22644         (free_lang_data, build_common_tree_nodes): Use it.
22645
22646 2017-06-23  Jonathan Wakely  <jwakely@redhat.com>
22647
22648         PR c++/81187
22649         * doc/invoke.texi (-Wnoexcept-type): Fix name of option, from
22650         -Wnoexcept.
22651
22652 2017-06-22  Matt Turner  <mattst88@gmail.com>
22653
22654         * config/i386/driver-i386.c (host_detect_local_cpu): Add Kaby
22655         Lake models to skylake case.  Assume skylake for unknown
22656         models with clflushopt.
22657
22658 2017-06-22  Jeff Law  <law@redhat.com>
22659
22660         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Handle
22661         frame sizes that do not satisfy aarch64_uimm12_shift.
22662
22663 2017-06-22  Jan Hubicka <hubicka@ucw.cz>
22664
22665         * profile-count.h (apply_probability,
22666         apply_scale, probability_in): Fix checks for zero.
22667
22668 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22669
22670         * incpath.c (add_sysroot_to_chain): Allow for $SYSROOT prefix.
22671         * doc/cppdiropts.texi (-I @var{dir}): Document it.
22672
22673 2016-06-22  Richard Biener  <rguenther@suse.de>
22674
22675         * tree-vect-loop.c (vect_model_reduction_cost): Handle
22676         COND_REDUCTION and INTEGER_INDUC_COND_REDUCTION without
22677         REDUC_MAX_EXPR support.
22678         (vectorizable_reduction): Likewise.
22679         (vect_create_epilog_for_reduction): Likewise.
22680
22681 2017-06-22  James Greenhalgh  <james.greenhalgh@arm.com>
22682
22683         * match.pd (A / (1 << B) -> A >> B): New.
22684         * generic-match-head.c: Include optabs-tree.h.
22685         * gimple-match-head.c: Likewise.
22686         * optabs-tree.h (target_supports_op_p): New.
22687         * optabs-tree.c (target_supports_op_p): New.
22688
22689 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22690
22691         * configure.ac (gcc_cv_ld_static_dynamic): Also check stderr for
22692         $gcc_cv_ld --help output.
22693         (gcc_cv_ld_demangle): Likewise.
22694         (gcc_cv_ld_eh_frame_hdr): Likewise.
22695         (gcc_cv_ld_pie): Likewise.
22696         (gcc_cv_ld_as_needed): Likewise.  Prefer native forms unless $gnu_ld.
22697         (gcc_cv_ld_buildid): Likewise.
22698         (gcc_cv_ld_sysroot): Likewise.
22699         (ld_bndplt_support): Likewise.
22700         (ld_pushpopstate_support): Likewise.
22701         * configure: Regenerate.
22702         * config/sol2.h [!USE_GLD] (SYSROOT_SPEC): Define.
22703
22704 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
22705
22706         PR target/81151
22707         * config/i386/sse.md (round<mode>2): Renumber match_dup and
22708         operands indexes to avoid gap between operands and match_dups.
22709
22710 2017-06-21  Andrew Pinski  <apinski@cavium.com>
22711
22712         * config/aarch64/aarch64-cost-tables.h (thunderx_extra_costs):
22713         Increment Arith_shift and Arith_shift_reg by 1.
22714         * config/aarch64/aarch64-tuning-flags.def (cheap_shift_extend):
22715         New tuning flag.
22716         * config/aarch64/aarch64.c (thunderx_tunings): Enable
22717         AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND.
22718         (aarch64_strip_extend): Add new argument and test for it.
22719         (aarch64_cheap_mult_shift_p): New function.
22720         (aarch64_rtx_mult_cost): Call aarch64_cheap_mult_shift_p and don't
22721         add a cost if it is true.
22722         Update calls to aarch64_strip_extend.
22723         (aarch64_rtx_costs): Update calls to aarch64_strip_extend.
22724
22725 2017-06-21  Andrew Pinski  <apinski@cavium.com>
22726
22727         * config/aarch64/aarch64-cores.def (thunderxt88p1): Use thunderxt88
22728         tunings.
22729         (thunderxt88): Likewise.
22730         * config/aarch64/aarch64.c (thunderxt88_prefetch_tune): New variable.
22731         (thunderx_prefetch_tune): New variable.
22732         (thunderx2t99_prefetch_tune): Update for the correct values.
22733         (thunderxt88_tunings): New variable.
22734         (thunderx_tunings): Use thunderx_prefetch_tune instead of
22735         generic_prefetch_tune.
22736         (thunderx2t99_tunings): Use AUTOPREFETCHER_WEAK.
22737
22738 2017-06-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22739
22740         * config/aarch64/atomics.md (aarch64_compare_and_swap<mode>_lse,
22741         SHORT): Relax operand 3 to aarch64_reg_or_zero and constraint to Z.
22742         (aarch64_compare_and_swap<mode>_lse, GPI): Likewise.
22743         (aarch64_atomic_cas<mode>, SHORT): Likewise for operand 2.
22744         (aarch64_atomic_cas<mode>, GPI): Likewise.
22745
22746 2017-06-21  Martin Liska  <mliska@suse.cz>
22747
22748         * gimplify.c (gimplify_label_expr): Insert GIMPLE_PREDICT
22749         statements on cold and hot labels.
22750         * predict.c (tree_estimate_probability_bb): Remove the
22751         prediction from this place.
22752
22753 2017-06-21  Martin Liska  <mliska@suse.cz>
22754
22755         PR tree-optimization/79489
22756         * gimplify.c (maybe_add_early_return_predict_stmt): New
22757         function.
22758         (gimplify_return_expr): Call the function.
22759         * predict.c (tree_estimate_probability_bb): Remove handling
22760         of early return.
22761         * predict.def: Update comment about early return predictor.
22762         * gimple-predict.h (is_gimple_predict): New function.
22763         * predict.def: Change default value of early return to 66.
22764         * tree-tailcall.c (find_tail_calls): Skip GIMPLE_PREDICT
22765         statements.
22766         * passes.def: Put pass_strip_predict_hints to the beginning of
22767         IPA passes.
22768
22769 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
22770
22771         * dwarf2out.c (gen_decl_die): Remove the guard to skip file-scope
22772         FUNCTION_DECL declarations.
22773         (dwarf2out_early_global_decl): Remove the guard to skip FUNCTION_DECL
22774         declarations.
22775         (dwaf2out_decl): Likewise.
22776         * godump.c (go_early_global_decl): Skip call to the real debug hook
22777         for FUNCTION_DECL declarations.
22778         * passes.c (rest_of_decl_compilation): Skip call to the
22779         early_global_decl debug hook for FUNCTION_DECL declarations, unless
22780         -fdump-go-spec is passed.
22781
22782 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
22783
22784         * config/i386/i386.c (struct builtin_isa): New field pure_p.
22785         Reorder for compactness.
22786         (def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
22787         (def_builtin_pure, def_builtin_pure2): New functions.
22788         (ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.
22789
22790 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
22791
22792         * match.pd (nop_convert): New predicate.
22793         ((A +- CST1) +- CST2): Allow some NOP conversions.
22794
22795 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
22796
22797         PR c++/81130
22798         * gimplify.c (omp_add_variable): Don't force GOVD_SEEN for types
22799         with ctors/dtors if GOVD_SHARED is set.
22800
22801 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
22802
22803         * config/aarch64/aarch64.md (movti_aarch64):
22804         Emit mov rather than orr.
22805         (movtf_aarch64): Likewise.
22806         * config/aarch64/aarch64-simd.md (aarch64_simd_mov):
22807         Emit mov rather than orr.
22808
22809 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
22810
22811         * config/aarch64/aarch64-simd.md (aarch64_simd_dup):
22812         Swap alternatives, make integer dup more expensive.
22813
22814 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
22815
22816         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
22817         Return true for non-tls symbols.
22818
22819 2017-06-21  James Greenhalgh  <james.greenhalgh@arm.com>
22820
22821         * config/aarch64/aarch64-cores.def (cortex-a55): New.
22822         (cortex-a75): Likewise.
22823         (cortex-a75.cortex-a55): Likewise.
22824         * config/aarch64/aarch64-tune.md: Regenerate.
22825         * doc/invoke.texi (-mtune): Document new values for -mtune.
22826
22827 2017-06-21  Tom de Vries  <tom@codesourcery.com>
22828
22829         * doc/sourcebuild.texi (Add Options, Features for dg-add-options): Add
22830         stack_size feature.
22831         (Effective-Target Keywords, Other attributes): Suggest using
22832         dg-add-options stack_size feature to get stack limit in stack_size
22833         effective target documentation.
22834
22835 2017-06-21  Julian Brown  <julian@codesourcery.com>
22836             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
22837
22838         * config/aarch64/aarch64-simd.md (aarch64_crypto_pmulldi)
22839         (aarch64_crypto_pmullv2di): Change type attribute to crypto_pmull.
22840         * config/aarch64/thunderx2t99.md (thunderx2t99_pmull): New
22841         reservation.
22842         * config/arm/cortex-a53.md (cortex_a53_advsimd_type): Add crypto_pmull to
22843         attribute type list for neon_multiply.
22844         * config/arm/cortex-a57.md (cortex_a57_neon_type): Add crypto_pmull to
22845         attribute type list for neon_multiply.
22846         * config/arm/crypto.md (crypto_vmullp64): Change type to crypto_pmull.
22847         * config/arm/exynos-m1.md (exynos_m1_neon_type): Add crypto_pmull to
22848         attribute type list for neon_multiply.
22849         * config/arm/types.md (crypto_pmull): Add.
22850         * config/arm/xgene1.md (xgene1_neon_pmull): Add crypto_pmull to
22851         attribute type list.
22852
22853 2017-06-20  Andreas Tobler  <andreast@gcc.gnu.org>
22854
22855         * config.gcc (armv6*-*-freebsd*): Change the target_cpu_cname to
22856         arm1176jzf-s.
22857
22858 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
22859
22860         * ira-costs.c (find_costs_and_classes): Initialize cost_classes later
22861         to make sure not to dereference a NULL cost_classes_ptr pointer.
22862
22863 2017-06-20  Carl Love  <cel@us.ibm.com>
22864
22865         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
22866         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
22867         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
22868         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
22869         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
22870         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
22871         VMULOSW): New enum "unspec" values.
22872         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
22873         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
22874         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
22875         altivec_vmulosw): New patterns.
22876         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
22877         VMULOSW): Add definitions.
22878
22879 2017-06-20  Julia Koval  <julia.koval@intel.com>
22880
22881         * config/i386/i386.c: Fix rounding expand for new pattern.
22882         * config/i386/subst.md: Fix pattern (parallel -> unspec).
22883
22884 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
22885
22886         * config/aarch64/aarch64-option-extensions.def (rcpc): New.
22887         * config/aarch64/aarch64.h (AARCH64_FL_RCPC): New.
22888
22889 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
22890
22891         * config/aarch64/aarch64-option-extensions.def (fp16): Fix expected
22892         feature string.
22893
22894 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
22895
22896         * config/aarch64/aarch64-cores.def: Rearrange to sort by
22897         architecture, then by implementer ID.
22898         * config/aarch64/aarch64-tune.md: Regenerate.
22899
22900 2017-06-20  Richard Biener  <rguenther@suse.de>
22901
22902         PR middle-end/81097
22903         * fold-const.c (split_tree): Fold to type before negating.
22904
22905 2017-06-20  David Malcolm  <dmalcolm@redhat.com>
22906
22907         * diagnostic-show-locus.c
22908         (selftest::test_fixit_deletion_affecting_newline): New function.
22909         (selftest::diagnostic_show_locus_c_tests): Call it.
22910
22911 2017-06-20  Andreas Schwab  <schwab@suse.de>
22912
22913         PR target/80970
22914         * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d"
22915         instead of "+d".
22916
22917 2017-06-20  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
22918
22919         * config/arm/arm-c.c (arm_cpu_builtins): New block to define
22920         __ARM_FEATURE_COPROC according to support.
22921
22922 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
22923
22924         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
22925         Rewritten to avoid overflow for > 32-bit pointers.
22926
22927         PR sanitizer/81125
22928         * ubsan.h (ubsan_encode_value): Workaround buggy clang++ parser
22929         by removing enum keyword.
22930         (ubsan_type_descriptor): Likewise.  Formatting fix.
22931
22932         PR target/81121
22933         * config/i386/i386.md (TARGET_USE_VECTOR_CONVERTS float si->{sf,df}
22934         splitter): Require TARGET_SSE2 in the condition.
22935
22936 2017-06-20  Michael Meissner  <meissner@linux.vnet.ibm.com>
22937
22938         PR target/79799
22939         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Add support
22940         for doing vector set of SFmode on ISA 3.0.
22941         * config/rs6000/vsx.md (vsx_set_v4sf_p9): Likewise.
22942         (vsx_set_v4sf_p9_zero): Special case setting 0.0f to a V4SF
22943         element.
22944         (vsx_insert_extract_v4sf_p9): Add an optimization for inserting a
22945         SFmode value into a V4SF variable that was extracted from another
22946         V4SF variable without converting the element to double precision
22947         and back to single precision vector format.
22948         (vsx_insert_extract_v4sf_p9_2): Likewise.
22949
22950 2017-06-19  Jakub Jelinek  <jakub@redhat.com>
22951
22952         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply
22953         in UWHI to avoid undefined overflow.
22954
22955         PR sanitizer/81125
22956         * ubsan.h (enum ubsan_encode_value_phase): New.
22957         (ubsan_encode_value): Change second argument to
22958         enum ubsan_encode_value_phase with default value of
22959         UBSAN_ENCODE_VALUE_GENERIC.
22960         * ubsan.c (ubsan_encode_value): Change second argument to
22961         enum ubsan_encode_value_phase PHASE from bool IN_EXPAND_P,
22962         adjust uses, for UBSAN_ENCODE_VALUE_GENERIC use just
22963         create_tmp_var_raw instead of create_tmp_var and use a
22964         TARGET_EXPR.
22965         (ubsan_expand_bounds_ifn, ubsan_build_overflow_builtin,
22966         instrument_bool_enum_load, ubsan_instrument_float_cast): Adjust
22967         ubsan_encode_value callers.
22968
22969         PR sanitizer/81111
22970         * ubsan.c (ubsan_encode_value): If current_function_decl is NULL,
22971         use create_tmp_var_raw instead of create_tmp_var, mark it addressable
22972         just by setting TREE_ADDRESSABLE on the result and use a TARGET_EXPR.
22973
22974 2017-06-19  Richard Biener  <rguenther@suse.de>
22975
22976         PR middle-end/81118
22977         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Clear niter
22978         estimates if we changed anything.
22979
22980 2017-06-19  Richard Biener  <rguenther@suse.de>
22981
22982         PR tree-optimization/80887
22983         * tree-ssa-sccvn.c (mprts_hook_cnt): New global.
22984         (vn_lookup_simplify_result): Allow only mprts_hook_cnt succesful
22985         simplified lookups, then reset mprts_hook.
22986         (vn_nary_build_or_lookup_1): Set mprts_hook_cnt to 9 before
22987         simplifying.
22988         (try_to_simplify): Likewise.
22989
22990 2017-06-19  Martin Liska  <mliska@suse.cz>
22991
22992         PR sanitizer/80879
22993         * gimplify.c (gimplify_switch_expr):
22994         Initialize live_switch_vars for SWITCH_BODY == STATEMENT_LIST.
22995
22996 2017-06-19  Martin Liska  <mliska@suse.cz>
22997
22998         * doc/install.texi: Document that PGO runs in 4 stages.
22999
23000 2017-06-19  Martin Liska  <mliska@suse.cz>
23001
23002         PR ipa/80732
23003         * attribs.c (make_dispatcher_decl): Do not append '.ifunc'
23004         to dispatcher function name.
23005         * multiple_target.c (replace_function_decl): New function.
23006         (create_dispatcher_calls): Redirect both edges and references.
23007
23008 2017-06-19  Jan Hubicka <hubicka@ucw.cz>
23009
23010         * profile-count.c (profile_count::dump): Dump quality.
23011         (profile_count::differs_from_p): Update for unsigned val.
23012         * profile-count.h (profile_count_quality): New enum.
23013         (profile_count): Turn m_val to 62bit unsigned, add quality tracking.
23014
23015 2017-06-19  Richard Biener  <rguenther@suse.de>
23016
23017         * tree-ssa-loop-niter.h (estimate_numbers_of_iterations): Take
23018         struct function as arg.
23019         (estimate_numbers_of_iterations): Export overload with loop arg.
23020         (free_numbers_of_iterations_estimates_loop): Use an overload of
23021         free_numbers_of_iterations_estimates instead.
23022         * tree-cfg.c (remove_bb): Adjust.
23023         * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Likewise.
23024         * tree-parloops.c (gen_parallel_loop): Likewise.
23025         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables):
23026         Likewise.
23027         (tree_unroll_loops_completely): Likewise.
23028         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop):
23029         Use an overload instead and export.
23030         (estimated_loop_iterations): Adjust.
23031         (max_loop_iterations): Likewise.
23032         (likely_max_loop_iterations): Likewise.
23033         (estimate_numbers_of_iterations): Take struct function as arg
23034         and adjust.
23035         (loop_exits_before_overflow): Adjust.
23036         (free_numbers_of_iterations_estimates_loop): Use an overload.
23037         * tree-vect-loop.c (vect_analyze_loop_form): Adjust.
23038         * tree-vectorizer.c (vect_free_loop_info_assumptions): Likewise.
23039
23040 2017-06-19  Richard Biener  <rguenther@suse.de>
23041
23042         PR ipa/81112
23043         * ipa-prop.c (find_constructor_constant_at_offset): Handle
23044         RANGE_EXPR conservatively.
23045
23046 2017-06-16  Carl Love  <cel@us.ibm.com>
23047
23048         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
23049         definitions for vec_float, vec_float2, vec_floato,
23050         vec_floate built-ins.
23051         * config/rs6000/vsx.md (define_c_enum "unspec"): Add RTL code
23052         for instructions vsx_xvcvsxws vsx_xvcvuxwsp, float2, floato and
23053         floate.
23054         * config/rs6000/rs6000-builtin.def (FLOAT2_V2DI, FLOATE_V2DF,
23055         FLOATE_2DI, FLOATO_V2DF, FLOATEE_V2DI, XVCVSXWSP_V4SF,
23056         UNS_FLOATO_V2DI, UNS_FLOATE_V2DI): Add definitions.
23057         * config/altivec.md (define_insn "p8_vmrgew_<mode>",
23058         define_mode_attr VF_sxddp): Add V4SF type to p8_vmrgew.
23059         * config/rs6000/altivec.h (vec_float, vec_float2, vec_floate,
23060         vec_floato): Add builtin defines.
23061         * doc/extend.texi (vec_float, vec_float2, vec_floate, vec_floato):
23062         Update the built-in documentation file for the new built-in
23063         functions.
23064
23065 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23066
23067         * config/arm/arm.opt (marm): Mark as the negative of of -mthumb.
23068         (mthumb): Mark as the negative of -marm.
23069
23070 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23071
23072         * doc/invoke.texi (ARM Options, -mcpu): Document supported
23073         extension options.
23074         (ARM Options, -mtune): Document that this accepts the same
23075         extension options as -mcpu.
23076         (ARM Options, -mfpu): Document addition of -mfpu=auto.
23077
23078 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23079
23080         * doc/invoke.texi (ARM Options, -march=): Document new syntax and
23081         permitted extensions.
23082
23083 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23084
23085         * config/arm/arm-cpus.in (armv7): Add extension +nofp.
23086         (armv7-r): Add aliases vfpv3xd and vfpv3-d16.
23087         (armv8-m.main): Add option +nodsp.
23088         * config/arm/arm-cpu-cdata.h: Regenerated.
23089
23090 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23091
23092         * config/arm/t-fuchsia: New file.
23093         * config.gcc (arm*-*-fuchsia*): Use it.
23094
23095 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23096
23097         * config/arm/t-symbian: Rewrite for new option infrastructure.
23098
23099 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23100
23101         * config/arm/t-phoenix (MULTILIB_REUSE): Clear variable.
23102         (MULTILIB_REQUIRED): Likewise.
23103
23104 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23105
23106         * config/arm/t-linux-eabi (MULTILIB_EXCEPTIONS): Set to empty.
23107         (MULTILIB_RESUE): Likewise.
23108         (MULTILIB_MATCHES): Likewise.
23109         (MULTLIB_REQUIRED): Likewise.
23110
23111 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23112
23113         * config/arm/t-rtems: Rewrite for new option framework.
23114
23115 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23116
23117         * config/arm/t-aprofile (v7_a_nosimd_variants, v7_a_simd_variants)
23118         (v7ve_nosimd_variatns, v7ve_vfpv3_simd_variants)
23119         (v7ve_vfpv4_simd_variants, v8_a_nosimd_variants, v8_a_simd_variants)
23120         (v8_1_a_simd_variants, v8_2_a_simd_variants): Move to ...
23121         * config/arm/t-multilib: ... here.
23122         (MULTILIB_OPTIONS): Add armv7 and armv7+fp architectures.
23123         (MULTILIB_MATCHES): Use armv7 libraries for armv7-r.  Also use for
23124         armv7-a and armv8*-a when A-profile libraries have not been built.
23125         * config/arm/t-rmprofile: Rewrite.
23126
23127 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23128
23129         * genmultilib (multilib_reuse): Allow an explicit period to be escaped
23130         with a backslash.  Remove the backslash after substituting unescaped
23131         periods.
23132         * doc/fragments.texi (MULTILIB_REUSE): Document it.
23133
23134 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23135
23136         * config.gcc: (arm*-*-*): When building a-profile libraries, force
23137         the driver to pass through the default setting of -mfloat-abi.
23138         * common/config/arm/arm-common.c (arm_target_thumb_only): Return -marm
23139         rather than NULL.
23140         * config/arm/t-multilib (MULTILIB_REUSE): Initialize to empty.
23141         (all_feat_combs): New rule.
23142         (MULTILIB_OPTIONS): Use explicit ARM and Thumb directories.  Rework
23143         default libraries.
23144         * config/arm/t-aprofile: Rewrite.
23145
23146 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23147
23148         * config/arm/arm.h (FPUTYPE_AUTO): Define.
23149         * config/arm/arm.c (arm_option_override): Use FPUTYPE_AUTO if the
23150         fpu is not specified by the user/command-line.
23151         * config/arm/bpabi.h (FPUTYPE_DEFAULT): Delete.
23152         * config/arm/netbsd-elf.h (FPUTYPE_DEFAULT): Delete.
23153         * config/arm/linux-elf.h (FPUTYPE_DEFAULT): Delete.
23154         * config/arm/vxworks.h (FPUTYPE_DEFAULT): Delete.
23155         * common/config/arm/arm-common.c (arm_canon_arch_option): Use
23156         FPUTYPE_AUTO insted of FPUTYPE_DEFAULT.
23157
23158 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23159
23160         * config/arm/elf.h (MULTILIB_DEFAULTS): Delete.
23161         * config/arm/t-arm-elf: Rewritten.
23162
23163 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23164
23165         * config/arm/arm.h (TARGET_HARD_FLOAT): Also check that we
23166         have some floating-point instructions.
23167         (TARGET_SOFT_FLOAT): Define as inverse of TARGET_HARD_FLOAT.
23168         (TARGET_MAYBE_HARD_FLOAT): New macro.
23169         * config/arm/arm-builtins.c (arm_init_builtins): Use
23170         TARGET_MAYBE_HARD_FLOAT.
23171         * config/arm/arm.c (arm_option_override): Use TARGET_HARD_FLOAT_ABI.
23172
23173 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23174
23175         * common/config/arm/arm-common.c: Define INCLUDE_LIST.
23176         (configargs.h): Include it.
23177         (arm_print_hint_for_fpu_option): New function.
23178         (arm_parse_fpu_option): New function.
23179         (candidate_extension): New class.
23180         (arm_canon_for_multilib): New function.
23181         * config/arm/arm.h (CANON_ARCH_SPEC_FUNCTION): New macro.
23182         (EXTRA_SPEC_FUNCTIONS): Add CANON_ARCH_SPEC_FUNCTION.
23183         (ARCH_CANONICAL_SPECS): New macro.
23184         (DRIVER_SELF_SPECS): Add ARCH_CANONICAL_SPECS.
23185
23186 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23187
23188         * config.gcc (arm*-*-*): Ensure both target_cpu_cname and with_cpu
23189         are set after handling multilib fragments.  Set target_cpu_default2
23190         from with_cpu.
23191
23192 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23193
23194         * config.gcc (arm*-*-fucshia*): Set target_cpu_cname to the real
23195         cpu name.
23196         (arm*-*-*): Set target_cpu_default2 to a quoted string.
23197         * config/arm/parsecpu.awk (check_cpu): Validate any extension
23198         options.
23199         (check_arch): Likewise.
23200         * config/arm/arm.c (arm_configure_build_target): Handle
23201         TARGET_CPU_DEFAULT being a string constant.  Scan any feature
23202         options in the default.
23203
23204 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23205
23206         * config/arm/arm-protos.h (cpu_arch_extension): Add field to record
23207         when an option is an alias of another.
23208         * config/arm/parsecpu.awk (optalias): New parser token.
23209         (gen_comm_data): Mark non-alias options as such.  Emit entries
23210         for extension aliases.
23211         * config/arm/arm-cpus.in (armv5e): Make vfpv2 an alias.
23212         (armv5te, armv5tej, armv6, armv6j, armv6k, armv6z): Likewise.
23213         (armv6kz, armv6zk, armv6t2): Likewise.
23214         (armv7): Make vfpv3-d16 an alias.
23215         (armv7-a): Make vfpv3-d16, neon and neon-vfpv3 aliases.  Sort in
23216         canonical order.
23217         (armv7ve): Make vfpv4-d16, neon-vfpv3 and neon-vfpv4 aliases.
23218         Sort in canonical order.
23219         (armv8-a): Sort in canonical order.
23220         (armv8.1-a, armv8.2-a):  Likewise.
23221         (generic-armv7-a): Make neon and neon-vfpv3 aliases.  Sort in
23222         canonical order.
23223         (cortex-a9): Sort in canonical order.
23224         * config/arm/arm.c (selftests.h): Include it.
23225         (arm_test_cpu_arch_data): New function.
23226         (arm_run_self_tests): New function.
23227         (TARGET_RUN_TARGET_SELFTESTS): Redefine.
23228         (targetm): Move declaration to the end of the file.
23229         * arm-cpu-cdata.h: Regenerated.
23230
23231 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23232
23233         * config/arm/arm.h (TARGET_MODE_SPECS): Add additional parameter to
23234         call to target_mode_check describing the type of option passed.
23235         * common/config/arm/arm-common.c (arm_arch_core_flag): Delete.
23236         (arm_target_thumb_only): Use arm_parse_arch_option_name or
23237         arm_parse_cpu_option_name to match parameters against list of
23238         available targets.
23239         * config/arm/parsecpu.awk (gen_comm_data): Don't generate
23240         arm_arch_core_flags data structure.
23241         * config/arm/arm-cpu_cdata.h: Regenerated.
23242
23243 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23244
23245         * common/config/arm/arm-common.c (arm_initialize_isa): Moved here from
23246         config/arm/arm.c.
23247         (arm_print_hint_for_cpu_option): Likewise.
23248         (arm_print_hint_for_arch_option): Likewise.
23249         (arm_parse_cpu_option_name): Likewise.
23250         (arm_parse_arch_option_name): Likewise.
23251         * config/arm/arm.c (arm_identify_fpu_from_isa): Use the computed number
23252         of entries in the all_fpus list.
23253         * config/arm/arm-protos.h (all_architectures, all_cores): Declare.
23254         (arm_parse_cpu_option_name): Declare.
23255         (arm_parse_arch_option_name): Declare.
23256         (arm_parse_option_features): Declare.
23257         (arm_intialize_isa): Declare.
23258         * config/arm/parsecpu.awk (gen_data): Move CPU and architecture
23259         data tables to ...
23260         (gen_comm_data): ... here.  Make definitions non-static.
23261         * config/arm/arm-cpu-data.h: Regenerated.
23262         * config/arm/arm-cpu-cdata.h: Regenerated.
23263
23264 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23265
23266         * config/arm/arm-protos.h (arm_build_target): Remove arch_core.
23267         (cpu_arch_extension): New structure.
23268         (cpu_arch_option, arch_option, cpu_option): New structures.
23269         * config/arm/parsecpu.awk (gen_headers): Build an enumeration of
23270         architecture types.
23271         (gen_data): Generate new format data tables.
23272         * config/arm/arm.c (cpu_tune): New structure.
23273         (cpu_option, processors): Delete.
23274         (arm_print_hint_for_core_or_arch): Delete.  Replace with ...
23275         (arm_print_hint_for_cpu_option): ... this and ...
23276         (arm_print_hint_for_arch_option): ... this.
23277         (arm_parse_arch_cpu_name): Delete.  Replace with ...
23278         (arm_parse_cpu_option_name): ... this and ...
23279         (arm_parse_arch_option_name): ... this.
23280         (arm_unrecognized_feature): Change type of target parameter to
23281         cpu_arch_option.
23282         (arm_parse_arch_cpu_features): Delete.  Replace with ...
23283         (arm_parse_option_features): ... this.
23284         (arm_configure_build_target): Rework to use new configuration data
23285         tables.
23286         (arm_print_tune_info): Rework for new configuration data tables.
23287         * config/arm/arm-cpu-data.h: Regenerated.
23288         * config/arm/arm-cpu.h: Regenerated.
23289
23290 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23291
23292         * Makefile.in (OBJS): Move sbitmap.o from here ...
23293         (OBJS-libcommon): ... to here.
23294
23295 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23296
23297         * config/arm/arm-isa.h (ISA_ALL_FPU_INTERNAL): Renamed from ISA_ALL_FPU.
23298         (ISA_ALL_CRYPTO): New macro.
23299         (ISA_ALL_SIMD): New macro
23300         (ISA_ALL_FP): New macro.
23301         * config/arm/arm.c (fpu_bitlist): Update initializer.
23302         * config/arm/arm-cpus.in: Use new ISA_ALL macros to disable crypto,
23303         simd or fp.
23304         (arm9e): Add fpu.  Add option for nofp
23305         (arm946e-s, arm966e-s, arm968e-s, arm10e, arm1020e, arm1022e): Likewise.
23306         (arm926ej-s, arm1026ej-s): Likewise.
23307         (generic-armv7-a): Add fpu.  Add options for simd, vfpv3, vfpv3-d16,
23308         vfpv3-fp16, vfpv3-d16-fp16, vfpv4, vfpv4-d16, neon, neon-vfp3,
23309         neon-fp16, neon-vfpv4, nofp and nosimd.
23310         (cortex-a5, cortex-a7): Add fpu.  Add options for nosimd and nofp.
23311         (cortex-a8): Add fpu.  Add option for nofp.
23312         (cortex-a9): Add fpu.  Add options for nosimd and nofp.
23313         (cortex-a12, cortex-a15, cortex-a17): Add fpu.  Add option for nofp.
23314         (cortex-r4f): Add fpu.
23315         (cortex-r5): Add fpu.  Add options for nofp.dp and nofp.
23316         (cortex-r7): Use idiv option from architecture.  Add fpu.  Add option
23317         for nofp.
23318         (cortex-r8): Likewise.
23319         (cortex-m4): Add fpu.  Add option for nofp.
23320         (cortex-a15.cortex-a7): Add fpu.  Add option for nofp.
23321         (cortex-a17.cortex-a7): Likewise.
23322         (cortex-a32): Add fpu.  Add options for crypto and nofp.
23323         (cortex-a35, cortex-a53): Likewise.
23324         (cortex-a57): Add fpu.  Add option for crypto.
23325         (cortex-a72, cortex-a73): Likewise.
23326         (exynos-m1): Likewise.
23327         (cortex-a57.cortex-a53, cortex-a72.cortex-a53): Likewise.
23328         (cortex-a73.cortex-a35, cortex-a73.cortex-a53): Likewise.
23329         (cortex-m33): Add fpu.  Add option for nofp.
23330         * config/arm/arm-cpu-cdata.h: Regenerated
23331         * config/arm/arm-cpu-data.h: Regenerated.
23332
23333 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23334
23335         * arm-cpus.in (armv5e): Add options fp, vfpv2 and nofp.
23336         (armv5te, armv5tej): Likewise.
23337         (armv6, armv6j, armv6k, armv6z, armv6kz, armv6zk, armv6t2): Likewise.
23338         (armv7): Add options fp and vfpv3-d16.
23339         (armv7-a): Add options fp, simd, vfpv3, vfpv3-d16, vfpv3-d16-fp16,
23340         vfpv3-fp16, vfpv4, vfpv4-d16, neon, neon-vfpv3, neon-fp16, neon-vfpv4,
23341         nofp and nosimd.
23342         (armv7ve): Likewise.
23343         (armv7-r): Add options fp, fp.sp, idiv, nofp and noidiv.
23344         (armv7e-m): Add options fp, fpv5, fp.dp and nofp.
23345         (armv8-a): Add nocrypto option.
23346         (armv8.1-a, armv8.2-a): Likewise.
23347         (armv8-m.main): add options fp, fp.dp and nofp.
23348
23349 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23350
23351         * config/arm/arm-cpus.in (armv8-a): Add options crc, simd crypto and
23352         nofp.
23353         (armv8-a+crc): Delete.
23354         (armv8.1-a): Add options simd, crypto and nofp.
23355         (armv8.2-a): Add options fp16, simd, crypto and nofp.
23356         (armv8.2-a+fp16): Delete.
23357         (armv8-m.main): Add option dsp.
23358         (armv8-m.main+dsp): Delete.
23359         (cortex-a8): Add fpu.  Add nofp option.
23360         (cortex-a9): Add fpu.  Add nofp and nosimd options.
23361         * config/arm/parsecpu.awk (gen_data): Generate option tables and
23362         link to main cpu and architecture data structures.
23363         (gen_comm_data): Only put isa attributes from the main architecture
23364         in common tables.
23365         (option): New statement for architecture and CPU entries.
23366         * arm.c (struct cpu_option): New structure.
23367         (struct processors): Add entry for options.
23368         (arm_unrecognized_feature): New function.
23369         (arm_parse_arch_cpu_name): Ignore any characters after the first
23370         '+' character.
23371         (arm_parse_arch_cpu_feature): New function.
23372         (arm_configure_build_target): Separate out any CPU and architecture
23373         features and parse separately.  Don't error out if -mfpu=auto is
23374         used with only an architecture string.
23375         (arm_print_asm_arch_directives): New function.
23376         (arm_file_start): Call it.
23377         * config/arm/arm-cpu-cdata.h: Regenerated.
23378         * config/arm/arm-cpu-data.h: Likewise.
23379         * config/arm/arm-tables.opt: Likewise.
23380
23381 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23382
23383         * config/arm/elf.h (ASM_SPEC): Only pass -mfpu through to the
23384         assembler when it is not -mfpu=auto.
23385
23386 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23387
23388         * config/arm/arm.h (BIG_LITTLE_SPEC): Delete macro.
23389         (ASM_REWRITE_SPEC_FUNCTIONS): New macro.
23390         (BIG_LITTLE_CPU_SPEC_FUNCTIONS): Delete macro.
23391         (ASM_CPU_SPEC): Rewrite.
23392         (MCPU_MTUNE_NATIVE_FUNCTIONS): New macro.
23393         (EXTRA_SPEC_FUNCTIONS): Move outside of ifdef.  Use
23394         MCPU_MTUNE_NATIVE_FUNCTIONS and ASM_REWRITE_SPEC_FUNCTIONS.  Remove
23395         reference to BIG_LITTLE_CPU_SPEC_FUNCTIONS.
23396         * common/config/arm/arm-common.c (arm_rewrite_selected_cpu): Ensure
23397         copied string is NUL-terminated.  Also strip any characters prefixed
23398         by '+'.
23399         (arm_rewrite_selected_arch): New function.
23400         (arm_rewrite_march): New function.
23401
23402 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
23403
23404         * config/arm/arm.opt (x_arm_arch_string): New TargetSave option.
23405         (x_arm_cpu_string, x_arm_tune_string): Likewise.
23406         (march, mcpu, mtune): Convert to string-based options.
23407         * config/arm/arm.c (arm_print_hint_for_core_or_arch): New function.
23408         (arm_parse_arch_cpu_name): New function.
23409         (arm_configure_build_target): Use arm_parse_arch_cpu_name to
23410         identify selected architecture or CPU.
23411         (arm_option_save): New function.
23412         (TARGET_OPTION_SAVE): Redefine.
23413         (arm_option_restore): Restore string options.
23414         (arm_option_print): Print string options.
23415
23416 2017-06-16  Martin Sebor  <msebor@redhat.com>
23417
23418         PR tree-optimization/80933
23419         PR tree-optimization/80934
23420         * builtins.c (fold_builtin_3): Do not handle bcmp here.
23421         * gimple-fold.c (gimple_fold_builtin_bcmp): New function.
23422         (gimple_fold_builtin_bcopy, gimple_fold_builtin_bzero): Likewise.
23423         (gimple_fold_builtin): Call them.
23424
23425 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
23426
23427         * gimple-ssa-isolate-paths.c (isolate_path): Set edge leading to path
23428         as unlikely; update profile.
23429
23430 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
23431
23432         * predict.c (force_edge_cold): Handle declaring edges impossible
23433         more aggresively.
23434
23435 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
23436
23437         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update
23438         profile.
23439         (try_unroll_loop_completely): Fix reporting.
23440
23441 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
23442
23443         * tree-ssa-tail-merge.c (replace_block_by): Fix profile updating.
23444
23445 2017-06-16  James Greenhalgh  <james.greenhalgh@arm.com>
23446
23447         PR target/71778
23448         * config/arm/arm-builtins.c (arm_expand_builtin_args): Return TARGET
23449         if given a non-constant argument for an intrinsic which requires a
23450         constant.
23451
23452 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
23453
23454         * profile.c (compare_freqs): New function.
23455         (branch_prob): Sort edge list.
23456         (find_spanning_tree): Assume that the list is priority sorted.
23457
23458 2017-06-16  Richard Biener  <rguenther@suse.de>
23459
23460         PR tree-optimization/81090
23461         * passes.def (pass_record_bounds): Remove.
23462         * tree-pass.h (make_pass_record_bounds): Likewise.
23463         * tree-ssa-loop.c (pass_data_record_bounds, pass_record_bounds,
23464         make_pass_record_bounds): Likewise.
23465         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Do
23466         not free niter estimates at the beginning but at the end.
23467         * tree-scalar-evolution.c (scev_finalize): Free niter estimates.
23468
23469 2017-06-16  Richard Biener  <rguenther@suse.de>
23470
23471         * tree-switch-conversion.c (emit_case_bit_tests): Adjust
23472         initializer to workaround ICE in host GCC 4.8.
23473
23474 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
23475
23476         * ipa-inline-transform.c (update_noncloned_frequencies): Update also
23477         counts.
23478         (clone_inlined_nodes): Update.
23479
23480 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
23481
23482         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune): Update
23483         prefetch settings, and enable prefetching by default at -O3.
23484
23485 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
23486
23487         * config/aarch64/aarch64.c (aarch64_override_options_internal):
23488         Set flag_prefetch_loop_arrays according to tuning data.
23489
23490 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
23491
23492         * config/aarch64/aarch64-protos.h (struct cpu_prefetch_tune):
23493         New tune structure.
23494         (struct tune_params): Use cpu_prefetch_tune instead of cache_line_size.
23495         [Unrelated to main purpose of the patch] Place the pointer field last
23496         to enable type checking errors when tune structure are wrongly merged.
23497         * config/aarch64/aarch64.c (generic_prefetch_tune,)
23498         (exynosm1_prefetch_tune, qdf24xx_prefetch_tune,)
23499         (thunderx2t99_prefetch_tune): New tune constants.
23500         (tune_params *_tunings): Update all tunings (no functional change).
23501         (aarch64_override_options_internal): Set PARAM_SIMULTANEOUS_PREFETCHES,
23502         PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE, and PARAM_L2_CACHE_SIZE
23503         from tunings structures.
23504
23505 2017-06-16  Jakub Jelinek  <jakub@redhat.com>
23506
23507         PR sanitizer/81094
23508         * ubsan.c (instrument_null): Add T argument, use it instead
23509         of computing it based on IS_LHS.
23510         (instrument_object_size): Likewise.
23511         (pass_ubsan::execute): Adjust instrument_null and
23512         instrument_object_size callers to pass gimple_get_lhs or
23513         gimple_assign_rhs1 result to it.  Use instrument_null instead of
23514         calling get_base_address and instrument_mem_ref.  Handle
23515         aggregate call arguments for object-size sanitization.
23516
23517 2017-06-16  Yury Gribov  <tetra2005@gmail.com>
23518
23519         PR tree-optimization/81089
23520         * tree-vrp.c (is_masked_range_test): Validate operands of
23521         subexpression.
23522
23523 2017-06-15  Martin Sebor  <msebor@redhat.com>
23524
23525         PR c++/80560
23526         * dumpfile.c (dump_register): Avoid calling memset to initialize
23527         a class with a default ctor.
23528         * gcc.c (struct compiler): Remove const qualification.
23529         * genattrtab.c (gen_insn_reserv): Replace memset with initialization.
23530         * hash-table.h: Ditto.
23531         * ipa-cp.c (allocate_and_init_ipcp_value): Replace memset with
23532           assignment.
23533         * ipa-prop.c (ipa_free_edge_args_substructures): Ditto.
23534         * omp-low.c (lower_omp_ordered_clauses): Replace memset with
23535         default ctor.
23536         * params.h (struct param_info): Make struct members non-const.
23537         * tree-switch-conversion.c (emit_case_bit_tests): Replace memset
23538         with default initialization.
23539         * vec.h (vec_copy_construct, vec_default_construct): New helper
23540         functions.
23541         (vec<T>::copy, vec<T>::splice, vec<T>::reserve): Replace memcpy
23542         with vec_copy_construct.
23543         (vect<T>::quick_grow_cleared): Replace memset with default ctor.
23544         (vect<T>::vec_safe_grow_cleared, vec_safe_grow_cleared): Same.
23545         * doc/invoke.texi (-Wclass-memaccess): Document.
23546
23547 2017-06-15  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
23548
23549         * emit-rtl.h (is_leaf): Update comment about local
23550         register allocator.
23551
23552 2017-06-15  Jozef Lawrynowicz   <jozef.l@somniumtech.com>
23553
23554         PR target/78818
23555         * config/msp430/msp430.c (msp430_data_attr): Check that it's possible
23556         for a variable to have a section before checking if the section has a
23557         name.
23558         Set section to.persistent if persistent attribute is set.
23559         Warn if .persistent attribute is used on an automatic variable.
23560
23561 2017-06-15  Eric Botcazou  <ebotcazou@adacore.com>
23562
23563         PR rtl-optimization/80474
23564         * reorg.c (update_block): Do not ignore instructions in a delay slot.
23565
23566 2017-06-15  Segher Boessenkool  <segher@kernel.crashing.org>
23567
23568         * config/rs6000/rs6000.md (add<mode>3): Use reg_or_subregno instead
23569         of REGNO.
23570
23571 2017-06-14  Maciej W. Rozycki  <macro@imgtec.com>
23572
23573         * config/mips/mips.md (MIPS16_T_REGNUM): Remove constant.
23574         (casesi): Emit bounds checking as RTL.
23575         (casesi_internal_mips16_<mode>): Remove bounds checking.
23576
23577 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
23578
23579         * config/xtensa/xtensa.c (xtensa_option_override): Append
23580         MASK_CONST16 to target_flags in the absence of TARGET_L32R.
23581         (hwloop_optimize, hwloop_fail, hwloop_pattern_reg,
23582          xtensa_doloop_hooks): Define unconditionally.
23583         (xtensa_reorg_loops): Only call reorg_loops in the presence of
23584         TARGET_LOOPS.
23585         * config/xtensa/xtensa.h (TARGET_L32R): New definition.
23586         (TARGET_DEFAULT): Remove XCHAL_HAVE_L32R condition and account
23587         for it in xtensa_option_override.
23588         (HARD_FRAME_POINTER_IS_FRAME_POINTER,
23589          HARD_FRAME_POINTER_IS_ARG_POINTER): New definitions.
23590
23591 2017-06-14  Boris Kolpackov  <boris@codesynthesis.com>
23592
23593         * doc/cppopts.texi: Document '-' special value to -MF.
23594
23595 2017-06-14  Wilco Dijkstra  <wdijkstr@arm.com>
23596
23597         * config/arm/cortex-a53.md (cortex_a53_fpalu) Adjust latency.
23598         (cortex_a53_fconst): Likewise.
23599         (cortex_a53_fpmul): Likewise.
23600         (cortex_a53_f_load_64): Likewise.
23601         (cortex_a53_f_load_many): Likewise.
23602         (cortex_a53_advsimd_alu): Likewise.
23603         (cortex_a53_advsimd_alu_q): Likewise.
23604         (cortex_a53_advsimd_mul): Likewise.
23605         (cortex_a53_advsimd_mul_q): Likewise.
23606         (fpmac bypass): Add new bypass for fpmac-fpmac case.
23607         Add missing fmul, r2f_cvt and fconst cases.
23608
23609 2017-06-14  Richard Biener  <rguenther@suse.de>
23610
23611         PR middle-end/81088
23612         * fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
23613         literal constants.
23614         (fold_binary_loc): When associating do not treat pre-existing
23615         TREE_OVERFLOW on literal constants as a reason to allow
23616         TREE_OVERFLOW on associated literal constants.
23617
23618 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
23619
23620         * config/sparc/sparc.h (MASK_ISA): Add MASK_LEON and MASK_LEON3.
23621         (MASK_FEATURES): New macro.
23622         * config/sparc/sparc.c (sparc_option_override): Remove the special
23623         handling of -mfpu and generalize it to all MASK_FEATURES switches.
23624
23625 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
23626
23627         * simplify-rtx.c (simplify_binary_operation_1) <UDIV>: Do not simplify
23628         a division of 0 if non-call exceptions are enabled.
23629
23630 2017-06-14  Andrew Pinski  <apinski@cavium.com>
23631             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
23632
23633         PR target/71663
23634         * config/aarch64/aarch64.c (aarch64_expand_vector_init):
23635         Improve vector initialization code gen for only variable case.
23636
23637 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
23638
23639         * config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
23640
23641 2017-06-14  Richard Biener  <rguenther@suse.de>
23642
23643         PR tree-optimization/81083
23644         * tree-ssa-sccvn.c (vn_reference_lookup_3): Do not use abnormals
23645         as values.
23646
23647 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
23648
23649         * config/rs6000/rs6000.c: Update all comments that mentioned SPE.
23650         (rs6000_expand_builtin): Remove RS6000_BTC_EVSEL.
23651         * config/rs6000/rs6000.h (RS6000_BTC_EVSEL): Delete.
23652         * config/rs6000/vxworks.h (VXCPU_FOR_8548): Delete.  Adjust former use.
23653         * config/rs6000/vxworksae.h (VXCPU_FOR_8548): Delete.
23654         * config/rs6000/vxworksmils.h (VXCPU_FOR_8548): Delete.
23655
23656 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
23657
23658         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete VECTOR_SPE.
23659         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete VECTOR_SPE.
23660
23661 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
23662
23663         * config/rs6000/rs6000.h (FIXED_SCRATCH): Delete.
23664
23665 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
23666
23667         * config/rs6000/t-rtems: Don't handle SPE.
23668
23669 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
23670
23671         * config/rs6000/t-linux: Don't handle SPE.
23672
23673 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
23674
23675         * config/rs6000/eabispe.h: Delete file.
23676
23677 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
23678
23679         * config/rs6000/t-spe: Delete file.
23680
23681 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
23682
23683         * config/rs6000/rs6000.c (SPE_CONST_OFFSET_OK): Delete.
23684         (rs6000_legitimate_offset_address_p): Return false for anything in
23685         V2SImode or V2SFmode.
23686
23687 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
23688
23689         * config/rs6000/rs6000-modes.def: Remove all 8-byte vector modes
23690         except V2SF and V2SI.  Rearrange the vector modes, and add comments.
23691         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove V8QImode
23692         and V4HImode.
23693         (reg_offset_addressing_ok_p): Remove V4HImode and V1DImode.
23694         (rs6000_legitimate_offset_address_p): Ditto.
23695         (rs6000_emit_move): Ditto.
23696         (rs6000_init_builtins): Remove V4HI_type_node.
23697
23698 2017-06-13  Martin Liska  <mliska@suse.cz>
23699
23700         PR sanitize/78204
23701         * asan.c (asan_sanitize_stack_p): Use sanitize_flags_p.
23702         (gate_asan): Likewise.
23703         * asan.h (asan_no_sanitize_address_p): Remove the function.
23704         (sanitize_flags_p): New function.
23705         * builtins.def: Fix coding style.
23706         * common.opt: Use renamed enum value.
23707         * convert.c (convert_to_integer_1): Use sanitize_flags_p.
23708         * doc/extend.texi: Document no_sanitize attribute.
23709         * flag-types.h (enum sanitize_code): Rename SANITIZE_NONDEFAULT
23710         to SANITIZE_UNDEFINED_NONDEFAULT.
23711         * gcc.c (sanitize_spec_function): Use the renamed enum value.
23712         * gimple-fold.c (optimize_atomic_compare_exchange_p):
23713         Use sanitize_flags_p.
23714         * gimplify.c (gimplify_function_tree): Likewise.
23715         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Likewise.
23716         * opts.c (parse_no_sanitize_attribute): New function.
23717         (common_handle_option): Use renamed enum value.
23718         * opts.h (parse_no_sanitize_attribute): Declare.
23719         * tree.c (sanitize_flags_p): New function.
23720         * tree.h: Declared here.
23721         * tsan.c: Use sanitize_flags_p.
23722         * ubsan.c (ubsan_expand_null_ifn): Likewise.
23723         (instrument_mem_ref): Likewise.
23724         (instrument_bool_enum_load): Likewise.
23725         (do_ubsan_in_current_function): Remove the function.
23726         (pass_ubsan::execute): Use sanitize_flags_p.
23727         * ubsan.h: Remove do_ubsan_in_current_function
23728         * tree-cfg.c (print_no_sanitize_attr_value): New function.
23729         (dump_function_to_file): Use it here.
23730
23731 2017-06-13  Martin Jambor  <mjambor@suse.cz>
23732
23733         PR tree-optimization/80803
23734         PR tree-optimization/81063
23735         * tree-sra.c (subtree_mark_written_and_enqueue): Move up in the file.
23736         (propagate_subaccesses_across_link): Enqueue subtree whenever
23737         necessary instead of relying on the caller.
23738
23739 2017-06-13  Martin Jambor  <mjambor@suse.cz>
23740
23741         * tree-sra.c (add_access_to_work_queue): Only enqueue accesses
23742         that have a first_link.
23743         (sort_and_splice_var_accesses): Do not check first_link before
23744         enquing.
23745         (subtree_mark_written_and_enqueue): Likewise.
23746         (propagate_all_subaccesses): Likewise and do not stop at first
23747         parent with a first_link.
23748
23749 2017-06-13  Martin Jambor  <mjambor@suse.cz>
23750
23751         * tree-sra.c (dump_access_tree_1): Fix accidental dumping to stderr
23752         instead of f.
23753
23754 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
23755
23756         * match.pd: New pattern.
23757
23758 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
23759
23760         * tree-vrp.c (is_masked_range_test): New function.
23761         (register_edge_assert_for): Determine ranges for
23762         some bit tests.
23763
23764 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
23765
23766         PR tree-optimization/67328
23767         * fold-const.c (maskable_range_p): New function.
23768         (build_range_check): Generate bittests if possible.
23769
23770 2017-06-13  Martin Liska  <mliska@suse.cz>
23771
23772         * gimple-pretty-print.c (dump_probability): Add new argument.
23773         (dump_edge_probability): Dump both probability and count.
23774         (dump_gimple_label): Likewise.
23775         (dump_gimple_bb_header): Likewise.
23776
23777 2017-06-13  Georg-Johann Lay  <avr@gjlay.de>
23778
23779         PR target/81072
23780         * config/avr/avr-devices.c: Fix indentation.
23781         * config/avr/gen-avr-mmcu-specs.c: Dito.
23782
23783 2017-06-13  Richard Biener  <rguenther@suse.de>
23784
23785         * tree-vect-loop.c (vect_model_reduction_cost): Do not fail,
23786         instead get vector type from stmt_info.
23787         (vectorizable_reduction): Adjust.  Remove dead code.
23788
23789 2017-06-13  Richard Biener  <rguenther@suse.de>
23790
23791         PR middle-end/81065
23792         * fold-const.c (extract_muldiv_1): Remove bogus distribution
23793         case of C * (x * C2 + C3).
23794         (fold_addr_of_array_ref_difference): Properly fold index difference.
23795
23796 2017-06-12  David S. Miller  <davem@davemloft.net>
23797
23798         PR target/80968
23799         * config/sparc/sparc.md (return expander): Emit frame blockage if
23800         function uses alloca.
23801
23802 2017-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
23803
23804         * combine.c (make_field_assignment): Check len rather than the mode
23805         precision when calling force_to_mode.
23806
23807 2017-06-12  Georg-Johann Lay  <avr@gjlay.de>
23808
23809         Support multilibs and devices that see flash in RAM address range.
23810
23811         PR target/81072
23812         * config/avr/avr-arch.h (avr_arch_id) <ARCH_AVRXMEGA3>: New enum.
23813         (avr_mcu_t) <flash_pm_offset>: New field.
23814         (avr_device_specific_features) <AVR_ISA_RCALL>: New enum.
23815         * config/avr/avr.h (AVR_SHORT_CALLS): New define.
23816         (AVR_HAVE_JMP_CALL): Don't set if AVR_SHORT_CALLS.
23817         (AVR_TINY_PM_OFFSET): Remove macro.
23818         * config/avr/avr.opt (-mshort-calls): New option.
23819         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
23820         [*self_spec]: Add / remove -mshort-calls depending on AVR_ISA_RCALL.
23821         * config/avr/avr-c.c (avr_cpu_cpp_builtins)
23822         <__AVR_SHORT_CALLS__>: Built-in define if AVR_SHORT_CALLS.
23823         <__AVR_HAVE_JMP_CALL__>: Use AVR_HAVE_JMP_CALL as condition
23824         instead of avr_arch->have_jmp_call.
23825         <__AVR_PM_BASE_ADDRESS__>: Built-in define if avr_arch->flash_pm_offset.
23826         [AVR_TINY] <__AVR_TINY_PM_BASE_ADDRESS__>: Use
23827         avr_arch->flash_pm_offset to define.
23828         * config/avr/avr-devices.c (avr_arch_types): Add initializers for
23829         new field flash_pm_offset.  Add entry for avrxmega3.
23830         (avr_texinfo): Add entry for avrxmega3.
23831         * config/avr/avr-mcus.def: Add entries for: avrxmega3,
23832         attiny212, attiny214,
23833         attiny412, attiny414, attiny416, attiny417,
23834         attiny814, attiny816, attiny817,
23835         attiny1614, attiny1616, attiny1617,
23836         attiny3214, attiny3216, attiny3217.
23837         * config/avr/avr.c (avr_assemble_integer)[AVR_TINY]: Use
23838         avr_arch->flash_pm_offset instead of AVR_TINY_PM_OFFSET.
23839         (avr_print_operand_address) [AVR_TINY]: Same.
23840         (avr_asm_init_sections) <readonly_data_section>: Only patch
23841         callback if avr_arch->flash_pm_offset = 0.
23842         (avr_asm_named_section) <avr_need_copy_data_p>: Skip setting it
23843         for rodata if avr_arch->flash_pm_offset != 0.
23844         (avr_encode_section_info) [AVR_TINY]: Adjust comment.
23845         * config/avr/genmultilib.awk (dir_rcall, opt_rcall): New vars.
23846         (opts) [AVR_ISA_RCALL]: Append opt_rcall.
23847         (m_options): Append opt_rcall.
23848         (m_dirnames): Append dir_rcall.
23849         * config/avr/t-multilib: Regenerate.
23850
23851         * configure.ac [target=avr]: Check whether avrxmega3 default
23852         linker description file works as needed.
23853         * configure: Regenerate.
23854         * doc/avr-mmcu.texi: Regenerate.
23855         * doc/invoke.texi (AVR Options) <-mshort-calls>: Document it.
23856         <__AVR_ARCH__>: Document avrxmega3 and 103.
23857         <__AVR_HAVE_JMP_CALL__>: Adjust documentation.
23858         <__AVR_SHORT_CALLS__>: Document it.
23859         <__AVR_PM_BASE_ADDRESS__>: Document it.
23860         * doc/extend.texi (AVR Options) <-mshort-calls>: Document it.
23861         (AVR Variable Attributes) <progmem>: Document this is
23862         not needed for avrxmega3.
23863         (AVR Named Address Spaces) <__flash>: Dito.
23864
23865 2017-06-12  Jan Hubicka  <hubicka@ucw.cz>
23866
23867         * cgraph.c (cgraph_node::dump): Complain about profile insanities.
23868
23869 2017-06-12  Doug Rupp  <rupp@adacore.com>
23870
23871         * config.gcc (*-*-vxworks*): Set use_gcc_stdint to "provide".
23872         Append vxworks-stdint.h to the tm_file list.
23873         * config/vxworks-stdint.h: New file.
23874
23875 2017-06-12  Martin Liska  <mliska@suse.cz>
23876
23877         PR tree-optimization/81041
23878         * tree-profile.c (gimple_gen_ic_func_profiler):
23879         Create an extra BB in profile-generate
23880         (gimple_gen_time_profiler): Likewise.
23881
23882 2017-06-12  Jakub Jelinek  <jakub@redhat.com>
23883
23884         PR tree-optimization/81003
23885         * tree-ssa-reassoc.c (force_into_ssa_name): New function.
23886         (update_range_test): Use it instead of force_gimple_operand_gsi.
23887
23888 2017-06-12  Richard Biener  <rguenther@suse.de>
23889
23890         PR tree-optimization/81053
23891         * tree-vect-loop.c (vect_is_simple_reduction): Handle PHI
23892         with backedge value not defined in loop.  Simplify def stmt
23893         compute.
23894
23895 2017-06-11  Tom de Vries  <tom@codesourcery.com>
23896
23897         PR target/79939
23898         * config/nvptx/nvptx.c (nvptx_cannot_force_const_mem): New function.
23899         Return true.
23900         (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to
23901         nvptx_cannot_force_const_mem.
23902
23903 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
23904
23905         * opts.c (finish_options): Move test for flag_split_stack after
23906         it has been initialized.
23907
23908 2017-06-11  Jason Merrill  <jason@redhat.com>
23909
23910         * tree.h (id_equal): New.
23911         * dwarf2out.c, hsa-gen.c, ipa-devirt.c, omp-expand.c,
23912         omp-simd-clone.c, read-rtl-function.c, tree-chkp.c, tree.c: Use it
23913         instead of strcmp of IDENTIFIER_POINTER.
23914
23915 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
23916
23917         * ipa-inline-transform.c: Include function.h, cfg.h and basic-block.h
23918         (mark_all_inlined_calls_cdtor): Fix formating.
23919         (inline_transform): Rescale profile before inlining.
23920
23921 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
23922
23923         * cgraph.h (cgraph_edge::clone): Update prototype.
23924         * cgraphclones.c (cgraph_edge::clone): Update profile scaling.
23925         (cgraph_node::create_clone): Update.
23926         (cgraph_node::create_version_clone): Update.
23927         * tree-inline.c (copy_bb): Update.
23928         (expand_call_inline): Update.
23929
23930 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
23931
23932         * config/rs6000/rs6000.c (emit_vrsave_prologue): New function,
23933         factored out from ...
23934         (rs6000_emit_prologue): ... here.
23935
23936 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
23937
23938         * config/rs6000/rs6000.c (emit_split_stack_prologue): New function,
23939         factored out from ...
23940         (rs6000_emit_prologue): ... here.
23941
23942 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
23943
23944         * predict.c (drop_profile): Also drop individual bb/edge and cgraph
23945         edge counts.
23946         (handle_missing_profiles): Fix computation of tp_first_run.
23947         (counts_to_freqs): Do not touch freqs when count is 0.
23948
23949 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
23950
23951         * cgraphbuild.c (cgraph_edge::rebuild_references): Do not touch
23952         profile.
23953
23954 2017-06-10  Tom de Vries  <tom@codesourcery.com>
23955
23956         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
23957         attributes): Document signal effective target.
23958
23959 2017-06-10  Tom de Vries  <tom@codesourcery.com>
23960
23961         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
23962         Document effective target stack_size.
23963
23964 2017-06-09  David Malcolm  <dmalcolm@redhat.com>
23965
23966         * diagnostic.c (diagnostic_report_diagnostic): Only add fixits
23967         to the edit_context if they can be auto-applied.
23968
23969 2017-06-9  Ian Lance Taylor  <iant@golang.org>
23970
23971         * opts.c (finish_options): If -fsplit-stack, disable implicit
23972         -forder-blocks-and-partition.
23973         * doc/invoke.texi (Optimize Options): Document that when using
23974         -fsplit-stack -forder-blocks-and-partition is not implicitly
23975         enabled.
23976
23977 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
23978
23979         * builtin-attrs.def (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST,
23980         ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST,
23981         ATTR_TMPURE_NORETURN_NOTHROW_LEAF_COLD_LIST): New.
23982         * builtins.def (abort, trap, unreachable): Declare cold.
23983         * calls.c (flags_from_decl_or_type): Lookup ECF_COLD.
23984         * tree-core.h (ECF_COLD): New.
23985         * tree.c (set_call_expr_flags): Handle ECF_COLD.
23986         (build_common_builtin_nodes): Mark unreachable and abort as cold.
23987
23988 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
23989
23990         * predict.c (unlikely_executed_stmt_p): Cleanup.
23991
23992 2017-06-09  Richard Biener  <rguenther@suse.de>
23993
23994         * tree-ssa-loop-im.c (execute_sm): Do not force multi-threaded
23995         model if the ref is always written to.
23996
23997 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
23998
23999         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2): New.
24000
24001 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
24002
24003         * config/arm/arm.c (arm_rtx_costs_internal): Make sdiv more expensive
24004         than udiv.
24005
24006 2017-06-09  Tom de Vries  <tom@codesourcery.com>
24007
24008         PR target/80855
24009         * config/nvptx/nvptx.md (define_expand "mov<QHSDISDFM>"): Error out with
24010         "target cannot support label values" when encountering LABEL_REF.
24011
24012 2017-06-09  Martin Liska  <mliska@suse.cz>
24013
24014         * tree-profile.c (gimple_gen_ic_profiler): Update comment.
24015         (gimple_gen_ic_func_profiler): Emit direct comparison
24016         of __gcov_indirect_call_callee with NULL.
24017         (gimple_gen_time_profiler): Change probability from
24018         PROB_VERY_UNLIKELY to PROB_UNLIKELY.
24019
24020 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
24021
24022         * profile.c (edge_gcov_counts): Turn to pointer.
24023         (compute_branch_probabilities, compute_branch_probabilities): Update.
24024         (branch_prob): Do not clear edge_gcov_count.
24025         * profile.h (edge_gcov_counts): Turn to pointer.
24026         (edge_gcov_count): Update.
24027
24028 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
24029
24030         * gimple.h (gimple_check_failed): Mark cold.
24031
24032 2017-06-09  Richard Biener  <rguenther@suse.de>
24033
24034         PR tree-optimization/66623
24035         * tree-vect-loop.c (vect_is_simple_reduction): Cleanup,
24036         refactor check_reduction into two parts, properly computing
24037         whether we have to check reduction validity for outer loop
24038         vectorization.
24039
24040 2017-06-09  Richard Biener  <rguenther@suse.de>
24041
24042         PR tree-optimization/79483
24043         * graphite-scop-detection.c (order): New global.
24044         (get_order): Compute bb to order mapping that satisfies code
24045         generation constraints.
24046         (cmp_pbbs): New helper.
24047         (build_scops): Start domwalk at entry block, sort generated
24048         pbbs.
24049
24050 2017-06-09  Richard Biener  <rguenther@suse.de>
24051
24052         PR middle-end/81007
24053         * ipa-polymorphic-call.c
24054         (ipa_polymorphic_call_context::restrict_to_inner_class):
24055         Skip FIELD_DECLs with error_mark_node type.
24056         * passes.def (all_lowering_passes): Run pass_build_cgraph_edges
24057         last again.
24058
24059 2017-06-09  Martin Liska  <mliska@suse.cz>
24060
24061         * predict.c (struct branch_predictor): New struct.
24062         (test_prediction_value_range): New test.
24063         (predict_c_tests): New function.
24064         * selftest-run-tests.c (selftest::run_tests): Run the function.
24065         * selftest.h: Declare new tests.
24066
24067 2017-06-09  Segher Boessenkool  <segher@kernel.crashing.org>
24068
24069         PR target/80966
24070         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
24071         gen_add3_insn did not fail.
24072         * config/rs6000/rs6000.md (add<mode>3): If asked to add a constant to
24073         r0, construct that number in a temporary reg and add that reg to r0.
24074         If asked to put the result in r0 as well, fail.
24075
24076 2017-06-08  Will Schmidt  <will_schmidt@vnet.ibm.com>
24077
24078         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
24079         for early expansion of vec_eqv.
24080
24081 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
24082
24083         PR middle-end/81005
24084         * ubsan.c (instrument_null): Avoid pointless code temporary.
24085         (pass_ubsan::execute): Instrument aggregate arguments of calls.
24086
24087 2017-06-08  Uros Bizjak  <ubizjak@gmail.com>
24088
24089         PR target/81015
24090         Revert:
24091         2016-12-14  Uros Bizjak  <ubizjak@gmail.com>
24092
24093         PR target/59874
24094         * config/i386/i386.md (*ctzhi2): New insn_and_split pattern.
24095         (*clzhi2): Ditto.
24096
24097 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
24098
24099         * predict.c (unlikely_executed_edge_p): Move ahead.
24100         (probably_never_executed_edge_p): Use it.
24101
24102 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
24103
24104         PR middle-end/79988
24105         * tree-chkp.c (chkp_gimple_call_builtin_p): Remove
24106         gimple_call_builtin_p call.
24107
24108 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
24109
24110         * system.h (fancy_abort): Annotate by ATTRIBUTE_COLD.
24111         * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1,
24112         rtl_check_failed_type2, rtl_check_failed_code1,
24113         rtl_check_failed_code2, rtl_check_failed_code_mode,
24114         rtl_check_failed_block_symbol, cwi_check_failed_bounds,
24115         rtvec_check_failed_bounds, rtl_check_failed_flag,
24116         _fatal_insn_not_found, _fatal_insn): Likewise.
24117         * tree.h (tree_contains_struct_check_failed,
24118         tree_check_failed, tree_not_check_failed,
24119         tree_class_check_failed, tree_range_check_failed,
24120         tree_not_class_check_failed, tree_int_cst_elt_check_failed,
24121         tree_vec_elt_check_failed, phi_node_elt_check_failed,
24122         tree_operand_check_failed, omp_clause_check_failed,
24123         omp_clause_operand_check_failed, omp_clause_range_check_failed):
24124         Likewise.
24125
24126 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
24127
24128         * cgraph.c (cgraph_edge::maybe_hot_p): Do not check
24129         flag_branch_probabilities.
24130         * ipa-inline.c (edge_badness): Likewise.
24131         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
24132         * postreload-gcse.c (eliminate_partially_redundant_load): Likewise.
24133         * predict.c (maybe_hot_frequency_p): Likewise.
24134         (probably_never_executed): Likewise.
24135         * sched-ebb.c (schedule_ebbs): Likewise.
24136         * sched-rgn.c (find_single_block_region): Likewise.
24137         * tracer.c (tail_duplicate): Likewise.
24138
24139 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
24140
24141         * opts.c (finish_options): x_flag_reorder_blocks_and_partition no
24142         longer requires x_flag_profile_use.
24143
24144 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
24145
24146         * cfgrtl.c (cfg_layout_initialize): Check crtl->has_bb_partition
24147         instead of flag_reorder_blocks_and_partition.
24148         * dbxout.c (dbxout_function_end): Likewise.
24149         * dwarf2out.c (gen_subprogram_die): Likewise.
24150         * haifa-sched.c (sched_create_recovery_edges): Likewise.
24151         * hw-doloop.c (reorg_loops): Likewise.
24152         * varasm.c (assemble_start_function,
24153         assemble_end_function): Likewise.
24154         (decide_function_section): Do not check for
24155         flag_reorder_blocks_and_partition.
24156
24157 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
24158
24159         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
24160         New function.
24161         (chkp_get_hard_register_fake_addr_expr): Ditto.
24162         (chkp_build_addr_expr): Add check for hard reg case.
24163         (chkp_parse_array_and_component_ref): Ditto.
24164         (chkp_find_bounds_1): Ditto.
24165         (chkp_process_stmt): Don't generate bounds store for
24166         hard reg case.
24167
24168 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
24169
24170         * predict.c (maybe_hot_bb_p): Do not check profile status.
24171         (maybe_hot_edge_p): Likewise.
24172         (probably_never_executed): Check for zero counts even if profile
24173         is not read.
24174         (unlikely_executed_edge_p): New function.
24175         (unlikely_executed_stmt_p): New function.
24176         (unlikely_executed_bb_p): New function.
24177         (set_even_probabilities): Use unlikely predicates.
24178         (combine_predictions_for_bb): Likewise.
24179         (predict_paths_for_bb): Likewise.
24180         (predict_paths_leading_to_edge): Likewise.
24181         (determine_unlikely_bbs): New function.
24182         (estimate_bb_frequencies): Use it.
24183         (compute_function_frequency): Use zero counts even if profile is
24184         not read.
24185         * profile-count.h: Fix typo.
24186
24187 2017-08-08  Julia Koval  <julia.koval@intel.com>
24188
24189         * config/i386/avx512bwintrin.h (_mm512_mask_cvtepi16_storeu_epi8,
24190         _mm512_mask_cvtsepi16_storeu_epi8,
24191         _mm512_mask_cvtusepi16_storeu_epi8): New intrinsics.
24192         * config/i386/avx512vlbwintrin.h (_mm256_mask_cvtepi16_storeu_epi8,
24193         _mm_mask_cvtsepi16_storeu_epi8, _mm256_mask_cvtsepi16_storeu_epi8,
24194         _mm_mask_cvtusepi16_storeu_epi8, _mm256_mask_cvtusepi16_storeu_epi8,
24195         _mm_mask_cvtepi16_storeu_epi8): New intrinsics.
24196         * config/i386/i386-builtin-types.def (PV8Q, V8QI): New pointer type.
24197         (VOID_FTYPE_PV32QI_V32HI_USI, VOID_FTYPE_PV8QI_V8HI_UQI,
24198         VOID_FTYPE_PV16QI_V16HI_UHI): New function types.
24199         * config/i386/i386-builtin.def (__builtin_ia32_pmovwb128mem_mask,
24200         __builtin_ia32_pmovwb256mem_mask, __builtin_ia32_pmovswb128mem_mask,
24201         __builtin_ia32_pmovswb256mem_mask, __builtin_ia32_pmovuswb128mem_mask,
24202         __builtin_ia32_pmovuswb256mem_mask,
24203         __builtin_ia32_pmovuswb512mem_mask, __builtin_ia32_pmovswb512mem_mask)
24204         __builtin_ia32_pmovwb512mem_mask): New builtins.
24205
24206 2017-08-08  Julia Koval  <julia.koval@intel.com>
24207
24208         PR target/73350,80862
24209         * config/i386/subst.md (round): Fix round pattern.
24210         * config/i386/i386.c (ix86_erase_embedded_rounding):
24211         Fix erasing rounding for the fixed pattern.
24212
24213 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
24214
24215         * cfgbuild.c (find_many_sub_basic_blocks): Fix thinko.
24216
24217 2017-06-08  Martin Liska  <mliska@suse.cz>
24218
24219         PR gcov-profile/80911
24220         * gcov.c (block_info::block_info): New constructor.
24221
24222 2017-06-07  Carl Love  <cel@us.ibm.com>
24223
24224         * config/rs6000/rs6000-c: The return type of the following
24225         built-in functions was implemented as int not long long.  Fix sign
24226         of return value for the unsigned version of vec_mulo and vec_mule.
24227         vector unsigned long long vec_bperm (vector unsigned long long,
24228                                              vector unsigned char)
24229         vector signed long long vec_mule (vector signed int,
24230                                           vector signed int)
24231         vector unsigned long long vec_mule (vector unsigned int,
24232                                             vector unsigned int)
24233         vector signed long long vec_mulo (vector signed int,
24234                                           vector signed int)
24235         vector unsigned long long vec_mulo (vector unsigned int,
24236                                             vector unsigned int)
24237         * doc/extend.texi: Fix the documentation for the built-in
24238         functions.
24239
24240 2017-06-07  Carl Love  <cel@us.ibm.com>
24241
24242         PR target/80982
24243         * config/rs6000/altivec.md (double<mode>2): Fix the implementation of
24244         for BE.
24245
24246 2017-06-07  Carl Love  <cel@us.ibm.com>
24247
24248         * config/rs6000/altivec.md: Fix argument swizzle in vec_doublel
24249         support, Generate       doublehv for signed int/float for BE case only.
24250
24251 2017-06-07  Alexander Monakov  <amonakov@ispras.ru>
24252
24253         * doc/invoke.texi (mcx16): Rewrite.
24254
24255 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
24256
24257         * config/rs6000/predicates.md (rs6000_nonimmediate_operand): Delete.
24258         * config/rs6000/rs6000.md (*movsi_internal1, movsi_from_sf,
24259         *mov<mode>_softfloat, and an anonymous splitter): Use
24260         nonimmediate_operand instead of rs6000_nonimmediate_operand.
24261
24262 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
24263
24264         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE_ACC and
24265         SPEFSCR registers.
24266         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
24267         (enum rs6000_reg_type): Delete SPE_ACC_TYPE and SPEFSCR_REG_TYPE.
24268         (rs6000_debug_reg_global): Adjust.
24269         (rs6000_init_hard_regno_mode_ok): Adjust.
24270         (rs6000_dbx_register_number): Adjust.
24271         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change to 115.
24272         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
24273         Remove SPE_ACC and SPEFSCR.
24274         (REG_ALLOC_ORDER): Ditto.
24275         (FRAME_POINTER_REGNUM): Change to 111.
24276         (enum reg_class): Remove the SPE_ACC and SPEFSCR registers.
24277         (REG_CLASS_NAMES): Ditto.
24278         (REG_CLASS_CONTENTS): Delete the SPE_ACC and SPEFSCR registers.
24279         (REGISTER_NAMES): Ditto.
24280         (ADDITIONAL_REG_NAMES): Ditto.
24281         (rs6000_reg_names): Ditto.
24282         * config/rs6000/rs6000.md: Renumber some register number
24283         define_constants.
24284
24285 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
24286
24287         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE high
24288         registers.
24289         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
24290         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change from 149
24291         to 117.
24292         (DWARF_REG_TO_UNWIND_COLUMN): Do not define.
24293         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
24294         Delete the SPE high registers.
24295         (REG_ALLOC_ORDER): Ditto.
24296         (enum reg_class): Remove SPE_HIGH_REGS.
24297         (REG_CLASS_NAMES): Ditto.
24298         (REG_CLASS_CONTENTS): Delete the SPE high registers.
24299         (REGISTER_NAMES): Ditto.
24300         (rs6000_reg_names): Ditto.
24301         * doc/tm.texi.in: Remove SPE as example.
24302         * doc/tm.texi: Regenerate.
24303
24304 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
24305
24306         * config/rs6000/8540.md (ppc8540_brinc): Delete.
24307         * config/rs6000/e500mc.md (e500mc_brinc): Delete.
24308         * config/rs6000/e500mc64.md (e500mc64_brinc): Delete.
24309         * config/rs6000/rs6000.md (type): Remove "brinc".
24310
24311 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
24312
24313         * config.gcc (powerpc*-*-*): Don't add spe.h to extra_headers.
24314         (powerpc*-linux*spe*): Use ${cpu_type} instead of rs6000.
24315         * config/rs6000/linuxspe.h: Delete file.
24316         * config/rs6000/rs6000.md: Don't include spe.md.
24317         * config/rs6000/spe.h: Delete file.
24318         * config/rs6000/spe.md: Delete file.
24319         * config/rs6000/t-rs6000: Remove spe.md.
24320
24321 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
24322
24323         * config/rs6000/predicates.md (reg_or_mem_operand): Reformat.
24324         (reg_or_none500mem_operand): Delete.
24325         * config/rs6000/rs6000.md (extendsfdf2): Use reg_or_mem_operand
24326         instead of reg_or_none500mem_operand.
24327
24328 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
24329
24330         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
24331         handling of SPE flags.
24332         * config/rs6000/rs6000.opt (-mspe, -mspe=no, -mspe=yes): Delete.
24333
24334 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
24335
24336         * config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
24337         SPE ABI handling.
24338         * config/rs6000/paired.md (paired_negv2sf2): Rename to negv2sf2.
24339         (paired_absv2sf2, paired_addv2sf3, paired_subv2sf3, paired_mulv2sf3,
24340         paired_divv2sf3): Similar.
24341         * config/rs6000/predicates.md: Replace TARGET_SPE, TARGET_SPE_ABI,
24342         SPE_VECTOR_MODE and SPE_HIGH_REGNO_P by 0; simplify.
24343         * config/rs6000/rs6000-builtin.def: Delete RS6000_BUILTIN_E and
24344         RS6000_BUILTIN_S.
24345         Delete BU_SPE_1, BU_SPE_2, BU_SPE_3, BU_SPE_E, BU_SPE_P, and BU_SPE_X.
24346         Rename the paired_* instruction patterns.
24347         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Do not
24348         define __SPE__.
24349         * config/rs6000/rs6000-protos.h (invalid_e500_subreg): Delete.
24350         * config/rs6000/rs6000.c: Delete RS6000_BUILTIN_E and RS6000_BUILTIN_S.
24351         (struct rs6000_stack): Delete fields spe_gp_save_offset, spe_gp_size,
24352         spe_padding_size, and spe_64bit_regs_used.  Replace TARGET_SPE and
24353         TARGET_SPE_ABI with 0, simplify.  Replace SPE_VECTOR_MODE with
24354         PAIRED_VECTOR_MODE.
24355         (struct machine_function): Delete field spe_insn_chain_scanned_p.
24356         (spe_func_has_64bit_regs_p): Delete.
24357         (spe_expand_predicate_builtin): Delete.
24358         (spe_expand_evsel_builtin): Delete.
24359         (TARGET_DWARF_REGISTER_SPAN): Do not define.
24360         (TARGET_MEMBER_TYPE_FORCES_BLK): Do not define.
24361         (invalid_e500_subreg): Delete.
24362         (rs6000_legitimize_address): Always force_reg op2 as well, for
24363         paired single memory accesses.
24364         (rs6000_member_type_forces_blk): Delete.
24365         (rs6000_spe_function_arg): Delete.
24366         (rs6000_expand_unop_builtin): Delete SPE handling.
24367         (rs6000_expand_binop_builtin): Ditto.
24368         (spe_expand_stv_builtin): Delete.
24369         (bdesc_2arg_spe): Delete.
24370         (spe_expand_builtin): Delete.
24371         (spe_expand_predicate_builtin): Delete.
24372         (spe_expand_evsel_builtin): Delete.
24373         (rs6000_invalid_builtin): Remove RS6000_BTM_SPE handling.
24374         (spe_init_builtins): Delete.
24375         (spe_func_has_64bit_regs_p): Delete.
24376         (savres_routine_name): Delete "info" parameter.  Adjust callers.
24377         (rs6000_emit_stack_reset): Ditto.
24378         (rs6000_dwarf_register_span): Delete.
24379         * config/rs6000/rs6000.h (TARGET_SPE_ABI, TARGET_SPE,
24380         UNITS_PER_SPE_WORD, SPE_HIGH_REGNO_P, SPE_SIMD_REGNO_P,
24381         SPE_VECTOR_MODE, RS6000_BTM_SPE, RS6000_BUILTIN_E, RS6000_BUILTIN_S):
24382         Delete.
24383         * config/rs6000/rs6000.md (FIRST_SPE_HIGH_REGNO, LAST_SPE_HIGH_REGNO):
24384         Delete.
24385         * config/rs6000/rs6000.opt (-mabi=spe, -mabi=no-spe): Delete.
24386         * config/rs6000/spe.md: Delete every pattern that uses TARGET_SPE.
24387         * config/rs6000/vector.md (absv2sf2, negv2sf2, addv2sf3, subv2sf3,
24388         mulv2sf3, divv2sf3): Delete expanders.
24389
24390 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
24391
24392         config/rs6000/rs6000.md (UNSPEC_MV_CR_GT): Delete.
24393
24394 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
24395
24396         * config/rs6000/rs6000-protos.h (output_e500_flip_gt_bit): Delete.
24397         * config/rs6000/rs6000.c: Ditto.
24398
24399 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
24400
24401         * config/rs6000/predicated.md (rs6000_cbranch_operator): Delete.
24402         * config/rs6000/rs6000.md: Replace rs6000_cbranch_operator by
24403         comparison_operator.
24404
24405 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
24406
24407         * config/rs6000/rs6000.c: Remove everything related to -mfloat-gprs.
24408         * config/rs6000/rs6000.opt: Ditto.
24409         * config/rs6000/t-rtems: Ditto.
24410
24411 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
24412
24413         * config/rs6000/predicates.md: Replace TARGET_E500_DOUBLE and
24414         TARGET_E500_SINGLE by 0, simplify.
24415         * config/rs6000/rs6000.c: Ditto.
24416         (rs6000_option_override_internal): Delete CHECK_E500_OPTIONS.
24417         (spe_build_register_parallel): Delete.
24418         * config/rs6000/rs6000.h: Delete TARGET_E500_SINGLE,
24419         TARGET_E500_DOUBLE, and CHECK_E500_OPTIONS.
24420         * config/rs6000/rs6000.md: Replace TARGET_E500_DOUBLE,
24421         TARGET_E500_SINGLE, and <E500_CONVERT> by 0, simplify.
24422         (E500_CONVERT): Delete.
24423         * config/rs6000/spe.md: Remove many patterns and all define_constants.
24424
24425 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
24426
24427         * config/rs6000/darwin.md: Replace TARGET_FPRS by 1 and simplify.
24428         * config/rs6000/dfp.md: Ditto.
24429         (negdd2, *negdd2_fpr): Merge.
24430         (absdd2, *absdd2_fpr): Merge.
24431         (negtd2, *negtd2_fpr): Merge.
24432         (abstd2, *abstd2_fpr): Merge.
24433         * config/rs6000/e500.h: Delete file.
24434         * config/rs6000/predicates.md (rs6000_cbranch_operator): Replace
24435         TARGET_FPRS by 1 and simplify.
24436         * config/rs6000/rs6000-c.c: Ditto.
24437         * config/rs6000/rs6000.c: Ditto.  Also replace TARGET_SF_SPE and
24438         TARGET_DF_SPE by 0.
24439         * config/rs6000/rs6000.h: Ditto.  Delete TARGET_SF_SPE and
24440         TARGET_DF_SPE.
24441         * config/rs6000/rs6000.md: Ditto.
24442         (floatdidf2, *floatdidf2_fpr): Merge.
24443         (move_from_CR_gt_bit): Delete.
24444         * config/rs6000/spe.md: Replace TARGET_FPRS by 1 and simplify.
24445         (E500_CR_IOR_COMPARE): Delete.
24446         (All patterns that require !TARGET_FPRS): Delete.
24447         * config/rs6000/vsx.md: Replace TARGET_FPRS by 1 and simplify.
24448
24449 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
24450
24451         * passes.def (pass_iv_canon): Move before pass_loop_distribution.
24452
24453 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
24454
24455         * graphds.c (add_edge): Intitialize edge's attached data.
24456         (foll_in_subgraph, dfs_fst_edge, dfs_next_edge): New function
24457         pointer parameter.  Call pointed function on each edge during
24458         graph traversing.  Skip traversing the edge when the function
24459         returns true.
24460         (graphds_dfs, graphds_scc): Ditto.
24461         (for_each_edge): New parameter.  Pass the new parameter to callback
24462         function.
24463         * graphds.h (skip_edge_callback): New function pointer type.
24464         (graphds_dfs, graphds_scc): New function pointer parameter.
24465         (graphds_edge_callback, for_each_edge): New parameter.
24466
24467 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
24468
24469         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test): Factor
24470         out code checking if runtime alias check is possible to below ...
24471         Call the new function.
24472         * tree-data-ref.c (runtime_alias_check_p): ... to new function.
24473         * tree-data-ref.h (runtime_alias_check_p): New decalaration.
24474
24475 2017-06-07  Marek Polacek  <polacek@redhat.com>
24476
24477         PR sanitizer/80932
24478         * fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
24479         TYPE_OVERFLOW_WRAPS check.
24480
24481 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
24482
24483         * tree-vect-loop-manip.c (vect_do_peeling): Don't skip vector loop
24484         if versioning is required.
24485         * tree-vect-loop.c (vect_analyze_loop_2): Merge niter check for loop
24486         peeling with the check for versioning.
24487
24488 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
24489
24490         * tree-vectorizer.h (vect_build_loop_niters): New parameter.
24491         * tree-vect-loop-manip.c (vect_build_loop_niters): New parameter.
24492         Set true to new parameter if new ssa variable is defined.
24493         (vect_gen_vector_loop_niters): Refactor.  Set range information
24494         for the new vector loop bound variable.
24495         (vect_do_peeling): Ditto.
24496
24497 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
24498
24499         * tree-affine.c (ssa.h): Include header file.
24500         (tree_to_aff_combination): Handle (T1)(X - CST) when inner type
24501         has wrapping overflow behavior.
24502
24503 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
24504
24505         * tree-affine.c (tree_to_aff_combination): Handle (T1)(X + X).
24506
24507 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
24508
24509         (aff_combination_expand): Move (T1)(X *+- CST) simplification to ...
24510         (tree_to_aff_combination): ... here.
24511
24512 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
24513
24514         * tree-ssa-loop-ivopts.c (ivopts_estimate_reg_pressure): New
24515         reg_pressure model function.
24516         (ivopts_global_cost_for_size): Delete.
24517         (determine_set_costs, iv_ca_recount_cost): Call new model function
24518         ivopts_estimate_reg_pressure.
24519
24520 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
24521
24522         * config/aarch64/aarch64.c (aarch64_rtx_costs): Make sdiv more
24523         expensive than udiv.  Remove floating point cases from mod.
24524
24525 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
24526
24527         * config/arm/aarch-cost-tables.h (cortexa53_extra_cost):
24528         Increase idiv cost.
24529
24530 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
24531
24532         * config/aarch64/aarch64.md
24533         (copysignsf3): Fix mask generation.
24534
24535 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
24536
24537         * dumpfile.h (enum tree_dump_index): Rename TDI_generic to
24538         TDI_gimple.
24539         (class dump_manager): Add register_dumps method.
24540         * dumpfile.c: Include langhooks.h.
24541         (dump_files): Use 0 instead of 3/4/5 for TDI_{original,gimple,nested}.
24542         (FIRST_AUTO_NUMBERED_DUMP): Decrease to 1.
24543         (FIRST_ME_AUTO_NUMBERED_DUMP): Define.
24544         (dump_manager::dump_register): Start with 512 entries instead of 32.
24545         (dump_manager::register_dumps): New method.
24546         * toplev.c (general_init): Instead of invoking register_dumps
24547         langhook, invoke register_dumps method on the dump manager.
24548         * gimplify.c (gimplify_function_tree): Use TDI_gimple instead of
24549         TDI_generic.
24550
24551 2017-06-07  Richard Sandiford  <richard.sandiford@linaro.org>
24552
24553         * doc/md.texi: Clarify the restrictions on a define_insn condition.
24554         Say that # requires an associated define_split to exist, and that
24555         the define_split must be suitable for use after register allocation.
24556
24557 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
24558
24559         * cfgbuild.c (find_bb_boundaries): Initialize profile of split blocks.
24560         (compute_outgoing_frequencies): Also initialize zero counts.
24561         (find_many_sub_basic_blocks): Do not produce uninitialized profile
24562         around loops; preserve more of profile when nothing changes.
24563
24564 2017-06-06  Jim Wilson  <jim.wilson@linaro.org>
24565
24566         * config/aarch64/aarch64-cost-tables.h (qdf24xx_extra_costs): Move to
24567         here.
24568         * config/arm/aarch-cost-tables.h (qdf24xx_extra_costs): From here.
24569         * config/arm/arm-cpu-cdata.h: Regenerate.
24570         * config/arm/arm-cpu-data.h, config/arm/arm-cpu.h: Likewise.
24571         * config/arm/arm-tables.opt, config/arm/arm-tune.md: Likewise.
24572         * config/arm/arm-cpus.in: Delete falkor and qdf24xx entries.
24573         * config/arm/arm.c (arm_qdf24xx_tune): Delete.
24574         * config/arm/bpabi.h (BE8_LINK_SPEC): Delete falkor and qdf24xx
24575         support.
24576         * config/arm/t-aprofile (MULTILIB_MATCHES): Delete falkor and qdf24xx
24577         support.
24578         * config/arm/t-rmprofile: Likewise.
24579         * doc/invoke.texi (ARM Options): Drop falkor and qdf24xx support.
24580
24581 2017-06-06  David S. Miller  <davem@davemloft.net>
24582
24583         PR target/80968
24584         * config/sparc/sparc.c (sparc_expand_prologue): Emit frame
24585         blockage if function uses alloca.
24586
24587 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
24588
24589         * tree-ssa-loop-prefetch.c (struct mem_ref_group, struct mem_ref):
24590         New "uid" fields to hold pretty-print IDs of group and ref.
24591         Memory references are now identified as <group_id>:<ref_id>
24592         instead of using [random] addresses.
24593         (dump_mem_details): Simplify, no functional change.
24594         (dump_mem_ref): Simplify and make output more concise.
24595         Replace couple of fprintf's throughout code with calls to dump_mem_ref.
24596         (find_or_create_group): Initialize group uid.
24597         (record_ref): Initialize ref uid.  Improve debug output.
24598         (prune_group_by_reuse, should_issue_prefetch_p,)
24599         (should_issue_prefetch_p, schedule_prefetches, issue_prefetch_ref,)
24600         (mark_nontemporal_store, determine_loop_nest_reuse):
24601         Improve debug output.
24602
24603 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
24604
24605         * dbgcnt.def (prefetch): New debug counter.
24606         * tree-ssa-loop-prefetch.c (dbgcnt.h): New include.
24607         (schedule_prefetches): Stop issueing prefetches if debug counter
24608         tripped.
24609
24610 2017-06-06  Tom de Vries  <tom@codesourcery.com>
24611
24612         * doc/sourcebuild.texi (Testsuites, C Language Testsuites,
24613         gcc.c-torture/compile): Remove mention of NO_LABEL_VALUES in fixme.
24614
24615 2017-06-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24616
24617         * config/aarch64/atomics.md (atomic_compare_and_swap<mode> expander):
24618         Use aarch64_reg_or_zero predicate for operand 4.
24619         (aarch64_compare_and_swap<mode> define_insn_and_split):
24620         Use aarch64_reg_or_zero predicate for operand 3.  Add 'Z' constraint.
24621         (aarch64_store_exclusive<mode>): Likewise for operand 2.
24622
24623 2017-06-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24624
24625         * config/arm/arm.c (arm_compute_save_reg_mask): Rename into ...
24626         (arm_compute_save_core_reg_mask): This.
24627         (thumb1_compute_save_reg_mask): Rename into ...
24628         (thumb1_compute_save_core_reg_mask): This.
24629         (arm_compute_save_reg0_reg12_mask): Adapt comment.
24630         (arm_compute_frame_layout): Likewise.
24631
24632 2017-06-06  Richard Biener  <rguenther@suse.de>
24633
24634         PR tree-optimization/80974
24635         * tree-ssa-sccvn.c (set_ssa_val_to): Do not change but only
24636         keep or clear leaders SSA info.
24637
24638 2017-06-06  Tom de Vries  <tom@codesourcery.com>
24639
24640         * config/nvptx/nvptx.c (split_mode_p): New function.
24641         (nvptx_declare_function_name, nvptx_print_operand): Use split_mode_p.
24642
24643 2017-06-06  Tom de Vries  <tom@codesourcery.com>
24644
24645         * config/nvptx/nvptx.c (nvptx_print_operand): Use maybe_split_mode.
24646
24647 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
24648
24649         PR bootstrap/80978
24650         * tree-cfg.c (execute_fixup_cfg): Fix condition on when to rescale
24651         profile.
24652
24653 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
24654
24655         * shrink-wrap.c (handle_simple_exit): Update profile.
24656         (try_shrink_wrapping): Upate profile.
24657
24658 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
24659
24660         * predict.c (tree_estimate_probability_bb): Add LOCAL_ONLY.
24661         (tree_guess_outgoing_edge_probabilities): New.
24662         * predict.h (tree_guess_outgoing_edge_probabilities): Declare.
24663         * tree-cfg.c (gimple_find_sub_bbs): Propagate profile.
24664
24665 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
24666
24667         * ipa-split.c (split_function): Initialize return bb profile.
24668
24669 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
24670
24671         * profile.c (compute_branch_probabilities): Also initialize
24672         EXIT_BLOCK profile.
24673
24674 2017-06-06  Richard Biener  <rguenther@suse.de>
24675
24676         PR tree-optimization/80928
24677         * tree-vect-loop.c (vect_update_vf_for_slp): Amend dumps.
24678         (vect_analyze_loop_operations): Properly guard analysis for
24679         pure SLP case.
24680         (vect_transform_loop): Likewise.
24681         (vect_analyze_loop_2): Also reset SLP type on PHIs.
24682         (vect_model_induction_cost): Do not cost for pure SLP.
24683         (vectorizable_induction): Pass in SLP node, implement SLP vectorization
24684         of induction in inner loop vectorization.
24685         * tree-vect-slp.c (vect_create_new_slp_node): Handle PHIs.
24686         (vect_get_and_check_slp_defs): Handle vect_induction_def.
24687         (vect_build_slp_tree): Likewise.  Handle PHIs as terminating the
24688         recursion.
24689         (vect_analyze_slp_cost_1): Cost induction.
24690         (vect_detect_hybrid_slp_stmts): Handle PHIs.
24691         (vect_get_slp_vect_defs): Likewise.
24692         * tree-vect-stmts.c (vect_analyze_stmt): Handle induction.
24693         (vect_transform_stmt): Handle SLP reductions.
24694         * tree-vectorizer.h (vectorizable_induction): Adjust.
24695
24696 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
24697
24698         * config/rs6000/rs6000.c (make_resolver_func): Update
24699         init_lowered_empty_function call.
24700
24701 2017-06-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
24702
24703         * doc/invoke.texi: Document the -fprofile-abs-path option.
24704         * common.opt (fprofile-abs-path): New option.
24705         * gcov-io.h (gcov_write_filename): Declare.
24706         * gcov-io.c (gcov_write_filename): New function.
24707         * coverage.c (coverage_begin_function): Use gcov_write_filename.
24708         * profile.c (output_location): Likewise.
24709
24710 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
24711
24712         * shring-wrap.c: Revert accidental commit.
24713
24714 2017-06-05  Volker Reichelt  <v.reichelt@netcologne.de>
24715
24716         * doc/invoke.texi (-Wduplicated-branches): Add to warning list.
24717
24718 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
24719
24720         * cfgexpand.c (expand_gimple_tailcall): Initialize profile of
24721         new edge.
24722         * ipa-inline.c (want_inline_self_recursive_call_p): Watch for missing
24723         profile in callgraph edge.
24724         * profile-count.h (apply_probability): If THIS is 0, then result is 0
24725         (apply_scale): Likewise.
24726         * tree-inline.c (copy_bb, copy_edges_for_bb, copy_cfg_body):
24727         Also scale profile when inlining function with zero profile.
24728         (initialize_cfun): Update exit block profile even when it is zero.
24729         * tree-ssa-threadupdate.c (clear_counts_path): Handle correctly case
24730         when profile is read.
24731
24732 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
24733
24734         * config/rs6000/rs6000.c (toplevel): Include attribs.h.
24735         (CLONE_*): New constants to define the processors we can generate
24736         code for with the target_clone attribute.
24737         (rs6000_clone_map): New array to identify which clone processors
24738         the current program is running on.
24739         (TARGET_COMPARE_VERSION_PRIORITY): Define to enable the
24740         target_clone attribute.
24741         (TARGET_GENERATE_VERSION_DISPATCHER_BODY): Likewise.
24742         (TARGET_GET_FUNCTION_VERSIONS_DISPATCHER): Likewise.
24743         (TARGET_OPTION_FUNCTION_VERSIONS): Likewise.
24744         (cpu_expand_builtin): Add support for target_clone attribute.
24745         (rs6000_valid_attribute_p): Allow "default" attribute.
24746         (get_decl_name): New debug function to simplify printing the
24747         current function name in debugging statements.
24748         (rs6000_clone_priority): New functions to support the target_clone
24749         attribute, and be able to generate code to switch between ISA 2.05
24750         through ISA 3.0 (power6 through power9).
24751         (rs6000_compare_version_priority): Likewise.
24752         (rs6000_get_function_versions_dispatcher): Likewise.
24753         (make_resolver_func): Likewise.
24754         (add_condition_to_bb): Likewise.
24755         (dispatch_function_versions): Likewise.
24756         (rs6000_generate_version_dispatcher_body): Likewise.
24757         (rs6000_can_inline_p): Call get_decl_name for debugging usage.
24758         (fusion_gpr_load_p): Fix a spacing issue.
24759         * doc/extend.texi (Common Function Attributes): Document that the
24760         PowerPC supports the target_clone attribute.
24761
24762 2017-06-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24763
24764         * config/arm/arm.h: explain F symbol found in description of ARM
24765         register allocation in its legend.
24766
24767 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
24768
24769         * config/mips/frame-header-opt.c: Include profile-count.h.
24770         * config/riscv/riscv.c: Include profile-count.h
24771
24772 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
24773
24774         * tree-ssa-loop-im.c (execute_sm_if_changed): Add FLAG_BBS parameter;
24775         update profile.
24776         (sm_set_flag_if_changed): Add bbs field.
24777         (execute_sm_if_changed_flag_set): Pass BBS.
24778         (execute_sm): Update.
24779
24780 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24781
24782         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
24783         New pattern.
24784
24785 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24786
24787         * config/aarch64/aarch64.md (sub<mode>3_compare1_imm): New define_insn.
24788         (peephole2): New peephole2 to emit the above.
24789         * config/aarch64/predicates.md (aarch64_sub_immediate): New predicate.
24790
24791 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24792
24793         * config/aarch64/aarch64.c (define_peephole2 above
24794         *sub_<shift>_<mode>): New peephole.
24795
24796 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
24797
24798         * config/i386/i386.c (make_resolver_func): Update.
24799         * Makefile.in: Add profile-count.h and profile-count.o
24800         * auto-profile.c (afdo_indirect_call): Update to new API.
24801         (afdo_set_bb_count): Update.
24802         (afdo_propagate_edge): Update.
24803         (afdo_propagate_circuit): Update.
24804         (afdo_calculate_branch_prob): Update.
24805         (afdo_annotate_cfg): Update.
24806         * basic-block.h: Include profile-count.h
24807         (struct edge_def): Turn count to profile_count.
24808         (struct basic_block_def): Likewie.
24809         (REG_BR_PROB_BASE): Move to profile-count.h
24810         (RDIV): Move to profile-count.h
24811         * bb-reorder.c (max_entry_count): Turn to profile_count.
24812         (find_traces): Update.
24813         (rotate_loop):Update.
24814         (connect_traces):Update.
24815         (sanitize_hot_paths):Update.
24816         * bt-load.c (migrate_btr_defs): Update.
24817         * cfg.c (RDIV): Remove.
24818         (init_flow): Use alloc_block.
24819         (alloc_block): Uninitialize count.
24820         (unchecked_make_edge): Uninitialize count.
24821         (check_bb_profile): Update.
24822         (dump_edge_info): Update.
24823         (dump_bb_info): Update.
24824         (update_bb_profile_for_threading): Update.
24825         (scale_bbs_frequencies_int): Update.
24826         (scale_bbs_frequencies_gcov_type): Update.
24827         (scale_bbs_frequencies_profile_count): New.
24828         * cfg.h (update_bb_profile_for_threading): Update.
24829         (scale_bbs_frequencies_profile_count): Declare.
24830         * cfgbuild.c (compute_outgoing_frequencies): Update.
24831         (find_many_sub_basic_blocks): Update.
24832         * cfgcleanup.c (try_forward_edges): Update.
24833         (try_crossjump_to_edge): Update.
24834         * cfgexpand.c (expand_gimple_tailcall): Update.
24835         (construct_exit_block): Update.
24836         * cfghooks.c (verify_flow_info): Update.
24837         (dump_bb_for_graph): Update.
24838         (split_edge): Update.
24839         (make_forwarder_block): Update.
24840         (duplicate_block): Update.
24841         (account_profile_record): Update.
24842         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
24843         (get_estimated_loop_iterations): Update.
24844         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
24845         (single_likely_exit): Update.
24846         * cfgloopmanip.c (scale_loop_profile): Update.
24847         (loopify): Update.
24848         (set_zero_probability): Update.
24849         (lv_adjust_loop_entry_edge): Update.
24850         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
24851         (purge_dead_edges): Update.
24852         (rtl_account_profile_record): Update.
24853         * cgraph.c (cgraph_node::create): Uninitialize count.
24854         (symbol_table::create_edge): Uninitialize count.
24855         (cgraph_update_edges_for_call_stmt_node): Update.
24856         (cgraph_edge::dump_edge_flags): Update.
24857         (cgraph_node::dump): Update.
24858         (cgraph_edge::maybe_hot_p): Update.
24859         * cgraph.h: Include profile-count.h
24860         (create_clone), create_edge, create_indirect_edge): Update.
24861         (cgraph_node): Turn count to profile_count.
24862         (cgraph_edge0: Likewise.
24863         (make_speculative, clone): Update.
24864         (create_edge): Update.
24865         (init_lowered_empty_function): Update.
24866         * cgraphclones.c (cgraph_edge::clone): Update.
24867         (duplicate_thunk_for_node): Update.
24868         (cgraph_node::create_clone): Update.
24869         * cgraphunit.c (cgraph_node::analyze): Update.
24870         (cgraph_node::expand_thunk): Update.
24871         * final.c (dump_basic_block_info): Update.
24872         * gimple-streamer-in.c (input_bb): Update.
24873         * gimple-streamer-out.c (output_bb): Update.
24874         * graphite.c (print_global_statistics): Update.
24875         (print_graphite_scop_statistics): Update.
24876         * hsa-brig.c: Include basic-block.h.
24877         * hsa-dump.c: Include basic-block.h.
24878         * hsa-gen.c (T sum_slice): Update.
24879         (convert_switch_statements):Update.
24880         * hsa-regalloc.c: Include basic-block.h.
24881         * ipa-chkp.c (chkp_produce_thunks): Update.
24882         * ipa-cp.c (struct caller_statistics): Update.
24883         (init_caller_stats): Update.
24884         (gather_caller_stats): Update.
24885         (ipcp_cloning_candidate_p): Update.
24886         (good_cloning_opportunity_p): Update.
24887         (get_info_about_necessary_edges): Update.
24888         (dump_profile_updates): Update.
24889         (update_profiling_info): Update.
24890         (update_specialized_profile): Update.
24891         (perhaps_add_new_callers): Update.
24892         (decide_about_value): Update.
24893         (ipa_cp_c_finalize): Update.
24894         * ipa-devirt.c (struct odr_type_warn_count): Update.
24895         (struct decl_warn_count): Update.
24896         (struct final_warning_record): Update.
24897         (possible_polymorphic_call_targets): Update.
24898         (ipa_devirt): Update.
24899         * ipa-fnsummary.c (redirect_to_unreachable): Update.
24900         * ipa-icf.c (sem_function::merge): Update.
24901         * ipa-inline-analysis.c (do_estimate_edge_time): Update.
24902         * ipa-inline.c (compute_uninlined_call_time): Update.
24903         (compute_inlined_call_time): Update.
24904         (want_inline_small_function_p): Update.
24905         (want_inline_self_recursive_call_p): Update.
24906         (edge_badness): Update.
24907         (lookup_recursive_calls): Update.
24908         (recursive_inlining): Update.
24909         (inline_small_functions): Update.
24910         (dump_overall_stats): Update.
24911         (dump_inline_stats): Update.
24912         * ipa-profile.c (ipa_profile_generate_summary): Update.
24913         (ipa_propagate_frequency): Update.
24914         (ipa_profile): Update.
24915         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
24916         * ipa-utils.c (ipa_merge_profiles): Update.
24917         * loop-doloop.c (doloop_modify): Update.
24918         * loop-unroll.c (report_unroll): Update.
24919         (unroll_loop_runtime_iterations): Update.
24920         * lto-cgraph.c (lto_output_edge): Update.
24921         (lto_output_node): Update.
24922         (input_node): Update.
24923         (input_edge): Update.
24924         (merge_profile_summaries): Update.
24925         * lto-streamer-in.c (input_cfg): Update.
24926         * lto-streamer-out.c (output_cfg): Update.
24927         * mcf.c (create_fixup_graph): Update.
24928         (adjust_cfg_counts): Update.
24929         (sum_edge_counts): Update.
24930         * modulo-sched.c (sms_schedule): Update.
24931         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
24932         * predict.c (maybe_hot_count_p): Update.
24933         (probably_never_executed): Update.
24934         (dump_prediction): Update.
24935         (combine_predictions_for_bb): Update.
24936         (propagate_freq): Update.
24937         (handle_missing_profiles): Update.
24938         (counts_to_freqs): Update.
24939         (rebuild_frequencies): Update.
24940         (force_edge_cold): Update.
24941         * predict.h: Include profile-count.h
24942         (maybe_hot_count_p, counts_to_freqs): UPdate.
24943         * print-rtl-function.c: Do not include cfg.h
24944         * print-rtl.c: Include basic-block.h
24945         * profile-count.c: New file.
24946         * profile-count.h: New file.
24947         * profile.c (is_edge_inconsistent): Update.
24948         (correct_negative_edge_counts): Update.
24949         (is_inconsistent): Update.
24950         (set_bb_counts): Update.
24951         (read_profile_edge_counts): Update.
24952         (compute_frequency_overlap): Update.
24953         (compute_branch_probabilities): Update; Initialize and deinitialize
24954         gcov_count tables.
24955         (branch_prob): Update.
24956         * profile.h (bb_gcov_counts, edge_gcov_counts): New.
24957         (edge_gcov_count): New.
24958         (bb_gcov_count): New.
24959         * shrink-wrap.c (try_shrink_wrapping): Update.
24960         * tracer.c (better_p): Update.
24961         * trans-mem.c (expand_transaction): Update.
24962         (ipa_tm_insert_irr_call): Update.
24963         (ipa_tm_insert_gettmclone_call): Update.
24964         * tree-call-cdce.c: Update.
24965         * tree-cfg.c (gimple_duplicate_sese_region): Update.
24966         (gimple_duplicate_sese_tail): Update.
24967         (gimple_account_profile_record): Update.
24968         (execute_fixup_cfg): Update.
24969         * tree-inline.c (copy_bb): Update.
24970         (copy_edges_for_bb): Update.
24971         (initialize_cfun): Update.
24972         (freqs_to_counts): Update.
24973         (copy_cfg_body): Update.
24974         (expand_call_inline): Update.
24975         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
24976         * tree-ssa-loop-ivcanon.c (unloop_loops): Update.
24977         (try_unroll_loop_completely): Update.
24978         (try_peel_loop): Update.
24979         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
24980         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Update.
24981         * tree-ssa-loop-split.c (connect_loops): Update.
24982         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
24983         * tree-ssa-reassoc.c (branch_fixup): Update.
24984         * tree-ssa-tail-merge.c (replace_block_by): Update.
24985         * tree-ssa-threadupdate.c (create_block_for_threading): Update.
24986         (compute_path_counts): Update.
24987         (update_profile): Update.
24988         (recompute_probabilities): Update.
24989         (update_joiner_offpath_counts): Update.
24990         (estimated_freqs_path): Update.
24991         (freqs_to_counts_path): Update.
24992         (clear_counts_path): Update.
24993         (ssa_fix_duplicate_block_edges): Update.
24994         (duplicate_thread_path): Update.
24995         * tree-switch-conversion.c (case_bit_test_cmp): Update.
24996         (struct switch_conv_info): Update.
24997         * tree-tailcall.c (decrease_profile): Update.
24998         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
24999         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
25000         * value-prof.c (check_counter): Update.
25001         (gimple_divmod_fixed_value): Update.
25002         (gimple_mod_pow2): Update.
25003         (gimple_mod_subtract): Update.
25004         (gimple_ic_transform): Update.
25005         (gimple_stringop_fixed_value): Update.
25006         * value-prof.h (gimple_ic): Update.
25007
25008 2017-06-02  Carl Love  <cel@us.ibm.com>
25009
25010         * config/rs6000/rs6000-c: Add support for built-in functions
25011         vector double vec_doublee (vector signed int);
25012         vector double vec_doublee (vector unsigned int);
25013         vector double vec_doublee (vector float);
25014         vector double vec_doubleh (vector signed int);
25015         vector double vec_doubleh (vector unsigned int);
25016         vector double vec_doubleh (vector float);
25017         vector double vec_doublel (vector signed int);
25018         vector double vec_doublel (vector unsigned int);
25019         vector double vec_doublel (vector float);
25020         vector double vec_doubleo (vector signed int);
25021         vector double vec_doubleo (vector unsigned int);
25022         vector double vec_doubleo (vector float);.
25023         * config/rs6000/rs6000-builtin.def: Add definitions for DOUBLEE,
25024         DOUBLEO, DOUBLEH, DOUBLEL, UNS_DOUBLEO, UNS_DOUBLEE, UNS_DOUBLEH,
25025         UNS_DOUBLEL.
25026         * config/rs6000/altivec.md: Add code generator for doublee<mode>2,
25027         unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2, doubleh<mode>2,
25028         unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2, add mode attribute
25029         VS_sxwsp.
25030         * config/rs6000/altivec.h: Add define for vec_doublee, vec_doubleo,
25031         vec_doublel, vec_doubleh.
25032         * doc/extend.texi: Update the built-in documentation file for the
25033         new built-in functions.
25034
25035 2017-06-02  David Malcolm  <dmalcolm@redhat.com>
25036
25037         PR jit/80954
25038         * ipa-inline-analysis.c (free_growth_caches): Set
25039         edge_removal_hook_holder to NULL after removing it.
25040
25041 2017-06-02  Sudakshina Das  <sudi.das@arm.com>
25042
25043         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Return CC_SWP for
25044         comparision with zero.
25045
25046 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
25047         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
25048         for early expansion of vec_min and vec_max builtins.
25049         (builtin_function_type): Add min/max unsigned variants to those
25050         identified as having unsigned arguments.
25051
25052 2017-06-02  Olivier Hainque  <hainque@adacore.com>
25053
25054         * config/vx-common.h (DWARF_UNWIND_INFO): Switch #define to 1.
25055
25056 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25057
25058         * config/aarch64/aarch64-simd.md (*aarch64_simd_vec_copy_lane<mode>):
25059         Use VALL_F16 iterator rather than VALL.
25060
25061 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25062
25063         * config/aarch64/aarch64.c (aarch64_split_compare_and_swap):
25064         Emit CBNZ inside loop when doing a strong exchange and comparing
25065         against zero.  Generate the CC flags after the loop.
25066
25067 2017-06-02  David Edelsohn  <dje.gcc@gmail.com>
25068
25069         * dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE_STR): New.
25070         (dl_section_ref): New.
25071         (dwarf2out_finish): Copy debug_line_section_label to dl_section_ref.
25072         On AIX, append an expression to subtract the size of the
25073         section length to dl_section_ref.
25074
25075 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
25076
25077         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
25078         for early expansion of vector absolute builtins.
25079
25080 2017-06-02  Richard Biener  <rguenther@suse.de>
25081
25082         * tree-vect-slp.c (vect_detect_hybrid_slp_2): Match up
25083         what we consider a relevant use stmt with vect_detect_hybrid_slp_stmts.
25084
25085 2017-06-02  Richard Biener  <rguenther@suse.de>
25086
25087         PR tree-optimization/80948
25088         * tree-tailcall.c (find_tail_calls): Track stmts to move in
25089         stmt order as well.
25090
25091 2017-06-02  Richard Biener  <rguenther@suse.de>
25092
25093         * tree-vect-loop.c (vect_analyze_loop_operations): Not relevant
25094         PHIs are ok.
25095         * tree-vect-stmts.c (process_use): Do not mark backedge defs
25096         for inductions as relevant.
25097
25098 2017-06-02  Richard Biener  <rguenther@suse.de>
25099
25100         * tree-vect-loop.c (get_initial_def_for_induction): Inline into ...
25101         (vectorizable_induction): ... this.  Remove dead code.
25102
25103 2017-06-02  Eric Botcazou  <ebotcazou@adacore.com>
25104
25105         * builtins. (expand_builtin_alloca): Remove second parameter and
25106         infer its value from the first parameter instead.
25107         (expand_builtin) <BUILT_IN_ALLOCA>: Adjust call to above.
25108
25109 2017-06-02  Jakub Jelinek  <jakub@redhat.com>
25110
25111         PR rtl-optimization/80903
25112         * loop-doloop.c (add_test): Unshare sequence.
25113
25114 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
25115
25116         * doc/invoke.texi: Document the -Wsizeof-pointer-div warning.
25117
25118 2017-06-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>
25119
25120         * config/i386/i386.c (x86_64_ms_sysv_extra_clobbered_registers): Make
25121         static.
25122         (xlogue_layout::get_stack_space_used, xlogue_layout::s_instances,
25123         xlogue_layout::get_instance, logue_layout::xlogue_layout,
25124         sp_valid_at, fp_valid_at, choose_basereg): Formatting.
25125         (xlogue_layout::get_stub_rtx): Make static.
25126         (xlogue_layout::get_stub_name): Avoid const-cast, make static.
25127         (xlogue_layout::compute_stub_managed_regs): Rename to...
25128         (xlogue_layout::count_stub_managed_regs): ...this.
25129         (xlogue_layout::is_stub_managed_reg): New function.
25130         (xlogue_layout::m_stub_names): Rename to...
25131         (xlogue_layout::s_stub_names): ...this, make static.
25132         (xlogue_layout::STUB_INDEX_OFFSET, xlogue_layout::MIN_REGS,
25133         xlogue_layout::MAX_REGS, xlogue_layout::MAX_EXTRA_REGS,
25134         xlogue_layout::VARIANT_COUNT, xlogue_layout::STUB_NAME_MAX_LEN,
25135         xlogue_layout::s_stub_names): Instantiate statics.
25136         (stub_managed_regs): Remove.
25137         (ix86_save_reg): Use xlogue_layout::compute_stub_managed_regs.
25138         (disable_call_ms2sysv_xlogues): Rename to...
25139         (warn_once_call_ms2sysv_xlogues): ...this, and warn only once.
25140         (ix86_initial_elimination_offset, ix86_expand_call): Fix call_ms2sysv
25141         warning logic.
25142         (ix86_static_chain): Make sure that ix86_static_chain_on_stack can't
25143         change after reload_completed.
25144         (ix86_can_use_return_insn_p): Use the ix86_frame data structure
25145         directly.
25146         (ix86_expand_prologue): Likewise.
25147         (ix86_expand_epilogue): Likewise.
25148         (ix86_expand_split_stack_prologue): Likewise.
25149         (ix86_compute_frame_layout): Remove frame parameter ...
25150         (TARGET_COMPUTE_FRAME_LAYOUT): ... and export it as a target hook.
25151         (ix86_finalize_stack_realign_flags): Call ix86_compute_frame_layout
25152         only if necessary.
25153         (ix86_init_machine_status): Don't set use_fast_prologue_epilogue_nregs.
25154         (ix86_frame): Move from here ...
25155         * config/i386/i386.h (ix86_frame): ... to here.
25156         (machine_function): Remove use_fast_prologue_epilogue_nregs, cache the
25157         complete ix86_frame data structure instead.  Remove some_ld_name.
25158
25159 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
25160
25161         * dwarf2out.c (dwarf2out_late_global_decl): Add locations for
25162         symbols that hold a DECL_VALUE_EXPR.
25163
25164 2017-06-01  Martin Jambor  <mjambor@suse.cz>
25165
25166         PR tree-optimization/80898
25167         * tree-sra.c (process_subtree_disqualification): Removed.
25168         (disqualify_candidate): Do not acll
25169         process_subtree_disqualification.
25170         (subtree_mark_written_and_enqueue): New function.
25171         (propagate_all_subaccesses): Set grp_write of LHS subtree if the
25172         RHS has been disqualified and re-queue LHS if necessary.  Apart
25173         from that, ignore disqualified RHS.
25174
25175 2017-06-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25176
25177         * config/s390/s390.c (s390_emit_epilogue): Disable early return
25178         address fetch for z10 or later.
25179
25180 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
25181
25182         * config/arc/arc.md (tst_movb): Add guard when splitting.
25183
25184 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
25185
25186         * config/arc/arc.c (arc_can_eliminate): Test against
25187         arc_frame_pointer_needed.
25188
25189 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
25190
25191         * config/arc/arc.c (arc_expand_prologue): Emit a special barrier
25192         to prevent store reordering.
25193         * config/arc/arc.md (UNSPEC_ARC_STKTIE): Define.
25194         (type): Add block type.
25195         (stack_tie): Define special instruction to be used in
25196         expand_prologue.
25197
25198 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
25199
25200         * config/arc/arc.md (commutative_binary_comparison): Remove 'I'
25201         constraint. It is not valid for the pattern.
25202         (noncommutative_binary_comparison): Likewise.
25203
25204 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
25205
25206         * config/arc/simdext.md (movv2hi_insn): Change predicate to avoid
25207         scaled addresses.
25208
25209 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
25210
25211         * config/arc/arc.c (arc_conditional_register_usage): Allow r30 to
25212         be used by the reg-alloc.
25213
25214 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
25215
25216         * config/arc/arc.md (mulsi3): Avoid use of hard registers before
25217         reg-alloc when having mul64 or mul32x16 instructions.
25218         (mulsidi3): Likewise.
25219         (umulsidi3): Likewise.
25220         (mulsi32x16): New pattern.
25221         (mulsi64): Likewise.
25222         (mulsidi64): Likewise.
25223         (umulsidi64): Likewise.
25224         (MUL32x16_REG): Define.
25225         (mul64_600): Use MUL32x16_REG.
25226         (mac64_600): Likewise.
25227         (umul64_600): Likewise.
25228         (umac64_600): Likewise.
25229
25230 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
25231
25232         * config/arc/arc.md (mulsi3_700): Make it commutative.
25233
25234 2017-06-01  Jose E. Marchesi  <jose.marchesi@oracle.com>
25235
25236         * config/sparc/sparc.md (*zero_extendsidi2_insn_sp64): Set insn
25237         type for movstouw.
25238         (*sign_extendsidi2_insn): Likewise for movstosw.
25239
25240 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
25241
25242         * dwarf2out.c (get_discr_value): Call the get_debug_type hook on
25243         the type of the input discriminant value.  Convert the
25244         discriminant value of signedness vary.
25245
25246 2017-06-01  Volker Reichelt  <v.reichelt@netcologne.de>
25247
25248         * doc/invoke.texi (-Wcatch-value): Document new shortcut.
25249         Add to -Wall section.
25250
25251 2017-06-01  Richard Biener  <rguenther@suse.de>
25252
25253         PR middle-end/66313
25254         * fold-const.c (fold_plusminus_mult_expr): If the factored
25255         factor may be zero use a wrapping type for the inner operation.
25256         * tree-tailcall.c (independent_of_stmt_p): Pass in to_move bitmap
25257         and handle moved defs.
25258         (process_assignment): Properly guard the unary op case.  Return a
25259         tri-state indicating that moving the stmt before the call may allow
25260         to continue.  Pass through to_move.
25261         (find_tail_calls): Handle moving unrelated defs before
25262         the call.
25263
25264 2017-05-31  Segher Boessenkool  <segher@kernel.crashing.org>
25265
25266         PR target/80618
25267         * config/rs6000/vector.md (*vector_uneq<mode>): Write the nor in the
25268         splitter result in the canonical way.
25269
25270 2017-05-31  Uros Bizjak  <ubizjak@gmail.com>
25271
25272         * config/i386/i386.md (*zero_extendsidi2): Enable alternative (?r, *Yj)
25273         also for 32bit target.  Update insn attributes.
25274         (zero-extendsidi2 splitter): Allow all registers for operand 1.
25275
25276 2017-05-31  Sebastian Peryt  <sebastian.peryt@intel.com>
25277
25278         * config/i386/avx512fintrin.h (_mm_mask_max_sd)
25279         (_mm_maskz_max_sd, _mm_mask_max_ss, _mm_maskz_max_ss)
25280         (_mm_mask_min_sd, _mm_maskz_min_sd, _mm_mask_min_ss)
25281         (_mm_maskz_min_ss): New intrinsics.
25282
25283 2017-05-31  Martin Liska  <mliska@suse.cz>
25284
25285         * tree-vect-loop.c (vect_create_epilog_for_reduction):
25286         Change comment style to one we normally use.
25287         (vectorizable_reduction): Likewise.
25288         (vectorizable_induction): Likewise.
25289         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
25290         (vectorizable_call): Likewise.
25291         (vectorizable_simd_clone_call): Likewise.
25292         (vectorizable_conversion): Likewise.
25293         (vectorizable_assignment): Likewise.
25294         (vectorizable_shift): Likewise.
25295         (vectorizable_operation): Likewise.
25296         (vectorizable_store): Likewise.
25297         (vectorizable_load): Likewise.
25298         * tree-vectorizer.h: Likewise.
25299
25300 2017-05-31  Alexander Monakov  <amonakov@ispras.ru>
25301
25302         * passes.c (emergency_dump_function): New.
25303         * tree-pass.h (emergency_dump_function): Declare.
25304         * plugin.c (plugins_internal_error_function): Remove.
25305         * plugin.h (plugins_internal_error_function): Remove declaration.
25306         * toplev.c (internal_error_function): New static function.  Use it...
25307         (general_init): ...here.
25308
25309 2017-05-31  Graham Markall  <graham.markall@embecosm.com>
25310
25311         * config/arc/arc.c (arc_print_operand): Handle constant operands.
25312         (arc_rtx_costs): Add costs for new patterns.
25313         * config/arc/arc.md: Additional *add_n and *sub_n patterns.
25314         * config/arc/predicates.md: Add _1_2_3_operand predicate.
25315
25316 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
25317
25318         * tree-ssa-strlen.c (get_next_strinfo): New function.
25319         (get_stridx_plus_constant): Use it.
25320         (zero_length_string): Likewise.
25321         (adjust_related_strinfos): Likewise.
25322         (adjust_last_stmt): Likewise.
25323
25324 2017-05-31  Richard Biener  <rguenther@suse.de>
25325
25326         PR target/80880
25327         * config/i386/i386.c (ix86_expand_builtin): Remove assert
25328         for arg being an SSA name when expanding IX86_BUILTIN_BNDRET.
25329
25330 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
25331
25332         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Remove
25333         loop_vinfo argument and use of dependence distance vectors.
25334         Check instead whether the two references differ only in their
25335         initial value and assume that they have the same alignment if the
25336         difference is a multiple of the vector alignment.
25337         (vect_analyze_data_refs_alignment): Update call accordingly.
25338
25339 2017-05-31  Martin Liska  <mliska@suse.cz>
25340
25341         PR target/79155
25342         * config/i386/cpuid.h: Fix typo in a comment in cpuid.h.
25343
25344 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
25345
25346         * tree-vect-loop-manip.c (create_intersect_range_checks_index)
25347         (create_intersect_range_checks): Move from ...
25348         * tree-data-ref.c (create_intersect_range_checks_index)
25349         (create_intersect_range_checks): ... to here.
25350         (create_runtime_alias_checks): New function factored from ...
25351         * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): ...
25352         here.  Call above function.
25353         * tree-data-ref.h (create_runtime_alias_checks): New function.
25354
25355 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
25356
25357         * tree-data-ref.c (prune_runtime_alias_test_list): Relax minimal
25358         segment length for dr_b and compute it in wide_int.
25359
25360 2017-05-31  Richard Biener  <rguenther@suse.de>
25361
25362         PR tree-optimization/80906
25363         * graphite-isl-ast-to-gimple.c (copy_loop_close_phi_nodes): Get
25364         and pass through iv_map.
25365         (copy_bb_and_scalar_dependences): Adjust.
25366         (translate_pending_phi_nodes): Likewise.
25367         (copy_loop_close_phi_args): Handle code-generating IVs instead
25368         of ICEing.
25369
25370 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
25371
25372         * diagnostic-color.c (color_dict): Add "type-diff".
25373         (parse_gcc_colors): Update comment.
25374         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
25375         -fdiagnostics-show-template-tree and -fno-elide-type.
25376         (GCC_COLORS): Add type-diff to example.
25377         (type-diff=): New.
25378         (-fdiagnostics-show-template-tree): New.
25379         (-fno-elide-type): New.
25380         * pretty-print.c (pp_format): Pass quote and formatters[argno] to
25381         the pp_format_decoder callback.  Call any m_format_postprocessor's
25382         "handle" method.
25383         (pretty_printer::pretty_printer): Initialize
25384         m_format_postprocessor.
25385         (pretty_printer::~pretty_printer): Delete any
25386         m_format_postprocessor.
25387         * pretty-print.h (printer_fn): Add bool and const char ** parameters.
25388         (class format_postprocessor): New class.
25389         (struct pretty_printer::format_decoder): Document the new parameters.
25390         (struct pretty_printer::m_format_postprocessor): New field.
25391         * tree-diagnostic.c (default_tree_printer): Update for new
25392         bool and const char ** params.
25393         * tree-diagnostic.h (default_tree_printer): Likewise.
25394
25395 2017-05-30  Segher Boessenkool  <segher@kernel.crashing.org>
25396
25397         * config/rs6000/predicates.md (cc_reg_not_micro_cr0_operand): Delete.
25398         (lwa_operand): Delete rs6000_gen_cell_microcode test.
25399         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
25400         rs6000_gen_cell_microcode code.
25401         (rs6000_final_prescan_insn): Delete.
25402         (rs6000_opt_vars): Delete the "gen-cell-microcode" and
25403         "warn-cell-microcode" entries.
25404         * config/rs6000/rs6000.h (FINAL_PRESCAN_INSN): Delete.
25405         * config/rs6000/rs6000.md: Delete rs6000_gen_cell_microcode tests
25406         throughout.  Change cc_reg_not_micro_cr0_operand to
25407         cc_reg_not_cr0_operand throughout.
25408         (*extendhi<mode>2_noload): Delete.
25409         * config/rs6000/rs6000.opt (mgen-cell-microcode): Replace by stub.
25410         (mwarn-cell-microcode): Delete.
25411         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete
25412         -mgen-cell-microcode and -mwarn-cell-microcode.
25413
25414 2017-05-30  Uros Bizjak  <ubizjak@gmail.com>
25415
25416         PR target/80833
25417         * config/i386/constraints.md (Yd): New constraint.
25418         (Ye): Ditto.
25419         * config/i386/i386.md (*movti_internal): Add (?r, Ye)
25420         and (?Yd, r) alternatives.  Update insn attributes.
25421         * config/i386/i386.md (*movti_internal): Add (?r, *Ye)
25422         and (?*Yd, r) alternatives.  Update insn attributes.
25423         (double-mode inter-unit splitters): Add new GR<->XMM splitters.
25424
25425 2017-05-30  Pierre-Marie de Rodat  <derodat@adacore.com>
25426
25427         * gimplify.c (gimplify_modify_expr): Don't create a
25428         DECL_DEBUG_EXPR link if *FROM_P does not belong to the current
25429         function.
25430
25431 2017-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
25432
25433         * config/arm/arm-builtins.c (arm_expand_builtin): Remove const.
25434
25435 2017-05-30  Richard Biener  <rguenther@suse.de>
25436
25437         * tree-vectorizer.h (struct _stmt_vec_info): Add reduc_type
25438         and reduc_def fields.
25439         (STMT_VINFO_REDUC_TYPE): New define.
25440         (STMT_VINFO_REDUC_DEF): Likewise.
25441         (vect_force_simple_reduction): Adjust prototype.
25442         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Adjust.
25443         (vect_is_simple_reduction): Remove check_reduction argument.
25444         (vect_force_simple_reduction): Adjust and set
25445         STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
25446         (vectorizable_reduction): Do not re-do reduction analysis
25447         but use STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
25448         * tree-parloops.c (gather_scalar_reductions): Adjust.
25449
25450 2017-05-30  Richard Biener  <rguenther@suse.de>
25451
25452         PR middle-end/80901
25453         * cfgexpand.c (expand_gimple_cond): Match up loop fixup with
25454         split_edge code.
25455
25456 2017-05-24  Robin Dapp  <rdapp@linux.vnet.ibm.com>
25457
25458         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs):
25459         Introduce unknown_misalignment parameter and remove vf.
25460         (vect_peeling_hash_get_lowest_cost):
25461         Pass unknown_misalignment parameter.
25462         (vect_enhance_data_refs_alignment):
25463         Fix unsupportable data ref treatment.
25464
25465 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
25466
25467         * tree-vect-data-refs.c (vect_get_data_access_cost):
25468         Workaround for SLP handling.
25469         (vect_enhance_data_refs_alignment):
25470         Compute costs for doing no peeling at all, compare to the best
25471         peeling costs so far and avoid peeling if cheaper.
25472
25473 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
25474
25475         * tree-vect-data-refs.c (vect_peeling_hash_choose_best_peeling):
25476         Return peeling info and set costs to zero for unlimited cost
25477         model.
25478         (vect_enhance_data_refs_alignment): Also inspect all datarefs
25479         with unknown misalignment. Compute and costs for unknown
25480         misalignment, compare them to the costs for known misalignment
25481         and choose the cheapest for peeling.
25482
25483 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
25484
25485         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Rename.
25486         (vect_get_peeling_costs_all_drs): Create function.
25487         (vect_peeling_hash_get_lowest_cost):
25488         Use vect_get_peeling_costs_all_drs.
25489         (vect_peeling_supportable): Create function.
25490         (vect_enhance_data_refs_alignment): Use vect_peeling_supportable.
25491
25492 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
25493
25494         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Create
25495         DR_HAS_NEGATIVE_STEP.
25496         (vect_update_misalignment_for_peel): Define DR_MISALIGNMENT.
25497         (vect_enhance_data_refs_alignment): Use.
25498         (vect_duplicate_ssa_name_ptr_info): Use.
25499         * tree-vectorizer.h (dr_misalignment): Use.
25500         (known_alignment_for_access_p): Use.
25501
25502 2017-05-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
25503
25504         PR target/78838
25505         * config/msp430/msp430.c (gen_prefix): Return NULL when section name is
25506         .lowtext.
25507         (has_section_name): New function.
25508
25509 2017-05-30  Martin Liska  <mliska@suse.cz>
25510
25511         PR other/80909
25512         * auto-profile.c (get_function_decl_from_block): Fix
25513         parenthesis.
25514
25515 2017-05-30  Richard Biener  <rguenther@suse.de>
25516
25517         PR middle-end/80876
25518         * cfgexpand.c (expand_gimple_cond): Fixup preserving loops again.
25519
25520 2017-05-30  Martin Liska  <mliska@suse.cz>
25521
25522         * dumpfile.c: Use newly added macro DUMP_FILE_INFO.
25523         * dumpfile.h (struct dump_file_info): Remove ctors.
25524
25525 2017-05-30  Martin Liska  <mliska@suse.cz>
25526
25527         * predict.def: Fix GNU coding style.
25528
25529 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
25530
25531         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
25532         Mark 'to' argument with ATTRIBUTE_UNUSED.
25533
25534 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
25535
25536         * config/xtensa/xtensa.c (xtensa_emit_call): Use
25537         HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
25538         (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
25539         format string.
25540
25541 2017-05-29  Eric Botcazou  <ebotcazou@adacore.com>
25542
25543         * doc/install.texi (Options specification): Restore entry of
25544         --enable-sjlj-exceptions.
25545
25546 2017-05-27  Michael Eager  <eager@eagercon.com>
25547
25548         Revert:
25549         2016-01-21  Ajit Agarwal  <ajitkum@xilinx.com>
25550
25551         See https://gcc.gnu.org/ml/gcc/2017-05/msg00221.html.
25552
25553         * config/microblaze/microblaze.h
25554         (FIXED_REGISTERS): Update in macro.
25555         (CALL_USED_REGISTERS): Update in macro.
25556
25557 2017-05-27  François-Xavier Coudett  <fxcoudert@gcc.gnu.org>
25558
25559         * doc/install.texi: Add links to macOS binary distributions.
25560
25561 2017-05-27  Jakub Jelinek  <jakub@redhat.com>
25562
25563         PR bootstrap/80887
25564         Revert:
25565         2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
25566
25567         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
25568
25569 2017-05-26  Martin Liska  <mliska@suse.cz>
25570
25571         * dumpfile.h (enum dump_kind): Renumber TDF_* flags to be contiguous.
25572
25573 2017-05-26  Martin Liska  <mliska@suse.cz>
25574
25575         * cfg.c (check_bb_profile): Do not use TDF_COMMENT and print
25576         always leading ';; '.
25577         (dump_bb_info): Likewise.
25578         (brief_dump_cfg): Likewise.
25579         * cfgrtl.c (print_rtl_with_bb): Do not use TDF_COMMENT.
25580         * dumpfile.c: Remove usage of TDF_VERBOSE.
25581         * dumpfile.h (enum dump_kind): Likewise.
25582         (dump_gimple_bb_header): Do not use TDF_COMMENT.
25583         * print-tree.c (debug_verbose): Remove.
25584         * tree-cfg.c (gimple_dump_cfg): Do not use TDF_COMMENT.
25585         (dump_function_to_file): Remove dumps guarded with TDF_VERBOSE.
25586         * tree-diagnostic.c (default_tree_printer): Replace
25587         TDF_DIAGNOSTIC with TDF_SLIM.
25588
25589 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
25590
25591         * tree-vect-loop-manip.c (create_intersect_range_checks_index): Pass
25592         in parameter loop, rather than loop_vinfo.
25593         (create_intersect_range_checks): Ditto.
25594         (vect_create_cond_for_alias_checks): Update call to above functions.
25595
25596 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
25597
25598         PR tree-optimization/80815
25599         * tree-data-ref.c (prune_runtime_alias_test_list): Simplify condition
25600         for merging runtime alias checks.  Handle negative DR_STEPs.
25601
25602 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
25603
25604         * tree-vect-data-refs.c (Operator==, comp_dr_with_seg_len_pair):
25605         Move from ...
25606         * tree-data-ref.c (Operator==, comp_dr_with_seg_len_pair): To here.
25607         * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Factor
25608         out code pruning runtime alias checks.
25609         * tree-data-ref.c (prune_runtime_alias_test_list): New function
25610         factored out from above.
25611         * tree-vectorizer.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
25612         Move from ...
25613         * tree-data-ref.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
25614         ... to here.
25615         (prune_runtime_alias_test_list): New decalaration.
25616
25617 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
25618
25619         * tree-vect-data-refs.c (compare_tree): Rename and move ...
25620         * tree-data-ref.c (data_ref_compare_tree): ... to here.
25621         * tree-data-ref.h (data_ref_compare_tree): New decalaration.
25622         * tree-vect-data-refs.c (dr_group_sort_cmp): Update uses.
25623         (operator==, comp_dr_with_seg_len_pair): Ditto.
25624         (vect_prune_runtime_alias_test_list): Ditto.
25625
25626 2017-05-26  Martin Liska  <mliska@suse.cz>
25627
25628         PR ipa/80663
25629         * params.def: Bound partial-inlining-entry-probability param.
25630
25631 2017-05-26  Marek Polacek  <polacek@redhat.com>
25632
25633         PR sanitizer/80875
25634         * fold-const.c (fold_binary_loc) <case MULT_EXPR>: Check if OP1
25635         can be negated.
25636
25637 2017-05-26  Richard Biener  <rguenther@suse.de>
25638
25639         PR tree-optimization/80842
25640         * tree-ssa-ccp.c (set_lattice_value): Always meet with the old
25641         value.
25642
25643 2017-05-26  Richard Biener  <rguenther@suse.de>
25644
25645         PR tree-optimization/80844
25646         * tree-vectorizer.c (adjust_simduid_builtins): Propagate results.
25647
25648 2017-05-25  Sebastian Peryt  <sebastian.peryt@intel.com>
25649
25650         * doc/md.texi (Machine Constraints): Update x86 family
25651         machine constraints section to match 'config/i386/constraints.md'.
25652
25653 2017-05-25  Volker Reichelt  <v.reichelt@netcologne.de>
25654
25655         * doc/invoke.texi (-Wcatch-value=): Document new warning option.
25656
25657 2017-05-25  Nathan Sidwell  <nathan@acm.org>
25658
25659         * doc/invoke.texi (--enable-languages): Update documentation.
25660
25661 2017-05-25  Martin Liska  <mliska@suse.cz>
25662
25663         * dumpfile.c: Add TDF_FOLDING.
25664         * dumpfile.h (enum dump_kind): Likewise.
25665         * genmatch.c (dt_simplify::gen_1): Use it.
25666
25667 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
25668
25669         * match.pd (view_convert (convert@0 @1)): Handle zero-extension.
25670
25671 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
25672
25673         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
25674         * tree.c (drop_tree_overflow): Handle COMPLEX_CST and VECTOR_CST.
25675
25676 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
25677
25678         * fold-const.c (fold_binary_loc) [(A & C) == D]: Remove transformation.
25679         * match.pd (X == C): Rewrite it here.
25680         (with_possible_nonzero_bits, with_possible_nonzero_bits2,
25681         with_certain_nonzero_bits2): New predicates.
25682         * tree-ssanames.c (get_nonzero_bits): Handle INTEGER_CST.
25683
25684 2017-05-24  Nathan Sidwell  <nathan@acm.org>
25685
25686         * lto-streamer-in.c (lto_input_data_block): Adjust T const cast to
25687         avoid warning.
25688
25689         * auto-profile.c (afdo_propagate): Adjust T const cast to avoid
25690         warning.
25691
25692 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
25693
25694         * config/powerpcspe: New port.  Files are copied from the rs6000
25695         port, with "rs6000" in filenames replaced by "powerpcspe".
25696
25697 2017-05-24  Wilco Dijkstra  <wdijkstr@arm.com>
25698
25699         PR rtl-optimization/80754
25700         * lra-remat.c (do_remat): Add overlap checks for dst_regno.
25701
25702 2017-05-24  Sheldon Lobo  <smlobo@sheldon.us.oracle.com>
25703
25704         * config/sparc/sparc.md (length): Return the correct value for -mflat
25705         sibcalls to match output_sibcall.
25706
25707 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
25708
25709         PR bootstrap/80860
25710         PR bootstrap/80843
25711         * config/rs6000/rs6000.c (struct machine_function): Add new field
25712         n_components.
25713         (rs6000_get_separate_components): Init that field, use it.
25714         (rs6000_components_for_bb): Use the field.
25715
25716 2017-05-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
25717
25718         * config/arm/arm.c (arm_expand_prologue): Fix typo in comment.
25719
25720 2017-05-24  Peter Bergner  <bergner@vnet.ibm.com>
25721
25722         PR middle-end/80823
25723         * tree-cfg.c (group_case_labels_stmt): Delete increment of "i";
25724
25725 2017-05-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25726
25727         PR target/80725
25728         * config/s390/s390.c (s390_check_qrst_address): Check incoming
25729         address against address_operand predicate.
25730         * config/s390/s390.md ("*indirect_jump"): Swap alternatives.
25731
25732 2017-05-24  Eric Botcazou  <ebotcazou@adacore.com>
25733
25734         * var-tracking.c (track_expr_p): Do not return 0 for tracked record
25735         parameters passed indirectly.
25736
25737 2017-05-23  Uros Bizjak  <ubizjak@gmail.com>
25738
25739         * config/i386/i386.md (*movdi_internal): Remove SSE4
25740         alternative 18 (?r, *v).  Update insn attributes.
25741         (*movsi_internal): Remove SSE4 alternative 13 (?r, *v).
25742         Update insn attributes.
25743         (*zero_extendsidi2): Remove SSE4 alternative (?r, *x).
25744         Update insn attributes.
25745         * config/i386/sse.md (vec_extract<ssevecmodelower>_0): Remove SSE4
25746         alternative 1 (r, v). Remove isa attribute.
25747         * config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
25748         Always move value through stack for !TARGET_INTER_UNIT_MOVES_TO_VEC
25749         and !TARGET_INTER_UNIT_MOVES_TO_VEC targets.
25750
25751 2017-05-23  Tom de Vries  <tom@codesourcery.com>
25752
25753         * doc/sourcebuild.texi (Directives, Verify compiler message): Document
25754         dg-line directive.
25755
25756 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
25757
25758         * cgraphunit.c (symbol_table::process_new_functions): Update.
25759         * ipa-fnsummary.c (pass_data_inline_parameters): Remove.
25760         (inline_generate_summary): Rename to ...
25761         (ipa_fn_summary_generate): ... this one.
25762         (inline_read_summary): Rename to ...
25763         (ipa_fn_summary_read): ... this one.
25764         (inline_write_summary): Rename to ...
25765         (ipa_fn_summary_write): ... this one.
25766         (inline_free_summary): Rename to ...
25767         (ipa_free_fn_summary): ... this one.
25768         (pass_data_local_fn_summary, pass_local_fn_summary,
25769         make_pass_local_fn_summary, pass_data_ipa_free_fn_summary,
25770         pass_ipa_free_fn_summary, make_pass_ipa_free_fn_summary,
25771         pass_data_ipa_fn_summary, pass_ipa_fn_summary,
25772         make_pass_ipa_fn_summary): New.
25773         * ipa-fnsummary.h (inline_generate_summary, inline_read_summary,
25774         inline_write_summary, inline_free_summary): Remove.
25775         (ipa_free_fn_summary) : New.
25776         * ipa-inline.c (ipa_inline): Update.
25777         (pass_ipa_inline): Do not generate summaries.
25778         * ipa.c (pass_data_ipa_free_fn_summary, pass_ipa_free_fn_summary):
25779         Remove.
25780         * passes.def: Replace pass_inline_parameters by pass_local_fn_summary
25781         and add pass_ipa_fn_summary.
25782         * tree-pass.h (make_pass_ipa_fn_summary, make_pass_local_fn_summary):
25783         New.
25784         (make_pass_inline_parameters): Remove.
25785
25786 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
25787
25788         * omp-low.c (struct omp_context): Remove "default_kind" member.
25789         Adjust all users.
25790
25791         * omp-offload.c (execute_oacc_device_lower): Remove the
25792         parallelism dimensions function attributes for unparallelized
25793         OpenACC kernels constructs.
25794
25795 2017-05-23  Martin Liska  <mliska@suse.cz>
25796
25797         * cgraph.c (cgraph_node::get_create): Use symtab_node::dump_{asm_,}name
25798         functions.
25799         (cgraph_edge::make_speculative): Likewise.
25800         (cgraph_edge::resolve_speculation): Likewise.
25801         (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
25802         (cgraph_node::dump): Likewise.
25803         * cgraph.h: Likewise.
25804         * cgraphunit.c (analyze_functions): Likewise.
25805         (symbol_table::compile): Likewise.
25806         * ipa-cp.c (print_all_lattices): Likewise.
25807         (determine_versionability): Likewise.
25808         (initialize_node_lattices): Likewise.
25809         (ipcp_verify_propagated_values): Likewise.
25810         (estimate_local_effects): Likewise.
25811         (update_profiling_info): Likewise.
25812         (create_specialized_node): Likewise.
25813         (perhaps_add_new_callers): Likewise.
25814         (decide_about_value): Likewise.
25815         (decide_whether_version_node): Likewise.
25816         (identify_dead_nodes): Likewise.
25817         (ipcp_store_bits_results): Likewise.
25818         * ipa-devirt.c (dump_targets): Likewise.
25819         (ipa_devirt): Likewise.
25820         * ipa-icf.c (sem_item::dump): Likewise.
25821         (sem_function::equals): Likewise.
25822         (sem_variable::equals): Likewise.
25823         (sem_item_optimizer::read_section): Likewise.
25824         (sem_item_optimizer::execute): Likewise.
25825         (congruence_class::dump): Likewise.
25826         * ipa-inline-analysis.c (dump_ipa_call_summary): Likewise.
25827         (dump_inline_summary): Likewise.
25828         (estimate_node_size_and_time): Likewise.
25829         (inline_analyze_function): Likewise.
25830         * ipa-inline-transform.c (inline_call): Likewise.
25831         * ipa-inline.c (report_inline_failed_reason): Likewise.
25832         (want_early_inline_function_p): Likewise.
25833         (edge_badness): Likewise.
25834         (update_edge_key): Likewise.
25835         (inline_small_functions): Likewise.
25836         * ipa-profile.c (ipa_profile): Likewise.
25837         * ipa-prop.c (ipa_print_node_jump_functions): Likewise.
25838         (ipa_make_edge_direct_to_target): Likewise.
25839         (remove_described_reference): Likewise.
25840         (ipa_impossible_devirt_target): Likewise.
25841         (propagate_controlled_uses): Likewise.
25842         (ipa_print_node_params): Likewise.
25843         (ipcp_transform_function): Likewise.
25844         * ipa-pure-const.c (pure_const_read_summary): Likewise.
25845         (propagate_pure_const): Likewise.
25846         * ipa-reference.c (generate_summary): Likewise.
25847         (read_write_all_from_decl): Likewise.
25848         (propagate): Likewise.
25849         (ipa_reference_read_optimization_summary): Likewise.
25850         * ipa-utils.c (ipa_merge_profiles): Likewise.
25851         * ipa.c (walk_polymorphic_call_targets): Likewise.
25852         (symbol_table::remove_unreachable_nodes): Likewise.
25853         (ipa_single_use): Likewise.
25854         * passes.c (execute_todo): Likewise.
25855         * predict.c (drop_profile): Likewise.
25856         * symtab.c (symtab_node::get_dump_name): New function.
25857         (symtab_node::dump_name): Likewise.
25858         (symtab_node::dump_asm_name): Likewise.
25859         (symtab_node::dump_references): Likewise.
25860         (symtab_node::dump_referring): Likewise.
25861         (symtab_node::dump_base): Likewise.
25862         (symtab_node::debug_symtab): Likewise.
25863         * tree-sra.c (convert_callers_for_node): Likewise.
25864         * tree-ssa-structalias.c (ipa_pta_execute): Likewise.
25865         * value-prof.c (init_node_map): Likewise.
25866
25867 2017-05-23  Martin Liska  <mliska@suse.cz>
25868
25869         * cgraph.h: Move symtab_node::dump_table to symbol_table::dump
25870         and symtab_node::debug_symtab to symbol_table::debug.
25871         * cgraphunit.c (analyze_functions): Use the renamed function.
25872         (symbol_table::compile): Likewise.
25873         * ipa-cp.c (ipcp_verify_propagated_values): Likewise.
25874         * ipa-icf.c (sem_item_optimizer::execute): Likewise.
25875         * passes.c (execute_todo): Likewise.
25876         * symtab.c (symbol_table::dump): New function.
25877         * tree-ssa-structalias.c (ipa_pta_execute): Use the renamed function.
25878
25879 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
25880
25881         * ipa-fnsummary.c (estimate_node_size_and_time): Do not sanity check
25882         that nonconst implies exec.
25883
25884 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
25885
25886         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
25887         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
25888         (inline_edge_summary_vec): Turn into ...
25889         (ipa_call_summaries): ... this one.
25890         (redirect_to_unreachable, edge_set_predicate,
25891         evaluate_properties_for_edge, inline_summary_alloc,
25892         reset_ipa_call_summary, reset_inline_summary,
25893         inline_summary_t::duplicate): Update.
25894         (inline_edge_duplication_hook): Turn to ...
25895         (ipa_call_summary_t::duplicate): ... this one.
25896         (inline_edge_removal_hook): Turn to ...
25897         (ipa_call_summary_t::remove): ... this one.
25898         (dump_inline_edge_summary): Turn to ...
25899         (dump_ipa_call_summary): ... this one.
25900         (estimate_function_body_sizes): Update.
25901         (inline_update_callee_summaries): Update.
25902         (remap_edge_change_prob): Update.
25903         (remap_edge_summaries): Update.
25904         (inline_merge_summary): Update.
25905         (do_estimate_edge_time): Update.
25906         (inline_generate_summary): Update.
25907         (inline_read_section): Update.
25908         (inline_read_summary): Update.
25909         (inline_free_summary): Update.
25910         * ipa-inline.c (can_inline_edge_p): Update.
25911         (compute_inlined_call_time): Update.
25912         (want_inline_small_function_p): Update.
25913         (edge_badness): Update.
25914         (early_inliner): Update.
25915         * ipa-inline.h (inline_edge_summary): Turn to ...
25916         (ipa_call_summary): ... this one.
25917         (ipa_call_summary_t): New class.
25918         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
25919         (ipa_call_summaries): New.
25920         (inline_edge_summary): Remove.
25921         (estimate_edge_growth): Update.
25922         * ipa-profile.c (ipa_propagate_frequency_1): Update.
25923         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
25924         * ipa-split.c (execute_split_functions): Update.
25925         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
25926
25927 2017-05-23  Tom de Vries  <tom@codesourcery.com>
25928
25929         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
25930         attributes): Document rdrand effective target.
25931
25932 2017-05-23  Tom de Vries  <tom@codesourcery.com>
25933
25934         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
25935         attributes): Sort alphabetically.
25936
25937 2017-05-23  Georg-Johann Lay  <avr@gjlay.de>
25938
25939         * config/avr/genmultilib.awk: Use gsub instead of gensub.
25940
25941 2017-05-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
25942
25943         PR target/80718
25944         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Split
25945         V2DF/V2DI splat into two separate patterns, one that handles
25946         registers, and the other that only handles memory.  Drop support
25947         for splatting from a GPR on ISA 2.07 and then splitting the
25948         splat into direct move and splat.
25949         (vsx_splat_<mode>_reg): Likewise.
25950         (vsx_splat_<mode>_mem): Likewise.
25951
25952 2017-05-22  Segher Boessenkool  <segher@kernel.crashing.org>
25953
25954         * cfgcleanup.c (bb_is_just_return): Allow CLOBBERs.
25955
25956 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
25957
25958         PR middle-end/80809
25959         * omp-low.c (finish_taskreg_remap): New function.
25960         (finish_taskreg_scan): If unit size of ctx->record_type
25961         is non-constant, unshare the size expression and replace
25962         decls in it with possible outer var refs.
25963
25964         PR middle-end/80809
25965         * gimplify.c (omp_add_variable): For GOVD_DEBUG_PRIVATE use
25966         GOVD_SHARED rather than GOVD_PRIVATE with it.
25967         (gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Expect
25968         GOVD_SHARED rather than GOVD_PRIVATE with GOVD_DEBUG_PRIVATE.
25969
25970         PR middle-end/80853
25971         * omp-low.c (lower_reduction_clauses): Pass OMP_CLAUSE_PRIVATE
25972         as last argument to build_outer_var_ref for pointer bases of array
25973         section reductions.
25974
25975 2017-05-19  Martin Sebor  <msebor@redhat.com>
25976
25977         * print-tree.c (print_node): Print DECL_READ_P flag.
25978
25979 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
25980
25981         * Makefile.in: Add ipa-fnsummary.o and ipa-fnsummary.h
25982         * auto-profile.c: Replace ipa-inline.h by ipa-fnsummary.h
25983         * cgraph.c: Likewise.
25984         * cgraphunit.c: Likewise.
25985         * gengtype.c: Likewise.
25986         * ipa-cp.c: Likewise.
25987         * ipa-devirt.c: Likewise.
25988         * ipa-icf.c: Likewise.
25989         * ipa-predicate.c: Likewise.
25990         * ipa-profile.c: Likewise.
25991         * ipa-prop.c: Likewise.
25992         * ipa-split.c: Likewise.
25993         * ipa.c: Likewise.
25994         * ipa-inline-analysis.c (inline_summaries, ipa_call_summaries,
25995         edge_predicate_pool, dump_inline_hints,
25996         inline_summary::account_size_time, redirect_to_unreachable,
25997         edge_set_predicate, set_hint_predicate,
25998         evaluate_conditions_for_known_args, evaluate_properties_for_edge,
25999         inline_summary_alloc, ipa_call_summary::reset, inline_summary::reset,
26000         inline_summary_t::remove, remap_hint_predicate_after_duplication,
26001         inline_summary_t::duplicate, ipa_call_summary_t::duplicate,
26002         ipa_call_summary_t::remove, initialize_growth_caches,
26003         free_growth_caches, dump_ipa_call_summary, dump_inline_summary,
26004         debug_inline_summary, dump_inline_summaries, initialize_inline_failed,
26005         mark_modified, unmodified_parm_1, unmodified_parm,
26006         unmodified_parm_or_parm_agg_item, eliminated_by_inlining_prob,
26007         set_cond_stmt_execution_predicate, set_switch_stmt_execution_predicate,
26008         compute_bb_predicates, will_be_nonconstant_expr_predicate,
26009         will_be_nonconstant_predicate, record_modified_bb_info,
26010         get_minimal_bb, record_modified, param_change_prob,
26011         phi_result_unknown_predicate, predicate_for_phi_result,
26012         array_index_predicate, clobber_only_eh_bb_p, fp_expression_p,
26013         estimate_function_body_sizes, compute_inline_parameters,
26014         compute_inline_parameters_for_curren, pass_data_inline_parameters,
26015         estimate_node_size_and_time, estimate_ipcp_clone_size_and_time,
26016         inline_update_callee_summaries, remap_edge_change_prob,
26017         remap_edge_summaries, remap_hint_predicate, inline_merge_summary,
26018         inline_update_overall_summary, inline_indirect_intraprocedural_analysis,
26019         inline_analyze_function, inline_summary_t::insert,
26020         inline_generate_summary, read_ipa_call_summary, inline_read_section,
26021         inline_read_summary, write_ipa_call_summary, inline_write_summary,
26022         inline_free_summary): Move to ipa-fnsummary.h
26023         (predicate_t): Remove.
26024         * ipa-fnsummary.c: New file.
26025         * ipa-inline.h:  Do not include sreal.h and ipa-predicate.h
26026         (enum inline_hints_vals, inline_hints, agg_position_info,
26027         INLINE_SIZE_SCALE, size_time_entry, inline_summary, inline_summary_t,
26028         inline_summaries, ipa_call_summary, ipa_call_summary_t,
26029         ipa_call_summaries, debug_inline_summary, dump_inline_summaries,
26030         dump_inline_summary, dump_inline_hints, inline_generate_summary,
26031         inline_read_summary, inline_write_summary, inline_free_summary,
26032         inline_analyze_function, initialize_inline_failed,
26033         inline_merge_summary, inline_update_overall_summary,
26034         compute_inline_parameters): Move to ipa-fnsummary.h
26035         * ipa-fnsummary.h: New file.
26036         * ipa-inline-transform.h: Include ipa-inline.h.
26037         * ipa-inline.c: LIkewise.
26038
26039 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
26040
26041         * ipa-inline.c (edge_badness): Use inlined_time instead of
26042         inline_summaries->get.
26043
26044 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
26045
26046         * ipa-inline.c (edge_badness): Use estimate_size_after_inlining.
26047
26048 2017-05-22  Nathan Sidwell  <nathan@acm.org>
26049
26050         * doc/invoke.texi (fdump-translation-unit): Delete documentation.
26051         (fdump-lang): Document 'raw' option.
26052         * dumpfile.h (TDI_tu): Delete.
26053         * dumpfile.c (dump_files): Remove translation-unit.
26054         (FIRST_AUTO_NUMBERED_DUMP): Decrement.
26055
26056 2017-05-22  Georg-Johann Lay  <avr@gjlay.de>
26057
26058         * config/avr/t-avr (AWK) [t-multilib]: Remove "-v FORMAT=Makefile"
26059         command option from $(AWK) call.
26060         * config/avr/genmultilib.awk: Simplify and rewrite so that it
26061         generates MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS.
26062         [FORMAT]: Remove handling of variable.
26063         * config/avr/t-multilib: Regenerate.
26064
26065 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
26066
26067         * ipa-inline-analysis.c (inline_summary::reset): Do not reset
26068         self_time.
26069         (dump_inline_summary): Do not print self_time.
26070         (estimate_function_body_sizes): Do not set self_time.
26071         (compute_inline_parameters): Likewise.
26072         (inline_read_section, inline_write_summary): Do not stream self_time.
26073         * ipa-inline.h (inline_summary): Drop self_time.
26074
26075 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
26076
26077         * ipa-inline-analysis.c (account_size_time): Rename to ...
26078         (inline_summary::account_size_time): ... this one.
26079         (reset_ipa_call_summary): Turn to ...
26080         (ipa_call_summary::reset): ... this one.
26081         (reset_inline_summary): Turn to ...
26082         (inline_summary::reset): ... this one.
26083         (inline_summary_t::remove): Update.
26084         (inline_summary_t::duplicate): Update.
26085         (ipa_call_summary_t::remove): Update.
26086         (dump_inline_summary): Update.
26087         (estimate_function_body_sizes): Update.
26088         (compute_inline_parameters): Update.
26089         (estimate_node_size_and_time): Update.
26090         (inline_merge_summary): Update.
26091         (inline_update_overall_summary): Update.
26092         (inline_read_section): Update.
26093         (inline_write_summary): Update.
26094         * ipa-inline.h (inline_summary): Rename entry to size_time_table;
26095         add account_size_time and reset member functions.
26096         (ipa_call_summary): Add reset function.
26097         * ipa-predicate.h (predicate::operator &): Constify.
26098
26099 2017-05-22  Richard Biener  <rguenther@suse.de>
26100
26101         * df-scan.c (df_insn_refs_verify): Speedup when not verifying.
26102
26103 2017-05-19  Jason Merrill  <jason@redhat.com>
26104
26105         * tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t.
26106
26107 2017-05-19  Marek Polacek  <polacek@redhat.com>
26108
26109         PR sanitizer/80800
26110         * fold-const.c (extract_muldiv_1) <case TRUNC_DIV_EXPR>: Add
26111         TYPE_OVERFLOW_WRAPS checks.
26112
26113 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
26114
26115         * tree-core.h (enum omp_clause_default_kind): Add
26116         "OMP_CLAUSE_DEFAULT_PRESENT".
26117         * tree-pretty-print.c (dump_omp_clause): Handle it.
26118         * gimplify.c (enum gimplify_omp_var_data): Add
26119         "GOVD_MAP_FORCE_PRESENT".
26120         (gimplify_adjust_omp_clauses_1): Map it to
26121         "GOMP_MAP_FORCE_PRESENT".
26122         (oacc_default_clause): Handle "OMP_CLAUSE_DEFAULT_PRESENT".
26123
26124         * gimplify.c (oacc_default_clause): Clarify.
26125
26126 2017-05-19  Nathan Sidwell  <nathan@acm.org>
26127
26128         LANG_HOOK_REGISTER_DUMPS
26129         * toplev.c (general_init): Call register dump lang hook.
26130         * doc/invoke.texi: Document -fdump-lang option family.
26131         * dumpfile.c (dump_files): Remove class dump here.
26132         (FIRST_AUTO_NUMBERED_DUMP): Adjust.
26133         * dumpfile.h (tree_dump_index): Remove TDI_class.
26134         * langhooks-def.h (lhd_register_dumps): Declare.
26135         (LANG_HOOKS_REGISTER_DUMPS): Define.
26136         (LANG_HOOKS_INITIALIZER): Add it.
26137         * langhooks.c (lhd_register_dumps): Define.
26138         * langhooks.h (struct lang_hooks): Add register_dumps.
26139
26140 2017-05-19  Nathan Sidwell  <nathan@acm.org>
26141
26142         * context.h (context::set_passes): New.
26143         * context.c (context::context): Do not create pass manager.
26144         * toplev.c (general_init): Create pass manager here.
26145
26146 2017-05-19  Segher Boessenkool  <segher@kernel.crashing.org>
26147
26148         * config/rs6000/rs6000.md (splitter to load of -1 and mask): Don't
26149         use this splitter if two add or or instructions would also work for
26150         the constant we want to generate.
26151
26152 2017-05-19  Richard Biener  <rguenther@suse.de>
26153
26154         PR build/80821
26155         * genmatch.c (dt_node::gen_kids_1): Add missing scope around
26156         predicate evaluation.
26157
26158 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
26159
26160         * ipa-inline.h (ipa_call_summary): Turn sizes into signed;
26161         add ctor.
26162         * ipa-inline.c (want_inline_small_function_p): Do not cast to
26163         unsigned.
26164
26165 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
26166
26167         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
26168         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
26169         (inline_edge_summary_vec): Turn into ...
26170         (ipa_call_summaries): ... this one.
26171         (redirect_to_unreachable, edge_set_predicate,
26172         evaluate_properties_for_edge, inline_summary_alloc,
26173         reset_ipa_call_summary, reset_inline_summary,
26174         inline_summary_t::duplicate): Update.
26175         (inline_edge_duplication_hook): Turn to ...
26176         (ipa_call_summary_t::duplicate): ... this one.
26177         (inline_edge_removal_hook): Turn to ...
26178         (ipa_call_summary_t::remove): ... this one.
26179         (dump_inline_edge_summary): Turn to ...
26180         (dump_ipa_call_summary): ... this one.
26181         (estimate_function_body_sizes): Update.
26182         (inline_update_callee_summaries): Update.
26183         (remap_edge_change_prob): Update.
26184         (remap_edge_summaries): Update.
26185         (inline_merge_summary): Update.
26186         (do_estimate_edge_time): Update.
26187         (inline_generate_summary): Update.
26188         (inline_read_section): Update.
26189         (inline_read_summary): Update.
26190         (inline_free_summary): Update.
26191         * ipa-inline.c (can_inline_edge_p): Update.
26192         (compute_inlined_call_time): Update.
26193         (want_inline_small_function_p): Update.
26194         (edge_badness): Update.
26195         (early_inliner): Update.
26196         * ipa-inline.h (inline_edge_summary): Turn to ...
26197         (ipa_call_summary): ... this one.
26198         (ipa_call_summary_t): New class.
26199         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
26200         (ipa_call_summaries): New.
26201         (inline_edge_summary): Remove.
26202         (estimate_edge_growth): Update.
26203         * ipa-profile.c (ipa_propagate_frequency_1): Update.
26204         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
26205         * ipa-split.c (execute_split_functions): Update.
26206         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
26207
26208 2017-05-19  Richard Biener  <rguenther@suse.de>
26209
26210         PR middle-end/80764
26211         * cfgexpand.c (expand_gimple_cond): Fix loop fixup.
26212
26213 2017-05-18  Segher Boessenkool  <segher@kernel.crashing.org>
26214
26215         * config/rs6000/rs6000.c (struct machine_function): Add field
26216         fpr_is_wrapped_separately.
26217         (rs6000_get_separate_components): Use 64 components.  Handle the
26218         new FPR components.
26219         (rs6000_components_for_bb): Handle the FPR components.
26220         (rs6000_emit_prologue_components): Handle the FPR components.
26221         (rs6000_emit_epilogue_components): Handle the FPR components.
26222         (rs6000_set_handled_components): Handle the FPR components.
26223         (rs6000_emit_prologue): Don't output prologue code for those FPRs
26224         that are already separately shrink-wrapped.
26225         (rs6000_emit_epilogue): Don't output epilogue code for those FPRs
26226         that are already separately shrink-wrapped.
26227
26228 2017-05-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
26229
26230         PR target/80510
26231         * config/rs6000/predicates.md (simple_offsettable_mem_operand):
26232         New predicate.
26233
26234         * config/rs6000/rs6000.md (ALTIVEC_DFORM): New iterator.
26235         (define_peephole2 for Altivec d-form load): Add peepholes to catch
26236         cases where the register allocator uses a move and an offsettable
26237         memory operation to/from a FPR register on ISA 2.06/2.07.
26238         (define_peephole2 for Altivec d-form store): Likewise.
26239
26240 2017-05-18  Uros Bizjak  <ubizjak@gmail.com>
26241
26242         PR target/80799
26243         * config/i386/mmx.md (*mov<mode>_internal): Enable
26244         alternatives 11, 12, 13 and 14 also for 32bit targets.
26245         Remove alternatives 15, 16, 17 and 18.
26246         * config/i386/sse.md (vec_concatv2di): Change
26247         alternative (!x, *y) to (x, ?!*Yn).
26248
26249 2017-05-18  Paolo Carlini  <paolo.carlini@oracle.com>
26250
26251         * dumpfile.h (enum dump_kind): Remove stray comma.
26252
26253 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
26254
26255         * Makefile.in: Add ipa-predicate.o and ipa-predicate.h
26256         * ipa-inline-analysis.c (NUM_CONDITIONS): turn into
26257         predicate::num_conditions
26258         (IS_NOT_CONSTANT): turn into predicate::is_not_constant.
26259         (CHANGED): turn into predicate::changed.
26260         (agg_position_info): Move to ipa-predicate.h
26261         (add_condition, predicate::add_clause, predicate::operator &=,
26262         predicate::or_with, predicate::evaluate, predicate::probability,
26263         dump_condition, dump_clause, predicate::dump,
26264         predicate::remap_after_duplication, predicate::remap_after_inlining,
26265         predicate::stream_in, predicate::stream_out): Move to ipa-predicate.c
26266         (evaluate_conditions_for_known_args): Update.
26267         (set_cond_stmt_execution_predicate): Update.
26268         * ipa-inline.h: Include ipa-predicate.h
26269         (condition, inline_param_summary, conditions, agg_position_info,
26270         predicate): Move to ipa-predicate.h
26271         * ipa-predicate.c: New file.
26272         * ipa-predicate.h: New file.
26273
26274 2017-05-18  Wilco Dijkstra  <wdijkstr@arm.com>
26275
26276         * final.c (leaf_function_p): Check we are not in a sequence.
26277
26278 2017-05-18  Martin Liska  <mliska@suse.cz>
26279
26280         * cfgrtl.c (rtl_verify_edges): Remove usage of TDF_RTL.
26281         * dumpfile.c (dump_register): Use new enum dump_kind.
26282         (get_dump_file_name): Likewise.
26283         (dump_enable_all): Likewise.
26284         (dump_switch_p_1): Likewise.
26285         (enable_rtl_dump_file): Remove usage of TDF_RTL.
26286         * dumpfile.h (enum dump_kind): New enum type.
26287         (struct dump_file_info): Create constructor and
26288         format fields and comments.
26289         * passes.c (pass_manager::register_one_dump_file):
26290         Use num dump_kind.
26291         * statistics.c (statistics_early_init): Likewise.
26292         * tree-ssa-loop-prefetch.c (dump_mem_details): Replace
26293         TDF_TREE with TDF_SLIM.
26294         (gather_memory_references_ref): Likewise.
26295
26296 2017-05-18  Martin Liska  <mliska@suse.cz>
26297
26298         * vec.h (struct vnull): Use it.
26299
26300 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
26301
26302         * ipa-inline-analysis.c (predicate_conditions): Move to ipa-inline.h
26303         (true_predicate, false_predicate, true_predicate_p,
26304         false_predicate_p): Remove.
26305         (single_cond_predicate, not_inlined_predicate): Turn to member function
26306         in ipa-inline.h
26307         (add_condition): Update.
26308         (add_clause): Turn to...
26309         (predicate::add_clause): ... this one; update; allow passing NULL
26310         as parameter.
26311         (and_predicates): Turn to ...
26312         (predicate::operator &=): ... this one.
26313         (predicates_equal_p): Move to predicate::operator == in ipa-inline.h
26314         (or_predicates): Turn to ...
26315         (predicate::or_with): ... this one.
26316         (evaluate_predicate): Turn to ...
26317         (predicate::evaluate): ... this one.
26318         (predicate_probability): Turn to ...
26319         (predicate::probability): ... this one.
26320         (dump_condition): Update.
26321         (dump_predicate): Turn to ...
26322         (predicate::dump): ... this one.
26323         (account_size_time): Update.
26324         (edge_set_predicate): Update.
26325         (set_hint_predicate): UPdate.
26326         (evaluate_conditions_for_known_args): Update.
26327         (evaluate_properties_for_edge): Update.
26328         (remap_predicate_after_duplication): Turn to...
26329         (predicate::remap_after_duplication): ... this one.
26330         (remap_hint_predicate_after_duplication): Update.
26331         (inline_summary_t::duplicate): UPdate.
26332         (dump_inline_edge_summary): Update.
26333         (dump_inline_summary): Update.
26334         (set_cond_stmt_execution_predicate): Update.
26335         (set_switch_stmt_execution_predicate): Update.
26336         (compute_bb_predicates): Update.
26337         (will_be_nonconstant_expr_predicate): Update.
26338         (will_be_nonconstant_predicate): Update.
26339         (phi_result_unknown_predicate): Update.
26340         (predicate_for_phi_result): Update.
26341         (array_index_predicate): Update.
26342         (estimate_function_body_sizes): Update.
26343         (estimate_node_size_and_time): Update.
26344         (estimate_ipcp_clone_size_and_time): Update.
26345         (remap_predicate): Rename to ...
26346         (predicate::remap_after_inlining): ... this one.
26347         (remap_hint_predicate): Update.
26348         (inline_merge_summary): Update.
26349         (inline_update_overall_summary): Update.
26350         (estimate_size_after_inlining): Update.
26351         (read_predicate): Rename to ...
26352         (predicate::stream_in): ... this one.
26353         (read_inline_edge_summary): Update.
26354         (write_predicate): Rename to ...
26355         (predicate::stream_out): ... this one.
26356         (write_inline_edge_summary): Update.
26357         * ipa-inline.h (MAX_CLAUSES): Turn to predicate::max_clauses.
26358         (clause_t): Turn to uint32_t
26359         (predicate): Turn to class; implement constructor and operators
26360         ==, !=, &
26361         (size_time_entry): Update.
26362         (inline_summary): Update.
26363         (inline_edge_summary): Update.
26364
26365 2017-05-18  Marc Glisse  <marc.glisse@inria.fr>
26366
26367         * fold-const.c (fold_binary_loc): Move transformation...
26368         * match.pd (C - X CMP X): ... here.
26369
26370 2017-05-18  Sheldon Lobo  <sheldon.lobo@oracle.com>
26371
26372         * config/sparc/sparc.c (sparc_option_override): Set function
26373         alignment for -mcpu=niagara7 to 64 to match the I$ line.
26374         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
26375         latency to 1.
26376         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC T4 branch
26377         latency to 2.
26378         * config/sparc/sol2.h: Fix a ASM_CPU32_DEFAULT_SPEC typo.
26379
26380 2017-05-18  Marek Polacek  <polacek@redhat.com>
26381
26382         PR sanitizer/80797
26383         * ubsan.c (instrument_null): Unwrap ADDR_EXPRs.
26384         (pass_ubsan::execute): Call gimple_assign_single_p instead of
26385         gimple_assign_load_p.
26386
26387 2017-05-17  Segher Boessenkool  <segher@kernel.crashing.org>
26388
26389         PR middle-end/80692
26390         * real.c (do_compare): Give decimal_do_compare preference over
26391         comparing just the signs.
26392
26393 2017-05-17  Uros Bizjak  <ubizjak@gmail.com>
26394
26395         * doc/md.texi (Canonicalization of Instructions): Describe the
26396         canonical form of instructions that inherently set a condition
26397         code register.
26398
26399 2017-05-17  Peter Bergner  <bergner@vnet.ibm.com>
26400
26401         PR middle-end/80775
26402         * tree-cfg.c: Move deletion of unreachable case statements to after
26403         the merging of consecutive case labels.
26404
26405 2017-05-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
26406
26407         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Refer
26408         readers to __gnu_cmse_nonsecure_call libcall for saving, clearing and
26409         restoring of callee-saved registers.
26410
26411 2017-05-17  Eric Botcazou  <ebotcazou@adacore.com>
26412
26413         * compare-elim.c (equivalent_reg_at_start): Adjust outdated comment.
26414         * config/visium/visium.c (single_set_and_flags): Likewise.
26415         * config/visium/visium.md (Substitutions): Likewise.
26416
26417 2017-05-17  Martin Liska  <mliska@suse.cz>
26418
26419         * cfg.c: Introduce dump_flags_t type and
26420         use it instead of int type.
26421         * cfg.h: Likewise.
26422         * cfghooks.c: Likewise.
26423         * cfghooks.h (struct cfg_hooks): Likewise.
26424         * cfgrtl.c: Likewise.
26425         * cfgrtl.h: Likewise.
26426         * cgraph.c (cgraph_node::get_body): Likewise.
26427         * coretypes.h: Likewise.
26428         * domwalk.c: Likewise.
26429         * domwalk.h: Likewise.
26430         * dumpfile.c (struct dump_option_value_info): Likewise.
26431         (dump_enable_all): Likewise.
26432         (dump_switch_p_1): Likewise.
26433         (opt_info_switch_p): Likewise.
26434         * dumpfile.h (enum tree_dump_index): Likewise.
26435         (struct dump_file_info): Likewise.
26436         * genemit.c: Likewise.
26437         * generic-match-head.c: Likewise.
26438         * gengtype.c (open_base_files): Likewise.
26439         * gimple-pretty-print.c: Likewise.
26440         * gimple-pretty-print.h: Likewise.
26441         * graph.c (print_graph_cfg): Likewise.
26442         * graphite-scop-detection.c (dot_all_sese): Likewise.
26443         * ipa-devirt.c (build_type_inheritance_graph): Likewise.
26444         * loop-unroll.c (report_unroll): Likewise.
26445         * passes.c (pass_manager::register_one_dump_file): Likewise.
26446         * print-tree.c: Likewise.
26447         * statistics.c: Likewise.
26448         * tree-cfg.c: Likewise.
26449         * tree-cfg.h: Likewise.
26450         * tree-dfa.c: Likewise.
26451         * tree-dfa.h: Likewise.
26452         * tree-dump.c (dump_function): Likewise.
26453         * tree-dump.h (struct dump_info): Likewise.
26454         * tree-pretty-print.c: Likewise.
26455         * tree-pretty-print.h: Likewise.
26456         * tree-ssa-live.c: Likewise.
26457         * tree-ssa-live.h: Likewise.
26458         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
26459         * tree-vect-loop.c: Likewise.
26460         * tree-vect-slp.c: Likewise.
26461
26462 2017-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
26463             Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26464
26465         PR tree-optimization/80457
26466         * tree-vect-stmts.c (vect_model_simple_cost): Model the cost
26467         of all arguments to a statement as scalar_to_vec operations.
26468         (vectorizable_call): Adjust call to vect_model_simple_cost for
26469         new parameter.
26470         (vectorizable_conversion): Likewise.
26471         (vectorizable_assignment): Likewise.
26472         (vectorizable_shift): Likewise.
26473         (vectorizable_operation): Likewise.
26474         (vectorizable_comparison): Likewise.
26475         (vect_is_simple_cond): Record the def types for operands.
26476         (vectorizable_condition): Likewise, call vect_model_simple_cost.
26477         * tree-vectorizer.h (vect_model_simple_cost): Add new parameter
26478         for statement argument count.
26479
26480 2017-05-16  Carl Love  <cel@us.ibm.com>
26481
26482         * config/rs6000/rs6000-c: Add support for built-in functions
26483         vector unsigned long long vec_bperm (vector unsigned long long,
26484                                              vector unsigned char)
26485         vector signed long long vec_mule (vector signed int,
26486                                           vector signed int)
26487         vector unsigned long long vec_mule (vector unsigned int,
26488                                             vector unsigned int)
26489         vector signed long long vec_mulo (vector signed int,
26490                                           vector signed int)
26491         vector unsigned long long vec_mulo (vector unsigned int,
26492                                             vector unsigned int)
26493         vector signed char vec_sldw (vector signed char,
26494                                      vector signed char,
26495                                      const int)
26496         vector unsigned char vec_sldw (vector unsigned char,
26497                                        vector unsigned char,
26498                                        const int)
26499         vector signed short vec_sldw (vector signed short,
26500                                       vector signed short,
26501                                       const int)
26502         vector unsigned short vec_sldw (vector unsigned short,
26503                                         vector unsigned short,
26504                                         const int)
26505         vector signed int vec_sldw (vector signed int,
26506                                     vector signed int,
26507                                     const int)
26508         vector unsigned int vec_sldw (vector unsigned int,
26509                                       vector unsigned int,
26510                                       const int)
26511         vector signed long long vec_sldw (vector signed long long,
26512                                           vector signed long long,
26513                                           const int)
26514         vector unsigned long long vec_sldw (vector unsigned long long,
26515                                             vector unsigned long long,
26516                                             const int)
26517         * config/rs6000/rs6000-c: Add support for built-in functions
26518         * config/rs6000/rs6000-builtin.def: Add definition for SLDW.
26519         * config/rs6000/altivec.h: Add defintion for vec_sldw.
26520         * doc/extend.texi: Update the built-in documentation for the
26521         new built-in functions.
26522
26523 2017-05-16  Marek Polacek  <polacek@redhat.com>
26524
26525         PR sanitizer/80536
26526         PR sanitizer/80386
26527         * tree.c (save_expr): Don't fold the expression.
26528
26529 2017-05-16  Uros Bizjak  <ubizjak@gmail.com>
26530
26531         * config/i386/i386.md (*movsi_internal): Split (?rm,*y) alternative
26532         to (?r,*Yn) and (?m,*y) alternatives, and (?*y,rm) to (?*Ym,r)
26533         and (?*y,m).  Update insn attributes.
26534
26535 2017-05-16  Martin Liska  <mliska@suse.cz>
26536
26537         * cgraph.c (cgraph_edge::resolve_speculation): Add default value for
26538         flags argument of print_gimple_stmt, print_gimple_expr,
26539         print_generic_stmt and print_generic_expr.
26540         * cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
26541         * coretypes.h: Likewise.
26542         * except.c (dump_eh_tree): Likewise.
26543         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
26544         * gimple-pretty-print.h: Likewise.
26545         * gimple-ssa-backprop.c (dump_usage_prefix): Likewise.
26546         (backprop::push_to_worklist): Likewise.
26547         (backprop::pop_from_worklist): Likewise.
26548         (backprop::process_use): Likewise.
26549         (backprop::intersect_uses): Likewise.
26550         (note_replacement): Likewise.
26551         * gimple-ssa-store-merging.c
26552         (pass_store_merging::terminate_all_aliasing_chains): Likewise.
26553         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
26554         (pass_store_merging::execute): Likewise.
26555         * gimple-ssa-strength-reduction.c (dump_candidate): Likewise.
26556         (ssa_base_cand_dump_callback): Likewise.
26557         (dump_incr_vec): Likewise.
26558         (replace_refs): Likewise.
26559         (replace_mult_candidate): Likewise.
26560         (create_add_on_incoming_edge): Likewise.
26561         (create_phi_basis): Likewise.
26562         (insert_initializers): Likewise.
26563         (all_phi_incrs_profitable): Likewise.
26564         (introduce_cast_before_cand): Likewise.
26565         (replace_one_candidate): Likewise.
26566         * gimplify.c (gimplify_expr): Likewise.
26567         * graphite-isl-ast-to-gimple.c (is_valid_rename): Likewise.
26568         (set_rename): Likewise.
26569         (rename_uses): Likewise.
26570         (copy_loop_phi_nodes): Likewise.
26571         (add_close_phis_to_merge_points): Likewise.
26572         (copy_loop_close_phi_args): Likewise.
26573         (copy_cond_phi_args): Likewise.
26574         (graphite_copy_stmts_from_block): Likewise.
26575         (translate_pending_phi_nodes): Likewise.
26576         * graphite-poly.c (print_pdr): Likewise.
26577         (dump_gbb_cases): Likewise.
26578         (dump_gbb_conditions): Likewise.
26579         (print_scop_params): Likewise.
26580         * graphite-scop-detection.c (build_cross_bb_scalars_def): Likewise.
26581         (build_cross_bb_scalars_use): Likewise.
26582         (gather_bbs::before_dom_children): Likewise.
26583         * hsa-dump.c (dump_hsa_immed): Likewise.
26584         * ipa-cp.c (print_ipcp_constant_value): Likewise.
26585         (get_replacement_map): Likewise.
26586         * ipa-inline-analysis.c (dump_condition): Likewise.
26587         (estimate_function_body_sizes): Likewise.
26588         * ipa-polymorphic-call.c (check_stmt_for_type_change): Likewise.
26589         (ipa_polymorphic_call_context::get_dynamic_type): Likewise.
26590         * ipa-prop.c (ipa_dump_param): Likewise.
26591         (ipa_print_node_jump_functions_for_edge): Likewise.
26592         (ipa_modify_call_arguments): Likewise.
26593         (ipa_modify_expr): Likewise.
26594         (ipa_dump_param_adjustments): Likewise.
26595         (ipa_dump_agg_replacement_values): Likewise.
26596         (ipcp_modif_dom_walker::before_dom_children): Likewise.
26597         * ipa-pure-const.c (check_stmt): Likewise.
26598         (pass_nothrow::execute): Likewise.
26599         * ipa-split.c (execute_split_functions): Likewise.
26600         * omp-offload.c (dump_oacc_loop_part): Likewise.
26601         (dump_oacc_loop): Likewise.
26602         * trans-mem.c (tm_log_emit): Likewise.
26603         (tm_memopt_accumulate_memops): Likewise.
26604         (dump_tm_memopt_set): Likewise.
26605         (dump_tm_memopt_transform): Likewise.
26606         * tree-cfg.c (gimple_verify_flow_info): Likewise.
26607         (print_loop): Likewise.
26608         * tree-chkp-opt.c (chkp_print_addr): Likewise.
26609         (chkp_gather_checks_info): Likewise.
26610         (chkp_get_check_result): Likewise.
26611         (chkp_remove_check_if_pass): Likewise.
26612         (chkp_use_outer_bounds_if_possible): Likewise.
26613         (chkp_reduce_bounds_lifetime): Likewise.
26614         * tree-chkp.c (chkp_register_addr_bounds): Likewise.
26615         (chkp_mark_completed_bounds): Likewise.
26616         (chkp_register_incomplete_bounds): Likewise.
26617         (chkp_mark_invalid_bounds): Likewise.
26618         (chkp_maybe_copy_and_register_bounds): Likewise.
26619         (chkp_build_returned_bound): Likewise.
26620         (chkp_get_bound_for_parm): Likewise.
26621         (chkp_build_bndldx): Likewise.
26622         (chkp_get_bounds_by_definition): Likewise.
26623         (chkp_generate_extern_var_bounds): Likewise.
26624         (chkp_get_bounds_for_decl_addr): Likewise.
26625         * tree-chrec.c (chrec_apply): Likewise.
26626         * tree-data-ref.c (dump_data_reference): Likewise.
26627         (dump_subscript): Likewise.
26628         (dump_data_dependence_relation): Likewise.
26629         (analyze_overlapping_iterations): Likewise.
26630         * tree-inline.c (expand_call_inline): Likewise.
26631         (tree_function_versioning): Likewise.
26632         * tree-into-ssa.c (dump_defs_stack): Likewise.
26633         (dump_currdefs): Likewise.
26634         (dump_names_replaced_by): Likewise.
26635         (dump_update_ssa): Likewise.
26636         (update_ssa): Likewise.
26637         * tree-object-size.c (pass_object_sizes::execute): Likewise.
26638         * tree-parloops.c (build_new_reduction): Likewise.
26639         (try_create_reduction_list): Likewise.
26640         (ref_conflicts_with_region): Likewise.
26641         (oacc_entry_exit_ok_1): Likewise.
26642         (oacc_entry_exit_single_gang): Likewise.
26643         * tree-pretty-print.h: Likewise.
26644         * tree-scalar-evolution.c (set_scalar_evolution): Likewise.
26645         (get_scalar_evolution): Likewise.
26646         (add_to_evolution): Likewise.
26647         (get_loop_exit_condition): Likewise.
26648         (analyze_evolution_in_loop): Likewise.
26649         (analyze_initial_condition): Likewise.
26650         (analyze_scalar_evolution): Likewise.
26651         (instantiate_scev): Likewise.
26652         (number_of_latch_executions): Likewise.
26653         (gather_chrec_stats): Likewise.
26654         (final_value_replacement_loop): Likewise.
26655         (scev_const_prop): Likewise.
26656         * tree-sra.c (dump_access): Likewise.
26657         (disqualify_candidate): Likewise.
26658         (create_access): Likewise.
26659         (reject): Likewise.
26660         (maybe_add_sra_candidate): Likewise.
26661         (create_access_replacement): Likewise.
26662         (analyze_access_subtree): Likewise.
26663         (analyze_all_variable_accesses): Likewise.
26664         (sra_modify_assign): Likewise.
26665         (initialize_constant_pool_replacements): Likewise.
26666         (find_param_candidates): Likewise.
26667         (decide_one_param_reduction): Likewise.
26668         (replace_removed_params_ssa_names): Likewise.
26669         * tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
26670         * tree-ssa-copy.c (dump_copy_of): Likewise.
26671         (copy_prop_visit_cond_stmt): Likewise.
26672         * tree-ssa-dce.c (mark_operand_necessary): Likewise.
26673         * tree-ssa-dom.c (pass_dominator::execute): Likewise.
26674         (record_equivalences_from_stmt): Likewise.
26675         * tree-ssa-dse.c (compute_trims): Likewise.
26676         (delete_dead_call): Likewise.
26677         (delete_dead_assignment): Likewise.
26678         * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Likewise.
26679         (forward_propagate_into_cond): Likewise.
26680         (pass_forwprop::execute): Likewise.
26681         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
26682         * tree-ssa-loop-im.c (invariantness_dom_walker::before_dom_children):
26683         Likewise.
26684         (move_computations_worker): Likewise.
26685         (execute_sm): Likewise.
26686         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
26687         (remove_exits_and_undefined_stmts): Likewise.
26688         (remove_redundant_iv_tests): Likewise.
26689         * tree-ssa-loop-ivopts.c (dump_use): Likewise.
26690         (adjust_iv_update_pos): Likewise.
26691         * tree-ssa-math-opts.c (bswap_replace): Likewise.
26692         * tree-ssa-phiopt.c (factor_out_conditional_conversion): Likewise.
26693         (value_replacement): Likewise.
26694         * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
26695         * tree-ssa-pre.c (print_pre_expr): Likewise.
26696         (get_representative_for): Likewise.
26697         (create_expression_by_pieces): Likewise.
26698         (insert_into_preds_of_block): Likewise.
26699         (eliminate_insert): Likewise.
26700         (eliminate_dom_walker::before_dom_children): Likewise.
26701         (eliminate): Likewise.
26702         (remove_dead_inserted_code): Likewise.
26703         * tree-ssa-propagate.c (substitute_and_fold): Likewise.
26704         * tree-ssa-reassoc.c (get_rank): Likewise.
26705         (eliminate_duplicate_pair): Likewise.
26706         (eliminate_plus_minus_pair): Likewise.
26707         (eliminate_not_pairs): Likewise.
26708         (undistribute_ops_list): Likewise.
26709         (eliminate_redundant_comparison): Likewise.
26710         (update_range_test): Likewise.
26711         (optimize_range_tests_var_bound): Likewise.
26712         (optimize_vec_cond_expr): Likewise.
26713         (rewrite_expr_tree): Likewise.
26714         (rewrite_expr_tree_parallel): Likewise.
26715         (linearize_expr): Likewise.
26716         (break_up_subtract): Likewise.
26717         (linearize_expr_tree): Likewise.
26718         (attempt_builtin_powi): Likewise.
26719         (attempt_builtin_copysign): Likewise.
26720         (transform_stmt_to_copy): Likewise.
26721         (transform_stmt_to_multiply): Likewise.
26722         (dump_ops_vector): Likewise.
26723         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Likewise.
26724         (print_scc): Likewise.
26725         (set_ssa_val_to): Likewise.
26726         (visit_reference_op_store): Likewise.
26727         (visit_use): Likewise.
26728         (sccvn_dom_walker::before_dom_children): Likewise.
26729         (run_scc_vn): Likewise.
26730         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
26731         Likewise.
26732         (expr_hash_elt::print): Likewise.
26733         (const_and_copies::pop_to_marker): Likewise.
26734         (const_and_copies::record_const_or_copy_raw): Likewise.
26735         * tree-ssa-structalias.c (compute_dependence_clique): Likewise.
26736         * tree-ssa-uninit.c (collect_phi_def_edges): Likewise.
26737         (dump_predicates): Likewise.
26738         (find_uninit_use): Likewise.
26739         (warn_uninitialized_phi): Likewise.
26740         (pass_late_warn_uninitialized::execute): Likewise.
26741         * tree-ssa.c (verify_vssa): Likewise.
26742         (verify_ssa): Likewise.
26743         (maybe_optimize_var): Likewise.
26744         * tree-vrp.c (dump_value_range): Likewise.
26745         (dump_all_value_ranges): Likewise.
26746         (dump_asserts_for): Likewise.
26747         (register_edge_assert_for_2): Likewise.
26748         (vrp_visit_cond_stmt): Likewise.
26749         (vrp_visit_switch_stmt): Likewise.
26750         (vrp_visit_stmt): Likewise.
26751         (vrp_visit_phi_node): Likewise.
26752         (simplify_cond_using_ranges_1): Likewise.
26753         (fold_predicate_in): Likewise.
26754         (evrp_dom_walker::before_dom_children): Likewise.
26755         (evrp_dom_walker::push_value_range): Likewise.
26756         (evrp_dom_walker::pop_value_range): Likewise.
26757         (execute_early_vrp): Likewise.
26758
26759 2017-05-16  Richard Biener  <rguenther@suse.de>
26760
26761         * dwarf2out.c (loc_list_from_tree_1): Do not create
26762         DW_OP_GNU_variable_value for DECL_IGNORED_P decls.
26763
26764 2017-05-16  Richard Biener  <rguenther@suse.de>
26765
26766         * dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE
26767         just generated.
26768         (note_variable_value_in_expr): If we resolved the decl ref
26769         do not push to the stack.
26770
26771 2017-05-16  Matthew Wahab  <matthew.wahab@arm.com>
26772
26773         * config/arm/arm_neon.h (vadd_f16): Use standard arithmetic
26774         operations in fast-math mode.
26775         (vaddq_f16): Likewise.
26776         (vmul_f16): Likewise.
26777         (vmulq_f16): Likewise.
26778         (vsub_f16): Likewise.
26779         (vsubq_f16): Likewise.
26780         * config/arm/neon.md (add<mode>3): New.
26781         (sub<mode>3): New.
26782         (fma:<VH:mode>3): New.  Also remove outdated comment.
26783         (mul<mode>3): New.
26784
26785 2017-05-16  Martin Liska  <mliska@suse.cz>
26786
26787         PR ipa/79849.
26788         PR ipa/79850.
26789         * ipa-devirt.c (warn_types_mismatch): Fix typo.
26790         (odr_types_equivalent_p): Likewise.
26791
26792 2017-05-15  Sylvestre Ledru  <sylvestre@debian.org>
26793
26794         * plugin.c (try_init_one_plugin): Fix ressource leaks (CID 726637).
26795
26796 2017-05-15  Uros Bizjak  <ubizjak@gmail.com>
26797
26798         PR target/80425
26799         * config/i386.i386.md (*zero_extendsidi2): Do not penalize
26800         non-interunit SSE move alternatives with '?'.
26801         (zero-extendsidi peephole2): New peephole to skip intermediate
26802         general register in SSE zero-extend sequence.
26803
26804 2017-05-15  Jeff Law  <law@redhat.com>
26805
26806         * reorg.c (relax_delay_slots): Create a new variable to hold
26807         the temporary target rather than clobbering TARGET_LABEL.
26808
26809         * config/tilegx/tilegx.c (tilegx_expand_unaligned_load): Add
26810         missing argument to extract_bit_field call.
26811         * config/tilepro/tilepro.c (tilepro_expand_unaligned_load): Likewise.
26812
26813 2017-05-15  Martin Liska  <mliska@suse.cz>
26814
26815         PR driver/31468
26816         * gcc.c (process_command): Do not allow empty argument of -o option.
26817
26818 2017-05-15  Renlin Li  <renlin.li@arm.com>
26819
26820         * config/aarch64/aarch64-protos.h (aarch64_expand_call): Declare.
26821         * config/aarch64/aarch64.c (aarch64_expand_call): Define.
26822         * config/aarch64/constraints.md (Usf): Add long call check.
26823         * config/aarch64/aarch64.md (call): Use aarch64_expand_call.
26824         (call_value): Likewise.
26825         (sibcall): Likewise.
26826         (sibcall_value): Likewise.
26827         (call_insn): New.
26828         (call_value_insn): New.
26829         (sibcall_insn): Update rtx pattern.
26830         (sibcall_value_insn): Likewise.
26831         (call_internal): Remove.
26832         (call_value_internal): Likewise.
26833         (sibcall_internal): Likewise.
26834         (sibcall_value_internal): Likewise.
26835         (call_reg): Likewise.
26836         (call_symbol): Likewise.
26837         (call_value_reg): Likewise.
26838         (call_value_symbol): Likewise.
26839
26840 2017-05-14  Krister Walfridsson  <krister.walfridsson@gmail.com>
26841
26842         PR target/80600
26843         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always add -lgcc.
26844
26845 2017-05-14  Uros Bizjak  <ubizjak@gmail.com>
26846
26847         * config/i386.i386.c (ix86_cc_modes_compatible): CCNOmode is
26848         compatible with CCGOCmode and with CCZmode.
26849
26850 2017-05-14  Martin Sebor  <msebor@redhat.com>
26851
26852         PR middle-end/77671
26853         * gimple-fold.c (gimple_fold_builtin_sprintf): Make extern.
26854         (gimple_fold_builtin_snprintf): Same.
26855         * gimple-fold.h (gimple_fold_builtin_sprintf): Declare.
26856         (gimple_fold_builtin_snprintf): Same.
26857         * gimple-ssa-sprintf.c (get_format_string): Correct the detection
26858         of character types.
26859         (is_call_safe): New function.
26860         (try_substitute_return_value): Call it.
26861         (try_simplify_call): New function.
26862         (pass_sprintf_length::handle_gimple_call): Call it.
26863
26864 2017-05-14  Martin Sebor  <msebor@redhat.com>
26865
26866         PR middle-end/80669
26867         * builtins.c (expand_builtin_stpncpy): Simplify.
26868
26869 2017-05-14  Daniel Santos  <daniel.santos@pobox.com>
26870
26871         * config/i386/i386.opt: Add option -mcall-ms2sysv-xlogues.
26872         * config/i386/i386.h
26873         (x86_64_ms_sysv_extra_clobbered_registers): Change type to unsigned.
26874         (NUM_X86_64_MS_CLOBBERED_REGS): New macro.
26875         (struct machine_function): Add new members call_ms2sysv,
26876         call_ms2sysv_pad_in, call_ms2sysv_pad_out and call_ms2sysv_extra_regs.
26877         (struct machine_frame_state): New fields sp_realigned and
26878         sp_realigned_offset.
26879         * config/i386/i386.c
26880         (enum xlogue_stub): New enum.
26881         (enum xlogue_stub_sets): New enum.
26882         (class xlogue_layout): New class.
26883         (struct ix86_frame): New fields stack_realign_allocate_offset,
26884         stack_realign_offset and outlined_save_offset.  Modify comments to
26885         detail stack layout when using out-of-line stubs.
26886         (ix86_target_string): Add -mcall-ms2sysv-xlogues option.
26887         (ix86_option_override_internal): Add sorry() for TARGET_SEH and
26888         -mcall-ms2sysv-xlogues.
26889         (stub_managed_regs): New static variable.
26890         (ix86_save_reg): Add new parameter ignore_outlined to optionally omit
26891         registers managed by out-of-line stub.
26892         (disable_call_ms2sysv_xlogues): New function.
26893         (ix86_compute_frame_layout): Modify re-alignment calculations, disable
26894         m->call_ms2sysv when appropriate and compute frame layout for
26895         out-of-line stubs.
26896         (sp_valid_at, fp_valid_at): New inline functions.
26897         (choose_basereg): New function.
26898         (choose_baseaddr): Add align parameter, use choose_basereg and modify
26899         all callers.
26900         (ix86_emit_save_reg_using_mov, ix86_emit_restore_sse_regs_using_mov):
26901         Use align parameter of choose_baseaddr to generated aligned SSE movs
26902         when possible.
26903         (pro_epilogue_adjust_stack): Modify to track
26904         machine_frame_state::sp_realigned.
26905         (ix86_nsaved_regs): Modify to accommodate changes to ix86_save_reg.
26906         (ix86_nsaved_sseregs): Likewise.
26907         (ix86_emit_save_regs): Likewise.
26908         (ix86_emit_save_regs_using_mov): Likewise.
26909         (ix86_emit_save_sse_regs_using_mov): Likewise.
26910         (get_scratch_register_on_entry): Likewise.
26911         (gen_frame_set): New function.
26912         (gen_frame_load): Likewise.
26913         (gen_frame_store): Likewise.
26914         (emit_outlined_ms2sysv_save): Likewise.
26915         (emit_outlined_ms2sysv_restore): Likewise.
26916         (ix86_expand_prologue): Modify stack re-alignment code and call
26917         emit_outlined_ms2sysv_save when appropriate.
26918         (ix86_emit_leave): Clear machine_frame_state::sp_realigned.  Add
26919         parameter rtx_insn *insn, which allows the function to be used to only
26920         generate the notes.
26921         (ix86_expand_epilogue): Modify validity checks of frame and stack
26922         pointers, and call emit_outlined_ms2sysv_restore when appropriate.
26923         (ix86_expand_call): Modify to enable m->call_ms2sysv when appropriate.
26924         * config/i386/predicates.md
26925         (save_multiple): New predicate.
26926         (restore_multiple): Likewise.
26927         * config/i386/sse.md
26928         (save_multiple<mode>): New pattern.
26929         (save_multiple_realign<mode>): Likewise.
26930         (restore_multiple<mode>): Likewise.
26931         (restore_multiple_and_return<mode>): Likewise.
26932         (restore_multiple_leave_return<mode>): Likewise.
26933         * Makefile.in: Export HOSTCXX and HOSTCXXFLAGS to site.exp
26934
26935 2017-05-14  Julia Koval  <julia.koval@intel.com>
26936
26937         * config/i386/i386-builtin-types.def (VOID_FTYPE_INT_INT64): New type.
26938         * config/i386/i386-builtin.def (__builtin_ia32_xgetbv)
26939         (__builtin_ia32_xsetbv): New builtins.
26940         * config/i386/i386.c (ix86_expand_special_args_builtin):
26941         Process new types.
26942         (ix86_expand_builtin): Special expand for new intrinsics.
26943         * config/i386/i386.md (UNSPECV_XGETBV, UNSPECV_XSETBV): New.
26944         (xsetbv, xsetbv_rex64, xgetbv, xgetbv_rex64): New insn patterns.
26945         * config/i386/xsaveintrin.h (_xsetbv, _getbv): New intrinsics.
26946
26947 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
26948
26949         * cfganal.c (inverted_post_order_compute): Change argument type
26950         to vec *.
26951         * cfganal.h (inverted_post_order_compute): Adjust prototype.
26952         * df-core.c (rest_of_handle_df_initialize): Adjust.
26953         (rest_of_handle_df_finish): Likewise.
26954         (df_analyze_1): Likewise.
26955         (df_analyze): Likewise.
26956         (loop_inverted_post_order_compute): Change argument to be a vec *.
26957         (df_analyze_loop): Adjust.
26958         (df_get_n_blocks): Likewise.
26959         (df_get_postorder): Likewise.
26960         * df.h (struct df_d): Change field to be a vec.
26961         * lcm.c (compute_laterin): Adjust.
26962         (compute_available): Likewise.
26963         * lra-lives.c (lra_create_live_ranges_1): Likewise.
26964         * tree-ssa-dce.c (remove_dead_stmt): Likewise.
26965         * tree-ssa-pre.c (compute_antic): Likewise.
26966
26967 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
26968
26969         * cfganal.c (connect_infinite_loops_to_exit): Adjust.
26970         (depth_first_search::depth_first_search): Change structure init
26971         function to this constructor.
26972         (depth_first_search::add_bb): Rename function to this member.
26973         (depth_first_search::execute): Likewise.
26974         (flow_dfs_compute_reverse_finish): Adjust.
26975
26976 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
26977
26978         * ddg.c (find_nodes_on_paths): Use auto_sbitmap.
26979         (longest_simple_path): Likewise.
26980         * shrink-wrap.c (spread_components): Likewise.
26981         (disqualify_problematic_components): Likewise.
26982         (emit_common_heads_for_components): Likewise.
26983         (emit_common_tails_for_components): Likewise.
26984         (insert_prologue_epilogue_for_components): Likewise.
26985
26986 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
26987
26988         * tree-ssa-dse.c (dse_dom_walker): Make m_live_byes a
26989         auto_sbitmap.
26990
26991 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
26992
26993         * df-core.c (df_set_blocks): Start using auto_bitmap.
26994         (df_compact_blocks): Likewise.
26995         * df-problems.c (df_rd_confluence_n): Likewise.
26996         * df-scan.c (df_insn_rescan_all): Likewise.
26997         (df_process_deferred_rescans): Likewise.
26998         (df_update_entry_block_defs): Likewise.
26999         (df_update_exit_block_uses): Likewise.
27000         (df_entry_block_bitmap_verify): Likewise.
27001         (df_exit_block_bitmap_verify): Likewise.
27002         (df_scan_verify): Likewise.
27003         * lra-constraints.c (lra_constraints): Likewise.
27004         (undo_optional_reloads): Likewise.
27005         (lra_undo_inheritance): Likewise.
27006         * lra-remat.c (calculate_gen_cands): Likewise.
27007         (do_remat): Likewise.
27008         * lra-spills.c (assign_spill_hard_regs): Likewise.
27009         (spill_pseudos): Likewise.
27010         * tree-ssa-pre.c (bitmap_set_and): Likewise.
27011         (bitmap_set_subtract_values): Likewise.
27012
27013 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
27014
27015         * haifa-sched.c (estimate_shadow_tick): Replace manual bitmap
27016         management with auto_bitmap.
27017         (fix_inter_tick): Likewise.
27018         (fix_recovery_deps): Likewise.
27019         * ira.c (add_store_equivs): Likewise.
27020         (find_moveable_pseudos): Likewise.
27021         (split_live_ranges_for_shrink_wrap): Likewise.
27022         * print-rtl.c (rtx_reuse_manager::rtx_reuse_manager): Likewise.
27023         (rtx_reuse_manager::seen_def_p): Likewise.
27024         (rtx_reuse_manager::set_seen_def): Likewise.
27025         * print-rtl.h (class rtx_reuse_manager): Likewise.
27026
27027 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
27028
27029         * bt-load.c (combine_btr_defs): Use auto_bitmap to manage bitmap
27030         lifetime.
27031         (migrate_btr_def): Likewise.
27032         * cfgloop.c (get_loop_body_in_bfs_order): Likewise.
27033         * df-core.c (loop_post_order_compute): Likewise.
27034         (loop_inverted_post_order_compute): Likewise.
27035         * hsa-common.h: Likewise.
27036         * hsa-gen.c (hsa_bb::~hsa_bb): Likewise.
27037         * init-regs.c (initialize_uninitialized_regs): Likewise.
27038         * ipa-inline.c (resolve_noninline_speculation): Likewise.
27039         (inline_small_functions): Likewise.
27040         * ipa-reference.c (ipa_reference_write_optimization_summary): Likewise.
27041         * ira.c (combine_and_move_insns): Likewise.
27042         (build_insn_chain): Likewise.
27043         * loop-invariant.c (find_invariants): Likewise.
27044         * lower-subreg.c (propagate_pseudo_copies): Likewise.
27045         * predict.c (tree_predict_by_opcode): Likewise.
27046         (predict_paths_leading_to): Likewise.
27047         (predict_paths_leading_to_edge): Likewise.
27048         (estimate_loops_at_level): Likewise.
27049         (estimate_loops): Likewise.
27050         * shrink-wrap.c (try_shrink_wrapping): Likewise.
27051         (spread_components): Likewise.
27052         * tree-cfg.c (remove_edge_and_dominated_blocks): Likewise.
27053         * tree-loop-distribution.c (rdg_build_partitions): Likewise.
27054         * tree-predcom.c (tree_predictive_commoning_loop): Likewise.
27055         * tree-ssa-coalesce.c (coalesce_ssa_name): Likewise.
27056         * tree-ssa-phionlycprop.c (pass_phi_only_cprop::execute): Likewise.
27057         * tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
27058         * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise.
27059         * tree-ssa-threadupdate.c (compute_path_counts): Likewise.
27060         (mark_threaded_blocks): Likewise.
27061         (thread_through_all_blocks): Likewise.
27062         * tree-ssa.c (verify_ssa): Likewise.
27063         (execute_update_addresses_taken): Likewise.
27064         * tree-ssanames.c (verify_ssaname_freelists): Likewise.
27065
27066 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
27067
27068         * cfganal.c (mark_dfs_back_edges): Replace manual stack with
27069         auto_vec.
27070         (post_order_compute): Likewise.
27071         (inverted_post_order_compute): Likewise.
27072         (pre_and_rev_post_order_compute_fn): Likewise.
27073
27074 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
27075
27076         * genrecog.c (int_set::int_set): Explicitly construct our
27077         auto_vec base class.
27078         * vec.h (auto_vec::auto_vec): New constructor.
27079
27080 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
27081
27082         * bitmap.h (class auto_bitmap): New constructor taking
27083         bitmap_obstack * argument.
27084
27085 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
27086
27087         * bitmap.h (class auto_bitmap): Change type of m_bits to
27088         bitmap_head, and adjust ctor / dtor and member operators.
27089
27090 2017-05-13  Uros Bizjak  <ubizjak@gmail.com>
27091
27092         * compare-elim.c (equivalent_reg_at_start): Return NULL_RTX
27093         when returned register mode doesn't match original mode.
27094
27095 2017-05-12  Jeff Law  <law@redhat.com>
27096             Jakub Jelinek  <jakub@redhat.com>
27097
27098         * config/mn10300/mn10300.c (mn10300_match_ccmode): Fix where
27099         we look for cc setter after the compare-elim changes.
27100         * config/mn10300/mn10300.md (addsi3_flags): Fix order of patterns
27101         within the vector to match what compare-elim now expects.
27102         (subsi3_flags, andsi3_flags, iorsi3_flags): Likewise.
27103         (xorsi3_flags, one_cmplsi2_flags): Likewise.
27104
27105         * config/rx/rx.c (rx_match_ccmode): Fix where we look cc setter
27106         after the compare-elim changes.
27107         * config/rx/rx.md (abssi2_flags): Fix order of patterns within
27108         the vector to match what compare-elim now expects.
27109         (addsi3_flags, adc_flags, addsi3_flags peepholes): Likewise.
27110         (andsi3_flags, negsi2_flags, one_cmplsi2_flags): Likewise.
27111         (iorsi3_flags, rotlsi3_flags, rotrsi3_flags): Likewise.
27112         (ashrsi3_flags, lshrsi3_flags, ashlsi3_flags): Likewise.
27113         (ssaddsi3, subsi3_flags, sbb_flags, xorsi3_flags): Likewise.
27114
27115         * config/visium/visium.c (single_set_and_flags): Fix where
27116         we look for cc setter after the compare-elim changes.
27117         * config/visium/visium.md (flags_subst_logic): Fix order of patterns
27118         with the vector to match what compare-elim now expects.
27119         (flags_subst_arith, add<mode>3_insn_set_carry): Likewise.
27120         (add<mode>3_insn_set_overflow, addsi3_insn_set_carry): Likewise.
27121         (addsi3_insn_set_overflow, sub<mode>3_insn_set_carry): Likewise.
27122         (sub<mode>3_insn_set_overflow, subsi3_insn_set_carry): Likewise.
27123         (subsi3_insn_set_overflow, negsi2_insn_set_carry): Likewise.
27124         (neg<mode>2_insn_set_overflow): Likewise.
27125
27126 2017-05-12  Jim Wilson  <jim.wilson@linaro.org>
27127
27128         PR middle-end/79794
27129         * expmed.c (extract_bit_field_1): Add alt_rtl argument.  Before
27130         maybe_expand_insn call, set ops[0].target.  If still set after call,
27131         set alt_rtl.  Add extra arg to recursive calls.
27132         (extract_bit_field): Add alt_rtl argument.  Pass to
27133         extract_bit_field.
27134         * expmed.h (extract_bit_field): Fix prototype.
27135         * expr.c (emit_group_load_1, copy_blkmode_from_reg)
27136         (copy_blkmode_to_reg, read_complex_part, store_field): Pass extra NULL
27137         to extract_bit_field_calls.
27138         (expand_expr_real_1): Pass alt_rtl to expand_expr_real instead of 0.
27139         Pass alt_rtl to extract_bit_field calls.
27140         * calls.c (store_unaligned_arguments_into_psuedos)
27141         load_register_parameters): Pass extra NULL to extract_bit_field calls.
27142         * optabs.c (maybe_legitimize_operand): Clear op->target when call
27143         gen_reg_rtx.
27144         * optabs.h (struct expand_operand): Add target bitfield.
27145
27146 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
27147
27148         * compare-elim.c (try_eliminate_compare): Canonicalize
27149         operation with embedded compare to
27150         [(set (reg:CCM) (compare:CCM (operation) (immediate)))
27151          (set (reg) (operation)].
27152
27153         * config/i386/i386.c (TARGET_FLAGS_REGNUM): New define.
27154
27155 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
27156
27157         PR target/80723
27158         * config/i386/i386.c (ix86_rtx_cost) [case PLUS]: Ignore the
27159         cost of adding a carry flag for ADC instruction.
27160         [case MINUS]: Ignore the cost of subtracting a carry flag
27161         for SBB instruction.
27162
27163 2017-05-12  Steven Munroe  <munroesj@gcc.gnu.org>
27164
27165         * config.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h,
27166         and x86intrin.h
27167         * config/rs6000/bmiintrin.h: New file.
27168         * config/rs6000/bmi2intrin.h: New file.
27169         * config/rs6000/x86intrin.h: New file.
27170
27171 2017-05-12  Jeff Law  <law@redhat.com>
27172
27173         * tree-vrp.c (vrp_dom_walker::before_dom_children): Push unwinding
27174         markers.
27175
27176 2017-05-12  Peter Bergner  <bergner@vnet.ibm.com>
27177
27178         PR middle-end/80707
27179         * tree-cfg.c: Remove cfg edges of unreachable case statements.
27180
27181 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
27182
27183         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
27184         early expansion of vector divide builtins.
27185         (builtin_function_type): Add VSX_BUILTIN_UDIV_V2DI to the list of
27186         builtins identified as having unsigned arguments.
27187
27188 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
27189
27190         * config/rs6000/rs6000.c (gimple-fold.h): New #include.
27191         (rs6000_gimple_fold_builtin): Add handling for early GIMPLE
27192         expansion of vector logical operations (and, andc, or, xor,
27193         nor, orc, nand).
27194
27195 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
27196
27197         * gimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.
27198         * gimple-fold.h (create_tmp_reg_or_ssa_name): New prototype.
27199
27200 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
27201
27202         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
27203         early GIMPLE expansion of vector multiplies.
27204
27205 2017-05-12  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
27206
27207         * config/arm/arm.md (movsi): Add TARGET_32BIT in addition to the
27208         TARGET_HAVE_MOVT conditional.
27209         (movt splitter): Likewise.
27210
27211 2017-05-12  Richard Biener  <rguenther@suse.de>
27212
27213         * tree-ssa-sccvn.h (has_VN_INFO): Declare.
27214         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
27215         Fold all stmts not inplace.
27216
27217 2017-05-12  Richard Biener  <rguenther@suse.de>
27218
27219         PR tree-optimization/80713
27220         * tree-ssa-pre.c (remove_dead_inserted_code): Clear
27221         inserted_exprs bit for not removed stmts.
27222
27223 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
27224
27225         PR middle-end/69921
27226         * tree-parloops.c (create_parallel_loop): Set "oacc kernels
27227         parallelized" attribute for parallelized OpenACC kernels.
27228         * omp-offload.c (execute_oacc_device_lower): Use it.
27229
27230         * omp-expand.c (expand_omp_target) <GF_OMP_TARGET_KIND_OACC_KERNELS>:
27231         Set "oacc kernels" attribute.
27232         * omp-general.c (oacc_set_fn_attrib): Remove is_kernel formal
27233         parameter.  Adjust all users.
27234         (oacc_fn_attrib_kernels_p): Remove function.
27235         * omp-offload.c (execute_oacc_device_lower): Look for "oacc
27236         kernels" attribute instead of calling oacc_fn_attrib_kernels_p.
27237         * tree-ssa-loop.c (gate_oacc_kernels): Likewise.
27238         * tree-parloops.c (create_parallel_loop): If oacc_kernels_p,
27239         assert "oacc kernels" attribute is set.
27240
27241 2017-05-11  Carl Love  <cel@us.ibm.com>
27242
27243         * config/rs6000/rs6000-c: Add support for built-in functions
27244         vector unsigned char vec_popcnt (vector signed char)
27245         vector unsigned char vec_popcnt (vector unsigned char)
27246         vector unsigned short vec_popcnt (vector signed short)
27247         vector unsigned short vec_popcnt (vector unsigned short)
27248         vector unsigned int vec_popcnt (vector signed int)
27249         vector unsigned int vec_popcnt (vector unsigned int)
27250         vector unsigned long long vec_popcnt (vector signed long long)
27251         vector unsigned long long vec_popcnt (vector unsigned long long)
27252         vector signed long long vec_slo (vector signed long long,
27253                                          vector signed char)
27254         vector signed long long vec_slo (vector signed long long,
27255                                          vector unsigned char)
27256         vector unsigned long long vec_slo (vector unsigned long long,
27257                                            vector signed char)
27258         vector unsigned long long vec_slo (vector unsigned long long,
27259                                            vector unsigned char)
27260         * config/rs6000/rs6000-builtin.def: Add definitions for VPOPCNTUB,
27261         VPOPCNTUH, VPOPCNTUW, and VPOPCNTUD overloads.
27262         * config/rs6000/altivec.h: Add define for vec_popcnt, vec_popcntb,
27263         vec_popcnth, vec_popcntw and vec_popcntd built-in functions.
27264         * doc/extend.texi: Update the built-in documentation file for the
27265         new built-in functions.
27266
27267 2017-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
27268
27269         * attribs.h (sorted_attr_string): Move machine independent
27270         functions for target clone support from the i386 port to common
27271         code.  Rename ix86_function_versions to common_function_versions.
27272         Rename make_name to make_unique_name.
27273         (common_function_versions): Likewise.
27274         (make_unique_name): Likewise.
27275         (make_dispatcher_decl): Likewise.
27276         (is_function_default_version): Likewise.
27277         * attribs.c (attr_strcmp): Likewise.
27278         (sorted_attr_string): Likewise.
27279         (common_function_versions): Likewise.
27280         (make_unique_name): Likewise.
27281         (make_dispatcher_decl): Likewise.
27282         (is_function_default_version): Likewise.
27283         * config/i386/i386.c (attr_strcmp): Likewise.
27284         (sorted_attr_string): Likewise.
27285         (ix86_function_versions): Likewise.
27286         (make_name): Likewise.
27287         (make_dispatcher_decl): Likewise.
27288         (is_function_default_version): Likewise.
27289         (TARGET_OPTION_FUNCTION_VERSIONS): Update target function hook.
27290
27291 2017-05-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27292
27293         PR target/80695
27294         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
27295         Account for direct move costs for vec_construct of integer
27296         vectors.
27297
27298 2017-05-11  Uros Bizjak  <ubizjak@gmail.com>
27299
27300         PR target/80706
27301         * config/i386/sync.md (UNSPEC_LDX_ATOMIC): New unspec.
27302         (UNSPEC_STX_ATOMIC): Ditto.
27303         (loaddi_via_sse): New insn.
27304         (storedi_via_sse): Ditto.
27305         (atomic_loaddi_fpu): Emit loaddi_via_sse and storedi_via_sse.
27306         Update corresponding peephole2 patterns.
27307         (atomic_storedi_fpu): Ditto.
27308
27309 2017-05-11  Julia Koval  <julia.koval@intel.com>
27310
27311         * config/i386/avx512fintrin.h (_mm_mask_rsqrt14_sd)
27312         (_mm_maskz_rsqrt14_sd, _mm_mask_rsqrt14_ss, _mm_maskz_rsqrt14_ss):
27313         New intrinsics.
27314         * config/i386/i386-builtin.def (__builtin_ia32_rsqrt14sd_mask)
27315         (__builtin_ia32_rsqrt14ss_mask): New builtins.
27316         * config/i386/sse.md (rsqrt14_<mode>_mask): New pattern.
27317
27318 2017-05-11  Nathan Sidwell  <nathan@acm.org>
27319
27320         * graphite-poly.c: Include dumpfile.h.
27321
27322         * dumpfle.h (dump_function): Declare here ...
27323         * tree-dump.h (dump_function): ... not here.
27324         * dumpfile.c: #include tree-cfg.h.
27325         (dump_function): Move here from ...
27326         * tree-dump.c (dump_function): ... here.
27327         * gimplify.c: #include splay-tree.h, not tree-dump.h.
27328         * graphite-poly.c: Don't include tree-dump.h.
27329         * cgraphclones.c: Include dumpfile.h not tree-dump.h.
27330         * print-tree.c: Likewise.
27331         * stor-layout.c: Likewise.
27332         * tree-nested.c: Likewise.
27333
27334         * dumpfile.c (dump_start): Use TDF_FLAGS.
27335         (dump_enable_all): Fix TDF_KIND check thinko.
27336
27337 2017-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
27338
27339         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
27340         array entries to represent two legal parameterizations of the
27341         overloaded __builtin_cmpb function, as represented by the
27342         P6_OV_BUILTIN_CMPB constant.
27343         (altivec_resolve_overloaded_builtin): Add special case handling
27344         for the __builtin_cmpb function, as represented by the
27345         P6_OV_BUILTIN_CMPB constant.
27346         * config/rs6000/rs6000-builtin.def (BU_P6_2): New macro.
27347         (BU_P6_64BIT_2): New macro.
27348         (BU_P6_OVERLOAD_2): New macro
27349         (CMPB_32): Add 32-bit compare-bytes support for 32-bit only targets.
27350         (CMPB): Add 64-bit compare-bytes support for 32-bit and 64-bit targets.
27351         (CMPB): Add overload support to represent both 32-bit and 64-bit
27352         compare-bytes function.
27353         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
27354         support for TARGET_CMPB.
27355         * config/rs6000/rs6000.h: Add support for RS6000_BTM_CMPB.
27356         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
27357         documentation of the __builtin_cmpb overloaded built-in function.
27358
27359 2017-05-11  Richard Biener  <rguenther@suse.de>
27360
27361         PR tree-optimization/80705
27362         * tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
27363         bases are not vectorizable.
27364
27365 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27366
27367         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
27368         when counting register pressure.
27369
27370 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27371
27372         * tree-ssa-loop-ivopts.c (compare_cost_pair): New.
27373         (iv_ca_more_deps): Renamed to ...
27374         (iv_ca_compare_deps): ... this.
27375         (iv_ca_extend): Extend iv_ca if NEW_CP is cheaper than OLD_CP.
27376
27377 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27378
27379         * tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump
27380         to ...
27381         (determine_group_iv_costs): ... here.
27382         (find_inv_vars_cb): Record inv var if it's not recorded before.
27383
27384 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27385
27386         * tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
27387         (get_shiftadd_cost): Ditto.
27388
27389 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27390
27391         * tree-ssa-address.c: Include header file.
27392         (move_hint_to_base): Return TRUE if BASE_HINT is moved to memory
27393         address.
27394         (add_to_parts): Refactor.
27395         (addr_to_parts): New parameter.  Update use of move_hint_to_base.
27396         (create_mem_ref): Update use of addr_to_parts.  Re-associate addr
27397         in new order.
27398
27399 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27400
27401         PR tree-optimization/53090
27402         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New enum value
27403         COMP_IV_EXPR_2.
27404         (extract_cond_operands): Detect condition with IV on both sides
27405         and return COMP_IV_EXPR_2.
27406         (find_interesting_uses_cond): Add iv_use for both IVs in condition.
27407         (rewrite_use_compare): Simplify by removing call to function
27408         extract_cond_operands.
27409
27410 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27411
27412         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
27413         (extract_cond_operands): Detect condition comparing against non-
27414         invariant bound and return appropriate enum value.
27415         (find_interesting_uses_cond): Update use of extract_cond_operands.
27416         Handle its return value accordingly.
27417         (determine_group_iv_cost_cond, rewrite_use_compare): Ditto.
27418
27419 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27420
27421         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate
27422         nonlinear iv_use computation in loop invariant sensitive way.
27423
27424 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27425
27426         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
27427         (find_iv_candidates): Call relate_compare_use_with_all_cands.
27428
27429 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27430
27431         * tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
27432         (dump_cand): Support iv_cand.inv_exprs.
27433         (add_candidate_1): Record invariant exprs in iv_cand.inv_exprs
27434         for candidates.
27435         (iv_ca_set_no_cp, iv_ca_set_cp, free_loop_data): Support
27436         iv_cand.inv_exprs.
27437
27438 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27439
27440         * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move
27441         from ...
27442         * tree-ssa-address.c (multiplier_allowed_in_address_p): ... to here
27443         as local function.  Include necessary header files.
27444         * tree-ssa-loop-ivopts.h (multiplier_allowed_in_address_p): Delete.
27445
27446 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27447
27448         * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
27449
27450 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27451
27452         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more
27453         operators: TRUNC_DIV_EXPR, BIT_AND_EXPR, BIT_IOR_EXPR, LSHIFT_EXPR,
27454         RSHIFT_EXPR and BIT_NOT_EXPR.
27455
27456 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27457
27458         * tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
27459         (adjust_setup_cost): New parameter supporting round up adjustment.
27460         (struct address_cost_data): Delete.
27461         (force_expr_to_var_cost): Don't bound cost with spill_cost.
27462         (split_address_cost, ptr_difference_cost): Delete.
27463         (difference_cost, compare_aff_trees, record_inv_expr): Delete.
27464         (struct ainc_cost_data): New struct.
27465         (get_address_cost_ainc): New function.
27466         (get_address_cost, get_computation_cost): Reimplement.
27467         (determine_group_iv_cost_address): Record inv_expr for all uses of
27468         a group.
27469         (determine_group_iv_cost_cond): Call get_loop_invariant_expr.
27470         (iv_ca_has_deps): Reimplemented to ...
27471         (iv_ca_more_deps): ... this.  Check if NEW_CP introduces more deps
27472         than OLD_CP.
27473         (iv_ca_extend): Call iv_ca_more_deps.
27474
27475 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27476
27477         * tree-ssa-address.c (struct mem_address): Move to header file.
27478         (valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
27479         * tree-ssa-address.h (struct mem_address): Move from C file.
27480         (valid_mem_ref_p, move_fixed_address_to_symbol): Declare.
27481
27482 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27483
27484         * tree-affine.h (aff_combination_type): New interface.
27485         (aff_combination_zero_p): Remove static.
27486         (aff_combination_const_p): New interface.
27487         (aff_combination_singleton_var_p): New interfaces.
27488
27489 2017-05-11  Richard Biener  <rguenther@suse.de>
27490
27491         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
27492         Skip unreachable blocks and destinations.
27493         (eliminate): Move stmt removal and fixup ...
27494         (fini_eliminate): ... here.  Skip inserted exprs.
27495         (pass_pre::execute): Move fini_pre after fini_eliminate.
27496         * tree-ssa-tailmerge.c: Include tree-cfgcleanup.h.
27497         (tail_merge_optimize): Run cleanup_tree_cfg if requested by
27498         PRE to get rid of dead code that has invalid SSA form and
27499         split critical edges again.
27500
27501 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
27502
27503         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
27504
27505 2017-05-11  Richard Biener  <rguenther@suse.de>
27506
27507         * passes.c (execute_function_todo): Verify loops if they are
27508         said to be up-to-date.
27509         * cfgexpand.c (pass_expand::execute): Discard loops for -dx.
27510         * trans-mem.c (pass_tm_edges::execute): Mark loops for fixup.
27511
27512 2017-05-10  John David Anglin  <danglin@gcc.gnu.org>
27513
27514         PR target/80090
27515         * config/pa/pa.c (pa_assemble_integer): When outputting a SYMBOL_REF,
27516         handle calling assemble_external ourself.
27517
27518         PR target/79027
27519         * config/pa/pa.c (pa_cannot_change_mode_class): Reject changes to/from
27520         modes with zero size.  Enhance comment.
27521
27522 2017-05-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27523
27524         * config/rs6000/rs6000.c (altivec_init_builtins): Define POWER8
27525         built-ins for vec_xl and vec_xst with short and char pointer
27526         arguments.
27527
27528 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
27529
27530         * config/i386/avx512fintrin.h (_mm_mask_max_round_sd)
27531         (_mm_maskz_max_round_sd, _mm_mask_max_round_ss)
27532         (_mm_maskz_max_round_ss, _mm_mask_min_round_sd)
27533         (_mm_maskz_min_round_sd, _mm_mask_min_round_ss)
27534         (_mm_maskz_min_round_ss): New intrinsics.
27535         * config/i386/i386-builtin-types.def (V2DF, V2DF, V2DF, V2DF, UQI, INT)
27536         (V4SF, V4SF, V4SF, V4SF, UQI, INT): New function type aliases.
27537         * config/i386/i386-builtin.def (__builtin_ia32_maxsd_mask_round)
27538         (__builtin_ia32_maxss_mask_round, __builtin_ia32_minsd_mask_round)
27539         (__builtin_ia32_minss_mask_round): New builtins.
27540         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
27541         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
27542         * config/i386/sse.md (<sse>_vm<code><mode>3<round_saeonly_name>):
27543         Rename to ...
27544         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): ... this.
27545         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|%0, %1, %<iptr>2<round_saeonly_op3>}):
27546         Change to ...
27547         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}):
27548         ... this.
27549
27550 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
27551
27552         * config/i386/avx512fintrin.h (_mm_mask_mul_round_sd)
27553         (_mm_maskz_mul_round_sd, _mm_mask_mul_round_ss)
27554         (_mm_maskz_mul_round_ss, _mm_mask_div_round_sd)
27555         (_mm_maskz_div_round_sd, _mm_mask_div_round_ss)
27556         (_mm_maskz_div_round_ss, _mm_mask_mul_sd, _mm_maskz_mul_sd)
27557         (_mm_mask_mul_ss, _mm_maskz_mul_ss, _mm_mask_div_sd)
27558         (_mm_maskz_div_sd, _mm_mask_div_ss, _mm_maskz_div_ss): New intrinsics.
27559         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
27560         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
27561         * config/i386/i386-builtin.def (__builtin_ia32_divsd_mask_round)
27562         (__builtin_ia32_divss_mask_round, __builtin_ia32_mulsd_mask_round)
27563         (__builtin_ia32_mulss_mask_round): New builtins.
27564         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
27565         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
27566         * config/i386/sse.md (<sse>_vm<multdiv_mnemonic><mode>3<round_name>):
27567         Rename to ...
27568         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): ... this.
27569         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
27570         Change to ...
27571         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
27572         ... this.
27573
27574 2017-05-10  Julia Koval  <julia.koval@intel.com>
27575
27576         * config/i386/avxintrin.h (_mm256_set_m128, _mm256_set_m128d)
27577         (_mm256_set_m128i, _mm256_setr_m128, _mm256_setr_m128d)
27578         (_mm256_setr_m128i): New intrinsics.
27579
27580 2017-05-10  Julia Koval  <julia.koval@intel.com>
27581
27582         * config/i386/avx512fintrin.h (_mm_mask_rcp14_sd)
27583         (_mm_maskz_rcp14_sd, _mm_mask_rcp14_ss)
27584         (_mm_maskz_rcp14_ss): New intrinsics.
27585         * config/i386/i386-builtin.def (__builtin_ia32_rcp14sd_mask)
27586         (__builtin_ia32_rcp14ss_mask): New builtins.
27587         * config/i386/sse.md (srcp14<mode>_mask): New pattern.
27588
27589 2017-05-10  Peter Bergner  <bergner@vnet.ibm.com>
27590
27591         PR tree-optimization/51513
27592         * tree-cfg.c (gimple_seq_unreachable_p): New function.
27593         (assert_unreachable_fallthru_edge_p): Use it.
27594         (group_case_labels_stmt): Likewise.
27595         * tree-cfg.h: Prototype it.
27596         * stmt.c: Include cfghooks.h and tree-cfg.h.
27597         (emit_case_dispatch_table) <gap_label>: New local variable.
27598         Use it to fill dispatch table gaps.
27599         Test for default_label before updating probabilities.
27600         (expand_case) <default_label>: Remove unneeded initialization.
27601         Test for unreachable default case statement and remove its edge.
27602         Set default_label accordingly.
27603         * tree-ssa-ccp.c (optimize_unreachable): Update comment.
27604
27605 2017-05-10  Carl Love  <cel@us.ibm.com>
27606
27607         * config/rs6000/rs6000-c: Add support for built-in functions
27608         vector signed char      vec_neg (vector signed char)
27609         vector signed short int vec_neg (vector short int)
27610         vector signed int       vec_neg (vector signed int)
27611         vector signed long long vec_neg (vector signed long long)
27612         vector float            vec_neg (vector float)
27613         vector double           vec_neg (vector double)
27614         * config/rs6000/rs6000-builtin.def: Add definitions for NEG function
27615         overload.
27616         * config/rs6000/altivec.h: Add define for vec_neg
27617         * doc/extend.texi: Update the built-in documentation for the
27618         new built-in functions.
27619
27620 2017-05-10  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
27621
27622         PR tree-optimization/77644
27623         * match.pd (sqrt(x) cmp sqrt(y) -> x cmp y): New pattern.
27624
27625 2017-05-10  Nathan Sidwell  <nathan@acm.org>
27626
27627         * dumpfile.h (TDI_lang_all): New.
27628         (TDF_KIND): New. Renumber others
27629         (TDF_LANG, TDF_TREE, TDF_RTL, TDF_IPA): Enumerate value, rather
27630         than bits.
27631         * dumpfile.c (dump_files): Mark language dumps as TDF_LANG.  add
27632         lang-all.
27633         (get_dump_file_name): Adjust suffix generation.
27634         (dump_enable_all): Use TDF_KIND.
27635         * doc/invoke.texi (-fdump-lang-all): Document.
27636
27637         * dumpfile.h: Tabify.
27638
27639 2017-05-10  Wilco Dijkstra  <wdijkstr@arm.com>
27640
27641         PR target/80671
27642         * config/aarch64/cortex-a57-fma-steering.c (merge_forest):
27643         Move member access before delete.
27644
27645 2017-05-10  Alexandre Oliva <aoliva@redhat.com>
27646
27647         * tree-inline.c (expand_call_inline): Split block at stmt
27648         before the call.
27649
27650 2017-05-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
27651
27652         PR target/68163
27653         * config/rs6000/rs6000.md (f32_lr): Delete mode attributes that
27654         are now unused after splitting mov{sf,sd}_hardfloat.
27655         (f32_lr2): Likewise.
27656         (f32_lm): Likewise.
27657         (f32_lm2): Likewise.
27658         (f32_li): Likewise.
27659         (f32_li2): Likewise.
27660         (f32_lv): Likewise.
27661         (f32_sr): Likewise.
27662         (f32_sr2): Likewise.
27663         (f32_sm): Likewise.
27664         (f32_sm2): Likewise.
27665         (f32_si): Likewise.
27666         (f32_si2): Likewise.
27667         (f32_sv): Likewise.
27668         (f32_dm): Likewise.
27669         (f32_vsx): Likewise.
27670         (f32_av): Likewise.
27671         (mov<mode>_hardfloat): Split into separate movsf and movsd pieces.
27672         For movsf, order stores so the VSX stores occur before the GPR
27673         store which encourages the register allocator to use a traditional
27674         FPR instead of a GPR.  For movsd, order the stores so that the GPR
27675         store comes before the VSX stores to allow the power6 to work.
27676         This is due to the power6 not having a 32-bit integer store
27677         instruction from a FPR.
27678         (movsf_hardfloat): Likewise.
27679         (movsd_hardfloat): Likewise.
27680
27681 2017-05-09  Martin Sebor  <msebor@redhat.com>
27682
27683         PR translation/80280
27684         * config/sol2-c.c (cmn_err_flag_specs): Initialize new data member
27685         added in r247778.
27686
27687         PR translation/80280
27688         * config/i386/msformat-c.c (ms_printf_flag_specs): Initialize new
27689         data member added in r247778.
27690         (ms_scanf_flag_specs, ms_strftime_flag_specs): Same.
27691
27692 2017-05-09  Nathan Sidwell  <nathan@acm.org>
27693
27694         * tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Unconditionally pure.
27695
27696         * ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope
27697         typedefs.
27698
27699 2017-05-09  Marek Polacek  <polacek@redhat.com>
27700
27701         * doc/invoke.texi: Fix typo.
27702
27703 2017-05-09  Richard Biener  <rguenther@suse.de>
27704
27705         * tree-vrp.c (vrp_val_is_max): Adjust comment.
27706         (vrp_val_is_min): Likewise.
27707         (set_value_range_to_value): Likewise.
27708         (set_value_range_to_nonnegative): Likewise.
27709         (gimple_assign_nonzero_p): Likewise.
27710         (gimple_stmt_nonzero_p): Likewise.
27711         (vrp_int_const_binop): Likewise.  Remove unreachable case.
27712         (adjust_range_with_scev): Adjust comments.
27713         (compare_range_with_value): Likewise.
27714         (extract_range_from_phi_node): Likewise.
27715         (test_for_singularity): Likewise.
27716
27717 2017-05-09  Richard Biener  <rguenther@suse.de>
27718
27719         * tree-vrp.c (get_single_symbol): Add assert that we don't
27720         get overflowed constants as invariant part.
27721         (compare_values_warnv): Add comment before the TREE_NO_WARNING
27722         checks.  Use wi::cmp instead of recursing for integer constants.
27723         (compare_values): Just ignore whether we assumed undefined
27724         overflow instead of failing the compare.
27725         (extract_range_for_var_from_comparison_expr): Add comment before the
27726         TREE_NO_WARNING sets.
27727         (test_for_singularity): Likewise.
27728         (extract_range_from_comparison): Do not disable optimization
27729         when we assumed undefined overflow.
27730         (extract_range_basic): Remove init of unused var.
27731
27732 2017-05-09  Richard Biener  <rguenther@suse.de>
27733
27734         * tree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify.
27735         (extract_range_from_multiplicative_op_1): Adjust.
27736         (extract_range_from_binary_expr_1): Use int_const_binop.
27737
27738 2017-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
27739
27740         PR target/80101
27741         * config/rs6000/power6.md: Replace store_data_bypass_p calls with
27742         rs6000_store_data_bypass_p in seven define_bypass directives and
27743         in several comments.
27744         * config/rs6000/rs6000-protos.h: Add prototype for
27745         rs6000_store_data_bypass_p function.
27746         * config/rs6000/rs6000.c (rs6000_store_data_bypass_p): New
27747         function implements slightly different (rs6000-specific) semantics
27748         than store_data_bypass_p, returning false rather than aborting
27749         with assertion error when arguments do not satisfy the
27750         requirements of store data bypass.
27751         (rs6000_adjust_cost): Replace six calls of store_data_bypass_p with
27752         rs6000_store_data_bypass_p.
27753
27754 2017-05-08  Max Filippov  <jcmvbkbc@gmail.com>
27755
27756         * config/xtensa/xtensa-protos.h
27757         (xtensa_initial_elimination_offset): New declaration.
27758         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
27759         New function. Move its body from the INITIAL_ELIMINATION_OFFSET
27760         macro definition, add case for FRAME_POINTER_REGNUM when
27761         FRAME_GROWS_DOWNWARD.
27762         * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): New macro definition.
27763         (INITIAL_ELIMINATION_OFFSET): Replace body with call to
27764         xtensa_initial_elimination_offset.
27765
27766 2017-05-08  Nathan Sidwell  <nathan@acm.org>
27767
27768         * doc/invoke.texi: Alphabetize -fdump options.
27769
27770 2017-05-08  Martin Sebor  <msebor@redhat.com>
27771
27772         PR translation/80280
27773         * config/sol2-c.c (solaris_pragma_align): Correct quoting.
27774
27775 2017-05-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>
27776
27777         * target.def (compute_frame_layout): New optional target hook.
27778         * doc/tm.texi.in (TARGET_COMPUTE_FRAME_LAYOUT): Add hook.
27779         * doc/tm.texi (TARGET_COMPUTE_FRAME_LAYOUT): Add documentation.
27780         * lra-eliminations.c (update_reg_eliminate): Call compute_frame_layout
27781         target hook.
27782         * reload1.c (verify_initial_elim_offsets): Likewise.
27783         * config/arm/arm.c (TARGET_COMPUTE_FRAME_LAYOUT): Define.
27784         (use_simple_return_p): Call arm_compute_frame_layout if needed.
27785         (arm_get_frame_offsets): Split up into this ...
27786         (arm_compute_frame_layout): ... and this function.
27787
27788 2017-05-08  Richard Sandiford  <richard.sandiford@arm.com>
27789
27790         * config/aarch64/constraints.md (Usa): New constraint.
27791         * config/aarch64/aarch64.md (*movsi_aarch64, *movdi_aarch64): Use it.
27792
27793 2017-05-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>
27794
27795         * config.gcc (arm*-*-*): Set TM_MULTILIB_CONFIG from
27796         with_multilib_list after it has been checked.
27797
27798 2017-05-08  Richard Biener  <rguenther@suse.de>
27799
27800         * tree-ssa-pre.c (bitmap_set_and): Avoid bitmap copy.
27801         (bitmap_set_subtract_values): Likewise.
27802
27803 2017-05-08  Richard Biener  <rguenther@suse.de>
27804
27805         * tree-vrp.c (gimple_assign_nonzero_warnv_p): Rename to ...
27806         (gimple_assign_nonzero): ... this and remove strict_overflow_p
27807         argument.
27808         (gimple_stmt_nonzero_warnv_p): Rename to ...
27809         (gimple_stmt_nonzero_p): ... this and remove strict_overflow_p
27810         argument.
27811         (vrp_stmt_computes_nonzero): Remove strict_overflow_p argument.
27812         (extract_range_basic): Adjust, do not disable propagation on
27813         strict overflow sensitive simplification.
27814         (vrp_visit_cond_stmt): Likewise.
27815
27816 2017-05-05  Jan Hubicka  <hubicka@ucw.cz>
27817
27818         * ipa-inline-analysis.c (estimate_function_body_sizes): Recompute
27819         body size unconditionally.
27820
27821 2017-05-07  Jeff Law  <law@redhat.com>
27822
27823         Revert:
27824         2017-05-06  Jeff Law  <law@redhat.com>
27825         PR tree-optimization/78496
27826         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
27827         code.
27828
27829         PR tree-optimization/78496
27830         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
27831         (simplify_stmt_using_ranges): Call it.
27832         (vrp_dom_walker::before_dom_children): Extract equivalences
27833         from an ASSERT_EXPR with an equality comparison against a
27834         constant.
27835
27836 2017-05-06  Jeff Law  <law@redhat.com>
27837
27838         PR tree-optimization/78496
27839         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
27840         code.
27841
27842         PR tree-optimization/78496
27843         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
27844         (simplify_stmt_using_ranges): Call it.
27845         (vrp_dom_walker::before_dom_children): Extract equivalences
27846         from an ASSERT_EXPR with an equality comparison against a
27847         constant.
27848
27849 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
27850
27851         * lra-constraints.c (lra_copy_reg_equiv): New function.
27852         (split_reg): Use it to copy equivalence information from the
27853         original register to the spill register.
27854
27855 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
27856
27857         PR rtl-optimization/75964
27858         * simplify-rtx.c (simplify_const_relational_operation): Remove
27859         invalid handling of comparisons of integer ABS.
27860
27861 2017-05-06  Uros Bizjak  <ubizjak@gmail.com>
27862
27863         * config/i386/i386.c (ext_80387_constant_init): Do not explicitly
27864         initialize to zero.
27865         (init_regs): Remove declaration.
27866         (function_arg_advance_32): Initialize error_p as boolean variable.
27867
27868 2017-05-05  Nathan Sidwell  <nathan@acm.org>
27869
27870         * store-motion.c (remove_reachable_equiv_notes): Reformat long
27871         lines.  Use for (;;).
27872
27873 2017-05-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27874
27875         * config/rs6000/rs6000.c (rs6000_vect_nonmem): New static var.
27876         (rs6000_init_cost): Initialize rs6000_vect_nonmem.
27877         (rs6000_add_stmt_cost): Update rs6000_vect_nonmem.
27878         (rs6000_finish_cost): Avoid vectorizing simple copy loops with
27879         VF=2 that require versioning.
27880
27881 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
27882
27883         * diagnostic.h (CARET_LINE_MARGIN): Convert from macro to const
27884         int.
27885
27886 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
27887
27888         * diagnostic.h (diagnostic_override_option_index): Convert from
27889         macro to inline function.
27890
27891 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
27892
27893         * diagnostic.c (last_module_changed_p): New function.
27894         (set_last_module): New function.
27895         (diagnostic_report_current_module): Convert macro usage to
27896         the above functions.
27897         * diagnostic.h (diagnostic_context::last_module): Strengthen
27898         from const line_map * to const line_map_ordinary *.
27899         (diagnostic_last_module_changed): Delete macro.
27900         (diagnostic_set_last_module): Delete macro.
27901
27902 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
27903
27904         * diagnostic.c (diagnostic_impl): Replace report_diagnostic
27905         with diagnostic_report_diagnostic.
27906         (diagnostic_n_impl_richloc): Likewise.
27907         * diagnostic.h (report_diagnostic): Delete macro.
27908         * rtl-error.c (diagnostic_for_asm): Replace report_diagnostic
27909         with diagnostic_report_diagnostic.
27910         * substring-locations.c (format_warning_va): Likewise.
27911
27912 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
27913
27914         * diagnostic.c (diagnostic_report_diagnostic): Eliminate
27915         save/restor of format_spec.  Move option-printing code to...
27916         (print_option_information): ...this new function, and
27917         reimplement by simply printing to the pretty_printer,
27918         rather than appending to the format string.
27919
27920 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
27921
27922         * diagnostic.c (diagnostic_report_diagnostic): Split out pragma
27923         handling logic into...
27924         (update_effective_level_from_pragmas): ...this new function.
27925
27926 2017-05-04  Andrew Waterman  <andrew@sifive.com>
27927
27928         * config/riscv/riscv.opt (mstrict-align): New option.
27929         * config/riscv/riscv.h (STRICT_ALIGNMENT): Use it.  Update comment.
27930         (SLOW_UNALIGNED_ACCESS): Define.
27931         (riscv_slow_unaligned_access): Declare.
27932         * config/riscv/riscv.c (riscv_tune_info): Add slow_unaligned_access
27933         field.
27934         (riscv_slow_unaligned_access): New variable.
27935         (rocket_tune_info): Set slow_unaligned_access to true.
27936         (optimize_size_tune_info): Set slow_unaligned_access to false.
27937         (riscv_cpu_info_table): Add entry for optimize_size_tune_info.
27938         (riscv_valid_lo_sum_p): Use TARGET_STRICT_ALIGN.
27939         (riscv_option_override): Set riscv_slow_unaligned_access.
27940         * doc/invoke.texi: Add -mstrict-align to RISC-V.
27941
27942 2017-05-04  Kito Cheng  <kito.cheng@gmail.com>
27943
27944         * config/riscv/riscv.md: Unify indentation.
27945
27946 2017-05-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
27947
27948         PR target/79038
27949         PR target/79202
27950         PR target/79203
27951         * config/rs6000/rs6000.md (u code attribute): Add FIX and
27952         UNSIGNED_FIX.
27953         (extendsi<mode>2): Add support for doing sign extension via
27954         VUPKHSW and XXPERMDI if the value is in Altivec registers and we
27955         don't have ISA 3.0 instructions.
27956         (extendsi<mode>2 splitter): Likewise.
27957         (fix_trunc<mode>si2): If we are at ISA 2.07 (VSX small integer),
27958         generate the normal insns since SImode can now go in vector
27959         registers.  Disallow the special UNSPECs needed for previous
27960         machines to hide SImode being used.  Add new insns
27961         fctiw{,w}_<mode>_smallint if SImode can go in vector registers.
27962         (fix_trunc<mode>si2_stfiwx): Likewise.
27963         (fix_trunc<mode>si2_internal): Likewise.
27964         (fixuns_trunc<mode>si2): Likewise.
27965         (fixuns_trunc<mode>si2_stfiwx): Likewise.
27966         (fctiw<u>z_<mode>_smallint): Likewise.
27967         (fctiw<u>z_<mode>_mem): New combiner pattern to prevent conversion
27968         of floating point to 32-bit integer from doing a direct move to
27969         the GPR registers to do a store.
27970         (fctiwz_<mode>): Break long line.
27971
27972 2017-05-05  Bin Cheng  <bin.cheng@arm.com>
27973
27974         * Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
27975         * tree-ssa-loop-ivopts.c (compute_max_addr_offset): Delete.
27976         (addr_list, addr_offset_valid_p): New.
27977         (split_address_groups): Check offset validity with above function.
27978         (gt-tree-ssa-loop-ivopts.h): Include header file.
27979
27980 2017-05-05  Nathan Sidwell  <nathan@acm.org>
27981
27982         * config.gcc (arm*-*-*): Add missing 'fi'.
27983
27984 2017-05-05  Steve Ellcey  <sellcey@cavium.com>
27985
27986         * doc/invoke.texi (-fopt-info): Explicitly say order of options
27987         included in -fopt-info does not matter.
27988         * doc/optinfo.texi (-fopt-info): Fix description of default
27989         behavour. Explicitly say order of options included in -fopt-info
27990         does not matter.
27991
27992 2017-05-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
27993
27994         * config.gcc: Allow combinations of aprofile and rmprofile values for
27995         --with-multilib-list.
27996         * config/arm/t-multilib: New file.
27997         * config/arm/t-aprofile: Remove initialization of MULTILIB_*
27998         variables.  Remove setting of ISA and floating-point ABI in
27999         MULTILIB_OPTIONS and MULTILIB_DIRNAMES.  Set architecture and FPU in
28000         MULTI_ARCH_OPTS_A and MULTI_ARCH_DIRS_A rather than MULTILIB_OPTIONS
28001         and MULTILIB_DIRNAMES respectively.  Add comment to introduce all
28002         matches.  Add architecture matches for marvel-pj4 and generic-armv7-a
28003         CPU options.
28004         * config/arm/t-rmprofile: Likewise except for the matches changes.
28005         * doc/install.texi (--with-multilib-list): Document the combination of
28006         aprofile and rmprofile values and warn about pitfalls in doing that.
28007
28008 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
28009
28010         * config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w.
28011         (movdi_aarch64): Likewise.
28012
28013 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
28014
28015         PR tree-optimization/80632
28016         * tree-switch-conversion.c (struct switch_conv_info): Add target_vop
28017         field.
28018         (build_arrays): Initialize it for virtual phis.
28019         (fix_phi_nodes): Use it for virtual phis.
28020
28021         PR tree-optimization/80558
28022         * tree-vrp.c (extract_range_from_binary_expr_1): Optimize
28023         [x, y] op z into [x op, y op z] for op & or | if conditions
28024         are met.
28025
28026 2017-05-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
28027             Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
28028
28029         PR target/71607
28030         * config/arm/arm.md (use_literal_pool): Remove.
28031         (64-bit immediate split): No longer takes cost into consideration
28032         if arm_disable_literal_pool is enabled.
28033         * config/arm/arm.c (arm_tls_referenced_p): Add diagnostic if TLS is
28034         used when arm_disable_literal_pool is enabled.
28035         (arm_max_const_double_inline_cost): Remove use of
28036         arm_disable_literal_pool.
28037         (push_minipool_fix): Add assert.
28038         (arm_reorg): Add return if arm_disable_literal_pool is enabled.
28039         * config/arm/vfp.md (no_literal_pool_df_immediate): New.
28040         (no_literal_pool_sf_immediate): New.
28041
28042 2017-05-05  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
28043
28044         PR tree-optimization/80613
28045         * tree-ssa-dce.c (propagate_necessity): Remove cases for
28046         BUILT_IN_STRDUP and BUILT_IN_STRNDUP.
28047
28048 2017-05-05  Richard Biener  <rguenther@suse.de>
28049
28050         * tree-ssa-pre.c (get_or_alloc_expr_for): Simplify.
28051
28052 2017-05-05  Georg-Johann Lay  <avr@gjlay.de>
28053
28054         * config/avr/avr.md [flag_strict_overflow]: Remove any occurence
28055         of this flag from insn conditions due to removal from r247495.
28056
28057 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
28058
28059         * config/arm/aarch-common.c (arm_early_load_addr_dep_ptr):
28060         New function.
28061         (arm_early_store_addr_dep_ptr): Likewise.
28062         * config/arm/aarch-common-protos.h
28063         (arm_early_load_addr_dep_ptr): Add prototype.
28064         (arm_early_store_addr_dep_ptr): Likewise.
28065         * config/arm/cortex-a53.md: Add new bypasses.
28066
28067 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
28068
28069         * tree.c (next_type_uid): Change type to unsigned.
28070         (type_hash_canon): Decrement back next_type_uid if
28071         freeing a type node with the highest TYPE_UID.  For INTEGER_TYPEs
28072         also ggc_free TYPE_MIN_VALUE, TYPE_MAX_VALUE and TYPE_CACHED_VALUES
28073         if possible.
28074
28075 2017-05-04  Martin Sebor  <msebor@redhat.com>
28076
28077         * builtins.c: Fix a trivial typo in a comment.
28078
28079         PR middle-end/79234
28080         * builtins.c (check_sizes): Adjust to handle reading past the end.
28081         Avoid printing excessive upper bound of ranges.  Use %E to print
28082         tree nodes instead of converting them to %wu.
28083         (expand_builtin_memchr): New function.
28084         (compute_dest_size): Rename...
28085         (compute_objsize): ...to this.
28086         (expand_builtin_memcpy): Adjust.
28087         (expand_builtin_mempcpy): Adjust.
28088         (expand_builtin_strcat): Adjust.
28089         (expand_builtin_strcpy): Adjust.
28090         (check_strncat_sizes): Adjust.
28091         (expand_builtin_strncat): Adjust.
28092         (expand_builtin_strncpy): Adjust and simplify.
28093         (expand_builtin_memset): Adjust.
28094         (expand_builtin_bzero): Adjust.
28095         (expand_builtin_memcmp): Adjust.
28096         (expand_builtin): Handle memcmp.
28097         (maybe_emit_chk_warning): Check strncat just once.
28098
28099 2017-05-04  Martin Sebor  <msebor@redhat.com>
28100
28101         PR preprocessor/79214
28102         PR middle-end/79222
28103         PR middle-end/79223
28104         * builtins.c (check_sizes): Add inlining context and issue
28105         warnings even when -Wno-system-headers is set.
28106         (check_strncat_sizes): Same.
28107         (expand_builtin_strncat): Same.
28108         (expand_builtin_memmove): New function.
28109         (expand_builtin_stpncpy): Same.
28110         (expand_builtin): Handle memmove and stpncpy.
28111
28112 2017-05-04  Bin Cheng  <bin.cheng@arm.com>
28113
28114         * tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr
28115         which is not used any more.
28116
28117 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
28118
28119         * config/aarch64/aarch64.c (generic_tunings): Update prefetch model.
28120
28121 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
28122
28123         * config/aarch64/aarch64.c (cortexa35_tunings): Set jump alignment to 4.
28124         (cortexa53_tunings): Likewise.
28125         (cortexa57_tunings): Likewise.
28126         (cortexa72_tunings): Likewise.
28127         (cortexa73_tunings): Likewise.
28128
28129 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
28130
28131         * config/aarch64/aarch64.c (generic_tunings): Set jump alignment to 4.
28132         Set loop alignment to 8.
28133
28134 2017-05-04  Martin Sebor  <msebor@redhat.com>
28135
28136         PR translation/80280
28137         * builtins.c (expand_builtin_object_size): Add missing quoting to
28138         %D and like directives.
28139         * hsa-gen.c (hsa_type_for_scalar_tree_type): Same.
28140         (hsa_type_for_tree_type): Same.
28141         (verify_function_arguments): Same.
28142         * symtab.c (symbol_table::change_decl_assembler_name): Same.
28143         * varasm.c (get_section): Same.
28144         (mark_weak): Same.
28145
28146 2017-05-04  Martin Sebor  <msebor@redhat.com>
28147
28148         PR translation/80280
28149         * config/i386/i386.c (ix86_function_versions): Quote a %D directive.
28150
28151 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
28152
28153         * config/aarch64/aarch64.c (generic_addrcost_table):
28154         Change HI/TI mode setting.
28155
28156 2017-05-04  Martin Jambor  <mjambor@suse.cz>
28157
28158         PR tree-optimization/80622
28159         * tree-sra.c (comes_initialized_p): New function.
28160         (build_accesses_from_assign): Only set write lazily when
28161         comes_initialized_p is false.
28162         (analyze_access_subtree): Use comes_initialized_p.
28163         (propagate_subaccesses_across_link): Assert !comes_initialized_p
28164         instead of testing for PARM_DECL.
28165
28166 2017-05-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28167
28168         * config/aarch64/aarch64.md (prefetch); Adjust predicate and
28169         constraint on operand 0 to allow more general addressing modes.
28170         Adjust output template.
28171         * config/aarch64/aarch64.c (aarch64_address_valid_for_prefetch_p):
28172         New function.
28173         * config/aarch64/aarch64-protos.h
28174         (aarch64_address_valid_for_prefetch_p): Declare prototype.
28175         * config/aarch64/constraints.md (Dp): New address constraint.
28176         * config/aarch64/predicates.md (aarch64_prefetch_operand): New
28177         predicate.
28178
28179 2017-05-04  Jan Hubicka  <hubicka@ucw.cz>
28180
28181         * ipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter;
28182         update use of estimate_ipcp_clone_size_and_time.
28183         (estimate_local_effects): Update use of
28184         estimate_ipcp_clone_size_and_time and perform_estimation_of_a_value.
28185         * ipa-inline.h (estimate_ipcp_clone_size_and_time): Update prototype.
28186         * ipa-inline-analysis.c (estimate_ipcp_clone_size_and_time):
28187         Return nonspecialized time.
28188
28189 2017-05-04  Richard Biener  <rguenther@suse.de>
28190
28191         * tree-ssa-alias.c (get_continuation_for_phi): Improve looking
28192         for the last VUSE which def dominates the PHI.  Directly call
28193         maybe_skip_until.
28194         (get_continuation_for_phi_1): Remove.
28195
28196 2017-05-04  Richard Sandiford  <richard.sandiford@linaro.org>
28197
28198         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Add commentary
28199         to explain the use of truncating division.  Cap the number of
28200         iterations to the maximum given by nb_iterations_upper_bound,
28201         if defined.
28202
28203 2017-05-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
28204
28205         * configure.ac (--enable-mingw-wildcard): Add new configurable feature.
28206         * configure: Regenerate.
28207         * config.in: Regenerate.
28208         * config/i386/driver-mingw32.c: new file.
28209         * config/i386/x-mingw32: Add rule to build driver-mingw32.o.
28210         * config.host: Link driver-mingw32.o on MinGW host.
28211         * doc/install.texi: Document new --enable-mingw-wildcard configure
28212         option.
28213
28214 2017-05-04  Marek Polacek  <polacek@redhat.com>
28215
28216         PR tree-optimization/80612
28217         * calls.c (get_size_range): Check for INTEGRAL_TYPE_P.
28218
28219 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
28220             Andre Simoes Dias Vieira  <andre.simoesdiasvieira@arm.com>
28221
28222         * config/arm/arm.md (movsi): Change TARGET_32BIT to TARGET_HAVE_MOVT.
28223         (movt splitter): Likewise.
28224         * config/arm/arm.c (arm_option_check_internal): Change arm_arch_thumb2
28225         to TARGET_HAVE_MOVT, and merge with -mslow-flash-data check.
28226         (const_ok_for_arm): Change else to else if (TARGET_THUMB2) and add else
28227         block for Thumb-1 with MOVT.
28228         (thumb2_legitimate_address_p): Move code block ...
28229         (can_avoid_literal_pool_for_label_p): ... into this new function.
28230         (thumb1_legitimate_address_p): Add check for TARGET_HAVE_MOVT and
28231         literal pool.
28232         (thumb_legitimate_constant_p): Add conditional on TARGET_HAVE_MOVT
28233         * doc/invoke.texi (-mpure-code): Change "ARMv7-M targets" for
28234         "M-profile targets with the MOVT instruction".
28235
28236 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
28237
28238         * config/arm/arm-builtins.c (arm_init_builtins): Rename
28239         __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
28240         __builtin_arm_stfscr to __builtin_arm_set_fpscr.
28241
28242 2017-05-04  Martin Liska  <mliska@suse.cz>
28243
28244         * tree-vrp.c (simplify_cond_using_ranges_2): Remove unused
28245         variable cond_code.
28246
28247 2017-05-04  Richard Biener  <rguenther@suse.de>
28248
28249         * tree.c (array_at_struct_end_p): Handle arrays at struct
28250         end with flexarrays more conservatively.  Refactor and treat
28251         arrays of arrays or aggregates more strict.  Fix
28252         VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
28253         * tree.c (array_at_struct_end_p): Adjust prototype.
28254         * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust.
28255         * gimple-fold.c (get_range_strlen): Likewise.
28256         * tree-chkp.c (chkp_may_narrow_to_field): Likewise.
28257
28258 2017-05-04  Richard Biener  <rguenther@suse.de>
28259
28260         PR tree-optimization/31130
28261         * tree-vrp.c (needs_overflow_infinity): Remove as always returning
28262         false.
28263         (supports_overflow_infinity): Likewise.
28264         (is_negative_overflow_infinity): Likewise.
28265         (is_positive_overflow_infinity): Likewise.
28266         (is_overflow_infinity): Likewise.
28267         (stmt_overflow_infinity): Likewise.
28268         (overflow_infinity_range_p): Likewise.
28269         (usable_range_p): Remove as always returning true.
28270         (make_overflow_infinity): Remove.
28271         (negative_overflow_infinity): Likewise.
28272         (positive_overflow_infinity): Likewise.
28273         (avoid_overflow_infinity): Likewise.
28274         (set_value_range): Adjust accordingly.
28275         (set_value_range_to_nonnegative): Likewise, remove now unused
28276         overflow_infinity arg.
28277         (vrp_operand_equal_p): Adjust.
28278         (update_value_range): Likewise.
28279         (range_int_cst_singleton_p): Likewise.
28280         (operand_less_p): Likewise.
28281         (compare_values_warnv): Likewise.
28282         (extract_range_for_var_from_comparison_expr): Likewise.
28283         (vrp_int_const_binop): Likewise.
28284         (zero_nonzero_bits_from_vr): Likewise.
28285         (extract_range_from_multiplicative_op_1): Likewise.
28286         (extract_range_from_binary_expr_1): Likewise.
28287         (extract_range_from_unary_expr): Likewise.
28288         (extract_range_from_comparison): Likewise.
28289         (extract_range_basic): Likewise.
28290         (adjust_range_with_scev): Likewise.
28291         (compare_ranges): Likewise.
28292         (compare_range_with_value): Likewise.
28293         (dump_value_range): Likewise.
28294         (test_for_singularity): Likewise, remove strict_overflow_p parameter
28295         never used.
28296         (simplify_cond_using_ranges): Adjust.
28297
28298 2017-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
28299
28300         * brig-builtins.def: Added a builtin for class_f64.
28301         * builtin-types.def: Added a builtin type needed by class_f64.
28302
28303 2017-05-03  Jason Merrill  <jason@redhat.com>
28304
28305         * timevar.def: Add TV_CONSTEXPR.
28306
28307 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
28308
28309         * common.opt (fdiagnostics-parseable-fixits): Fix typo.
28310
28311 2017-05-03  Martin Jambor  <mjambor@suse.cz>
28312
28313         * ipa-prop.c (ipa_update_after_lto_read): Removed.
28314         * ipa-prop.h (ipa_update_after_lto_read): Remove declaration.
28315         * ipa-cp.c (ipcp_propagate_stage): Do not call
28316         ipa_update_after_lto_read.
28317         * ipa-inline.c (ipa_inline): Likewise.
28318
28319 2017-05-03  Martin Jambor  <mjambor@suse.cz>
28320
28321         * ipa-prop.h (ipa_edge_args): Make a class.  Mark with for_user GTY
28322         tag.  Added a default constructor and a destructor.
28323         (ipa_edge_args_sum_t): New class;
28324         (ipa_edge_args_sum): Declare.
28325         (ipa_edge_args_vector): Remove declaration.
28326         (IPA_EDGE_REF): Use ipa_edge_args_sum.
28327         (ipa_free_edge_args_substructures): Remove declaration.
28328         (ipa_check_create_edge_args): Use ipa_edge_args_sum.
28329         (ipa_edge_args_info_available_for_edge_p): Likewise.
28330         * ipa-prop.c (ipa_edge_args_vector): Removed.
28331         (edge_removal_hook_holder): Likewise.
28332         (edge_duplication_hook_holder): Likewise.
28333         (ipa_edge_args_sum): New variable.
28334         (ipa_propagate_indirect_call_infos): Test ipa_edge_args_sum instead of
28335         ipa_edge_args_vector.
28336         (ipa_free_edge_args_substructures): Likewise.
28337         (ipa_free_all_edge_args): Free ipa_edge_args_sum instead of
28338         ipa_edge_args_vector.
28339         (ipa_edge_removal_hook): Turned into method
28340         ipa_edge_args_sum_t::remove.
28341         (ipa_edge_duplication_hook): Turned into method
28342         ipa_edge_args_sum_t::duplicate.
28343         (ipa_register_cgraph_hooks): Create ipa_edge_args_sum instead of
28344         registering edge hooks.
28345         (ipa_unregister_cgraph_hooks): Do not unregister edge hooks.
28346         * ipa-inline-analysis.c (estimate_function_body_sizes): Test
28347         ipa_edge_args_sum instead of ipa_edge_args_vector.
28348         * ipa-profile.c (ipa_profile): Likewise.
28349
28350 2017-05-03  Martin Jambor  <mjambor@suse.cz>
28351
28352         * symbol-summary.h (function_summary): New method exists.
28353         (function_summary::symtab_removal): Deallocate through release.
28354         (call_summary): New class.
28355         (gt_ggc_mx): New overload.
28356         (gt_pch_nx): Likewise.
28357         (gt_pch_nx): Likewise.
28358
28359 2017-05-03  Jeff Law  <law@redhat.com>
28360
28361         PR tree-optimization/78496
28362         * tree-vrp.c (simplify_cond_using_ranges_1): Renamed
28363         from simplify_cond_using_ranges.  Split off code to walk
28364         backwards through casts into ...
28365         (simplify_cond_using_ranges_2): New function.
28366         (simplify_stmt_using_ranges): Call simplify_cond_using_ranges_1.
28367         (execute_vrp): After identifying jump threads, call
28368         simplify_cond_using_ranges_2.
28369
28370 2017-05-03  Jan Hubicka  <hubicka@ucw.cz>
28371
28372         PR bootstrap/80609
28373         * ipa-inline.h (inline_summary): Add ctor.
28374         (create_ggc): Do not use ggc_cleared_alloc.
28375
28376 2017-05-03  Jeff Downs  <heydowns@somuchpressure.net>
28377             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
28378
28379         * gcc.c (handle_braces): Support escaping in switch matching
28380         text.
28381         * doc/invoke.texi (Spec Files): Document it.
28382         Remove superfluous @code markup in items.
28383
28384 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
28385
28386         * diagnostic-show-locus.c (struct column_range): New struct.
28387         (get_affected_columns): New function.
28388         (get_printed_columns): New function.
28389         (struct correction): New struct.
28390         (correction::ensure_capacity): New function.
28391         (correction::ensure_terminated): New function.
28392         (struct line_corrections): New struct.
28393         (line_corrections::~line_corrections): New dtor.
28394         (line_corrections::add_hint): New function.
28395         (layout::print_trailing_fixits): Reimplement in terms of the new
28396         classes.
28397         (selftest::test_overlapped_fixit_printing): New function.
28398         (selftest::diagnostic_show_locus_c_tests): Call it.
28399
28400 2017-05-03  Nathan Sidwell  <nathan@acm.org>
28401
28402         Canonicalize canonical type hashing
28403         * tree.h (type_hash_canon_hash): Declare.
28404         * tree.c (type_hash_list, attribute_hash_list): Move into
28405         type_hash_canon_hash.
28406         (build_type_attribute_qual_variant): Break out hash code calc into
28407         type_hash_canon_hash.
28408         (type_hash_canon_hash): New.  Generic type hash computation.
28409         (build_range_type_1, build_array_type_1, build_function_type,
28410         build_method_type_directly, build_offset_type, build_complex_type,
28411         make_vector_type): Call it.
28412
28413 2017-05-03  Richard Biener  <rguenther@suse.de>
28414
28415         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
28416         When all DRs have unknown misaligned do not always peel
28417         when there is a store but apply the same costing model as if
28418         there were only loads.
28419
28420 2017-05-03  Richard Biener  <rguenther@suse.de>
28421
28422         Revert
28423         PR tree-optimization/80492
28424         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
28425         compare_base_decls returning dont-know properly.
28426
28427 2017-05-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>
28428
28429         * config/arm/iterators.md (CCSI): New mode iterator.
28430         (arch): New mode attribute.
28431         * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Rename into ...
28432         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): This and ...
28433         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): This.  Use CCSI
28434         code iterator for success result mode.
28435         * config/arm/arm.c (arm_expand_compare_and_swap): Adapt code to use
28436         the corresponding new insn generators.
28437
28438 2017-05-03  Bin Cheng  <bin.cheng@arm.com>
28439
28440         Revert r247509
28441         2017-05-02  Bin Cheng  <bin.cheng@arm.com>
28442         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
28443
28444 2017-05-03  Richard Sandiford  <richard.sandiford@linaro.org>
28445
28446         * tree-data-ref.h (SUB_CONFLICTS_IN_A): Wrap SUB argument in brackets.
28447         (SUB_CONFLICTS_IN_B, SUB_LAST_CONFLICT, SUB_DISTANCE): Likewise.
28448         (DDR_A): Wrap DDR argument in brackets.
28449         (DDR_B, DDR_AFFINE_P, DDR_ARE_DEPENDENT, DDR_SUBSCRIPTS): Likewise.
28450         (DDR_LOOP_NEST, DDR_INNER_LOOP, DDR_SELF_REFERENCE): Likewise.
28451         (DDR_REVERSED_P): Likewise.
28452
28453 2017-05-03  Jakub Jelinek  <jakub@redhat.com>
28454
28455         PR tree-optimization/79472
28456         * tree-switch-conversion.c (struct switch_conv_info): Add
28457         contiguous_range and default_case_nonstandard fields.
28458         (collect_switch_conv_info): Compute contiguous_range and
28459         default_case_nonstandard fields, don't clear final_bb if
28460         contiguous_range and only the default case doesn't have the required
28461         structure.
28462         (check_all_empty_except_final): Set default_case_nonstandard instead
28463         of failing if contiguous_range and the default case doesn't have empty
28464         block.
28465         (check_final_bb): Add SWTCH argument, don't fail if contiguous_range
28466         and only the default case doesn't have the required constants.  Skip
28467         virtual phis.
28468         (gather_default_values): Skip virtual phis.  Allow non-NULL CASE_LOW
28469         if default_case_nonstandard.
28470         (build_constructors): Build constant 1 just once.  Assert that default
28471         values aren't inserted in between cases if contiguous_range.  Skip
28472         virtual phis.
28473         (build_arrays): Skip virtual phis.
28474         (prune_bbs): Add DEFAULT_BB argument, don't remove that bb.
28475         (fix_phi_nodes): Don't add e2f phi arg if default_case_nonstandard.
28476         Handle virtual phis.
28477         (gen_inbound_check): Handle default_case_nonstandard case.
28478         (process_switch): Adjust check_final_bb caller.  Call
28479         gather_default_values with the first non-default case instead of
28480         default case if default_case_nonstandard.
28481
28482 2017-05-02  Nathan Sidwell  <nathan@acm.org>
28483
28484         * ggc-page.c (move_ptes_to_front): Replace unsigned >0 with i--
28485         check.  Fix formatting.
28486
28487 2017-05-02  Jan Hubicka  <hubicka@ucw.cz>
28488
28489         * ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff
28490         errors when comparing specialized and unspecialized times.
28491
28492 2017-05-02  David Malcolm  <dmalcolm@redhat.com>
28493
28494         * diagnostic-show-locus.c
28495         (layout::should_print_annotation_line_p): Make private.
28496         (layout::print_annotation_line): Make private.
28497         (layout::annotation_line_showed_range_p): Make private.
28498         (layout::show_ruler): Make private.
28499         (layout::print_source_line): Make private.  Pass in line and
28500         line_width, rather than calling location_get_source_line.  Drop
28501         returned value.
28502         (layout::print_leading_fixits): New method.
28503         (layout::print_any_fixits): Rename to...
28504         (layout::print_trailing_fixits): ...this, and make private.
28505         Don't print newline fixits.
28506         (diagnostic_show_locus): Move logic for printing one row into...
28507         (layout::print_line): ...this new function.  Move the
28508         location_get_source_line call and error-handling from
28509         print_source_line to here.  Call print_leading_fixits, and rename
28510         print_any_fixits to print_trailing_fixits.
28511         (selftest::test_fixit_insert_containing_newline): Update now that
28512         newlines are partially supported.
28513         (selftest::test_fixit_insert_containing_newline_2): New test.
28514         (selftest::test_fixit_replace_containing_newline): Update comments.
28515         (selftest::diagnostic_show_locus_c_tests): Call the new test.
28516         * edit-context.c (class added_line): New class.
28517         (class edited_line): Describe newline handling in comment.
28518         (edited_line::actually_edited_p): New method.
28519         (edited_line::print_content): Delete redundant decl.
28520         (edited_line::m_predecessors): New field.
28521         (edited_file::print_content): Call edited_line::print_content.
28522         (edited_file::print_diff): Update to support newlines.
28523         (edited_file::print_diff_hunk): Likewise.
28524         (edited_file::print_run_of_changed_lines): New function.
28525         (edited_file::print_diff_line): Convert to...
28526         (print_diff_line): ...this.
28527         (edited_file::get_effective_line_count): New function.
28528         (edited_line::edited_line): Initialize new field m_predecessors.
28529         (edited_line::~edited_line): Clean up m_predecessors.
28530         (edited_line::apply_fixit): Handle newlines.
28531         (edited_line::get_effective_line_count): New function.
28532         (edited_line::print_content): New function.
28533         (edited_line::print_diff_lines): New function.
28534         (selftest::test_applying_fixits_insert_containing_newline): New
28535         test.
28536         (selftest::test_applying_fixits_replace_containing_newline): New
28537         test.
28538         (selftest::insert_line): New function.
28539         (selftest::test_applying_fixits_multiple_lines): Add example of
28540         inserting a line.
28541         (selftest::edit_context_c_tests): Call the new tests.
28542
28543 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
28544
28545         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete
28546         parameter cand.  Update dump information.
28547         (get_computation_cost): Update uses.
28548
28549 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
28550
28551         * tree-ssa-loop-ivopts.c (get_computation_aff_1): New.
28552         (get_computation_aff): Reorder parameters.  Use get_computation_aff_1.
28553         (get_computation_at, rewrite_use_address): Update use of
28554         get_computation_aff.
28555
28556 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
28557
28558         * tree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters.
28559         (get_computation): Delete.
28560         (get_computation_cost): Implement like get_computation_cost_at.
28561         Use get_computation_at.
28562         (get_computation_cost_at): Delete.
28563         (rewrite_use_nonlinear_expr): Use get_computation_at.
28564         (rewrite_use_compare, remove_unused_ivs): Ditto.
28565
28566 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
28567
28568         * tree-ssa-loop-ivopts.c (rewrite_use_address): Simple refactor.
28569
28570 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
28571
28572         * tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs.
28573         (ivopts_global_cost_for_size): Rename parameter and update uses.
28574         (iv_ca_recount_cost): Update uses.
28575         (iv_ca_set_remove_invs, iv_ca_set_no_cp): Record invariants and
28576         candidates seperately in n_invs and n_cands.
28577         (iv_ca_set_add_invs, iv_ca_set_cp, iv_ca_new): Ditto.
28578
28579 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
28580
28581         * tree-ssa-loop-ivopts.c (struct walk_tree_data): New.
28582         (find_inv_vars_cb): New.
28583         (find_depends): Renamed to ...
28584         (find_inv_vars): ... this.
28585         (add_candidate_1, force_var_cost): Call find_inv_vars.
28586         (split_address_cost, determine_group_iv_cost_cond): Ditto.
28587
28588 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
28589
28590         * tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to
28591         inv_vars.  Add inv_exprs.
28592         (struct iv_cand): Rename depends_on to inv_vars.
28593         (struct ivopts_data): Rename max_inv_id/n_invariant_uses to
28594         max_inv_var_id/n_inv_var_uses.  Move max_inv_expr_id around.
28595         Refactor field used_inv_exprs from has_map to array n_inv_expr_uses.
28596         (dump_cand): Dump inv_vars.
28597         (tree_ssa_iv_optimize_init): Support inv_vars and inv_exprs.
28598         (record_invariant, find_depends, add_candidate_1): Ditto.
28599         (set_group_iv_cost, force_var_cost): Ditto.
28600         (split_address_cost, ptr_difference_cost, difference_cost): Ditto.
28601         (get_computation_cost_at, get_computation_cost): Ditto.
28602         (determine_group_iv_cost_generic): Ditto.
28603         (determine_group_iv_cost_address): Ditto.
28604         (determine_group_iv_cost_cond, autoinc_possible_for_pair): Ditto.
28605         (determine_group_iv_costs): Ditto.
28606         (iv_ca_recount_cost): Update call to ivopts_global_cost_for_size.
28607         (iv_ca_set_remove_invariants): Renamed to ...
28608         (iv_ca_set_remove_invs): ... this.  Support inv_vars and inv_exprs.
28609         (iv_ca_set_no_cp): Use iv_ca_set_remove_invs.
28610         (iv_ca_set_add_invariants):  Renamed to ...
28611         (iv_ca_set_add_invs): ... this.  Support inv_vars and inv_exprs.
28612         (iv_ca_set_cp): Use iv_ca_set_add_invs.
28613         (iv_ca_has_deps): Support inv_vars and inv_exprs.
28614         (iv_ca_new, iv_ca_free, iv_ca_dump, free_loop_data): Ditto.
28615         (create_new_ivs): Remove useless dump.
28616
28617 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
28618
28619         * tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo
28620         iv_cand code.
28621         (determine_group_iv_cost_cond, determine_iv_cost): Ditto.
28622         (iv_ca_set_no_cp, create_new_iv): Ditto.
28623
28624 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
28625
28626         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
28627
28628 2017-05-02  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
28629
28630         * tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of
28631         function tree_check2.
28632
28633 2017-05-02  Martin Liska  <mliska@suse.cz>
28634
28635         * doc/gcov.texi: Add missing preposition.
28636         * gcov.c (function_info::function_info): Properly fill up
28637         all member variables.
28638
28639 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
28640
28641         * expr.c (expand_expr_real_2): Re-cost if previous costs are the same.
28642
28643 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
28644
28645         * simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.
28646
28647 2017-05-02  Martin Liska  <mliska@suse.cz>
28648
28649         PR lto/77954.
28650         * lto-streamer-in.c (lto_read_tree_1): Remove
28651         LTO_STREAMER_DEBUG.
28652         * lto-streamer.c (struct tree_hash_entry): Likewise.
28653         (struct tree_entry_hasher): Likewise.
28654         (tree_entry_hasher::hash): Likewise.
28655         (tree_entry_hasher::equal): Likewise.
28656         (lto_streamer_init): Likewise.
28657         (lto_orig_address_map): Likewise.
28658         (lto_orig_address_get): Likewise.
28659         (lto_orig_address_remove): Likewise.
28660         * lto-streamer.h: Likewise.
28661         * tree-streamer-in.c (streamer_alloc_tree): Likewise.
28662         * tree-streamer-out.c (streamer_write_tree_header): Likewise.
28663
28664 2017-05-02  Sebastian Peryt  <sebastian.peryt@intel.com>
28665
28666         * config/i386/avx512fintrin.h (_mm_mask_add_round_sd)
28667         (_mm_maskz_add_round_sd, _mm_mask_add_round_ss)
28668         (mm_maskz_add_round_ss, _mm_mask_sub_round_sd)
28669         (mm_maskz_sub_round_sd, _mm_mask_sub_round_ss)
28670         (mm_maskz_sub_round_ss, _mm_mask_add_sd)
28671         (mm_maskz_add_sd, _mm_mask_add_ss, _mm_maskz_add_ss)
28672         (mm_mask_sub_sd, _mm_maskz_sub_sd, _mm_mask_sub_ss)
28673         (mm_maskz_sub_ss): New intrinsics.
28674         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
28675         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
28676         * config/i386/i386-builtin.def (__builtin_ia32_addsd_mask_round)
28677         (__builtin_ia32_addss_mask_round, __builtin_ia32_subsd_mask_round)
28678         (__builtin_ia32_subss_mask_round): New builtins.
28679         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
28680         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
28681         * config/i386/sse.md (<sse>_vm<plusminus_insn><mode>3<round_name>):
28682         Renamed to ...
28683         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): ... this.
28684         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
28685         Changed to ...
28686         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
28687         ... this.
28688
28689 2017-05-02  Martin Jambor  <mjambor@suse.cz>
28690
28691         PR tree-optimization/78687
28692         * tree-sra.c (access): New field parent.
28693         (process_subtree_disqualification): New function.
28694         (disqualify_candidate): Call it.
28695         (build_accesses_from_assign): Reset write flag if creating an
28696         assighnment link.
28697         (build_access_subtree): Fill in parent field and also prpagate
28698         down grp_write flag.
28699         (create_artificial_child_access): New parameter set_grp_write, set
28700         grp_write to its value.
28701         (propagate_subaccesses_across_link): Also propagate grp_write flag
28702         values.
28703         (propagate_all_subaccesses): Push the closest parent back to work
28704         queue if add_access_to_work_queue returned true.
28705
28706 2017-05-02  Richard Biener  <rguenther@suse.de>
28707
28708         * common.opt (fstrict-overflow): Alias negative to fwrapv.
28709         * doc/invoke.texi (fstrict-overflow): Remove all traces of
28710         -fstrict-overflow documentation.
28711         * tree.h (TYPE_OVERFLOW_UNDEFINED): Do not test flag_strict_overflow.
28712         (POINTER_TYPE_OVERFLOW_UNDEFINED): Test !flag_wrapv instead of
28713         flag_strict_overflow.
28714         * ipa-inline.c (can_inline_edge_p): Do not test flag_strict_overflow.
28715         * lto-opts.c (lto_write_options): Do not stream it.
28716         * lto-wrapper.c (merge_and_complain): Do not handle it.
28717         * opts.c (default_options_table): Do not set -fstrict-overflow.
28718         (finish_options): Likewise do not clear it when sanitizing.
28719         * simplify-rtx.c (simplify_const_relational_operation): Do not
28720         test flag_strict_overflow.
28721
28722 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
28723
28724         * config/alpha/alpha.md (*add<mode>3_ieee): Merge to add<mode>3
28725         using enabled attribute.
28726         (*sub<mode>3_ieee): Merge to sub<mode>3 using enabled attribute.
28727         (*mul<mode>3_ieee): Merge to mul<mode>3 using enabled attribute.
28728         (*div<mode>3_ieee): Merge to div<mode>3 using enabled attribute.
28729         (*sqrt<mode>2_ieee): Merge to sqrt<mode>2 using enabled attribute.
28730         (*fix_truncdfdi_ieee): Merge to *fix_truncdfdi2 using enabled attribute.
28731         (*fix_truncsfdi_ieee): Merge to *fix_truncsfdi2 using enabled attribute.
28732         (*floatdisf_ieee): Merge to floatdisf2 using enabled attribute.
28733         (*floatdidf_ieee): Merge to floatdidf2 using enabled attribute.
28734         (*truncdfsf2_ieee): Merge to truncdfsf2 using enabled attribute.
28735         (*cmpdf_ieee): Merge to *cmpdf_internal using enabled attribute.
28736
28737 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
28738
28739         * config/i386/i386.c (ix86_code_end): Use {FIRST,LAST}_INT_REG.
28740
28741 2017-05-02  Richard Biener  <rguenther@suse.de>
28742
28743         PR tree-optimization/80591
28744         Revert
28745         2017-04-10  Richard Biener  <rguenther@suse.de>
28746
28747         * tree-ssa-structalias.c (find_func_aliases): Properly handle
28748         asm inputs.
28749
28750 2017-05-02  Richard Biener  <rguenther@suse.de>
28751
28752         PR tree-optimization/80549
28753         * tree-cfgcleanup.c (mfb_keep_latches): New helper.
28754         (cleanup_tree_cfg_noloop): Create forwarders to known loop
28755         headers if they do not have a preheader.
28756
28757 2017-05-02  Martin Liska  <mliska@suse.cz>
28758
28759         PR other/80589
28760         * common.opt: Fix typo.
28761         * doc/invoke.texi: Likewise.
28762
28763 2017-05-01  Jan Beulich  <jbeulich@suse.com>
28764
28765         * config/i386/sse.md (xop_vpermil2<mode>3): Do not allow operand
28766         swapping, add (x,x,m,x,n) alternative.
28767
28768 2017-05-01  Nathan Sidwell  <nathan@acm.org>
28769
28770         * calls.c (combine_pending_stack_adjustment_and_call): Remove
28771         unnecessary unadjusted_alignment check.
28772
28773 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
28774
28775         PR c++/80038
28776         * cilk_common.c (expand_builtin_cilk_detach): Move pedigree
28777         operations here.
28778         * gimplify.c (gimplify_cilk_detach): New function.
28779         (gimplify_call_expr, gimplify_modify_expr): Call it as needed.
28780         * tree-core.h: Document EXPR_CILK_SPAWN.
28781         * tree.h (EXPR_CILK_SPAWN): Define.
28782
28783 2017-05-01  David Malcolm  <dmalcolm@redhat.com>
28784
28785         * diagnostic-show-locus.c (layout::get_expanded_location): Rewrite
28786         to use new fixit_hint representation, using the "replace" logic.
28787         (get_line_span_for_fixit_hint): Likewise.
28788         (layout::print_any_fixits): Likewise.
28789         (selftest::test_one_liner_many_fixits): Rename to...
28790         (selftest::test_one_liner_many_fixits_1): ...this, and update
28791         comment and expected output to reflect that the multiple fix-it
28792         hints are now consolidated into one insertion.
28793         (selftest::test_one_liner_many_fixits_2): New test.
28794         (selftest::test_diagnostic_show_locus_one_liner): Update for
28795         above.
28796         (selftest::test_fixit_consolidation): Update for fix-it API
28797         change.
28798         * diagnostic.c (print_parseable_fixits): Likewise.
28799         * edit-context.c (edited_line::m_line_events): Convert from
28800         auto_vec <line_event *> to auto_vec <line_event>.
28801         (class line_event): Convert from abstract base class to a concrete
28802         class, taking over the role of replace_event.
28803         (class insert_event): Delete.
28804         (class replace_event): Rename to class line_event.  Convert to
28805         half-open range.
28806         (edit_context::add_fixits): Reimplement.
28807         (edit_context::apply_insert): Delete.
28808         (edit_context::apply_replace): Rename to...
28809         (edit_context::apply_fixit): ...this.  Convert to half-open range.
28810         (edited_file::apply_insert): Delete.
28811         (edited_file::apply_replace): Rename to...
28812         (edited_file::apply_fixit): ...this.
28813         (edited_line::~edited_line): Drop deletion of events.
28814         (edited_line::apply_insert): Delete.
28815         (edited_line::apply_replace): Rename to...
28816         (edited_line::apply_fixit): ...this.  Convert to half-open range.
28817         Update for change to type of m_line_events.
28818         * edit-context.h (edit_context::apply_insert): Delete.
28819         (edit_context::apply_replace): Rename to...
28820         (edit_context::apply_fixit): ...this.
28821
28822 2017-05-01  Martin Sebor  <msebor@redhat.com>
28823
28824         * gimple-ssa-sprintf.c (format_integer): Set knownrange when it's
28825         known.
28826
28827 2017-05-01  Uros Bizjak  <ubizjak@gmail.com>
28828
28829         PR target/68491
28830         * config/i386/cpuid.h (__get_cpuid): Always return 0 when
28831         __get_cpuid_max returns 0.
28832         (__get_cpuid_count): Ditto.
28833
28834 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
28835
28836         * tree.c (substitute_in_expr) <tcc_vl_exp>: Also inline a call if the
28837         replacement expression is another instance of one of its arguments.
28838
28839 2017-05-01  Jakub Jelinek  <jakub@redhat.com>
28840
28841         PR target/79430
28842         * rtlanal.c (reg_set_p): If reg is a stack_pointer_rtx, also
28843         check for stack push/pop autoinc.
28844         * config/i386/i386.c (ix86_agi_dependent): Return false
28845         if the only reason why modified_in_p returned true is that
28846         addr is SP based and set_insn is a push or pop.
28847
28848 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
28849
28850         * ipa-inline.c (compute_inlined_call_time): Remove now unnecesary
28851         overflow check.
28852
28853 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
28854
28855         PR ipa/79224
28856         * ipa-inline-analysis.c (dump_predicate): Add optional parameter NL.
28857         (account_size_time): Use two predicates - exec_pred and
28858         nonconst_pred_ptr.
28859         (evaluate_conditions_for_known_args): Compute both clause and
28860         nonspec_clause.
28861         (evaluate_properties_for_edge): Evaulate both clause and nonspec_clause.
28862         (inline_summary_t::duplicate): Update.
28863         (estimate_function_body_sizes): Caluculate exec and nonconst predicates
28864         separately.
28865         (compute_inline_parameters): Likewise.
28866         (estimate_edge_size_and_time): Update caluclation of time.
28867         (estimate_node_size_and_time): Compute both time and nonspecialized
28868         time.
28869         (estimate_ipcp_clone_size_and_time): Update.
28870         (inline_merge_summary): Update.
28871         (do_estimate_edge_time): Update.
28872         (do_estimate_edge_size): Update.
28873         (do_estimate_edge_hints): Update.
28874         (inline_read_section, inline_write_summary): Stream both new predicates.
28875         * ipa-inline.c (compute_uninlined_call_time): Take uninlined_call_time
28876         as argument.
28877         (compute_inlined_call_time): Cleanup.
28878         (big_speedup_p): Update.
28879         (edge_badness): Update.
28880         * ipa-inline.h (INLINE_TIME_SCALE): Remove.
28881         (size_time_entry): Replace predicate by exec_predicate and
28882         nonconst_predicate.
28883         (edge_growth_cache_entry): Cache both time nad nonspecialized time.
28884         (estimate_edge_time): Return also nonspec_time.
28885         (reset_edge_growth_cache): Update.
28886
28887 2017-04-29  Jakub Jelinek  <jakub@redhat.com>
28888
28889         PR rtl-optimization/80491
28890         * ifcvt.c (noce_process_if_block): When looking for x setter
28891         with missing else_bb, don't check only the insn right before
28892         cond_earliest, but look for the last insn that x is modified in
28893         within the same bb.
28894
28895         PR rtl-optimization/80491
28896         * alias.c (memory_modified_in_insn_p): Return true for CALL_INSNs.
28897
28898 2017-04-29  Marc Glisse  <marc.glisse@inria.fr>
28899
28900         PR tree-optimization/80487
28901         * tree-ssa-alias.c (stmt_kills_ref_p): Handle stpncpy and strncpy.
28902
28903 2017-04-29  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
28904
28905         PR tree-optimization/79697
28906         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Check if callee
28907         is BUILT_IN_STRDUP, BUILT_IN_STRNDUP, BUILT_IN_REALLOC.
28908         (propagate_necessity): Check if def_callee is BUILT_IN_STRDUP or
28909         BUILT_IN_STRNDUP.
28910         * gimple-fold.c (gimple_fold_builtin_realloc): New function.
28911         (gimple_fold_builtin): Call gimple_fold_builtin_realloc.
28912
28913 2017-04-28  Martin Sebor  <msebor@redhat.com>
28914
28915         PR tree-optimization/80523
28916         * gimple-ssa-sprintf.c (target_to_host_charmap): New global variable.
28917         (init_target_to_host_charmap, target_to_host, target_strtol10): New
28918         functions.
28919         (maybe_warn, format_directive, parse_directive): Use new functions.
28920         (pass_sprintf_length::execute): Call init_target_to_host_charmap.
28921
28922 2017-04-28  Marc Glisse  <marc.glisse@inria.fr>
28923
28924         * match.pd (X+Z OP Y+Z, X-Z OP Y-Z, Z-X OP Z-Y): New transformations.
28925
28926 2017-04-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
28927
28928         * configure.ac (SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR,
28929         target_header_dir): Set correctly.
28930         * configure: Regenerated.
28931         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
28932         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
28933         instead of SYSTEM_HEADER_DIR.
28934
28935 2017-04-28  Jan Hubicka  <hubicka@ucw.cz>
28936
28937         * ipa-cp.c (perform_estimation_of_a_value): Turn time to sreal.
28938         (estimate_local_effects): Likewise.
28939         * ipa-inline.c (compute_inlined_call_time, want_inline_small_function_p,
28940         edge_badness, inline_small_functions, dump_overall_stats): LIkewise.
28941         * ipa-inline.h (edge_growth_cache_entry, estimate_time_after_inlining,
28942         estimate_ipcp_clone_size_and_time, do_estimate_edge_time,
28943         do_estimate_edge_time, estimate_edge_time): Likewise.
28944         * ipa-inline-analysis.c (estimate_node_size_and_time,
28945         estimate_ipcp_clone_size_and_time, do_estimate_edge_time): Likewise.
28946         (estimate_time_after_inlining): Remove.
28947
28948 2017-04-28  Martin Liska  <mliska@suse.cz>
28949
28950         * doc/gcov.texi: Enhance documentation of gcov.
28951
28952 2017-04-28  Martin Liska  <mliska@suse.cz>
28953
28954         * doc/gcov.texi: Sort options in alphabetic order.
28955         * doc/gcov-dump.texi: Likewise.
28956         * doc/gcov-tool.texi: Likewise.
28957         * gcov.c (print_usage): Likewise.
28958         * gcov-dump.c (print_usage): Likewise.
28959         * gcov-tool.c (print_merge_usage_message): Likewise.
28960         (print_rewrite_usage_message): Likewise.
28961         (print_overlap_usage_message): Likewise.
28962
28963 2017-04-28  Martin Liska  <mliska@suse.cz>
28964
28965         PR gcov-profile/53915
28966         * gcov.c (format_gcov): Print 'NAN %' when top > bottom.
28967
28968 2017-04-28  Martin Liska  <mliska@suse.cz>
28969
28970         PR gcov-profile/79891
28971         * gcov.c (add_line_counts): Assign BBs to lines just if the BB
28972         is marked by compiler as living on a line.
28973         (get_cycles_count): Remove usage of the union.
28974         (output_intermediate_file): Likewise.
28975         (find_source): Fix GNU coding style.
28976         (accumulate_line_counts): Remove old non-all block mode.
28977         (output_lines): Remove usage of the union.
28978         * profile.c (output_location): Include all BBs, even if
28979         belonging to a same line (and file) as a previous BB.
28980
28981 2017-04-28  Martin Liska  <mliska@suse.cz>
28982
28983         * gcov.c (process_args): Handle new argument 'w'.
28984         (read_graph_file): Assign ID to BBs.
28985         (output_branch_count): Display BB # if verbose flag is set.
28986         (output_lines): Likewise for arcs.
28987         (print_usage): Add '--verbose' option help.
28988         * doc/gcov.texi: Document --verbose (-w) option.
28989
28990 2017-04-28  Martin Liska  <mliska@suse.cz>
28991
28992         * gcov.c (struct block_location_info): New struct.
28993         (process_file): Fill up the new structure.
28994         (read_graph_file): Replace usage of encoding by the newly added
28995         struct.
28996         (add_line_counts): Likewise.
28997         (accumulate_line_counts): Remove usage of the union.
28998         (function_info::function_info): New function.
28999         (function_info::~function_info): Likewise.
29000         (process_file): Call delete instead of release_function.
29001         (release_function): Release the function.
29002         (release_structures): Call delete instead of release_function.
29003         (solve_flow_graph): Replace usage of num_blocks.
29004         (find_exception_blocks): Likewise.
29005         (output_lines): Fix GNU coding style.
29006
29007 2017-04-28  Martin Liska  <mliska@suse.cz>
29008
29009         PR driver/56469
29010         * coverage.c (coverage_remove_note_file): New function.
29011         * coverage.h: Declare the function.
29012         * toplev.c (finalize): Clean if an error has been seen.
29013
29014 2017-04-28  Martin Liska  <mliska@suse.cz>
29015
29016         PR gcov-profile/80031
29017         * gcov-dump.c (tag_blocks): Just print number of basic blocks.
29018         * gcov-io.h (GCOV_TAG_BLOCKS_NUM): Remove unused macro.
29019         * gcov.c (read_graph_file): Read just number of blocks.
29020         * profile.c (branch_prob): Do not stream 0 flags per a basic
29021         block.
29022
29023 2017-04-28  Martin Liska  <mliska@suse.cz>
29024
29025         * gcov-dump.c (tag_*): Add new argument to declarations.
29026         (dump_gcov_file): Likewise.
29027         (tag_blocks): Add and use new argument depth.
29028         (tag_arcs): Likewise.
29029         (tag_lines): Likewise.
29030         (tag_counters): Likewise.
29031         (tag_summary): Likewise.
29032         (dump_working_sets): Use depth to do a proper indentation.
29033
29034 2017-04-28  Jakub Jelinek  <jakub@redhat.com>
29035
29036         PR bootstrap/80531
29037         * cgraph.h (symtab_node::debug_symtab): No longer inline.
29038         * symtab.c (symtab_node::debug_symtab): Move definition here.
29039
29040 2017-04-28  Richard Biener  <rguenther@suse.de>
29041
29042         * lto-streamer.h (LTO_major_version): Bump to 7.
29043
29044 2017-04-28  Richard Biener  <rguenther@suse.de>
29045
29046         * tree-vrp.c (assert_info): New struct.
29047         (add_assert_info): New helper.
29048         (register_edge_assert_for_2): Refactor to add asserts to a vector
29049         of assert_info.
29050         (register_edge_assert_for_1): Likewise.
29051         (register_edge_assert_for): Likewise.
29052         (finish_register_edge_assert_for): New helper actually registering
29053         asserts where live on edge.
29054         (find_conditional_asserts): Adjust.
29055         (find_switch_asserts): Likewise.
29056         (evrp_dom_walker::try_find_new_range): Generalize.
29057         (evrp_dom_walker::before_dom_children): Use register_edge_assert_for.
29058
29059 2017-04-27  Marek Polacek  <polacek@redhat.com>
29060
29061         PR sanitizer/80349
29062         * fold-const.c (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Convert
29063         arg10 and arg11 to itype.
29064
29065 2017-04-27  Jonathan Wakely  <jwakely@redhat.com>
29066
29067         * doc/extend.texi (Object Size Checking): Improve grammar.
29068
29069 2017-04-27  Richard Earnshaw  <rearnsha@arm.com>
29070
29071         PR target/80530
29072         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Ensure
29073         that the logic for permitting reciprocal estimates matches that
29074         in use_rsqrt_p.
29075
29076 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
29077
29078         PR c++/80534
29079         * tree.c (type_cache_hasher::equal): Only compare
29080         TYPE_TYPELESS_STORAGE flag on non-aggregate element types.
29081         (build_array_type_1): Only hash TYPE_TYPELESS_STORAGE flag on
29082         non-aggregate element types.
29083         * tree.h (TYPE_TYPELESS_STORAGE): Fix comment typo, add more details
29084         about the flag on ARRAY_TYPEs in the comment, formatting fix.
29085
29086 2017-04-27  Richard Biener  <rguenther@suse.de>
29087
29088         PR middle-end/80533
29089         * emit-rtl.c (set_mem_attributes_minus_bitpos): When
29090         stripping ARRAY_REFs from MEM_EXPR make sure we're not
29091         keeping a reference to a trailing array.
29092
29093 2017-04-27  Richard Biener  <rguenther@suse.de>
29094
29095         PR middle-end/80539
29096         * tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
29097         being in loop-closed SSA form conservatively.
29098         (chrec_fold_multiply_poly_poly): Likewise.
29099
29100 2017-04-27  Tamar Christina  <tamar.christina@arm.com>
29101
29102         PR middle-end/79665
29103         * expr.c (expand_expr_real_2): Move TRUNC_MOD_EXPR, FLOOR_MOD_EXPR,
29104         CEIL_MOD_EXPR, ROUND_MOD_EXPR cases.
29105
29106 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
29107
29108         PR target/77728
29109         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): Remove.
29110         (aarch64_function_arg_alignment): Return unsigned int again, but still
29111         ignore TYPE_FIELDS chain decls other than FIELD_DECLs.
29112         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
29113         Don't emit -Wpsabi note.
29114         (aarch64_function_arg_boundary): Likewise.
29115         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
29116         caller.
29117
29118 2017-04-26  Nathan Sidwell  <nathan@acm.org>
29119
29120         * tree.h (crc32_unsigned_n): Declare.
29121         (crc32_unsigned, crc32_unsigned): Make inline.
29122         * tree.c (crc32_unsigned_bits): Replace with ...
29123         (crc32_unsigned_n): ... this.
29124         (crc32_unsigned, crc32_byte): Remove.
29125         (crc32_string): Remove unnecessary braces.
29126
29127 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
29128
29129         * ipa-cp.c (estimate_local_effects): Convert sreal to int.
29130         * ipa-inline-analysis.c (MAX_TIME): Remove.
29131         (account_size_time): Use sreal for time.
29132         (dump_inline_summary): Update.
29133         (estimate_function_body_sizes): Update.
29134         (estimate_edge_size_and_time): Update.
29135         (estimate_calls_size_and_time): Update.
29136         (estimate_node_size_and_time): Update.
29137         (inline_merge_summary): Update.
29138         (inline_update_overall_summary): Update.
29139         (estimate_time_after_inlining): Update.
29140         (inline_read_section): Update.
29141         (inline_write_summary): Update.
29142         * ipa-inline.c (compute_uninlined_call_time): Update.
29143         (compute_inlined_call_time): Update.
29144         (recursive_inlining): Update.
29145         (inline_small_functions): Update.
29146         (dump_overall_stats): Update.
29147         * ipa-inline.h: Include sreal.h.
29148         (size_time_entry): Turn time to sreal.
29149         (inline_summary): Turn self_time nad time to sreal.
29150
29151 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
29152
29153         * sreal.c: Include backend.h, tree.h, gimple.h, cgraph.h and
29154         data-streamer.h
29155         (sreal::stream_out, sreal::stream_in): New.
29156         * sreal.h (sreal::stream_out, sreal::stream_in): Declare.
29157
29158 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
29159
29160         * Makefile.in (s-options): Invoke opt-gather.awk with LC_ALL=C in the
29161         environment.
29162
29163 2017-04-25  Uros Bizjak  <ubizjak@gmail.com>
29164
29165         PR target/70799
29166         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
29167         Handle ASHIFTRT.
29168         (dimode_scalar_chain::compute_convert_gain): Ditto.
29169         (dimode_scalar_chain::make_vector_copies): Ditto.
29170         (dimode_scalar_chain::convert_reg): Ditto.
29171         (dimode_scalar_chain::convert_insn): Ditto.
29172         * config/i386/sse.md (VI24_AVX512BW_1): Remove mode iterator.
29173         (VI248_AVX512BW_1): New mode iterator.
29174         (<mask_codefor>ashr<mode>3<mask_name>): Merge insn pattern with
29175         <mask_codefor>ashrv2di3<mask_name> insn using VI248_AVX512BW_1
29176         mode iterator.
29177
29178 2017-04-25  Martin Sebor  <msebor@redhat.com>
29179
29180         PR tree-optimization/80497
29181         * gimple-ssa-sprintf.c (get_int_range): Avoid assuming all integer
29182         constants are representable in HOST_WIDE_INT.
29183         (parse_directive): Ditto.
29184
29185 2017-04-25  Martin Sebor  <msebor@redhat.com>
29186
29187         PR bootstrap/80486
29188         * dominance.c (dom_info::m_n_basic_blocks): Change type to unsigned.
29189         (new_zero_array): Adjust signature.
29190         (dom_info::dom_init): Used unsigned rather that size_t.
29191         (dom_info::dom_info): Same.
29192
29193 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
29194             Jakub Jelinek  <jakub@redhat.com>
29195
29196         PR target/77728
29197         * config/arm/arm.c: Include gimple.h.
29198         (aapcs_layout_arg): Emit -Wpsabi note if arm_needs_doubleword_align
29199         returns negative, increment ncrn only if it returned positive.
29200         (arm_needs_doubleword_align): Return int instead of bool,
29201         ignore DECL_ALIGN of non-FIELD_DECL TYPE_FIELDS chain
29202         members, but if there is any such non-FIELD_DECL
29203         > PARM_BOUNDARY aligned decl, return -1 instead of false.
29204         (arm_function_arg): Emit -Wpsabi note if arm_needs_doubleword_align
29205         returns negative, increment nregs only if it returned positive.
29206         (arm_setup_incoming_varargs): Likewise.
29207         (arm_function_arg_boundary): Emit -Wpsabi note if
29208         arm_needs_doubleword_align returns negative, return
29209         DOUBLEWORD_ALIGNMENT only if it returned positive.
29210
29211 2017-04-25  Marek Polacek  <polacek@redhat.com>
29212
29213         PR sanitizer/80349
29214         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
29215         first argument to type.
29216
29217 2017-04-25  Bill Seurer  <seurer@linux.vnet.ibm.com>
29218
29219         PR target/80482
29220         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change
29221         type checks to test for compatibility instead of equality.
29222
29223 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
29224             Jakub Jelinek  <jakub@redhat.com>
29225
29226         PR target/77728
29227         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): New
29228         type.
29229         (aarch64_function_arg_alignment): Return aarch64_fn_arg_alignment
29230         struct.  Ignore DECL_ALIGN of decls other than FIELD_DECL for
29231         the alignment computation, but return their maximum in warn_alignment.
29232         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
29233         Emit a -Wpsabi note if warn_alignment is 16 bytes, but alignment
29234         is smaller.
29235         (aarch64_function_arg_boundary): Likewise.  Simplify using MIN/MAX.
29236         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
29237         caller.
29238
29239 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
29240
29241         * config/arc/simdext.md (dmpyh): Fix typo.
29242
29243 2017-04-25  Richard Biener  <rguenther@suse.de>
29244
29245         PR tree-optimization/80492
29246         * alias.c (compare_base_decls): Handle registers with asm
29247         specification conservatively.
29248         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
29249         compare_base_decls returning dont-know properly.
29250
29251 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
29252
29253         * config/arc/arc.c (LEGITIMATE_OFFSET_ADDRESS_P): Delete macro.
29254         (legitimate_offset_address_p): New function.
29255         (arc_legitimate_address_p): Use above function.
29256
29257 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
29258
29259         * config/arc/arc.c (arc_output_mi_thunk): Emit PIC calls.
29260
29261 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
29262
29263         * config/arc/arc.c (arc_conditional_register_usage): Use ACCL,
29264         ACCH registers whenever they are available.
29265
29266 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
29267
29268         * config/arc/arc.c (arc_conditional_register_usage): Make D0, D1
29269         double regs fix when not used.
29270
29271 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
29272
29273         * config/arc/arc.h (REGNO_OK_FOR_BASE_P): Consider also extension
29274         core registers.
29275         (REG_OK_FOR_INDEX_P_NONSTRICT): Likewise.
29276         (REG_OK_FOR_BASE_P_NONSTRICT): Likewise.
29277
29278 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
29279
29280         * config/arc/arc.c (arc_output_addsi): Check for h-register class
29281         when emitting short ADD instructions.
29282
29283 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
29284
29285         * config/arc/arc.md (cmpsi_cc_insn_mixed): Use 'h' register
29286         constraint.
29287         (cmpsi_cc_c_insn): Likewise.
29288         (cbranchsi4_scratch): Compute proper instruction length using
29289         compact_hreg_operand.
29290         * config/arc/predicates.md (compact_hreg_operand): New predicate.
29291
29292 2017-04-25  Richard Biener  <rguenther@suse.de>
29293
29294         PR middle-end/80509
29295         * passes.c (pass_manager::pass_manager): Initialize
29296         m_name_to_pass_map.
29297
29298 2017-04-25  Richard Biener  <rguenther@suse.de>
29299
29300         PR tree-optimization/79201
29301         * tree-ssa-sink.c (statement_sink_location): Handle calls.
29302
29303 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29304
29305         PR target/80464
29306         * config/s390/vector.md: Split MEM->GPR vector moves for
29307         non-s_operand addresses.
29308
29309 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29310
29311         PR target/79895
29312         * config/s390/predicates.md (reload_const_wide_int_operand): New
29313         predicate.
29314         * config/s390/s390.md ("movti"): Remove d/P alternative.
29315         ("movti_bigconst"): New pattern definition.
29316
29317 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
29318
29319         PR target/80080
29320         * s390-protos.h (s390_expand_cs_hqi): Removed.
29321         (s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
29322         * config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
29323         modes as well as CCZ1mode and CCZmode.
29324         (s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
29325         signature of s390_emit_compare_and_swap.
29326         (s390_expand_cs_hqi): Likewise, make static.
29327         (s390_expand_cs_tdsi): Generate an explicit compare before trying
29328         compare-and-swap, in some cases.
29329         (s390_expand_cs): Wrapper function.
29330         (s390_expand_atomic_exchange_tdsi): New backend specific expander for
29331         atomic_exchange.
29332         (s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
29333         * config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
29334         patterns for small and large integers.  Forbid symref memory operands.
29335         Move expander to s390.c.  Require cc register.
29336         ("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
29337         ("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
29338         ("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
29339         ("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
29340         symref memory operands.  Remove CC mode and call s390_match_ccmode
29341         instead.
29342         ("atomic_exchange<mode>"): Allow and implement all integer modes.
29343
29344 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
29345
29346         * config/s390/s390.md (define_peephole2): New peephole to help
29347         combining the load-and-test pattern with volatile memory.
29348
29349 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
29350
29351         * config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
29352         with CCZmode for TARGET_Z196.
29353
29354 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
29355
29356         PR rtl-optimization/80501
29357         * combine.c (make_compound_operation_int): Set subreg_code to SET
29358         even for AND with mask of the sign bit of mode.
29359
29360         PR rtl-optimization/80500
29361         * loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on
29362         sum's initial value.
29363
29364 2017-04-25  Julian Brown  <julian@codesourcery.com>
29365             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
29366
29367         * config/aarch64/thunderx2t99.md (thunderx2t99_crc): New Reservation.
29368
29369 2017-04-25  Marc Glisse  <marc.glisse@inria.fr>
29370
29371         * fold-const.c (tree_single_nonzero_warnv_p): Handle SSA_NAME.
29372
29373 2017-04-25  Julian Brown  <julian@codesourcery.com>
29374             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
29375
29376         * config/aarch64/thunderx2t99.md (thunderx2t99_aes): New Reservation.
29377         (thunderx2t99_sha): New Reservation.
29378
29379 2017-04-25  Julian Brown  <julian@codesourcery.com>
29380             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
29381
29382         * config/aarch64/aarch64-simd.md (aarch64_simd_vec_set<mode>): Fix
29383         type for 1-element load.
29384
29385 2017-04-24  Marc Glisse  <marc.glisse@inria.fr>
29386
29387         * match.pd (X/[ex]C CMP Y/[ex]C): New transformation.
29388
29389 2017-04-24  Martin Jambor  <mjambor@suse.cz>
29390
29391         PR tree-optimization/80293
29392         * tree-sra.c (scalarizable_type_p): New parameter const_decl, make
29393         char arrays not totally scalarizable if it is false.
29394         (analyze_all_variable_accesses): Pass correct value in the new
29395         parameter.  Add a statistics counter.
29396
29397 2017-04-24  Jan Hubicka  <hubicka@ucw.cz>
29398
29399         PR middle-end/79931
29400         * ipa-devirt.c (dump_possible_polymorphic_call_targets): Fix ICE.
29401
29402 2017-04-24  Richard Biener  <rguenther@suse.de>
29403
29404         PR tree-optimization/80494
29405         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Bail
29406         out for complex types.
29407
29408 2017-04-24  Richard Biener  <rguenther@suse.de>
29409
29410         * tree-ssa-sccvn.h (run_scc_vn): Adjust prototype.
29411         * tree-ssa-sccvn.c (print_scc): Print SCC size.
29412         (extract_and_process_scc_for_name): Never fail but drop SCC to varying.
29413         (DFS): Adjust and never fail.
29414         (sccvn_dom_walker::fail): Remove.
29415         (sccvn_dom_walker::before_dom_children): Adjust.
29416         (run_scc_vn): Likewise and never fail.
29417         * tree-ssa-pre.c (pass_pre::execute): Adjust.
29418         (pass_fre::execute): Likewise.
29419
29420 2017-04-24  Richard Biener  <rguenther@suse.de>
29421
29422         PR tree-optimization/79725
29423         * tree-ssa-sink.c (statement_sink_location): Return whether
29424         failure reason was zero uses.  Move that check later.
29425         (sink_code_in_bb): Deal with zero uses by removing the stmt
29426         if possible.
29427
29428 2017-04-24  Richard Biener  <rguenther@suse.de>
29429
29430         PR c++/2972
29431         * tree-ssa-uninit.c (warn_uninitialized_vars): Handle some
29432         pointer-based references.
29433
29434 2017-04-24  Richard Biener  <rguenther@suse.de>
29435
29436         PR bootstrap/79814
29437         * pass_manager.h (pass_manager::operator new): Remove.
29438         (pass_manager::operator delete): Likewise.
29439         * passes.c (pass_manager::operator new): Remove.
29440         (pass_manager::operator delete): Likewise.
29441         (pass_manager::pass_manager): Zero individual pass members.
29442
29443 2017-04-23  Uros Bizjak  <ubizjak@gmail.com>
29444
29445         PR target/70799
29446         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p)
29447         <case ASHIFT, case LSHIFTRT>: Also consider variable shifts.
29448         Check "XEXP (src, 1)" operand here.
29449         <case PLUS, case MINUS, case IOR, case XOR, case AND>:
29450         Check "XEXP (src, 1)" operand here.
29451         (dimode_scalar_chain::make_vector_copies): Detect count register
29452         of a shift instruction.  Zero extend count register from QImode
29453         to DImode to satisfy vector shift pattern count operand predicate.
29454         Substitute vector shift count operand with a DImode copy.
29455         (dimode_scalar_chain::convert_reg): Ditto, zero-extend from
29456         vector register.
29457
29458 2017-04-21  Uros Bizjak  <ubizjak@gmail.com>
29459
29460         * config/i386/i386.md (*extzvqi_mem_rex64): Move above *extzv<mode>.
29461         Remove UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
29462         (*insvqi_1_mem_rex64): Move above insv<mode>_1.  Remove
29463         UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
29464         (UNSPEC_NOREX_MEM): Remove definition.
29465
29466 2017-04-21  Richard Biener  <rguenther@suse.de>
29467
29468         PR tree-optimization/79547
29469         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
29470         Handle strlen, strcmp, strncmp, strcasecmp, strncasecmp, memcmp,
29471         bcmp, strspn, strcspn, __builtin_object_size and __builtin_constant_p
29472         without any constraints.
29473
29474 2017-04-21  Richard Biener  <rguenther@suse.de>
29475
29476         PR tree-optimization/78847
29477         * fold-const.c (split_tree): Handle POINTER_PLUS_EXPR.
29478
29479 2017-04-21  Richard Biener  <rguenther@suse.de>
29480
29481         * tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO.
29482         (build_distinct_type_copy): Likewise.
29483         (build_variant_type_copy): Likewise.
29484         * tree.c (build_qualified_type): Pass down mem-stat info.
29485         (build_distinct_type_copy): Likewise.
29486         (build_variant_type_copy): Likewise.
29487
29488 2017-04-21  Richard Biener  <rguenther@suse.de>
29489
29490         PR tree-optimization/80237
29491         * tree-ssa-pre.c (find_leader_in_sets): Add third set argument,
29492         defaulted to NULL.
29493         (phi_translate_1): Also allow a leader in AVAIL_OUT of pred
29494         for a simplified result.
29495
29496 2016-04-21  Richard Biener  <rguenther@suse.de>
29497
29498         * tree-ssa-loop-ivcanon.c (constant_after_peeling): Do not require
29499         sth as strict as a simple_iv but a chrec without symbols and an
29500         operand defined in the loop we are peeling (and not some subloop).
29501         (propagate_constants_for_unrolling): Propagate all constants.
29502
29503 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
29504
29505         PR target/79804
29506         * config/i386/i386.c (print_reg): Remove assert for disalowed
29507         regno values, call output_operand_lossage instead.
29508
29509 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
29510
29511         PR target/78090
29512         * config/i386/constraints.md (Yc): New register constraint.
29513         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
29514         Use Yc constraint for alternative 2 of operand 0.  Remove
29515         preferred_for_speed attribute.
29516
29517 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
29518
29519         * omp-low.c (lower_lastprivate_clauses): Correct handling of linear and
29520         lastprivate clauses in SIMT case.
29521
29522 2017-04-20  Volker Reichelt  <v.reichelt@netcologne.de>
29523
29524         * doc/invoke.texi (-Wextra-semi): Document new warning option.
29525
29526 2017-04-20  Richard Biener  <rguenther@suse.de>
29527
29528         PR tree-optimization/57796
29529         * tree-vect-stmts.c (vect_model_store_cost): Cost scatters
29530         as N scalar stores.
29531         (vect_model_load_cost): Cost gathers as N scalar loads.
29532
29533 2017-04-20  Richard Biener  <rguenther@suse.de>
29534
29535         * ggc-page.c (ggc_allocated_p): Rename to ...
29536         (safe_lookup_page_table_entry): ... this and return the lookup
29537         result.
29538         (gt_ggc_m_S): Use safe_lookup_page_table_entry.
29539
29540 2017-04-20  Richard Biener  <rguenther@suse.de>
29541
29542         PR tree-optimization/80453
29543         * tree-ssa-sccvn.h (struct vn_phi_s): Add cclhs and ccrhs members.
29544         * tree-ssa-sccvn.c (cond_stmts_equal_p): Use recorded lhs and rhs
29545         from the conditions.
29546         (vn_phi_eq): Pass them down.
29547         (vn_phi_lookup): Record them.
29548         (vn_phi_insert): Likewise.
29549
29550 2017-04-20  Matthew Fortune  <matthew.fortune@imgtec.com>
29551
29552         * config/mips/mips.c (mips_expand_vec_perm_const): Re-fix
29553         uninitialized variable warning to avoid buffer overrun.
29554
29555 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
29556
29557         PR other/71250
29558         * doc/invoke.texi (-Wmissing-field-initializers): Mention that warning
29559         is suppressed for '{ 0 }' in C.
29560
29561 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
29562
29563         * BASE-VER: Set to 8.0.0.
29564
29565 2017-04-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
29566
29567         * config/arm/arm.c (arm_elf_asm_cdtor): Create non-default
29568         priority .init_array and .fini_array section with SECTION_NOTYPE
29569         flag.
29570
29571 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
29572
29573         PR middle-end/80423
29574         * tree.h (build_array_type): Add typeless_storage default argument.
29575         * tree.c (type_cache_hasher::equal): Also compare
29576         TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs.
29577         (build_array_type): Add typeless_storage argument, set
29578         TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to
29579         recursive call.
29580         (build_nonshared_array_type): Adjust build_array_type_1 caller.
29581         (build_array_type): Likewise.  Add typeless_storage argument.
29582
29583 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
29584             Jakub Jelinek  <jakub@redhat.com>
29585
29586         PR tree-optimization/80426
29587         * tree-vrp.c (extract_range_from_binary_expr_1): For an additive
29588         operation on symbolic operands, also compute the overflow for the
29589         invariant part when the operation degenerates into a negation.
29590
29591 2017-04-19  Jakub Jelinek  <jakub@redhat.com>
29592
29593         PR debug/80461
29594         * dwarf2out.c (modified_type_die, gen_type_die_with_usage):
29595         Check for t with zero TYPE_QUALS_NO_ADDR_SPACE.
29596
29597         PR debug/80436
29598         * tree-ssa-loop-manip.c (find_uses_to_rename_def): Ignore debug uses.
29599
29600 2017-04-19  Georg-Johann Lay  <avr@gjlay.de>
29601
29602         PR target/80462
29603         * config/avr/avr.c (tree.h): Include it.
29604         (cgraph.h): Include it.
29605         (avr_encode_section_info): Don't warn for uninitialized progmem
29606         variable if it's just an alias.
29607
29608 2017-04-19  Richard Biener  <rguenther@suse.de>
29609
29610         PR ipa/65972
29611         * auto-profile.c (afdo_vpt_for_early_inline): Update SSA
29612         when needed by AutoPGO.
29613
29614 2017-04-19  Paulo J. Matos  <paulo@matos-sorge.com>
29615
29616         PR lto/50345
29617         * doc/lto.texi: Remove an extra 'that'.
29618
29619 2017-04-19  Segher Boessenkool  <segher@kernel.crashing.org>
29620
29621         PR rtl-optimization/80429
29622         * ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
29623         are only used in debug insns.
29624
29625 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
29626             Vladimir Makarov  <vmakarov@redhat.com>
29627
29628         * config/sparc/predicates.md (input_operand): Add comment.  Return
29629         true for any memory operand when LRA is in progress.
29630         * config/sparc/sparc.c (sparc_expand_move): Minor formatting fix.
29631
29632 2017-04-18  Jeff Law  <law@redhat.com>
29633
29634         PR target/74563
29635         * mips.md ({return,simple_return}_internal): Do not overwrite
29636         operands[0].
29637
29638 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
29639
29640         PR tree-optimization/80443
29641         * tree-vrp.c (intersect_ranges): For signed 1-bit precision type,
29642         instead of adding 1, subtract -1 and similarly instead of subtracting
29643         1 add -1.
29644
29645 2017-04-18  Richard Sandiford  <richard.sandiford@arm.com>
29646
29647         PR rtl-optimization/80357
29648         * haifa-sched.c (tmp_bitmap): New variable.
29649         (model_recompute): Handle duplicate use records.
29650         (alloc_global_sched_pressure_data): Initialize tmp_bitmap.
29651         (free_global_sched_pressure_data): Free it.
29652
29653 2017-04-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
29654
29655         Revert:
29656         2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
29657         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
29658         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
29659         instead of SYSTEM_HEADER_DIR.
29660
29661 2017-04-18  Jeff Law  <law@redhat.com>
29662
29663         PR middle-end/80422
29664         * cfgcleanup.c (try_crossjump_to_edge): Verify SRC1 and SRC2 have
29665         predecessors after walking up the insn chain.
29666
29667 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
29668
29669         PR debug/80263
29670         * dwarf2out.c (modified_type_die): Try harder not to emit internal
29671         sizetype type into debug info.
29672
29673 2017-04-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
29674
29675         PR target/80099
29676         * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Eliminate
29677         unneeded test for TARGET_UPPER_REGS_SF.
29678         * config/rs6000/vsx.md (vsx_extract_v4sf_var): Likewise.
29679
29680 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
29681
29682         PR sanitizer/80444
29683         * sancov.c (sancov_pass): Use gsi_start_nondebug_after_labels_bb
29684         instead of gsi_after_labels.
29685
29686 2017-04-18  Jeff Law  <law@redhat.com>
29687
29688         * regcprop.c (maybe_mode_change): Avoid creating copies of the
29689         stack pointer.
29690
29691         Revert:
29692         2017-04-13  Jeff Law  <law@redhat.com>
29693         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
29694         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
29695
29696 2017-04-18  Georg-Johann Lay  <avr@gjlay.de>
29697
29698         PR target/79453
29699         * config/avr/avr.c (intl.h): Include it.
29700         (avr_pgm_check_var_decl) [reason]: Wrap diagnostic snippets into _().
29701
29702 2017-04-18  Martin Liska  <mliska@suse.cz>
29703
29704         PR gcov-profile/78783
29705         * gcov-tool.c (gcov_output_files): Validate that destination
29706         file is either removed by the tool or by a user.
29707
29708 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
29709             Guy Benyei  <guybe@mellanox.com>
29710
29711         * config/arc/arc.c (arc_reorg): Move loop_end_id into a more local
29712         block, and do not negate it, the stored id is already negative.
29713
29714 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
29715
29716         * config/arc/arc.md (doloop_begin_i): Use @pcl assembler syntax.
29717
29718 2017-04-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
29719
29720         PR target/80098
29721         * config/rs6000/rs6000-cpus.def (OTHER_P9_VECTOR_MASKS): Define
29722         masks of options that should be turned off if the VSX vector
29723         options are turned off.
29724         (OTHER_P8_VECTOR_MASKS): Likewise.
29725         (OTHER_VSX_VECTOR_MASKS): Likewise.
29726         * config/rs6000/rs6000.c (rs6000_option_override_internal): Call
29727         rs6000_disable_incompatible_switches to validate no type switches
29728         like -mvsx.
29729         (rs6000_incompatible_switch): New function to disallow turning on
29730         other vector options if -mno-vsx, -mno-power8-vector, or
29731         -mno-power9-vector are specified.
29732
29733 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
29734
29735         * config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls.
29736
29737 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
29738
29739         * config/arc/arc-protos.h (arc_decl_pretend_args): Remove.
29740         * config/arc/arc.c (arc_decl_pretend_args): Likewise.
29741         * config/arc/arc.h (CFA_FRAME_BASE_OFFSET): Likewise.
29742         (ARG_POINTER_CFA_OFFSET): Likewise.
29743
29744 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
29745
29746         * config/arc/arc.c (arc_mode_dependent_address_p): Relax
29747         conditions to take advantage of various optimizations.
29748
29749 2017-04-13  Jeff Law  <law@redhat.com>
29750
29751         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
29752         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
29753         (zero_extendsidi2_dext): Likewise.
29754
29755 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
29756
29757         PR sanitizer/80403
29758         * fold-const.c (fold_ternary_loc): Revert
29759         use op0 instead of fold_convert_loc (loc, type, arg0) part of
29760         2017-04-12 change.
29761
29762 2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>
29763
29764         PR rtl-optimization/80343
29765         * lra-remat.c (update_scratch_ops): Assign original hard reg to
29766         new scratch pseudo.
29767
29768 2017-04-13  Denis Khalikov <d.khalikov@partner.samsung.com>
29769
29770         PR sanitizer/80414
29771         * ubsan.c (ubsan_expand_bounds_ifn): Pass original index
29772         to ubsan_encode_value.
29773
29774 2017-04-13  Jeff Law  <law@redhat.com>
29775
29776         * reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs
29777         appearing in DEBUG_INSNs.
29778
29779 2017-04-13  Martin Liska  <mliska@suse.cz>
29780
29781         PR gcov-profile/80413
29782         * gcov-io.c (gcov_write_string): Copy to buffer just when
29783         allocated size is greater than zero.
29784
29785 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
29786
29787         PR debug/80321
29788         * dwarf2out.c (decls_for_scope): Ignore declarations of
29789         current_function_decl in BLOCK_NONLOCALIZED_VARS.
29790
29791 2017-04-12  Jan Hubicka  <hubicka@ucw.cz>
29792
29793         PR lto/69953
29794         * ipa-visibility.c (non_local_p): Fix typos.
29795         (localize_node): When localizing symbol in same comdat group,
29796         dissolve the group only when we know external symbols are going
29797         to be privatized.
29798         (function_and_variable_visibility): Do not localize DECL_EXTERNAL.
29799
29800 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
29801
29802         PR tree-optimization/79390
29803         * optabs.c (emit_conditional_move): If the preferred op2/op3 operand
29804         order does not result in usable sequence, retry with reversed operand
29805         order.
29806
29807         PR sanitizer/80403
29808         PR sanitizer/80404
29809         PR sanitizer/80405
29810         * fold-const.c (fold_ternary_loc): Use op1 instead of arg1 as argument
29811         to fold_build2_loc.  Convert TREE_OPERAND (tem, 0) to type.  Use
29812         op0 instead of fold_convert_loc (loc, type, arg0).
29813
29814 2017-04-12  Jeff Law  <law@redhat.com>
29815
29816         * genattrtab.c (write_eligible_delay): Verify DELAY_INSN still
29817         has a delay slot in the generated code.
29818
29819         * config/cris/cris.md (cris_preferred_reload_class): Return
29820         GENNONACR_REGS rather than GENERAL_REGS.
29821
29822 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
29823
29824         PR c/80163
29825         * expr.c <CASE_CONVERT>: For EXPAND_INITIALIZER determine SIGN_EXTEND
29826         vs. ZERO_EXTEND based on signedness of treeop0's type rather than
29827         signedness of the result type.
29828
29829 2017-04-12  Richard Biener  <rguenther@suse.de>
29830             Jeff Law  <law@redhat.com>
29831
29832         PR tree-optimization/80359
29833         * tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not
29834         trim stores to TARGET_MEM_REFs.
29835
29836 2017-04-12  Richard Biener  <rguenther@suse.de>
29837
29838         PR tree-optimization/79390
29839         * gimple-ssa-split-paths.c (is_feasible_trace): Restrict
29840         threading case even more.
29841
29842 2017-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
29843
29844         PR target/80382
29845         * config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
29846         for quad_address_p for TImode, instead of just not indexed_address.
29847
29848 2017-04-12  Richard Biener  <rguenther@suse.de>
29849             Bernd Edlinger  <bernd.edlinger@hotmail.de>
29850
29851         PR middle-end/79671
29852         * alias.c (component_uses_parent_alias_set_from): Handle
29853         TYPE_TYPELESS_STORAGE.
29854         (get_alias_set): Likewise.
29855         * tree-core.h (tree_type_common): Add typeless_storage flag.
29856         * tree.h (TYPE_TYPELESS_STORAGE): New macro.
29857         * stor-layout.c (place_union_field): Set TYPE_TYPELESS_STORAGE
29858         for types containing members with TYPE_TYPELESS_STORAGE.
29859         (place_field): Likewise.
29860         (layout_type): Likewise for ARRAY_TYPE.
29861         * lto-streamer-out.c (hash_tree): Hash TYPE_TYPELESS_STORAGE.
29862         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Stream
29863         TYPE_TYPELESS_STORAGE.
29864         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
29865
29866 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
29867
29868         PR sanitizer/80349
29869         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
29870         first argument to type.
29871
29872 2017-04-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29873
29874         PR target/80376
29875         PR target/80315
29876         * config/rs6000/rs6000.c (rs6000_expand_unop_builtin): Return
29877         CONST0_RTX (mode) rather than const0_rtx where appropriate.
29878         (rs6000_expand_binop_builtin): Likewise.
29879         (rs6000_expand_ternop_builtin): Likewise; also add missing
29880         vsx_xxpermdi_* variants; also fix typo (arg1 => arg2) for
29881         vshasigma built-ins.
29882         * doc/extend.texi: Document that vec_xxpermdi's third argument
29883         must be a constant.
29884
29885 2017-04-11  Uros Bizjak  <ubizjak@gmail.com>
29886
29887         * config/i386/i386.c (dimode_scalar_chain::compute_convert_gain):
29888         Use shift_const cost parameter when calculating gain of STV shifts.
29889
29890 2017-04-11  Vladimir Makarov  <vmakarov@redhat.com>
29891
29892         PR rtl-optimization/70478
29893         * lra-constraints.c (process_alt_operands): Check memory for
29894         disfavoring memory insn operand.
29895
29896 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
29897
29898         PR middle-end/80100
29899         * simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Perform
29900         left shift in unsigned HOST_WIDE_INT type.
29901
29902         PR rtl-optimization/80385
29903         * simplify-rtx.c (simplify_unary_operation_1): Don't transform
29904         (not (neg X)) into (plus X -1) for complex or non-integral modes.
29905
29906         PR libgomp/80394
29907         * omp-low.c (scan_omp_task): Don't optimize away empty tasks
29908         if they have any depend clauses.
29909
29910 2017-04-11  Martin Liska  <mliska@suse.cz>
29911
29912         PR ipa/80212
29913         * cgraph.c (cgraph_node::dump): Dump calls_comdat_local.
29914         * ipa-split.c (split_function): Create a local comdat symbol
29915         if caller is in a comdat group.
29916
29917 2017-04-11  Martin Liska  <mliska@suse.cz>
29918
29919         PR ipa/80212
29920         * ipa-cp.c (determine_versionability): Handle calls_comdat_local
29921         flags.
29922
29923 2017-04-11  Martin Sebor  <msebor@redhat.com>
29924
29925         PR middle-end/80364
29926         * gimple-ssa-sprintf.c (get_int_range): Remove second argument and
29927         always use the int type.  Use INTEGRAL_TYPE_P() rather than testing
29928         for INTEGER_TYPE.
29929         (directive::set_width, directive::set_precision, format_character):
29930         Adjust.
29931         (parse_directive): Use INTEGRAL_TYPE_P() rather than testing for
29932         INTEGER_TYPE.
29933
29934 2017-04-11  Richard Earnshaw  <rearnsha@arm.com>
29935
29936         PR target/80389
29937         * config/arm/arm.c (arm_configure_build_target): When -mcpu and -arch
29938         conflict, set target->arch_name instead of target->cpu_name.
29939
29940 2017-04-11  Richard Biener  <rguenther@suse.de>
29941
29942         PR tree-optimization/80374
29943         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Use
29944         build_zero_cst, remove fold_convertible_p check again.
29945
29946 2017-04-11  Martin Liska  <mliska@suse.cz>
29947
29948         PR sanitizer/70878
29949         * ubsan.c (instrument_object_size): Do not instrument register
29950         variables.
29951
29952 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
29953
29954         PR target/80381
29955         * config/i386/i386-builtin-types.def
29956         (V16HI_FTYPE_V16HI_INT_V16HI_UHI_COUNT,
29957         V16HI_FTYPE_V16HI_V8HI_V16HI_UHI_COUNT,
29958         V16SI_FTYPE_V16SI_INT_V16SI_UHI_COUNT,
29959         V16SI_FTYPE_V16SI_V4SI_V16SI_UHI_COUNT,
29960         V2DI_FTYPE_V2DI_INT_V2DI_UQI_COUNT,
29961         V2DI_FTYPE_V2DI_V2DI_V2DI_UQI_COUNT,
29962         V32HI_FTYPE_V32HI_INT_V32HI_USI_COUNT,
29963         V32HI_FTYPE_V32HI_V8HI_V32HI_USI_COUNT,
29964         V4DI_FTYPE_V4DI_INT_V4DI_UQI_COUNT,
29965         V4DI_FTYPE_V4DI_V2DI_V4DI_UQI_COUNT,
29966         V4SI_FTYPE_V4SI_INT_V4SI_UQI_COUNT,
29967         V4SI_FTYPE_V4SI_V4SI_V4SI_UQI_COUNT,
29968         V8DI_FTYPE_V8DI_INT_V8DI_UQI_COUNT,
29969         V8DI_FTYPE_V8DI_V2DI_V8DI_UQI_COUNT,
29970         V8HI_FTYPE_V8HI_INT_V8HI_UQI_COUNT,
29971         V8HI_FTYPE_V8HI_V8HI_V8HI_UQI_COUNT,
29972         V8SI_FTYPE_V8SI_INT_V8SI_UQI_COUNT,
29973         V8SI_FTYPE_V8SI_V4SI_V8SI_UQI_COUNT): New function type aliases.
29974         * config/i386/i386-builtin.def (__builtin_ia32_pslld512_mask,
29975         __builtin_ia32_pslldi512_mask, __builtin_ia32_psllq512_mask,
29976         __builtin_ia32_psllqi512_mask, __builtin_ia32_psrad512_mask,
29977         __builtin_ia32_psradi512_mask, __builtin_ia32_psraq512_mask,
29978         __builtin_ia32_psraqi512_mask, __builtin_ia32_psrld512_mask,
29979         __builtin_ia32_psrldi512_mask, __builtin_ia32_psrlq512_mask,
29980         __builtin_ia32_psrlqi512_mask, __builtin_ia32_psllwi128_mask,
29981         __builtin_ia32_pslldi128_mask, __builtin_ia32_psllqi128_mask,
29982         __builtin_ia32_psllw128_mask, __builtin_ia32_pslld128_mask,
29983         __builtin_ia32_psllq128_mask, __builtin_ia32_psllwi256_mask,
29984         __builtin_ia32_psllw256_mask, __builtin_ia32_pslldi256_mask,
29985         __builtin_ia32_pslld256_mask, __builtin_ia32_psllqi256_mask,
29986         __builtin_ia32_psllq256_mask, __builtin_ia32_psradi128_mask,
29987         __builtin_ia32_psrad128_mask, __builtin_ia32_psradi256_mask,
29988         __builtin_ia32_psrad256_mask, __builtin_ia32_psraqi128_mask,
29989         __builtin_ia32_psraq128_mask, __builtin_ia32_psraqi256_mask,
29990         __builtin_ia32_psraq256_mask, __builtin_ia32_psrldi128_mask,
29991         __builtin_ia32_psrld128_mask, __builtin_ia32_psrldi256_mask,
29992         __builtin_ia32_psrld256_mask, __builtin_ia32_psrlqi128_mask,
29993         __builtin_ia32_psrlq128_mask, __builtin_ia32_psrlqi256_mask,
29994         __builtin_ia32_psrlq256_mask, __builtin_ia32_psrawi256_mask,
29995         __builtin_ia32_psraw256_mask, __builtin_ia32_psrawi128_mask,
29996         __builtin_ia32_psraw128_mask, __builtin_ia32_psrlwi256_mask,
29997         __builtin_ia32_psrlw256_mask, __builtin_ia32_psrlwi128_mask,
29998         __builtin_ia32_psrlw128_mask, __builtin_ia32_psllwi512_mask,
29999         __builtin_ia32_psllw512_mask, __builtin_ia32_psrawi512_mask,
30000         __builtin_ia32_psraw512_mask, __builtin_ia32_psrlwi512_mask,
30001         __builtin_ia32_psrlw512_mask): Use _COUNT suffixed function type
30002         aliases.
30003         * config/i386/i386.c (ix86_expand_args_builtin): Rename last_arg_count
30004         flag to second_arg_count, handle 4 argument function type _COUNT
30005         aliases, handle second_arg_count on second argument rather than last.
30006
30007 2017-04-10  Jeff Law  <law@redhat.com>
30008
30009         PR tree-optimization/80374
30010         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Do not try to
30011         record anything if we can not convert integer_zero_node to the
30012         desired type.
30013
30014 2017-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
30015
30016         PR target/80108
30017         * config/rs6000/rs6000.c (rs6000_option_override_internal):
30018         Enhance special handling given to the TARGET_P9_MINMAX option in
30019         relation to certain other options.
30020
30021 2017-04-10  Bin Cheng  <bin.cheng@arm.com>
30022
30023         PR tree-optimization/80153
30024         * tree-ssa-loop-ivopts.c (add_iv_candidate_for_use): Check and
30025         remove POINTER_PLUS_EXPR's base part directly, rather than through
30026         aff_tree.
30027
30028 2017-04-10  Richard Biener  <rguenther@suse.de>
30029             Bin Cheng  <bin.cheng@arm.com>
30030
30031         PR tree-optimization/80153
30032         * tree-affine.c (aff_combination_to_tree): Get base pointer from
30033         the first element of pointer type aff_tree.  Build result expr in
30034         aff_tree's type.
30035         (add_elt_to_tree): Convert to type unconditionally.  Remove other
30036         fold_convert calls.
30037         * tree-ssa-loop-ivopts.c (alloc_iv): Pass in consistent types.
30038         (rewrite_use_nonlinear_expr): Check invariant using iv information.
30039
30040 2017-04-10  Richard Biener  <rguenther@suse.de>
30041
30042         * tree-ssa-structalias.c (find_func_aliases): Properly handle
30043         asm inputs.
30044
30045 2017-04-10  Vladimir Makarov  <vmakarov@redhat.com>
30046
30047         PR rtl-optimization/70478
30048         * lra-constraints.c (curr_small_class_check): New.
30049         (update_and_check_small_class_inputs): New.
30050         (process_alt_operands): Update curr_small_class_check.  Disfavor
30051         alternative insn memory operands.  Check available regs for small
30052         class operands.
30053
30054 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
30055
30056         PR target/80057
30057         * config/mips/mips.opt (-mvirt): Update description.
30058         * doc/invoke.texi (-mvirt): Likewise.
30059
30060 2017-04-10  Richard Biener  <rguenther@suse.de>
30061
30062         PR middle-end/80362
30063         * fold-const.c (fold_binary_loc): Look at unstripped ops when
30064         looking for NEGATE_EXPR in -A / -B to A / B folding.
30065
30066 2017-04-10  Martin Liska  <mliska@suse.cz>
30067
30068         PR gcov-profile/80224
30069         * gcov.c (print_usage): Fix usage string.
30070         (get_gcov_intermediate_filename): Remove.
30071         (output_gcov_file): Use both for normal and intermediate format.
30072         (generate_results): Do not initialize special file for
30073         intermediate format.
30074
30075 2017-04-10  Richard Biener  <rguenther@suse.de>
30076
30077         PR tree-optimization/80304
30078         * tree-ssa-loop-im.c (ref_indep_loop_p_1): Also recurse
30079         for safelen.
30080
30081 2017-04-10  Nathan Sidwell  <nathan@acm.org>
30082
30083         PR target/79905
30084         * config/rs6000/rs6000.c (rs6000_vector_type): New.
30085         (rs6000_init_builtins): Use it.
30086
30087 2016-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30088
30089         * config/arm/arm.md (<mrc>): Add mode to SET source.
30090         (<mrrc>): Likewise.
30091
30092 2017-04-10  Richard Biener  <rguenther@suse.de>
30093
30094         PR middle-end/80344
30095         * gimplify.c (is_gimple_mem_rhs_or_call): Allow CLOBBERs.
30096
30097 2017-04-10  Jakub Jelinek  <jakub@redhat.com>
30098
30099         PR target/80324
30100         * config/i386/avx512fintrin.h (_mm512_reduce_add_epi32,
30101         _mm512_reduce_mul_epi32, _mm512_reduce_and_epi32,
30102         _mm512_reduce_or_epi32, _mm512_mask_reduce_add_epi32,
30103         _mm512_mask_reduce_mul_epi32, _mm512_mask_reduce_and_epi32,
30104         _mm512_mask_reduce_or_epi32, _mm512_reduce_min_epi32,
30105         _mm512_reduce_max_epi32, _mm512_reduce_min_epu32,
30106         _mm512_reduce_max_epu32, _mm512_mask_reduce_min_epi32,
30107         _mm512_mask_reduce_max_epi32, _mm512_mask_reduce_min_epu32,
30108         _mm512_mask_reduce_max_epu32, _mm512_reduce_add_ps,
30109         _mm512_reduce_mul_ps, _mm512_mask_reduce_add_ps,
30110         _mm512_mask_reduce_mul_ps, _mm512_reduce_min_ps, _mm512_reduce_max_ps,
30111         _mm512_mask_reduce_min_ps, _mm512_mask_reduce_max_ps,
30112         _mm512_reduce_add_epi64, _mm512_reduce_mul_epi64,
30113         _mm512_reduce_and_epi64, _mm512_reduce_or_epi64,
30114         _mm512_mask_reduce_add_epi64, _mm512_mask_reduce_mul_epi64,
30115         _mm512_mask_reduce_and_epi64, _mm512_mask_reduce_or_epi64,
30116         _mm512_reduce_min_epi64, _mm512_reduce_max_epi64,
30117         _mm512_mask_reduce_min_epi64, _mm512_mask_reduce_max_epi64,
30118         _mm512_reduce_min_epu64, _mm512_reduce_max_epu64,
30119         _mm512_mask_reduce_min_epu64, _mm512_mask_reduce_max_epu64,
30120         _mm512_reduce_add_pd, _mm512_reduce_mul_pd, _mm512_mask_reduce_add_pd,
30121         _mm512_mask_reduce_mul_pd, _mm512_reduce_min_pd, _mm512_reduce_max_pd,
30122         _mm512_mask_reduce_min_pd, _mm512_mask_reduce_max_pd): New intrinsics.
30123
30124 2017-04-08  Vladimir Makarov  <vmakarov@redhat.com>
30125
30126         PR rtl-optimization/70478
30127         * lra-constraints.c: Reverse the last patch.
30128
30129 2017-04-08  Andreas Tobler  <andreast@gcc.gnu.org>
30130
30131         * config/aarch64/aarch64-freebsd.h: Define MCOUNT_NAME.
30132         Add comment for WCHAR_T.
30133
30134 2017-04-08  Martin Liska  <mliska@suse.cz>
30135
30136         Revert:
30137         2017-04-07  Martin Liska  <mliska@suse.cz>
30138
30139         PR ipa/80212
30140         * ipa-split.c (split_function): Add function part to a same comdat
30141         group.
30142
30143 2017-04-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
30144
30145         PR target/80358
30146         * config/rs6000/rs6000.c (expand_block_compare): Fix boundary check.
30147
30148 2017-04-07  Pat Haugen  <pthaugen@us.ibm.com>
30149
30150         * rs6000/rs6000.c (vec_load_pendulum): Rename...
30151         (vec_pairing): ...to this.
30152         (power9_sched_reorder2): Rewrite code for pairing vector/vecload insns.
30153         (rs6000_sched_init): Adjust for name change.
30154         (struct rs6000_sched_context): Likewise.
30155         (rs6000_init_sched_context): Likewise.
30156         (rs6000_set_sched_context): Likewise.
30157
30158 2017-04-07  Jakub Jelinek  <jakub@redhat.com>
30159
30160         PR target/80322
30161         PR target/80323
30162         PR target/80325
30163         PR target/80326
30164         * config/i386/avxintrin.h (_mm256_cvtsd_f64, _mm256_cvtss_f32): New
30165         intrinsics.
30166         * config/i386/avx512fintrin.h (_mm512_int2mask, _mm512_mask2int,
30167         _mm512_abs_ps, _mm512_mask_abs_ps, _mm512_abs_pd, _mm512_mask_abs_pd,
30168         _mm512_cvtsd_f64, _mm512_cvtss_f32): Likewise.
30169
30170 2017-04-07  Andreas Tobler  <andreast@gcc.gnu.org>
30171
30172         * config/aarch64/aarch64-freebsd.h: Define WCHAR_TYPE.
30173
30174 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
30175
30176         PR rtl-optimization/70703
30177         * ira-color.c (update_conflict_hard_regno_costs): Use
30178         int64_t instead of HOST_WIDE_INT.
30179
30180 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
30181
30182         PR rtl-optimization/70478
30183         * lra-constraints.c (process_alt_operands): Disfavor alternative
30184         insn memory operands.
30185
30186 2017-04-07  Jeff Law  <law@redhat.com>
30187
30188         * config/iq2000/iq2000.c (final_prescan_insn): Do not separate a
30189         CALL and NOTE_INSN_CALL_ARG_LOCATION.
30190
30191 2017-04-07  Martin Liska  <mliska@suse.cz>
30192
30193         PR target/79889
30194         * config/aarch64/aarch64.c (aarch64_process_target_attr):
30195         Show error message instead of an ICE.
30196
30197 2017-04-07  Martin Liska  <mliska@suse.cz>
30198
30199         PR ipa/80212
30200         * ipa-split.c (split_function): Add function part to a same comdat
30201         group.
30202
30203 2017-04-07  Richard Biener  <rguenther@suse.de>
30204
30205         PR middle-end/80341
30206         * tree.c (get_unwidened): Also handle ! for_type case for
30207         INTEGER_CSTs.
30208         * convert.c (do_narrow): Split out from ...
30209         (convert_to_integer_1): ... here.  Do not pass final truncation
30210         type to get_unwidened for TRUNC_DIV_EXPR.
30211
30212 2017-04-07  Richard Biener  <rguenther@suse.de>
30213
30214         * tree-affine.c (wide_int_ext_for_comb): Take type rather
30215         than aff_tree.
30216         (aff_combination_const): Adjust.
30217         (aff_combination_scale): Likewise.
30218         (aff_combination_add_elt): Likewise.
30219         (aff_combination_add_cst): Likewise.
30220         (aff_combination_convert): Likewise.
30221         (add_elt_to_tree): Likewise.  Remove unused argument.
30222         (aff_combination_to_tree): Adjust calls to add_elt_to_tree.
30223
30224 2017-04-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
30225
30226         * config/arm/arm.h (ARM_DEFAULT_SHORT_ENUMS): Provide default
30227         definition.
30228         * config/arm/arm.c (arm_default_short_enums): Use
30229         ARM_DEFAULT_SHORT_ENUMS.
30230         * config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS): Define.
30231
30232 2017-04-06  Jakub Jelinek  <jakub@redhat.com>
30233
30234         PR debug/80234
30235         * dwarf2out.c (gen_member_die): Handle C++17 inline static data
30236         members with redundant out-of-class redeclaration.
30237
30238 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
30239
30240         PR target/80286
30241         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): New pattern.
30242         * config/i386/i386.md (*zero_extendsidi2):
30243         Add (?*x,*x) and (?*v,*v) alternatives.
30244
30245 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
30246
30247         PR target/79733
30248         * config/i386/i386.c (ix86_expand_builtin)
30249         <case IX86_BUILTIN_K{,OR}TEST{C,Z}{8,16,32,64}>: Determine insn operand
30250         mode from insn data. Convert operands to insn operand mode.
30251         Copy operands that don't satisfy insn predicate to a register.
30252
30253 2017-04-06  Sam Thursfield  <sam.thursfield@codethink.co.uk>
30254
30255         * config/rs6000/x-aix: Increase memory limit for genautomata on AIX.
30256         Update comments.
30257
30258 2017-04-06  Richard Biener  <rguenther@suse.de>
30259
30260         PR tree-optimization/80334
30261         * tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
30262         preserve alignment of accesses.
30263
30264 2017-04-06  Richard Biener  <rguenther@suse.de>
30265
30266         PR tree-optimization/80262
30267         * tree-sra.c (build_ref_for_offset): Preserve address-space
30268         information.
30269         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
30270         Drop useless address-space information on MEM_REF offsets.
30271
30272 2017-04-05  Andreas Schwab  <schwab@linux-m68k.org>
30273
30274         * builtins.def (BUILT_IN_UPDATE_SETJMP_BUF): Fix type.
30275
30276 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
30277
30278         PR rtl-optimization/70703
30279         * ira-color.c (update_conflict_hard_regno_costs): Use
30280         HOST_WIDE_INT instead of long.
30281
30282 2017-04-05  Uros Bizjak  <ubizjak@gmail.com>
30283
30284         PR target/80298
30285         * config/i386/mmintrin.h: Add -msse target option when __SSE__ is
30286         not defined for x86_64 target.  Add -mmmx target option when __SSE2__
30287         is not defined.
30288         * config/i386/mm3dnow.h: Add -msse target when __SSE__ is not defined
30289         for x86_64 target.  Handle -m3dnowa option.
30290
30291 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
30292
30293         PR rtl-optimization/70703
30294         * ira-color.c (update_costs_from_allocno): Use the smallest mode.
30295         (update_conflict_hard_regno_costs): Use long instead of unsigned
30296         arithmetic for cost calculation.
30297
30298 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
30299             Bernd Edlinger  <bernd.edlinger@hotmail.de>
30300
30301         PR sanitizer/80308
30302         * asan.c (asan_store_shadow_bytes): Fix location of last_chunk_value
30303         for big endian.
30304
30305 2017-04-05  Eric Botcazou  <ebotcazou@adacore.com>
30306
30307         PR target/78002
30308         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Replace
30309         ptr_mode with Pmode throughout.
30310         * config/aarch64/aarch64.md (probe_stack_range_<PTR:mode): Rename
30311         into probe_stack_range and use DImode.
30312
30313 2017-04-05  Dominik Vogt  <vogt@linux.vnet.ibm.com>
30314
30315         PR target/79890
30316         * config/s390/s390.c (s390_register_info_gprtofpr): Return if
30317         call_eh_return is true.
30318
30319 2017-04-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
30320
30321         * config/s390/s390-c.c (s390_resolve_overloaded_builtin):
30322         Initialize last_match_fntype_index.
30323
30324 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
30325
30326         PR target/80310
30327         * tree-nvr.c: Include internal-fn.h.
30328         (pass_return_slot::execute): Ignore internal calls without
30329         direct optab.
30330
30331 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
30332             Richard Biener  <rguenther@suse.de>
30333
30334         PR c++/80297
30335         * genmatch.c (capture::gen_transform): For GENERIC unshare_expr
30336         captures used multiple times, except for the last use.
30337         * generic-match-head.c: Include gimplify.h.
30338
30339 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
30340
30341         PR tree-optimization/79390
30342         * target.h (struct noce_if_info): Declare.
30343         * targhooks.h (default_noce_conversion_profitable_p): Declare.
30344         * target.def (noce_conversion_profitable_p): New target hook.
30345         * ifcvt.h (struct noce_if_info): New type, moved from ...
30346         * ifcvt.c (struct noce_if_info): ... here.
30347         (noce_conversion_profitable_p): Renamed to ...
30348         (default_noce_conversion_profitable_p): ... this.  No longer
30349         static nor inline.
30350         (noce_try_store_flag_constants, noce_try_addcc,
30351         noce_try_store_flag_mask, noce_try_cmove, noce_try_cmove_arith,
30352         noce_convert_multiple_sets): Use targetm.noce_conversion_profitable_p
30353         instead of noce_conversion_profitable_p.
30354         * config/i386/i386.c: Include ifcvt.h.
30355         (ix86_option_override_internal): Don't override
30356         PARAM_MAX_RTL_IF_CONVERSION_INSNS default.
30357         (ix86_noce_conversion_profitable_p): New function.
30358         (TARGET_NOCE_CONVERSION_PROFITABLE_P): Redefine.
30359         * config/i386/x86-tune.def (X86_TUNE_ONE_IF_CONV_INSN): Adjust comment.
30360         * doc/tm.texi.in (TARGET_NOCE_CONVERSION_PROFITABLE_P): Add.
30361         * doc/tm.texi: Regenerated.
30362
30363 2017-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30364
30365         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Grammar
30366         correction.
30367
30368 2017-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
30369
30370         PR target/80307
30371         * config/arm/arm.c (thumb1_rtx_costs): Give a cost of 32
30372         instructions for small multiply cores.
30373
30374 2017-04-04  Jeff Law  <law@redhat.com>
30375
30376         * config/mips/mips.c (mips_multi_add): Zero initialize the newly
30377         added member.
30378         (mips_expand_vec_perm_const): Initialize elements in orig_perm
30379         that are not set by the loop over the elements.
30380
30381 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
30382
30383         PR target/80286
30384         * config/i386/i386.c (ix86_expand_args_builtin): If op has scalar
30385         int mode, convert_modes it to mode as unsigned, otherwise use
30386         lowpart_subreg to mode rather than SImode.
30387         * config/i386/sse.md (<mask_codefor>ashr<mode>3<mask_name>,
30388         ashr<mode>3, ashr<mode>3<mask_name>, <shift_insn><mode>3<mask_name>):
30389         Use DImode instead of SImode for the shift count operand.
30390         * config/i386/mmx.md (mmx_ashr<mode>3, mmx_<shift_insn><mode>3):
30391         Likewise.
30392
30393 2017-04-04  Richard Biener  <rguenther@suse.de>
30394
30395         PR middle-end/80281
30396         * match.pd (A + (-B) -> A - B): Make sure to preserve unsigned
30397         arithmetic done for the negate or the plus.  Simplify.
30398         (A - (-B) -> A + B): Likewise.
30399         * fold-const.c (split_tree): Make sure to not negate pointers.
30400
30401 2017-04-04  Segher Boessenkool  <segher@kernel.crashing.org>
30402
30403         PR rtl-optimization/60818
30404         * simplify-rtx.c (simplify_binary_operation_1): Do not replace
30405         a compare of comparisons with the thing compared if this results
30406         in a different machine mode.
30407
30408 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
30409
30410         * alias.c (base_alias_check): Fix typo in comment.
30411         * cgraph.h (class ipa_polymorphic_call_context): Likewise.
30412         * cgraphunit.c (symbol_table::compile): Likewise.
30413         * collect2.c (maybe_run_lto_and_relink): Likewise.
30414         * config/arm/arm.c (arm_thumb1_mi_thunk): Likewise.
30415         * config/avr/avr-arch.h (avr_arch_info_t): Likewise.
30416         * config/avr/avr.c (avr_map_op_t): Likewise.
30417         * config/cr16/cr16.h (DATA_ALIGNMENT): Likewise.
30418         * config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise.
30419         * config/epiphany/epiphany.md (movcc): Likewise.
30420         * config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise.
30421         * config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue):
30422         Likewise.
30423         * config/mips/mips.c (mips_save_restore_reg): Likewise.
30424         * config/rx/rx.c (rx_is_restricted_memory_address): Likewise.
30425         * config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise.
30426         * config/sh/sh.c (sh_rtx_costs): Likewise.
30427         * fold-const.c (fold_truth_andor): Likewise.
30428         * genautomata.c (collapse_flag): Likewise.
30429         * gengtype.h (struct type::u::s): Likewise.
30430         * gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise.
30431         * input.c (FORMAT_AMOUNT): Likewise.
30432         * ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector)
30433         (known_aggs_to_agg_replacement_list): Likewise.
30434         * ipa-inline-analysis.c: Likewise.
30435         * ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise.
30436         * ipa-polymorphic-call.c
30437         (ipa_polymorphic_call_context::restrict_to_inner_class): Likewise.
30438         * loop-unroll.c (analyze_insn_to_expand_var): Likewise.
30439         * lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos):
30440         Likewise.
30441         * modulo-sched.c (apply_reg_moves): Likewise.
30442         * omp-expand.c (build_omp_regions_1): Likewise.
30443         * trans-mem.c (struct tm_wrapper_hasher): Likewise.
30444         * tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise.
30445         * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise.
30446         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
30447         * value-prof.c: Likewise.
30448         * var-tracking.c (val_reset): Likewise.
30449
30450 2017-04-03  Richard Biener  <rguenther@suse.de>
30451
30452         PR tree-optimization/80275
30453         * fold-const.c (split_address_to_core_and_offset): Handle
30454         POINTER_PLUS_EXPR.
30455
30456 2017-04-03  Eric Botcazou  <ebotcazou@adacore.com>
30457
30458         * tree-nested.c (get_descriptor_type): Make sure that the alignment of
30459         descriptors is at least equal to that of functions.
30460
30461 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
30462
30463         * config/i386/sse.md (movdi_to_sse): Add missing DONE.
30464
30465 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
30466
30467         PR target/80250
30468         * config/i386/sse.md (mov<IMOD4:mode>): Remove insn pattern.
30469         (mov<IMOD4:mode>): New expander.
30470         (*mov<IMOD4:mode>_internal): New insn and split pattern.
30471
30472 2017-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
30473
30474         PR rtl-optimization/79405
30475         * fwprop.c (propagations_left): New variable.
30476         (forward_propagate_into): Decrement it.
30477         (fwprop_init): Initialize it.
30478         (fw_prop): If the variable has reached zero, stop propagating.
30479         (fwprop_addr): Ditto.
30480
30481 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
30482
30483         PR debug/79255
30484         * dwarf2out.c (decls_for_scope): If BLOCK_NONLOCALIZED_VAR is
30485         a FUNCTION_DECL, pass it as decl instead of origin to
30486         process_scope_var.
30487
30488 2017-03-31  Alexander Monakov  <amonakov@ispras.ru>
30489
30490         * config/nvptx/nvptx.c (nvptx_output_softstack_switch): Correct format
30491         string.
30492
30493 2017-03-31  Pat Haugen  <pthaugen@us.ibm.com>
30494
30495         PR target/80107
30496         * config/rs6000/rs6000.md (extendhi<mode>2): Add test for
30497         TARGET_VSX_SMALL_INTEGER.
30498
30499 2017-03-31  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30500
30501         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
30502         reference to the OpenPOWER 64-Bit ELF V2 ABI Specification.
30503
30504 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
30505
30506         * config/mips/mips-msa.md (msa_vec_extract_<msafmt_f>): Update
30507         extraction from odd-numbered MSA register.
30508
30509 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
30510
30511         PR middle-end/80173
30512         * expmed.c (store_bit_field_1): Don't attempt to create
30513         a word subreg out of hard registers wider than word if they
30514         have HARD_REGNO_NREGS of 1 for their mode.
30515
30516         PR middle-end/80163
30517         * varasm.c (initializer_constant_valid_p_1): Disallow sign-extending
30518         conversions to integer types wider than word and pointer.
30519
30520         PR debug/80025
30521         * cselib.h (rtx_equal_for_cselib_1): Add depth argument.
30522         (rtx_equal_for_cselib_p): Pass 0 to it.
30523         * cselib.c (cselib_hasher::equal): Likewise.
30524         (rtx_equal_for_cselib_1): Add depth argument.  If depth
30525         is 128, don't look up VALUE locs and punt.  Increment
30526         depth in recursive calls when walking VALUE locs.
30527
30528 2017-03-31  Bernd Edlinger  <bernd.edlinger@hotmail.de>
30529
30530         * gcov.c (md5sum_to_hex): Fix output of MD5 hex bytes.
30531         (make_gcov_file_name): Use the canonical path name for generating
30532         the MD5 value.
30533         (read_line): Fix handling of files with ascii null bytes.
30534
30535 2017-03-30  Matthew Fortune  <matthew.fortune@imgtec.com>
30536
30537         * config/mips/mips.c (mips_expand_vector_init): Create a const_vector
30538         to initialise a vector register instead
30539         of using a const_int.
30540
30541 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
30542
30543         PR translation/80189
30544         * gimplify.c (omp_default_clause): Use %qs instead of %s in
30545         diagnostic messages.
30546
30547 2017-03-30  Peter Bergner  <bergner@vnet.ibm.com>
30548
30549         PR target/80246
30550         * config/rs6000/dfp.md (dfp_dxex_<mode>): Update mode of operand 0.
30551         (dfp_diex_<mode>): Update mode of operand 1.
30552         * doc/extend.texi (dxex, dxexq): Document change to return type.
30553         (diex, diexq): Document change to argument type.
30554
30555 2017-03-30  Martin Jambor  <mjambor@suse.cz>
30556
30557         PR ipa/77333
30558         * cgraph.h (cgraph_build_function_type_skip_args): Declare.
30559         * cgraph.c (redirect_call_stmt_to_callee): Set gimple fntype so that
30560         it reflects the signature changes performed at the callee side.
30561         * cgraphclones.c (build_function_type_skip_args): Make public, renamed
30562         to cgraph_build_function_type_skip_args.
30563         (build_function_decl_skip_args): Adjust call to the above function.
30564
30565 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
30566
30567         PR target/80206
30568         * config/i386/sse.md
30569         (<extract_type>_vextract<shuffletype><extract_suf>_mask): Use
30570         register as dest whenever it is a MEM not rtx_equal_p to the
30571         corresponding dup operand, and when forcing into reg move the
30572         reg into the memory afterwards.
30573         (<extract_type_2>_vextract<shuffletype><extract_suf_2>_mask):
30574         Likewise.  Use <ssehalfvecmode> instead of <ssequartermode>
30575         for the force_reg mode.
30576         (avx512vl_vextractf128<mode>): Use register as dest either
30577         always when a MEM, or when it is a MEM not rtx_equal_p to the
30578         corresponding dup operand, or even not when it is a CONST_VECTOR
30579         depending on the mode and lo vs. hi.
30580         (avx512dq_vextract<shuffletype>64x2_1_maskm): Remove extraneous
30581         parens.
30582         (avx512f_vextract<shuffletype>32x4_1_maskm): Likewise.
30583         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name>):
30584         Likewise.  Require that operands[2] is even.
30585         (<mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name>):
30586         Remove extraneous parens.  Require that operands[2] is a multiple
30587         of 4.
30588         (vec_extract_lo_<mode><mask_name>): Don't bother testing if
30589         operands[0] is a MEM if <mask_applied>, the predicates/constraints
30590         disallow memory then.
30591
30592 2017-03-30  Richard Biener  <rguenther@suse.de>
30593
30594         PR tree-optimization/77498
30595         * tree-ssa-pre.c (phi_translate_1): Do not allow simplifications
30596         to non-constants over backedges.
30597
30598 2017-03-29  Segher Boessenkool  <segher@kernel.crashing.org>
30599
30600         PR rtl-optimization/80233
30601         * combine.c (combine_instructions): Only take NONDEBUG_INSN_P insns
30602         as last_combined_insn.  Do not test for BARRIER_P separately.
30603
30604 2017-03-29  Andreas Schwab  <schwab@suse.de>
30605
30606         PR ada/80146
30607         * calls.c (prepare_call_address): Convert funexp to Pmode before
30608         copying to temp reg.
30609
30610 2017-03-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30611
30612         PR tree-optimization/80158
30613         * gimple-ssa-strength-reduction.c (replace_mult_candidate):
30614         Handle possible future case of more than one alternate
30615         interpretation.
30616         (replace_rhs_if_not_dup): Likewise.
30617         (replace_one_candidate): Likewise.
30618
30619 2017-03-28  Vladimir Makarov  <vmakarov@redhat.com>
30620
30621         PR rtl-optimization/80193
30622         * ira.c (ira): Do not check allocation for LRA.
30623
30624 2017-03-28  Alexander Monakov  <amonakov@ispras.ru>
30625
30626         * config/nvptx/nvptx-protos.h (nvptx_output_simt_enter): Declare.
30627         (nvptx_output_simt_exit): Declare.
30628         * config/nvptx/nvptx.c (nvptx_init_unisimt_predicate): Use
30629         cfun->machine->unisimt_location.  Handle NULL unisimt_predicate.
30630         (init_softstack_frame): Move initialization of crtl->is_leaf to...
30631         (nvptx_declare_function_name): ...here.  Emit declaration of local
30632         memory space buffer for omp_simt_enter insn.
30633         (nvptx_output_unisimt_switch): New.
30634         (nvptx_output_softstack_switch): New.
30635         (nvptx_output_simt_enter): New.
30636         (nvptx_output_simt_exit): New.
30637         * config/nvptx/nvptx.h (struct machine_function): New fields
30638         has_simtreg, unisimt_location, simt_stack_size, simt_stack_align.
30639         * config/nvptx/nvptx.md (UNSPECV_SIMT_ENTER): New unspec.
30640         (UNSPECV_SIMT_EXIT): Ditto.
30641         (omp_simt_enter_insn): New insn.
30642         (omp_simt_enter): New expansion.
30643         (omp_simt_exit): New insn.
30644         * config/nvptx/nvptx.opt (msoft-stack-reserve-local): New option.
30645
30646         * internal-fn.c (expand_GOMP_SIMT_ENTER): New.
30647         (expand_GOMP_SIMT_ENTER_ALLOC): New.
30648         (expand_GOMP_SIMT_EXIT): New.
30649         * internal-fn.def (GOMP_SIMT_ENTER): New internal function.
30650         (GOMP_SIMT_ENTER_ALLOC): Ditto.
30651         (GOMP_SIMT_EXIT): Ditto.
30652         * target-insns.def (omp_simt_enter): New insn.
30653         (omp_simt_exit): Ditto.
30654         * omp-low.c (struct omplow_simd_context): New fields simt_eargs,
30655         simt_dlist.
30656         (lower_rec_simd_input_clauses): Implement SIMT privatization.
30657         (lower_rec_input_clauses): Likewise.
30658         (lower_lastprivate_clauses): Handle SIMT privatization.
30659
30660         * omp-offload.c: Include langhooks.h, tree-nested.h, stor-layout.h.
30661         (ompdevlow_adjust_simt_enter): New.
30662         (find_simtpriv_var_op): New.
30663         (execute_omp_device_lower): Handle IFN_GOMP_SIMT_ENTER,
30664         IFN_GOMP_SIMT_ENTER_ALLOC, IFN_GOMP_SIMT_EXIT.
30665
30666         * tree-inline.h (struct copy_body_data): New field dst_simt_vars.
30667         * tree-inline.c (expand_call_inline): Handle SIMT privatization.
30668         (copy_decl_for_dup_finish): Ditto.
30669
30670         * tree-ssa.c (execute_update_addresses_taken): Handle GOMP_SIMT_ENTER.
30671
30672 2017-03-28  Uros Bizjak  <ubizjak@gmail.com>
30673
30674         PR target/53383
30675         * config/i386/i386.c (ix86_option_override_internal): Always
30676         allow -mpreferred-stack-boundary=3 for 64-bit targets.
30677
30678 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
30679
30680         * tree-vect-loop.c (optimize_mask_stores): Add bb to the right loop.
30681
30682 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
30683
30684         * tree-vect-loop-manip.c (slpeel_add_loop_guard): New param and
30685         mark new edge's irreducible flag accordign to it.
30686         (vect_do_peeling): Check loop preheader edge's irreducible flag
30687         and pass it to function slpeel_add_loop_guard.
30688
30689 2017-03-28  Richard Sandiford  <richard.sandiford@arm.com>
30690
30691         PR tree-optimization/80218
30692         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
30693         Update block frequencies and counts.
30694
30695 2017-03-28  Richard Biener  <rguenther@suse.de>
30696
30697         PR tree-optimization/78644
30698         * tree-ssa-ccp.c (evaluate_stmt): When we may not use the value
30699         of a simplification result we may not use it at all.
30700
30701 2017-03-28  Richard Biener  <rguenther@suse.de>
30702
30703         PR ipa/80205
30704         * tree-inline.c (copy_phis_for_bb): Do not create PHI node
30705         without arguments, generate default definition of a SSA name.
30706
30707 2017-03-28  Richard Biener  <rguenther@suse.de>
30708
30709         PR middle-end/80222
30710         * gimple-fold.c (gimple_fold_indirect_ref): Do not touch
30711         TYPE_REF_CAN_ALIAS_ALL references.
30712         * fold-const.c (fold_indirect_ref_1): Likewise.
30713
30714 2017-03-28  Martin Liska  <mliska@suse.cz>
30715
30716         PR ipa/80104
30717         * cgraphunit.c (cgraph_node::expand_thunk): Mark argument of a
30718         thunk call as DECL_GIMPLE_REG_P when vector or complex type.
30719
30720 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
30721             Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
30722
30723         * config/arc/arc.h (CPP_SPEC): Add subtarget_cpp_spec.
30724         (EXTRA_SPECS): Define.
30725         (SUBTARGET_EXTRA_SPECS): Likewise.
30726         (SUBTARGET_CPP_SPEC): Likewise.
30727         * config/arc/elf.h (EXTRA_SPECS): Renamed to
30728         SUBTARGET_EXTRA_SPECS.
30729         * config/arc/linux.h (SUBTARGET_CPP_SPEC): Define.
30730
30731 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
30732
30733         * config/arc/simdext.md (vst64_insn): Update pattern.
30734         (vld32wh_insn): Likewise.
30735         (vld32wl_insn): Likewise.
30736         (vld64_insn): Likewise.
30737         (vld32_insn): Likewise.
30738
30739 2017-03-28  Marek Polacek  <polacek@redhat.com>
30740
30741         PR sanitizer/80067
30742         * fold-const.c (fold_comparison): Use protected_set_expr_location
30743         instead of SET_EXPR_LOCATION.
30744
30745 2017-03-28  Markus Trippelsdorf  <markus@trippelsdorf.de>
30746
30747         * tree.c (add_expr): Avoid name lookup warning.
30748
30749 2017-03-27  Jeff Law  <law@redhat.com>
30750
30751         PR tree-optimization/80216
30752         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Fix typo in
30753         function name.  Limit recursion depth.
30754         (record_temporary_equivalences): Corresponding changes.
30755
30756 2017-03-27  Jonathan Wakely  <jwakely@redhat.com>
30757
30758         * doc/invoke.texi (-Wno-narrowing): Reorder so default behavior is
30759         covered first.
30760
30761 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
30762
30763         PR target/80102
30764         * reg-notes.def (REG_CFA_NOTE): Define.  Use it for CFA related
30765         notes.
30766         * cfgcleanup.c (reg_note_cfa_p): New array.
30767         (insns_have_identical_cfa_notes): New function.
30768         (old_insns_match_p): Don't cross-jump in between /f
30769         and non-/f instructions.  If both i1 and i2 are frame related,
30770         verify all CFA notes, their order and content.
30771
30772 2017-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
30773
30774         PR target/78543
30775         * config/rs6000/rs6000.md (bswaphi2_extenddi): Combine bswap
30776         HImode and SImode with zero extend to DImode to one insn.
30777         (bswap<mode>2_extenddi): Likewise.
30778         (bswapsi2_extenddi): Likewise.
30779         (bswaphi2_extendsi): Likewise.
30780         (bswaphi2): Combine bswap HImode and SImode into one insn.
30781         Separate memory insns from swapping register.
30782         (bswapsi2): Likewise.
30783         (bswap<mode>2): Likewise.
30784         (bswaphi2_internal): Delete, no longer used.
30785         (bswapsi2_internal): Likewise.
30786         (bswap<mode>2_load): Split bswap HImode/SImode into separate load,
30787         store, and gpr<-gpr swap insns.
30788         (bswap<mode>2_store): Likewise.
30789         (bswaphi2_reg): Register only splitter, combine with the splitter.
30790         (bswaphi2 splitter): Likewise.
30791         (bswapsi2_reg): Likewise.
30792         (bswapsi2 splitter): Likewise.
30793         (bswapdi2): If we have the LDBRX and STDBRX instructions, split
30794         the insns into load, store, and register/register insns.
30795         (bswapdi2_ldbrx): Likewise.
30796         (bswapdi2_load): Likewise.
30797         (bswapdi2_store): Likewise.
30798         (bswapdi2_reg): Likewise.
30799
30800 2017-03-27  Gunther Nikl  <gnikl@users.sourceforge.net>
30801
30802         * system.h (HAVE_DESIGNATED_INITIALIZERS): Fix non C++ case.
30803         (HAVE_DESIGNATED_UNION_INITIALIZERS): Likewise.
30804
30805 2017-03-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
30806
30807         PR target/80103
30808         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Edit and
30809         add comments.
30810         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
30811         special handling for target option conflicts between dform
30812         options (-mpower9-dform, -mpower9-dform-vector,
30813         -mpower9-dform-scalar) and -mno-direct-move.
30814
30815 2017-03-27  Richard Biener  <rguenther@suse.de>
30816
30817         PR tree-optimization/80181
30818         * tree-ssa-ccp.c (likely_value): UNDEFINED ^ X is UNDEFINED.
30819
30820 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
30821
30822         * config/arc/predicates.md (move_double_src_operand): Replace the
30823         call to move_double_src_operand with a call to address_operand.
30824
30825 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
30826
30827         * config/arc/elf.h (ARGET_ARC_TP_REGNO_DEFAULT): Define.
30828         * config/arc/linux.h (ARGET_ARC_TP_REGNO_DEFAULT): Likewise.
30829         * config/arc/arc.opt (mtp-regno): Use ARGET_ARC_TP_REGNO_DEFAULT.
30830
30831 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
30832
30833         * config/arc/predicates.md (long_immediate_loadstore_operand):
30834         Consider scaled addresses cases.
30835
30836 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
30837
30838         * config/arc/arc.c (arc_epilogue_uses): BLINK should be also
30839         restored when in interrupt.
30840         * config/arc/arc.md (simple_return): ARCv2 rtie instruction
30841         doesn't have delay slot.
30842
30843 2017-03-27  Richard Biener  <rguenther@suse.de>
30844
30845         PR ipa/79776
30846         * tree-ssa-structalias.c (associate_varinfo_to_alias): Skip
30847         inlined thunk clones.
30848
30849 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
30850
30851         PR sanitizer/80168
30852         * asan.c (instrument_derefs): Copy over last operand from
30853         original COMPONENT_REF to the new COMPONENT_REF with
30854         DECL_BIT_FIELD_REPRESENTATIVE.
30855         * ubsan.c (instrument_object_size): Likewise.
30856
30857 2017-03-27  Richard Biener  <rguenther@suse.de>
30858
30859         PR tree-optimization/80170
30860         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Make
30861         sure DR/SCEV didnt fold in constants we do not see when looking
30862         at the reference base alignment.
30863
30864 2017-03-27  Richard Biener  <rguenther@suse.de>
30865
30866         PR middle-end/80171
30867         * gimple-fold.c (fold_ctor_reference): Properly guard against
30868         NULL return value from canonicalize_constructor_val.
30869
30870 2017-03-25  Uros Bizjak  <ubizjak@gmail.com>
30871
30872         PR target/80180
30873         * config/i386/i386.c (ix86_expand_builtin)
30874         <IX86_BUILTIN_RDSEED{16,32,64}_STEP>: Do not expand arg0 between
30875         flags reg setting and flags reg using instructions.
30876         <IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Ditto.  Use non-flags reg
30877         clobbering instructions to zero extend op2.
30878
30879 2017-03-25  Gerald Pfeifer  <gerald@pfeifer.com>
30880
30881         * doc/install.texi (Configuration) <--with-aix-soname>:
30882         Update link to AIX ld.
30883
30884 2017-03-25  Bernd Schmidt  <bschmidt@redhat.com>
30885
30886         PR rtl-optimization/80160
30887         PR rtl-optimization/80159
30888         * lra-assigns.c (must_not_spill_p): Tighten new test to also take
30889         reg_alternate_class into account.
30890
30891 2017-03-24  Vladimir Makarov  <vmakarov@redhat.com>
30892
30893         PR target/80148
30894         * lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos
30895         to consider in curr_insn_transform.
30896
30897 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
30898
30899         * genrecog.c (validate_pattern): Add VEC_SELECT validation.
30900         * genmodes.c (emit_min_insn_modes_c): Call emit_mode_nunits
30901         and emit_mode_inner.
30902
30903 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
30904
30905         * config/s390/s390-builtins.def: Add VXE builtins.  Add a flags
30906         argument to the overloaded builtin variants.  Use the new flag to
30907         deprecate certain builtin variants.
30908         * config/s390/s390-builtin-types.def: Add new builtin types.
30909         * config/s390/s390-builtins.h: Support new flags field for
30910         overloaded builtins.
30911         * config/s390/s390-c.c (OB_DEF_VAR): New flags field.
30912         (s390_macro_to_expand): Enable vector float data type.
30913         (s390_cpu_cpp_builtins_internal): Indicate support of the new
30914         builtins by incrementing the __VEC__ version number.
30915         (s390_expand_overloaded_builtin): Support expansion of vec_xl and
30916         vec_xst.
30917         (s390_resolve_overloaded_builtin): Emit error messages depending
30918         on the builtin flags.
30919         * config/s390/s390.c (s390_expand_builtin): Support additional
30920         flags argument.  Change error message to match the messages
30921         emitted in s390-c.c.
30922         * config/s390/s390.md: New UNSPEC_* constants.
30923         (op_type): Add new instruction types.
30924         * config/s390/vecintrin.h: Add new builtins and test data class
30925         constants.
30926         * config/s390/vx-builtins.md (V_HW_32_64): Add V4SF.
30927         (V_HW_4, VEC_HW, VECF_HW): New mode iterators.
30928         (VEC_INEXACT, VEC_NOINEXACT): New constants.
30929         ("vec_splats<mode>", "vec_insert<mode>", "vec_promote<mode>")
30930         ("vec_insert_and_zero<mode>", "vec_mergeh<mode>")
30931         ("vec_mergel<mode>"): V_HW -> VEC_HW.
30932
30933         ("vlrlrv16qi", "vstrlrv16qi", "vbpermv16qi", "vec_msumv2di")
30934         ("vmslg", "*vftci<mode>_cconly", "vftci<mode>_intcconly")
30935         ("*vftci<mode>", "vftci<mode>_intcc", "vec_double_s64")
30936         ("vec_double_u64", "vfmin<mode>", "vfmax<mode>"): New definition.
30937
30938         ("and_av2df3", "and_cv2df3", "vec_andc_av2df3")
30939         ("vec_andc_cv2df3", "xor_av2df3", "xor_cv2df3", "vec_nor_av2df3")
30940         ("vec_nor_cv2df3", "ior_av2df3", "ior_cv2df3", "vec_nabs")
30941         ("*vftcidb", "*vftcidb_cconly", "vftcidb"): Remove definition.
30942
30943         ("vec_all_<fpcmpcc:code>v2df", "vec_any_<fpcmpcc:code>v2df")
30944         ("vec_scatter_elementv4si_DI", "vec_cmp<fpcmp:code>v2df")
30945         ("vec_di_to_df_s64", "vec_di_to_df_u64", "vec_df_to_di_u64")
30946         ("vfidb", "*vldeb", "*vledb", "*vec_cmp<insn_cmp>v2df_cconly")
30947         ("vec_cmpeqv2df_cc", "vec_cmpeqv2df_cc", "vec_cmphv2df_cc")
30948         ("vec_cmphev2df_cc", "*vec_cmpeqv2df_cc")
30949         ("*vec_cmphv2df_cc", "*vec_cmphev2df_cc"): Enable new modes as ...
30950
30951         ("vec_all_<fpcmpcc:code><mode>", "vec_any_<fpcmpcc:code><mode>")
30952         ("vec_scatter_element<V_HW_4:mode>_DI")
30953         ("vec_cmp<fpcmp:code><mode>", "vcdgb", "vcdlgb", "vclgdb")
30954         ("vec_fpint<mode>", "vflls")
30955         ("vflrd", "*vec_cmp<insn_cmp><mode>_cconly", "vec_cmpeq<mode>_cc")
30956         ("vec_cmpeq<mode>_cc", "vec_cmph<mode>_cc", "vec_cmphe<mode>_cc")
30957         ("*vec_cmpeq<mode>_cc", "*vec_cmph<mode>_cc")
30958         ("*vec_cmphe<mode>_cc"): ... these.
30959
30960         ("vec_ctd_s64", "vec_ctsl", "vec_ctul", "vec_st2f"): Use rounding
30961         mode constant instead of magic value.
30962
30963 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
30964
30965         * config/s390/s390.c (s390_expand_vec_compare): Support other
30966         vector floating point modes than just V2DF.
30967         (s390_expand_vcond): Likewise.
30968         (s390_hard_regno_mode_ok): Allow SFmode values in VRs.
30969         (s390_cannot_change_mode_class): Prevent mode changes between TF
30970         and V1TF in vector registers.
30971         * config/s390/s390.md (DF, SF): New mode attributes.
30972         ("*cmp<mode>_ccs", "add<mode>3", "sub<mode>3", "mul<mode>3")
30973         ("fma<mode>4", "fms<mode>4", "div<mode>3", "*neg<mode>2"): Add
30974         SFmode support for VRs.
30975         * config/s390/vector.md (V_HW, V_HW2, VT_HW, ti*, nonvec): Add new
30976         vector fp modes.
30977         (VFT, VF_HW): New mode iterators.
30978         (vw, sdx): New mode attributes.
30979         ("addv2df3", "subv2df3", "mulv2df3", "divv2df3", "sqrtv2df2")
30980         ("fmav2df4","fmsv2df4", "negv2df2", "absv2df2", "*negabsv2df2")
30981         ("smaxv2df3", "sminv2df3", "*vec_cmp<VFCMP_HW_OP:code>v2df_nocc")
30982         ("vec_cmpuneqv2df", "vec_cmpltgtv2df", "vec_orderedv2df")
30983         ("vec_unorderedv2df"): Adjust the v2df only patterns to support
30984         also the new vector floating point modes.  Renaming to ...
30985
30986         ("add<mode>3", "sub<mode>3", "mul<mode>3", "div<mode>3")
30987         ("sqrt<mode>2", "fma<mode>4", "fms<mode>4", "neg<mode>2")
30988         ("abs<mode>2", "negabs<mode>2", "smax<mode>3")
30989         ("smin<mode>3", "*vec_cmp<VFCMP_HW_OP:code><mode>_nocc")
30990         ("vec_cmpuneq<mode>", "vec_cmpltgt<mode>", "vec_ordered<mode>")
30991         ("vec_unordered<mode>"): ... these.
30992
30993         ("neg_fma<mode>4", "neg_fms<mode>4", "*smax<mode>3_vxe")
30994         ("*smin<mode>3_vxe", "*sminv2df3_vx", "*vec_extendv4sf")
30995         ("*vec_extendv2df"): New insn definitions.
30996
30997 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
30998
30999         * config/s390/s390.md ("*adddi3_sign", "*subdi3_sign", "mulditi3")
31000         ("mulditi3_2", "*muldi3_sign"): New patterns.
31001         ("muldi3", "*muldi3", "mulsi3", "*mulsi3"): Add an expander and
31002         rename the pattern definition.
31003
31004 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31005
31006         * config/s390/s390.md ("indirect_jump"): Turn insn definition into
31007         expander.
31008         ("*indirect_jump", "*indirect2_jump"): New pattern definitions.
31009
31010 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31011
31012         * config/s390/s390.c (s390_expand_vec_init): Use vllezl
31013         instruction if possible.
31014         * config/s390/vector.md (vec_halfnumelts): New mode
31015         attribute.
31016         ("*vec_vllezlf<mode>"): New pattern.
31017
31018 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31019
31020         * config/s390/vector.md ("popcountv16qi2", "popcountv8hi2")
31021         ("popcountv4si2", "popcountv2di2"): Rename to ...
31022         ("popcount<mode>2", "popcountv8hi2_vx", "popcountv4si2_vx")
31023         ("popcountv2di2_vx"): ... these and add !TARGET_VXE to the
31024         condition.
31025         ("popcount<mode>2_vxe"): New pattern.
31026
31027 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31028
31029         * common/config/s390/s390-common.c (processor_flags_table): Add
31030         arch12.
31031         * config.gcc: Add arch12.
31032         * config/s390/driver-native.c (s390_host_detect_local_cpu):
31033         Default to arch12 for unknown CPU model numbers.
31034         * config/s390/s390-builtins.def: Add B_VXE builtin flag.
31035         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Adjust
31036         PROCESSOR_max sanity check.
31037         * config/s390/s390-opts.h (enum processor_type): Add
31038         PROCESSOR_ARCH12.
31039         * config/s390/s390.c (processor_table): Add arch12.
31040         (s390_expand_builtin): Add check for B_VXE flag.
31041         (s390_issue_rate): Add PROCESSOR_ARCH12.
31042         (s390_get_sched_attrmask): Likewise.
31043         (s390_get_unit_mask): Likewise.
31044         (s390_sched_score): Enable z13 scheduling for arch12.
31045         (s390_sched_reorder): Likewise.
31046         (s390_sched_variable_issue): Likewise.
31047         * config/s390/s390.h (enum processor_flags): Add PF_ARCH12 and
31048         PF_VXE.
31049         (s390_tune_attr): Use z13 scheduling also for arch12.
31050         (TARGET_CPU_ARCH12, TARGET_CPU_ARCH12_P, TARGET_CPU_VXE)
31051         (TARGET_CPU_VXE_P, TARGET_ARCH12, TARGET_ARCH12_P, TARGET_VXE)
31052         (TARGET_VXE_P): New macros.
31053         * config/s390/s390.md: Add arch12 to cpu attribute.  Add arch12
31054         and vxe to cpu_facility.  Add arch12 and vxe to enabled attribute.
31055         * config/s390/s390.opt: Add arch12 as processor_type.
31056
31057 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31058
31059         * config/s390/s390.md
31060         ("fixuns_truncdddi2", "fixuns_trunctddi2")
31061         ("fixuns_trunc<BFP:mode><GPR:mode>2"): Merge into ...
31062         ("fixuns_trunc<FP:mode><GPR:mode>2"): New expander.
31063
31064         ("fixuns_trunc<BFP:mode><GPR:mode>2", "fixuns_trunc<mode>si2"):
31065         Rename expanders to ...
31066
31067         ("fixuns_trunc<BFP:mode><GPR:mode>2_emu")
31068         ("fixuns_truncdddi2_emu"): ... these.
31069
31070         ("fixuns_trunc<mode>si2_emu"): New expander.
31071
31072         ("*fixuns_truncdfdi2_z13"): Rename to ...
31073         ("*fixuns_truncdfdi2_vx"): ... this.
31074
31075 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31076
31077         * config/s390/2964.md: Remove the single element vector compare
31078         instructions which are no longer used.
31079         * config/s390/s390.c (s390_select_ccmode): Remove handling of
31080         vector CCmodes.
31081         (s390_canonicalize_comparison): Remove handling of DFmode
31082         compares.
31083         (s390_expand_vec_compare_scalar): Remove function.
31084         (s390_emit_compare): Don't call s390_expand_vec_compare_scalar.
31085         * config/s390/s390.md ("*vec_cmp<insn_cmp>df_cconly"): Remove
31086         pattern.
31087         ("*cmp<mode>_ccs"): Add wfcdb instruction.
31088
31089 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31090
31091         * config/s390/s390.md ("mov<mode>_64dfp" DD_DF): Use vleig for loading a
31092         FP zero.
31093         ("*mov<mode>_64" DD_DF): Remove the vector instructions. These
31094         will anyway by matched by mov<mode>_64dfp.
31095
31096 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31097
31098         * config/s390/s390.md ("mov<mode>" SD_SF): Change vleg/vsteg to
31099         vlef/vstef.  Add missing operand to vleif.
31100
31101 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31102
31103         * config/s390/s390.c (s390_expand_vec_init): Enable vector load
31104         pair for all vector types with 64 bit elements.
31105         * config/s390/vx-builtins.md (V_HW_64): Move mode iterator to ...
31106         * config/s390/vector.md (V_HW_64): ... here.
31107         (V_128_NOSINGLE): New mode iterator.
31108         ("vec_init<V_HW:mode>"): Use V_128 as mode iterator.
31109         ("*vec_splat<mode>"): Use V_128_NOSINGLE mode iterator.
31110         ("*vec_tf_to_v1tf", "*vec_ti_to_v1ti"): New pattern definitions.
31111         ("*vec_load_pairv2di"): Change to ...
31112         ("*vec_load_pair<mode>"): ... this one.
31113
31114 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31115
31116         * config/s390/constraints.md: Add comments.
31117         (jKK): Reject element sizes > 8 bytes.
31118         * config/s390/s390.c (s390_split_ok_p): Enable splitting also for
31119         s_operands.
31120         * config/s390/s390.md: Add the s_operand checks formerly in
31121         s390_split_ok_p to various splitters where they are still
31122         required.
31123         * config/s390/vector.md ("mov<mode>" V_128): Add GPR alternatives
31124         for 128 bit vectors.  Plus two splitters.
31125
31126 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31127
31128         * config/s390/s390.md: Rename the cpu facilty vec to vx throughout
31129         the file.
31130
31131 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31132
31133         PR target/79893
31134         * config/s390/s390-c.c (s390_adjust_builtin_arglist): Issue an
31135         error if the boundary argument is not constant.
31136
31137 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
31138
31139         PR rtl-optimization/80112
31140         * loop-doloop.c (doloop_condition_get): Don't check condition
31141         if cmp isn't SET with IF_THEN_ELSE src.
31142
31143 2017-03-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31144
31145         PR tree-optimization/80158
31146         * gimple-ssa-strength-reduction.c (replace_mult_candidate): When
31147         replacing a candidate statement, also replace it for the
31148         candidate's alternate interpretation.
31149         (replace_rhs_if_not_dup): Likewise.
31150         (replace_one_candidate): Likewise.
31151
31152 2017-03-24  Richard Biener  <rguenther@suse.de>
31153
31154         PR tree-optimization/80167
31155         * graphite-isl-ast-to-gimple.c
31156         (translate_isl_ast_to_gimple::is_valid_rename): Handle default-defs
31157         properly.
31158         (translate_isl_ast_to_gimple::get_rename): Likewise.
31159
31160 2017-03-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
31161
31162         * config/rs6000/rs6000.c (rs6000_option_override_internal): Change
31163         handling of certain combinations of target options, including the
31164         combinations -mpower8-vector vs. -mno-vsx, -mpower9-vector vs.
31165         -mno-power8-vector, and -mpower9_dform vs. -mno-power9-vector.
31166
31167 2017-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31168
31169         PR target/71436
31170         * config/arm/arm.md (*load_multiple): Add reload_completed to
31171         matching condition.
31172
31173 2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31174             Richard Biener  <rguenth@suse.de>
31175
31176         PR tree-optimization/79908
31177         PR tree-optimization/80136
31178         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
31179         been cast away, gimplify_and_add suffices.
31180
31181 2017-03-23  Markus Trippelsdorf  <markus@trippelsdorf.de>
31182
31183         * tree-vrp.c (identify_jump_threads): Delete avail_exprs.
31184
31185 2017-03-23  Richard Biener  <rguenther@suse.de>
31186
31187         PR tree-optimization/80032
31188         * gimplify.c (gimple_push_cleanup): Forced unconditional
31189         cleanups still have to go to the conditional_cleanups
31190         sequence.
31191
31192 2017-03-22  Jakub Jelinek  <jakub@redhat.com>
31193
31194         PR tree-optimization/80072
31195         * tree-ssa-reassoc.c (struct operand_entry): Change id field type
31196         to unsigned int.
31197         (next_operand_entry_id): Change type to unsigned int.
31198         (sort_by_operand_rank): Make sure to return the right return value
31199         even if unsigned fields are bigger than INT_MAX.
31200         (struct oecount): Change cnt and id type to unsigned int.
31201         (oecount_hasher::equal): Formatting fix.
31202         (oecount_cmp): Make sure to return the right return value
31203         even if unsigned fields are bigger than INT_MAX.
31204         (undistribute_ops_list): Change next_oecount_id type to unsigned int.
31205
31206         PR c++/80129
31207         * gimplify.c (gimplify_modify_expr_rhs) <case COND_EXPR>: Clear
31208         TREE_READONLY on result if writing it more than once.
31209
31210         PR sanitizer/80110
31211         * doc/invoke.texi (-fsanitize=thread): Document that with
31212         -fnon-call-exceptions atomics are not able to throw
31213         exceptions.
31214
31215         PR sanitizer/80110
31216         * tsan.c: Include tree-eh.h.
31217         (instrument_builtin_call): Call maybe_clean_eh_stmt or
31218         maybe_clean_or_replace_eh_stmt where needed.
31219         (instrument_memory_accesses): Add cfg_changed argument.
31220         Call gimple_purge_dead_eh_edges on each block and set *cfg_changed
31221         if it returned true.
31222         (tsan_pass): Adjust caller.  Return TODO_cleanup_cfg if cfg_changed.
31223
31224         PR rtl-optimization/63191
31225         * config/i386/i386.c (ix86_delegitimize_address): Turn into small
31226         wrapper function, moved the whole old content into ...
31227         (ix86_delegitimize_address_1): ... this.  New inline function.
31228         (ix86_find_base_term): Use ix86_delegitimize_address_1 with
31229         true as last argument instead of ix86_delegitimize_address.
31230
31231 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
31232
31233         * config/aarch64/aarch64.c (generic_branch_cost): Copy
31234         cortexa57_branch_cost.
31235
31236 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
31237
31238         * config/aarch64/aarch64.c (generic_tunings): Add AES fusion.
31239
31240 2017-03-21  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
31241
31242         PR target/80123
31243         * doc/md.texi (Constraints): Document wA constraint.
31244         * config/rs6000/constraints.md (wA): New.
31245         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Add wA reg_class.
31246         (rs6000_init_hard_regno_mode_ok): Init wA constraint.
31247         * config/rs6000/rs6000.h (RS6000_CONSTRAINT_wA): New.
31248         * config/rs6000/vsx.md (vsx_splat_<mode>): Use wA constraint.
31249
31250 2017-03-22  Cesar Philippidis  <cesar@codesourcery.com>
31251
31252         PR c++/80029
31253         * gimplify.c (is_oacc_declared): New function.
31254         (oacc_default_clause): Use it to set default flags for acc declared
31255         variables inside parallel regions.
31256         (gimplify_scan_omp_clauses): Strip firstprivate pointers for acc
31257         declared variables.
31258         (gimplify_oacc_declare): Gimplify the declare clauses.  Add the
31259         declare attribute to any decl as necessary.
31260
31261 2017-03-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
31262
31263         PR target/80082
31264         * config/arm/arm-isa.h (isa_bit_lpae): New feature bit.
31265         (ISA_ARMv7ve): Add isa_bit_lpae to the definition.
31266         * config/arm/arm-protos.h (arm_arch7ve): Rename into ...
31267         (arm_arch_lpae): This.
31268         * config/arm/arm.c (arm_arch7ve): Rename into ...
31269         (arm_arch_lpae): This.  Define it in term of isa_bit_lpae.
31270         * config/arm/arm.h (TARGET_HAVE_LPAE): Redefine in term of
31271         arm_arch_lpae.
31272
31273 2017-03-22  Martin Liska  <mliska@suse.cz>
31274
31275         PR target/79906
31276         * config/rs6000/rs6000.c (rs6000_inner_target_options): Show
31277         error message instead of an ICE.
31278
31279 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31280
31281         * doc/extend.texi (6.11 Additional Floating Types): Revise.
31282
31283 2017-03-21  Kelvin Nilsen  <kelvin@gcc.gnu.org>
31284
31285         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
31286         comments.
31287         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
31288         comments.
31289
31290 2017-03-21  Martin Sebor  <msebor@redhat.com>
31291
31292         * doc/extend.texi: Use "cannot" instead of "can't."
31293         * doc/hostconfig.texi: Same.
31294         * doc/install.texi: Same.
31295         * doc/invoke.texi: Same.
31296         * doc/loop.texi: Same.
31297         * doc/md.texi: Same.
31298         * doc/objc.texi: Same.
31299         * doc/rtl.texi: Same.
31300         * doc/tm.texi: Same.
31301         * doc/tm.texi.in: Same.
31302         * doc/trouble.texi: Same.
31303
31304 2017-03-21  Alexandre Oliva <aoliva@redhat.com>
31305
31306         PR debug/63238
31307         * dwarf2out.c (struct checksum_attributes): Add at_alignment.
31308         (collect_checksum_attributes): Set it.
31309         (die_checksum_ordered): Use it.
31310
31311 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31312
31313         PR tree-optimization/79908
31314         * tree-stdarg.c (expand_ifn_va_arg_1): Revert the following
31315         change: For a VA_ARG whose LHS has been cast away, use
31316         force_gimple_operand to construct the side effects.
31317
31318 2017-03-21  David Malcolm  <dmalcolm@redhat.com>
31319
31320         PR translation/80001
31321         * omp-offload.c (oacc_loop_fixed_partitions): Make diagnostics
31322         more amenable to translation.
31323         (oacc_loop_auto_partitions): Likewise.
31324
31325 2017-03-21  Marek Polacek  <polacek@redhat.com>
31326             Martin Sebor  <msebor@redhat.com>
31327
31328         PR tree-optimization/80109
31329         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call get_range_info
31330         on INTEGRAL_TYPE_P.
31331
31332 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
31333             Segher Boessenkool  <segher@kernel.crashing.org>
31334
31335         PR target/80125
31336         * combine.c (can_combine_p): Revert the 2017-03-20 change, only
31337         check reg_used_between_p between insn and one of succ or succ2
31338         depending on if succ is artificial insn not inserted into insn
31339         stream.
31340
31341 2017-03-21  Martin Liska  <mliska@suse.cz>
31342
31343         PR gcov-profile/80081
31344         * Makefile.in: Add gcov-dump and fix installation of gcov-tool.
31345         * doc/gcc.texi: Include gcov-dump stuff.
31346         * doc/gcov-dump.texi: New file.
31347
31348 2017-03-21  Toma Tabacu  <toma.tabacu@imgtec.com>
31349
31350         PR rtl-optimization/79150
31351         * config/mips/mips.c (mips_block_move_loop): Emit a NOP after the
31352         conditional jump, if the jump is the last insn of the loop.
31353
31354 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31355             Richard Biener  <rguenth@suse.de>
31356
31357         PR tree-optimization/79908
31358         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
31359         been cast away, use force_gimple_operand to construct the side
31360         effects.
31361
31362 2017-03-21  Martin Liska  <mliska@suse.cz>
31363
31364         PR libfortran/79956
31365         * simplify-rtx.c (simplify_immed_subreg): Initialize a variable
31366         to NULL.
31367
31368 2017-03-21  Brad Spengler <spender@grsecurity.net>
31369
31370         PR plugins/80094
31371         * plugin.c (htab_hash_plugin): New function.
31372         (add_new_plugin): Use it and adjust.
31373         (parse_plugin_arg_opt): Adjust.
31374         (init_one_plugin): Likewise.
31375
31376 2017-03-21  Richard Biener  <rguenther@suse.de>
31377
31378         PR tree-optimization/80032
31379         * gimplify.c (gimple_push_cleanup): Add force_uncond parameter,
31380         if set force the cleanup to happen unconditionally.
31381         (gimplify_target_expr): Push inserted clobbers with force_uncond
31382         to avoid them being removed by control-dependent DCE.
31383
31384 2017-03-21  Richard Biener  <rguenther@suse.de>
31385
31386         PR tree-optimization/80122
31387         * tree-inline.c (copy_bb): Do not expans va-arg packs or
31388         va_arg_pack_len when the inlined call stmt requires pack
31389         expansion itself.
31390         * tree-inline.h (struct copy_body_data): Make call_stmt a gcall *.
31391
31392 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
31393
31394         PR sanitizer/78158
31395         * tsan.c (instrument_builtin_call): If the memory model argument
31396         is not a constant, assume it is valid.
31397
31398         PR c/67338
31399         * fold-const.c (round_up_loc): Negate divisor in unsigned type to
31400         avoid UB.
31401
31402 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
31403
31404         PR rtl-optimization/79910
31405         * combine.c (can_combine_p): Do not allow combining an I0 or I1
31406         if its dest is used by an insn before I2 (other than the combined
31407         insns themselves, which are properly handled already).
31408
31409 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
31410
31411         Revert:
31412         2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
31413
31414         * combine.c (record_used_regs): New static function.
31415         (try_combine): Handle situations where there is an additional
31416         instruction between I2 and I3 which needs to have a LOG_LINK
31417         updated.
31418
31419         Revert:
31420         2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
31421
31422         * combine.c (try_combine): Delete redundant i1 test.  Call
31423         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
31424
31425 2017-03-20  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
31426
31427         PR target/80083
31428         * config/rs6000/rs6000.md (*movsi_internal1): Fix constraints for
31429         alternatives 13/14.
31430
31431 2017-03-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31432
31433         PR tree-optimization/80054
31434         * gimple-ssa-strength-reduction.c (all_phi_incrs_profitable): Fail
31435         the optimization if a PHI or any of its arguments is not dominated
31436         by the candidate's basis.  Use gphi* rather than gimple* as
31437         appropriate.
31438         (replace_profitable_candidates): Clean up a gimple* variable that
31439         should be a gphi* variable.
31440
31441 2017-03-20  Martin Sebor  <msebor@redhat.com>
31442
31443         PR c++/52477
31444         * doc/extend.texi (attribute constructor): Document present limitation.
31445
31446 2017-03-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
31447
31448         PR target/79963
31449         * config/rs6000/altivec.h (vec_all_ne): Under __cplusplus__ and
31450         __POWER9_VECTOR__ #ifdef control, change template definition to
31451         use Power9-specific built-in function.
31452         (vec_any_eq): Likewise.
31453         * config/rs6000/vector.md (vector_ae_v2di_p): Change the flag used
31454         to control outcomes from this test.
31455         (vector_ae_<mode>p): For VEC_F modes, likewise.
31456
31457 2017-03-20  Ian Lance Taylor  <iant@google.com>
31458
31459         * config/i386/i386.c (ix86_function_regparm): Save an extra
31460         register for -fsplit-stack with DECL_STATIC_CHAIN.
31461
31462 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
31463
31464         PR target/79912
31465         * config/riscv/riscv.c (riscv_preferred_reload_class): Remove.
31466         (TARGET_PREFERRED_RELOAD_CLASS): Likewise.
31467
31468 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
31469
31470         * config/riscv/riscv.c (riscv_print_operand): Use "fence
31471         iorw,ow".
31472         * config/riscv/sync.mc (mem_thread_fence_1): Use "fence
31473         iorw,iorw".
31474
31475 2017-03-20  Marek Polacek  <polacek@redhat.com>
31476
31477         PR sanitizer/80063
31478         * asan.c (DEF_SANITIZER_BUILTIN): Use do { } while (0).
31479
31480 2017-03-20  Richard Biener  <rguenther@suse.de>
31481
31482         PR tree-optimization/80113
31483         * graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Do not
31484         allocate extra SSA name for PHI def.
31485         (add_close_phis_to_outer_loops): Likewise.
31486         (add_close_phis_to_merge_points): Likewise.
31487         (copy_loop_close_phi_args): Likewise.
31488         (copy_cond_phi_nodes): Likewise.
31489
31490 2017-03-20  Martin Liska  <mliska@suse.cz>
31491
31492         PR middle-end/79753
31493         * tree-chkp.c (chkp_build_returned_bound): Do not build
31494         returned bounds for a LHS that's not a BOUNDED_P type.
31495
31496 2017-03-20  Martin Liska  <mliska@suse.cz>
31497
31498         PR target/79769
31499         PR target/79770
31500         * tree-chkp.c (chkp_find_bounds_1): Handle REAL_CST,
31501         COMPLEX_CST and VECTOR_CST.
31502
31503 2017-03-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31504
31505         PR target/78857
31506         * config/s390/s390.md ("cmp<mode>_ccs_0"): Add a clobber of the
31507         target operand.  A new splitter adds the clobber statement in case
31508         the target operand is dead anyway.
31509
31510 2017-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
31511
31512         * doc/install.texi (Specific) <sparc-*-linux*>: No longer refer
31513         to age-old versions of binutils and glibc.
31514
31515 2017-03-18  Segher Boessenkool  <segher@kernel.crashing.org>
31516
31517         * doc/contrib.texi (Contributors): Remove duplicate entry for myself.
31518
31519 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
31520
31521         * doc/contrib.texi (Contributors): Add Segher Boessenkool.
31522
31523 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
31524
31525         * doc/install.texi (Specific) <arm-*-eabi>: Remove old
31526         requirement for binutils 2.13.
31527
31528 2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
31529
31530         * combine.c (try_combine): Delete redundant i1 test.  Call
31531         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
31532
31533 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com
31534
31535         * doc/install.texi (Specific) <riscv32-*-elf>: Add riscv32-*-elf,
31536         riscv32-*-linux, riscv64-*-elf, riscv64-*-linux to the table of
31537         contents.
31538         <riscv64-*-elf>: Re-arrange section
31539         <riscv32-*-elf>: Add a note about requiring binutils 2.28.
31540         <riscv32-*-linux>: Likewise.
31541         <riscv64-*-elf>: Likewise
31542         <riscv64-*-linux>: Likewise.
31543
31544 2017-03-17  Richard Earnshaw  <rearnsha@arm.com>
31545
31546         PR target/80052
31547         * aarch64.opt(verbose-cost-dump): Fix typo.
31548
31549 2017-03-17  Pat Haugen  <pthaugen@us.ibm.com>
31550
31551         PR target/79951
31552         * config/rs6000/rs6000.md (copysign<mode>3_fcpsgn): Test
31553         for VECTOR_UNIT_VSX_P (<MODE>mode) too.
31554
31555 2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
31556
31557         * reload.c (find_reloads): When reloading a nonoffsettable address,
31558         use RELOAD_OTHER for it and its address reloads.
31559
31560         PR rtl-optimization/79910
31561         * combine.c (record_used_regs): New static function.
31562         (try_combine): Handle situations where there is an additional
31563         instruction between I2 and I3 which needs to have a LOG_LINK
31564         updated.
31565
31566 2017-03-17  Jeff Law  <law@redhat.com>
31567
31568         PR tree-optimization/71437
31569         * tree-vrp.c (simplify_stmt_for_jump_threading): Lookup the
31570         conditional in the hash table first.
31571         (vrp_dom_walker::before_dom_children): Extract condition from
31572         ASSERT_EXPR.  Record condition, its inverion and any implied
31573         conditions as well.
31574
31575 2017-03-17  Marek Polacek  <polacek@redhat.com>
31576             Markus Trippelsdorf  <markus@trippelsdorf.de>
31577
31578         PR tree-optimization/80079
31579         * gimple-ssa-store-merging.c (class pass_store_merging): Initialize
31580         m_stores_head.
31581
31582 2017-03-17  Richard Biener  <rguenther@suse.de>
31583
31584         PR middle-end/80075
31585         * tree-eh.c (stmt_could_throw_1_p): Only handle gimple assigns.
31586         Properly verify the LHS before the RHS possibly claims to be
31587         handled.
31588         (stmt_could_throw_p): Hande gimple conds fully here.  Clobbers
31589         do not throw.
31590
31591 2017-03-17  Martin Jambor  <mjambor@suse.cz>
31592
31593         * doc/invoke.texi (Option Options): Include -fipa-vrp in the list.
31594         (List of -O2 options): Likewise.
31595         (-fipa-bit-cp): Replace "ipa" with "interprocedural."
31596         (-fipa-vrp) New.
31597
31598 2017-03-17  Tom de Vries  <tom@codesourcery.com>
31599
31600         * gcov-dump.c (print_usage): Print bug_report_url.
31601
31602 2017-03-17  Richard Biener  <rguenther@suse.de>
31603
31604         PR middle-end/80050
31605         * genmatch.c (parser::next): Remove pointless check for CPP_EOF.
31606         (parser::peek): Likewise.
31607
31608 2017-03-17  Richard Biener  <rguenther@suse.de>
31609
31610         PR tree-optimization/80048
31611         * sese.c (free_sese_info): Properly release rename_map and
31612         copied_bb_map elements.
31613
31614 2017-03-16  Alexandre Oliva <aoliva@redhat.com>
31615
31616         * gimple-ssa-store-merging.c (struct imm_store_chain_info):
31617         Add linked-list forward and backlinks.  Insert on
31618         construction, remove on destruction.
31619         (class pass_store_merging): Add m_stores_head field.
31620         (pass_store_merging::terminate_and_process_all_chains):
31621         Iterate over m_stores_head list.
31622         (pass_store_merging::terminate_all_aliasing_chains):
31623         Likewise.
31624         (pass_store_merging::execute): Check for debug stmts first.
31625         Push new chains onto the m_stores_head stack.
31626
31627 2017-03-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
31628
31629         PR target/71294
31630         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Allow a
31631         SPLAT operation on ISA 2.07 64-bit systems that have direct move,
31632         but no MTVSRDD support, by doing MTVSRD and XXPERMDI.
31633
31634 2017-03-16  Jeff Law  <law@redhat.com>
31635
31636         PR tree-optimization/71437
31637         * tree-ssa-dom.c (dom_opt_dom_walker): Remove thread_across_edge
31638         member function.  Implementation moved into after_dom_children
31639         member function and into the threader's thread_outgoing_edges
31640         function.
31641         (dom_opt_dom_walker::after_dom_children): Simplify by moving
31642         some code into new thread_outgoing_edges.
31643         * tree-ssa-threadedge.c (thread_across_edge): Make static and simplify
31644         definition.  Simplify marker handling (do it here).   Assume we always
31645         have the available expression and the const/copies tables.
31646         (thread_outgoing_edges): New function extracted from tree-ssa-dom.c
31647         and tree-vrp.c
31648         * tree-ssa-threadedge.h (thread_outgoing_edges): Declare.
31649         * tree-vrp.c (equiv_stack): No longer file scoped.
31650         (vrp_dom_walker): New class.
31651         (vrp_dom_walker::before_dom_children): New member function.
31652         (vrp_dom_walker::after_dom_children): Likewise.
31653         (identify_jump_threads):  Setup domwalker.  Use it rather than
31654         walking edges in a random order by hand.  Simplify setup/finalization.
31655         (finalize_jump_threads): Remove.
31656         (vrp_finalize): Do not call identify_jump_threads here.
31657         (execute_vrp): Do it here instead and call thread_through_all_blocks
31658         here too.
31659
31660         PR tree-optimization/71437
31661         * tree-ssa-dom.c (pfn_simplify): Add basic_block argument.  All
31662         callers changed.
31663         (simplify_stmt_for_jump_threading): Add basic_block argument.  All
31664         callers changed.
31665         (lhs_of_dominating_assert): Moved from here into tree-vrp.c.
31666         (dom_opt_dom_walker::thread_across_edge): Remove
31667         handle_dominating_asserts argument.  All callers changed.
31668         (record_temporary_equivalences_from_stmts_at_dest): Corresponding
31669         changes.  Remove calls to lhs_of_dominating_assert.  Other
31670         uses of handle_dominating_asserts turn into unconditional code
31671         (simplify_control_stmt_condition_1): Likewise.
31672         (simplify_control_stmt_condition): Likewise.
31673         (thread_through_normal_block, thread_across_edge): Likewise.
31674         * tree-ssa-threadedge.h (thread_across_edge): Corresponding changes.
31675         * tree-vrp.c (lhs_of_dominating_assert): Move here.  Return original
31676         object if it is not an SSA_NAME.
31677         (simplify_stmt_for_jump_threading): Call lhs_of_dominating_assert
31678         before calling into the VRP specific simplifiers.
31679         (identify_jump_threads): Remove handle_dominating_asserts
31680         argument.
31681
31682 2017-03-16  Jakub Jelinek  <jakub@redhat.com>
31683
31684         PR fortran/79886
31685         * tree-diagnostic.c (default_tree_printer): No longer static.
31686         * tree-diagnostic.h (default_tree_printer): New prototype.
31687
31688 2017-03-16  Tamar Christina  <tamar.christina@arm.com>
31689
31690         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>)
31691         Change ins into fmov.
31692
31693 2017-03-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31694
31695         * config/aarch64/iterators.md (h_con): Return "x" for V4HF and V8HF.
31696         * config/aarch64/aarch64-simd.md (*aarch64_fma4_elt_from_dup<mode>):
31697         Use h_con constraint for operand 1.
31698         (*aarch64_fnma4_elt_from_dup<mode>): Likewise.
31699         (*aarch64_mulx_elt_from_dup<mode>): Likewise for operand 2.
31700
31701 2017-03-15  Jeff Law  <law@redhat.com>
31702
31703         PR tree-optimization/71437
31704         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): New function.
31705         (record_temporary_equivalences): Use it.
31706
31707         PR tree-optimization/71437
31708         * tree-ssa-dom.c (struct cond_equivalence): Moved from here into
31709         tree-ssa-scopedtables.
31710         (lookup_avail_expr, build_and_record_new_cond): Likewise.
31711         (record_conditions, record_cond, vuse_eq): Likewise.
31712         (record_edge_info): Adjust to API tweak of record_conditions.
31713         (simplify_stmt_for_jump_threading): Similarly for lookup_avail_expr.
31714         (record_temporary_equivalences, optimize_stmt): Likewise.
31715         (eliminate_redundant_computations): Likewise.
31716         (record_equivalences_from_stmt): Likewise.
31717         * tree-ssa-scopedtables.c: Include options.h and params.h.
31718         (vuse_eq): New function, moved from tree-ssa-dom.c
31719         (build_and_record_new_cond): Likewise.
31720         (record_conditions): Likewise.  Accept vector of conditions rather
31721         than edge_equivalence structure for first argument.
31722         for the first argument.
31723         (avail_exprs_stack::lookup_avail_expr): New member function, moved
31724         from tree-ssa-dom.c.
31725         (avail_exprs_stack::record_cond): Likewise.
31726         * tree-ssa-scopedtables.h (struct cond_equivalence): Moved here
31727         from tree-ssa-dom.c.
31728         (avail_exprs_stack): Add new member functions lookup_avail_expr
31729         and record_cond.
31730         (record_conditions): Declare.
31731
31732 2017-03-15  Vladimir Makarov  <vmakarov@redhat.com>
31733
31734         PR target/80017
31735         * lra-constraints.c (process_alt_operands): Increase reject for
31736         reloading an input/output operand.
31737
31738 2017-03-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
31739
31740         PR target/79038
31741         * config/rs6000/rs6000.md (float<QHI:mode><IEEE128:mode>2): Define
31742         insns to convert from signed/unsigned char/short to IEEE 128-bit
31743         floating point.
31744         (floatuns<QHI:mode><IEEE128:mode>2): Likewise.
31745
31746 2017-03-15  Uros Bizjak  <ubizjak@gmail.com>
31747
31748         PR target/80019
31749         * config/i386/i386.c (ix86_vector_duplicate_value): Create
31750         subreg of inner mode for values already in registers.
31751
31752 2017-03-15  Bernd Schmidt  <bschmidt@redhat.com>
31753
31754         * config/c6x/c6x.c (hwloop_optimize): Handle case where the old
31755         iteration reg is used after the loop.
31756
31757 2017-03-14  Martin Sebor  <msebor@redhat.com>
31758
31759         PR tree-optimization/79800
31760         * gimple-ssa-sprintf.c (format_floating: Add argument.  Handle
31761         precision in negative-positive range.
31762         (format_floating): Call non-const overload with adjusted precision.
31763
31764 2017-03-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
31765
31766         PR target/79947
31767         * config/rs6000/rs6000.h (TARGET_FRSQRTES): Add check for
31768         -mpowerpc-gfxopt.
31769
31770 2017-03-14  Martin Sebor  <msebor@redhat.com>
31771
31772         PR middle-end/80020
31773         * builtin-attrs.def (ATTR_ALLOC_SIZE_2_NOTHROW_LIST): New macro.
31774         * builtins.def (aligned_alloc): Use it.
31775
31776         PR c/79936
31777         * Makefile.in (GTFILES): Add calls.c.
31778         * calls.c: Include "gt-calls.h".
31779
31780 2017-03-14  Bernd Schmidt  <bschmidt@redhat.com>
31781
31782         PR rtl-optimization/79728
31783         * regs.h (struct target_regs): New field
31784         x_contains_allocatable_regs_of_mode.
31785         (contains_allocatable_regs_of_mode): New macro.
31786         * reginfo.c (init_reg_sets_1): Initialize it, and change
31787         contains_reg_of_mode so it includes global regs as well.
31788         * reload.c (push_reload): Use contains_allocatable_regs_of_mode
31789         rather than contains_regs_of_mode.
31790
31791 2017-03-14  Martin Liska  <mliska@suse.cz>
31792
31793         * doc/invoke.texi: Document options that can't be combined with
31794         -fcheck-pointer-bounds.
31795
31796 2017-03-14  Martin Liska  <mliska@suse.cz>
31797
31798         PR middle-end/79831
31799         * doc/invoke.texi (-Wchkp): Document the option.
31800
31801 2017-03-14  Martin Liska  <mliska@suse.cz>
31802
31803         * Makefile.in: Install gcov-dump.
31804
31805 2017-03-14  Martin Liska  <mliska@suse.cz>
31806
31807         * multiple_target.c (expand_target_clones): Bail out for
31808         an invalid attribute.
31809
31810 2017-03-14  Richard Biener  <rguenther@suse.de>
31811
31812         * alias.c (struct alias_set_entry): Pack properly.
31813         * cfgloop.h (struct loop): Likewise.
31814         * cse.c (struct set): Likewise.
31815         * ipa-utils.c (struct searchc_env): Likewise.
31816         * loop-invariant.c (struct invariant): Likewise.
31817         * lra-remat.c (struct cand): Likewise.
31818         * recog.c (struct change_t): Likewise.
31819         * rtl.h (struct address_info): Likewise.
31820         * symbol-summary.h (function_summary): Likewise.
31821         * tree-loop-distribution.c (struct partition): Likewise.
31822         * tree-object-size.c (struct object_size_info): Likewise.
31823         * tree-ssa-loop-ivopts.c (struct cost_pair): Likewise.
31824         * tree-ssa-threadupdate.c (struct ssa_local_info_t): Likewise.
31825         * tree-vect-data-refs.c (struct _vect_peel_info): Likewise.
31826         * tree-vect-slp.c (struct _slp_oprnd_info): Likewise.
31827         * tree-vect-stmts.c (struct simd_call_arg_info): Likewise.
31828         * tree-vectorizer.h (struct _loop_vec_info): Likewise.
31829         (struct _stmt_vec_info): Likewise.
31830
31831 2017-03-14  Martin Liska  <mliska@suse.cz>
31832
31833         PR target/79892
31834         * multiple_target.c (create_dispatcher_calls): Check that
31835         a target can create a function dispatcher.
31836
31837 2017-03-14  Martin Liska  <mliska@suse.cz>
31838
31839         PR lto/66295
31840         * multiple_target.c (expand_target_clones): Drop local.local
31841         flag for default implementation.
31842
31843 2017-03-14  Richard Biener  <rguenther@suse.de>
31844
31845         PR tree-optimization/80030
31846         * tree-vect-stmts.c (vectorizable_store): Plug memleak.
31847
31848 2017-03-13  Kito Cheng  <kito.cheng@gmail.com>
31849
31850         * config/riscv/riscv.c (riscv_emit_float_compare>: Use
31851         gcc_fallthrough() instead of __attribute__((fallthrough));
31852
31853 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
31854
31855         * doc/gcc.texi: Remove "up" link to (DIR).
31856         * doc/gccint.texi: Ditto.
31857
31858 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
31859
31860         * doc/install.texi (Specific) <avr>: Remove reference to
31861         binutils 2.13.
31862
31863 2017-03-13  Jeff Law  <law@redhat.com>
31864
31865         * config/riscv/riscv.c (riscv_emit_float_compare): Use fallthru
31866         attribute rather than comments.
31867
31868         * config/pdp11/pdp11.md (movmemhi): Adjust operand numbers to
31869         match_scratch operand is highest.
31870
31871 2017-03-13  Martin Liska  <mliska@suse.cz>
31872
31873         PR middle-end/78339
31874         * ipa-pure-const.c (warn_function_noreturn): If the declarations
31875         is a CHKP clone, use original declaration.
31876
31877 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
31878
31879         * config/arc/arc.c (arc_init): Use multiplier whenever we have it.
31880         (arc_conditional_register_usage): Use a different allocation order
31881         when optimizing for size.
31882         * common/config/arc/arc-common.c (arc_option_optimization_table):
31883         Section anchors default on when optimizing for size.
31884
31885 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
31886
31887         * config/arc/arc.md (*tst_bitfield_tst): Fix pattern.
31888
31889 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
31890
31891         * config/arc/arc.c (arc_output_addsi): Emit code density adds.
31892         * config/arc/arc.md (cpu_facility): Add cd variant.
31893         (*movqi_insn): Add code density variant.
31894         (*movhi_insn): Likewise.
31895         (*movqi_insn): Likewise.
31896         (*addsi3_mixed): Likewise.
31897         (subsi3_insn): Likewise.
31898
31899 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
31900
31901         * config/arc/arc.md (movsi_cond_exec): Update constraint.
31902
31903 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
31904
31905         * config/arc/arc.c (arc_legitimize_pic_address): Handle PIC
31906         expressions with MINUS and UNARY ops.
31907
31908 2017-03-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31909
31910         PR target/79911
31911         * config/arm/neon.md (vec_sel_widen_ssum_lo<VQI:mode><VW:mode>3):
31912         Rename to...
31913         (vec_sel_widen_ssum_lo<mode><V_half>3): ... This. Avoid mismatch
31914         between vec_select and vector argument.
31915         (vec_sel_widen_ssum_hi<VQI:mode><VW:mode>3): Rename to...
31916         (vec_sel_widen_ssum_hi<mode><V_half>3): ... This. Likewise.
31917         (vec_sel_widen_usum_lo<VQI:mode><VW:mode>3): Rename to...
31918         (vec_sel_widen_usum_lo<mode><V_half>3): ... This.
31919         (vec_sel_widen_usum_hi<VQI:mode><VW:mode>3): Rename to...
31920         (vec_sel_widen_usum_hi<mode><V_half>3): ... This.
31921
31922 2017-03-13  Richard Biener  <rguenther@suse.de>
31923
31924         PR other/79991
31925         * params.def (vect-max-peeling-for-alignment): Fix typo.
31926
31927 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
31928
31929         * doc/install.texi (Specific) <mips-*-*>: Remove description of
31930         issue that only occurred with binutils below 2.18.
31931
31932 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
31933
31934         * doc/install.texi (Specific) <cris-axis-elf>: No longer
31935         refer to binutils 2.11/2.12 minimum.
31936
31937 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
31938
31939         * doc/install.texi (Specific) <powerpc-*-*>: Remove link to
31940         ftp.kernel.org and simplify binutils requirement.
31941
31942 2017-03-11  Gerald Pfeifer  <gerald@pfeifer.com>
31943
31944         * doc/invoke.texi (Warning Options): Fix spelling of link-time
31945         optimization.
31946         (Optimize Options): Ditto.  Also remove redundancy.
31947
31948 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
31949
31950         PR translation/79848
31951         * ipa-devirt.c (warn_types_mismatch): Simplify uses of "%<%s%>" to
31952         "%qs".
31953         * ipa-pure-const.c (suggest_attribute): Likewise.  Convert _
31954         to G_ to avoid double translation.
31955
31956 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
31957
31958         PR translation/79923
31959         * auto-profile.c (get_combined_location): Convert leading
31960         character of diagnostics to lower case and remove trailing period.
31961         (read_profile): Likewise for various diagnostics.
31962         * config/arm/arm.c (arm_option_override): Remove trailing period
31963         from various diagnostics.
31964         * config/msp430/msp430.c (msp430_expand_delay_cycles): Likewise.
31965         (msp430_expand_delay_cycles): Likewise.
31966
31967 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
31968
31969         PR target/79925
31970         * config/aarch64/aarch64.c (aarch64_validate_mcpu): Quote the
31971         full command-line argument, rather than just "str".
31972         (aarch64_validate_march): Likewise.
31973         (aarch64_validate_mtune): Likewise.
31974
31975 2017-03-10  Bernd Schmidt  <bschmidt@redhat.com>
31976
31977         PR rtl-optimization/78911
31978         * lra-assigns.c (must_not_spill_p): New function.
31979         (spill_for): Use it.
31980
31981 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
31982
31983         PR tree-optimization/79981
31984         * tree-vrp.c (extract_range_basic): Handle IMAGPART_EXPR of
31985         ATOMIC_COMPARE_EXCHANGE ifn result.
31986         (stmt_interesting_for_vrp, vrp_visit_stmt): Handle
31987         IFN_ATOMIC_COMPARE_EXCHANGE.
31988
31989 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
31990
31991         PR driver/79875
31992         * opts.c (parse_sanitizer_options): Add missing question mark to
31993         "did you mean" message.
31994
31995 2017-03-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31996
31997         * config/rs6000/rs6000-builtin.def (VMULEUB_UNS): Remove orphaned
31998         built-in.
31999         (VMULEUH_UNS): Likewise.
32000         (VMULOUB_UNS): Likewise.
32001         (VMULOUH_UNS): Likewise.
32002         * config/rs6000/rs6000.c (builtin_function_type): Remove
32003         references to ALTIVEC_BUILTIN_VMUL[EO]U[BH]_UNS.
32004
32005 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
32006
32007         PR bootstrap/79952
32008         * read-rtl-function.c (function_reader::read_rtx_operand): Update
32009         x with result of extra_parsing_for_operand_code_0.
32010         (function_reader::extra_parsing_for_operand_code_0): Convert
32011         return type from void to rtx, returning x.  When reading
32012         SYMBOL_REF with SYMBOL_FLAG_HAS_BLOCK_INFO, reallocate x to the
32013         larger size containing struct block_symbol.
32014
32015 2017-03-10  Segher Boessenkool  <segher@kernel.crashing.org>
32016
32017         * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
32018         -mfloat128-hardware without -m64.
32019
32020 2017-03-10  Will Schmidt <will_schmidt@vnet.ibm.com>
32021
32022         PR target/79941
32023         * config/rs6000/rs6000.c (builtin_function_type): Add VMUL*U[HB]
32024         entries to the case statement that marks unsigned arguments to
32025         overloaded functions.
32026
32027 2017-03-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
32028
32029         * config/rs6000/rs6000.c (rs6000_option_override_internal): Fix
32030         two typographic errors in the handling of TARGET_UPPER_REGS_DI.
32031
32032 2017-03-10  Pat Haugen  <pthaugen@us.ibm.com>
32033
32034         PR target/79907
32035         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Test
32036         TARGET_UPPER_REGS_DI when setting 'wi' constraint regclass.
32037
32038 2017-03-10  Martin Liska  <mliska@suse.cz>
32039
32040         PR target/65705
32041         PR target/69804
32042         * toplev.c (process_options): Enable MPX with LSAN and UBSAN.
32043         * tree-chkp.c (chkp_walk_pointer_assignments): Verify that
32044         FIELD != NULL.
32045
32046 2017-03-10  Olivier Hainque  <hainque@adacore.com>
32047
32048         * tree-switch-conversion (array_value_type): Start by resetting
32049         candidate type to it's main variant.
32050
32051 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
32052
32053         PR rtl-optimization/79909
32054         * combine.c (try_combine): Use simplify_replace_rtx on individual
32055         CALL_INSN_FUNCTION_USAGE elements instead of replace_rtx on copy_rtx
32056         of the whole CALL_INSN_FUNCTION_USAGE.
32057
32058         PR tree-optimization/79972
32059         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call
32060         get_range_info on SSA_NAMEs.  Formatting fixes.
32061
32062 2017-03-10  Richard Biener  <rguenther@suse.de>
32063             Jakub Jelinek  <jakub@redhat.com>
32064
32065         PR tree-optimization/77975
32066         * tree-ssa-loop-niter.c (get_base_for): Allow phi argument from latch
32067         edge to be constant.
32068         (get_val_for): For constant x return it.  Formatting fix.
32069         (loop_niter_by_eval): Avoid pointless looping if the next iteration
32070         would use the same bases as the current one.
32071
32072 2017-03-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32073
32074         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Use rotate
32075         instead of vec_select for V1TImode.
32076         * conifg/rs6000/vsx.md (VSX_LE): Remove mode iterator that is no
32077         longer needed.
32078         (VSX_LE_128): Add V1TI to this mode iterator.
32079         (*vsx_le_perm_load_<mode>): Change to use VSX_D mode iterator.
32080         (*vsx_le_perm_store_<mode>): Likewise.
32081         (pre-reload splitter for VSX stores): Likewise.
32082         (post-reload splitter for VSX stores): Likewise.
32083         (*vsx_xxpermdi2_le_<mode>): Likewise.
32084         (*vsx_lxvd2x2_le_<mode>): Likewise.
32085         (*vsx_stxvd2x2_le_<mode>): Likewise.
32086
32087 2017-03-09  Michael Eager  <eager@eagercon.com>
32088
32089         Correct failures with --enable-checking=yes,rtl.
32090
32091         * config/microblaze/microblaze.c (microblaze_expand_shift):
32092         Replace GET_CODE test with CONST_INT_P and INTVAL test with
32093         test for const0_rtx.
32094         * config/microblaze/microblaze.md (ashlsi3_byone, ashrsi3_byone,
32095         lshrsi3_byone): Replace INTVAL with test for const1_rtx.
32096
32097 2017-03-09  Richard Biener  <rguenther@suse.de>
32098
32099         PR tree-optimization/79977
32100         * graphite-scop-detection.c (scop_detection::merge_sese):
32101         Handle the case of extra exits to blocks dominating the entry.
32102
32103 2017-03-09  Toma Tabacu  <toma.tabacu@imgtec.com>
32104
32105         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
32106         Document rdynamic.
32107
32108 2017-03-09  Vladimir Makarov  <vmakarov@redhat.com>
32109
32110         PR rtl-optimization/79949
32111         * lra-constraints.c (process_alt_operands): Check memory when
32112         trying to predict a cycle.  Print about the overall increase.
32113
32114 2017-03-09  Richard Biener  <rguenther@suse.de>
32115
32116         PR middle-end/79971
32117         * gimple-expr.c (useless_type_conversion_p): Preserve
32118         TYPE_SATURATING for fixed-point types.
32119
32120 2017-03-09  Richard Biener  <rguenther@suse.de>
32121
32122         PR ipa/79970
32123         * ipa-prop.c (ipa_modify_formal_parameters): Avoid changing
32124         alignment of BLKmode params.
32125
32126 2017-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32127
32128         PR target/79913
32129         * config/aarch64/iterators.md (VALL_F16_NO_V2Q): New mode iterator.
32130         (VALL_NO_V2Q): Likewise.
32131         (VDQF_DF): Delete.
32132         * config/aarch64/aarch64-simd.md
32133         (aarch64_dup_lane_<vswap_width_name><mode>): Use VALL_F16_NO_V2Q
32134         iterator.
32135         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Use
32136         VALL_NO_V2Q mode iterator.
32137         (*aarch64_vgetfmulx<mode>): Use VDQF iterator.
32138
32139 2017-03-09  Martin Liska  <mliska@suse.cz>
32140
32141         PR tree-optimization/79631
32142         * tree-chkp-opt.c (chkp_is_constant_addr): Call
32143         tree_int_cst_sign_bit just for INTEGER constants.
32144
32145 2017-03-09  Martin Liska  <mliska@suse.cz>
32146
32147         PR target/65705
32148         PR target/69804
32149         * toplev.c (process_options): Disable -fcheck-pointer-bounds with
32150         sanitizers.
32151
32152 2017-03-09  Marek Polacek  <polacek@redhat.com>
32153
32154         PR c++/79672
32155         * tree.c (inchash::add_expr): Handle TREE_VEC.
32156
32157 2017-03-09  Martin Liska  <mliska@suse.cz>
32158
32159         PR ipa/79764
32160         (chkp_narrow_size_and_offset): New function.
32161         (chkp_parse_array_and_component_ref): Support BIT_FIELD_REF.
32162         (void chkp_parse_bit_field_ref): New function.
32163         (chkp_make_addressed_object_bounds): Add case for BIT_FIELD_REF.
32164         (chkp_process_stmt): Use chkp_parse_bit_field_ref.
32165
32166 2017-03-09  Martin Liska  <mliska@suse.cz>
32167
32168         PR ipa/79761
32169         * tree-chkp.c (chkp_get_bound_for_parm): Get bounds for a param.
32170         (chkp_find_bounds_1): Remove gcc_unreachable.
32171
32172 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
32173
32174         PR sanitizer/79944
32175         * asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
32176         BUILT_IN_SYNC*, determine the access type from the size suffix and
32177         always build a MEM_REF with that type.  Handle forgotten
32178         BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.
32179
32180         PR target/79932
32181         * config/i386/avx512vlintrin.h (_mm256_cmpge_epi32_mask,
32182         _mm256_cmpge_epi64_mask, _mm256_cmpge_epu32_mask,
32183         _mm256_cmpge_epu64_mask, _mm256_cmple_epi32_mask,
32184         _mm256_cmple_epi64_mask, _mm256_cmple_epu32_mask,
32185         _mm256_cmple_epu64_mask, _mm256_cmplt_epi32_mask,
32186         _mm256_cmplt_epi64_mask, _mm256_cmplt_epu32_mask,
32187         _mm256_cmplt_epu64_mask, _mm256_cmpneq_epi32_mask,
32188         _mm256_cmpneq_epi64_mask, _mm256_cmpneq_epu32_mask,
32189         _mm256_cmpneq_epu64_mask, _mm256_mask_cmpge_epi32_mask,
32190         _mm256_mask_cmpge_epi64_mask, _mm256_mask_cmpge_epu32_mask,
32191         _mm256_mask_cmpge_epu64_mask, _mm256_mask_cmple_epi32_mask,
32192         _mm256_mask_cmple_epi64_mask, _mm256_mask_cmple_epu32_mask,
32193         _mm256_mask_cmple_epu64_mask, _mm256_mask_cmplt_epi32_mask,
32194         _mm256_mask_cmplt_epi64_mask, _mm256_mask_cmplt_epu32_mask,
32195         _mm256_mask_cmplt_epu64_mask, _mm256_mask_cmpneq_epi32_mask,
32196         _mm256_mask_cmpneq_epi64_mask, _mm256_mask_cmpneq_epu32_mask,
32197         _mm256_mask_cmpneq_epu64_mask, _mm_cmpge_epi32_mask,
32198         _mm_cmpge_epi64_mask, _mm_cmpge_epu32_mask, _mm_cmpge_epu64_mask,
32199         _mm_cmple_epi32_mask, _mm_cmple_epi64_mask, _mm_cmple_epu32_mask,
32200         _mm_cmple_epu64_mask, _mm_cmplt_epi32_mask, _mm_cmplt_epi64_mask,
32201         _mm_cmplt_epu32_mask, _mm_cmplt_epu64_mask, _mm_cmpneq_epi32_mask,
32202         _mm_cmpneq_epi64_mask, _mm_cmpneq_epu32_mask, _mm_cmpneq_epu64_mask,
32203         _mm_mask_cmpge_epi32_mask, _mm_mask_cmpge_epi64_mask,
32204         _mm_mask_cmpge_epu32_mask, _mm_mask_cmpge_epu64_mask,
32205         _mm_mask_cmple_epi32_mask, _mm_mask_cmple_epi64_mask,
32206         _mm_mask_cmple_epu32_mask, _mm_mask_cmple_epu64_mask,
32207         _mm_mask_cmplt_epi32_mask, _mm_mask_cmplt_epi64_mask,
32208         _mm_mask_cmplt_epu32_mask, _mm_mask_cmplt_epu64_mask,
32209         _mm_mask_cmpneq_epi32_mask, _mm_mask_cmpneq_epi64_mask,
32210         _mm_mask_cmpneq_epu32_mask, _mm_mask_cmpneq_epu64_mask): Move
32211         definitions outside of __OPTIMIZE__ guarded section.
32212
32213         PR target/79932
32214         * config/i386/avx512bwintrin.h (_mm512_packs_epi32,
32215         _mm512_maskz_packs_epi32, _mm512_mask_packs_epi32,
32216         _mm512_packus_epi32, _mm512_maskz_packus_epi32,
32217         _mm512_mask_packus_epi32): Move definitions outside of __OPTIMIZE__
32218         guarded section.
32219
32220 2017-03-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32221
32222         * config/s390/vx-builtins.md ("vfee<mode>", "vfeez<mode>")
32223         ("vfenez<mode>"): Add missing constraints.
32224
32225 2017-03-08  Martin Sebor  <msebor@redhat.com>
32226
32227         PR target/79928
32228         * config/nds32/nds32.c (nds32_option_override):
32229         Fix misspelled diagnostic.
32230
32231 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
32232
32233         PR c/79940
32234         * gimplify.c (gimplify_omp_for): Replace index var in outer
32235         taskloop statement with an artificial variable and add
32236         OMP_CLAUSE_PRIVATE clause for it.
32237
32238 2017-03-08  Richard Biener  <rguenther@suse.de>
32239
32240         PR tree-optimization/79955
32241         * tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn
32242         for accesses that are completely outside of the variable.
32243
32244 2017-03-08  Andrew Haley  <aph@redhat.com>
32245
32246         PR tree-optimization/79943
32247         * tree-ssa-loop-split.c (compute_new_first_bound): When
32248         calculating the new upper bound, (END-BEG) should be added, not
32249         subtracted.
32250
32251 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
32252
32253         * config/avr/avr.md (setmemhi): Make sure match_dup
32254         operand number comes before match_scratch.
32255
32256 2017-03-08  Richard Biener  <rguenther@suse.de>
32257
32258         PR tree-optimization/79920
32259         * tree-vect-slp.c (vect_create_mask_and_perm): Remove and inline
32260         with ncopies == 1 to ...
32261         (vect_transform_slp_perm_load): ... here.  Properly compute
32262         all element loads by iterating VF times over the group.  Do
32263         not handle ncopies (computed in a broken way) in
32264         vect_create_mask_and_perm.
32265
32266 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
32267
32268         PR sanitizer/79904
32269         * internal-fn.c (expand_vector_ubsan_overflow): If arg0 or arg1
32270         is a uniform vector, use uniform_vector_p return value instead of
32271         building ARRAY_REF on folded VIEW_CONVERT_EXPR to array type.
32272
32273 2017-03-07  Marek Polacek  <polacek@redhat.com>
32274
32275         PR middle-end/79809
32276         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Use HOST_WIDE_INT.
32277         (alloca_call_type): Likewise.
32278
32279 2017-03-07  Martin Liska  <mliska@suse.cz>
32280
32281         * gcov.c (process_args): Put comment to correct location.
32282
32283 2017-03-07  Martin Liska  <mliska@suse.cz>
32284
32285         PR middle-end/68270
32286         * tree-chkp.c (chkp_may_narrow_to_field): Add new argument ref.
32287         Use array_at_struct_end_p instead of DECL_CHAIN (field).
32288         (chkp_narrow_bounds_for_field): Likewise.
32289         (chkp_parse_array_and_component_ref): Pass one more argument to
32290         call.
32291
32292 2017-03-07  Richard Biener  <rguenther@suse.de>
32293
32294         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
32295         preheaders.
32296
32297 2017-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
32298
32299         * config/i386/i386.c (ix86_local_alignment): Align most aggregates
32300         of 16 bytes and more to 16 bytes, not those of 16 bits and more.
32301
32302 2017-03-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32303
32304         PR c/79855
32305         * params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Add full stop
32306         to end of description.
32307         (PARAM_MAX_STORES_TO_MERGE): Likewise.
32308
32309 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
32310
32311         PR rtl-optimization/79901
32312         * config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
32313         ...
32314         (*avx512f_<code><mode>3<mask_name>): ... this.
32315         (<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
32316         iterator instead of VI8_AVX2_AVX512BW.
32317
32318         PR rtl-optimization/79901
32319         * expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
32320         min/max expander, expand it using expand_vec_cond_expr.
32321
32322         PR sanitizer/79897
32323         * ubsan.c (ubsan_encode_value): Call mark_addressable on the
32324         temporary.
32325
32326 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
32327
32328         PR c++/79821
32329         * dwarf2out.h (dw_vec_const): Change array type from unsigned char *
32330         to void * for PCH reasons.
32331         * dwarf2out.c (output_loc_operands, output_die): Cast
32332         v.val_vec.array to unsigned char *.
32333
32334 2017-03-06  John David Anglin  <danglin@gcc.gnu.org>
32335
32336         PR target/77850
32337         * config/pa/pa-64.h (PAD_VARARGS_DOWN): Don't pad down complex and
32338         vector types.
32339
32340 2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>
32341
32342         PR rtl-optimization/79571
32343         * lra-constraints.c (process_alt_operands): Calculate static
32344         reject and subtract it from overall when only addresses will be
32345         reloaded.
32346
32347 2017-03-06  Julia Koval  <julia.koval@intel.com>
32348
32349         PR target/79793
32350         * config/i386/i386.c (ix86_minimum_incoming_stack_boundary): Set
32351         incoming stack boundary to 128 for 64-bit targets.
32352
32353 2017-03-06  Richard Biener  <rguenther@suse.de>
32354
32355         PR tree-optimization/79894
32356         * tree-vectorizer.c (vectorize_loops): Set loop_vectorized_call
32357         to NULL after folding it.
32358
32359 2017-03-06  Richard Biener  <rguenther@suse.de>
32360
32361         PR tree-optimization/79824
32362         * tree-vect-stmts.c (get_group_load_store_type): Fix alignment
32363         check disabling peeling for gaps.
32364
32365 2017-03-06  Toma Tabacu  <toma.tabacu@imgtec.com>
32366
32367         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
32368         attributes): Document gettimeofday.
32369
32370 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
32371
32372         * config/s390/s390.c (s390_option_override_internal): Set
32373         PARAM_MIN_VECT_LOOP_BOUND
32374
32375 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
32376
32377         * config/s390/s390.c (s390_asm_output_function_label): Use nopr %r0.
32378         * config/s390/s390.md: Likewise.
32379
32380 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
32381
32382         PR target/79812
32383         * config/i386/sse.md (VI8F_256_512): Remove mode iterator.
32384         (<avx2_avx512>_perm<mode>): Rename to ...
32385         (avx2_perm<mode>): ... this.  Use VI8F_256 iterator instead
32386         of VI8F_256_512.
32387         (<avx512>_perm<mode>_mask): Rename to ...
32388         (avx512vl_perm<mode>_mask): ... this.  Use VI8F_256 iterator instead
32389         of VI8F_256_512.
32390         (<avx2_avx512>_perm<mode>_1<mask_name>): Rename to ...
32391         (avx2_perm<mode>_1<mask_name): ... this.  Use VI8F_256 iterator
32392         instead of VI8F_256_512.
32393         (avx512f_perm<mode>): New define_expand.
32394         (avx512f_perm<mode>_mask): Likewise.
32395         (avx512f_perm<mode>_1<mask_name>): New define_insn.
32396         (<avx512>_vec_dup<mode>_1): Fix up vec_select mode.
32397
32398 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
32399
32400         * config/mips/mips-msa.md (msa_fmax_a_<msafmt>, msa_fmin_a_<msafmt>,
32401         msa_max_a_<msafmt>, msa_min_a_<msafmt>): Introduce mode interator for
32402         if_then_else.
32403         (smin<mode>3, smax<mode>3): Change operand print code from 'B' to 'E'.
32404
32405 2017-03-06  Martin Liska  <mliska@suse.cz>
32406
32407         PR sanitize/79783
32408         * asan.c (asan_expand_poison_ifn): Do not expand ASAN_POISON
32409         when having a SSA NAME w/o VAR_DECL assigned to it.
32410
32411 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
32412
32413         * config/mips/mips-msa.md (msa_dotp_<su>_d, msa_dpadd_<su>_d,
32414         msa_dpsub_<su>_d): Fix MODE for vec_select.
32415
32416 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
32417
32418         * config/mips/mips.c (mips_gen_const_int_vector): Change type of last
32419         argument.
32420         * config/mips/mips-protos.h (mips_gen_const_int_vector): Likewise.
32421
32422 2017-03-06  Richard Biener  <rguenther@suse.de>
32423
32424         * lto-streamer.c (lto_check_version): Use %qs in diagnostics.
32425         * plugin.c (register_plugin_info): Likewise.
32426         * tree-chkp.c (chkp_make_static_const_bounds): Likewise.
32427
32428 2017-03-05  Jakub Jelinek  <jakub@redhat.com>
32429
32430         * config/i386/sse.md (sse_storehps, sse_storelps,
32431         avx_<castmode><avxsizesuffix>_<castmode>,
32432         avx512f_<castmode><avxsizesuffix>_<castmode>,
32433         avx512f_<castmode><avxsizesuffix>_256<castmode>): Require
32434         in condition that at least one operand is not a MEM.
32435
32436 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
32437
32438         PR middle-end/79805
32439         * internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_RESET,
32440         ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_COMPARE_EXCHANGE): Remove
32441         ECF_NOTHROW.
32442         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Set
32443         gimple_call_nothrow_p flag based on whether original builtin can throw.
32444         If it can, emit following stmts on the fallthrough edge.
32445         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Similarly, except
32446         don't create new bb if inserting just debug stmts on the edge, try to
32447         insert them on the fallthru bb or just reset debug stmts.
32448
32449 2017-03-03  Segher Boesssenkool  <segher@kernel.crashing.org>
32450
32451         PR target/43763
32452         * config/rs6000/rs6000.c (rs6000_final_prescan_insn): Save and
32453         restore recog_data (including the operand rtxes inside it) around
32454         the call to get_insn_template.
32455
32456 2017-03-03  Martin Sebor  <msebor@redhat.com>
32457
32458         PR tree-optimization/79699
32459         * context.c (context::~context): Free MPFR caches to avoid
32460         a memory leak on program exit.
32461
32462 2017-03-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32463
32464         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
32465         Use wide_int::ulow () instead of .elt (0).
32466
32467 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
32468
32469         * config/i386/i386.md (*pushtf): Change *roF constraint to *roC.
32470         (*pushxf): Limit oF constraint to 32bit targets and add oC
32471         constraint for 64bit targets.
32472         (pushxf splitter): Use PUSH_ROUNDING to calculate stack adjustment.
32473         (*pushdf): Change rmF constraint to rmC.
32474
32475 2017-03-03  Martin Liska  <mliska@suse.cz>
32476
32477         * tree-ssa-loop-prefetch.c (pass_loop_prefetch::execute):
32478         Remove unused variable.
32479
32480 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
32481
32482         PR target/79807
32483         * config/i386/i386.c (ix86_expand_multi_arg_builtin): If target
32484         is a memory operand, increase num_memory.
32485         (ix86_expand_args_builtin): Likewise.
32486
32487 2017-03-03  Jan Hubicka  <jh@suse.cz>
32488
32489         PR lto/79760
32490         * ipa-devirt.c (maybe_record_node): Properly handle
32491         __cxa_pure_virtual visibility.
32492
32493 2017-03-03  Martin Liska  <mliska@suse.cz>
32494
32495         PR tree-optimization/79803
32496         * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Remove
32497         assert.
32498         (pass_loop_prefetch::execute): Disabled optimization if an
32499         assumption about L1 cache size is not met.
32500
32501 2017-03-03  Martin Liska  <mliska@suse.cz>
32502
32503         PR rtl-optimization/79574
32504         * gcse.c (struct gcse_expr): Use HOST_WIDE_INT instead of int.
32505         (hash_scan_set): Likewise.
32506         (dump_hash_table): Likewise.
32507         (hoist_code): Likewise.
32508
32509 2017-03-03  Richard Biener  <rguenther@suse.de>
32510
32511         * fixed-value.c (fixed_from_string): Restore use of elt (1)
32512         in place of uhigh ().
32513         (fixed_convert_from_real): Likewise.
32514
32515 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
32516
32517         PR target/79514
32518         * config/i386/i386.md (*pushxf_rounded): Use Pmode instead of DImode.
32519
32520 2017-03-03  Richard Biener  <rguenther@suse.de>
32521
32522         PR middle-end/79818
32523         * match.pd ( X +- C1 CMP C2 -> X CMP C2 -+ C1): Add missing
32524         TYPE_OVERFLOW_UNDEFINED check.
32525
32526 2017-03-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32527
32528         * config/rs6000/vector.md (vector_ne_<mode>_p): Correct operand
32529         numbers.
32530         (vector_ae_<mode>_p): Likewise.
32531         (vector_nez_<mode>_p): Likewise.
32532         (vector_ne_v2di_p): Likewise.
32533         (vector_ae_v2di_p): Likewise.
32534         (vector_ne_<mode>_p): Likewise.
32535         * config/rs6000/vsx.md (vsx_tsqrt<mode>2_fg): Correct operand
32536         numbers.
32537         (vsx_tsqrt<mode>2_fe): Likewise.
32538
32539 2017-03-02  Uros Bizjak  <ubizjak@gmail.com>
32540
32541         PR target/79514
32542         * config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern.
32543
32544 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
32545
32546         PR rtl-optimization/79780
32547         * cprop.c (one_cprop_pass): When second and further conditional trap
32548         in a single basic block is turned into an unconditional trap, turn it
32549         into a deleted note to avoid RTL verification failures.
32550
32551 2017-03-02  Richard Biener  <rguenther@suse.de>
32552
32553         * fold-const.c (const_binop): Use ulow () instead of elt (0).
32554
32555 2017-03-02  Richard Biener  <rguenther@suse.de>
32556
32557         PR tree-optimization/79345
32558         PR c++/42000
32559         * tree-ssa-alias.c (walk_aliased_vdefs_1): Take a limit
32560         param and abort the walk, returning -1 if it is hit.
32561         (walk_aliased_vdefs): Take a limit param and pass it on.
32562         * tree-ssa-alias.h (walk_aliased_vdefs): Add a limit param,
32563         defaulting to 0 and return a signed int.
32564         * tree-ssa-uninit.c (struct check_defs_data): New struct.
32565         (check_defs): New helper.
32566         (warn_uninitialized_vars): Use walk_aliased_vdefs to warn
32567         about uninitialized memory.
32568         * fixed-value.c (fixed_from_string): Use ulow/uhigh to avoid
32569         bogus uninitialized warning.
32570         (fixed_convert_from_real): Likewise.
32571
32572 2017-03-02  Bin Cheng  <bin.cheng@arm.com>
32573
32574         PR tree-optimization/66768
32575         * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Skip addr
32576         iv_use if base object can't be determined.
32577
32578 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
32579
32580         PR tree-optimization/79345
32581         * gensupport.h (struct pattern_stats): Add min_scratch_opno field.
32582         * gensupport.c (get_pattern_stats_1) <case MATCH_SCRATCH>: Update it.
32583         (get_pattern_stats): Initialize it.
32584         * genemit.c (gen_expand): Verify match_scratch numbers come after
32585         match_operand/match_dup numbers.
32586         * config/i386/i386.md (<s>mul<mode>3_highpart): Swap match_dup and
32587         match_scratch numbers.
32588         * config/i386/sse.md (avx2_gathersi<mode>, avx2_gatherdi<mode>):
32589         Likewise.
32590         * config/s390/s390.md (trunctdsd2): Likewise.
32591
32592 2017-03-02  Richard Biener  <rguenther@suse.de>
32593
32594         * wide-int.h (wide_int_storage::operator=): Implement in terms
32595         of wi::copy.
32596
32597 2017-03-02  Richard Biener  <rguenther@suse.de>
32598
32599         PR tree-optimization/79777
32600         * tree-ssa-pre.c (eliminate_insert): Give up if we simplify
32601         the to insert expression to sth existing.
32602
32603 2017-03-01  Martin Sebor  <msebor@redhat.com>
32604
32605         PR middle-end/79692
32606         * gimple-ssa-sprintf.c
32607         (directive::known_width_and_precision): New function.
32608         (format_integer): Use it.
32609         (get_mpfr_format_length): Consider the full range of precision
32610         when computing %g output with the # flag.  Set the likely byte
32611         count to 3 rather than 1 when precision is indeterminate.
32612         (format_floating): Correct the lower bound of precision.
32613
32614 2017-03-01  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32615
32616         * doc/invoke.texi: Document default code model for 64-bit Linux.
32617
32618 2017-03-01  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32619
32620         PR target/79752
32621         * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
32622         udiv rather than div since input pattern is unsigned.
32623
32624 2017-03-01  Uros Bizjak  <ubizjak@gmail.com>
32625
32626         * config/i386/i386.c (print_reg): Warn for values of
32627         unsupported size in integer register.
32628
32629 2017-03-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
32630
32631         PR target/79439
32632         * config/rs6000/predicates.md (current_file_function_operand): Do
32633         not allow self calls to be local if the function is replaceable.
32634
32635 2017-03-01  Kelvin Nilsen  <kelvin@gcc.gnu.org>
32636
32637         PR target/79395
32638         * config/rs6000/altivec.h (vec_ctz and others): Change the
32639         preprocessor macro that controls conditional compilation from
32640         _ARCH_PWR9 to __POWER9_VECTOR__.
32641         (vec_all_ne): Change parameterization of __altivec_scalar_pred
32642         macro expansion under preprocessor #ifdef __POWER9_VECTOR__
32643         control (instead of _ARCH_PWR9 control) so that template
32644         definition uses power9-specific function.
32645         (vec_any_eq): Likewise.
32646         (vec_all_ne): Change macro definition to use a power9-specific
32647         expansion under #ifdef __POWER9_VECTOR__ control (instead of
32648         _ARCH_PWR9 control).
32649         (vec_any_eq) Likewise.
32650         * config/rs6000/rs6000-builtin.def (CMPNEF): Remove BU_P9V_AV_2
32651         expansion for CMPNEF to remove support for xvcmpnesp instruction.
32652         (CMPNED): Remove BU_P9V_AV2 expansion for CMPNED to remove
32653         support for xvcmpnedp instruction.
32654         (VCMPNEB_P): Replace BU_P9V_AV_P macro expansion with BU_P9V_AV_2
32655         macro expansion so that Power9 implementation of vec_all_ne does
32656         not use the AltiVec predicate framework.
32657         (VCMPNEH_P): Likewise.
32658         (VCMPNEW_P): Likewise.
32659         (VCMPNED_P): Likewise.
32660         (VCMPNEFP_P): Likewise.
32661         (VCMPNEDP_P): Likewise.
32662         (VCMPAEB_P): Add BU_P9V_AV_2 macro expansion to change
32663         implementation of vec_any_eq to not use AltiVec predicate
32664         framework.
32665         (VCMPAEH_P): Likewise.
32666         (VCMPAEW_P): Likewise.
32667         (VCMPAED_P): Likewise.
32668         (VCMPAEFP_P): Likewise.
32669         (VCMPAEDP_P): Likewise.
32670         (VCMPNE_P): Replace BU_P9V_OVERLOAD_P macro expansion with
32671         BU_P9V_OVERLOAD_2 so that Power9 implementation of vec_all_ne does
32672         not use the AltiVec predicate framework.
32673         (VCMPAE_P): Add BU_P9V_OVERLOAD_2 macro to change implementation
32674         of vec_any_eq to not use AltiVec predicate framework.
32675         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
32676         support for predefined __POWER9_VECTOR__ macro to indicate that
32677         Power9 instruction selection is enabled.
32678         (altivec_overloaded_builtins): Remove extraneous
32679         ALTIVEC_BUILTIN_VEC_CMPNE entry for overloaded
32680         function argument types RS6000_BTI_bool_V16QI and
32681         RS6000_BTI_bool_V16QI.  Remove erroneous ALTIVEC_BUILTIN_VEC_CMPNE
32682         entry for overloaded function argument types RS6000_BTI_bool_V4SI
32683         andRS6000_BTI_bool_V4SI, mapping to P9V_BUILTIN_CMPNEB.  Remove
32684         two entries mapping to P9V_BUITIN_CMPNED and one entry mapping to
32685         P9V_BUILTIN_CMPNEF to force use of instructions not specific to
32686         Power9 for implementations of vec_cmpne.  Change the signature for
32687         all definitions of the overloaded P9V_BUILTIN_VEC_CMPNE_P function
32688         (representing vec_all_ne) to remove the previously described first
32689         argument of type RS6000_BTI_INTSI, as this was an artifact of
32690         reliance on the AltiVec predicate framework, which is no longer
32691         used in the implementation of these functions.  Add
32692         P9V_BUILTIN_VEC_VCMPAE_P entries (representing the vec_anyeq
32693         function) to match all of the P9V_BUILTIN_VEC_VCMNE_P entries
32694         since, unlike the AltiVec predicate framework implementation, we
32695         do not share function descriptors between vec_alle and vec_anyeq.
32696         (altivec_resolve_overloaded_builtin): Add SFmode and DFmode to the
32697         set of modes that receive special treatment even when
32698         TARGET_P9_VECTOR is true.  The special treatment emits code that
32699         does not depend on Power9 instructions.
32700         * config/rs6000/vector.md (vector_ne_<mode>_p): Change this
32701         define_expand to not rely on AltiVec predicate framework.
32702         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
32703         function.
32704         (vector_ne_v2di_p): Change this define_expand to not rely on
32705         AltiVec predicate framework.
32706         (vector_ae_v2di_p): New define_expand to represent vec_any_eq
32707         function.
32708         (vector_ne_<mode>_p): Change this define_expand to not rely on
32709         AltiVec predicate framework.
32710         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
32711         function.
32712         * config/rs6000/vsx.md (*vsx_ne_<mode>_p): For modes VSX_EXTRACT_I
32713         (V16QI, V8HI, V4SI), correct a typo in the code emitted for this
32714         define_insn pattern.
32715         (*vsx_ne_<mode>_p): For modes VSX_F (V4SF and V2DF), remove this
32716         define_insn pattern because the xvcmpne<VSs>. instruction is not
32717         supported.
32718         (vcmpne<VSs>): Remove this define_insn because xvcmpne<VSs>
32719         instruction is not supported.
32720
32721 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
32722
32723         * config/nvptx/nvptx.c: Include intl.h.
32724
32725 2017-03-01  Martin Jambor  <mjambor@suse.cz>
32726
32727         PR lto/78140
32728         * ipa-prop.h (ipa_bits): Removed field known.
32729         (ipa_jump_func): Removed field vr_known.  Changed fields bits and m_vr
32730         to pointers.  Adjusted their comments to warn about their sharing.
32731         (ipcp_transformation_summary): Change bits to a vector of pointers.
32732         (ipa_check_create_edge_args): Moved to ipa-prop.c, declare.
32733         (ipa_get_ipa_bits_for_value): Declare.
32734         * tree-vrp.h (value_range): Mark as GTY((for_user)).
32735         * ipa-prop.c (ipa_bit_ggc_hash_traits): New.
32736         (ipa_bits_hash_table): Likewise.
32737         (ipa_vr_ggc_hash_traits): Likewise.
32738         (ipa_vr_hash_table): Likewise.
32739         (ipa_print_node_jump_functions_for_edge): Adjust for bits and m_vr
32740         being pointers and vr_known being removed.
32741         (ipa_set_jf_unknown): Likewise.
32742         (ipa_get_ipa_bits_for_value): New function.
32743         (ipa_set_jfunc_bits): Likewise.
32744         (ipa_get_value_range): New overloaded functions.
32745         (ipa_set_jfunc_vr): Likewise.
32746         (ipa_compute_jump_functions_for_edge): Use the above functions to
32747         construct bits and vr parts of jump functions.
32748         (ipa_check_create_edge_args): Move here from ipa-prop.h, also allocate
32749         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
32750         exist.
32751         (ipcp_grow_transformations_if_necessary): Also allocate
32752         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
32753         exist.
32754         (ipa_node_params_t::duplicate): Do not copy bits, just pointers to
32755         them.  Fix too long lines.
32756         (ipa_write_jump_function): Adjust for bits and m_vr being pointers and
32757         vr_known being removed.
32758         (ipa_read_jump_function): Use new setter functions to construct bits
32759         and vr parts of jump functions or set them to NULL.
32760         (write_ipcp_transformation_info): Adjust for bits being pointers.
32761         (read_ipcp_transformation_info): Likewise.
32762         (ipcp_update_bits): Likewise.  Fix excessively long lines a trailing
32763         space.
32764         Include gt-ipa-prop.h.
32765         * ipa-cp.c (propagate_bits_across_jump_function): Adjust for bits
32766         being pointers.
32767         (ipcp_store_bits_results): Likewise.
32768         (propagate_vr_across_jump_function): Adjust for m_vr being a pointer.
32769         Do not write to existing jump functions but use a temporary instead.
32770
32771 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
32772
32773         PR c++/79681
32774         * fold-const.c (make_bit_field_ref): If orig_inner is COMPONENT_REF,
32775         attempt to use its first operand as BIT_FIELD_REF base.
32776
32777 2017-03-01  Richard Biener  <rguenther@suse.de>
32778
32779         PR middle-end/79721
32780         * tree-chrec.c (chrec_evaluate): Perform computation of Newtons
32781         interpolating formula in wrapping arithmetic.
32782         (chrec_apply): Convert chrec_evaluate return value to wanted type.
32783
32784 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
32785
32786         PR tree-optimization/79734
32787         * tree-vect-generic.c (expand_vector_condition): Optimize
32788         AVX512 vector boolean VEC_COND_EXPRs into bitwise operations.
32789         Handle VEC_COND_EXPR where comparison has different inner width from
32790         type's inner width.
32791
32792 2017-02-28  Sandra Loosemore  <sandra@codesourcery.com>
32793
32794         * doc/invoke.texi (ARC Options): Copy-edit to fix punctuation,
32795         markup, and similar issues.  Remove @opindex entries for things
32796         that aren't options.  Add missing -mmpy-option entries.
32797
32798 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
32799
32800         PR tree-optimization/79737
32801         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): If bitlen is
32802         a multiple of BITS_PER_UNIT and !BYTES_BIG_ENDIAN, clear
32803         tmpbuf[byte_size - 1].  Call natice_encode_expr with byte_size - 1
32804         instead of byte_size.  Formatting fix.
32805         (shift_bytes_in_array_right): Formatting fix.
32806
32807 2017-02-28  Eric Botcazou  <ebotcazou@adacore.com>
32808
32809         PR target/79749
32810         * config/sparc/sparc.c (sparc_frame_pointer_required): Add missing
32811         condition on optimize for the leaf function test.
32812
32813 2017-02-28  Martin Liska  <mliska@suse.cz>
32814
32815         PR lto/79625
32816         * read-rtl-function.c (function_reader::handle_unknown_directive):
32817         Bail out when one uses -flto.
32818
32819 2017-02-28  Martin Liska  <mliska@suse.cz>
32820
32821         * common.opt: Replace space with tabular for options of <number>
32822         type.
32823         * config/i386/i386.opt: Show <number> value for
32824         -mlarge-data-threshold.
32825         * opts.c (print_filtered_help): Do not display number in hexadecimal
32826         format.
32827
32828 2017-02-28  Martin Liska  <mliska@suse.cz>
32829
32830         * common.opt: Fix --help=option -Q for options which are of
32831         an enum type.
32832
32833 2017-02-28  Uros Bizjak  <ubizjak@gmail.com>
32834
32835         * config/i386/i386.c (print_reg): Error out for values
32836         of 8-bit size in invalid integer register.
32837
32838 2017-02-28  Martin Sebor  <msebor@redhat.com>
32839
32840         PR tree-optimization/79691
32841         * passes.def (pass_all_optimizations_g): Enable pass_sprintf_length.
32842
32843 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
32844
32845         PR target/79729
32846         * config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
32847         gcc_unreachable with output_operand_lossage.
32848
32849 2017-02-28  Richard Biener  <rguenther@suse.de>
32850
32851         PR tree-optimization/79740
32852         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Allow redundant
32853         inserts.
32854         (visit_nary_op): Insert the nary into the hashtable if we
32855         pattern-matched sth.
32856         * tree-ssa-pre.c (eliminate_insert): Robustify.
32857
32858 2017-02-28  Richard Biener  <rguenther@suse.de>
32859
32860         PR middle-end/79731
32861         * fold-const.c (decode_field_reference): Reject out-of-bound
32862         accesses.
32863
32864 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
32865
32866         * config/i386/i386.c: Include intl.h.
32867         (ix86_option_override_internal): Use cond ? G_("...") : G_("...")
32868         instead of just cond ? "..." : "...".
32869         * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Likewise.
32870         * coverage.c (read_counts_file): Likewise.
32871         * omp-offload.c: Include intl.h.
32872         (oacc_loop_fixed_partitions): Use cond ? G_("...") : G_("...") instead
32873         of just cond ? "..." : "...".
32874         * gcov.c (read_count_file): Use cond ? N_("...") : N_("...") instead
32875         of just cond ? "..." : "...".
32876
32877 2017-02-28  Richard Earnshaw  <rearnsha@arm.com>
32878
32879         PR target/79742
32880         * config/arm/parsecpu.awk (gen_data): Set tuning target to 'tune for'
32881         entry, if present.
32882         * config/arm/arm-cpus.in (cortex-m0plus.small-multiply): Correct
32883         'tune for' CPU name.
32884         * config/arm/arm-cpu-data.h: Regenerated.
32885
32886 2017-02-28  Richard Biener  <rguenther@suse.de>
32887
32888         PR tree-optimization/79732
32889         * tree-inline.c (expand_call_inline): Do not shadow var.
32890
32891 2017-02-28  Richard Biener  <rguenther@suse.de>
32892
32893         PR tree-optimization/79723
32894         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Preserve
32895         address-space properly.
32896
32897 2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>
32898
32899         * doc/optinfo.texi (Optimization groups): Fix option used for
32900         OPTGROUP_ALL.
32901         * doc/invoke.texi (-fopt-info): Document "omp".
32902         * dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
32903         (OPTGROUP_ALL): Add OPTGROUP_OMP.
32904         * hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
32905         * ipa-hsa.c (pass_data_ipa_hsa): Likewise.
32906         * omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.
32907
32908         * dumpfile.h (OPTGROUP_OPENMP): Rename to OPTGROUP_OMP.  Adjust
32909         all users.
32910         * dumpfile.c (optgroup_options): Instead of "openmp", associate
32911         OPTGROUP_OMP with "omp".
32912
32913 2017-02-27  Pat Haugen  <pthaugen@us.ibm.com>
32914
32915         PR target/79544
32916         * config/rs6000/rs6000-c.c (struct altivec_builtin_types): Use VSRAD
32917         for arithmetic shift of unsigned V2DI.
32918
32919 2017-02-27  Claudiu Zissulescu  <claziss@synopsys.com>
32920
32921         * config.gcc (arc*-): Clean up, use arc/big.h, arc/elf.h, and
32922         arc/linux.h headers.
32923         * config/arc/arc.h (TARGET_OS_CPP_BUILTINS): Remove.
32924         (LINK_SPEC): Likewise.
32925         (ARC_TLS_EXTRA_START_SPEC): Likewise.
32926         (EXTRA_SPECS): Likewise.
32927         (STARTFILE_SPEC): Likewise.
32928         (ENDFILE_SPEC): Likewise.
32929         (LIB_SPEC): Likewise.
32930         (TARGET_SDATA_DEFAULT): Likewise.
32931         (TARGET_MMEDIUM_CALLS_DEFAULT): Likewise.
32932         (MULTILIB_DEFAULTS): Likewise.
32933         (DWARF2_UNWIND_INFO): Likewise.
32934         * config/arc/big.h: New file.
32935         * config/arc/elf.h: Likewise.
32936         * config/arc/linux.h: Likewise.
32937         * config/arc/t-uClibc: Remove.
32938
32939 2017-02-27  Bin Cheng  <bin.cheng@arm.com>
32940
32941         PR tree-optimization/77536
32942         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function.
32943         (tree_transform_and_unroll_loop): Use above function to compute the
32944         estimated niter of unrolled loop and use it when scaling profile.
32945         Also use count info rather than frequency if it's non-zero.
32946         * tree-ssa-loop-manip.h niter_for_unrolled_loop(): New declaration.
32947         * tree-vect-loop.c (scale_profile_for_vect_loop): New function.
32948         (vect_transform_loop): Call above function.
32949
32950 2017-02-27  Richard Biener  <rguenther@suse.de>
32951
32952         PR tree-optimization/45397
32953         * tree-ssa-pre.c (eliminate_insert): Handle BIT_AND_EXPR.
32954         * tree-ssa-sccvn.c (valueized_wider_op): New helper.
32955         (visit_nary_op): Add pattern matching for CSEing sign-changed
32956         or truncated operations with wider ones.
32957
32958 2017-02-27  Richard Biener  <rguenther@suse.de>
32959
32960         PR tree-optimization/79690
32961         * tree-vect-stmts.c (vectorizable_store): Use vector type
32962         built from the DR with address-space.
32963
32964 2017-02-26  Gerald Pfeifer  <gerald@pfeifer.com>
32965
32966         * doc/invoke.texi (Optimize Options): Refine the description
32967         of asan-use-after-return.
32968
32969 2017-02-25  Alan Modra  <amodra@gmail.com>
32970
32971         PR rtl-optimization/79584
32972         * lra-constraints.c (base_to_reg): Reload ad->base, the entire
32973         base, not ad->base_term, the reg within base.  Remove assertion
32974         that ad->base == ad->base_term.  Replace gen_int_mode using
32975         bogus mode with const0_rtx.
32976
32977 2017-02-25  Jakub Jelinek  <jakub@redhat.com>
32978
32979         PR middle-end/79396
32980         * tree-eh.c (operation_could_trap_p, stmt_could_throw_1_p): Handle
32981         FMA_EXPR like tcc_binary or tcc_unary.
32982
32983         * tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning.
32984
32985         PR debug/77589
32986         * dwarf2out.c (struct dw_loc_list_struct): Add noted_variable_value
32987         bitfield.
32988         (size_of_loc_descr): Handle DW_OP_GNU_variable_value.
32989         (output_loc_operands): Handle DW_OP_call_ref and
32990         DW_OP_GNU_variable_value.
32991         (struct variable_value_struct): New type.
32992         (struct variable_value_hasher): Likewise.
32993         (variable_value_hash): New variable.
32994         (string_types): Remove.
32995         (copy_loc_descr): New function.
32996         (add_loc_descr_to_each): Clarify comment.  Use copy_loc_descr.
32997         (prepend_loc_descr_to_each): New function.
32998         (add_loc_list): Fix comment typo.  Use prepend_loc_descr_to_each
32999         instead of add_loc_descr_to_each if the first argument is single
33000         location list and the second has multiple.
33001         (resolve_args_picking_1): Handle DW_OP_GNU_variable_value.
33002         (loc_list_from_tree_1): For early_dwarf, emit DW_OP_GNU_variable_value
33003         when looking for variable value which doesn't have other location info.
33004         (loc_list_from_tree): Formatting fix.
33005         (gen_array_type_die): Simplify DW_AT_string_length handling.
33006         (adjust_string_types): Remove.
33007         (gen_subprogram_die): Don't call adjust_string_types nor test/set
33008         string_types.  Call resolve_variable_values.
33009         (prune_unused_types_walk_loc_descr): Handle DW_OP_GNU_variable_value.
33010         (resolve_addr_in_expr): Likewise.  Add A argument.
33011         (copy_deref_exprloc): Remove deref argument.  Adjust for the
33012         original expression being DW_OP_GNU_variable_value with optionally
33013         DW_OP_stack_value after it instead of DW_OP_call4 with DW_OP_deref
33014         optionally after it.
33015         (optimize_string_length): Rework for DW_OP_GNU_variable_value.
33016         (resolve_addr): Adjust optimize_string_length and resolve_addr_in_expr
33017         callers.  Set remove_AT_byte_size if removing DW_AT_string_length.
33018         (variable_value_hasher::hash, variable_value_hasher::equal): New
33019         methods.
33020         (resolve_variable_value_in_expr, resolve_variable_value,
33021         resolve_variable_values, note_variable_value_in_expr,
33022         note_variable_value): New functions.
33023         (dwarf2out_early_finish): Call note_variable_value on all toplevel
33024         DIEs.
33025
33026 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
33027
33028         PR c/79677
33029         * opts.h (handle_generated_option): Add GENERATED_P argument.
33030         * opts-common.c (handle_option): Adjust function comment.
33031         (handle_generated_option): Add GENERATED_P argument, pass it to
33032         handle_option.
33033         (control_warning_option): Pass false to handle_generated_option
33034         GENERATED_P.
33035         * opts.c (maybe_default_option): Pass true to handle_generated_option
33036         GENERATED_P.
33037         * optc-gen.awk: Likewise.
33038
33039 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
33040
33041         * config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of
33042         a REG, look at the REG it is a SUBREG of.
33043         (splitter for cmpeqsi_t): Ditto.
33044
33045 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
33046
33047         * config/pa/pa.c (pa_combine_instructions): Do not share RTL.  Make
33048         the special USEs with the pattern of the insn, not the insn itself.
33049
33050 2017-02-24  Matthew Fortune  <matthew.fortune@imgtec.com>
33051
33052         PR target/79473
33053         * doc/invoke.texi: Document -mload-store-pairs.
33054
33055 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
33056             Sandra Loosemore  <sandra@codesourcery.com>
33057
33058         * config/nios2/nios2.c (nios2_simple_const_p): Returns false if the
33059         argument isn't a CONST_INT.
33060         (nios2_alternate_compare_const): Assert op is a CONST_INT.
33061         (nios2_valid_compare_const_p): Assert op is a CONST_INT.
33062         (nios2_validate_compare): Bypass alternate compare logic if *op2
33063         is not a CONST_INT.
33064         (ldstwm_operation_p): Return false if first_base is not a REG or
33065         if first_offset is not a CONST_INT.
33066
33067 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
33068
33069         * config/cris/cris.md: Use correct operand in a define_peephole2.
33070
33071 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
33072
33073         * config/c6x/c6x.c (predicate_insn): Do not incorrectly share RTL.
33074
33075 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
33076
33077         * config/arc/arc.c (arc_ccfsm_advance): Only take the PATTERN of
33078         this_insn if it is an INSN or JUMP_INSN.
33079         (force_offsettable): Look at base, not at addr.
33080         * config/arc/predicates.md (brcc_nolimm_operator): Don't call INTVAL
33081         on things that aren't necessarily CONST_INTs.
33082
33083 2017-02-24  Uros Bizjak  <ubizjak@gmail.com>
33084
33085         * doc/invoke.texi (x86 Options, -mfpmath=sse): Mention that
33086         -mfpmath=sse is the default also for x86-32 targets with SSE2
33087         instruction set when @option{-ffast-math} is enabled
33088
33089 2017-02-24  Jeff Law  <law@redhat.com>
33090
33091         PR rtl-optimizatoin/79286
33092         * ira.c (update_equiv_regs): Drop may_trap_p exception to
33093         dominance test.
33094
33095 2017-02-24  Richard Biener  <rguenther@suse.de>
33096
33097         PR tree-optimization/79389
33098         * gimple-ssa-split-paths.c (is_feasible_trace): Properly skip
33099         debug insns.
33100
33101 2017-02-24  Aldy Hernandez  <aldyh@redhat.com>
33102
33103         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update
33104         function comment to reflect reality.
33105         (loop_exits_before_overflow): Fix typo in function description.
33106
33107 2017-02-24  Richard Biener  <rguenther@suse.de>
33108
33109         PR tree-optimization/79389
33110         * gimple-ssa-split-paths.c (is_feasible_trace): Verify more
33111         properly that a threading opportunity exists.  Detect conditional
33112         copy/constant propagation opportunities.
33113
33114 2017-02-23  Eric Botcazou  <ebotcazou@adacore.com>
33115
33116         * config/visium/visium.md (type): Add trap.
33117         (b): New mode attribute.
33118         (*btst): Rename into...
33119         (*btst<mode>): ...this and adjust.
33120         (*cbranchsi4_btst_insn): Rename into...
33121         (*cbranch<mode>4_btst_insn): ...this and adjust.
33122         (trap): New define_insn.
33123
33124 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
33125
33126         PR tree-optimization/79389
33127         * ifcvt.c (struct noce_if_info): Add rev_cond field.
33128         (noce_reversed_cond_code): New function.
33129         (noce_emit_store_flag): Use rev_cond if non-NULL instead of
33130         reversed_comparison_code.  Formatting fix.
33131         (noce_try_store_flag): Test rev_cond != NULL in addition to
33132         reversed_comparison_code.
33133         (noce_try_store_flag_constants): Likewise.
33134         (noce_try_store_flag_mask): Likewise.
33135         (noce_try_addcc): Use rev_cond if non-NULL instead of
33136         reversed_comparison_code.
33137         (noce_try_cmove_arith): Likewise.  Formatting fixes.
33138         (noce_try_minmax, noce_try_abs): Clear rev_cond.
33139         (noce_find_if_block): Initialize rev_cond.
33140         (find_cond_trap): Call noce_get_condition with then_bb == trap_bb
33141         instead of false as last argument never attempt to reverse it
33142         afterwards.
33143
33144 2017-02-23  Bin Cheng  <bin.cheng@arm.com>
33145
33146         PR tree-optimization/79663
33147         * tree-predcom.c (combine_chains): Process refs in reverse order
33148         only for ZERO length chains, and add explaining comment.
33149
33150 2017-02-23  Jeff Law  <law@redhat.com>
33151
33152         PR tree-optimization/79578
33153         * tree-ssa-dse.c (clear_bytes_written_by): Use OEP_ADDRESS_OF
33154         in call to operand_equal_p.
33155
33156 2017-01-23  Dominique d'Humieres  <dominiq@lps.ens.fr>
33157
33158         PR target/71017
33159         * config/i386/cpuid.h: Fix another undefined behavior.
33160
33161 2017-02-23  Richard Biener  <rguenther@suse.de>
33162
33163         PR tree-optimization/79683
33164         * tree-vect-stmts.c (vect_analyze_stmt): Do not overwrite
33165         vector types for data-refs.
33166
33167 2017-02-23  Martin Liska  <mliska@suse.cz>
33168
33169         * params.def (PARAM_MIN_NONDEBUG_INSN_UID): Change default to 0.
33170
33171 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
33172
33173         PR middle-end/79665
33174         * internal-fn.c (get_range_pos_neg): Moved to ...
33175         * tree.c (get_range_pos_neg): ... here.  No longer static.
33176         * tree.h (get_range_pos_neg): New prototype.
33177         * expr.c (expand_expr_real_2) <case TRUNC_DIV_EXPR>: If both arguments
33178         are known to be in between 0 and signed maximum inclusive, try to
33179         expand both unsigned and signed divmod and use the cheaper one from
33180         those.
33181
33182 2017-02-22  Jeff Law  <law@redhat.com>
33183
33184         PR tree-optimization/79578
33185         * tree-ssa-dse.c (clear_bytes_written_by): Use operand_equal_p
33186         to compare base operands.
33187
33188 2017-02-22  Segher Boessenkool  <segher@kernel.crashing.org>
33189
33190         PR target/79211
33191         * config/rs6000/rs6000.md (*fsel<SFDF:mode><SFDF2:mode>4): Use
33192         gpc_reg_operand instead of fpr_reg_operand.
33193
33194 2017-02-22  Sameera Deshpande  <sameera.deshpande@imgtec.com>
33195
33196         * config/mips/mips.c (mips_return_in_memory): Force FP
33197         vector types to be returned in memory for o32 ABI.
33198
33199 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
33200
33201         * dwarf2out.c (gen_variable_die): For -gdwarf-5, use DW_TAG_variable
33202         instead of DW_TAG_member for static data member declarations and don't
33203         set no_linkage_name for static inline data members.
33204         (gen_member_die): For -gdwarf-5 don't change DW_TAG_variable
33205         to DW_TAG_member.
33206
33207 2017-02-22  Martin Liska  <mliska@suse.cz>
33208
33209         * doc/invoke.texi: Replace inequality signs with square brackets
33210         for -Wnormalized.
33211
33212 2017-02-22  Matthew Fortune  <matthew.fortune@imgtec.com>
33213
33214         PR target/78660
33215         * lra-constraints.c (simplify_operand_subreg): Handle
33216         WORD_REGISTER_OPERATIONS targets.
33217
33218 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
33219
33220         PR target/70465
33221         * reg-stack.c (emit_swap_insn): Treat (float_extend:?F (mem:?F))
33222         and (const_double:?F) like (mem:?F) for the purpose of fxch %st(1)
33223         elimination by swapping fld*.
33224
33225 2017-02-22  Richard Biener  <rguenther@suse.de>
33226
33227         PR tree-optimization/79673
33228         * tree-ssa-pre.c (compute_avail): Use wide_int_to_tree to
33229         convert the [TARGET_]MEM_REF offset INTEGER_CST, scrapping off
33230         irrelevant address-space qualifiers and avoiding a
33231         ADDR_SPACE_CONVERT_EXPR from fold_convert.
33232
33233 2017-02-22  Richard Biener  <rguenther@suse.de>
33234
33235         PR tree-optimization/79666
33236         * tree-vrp.c (extract_range_from_binary_expr_1): Make sure
33237         to not symbolically negate if that may introduce undefined
33238         overflow.
33239
33240 2017-02-22  Martin Liska  <mliska@suse.cz>
33241
33242         PR lto/79587
33243         * data-streamer-in.c (streamer_read_gcov_count): Remove assert.
33244         * data-streamer-out.c (streamer_write_gcov_count_stream):
33245         Likewise.
33246         * value-prof.c (stream_out_histogram_value): Make assert more
33247         precise based on type of counter.
33248
33249 2017-02-21  Uros Bizjak  <ubizjak@gmail.com>
33250
33251         PR target/79593
33252         * config/i386/i386.md (standard_x87sse_constant_load splitter):
33253         Use nonimmediate_operand instead of memory_operand for operand 1.
33254         (float-extend standard_x87sse_constant_load splitter): Ditto.
33255
33256 2017-02-21  Jeff Law  <law@redhat.com>
33257
33258         PR tree-optimization/79621
33259         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Ignore
33260         blocks with edges to themselves.
33261
33262 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
33263
33264         PR target/79633
33265         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
33266         is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
33267         Use gimple_call_builtin_p.
33268
33269         PR target/79570
33270         * sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
33271         on temporarily removed DEBUG_INSNs.
33272
33273         PR tree-optimization/79649
33274         * tree-loop-distribution.c (classify_partition): Give up on
33275         non-generic address space loads/stores.
33276
33277 2017-02-21  Aldy Hernandez  <aldyh@redhat.com>
33278
33279         * doc/loop.texi (Loop manipulation): Remove nonexistent
33280         tree_ssa_loop_version from the documentation.
33281         * cfgloopmanip.c (loop_version): Document CONDITION_BB argument.
33282
33283 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
33284
33285         PR target/79494
33286         * config/i386/i386.c (ix86_expand_split_stack_prologue): Call
33287         make_reg_eh_region_note_nothrow_nononlocal on call_insn.
33288         * config/rs6000/rs6000.c: Include except.h.
33289         (rs6000_expand_split_stack_prologue): Call
33290         make_reg_eh_region_note_nothrow_nononlocal on the call insn.
33291
33292 2017-02-21  Martin Jambor  <mjambor@suse.cz>
33293
33294         PR lto/79579
33295         * ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
33296         have been analyzed.
33297
33298 2017-02-21  Martin Jambor  <mjambor@suse.cz>
33299
33300         * common.opt (-fipa-cp-alignment): Mark as ignored and preserved
33301         for backward compatibility only.
33302         * doc/invoke.texi (Option Summary): Remove all references to
33303         -fipa-cp-alignment.
33304
33305 2017-02-21  Matthew Fortune  <matthew.fortune@imgtec.com>
33306
33307         PR target/78660
33308         Revert:
33309         2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
33310
33311         * lra-constraints.c (curr_insn_transform): Handle
33312         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
33313
33314 2017-02-21  Martin Liska  <mliska@suse.cz>
33315
33316         * config/i386/i386.opt: Replace -masm-dialect with -masm.
33317
33318 2017-02-21  Thomas Schwinge  <thomas@codesourcery.com>
33319
33320         PR translation/79638
33321         * config/nvptx/nvptx.c (ENTRY_TEMPLATE): Single out "%ntid.y".
33322
33323 2017-02-21  Eric Botcazou  <ebotcazou@adacore.com>
33324
33325         PR ada/67205
33326         * config/arm/arm.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define.
33327         (arm_function_ok_for_sibcall): Return false for an indirect call by
33328         descriptor if all the argument registers are used.
33329         (arm_relayout_function): Use FUNCTION_ALIGNMENT macro to adjust the
33330         alignment of the function.
33331
33332 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
33333
33334         PR tree-optimization/61441
33335         * simplify-rtx.c (simplify_const_unary_operation): For
33336         -fsignaling-nans and sNaN operand, return NULL_RTX rather than
33337         the sNaN unmodified.
33338
33339 2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
33340
33341         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
33342         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
33343         instead of SYSTEM_HEADER_DIR.
33344
33345 2017-02-20  Gerald Pfeifer  <gerald@pfeifer.com>
33346             Martin LiÅ¡ka  <mliska@suse.cz>
33347
33348         * doc/invoke.texi (use-after-scope-direct-emission-threshold):
33349         Fix typos and grammar, use active voice, and clarify.
33350
33351 2017-02-20  Marek Polacek  <polacek@redhat.com>
33352
33353         PR middle-end/79537
33354         * gimplify.c (gimplify_expr): Handle unused *&&L;.
33355
33356         PR sanitizer/79558
33357         * ubsan.c (ubsan_type_descriptor): Check if TYPE_MAX_VALUE is null.
33358
33359 2017-02-20  Jakub Jelinek  <jakub@redhat.com>
33360
33361         PR target/79568
33362         * config/i386/i386.c (ix86_expand_builtin): Handle
33363         OPTION_MASK_ISA_AVX512VL and OPTION_MASK_ISA_64BIT in
33364         ix86_builtins_isa[fcode].isa as a requirement of those
33365         flags and any other flag in the bitmask.
33366         (ix86_init_mmx_sse_builtins): Use 0 instead of
33367         ~OPTION_MASK_ISA_64BIT as mask.
33368         * config/i386/i386-builtin.def (__builtin_ia32_rdtsc,
33369         __builtin_ia32_rdtscp, __builtin_ia32_pause, __builtin_ia32_bsrsi,
33370         __builtin_ia32_rdpmc, __builtin_ia32_rolqi, __builtin_ia32_rolhi,
33371         __builtin_ia32_rorqi, __builtin_ia32_rorhi): Likewise.
33372
33373 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
33374
33375         PR target/78012
33376         * lra-constraints.c (split_reg): Check requested split mode
33377         is supported by the register.
33378
33379 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
33380
33381         * lra-constraints.c (simplify_operand_subreg): Remove early
33382         return false.
33383
33384 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
33385
33386         PR target/78660
33387         * lra-constraints.c (curr_insn_transform): Tighten condition
33388         for converting SUBREG reloads from OP_OUT to OP_INOUT.
33389
33390 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
33391
33392         PR target/78660
33393         * lra-constraints.c (curr_insn_transform): Handle
33394         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
33395
33396 2017-02-19  Uros Bizjak  <ubizjak@gmail.com>
33397
33398         Revert:
33399         2016-05-30  Uros Bizjak  <ubizjak@gmail.com>
33400
33401         * config/i386/sync.md (mfence_nosse): Use "lock orl $0, -4(%esp)".
33402
33403 2017-02-19  Jonathan Wakely  <jwakely@redhat.com>
33404
33405         PR c++/69523
33406         * doc/invoke.texi (C++ Dialect Options) [-Wliteral-suffix]: Update
33407         description.
33408
33409 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
33410
33411         * gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format
33412         for FMA_EXPR.
33413
33414 2017-02-18  Jakub Jelinek  <jakub@redhat.com>
33415
33416         * final.c (last_columnnum, override_columnnum): New variables.
33417         (final_start_function): Set last_columnnum, pass it to begin_prologue
33418         hook and pass 0 to dwarf2out_begin_prologue.
33419         (final_scan_insn): Update override_columnnum.  Pass last_columnnum
33420         to source_line debug hook.
33421         (notice_source_line): Compute last_columnnum and for debug_column_info
33422         return true on column changes.
33423         * debug.h (struct gcc_debug_hooks): Add column argument to
33424         source_line and begin_prologue hooks.
33425         (debug_nothing_int_charstar_int_bool): Remove prototype.
33426         (debug_nothing_int_int_charstar,
33427         debug_nothing_int_int_charstar_int_bool): New prototypes.
33428         (dwarf2out_begin_prologue): Add column argument.
33429         * debug.c (do_nothing_debug_hooks): Adjust source_line and
33430         begin_prologue hooks.
33431         (debug_nothing_int_charstar_int_bool): Remove.
33432         (debug_nothing_int_int_charstar,
33433         debug_nothing_int_int_charstar_int_bool): New functions.
33434         * dwarf2out.c (dwarf2out_begin_prologue): Add column argument, pass it
33435         through to dwarf2out_source_line.
33436         (dwarf2_lineno_debug_hooks): Adjust begin_prologue hook.
33437         (dwarf2out_source_line): Add column argument, emit it if requested.
33438         * sdbout.c (sdbout_source_line, sdbout_begin_prologue): Add column
33439         arguments.
33440         * xcoffout.h (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
33441         * xcoffout.c (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
33442         * vmsdbgout.c (vmsdbgout_begin_prologue): Add column argument, pass it
33443         through to dwarf2out_begin_prologue.
33444         (vmsdbgout_source_line): Add column argument, pass it through to
33445         dwarf2out_source_line.
33446         * dbxout.c (dbxout_begin_prologue): Add column argument, adjust
33447         dbxout_source_line caller.
33448         (dbxout_source_line): Add column argument.
33449
33450         * common.opt (gno-column-info, gcolumn-info): New options.
33451         * dwarf2out.c (dwarf2_lineno_debug_hooks): Formatting fix.
33452         (check_die): Also test for multiple DW_AT_decl_column attributes.
33453         (add_src_coords_attributes, dwarf2out_imported_module_or_decl_1): Add
33454         DW_AT_decl_column if requested.
33455         (gen_subprogram_die): Compare and/or add also DW_AT_decl_column
33456         if requested.
33457         (gen_variable_die): Likewise.
33458         (add_call_src_coords_attributes): Add DW_AT_call_column if requested.
33459         * doc/invoke.texi (-gcolumn-info, -gno-column-info): Document.
33460
33461         PR target/79569
33462         * config/i386/i386.opt (m3dnowa): Replace Undocumented with Report.
33463         * common/config/i386/i386-common.c (OPTION_MASK_ISA_3DNOW_A_SET): Define.
33464         (ix86_handle_option): Handle OPT_m3dnowa.
33465         * doc/invoke.texi (-m3dnowa): Document.
33466         * doc/extend.texi (__builtin_ia32_pmulhuw, __builtin_ia32_pf2iw): Use
33467         -m3dnowa instead of -m3dnow -march=athlon.
33468
33469         PR target/79559
33470         * config/i386/i386.c (ix86_print_operand): Use output_operand_lossage
33471         instead of gcc_assert for K, r and R code checks.  Formatting fixes.
33472
33473 2017-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33474
33475         PR target/79261
33476         * config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Add
33477         support for CODE_FOR_vsx_xxpermdi_v2d[fi]_be.
33478         * config/rs6000/rs6000.md (reload_gpr_from_vsx<mode>): Call
33479         generator for vsx_xxpermdi_<mode>_be.
33480         * config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Remove logic to
33481         force big-endian semantics.
33482         (vsx_xxpermdi_<mode>_be): New define_expand with same
33483         implementation as previous version of vsx_xxpermdi_<mode>.
33484
33485 2017-02-17  Jakub Jelinek  <jakub@redhat.com>
33486
33487         PR tree-optimization/79327
33488         * gimple-ssa-sprintf.c (format_integer): Remove likely_adjust
33489         variable, its initialization and use.
33490
33491 2017-02-17  Julia Koval  <julia.koval@intel.com>
33492
33493         * common/config/i386/i386-common.c (OPTION_MASK_ISA_RDPID_SET): New.
33494         (OPTION_MASK_ISA_PKU_UNSET): New.
33495         (ix86_handle_option): Handle -mrdpid.
33496         * config/i386/cpuid.h (bit_RDPID): New.
33497         * config/i386/driver-i386.c (host_detect_local_cpu):
33498         Detect RDPID feature.
33499         * config/i386/i386-builtin.def (__builtin_ia32_rdpid): New.
33500         * config/i386/i386-c.c (ix86_target_macros_internal):
33501         Handle RDPID flag.
33502         * config/i386/i386.c (ix86_target_string): Add -mrdpid to isa2_opts.
33503         (ix86_valid_target_attribute_inner_p): Add "rdpid".
33504         (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
33505         * config/i386/i386.h (TARGET_RDPID, TARGET_RDPID_P): New.
33506         * config/i386/i386.md (define_insn "rdpid"): New.
33507         * config/i386/i386.opt Add -mrdpid.
33508         * config/i386/immintrin.h (_rdpid_u32): New.
33509
33510 2017-02-17  Vladimir Makarov  <vmakarov@redhat.com>
33511
33512         PR rtl-optimization/79541
33513         * lra-constraints.c (curr_insn_transform): Remove wrong asm insn
33514         instead of transforming it into USE.
33515
33516 2017-02-17  Segher Boessenkool  <segher@kernel.crashing.org>
33517
33518         * config/rs6000/rs6000.md (extendsfdf2): Remove default arguments.
33519         If HONOR_SNANS (SFmode) force the input to a register.
33520         (*extendsfdf2_fpr): Add !HONOR_SNANS (SFmode) condition.
33521         (*extendsfdf2_snan): New pattern, used when using SNaNs; it generates
33522         an frsp or similar insn.
33523
33524 2017-02-17  Martin Liska  <mliska@suse.cz>
33525
33526         PR rtl-optimization/79577
33527         * params.def (selsched-max-sched-times): Increase minimum to 1.
33528
33529 2017-02-17  Martin Liska  <mliska@suse.cz>
33530
33531         PR rtl-optimization/79574
33532         * gcse.c (want_to_gcse_p): Prevent integer overflow.
33533
33534 2017-02-17  Martin Liska  <mliska@suse.cz>
33535
33536         PR tree-optimization/79529
33537         * tree-ssa-loop-unswitch.c (is_maybe_undefined): Use
33538         ssa_defined_default_def_p to handle cases which are implicitly
33539         defined.
33540         * tree-ssa.c (ssa_defined_default_def_p): New function.
33541         (ssa_undefined_value_p): Use ssa_defined_default_def_p to handle cases
33542         which are implicitly defined.
33543         * tree-ssa.h (ssa_defined_default_def_p): Declare.
33544
33545 2017-02-17  Richard Biener  <rguenther@suse.de>
33546
33547         PR middle-end/79576
33548         * params.def (max-ssa-name-query-depth): Limit to 10.
33549
33550 2017-02-17  Richard Biener  <rguenther@suse.de>
33551
33552         PR tree-optimization/79552
33553         * tree-ssa-structalias.c (visit_loadstore): Properly verify
33554         default defs.
33555
33556 2017-02-17  Richard Biener  <rguenther@suse.de>
33557
33558         PR bootstrap/79567
33559         * genmatch.c (output_line_directive): Handle DIR_SEPARATOR_2.
33560
33561 2017-02-17  Marek Polacek  <polacek@redhat.com>
33562
33563         PR middle-end/79536
33564         * fold-const.c (fold_negate_expr_1): Renamed from fold_negate_expr.
33565         (fold_negate_expr): New wrapper.
33566
33567 2017-02-16  Sandra Loosemore  <sandra@codesourcery.com>
33568
33569         * doc/invoke.texi (C++ Dialect Options) [-Wno-non-template-friend]: 
33570         Correct terminology and de-emphasize pre-standard behavior.
33571
33572 2017-02-16  Alan Modra  <amodra@gmail.com>
33573
33574         PR rtl-optimization/79286
33575         * ira.c (def_dominates_uses): New function.
33576         (update_equiv_regs): Don't create an equivalence for insns that
33577         may trap where the register def does not dominate the use.
33578
33579 2017-02-16  Vladimir Makarov  <vmakarov@redhat.com>
33580
33581         PR rtl-optimization/78127
33582         * lra.c (lra): Call lra_eliminate before finish the loop after
33583         lra_constraint.
33584
33585 2017-02-16  Richard Biener  <rguenther@suse.de>
33586
33587         * graphite.h: Do not include isl/isl_val_gmp.h, instead include
33588         isl/isl_val.h.
33589         * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
33590         (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
33591         * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
33592         (isl_val_int_from_wi): New function.
33593         (extract_affine_gmp): Rename to ...
33594         (extract_affine_wi): ... this, take a widest_int.
33595         (extract_affine_int): Just wrap extract_affine_wi.
33596         (add_param_constraints): Use isl_val_int_from_wi.
33597         (add_loop_constraints): Likewise, and extract_affine_wi.
33598
33599 2017-02-15  Jeff Law  <law@redhat.com>
33600
33601         PR middle-end/79521
33602         * ira-costs.c (scan_one_insn): Check have_regs_of_mode before calling
33603         ira_init_register_move_cost_if_necessary.
33604
33605 2017-02-15  Martin Sebor  <msebor@redhat.com>
33606
33607         PR middle-end/32003
33608         * doc/invoke.texi (-fdump-final-insns): Replace option accidentally
33609         removed in a prior commit.
33610
33611 2017-02-15  Bin Cheng  <bin.cheng@arm.com>
33612
33613         PR tree-optimization/79347
33614         * tree-vect-loop-manip.c (vect_do_peeling): Maintain profile
33615         counters during peeling.
33616
33617 2017-02-15  Thomas Schwinge  <thomas@codesourcery.com>
33618
33619         * Makefile.in (site.exp): Remove "set ISLVER".
33620
33621 2017-02-15  Jakub Jelinek  <jakub@redhat.com>
33622
33623         PR target/79487
33624         * real.c (real_from_integer): Call real_convert even for decimal.
33625
33626 2017-02-15  Dominik Vogt  <vogt@linux.vnet.ibm.com>
33627
33628         PR target/79421
33629         * config/s390/s390.c: define TARGET_CUSTOM_FUNCTION_DESCRIPTORS.
33630
33631 2017-02-14  Andrew Pinski  <apinski@cavium.com>
33632
33633         * config/aarch64/aarch64-cores.def (thunderx2t99): Move to under 'C"
33634         cores and change the partno/implementer to be correct.
33635         (thunderx2t99p1): New core which replaces thunderx2t99 and still has
33636         the 'B" as the implementer.
33637         * config/aarch64/aarch64-tune.md: Regenerate.
33638
33639 2017-02-14  Carl Love  <cel@us.ibm.com>
33640
33641         * config/rs6000/rs6000.c: Add case statement entry to make the
33642         xvcvuxdsp built-in argument unsigned.
33643         * config/rs6000/vsx.md: Fix the source and return operand types so they
33644         match the instruction definitions from the ISA document.  Fix typo
33645         in the instruction generation for the (define_insn "vsx_xvcvuxdsp"
33646         statement.
33647
33648 2017-02-14  Vladimir Makarov  <vmakarov@redhat.com>
33649
33650         PR target/79282
33651         * lra-int.h (struct lra_operand_data, struct lra_insn_reg): Add
33652         member early_clobber_alts.
33653         * lra-lives.c (reg_early_clobber_p): New.
33654         (process_bb_lives): Use it.
33655         * lra.c (new_insn_reg): New arg early_clobber_alts.  Use it.
33656         (debug_operand_data): Initialize early_clobber_alts.
33657         (setup_operand_alternative): Set up early_clobber_alts.
33658         (collect_non_operand_hard_regs): Ditto.  Pass early clobber
33659         alternatives to new_insn_reg.
33660         (add_regs_to_insn_regno_info): Add arg early_clobber_alts.  Use
33661         it.
33662         (lra_update_insn_regno_info): Pass the new arg.
33663
33664 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
33665
33666         PR middle-end/79505
33667         * omp-offload.c (free_oacc_loop): Release loop->ifns vector.
33668         (new_oacc_loop_raw): Don't clear already cleared fields.
33669
33670         PR target/79481
33671         * config/i386/avx512pfintrin.h (_mm512_prefetch_i32gather_pd,
33672         _mm512_prefetch_i32gather_ps, _mm512_prefetch_i64gather_pd,
33673         _mm512_prefetch_i64gather_ps): New inline functions and macros.
33674
33675 2017-02-14  Uros Bizjak  <ubizjak@gmail.com>
33676
33677         PR target/79495
33678         * config/i386/i386.md (*movxf_internal): Add (o,rC) alternative.
33679
33680 2017-02-14  H.J. Lu  <hongjiu.lu@intel.com>
33681
33682         PR target/79498
33683         * config/i386/i386.c (timode_scalar_chain::convert_insn): Insert
33684         the extra instruction to the right place to store 128-bit constant
33685         when needed.
33686
33687 2017-02-14  Martin Sebor  <msebor@redhat.com>
33688
33689         PR middle-end/79448
33690         * gimple-ssa-sprintf.c (format_directive): Avoid issuing INT_MAX
33691           warning for strings of unknown length.
33692
33693 2017-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
33694
33695         * config.gcc (supported_defaults) [powerpc*-*-*]: Update.
33696
33697 2017-02-14  Jeff Law  <law@redhat.com>
33698
33699         PR target/79404
33700         * ira-costs.c (scan_one_insn): Initialize register move costs
33701         for pseudos seen in USE/CLOBBER insns.
33702
33703         PR tree-optimization/79095
33704         * tree-vrp.c (extract_range_from_binary_expr_1): For EXACT_DIV_EXPR,
33705         if the numerator has the range ~[0,0] make the resultant range ~[0,0].
33706         (extract_range_from_binary_expr): For MINUS_EXPR with no derived range,
33707         if the operands are known to be not equal, then the resulting range
33708         is ~[0,0].
33709         (intersect_ranges): If the new range is ~[0,0] and the old range is
33710         wide, then prefer ~[0,0].
33711         * tree-vrp.c (overflow_comparison_p_1): New function.
33712         (overflow_comparison_p): New function.
33713         * tree-vrp.c (register_edge_assert_for_2): Register additional asserts
33714         if NAME is used in an overflow test.
33715         (vrp_evaluate_conditional_warnv_with_ops): If the ops represent an
33716         overflow check that can be expressed as an equality test, then adjust
33717         ops to be that equality test.
33718
33719 2017-02-14  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33720
33721         * config/s390/s390-builtin-types.def: Remove flags argument.
33722         * config/s390/s390.c (s390_init_builtins): Likewise.
33723
33724 2017-02-14  Martin Liska  <mliska@suse.cz>
33725
33726         * tree-ssa-loop-unswitch.c (hoist_guard): Release get_loop_body
33727         vector.  Fix trailing white spaces.
33728
33729 2017-02-14  James Greenhalgh  <james.greenhalgh@arm.com>
33730
33731         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Handle
33732         HFmode.
33733
33734 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
33735
33736         PR rtl-optimization/68664
33737         * config/arm/arm.c (arm_sched_can_speculate_insn):
33738         New function.  Declare prototype.
33739         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
33740
33741 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
33742
33743         PR rtl-optimization/68664
33744         * config/aarch64/aarch64.c (aarch64_sched_can_speculate_insn):
33745         New function.
33746         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
33747
33748 2017-02-14  Amit Pawar  <amit.pawar@amd.com>
33749
33750         * config/i386/i386.c (znver1_cost): Fix the alignment for function and
33751         max skip bytes for function, loop and jump.
33752
33753 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
33754
33755         * gimple-pretty-print.c (dump_unary_rhs): Adjust dump format for
33756         ABS_EXPR for gimple dump.
33757
33758 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
33759
33760         PR target/79462
33761         * config/sh/sh.c (expand_cbranchdi4): Don't clear operands[4].
33762
33763         PR tree-optimization/79408
33764         * tree-vrp.c (simplify_div_or_mod_using_ranges): Handle also the
33765         case when on TRUNC_MOD_EXPR op0 is INTEGER_CST.
33766         (simplify_stmt_using_ranges): Call simplify_div_or_mod_using_ranges
33767         also if rhs1 is INTEGER_CST.
33768
33769 2017-02-14  Richard Biener  <rguenther@suse.de>
33770
33771         PR middle-end/79432
33772         * tree-into-ssa.c (insert_phi_nodes): When the function can
33773         have abnormal edges rewrite SSA names with broken use-def
33774         dominance out of SSA and register them for PHI insertion.
33775
33776 2017-02-13  Martin Sebor  <msebor@redhat.com>
33777
33778         PR middle-end/79496
33779         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call): Avoid
33780         clearing info.nowrite flag when snprintf size argument is a range.
33781
33782 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
33783
33784         * cprop.c (cprop_jump): Add missing space in string literal.
33785         * tree-ssa-structalias.c (rewrite_constraints): Likewise.
33786         (get_constraint_for_component_ref): Likewise.
33787         * df-core.c (df_worklist_dataflow_doublequeue): Likewise.
33788         * tree-outof-ssa.c (insert_partition_copy_on_edge): Likewise.
33789         * lra-constraints.c (process_alt_operands): Likewise.
33790         * ipa-inline.c (inline_small_functions): Likewise.
33791         * tree-ssa-sccvn.c (visit_reference_op_store): Likewise.
33792         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
33793         * trans-mem.c (diagnose_tm_1_op): Likewise.
33794         * omp-grid.c (grid_find_single_omp_among_assignments): Likewise.
33795         (grid_parallel_clauses_gridifiable): Likewise.
33796
33797         * config/nvptx/mkoffload.c (process): Add space in between
33798         , and %d.
33799
33800         * config/i386/i386.h (REG_CLASS_NAMES): Add , in between
33801         "MOD4_SSE_REGS" and "ALL_REGS".
33802
33803         * spellcheck.c (test_data): Add , in between "foo" and "food".
33804
33805 2017-02-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
33806
33807         PR target/79449
33808         * config/rs6000/rs6000.c (expand_block_compare): Make sure runtime
33809         boundary crossing check and subsequent code generation agree.
33810
33811 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
33812
33813         * config/aarch64/aarch64.c (has_memory_op): Delete.
33814         (aarch64_madd_needs_nop): Use contains_mem_rtx_p instead of
33815         has_memory_op.
33816
33817 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
33818
33819         PR rtl-optimization/79388
33820         PR rtl-optimization/79450
33821         * combine.c (distribute_notes): When removing TEM_INSN for which
33822         corresponding dest has last value recorded, invalidate that last
33823         value.
33824
33825 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
33826
33827         * config/arm/arm.c (arm_print_tune_info): Use ASM_COMMENT_START instead
33828         of explicit '@'.  Add missing assembly comment marker on branch costs
33829         printout.
33830
33831 2017-02-13  Nathan Sidwell  <nathan@acm.org>
33832
33833         * gengtype-lex.l (<in_struct>): Add '/'.
33834
33835 2017-02-13  Martin Liska  <mliska@suse.cz>
33836
33837         PR c/79471
33838         * calls.c (expand_call): Replace XALLOCAVEC with XCNEWVEC.
33839
33840 2017-02-13  Richard Biener  <rguenther@suse.de>
33841
33842         * configure.ac (HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS):
33843         Remove.
33844         * configure: Re-generate.
33845         * config.in: Likewise.
33846         * graphite-dependences.c: Simplify as if
33847         HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS was defined.
33848         * graphite-isl-ast-to-gimple.c: Likewise.
33849         * graphite-optimize-isl.c: Likewise.
33850         * graphite-poly.c: Likewise.
33851         * graphite-sese-to-poly.c: Likewise.
33852         * graphite.h: Likewise.
33853         * toplev.c: Include isl/version.h and use isl_version () for
33854         printing the ISL version.
33855         * doc/install.texi: Update ISL requirement.
33856
33857 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
33858
33859         * doc/standards.texi (Standards): Update reference to
33860         Objective-C 2.0.
33861
33862 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
33863
33864         * doc/extend.texi (Named Address Spaces): sourceware.org now
33865         defaults to https.
33866         * doc/install.texi (Binaries): Ditto.
33867         (Specific): Ditto.
33868
33869 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
33870
33871         * doc/cpp.texi: Replace "stringify"/"stringification" with C
33872         standard terminology "stringize"/"stringizing" throughout.
33873         * doc/cppinternals.texi: Likewise.
33874
33875 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
33876
33877         * doc/extend.texi: Fix some spelling mistakes and typos.
33878         * doc/invoke.texi: Likewise.
33879
33880 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
33881
33882         PR ipa/79224
33883         * params.def (inline-min-speedup) Change from 10 to 8.
33884
33885 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
33886
33887         * doc/invoke.texi (fopenmp): Bump OpenMP version from 4.0 to
33888         4.5.
33889
33890 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
33891
33892         PR ipa/79224
33893         * ipa-inline-analysis.c (get_minimal_bb): New function.
33894         (record_modified): Use it.
33895         (remap_edge_change_prob): Handle also ancestor functions.
33896
33897 2017-02-11  Gerald Pfeifer  <gerald@pfeifer.com>
33898
33899         * doc/contrib.texi (Contributors): Remove broken link into
33900         the Mauve CVS repository.
33901
33902 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
33903
33904         PR middle-end/79454
33905         * internal-fn.c (expand_vector_ubsan_overflow): Use piece-wise
33906         result computation whenever lhs doesn't have vector mode, not
33907         just when it has BLKmode.
33908
33909 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
33910
33911         * doc/makefile.texi (profiledbootstrap): Refer to the
33912         installation instructions only in textual form.
33913
33914 2017-02-10  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
33915
33916         PR target/79295
33917         * config/rs6000/altivec.md (bcd<bcd_add_sub>): Fix constraints.
33918
33919 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
33920
33921         * doc/install.texi (Specific): Use https for blackfin.uclinux.org.
33922         (Specific): Update mingw-w64 reference.
33923         (Binaries): Ditto.
33924         (Specific): Remove broken link to Renesas RX processor.
33925
33926 2017-02-10  Richard Biener  <rguenther@suse.de>
33927
33928         * toplev.c (process_options): Do not mention obsolete graphite
33929         options when printing sorry message about missing graphite support.
33930         Mention -floop-nest-optimize.
33931
33932 2017-02-10  Christophe Lyon  <christophe.lyon@linaro.org>
33933
33934         * config/aarch64/arm_neon.h (vtst_p8): Rewrite without asm.
33935         (vtst_p16): Likewise.
33936         (vtstq_p8): Likewise.
33937         (vtstq_p16): Likewise.
33938         (vtst_p64): New.
33939         (vtstq_p64): Likewise.
33940         * config/arm/arm_neon.h (vgetq_lane_p64): New.
33941         (vset_lane_p64): New.
33942         (vsetq_lane_p64): New.
33943
33944 2017-02-10  Jakub Jelinek  <jakub@redhat.com>
33945
33946         PR tree-optimization/79411
33947         * tree-ssa-reassoc.c (is_reassociable_op): Return false if
33948         stmt operands are SSA_NAMEs used in abnormal phis.
33949         (can_reassociate_p): Return false if op is SSA_NAME used in abnormal
33950         phis.
33951
33952 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
33953
33954         PR ipa/70795
33955         * cgraphunit.c (cgraph_node::add_new_function): Set externally_visible
33956         flag if needed.
33957
33958 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
33959
33960         * tree-ssa-loop-unswitch.c (hoist_guard): Update profile.
33961
33962 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
33963
33964         * omp-offload.c (oacc_loop_auto_partitions): Use || instead of |
33965         to avoid warning.
33966
33967         PR c/79413
33968         * gimplify.h (is_gimple_sizepos): Only test for INTEGER_CST constants,
33969         not arbitrary TREE_CONSTANT.
33970
33971         PR c/79431
33972         * gimplify.c (gimplify_adjust_omp_clauses): Ignore
33973         "omp declare target link" attribute unless is_global_var.
33974         * omp-offload.c (find_link_var_op): Likewise.
33975
33976 2017-02-09  Nathan Sidwell  <nathan@codesourcery.com>
33977             Chung-Lin Tang  <cltang@codesourcery.com>
33978
33979         * gimplify.c (gimplify_scan_omp_clauses): No special handling for
33980         OMP_CLAUSE_TILE.
33981         (gimplify_adjust_omp_clauses): Don't delete TILE.
33982         (gimplify_omp_for): Deal with TILE.
33983         * internal-fn.c (expand_GOACC_TILE): New function.
33984         * internal-fn.def (GOACC_DIM_POS): Comment may be overly conservative.
33985         (GOACC_TILE): New.
33986         * omp-expand.c (struct oacc_collapse): Add tile and outer fields.
33987         (expand_oacc_collapse_init): Add LOC paramter.  Initialize tile
33988         element fields.
33989         (expand_oacc_collapse_vars): Add INNER parm, adjust for tiling,
33990         avoid DIV for outermost collapse var.
33991         (expand_oacc_for): Insert tile element loop as needed.  Adjust.
33992         Remove out of date comments, fix whitespace.
33993         * omp-general.c (omp_extract_for_data): Deal with tiling.
33994         * omp-general.h (enum oacc_loop_flags): Add OLF_TILE flag,
33995         adjust OLF_DIM_BASE value.
33996         (struct omp_for_data): Add tiling field.
33997         * omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_TILE.
33998         (lower_oacc_head_mark): Add OLF_TILE as appropriate.  Ensure 2 levels
33999         for auto loops.  Remove default auto determining, moved to
34000         oacc_loop_fixed_partitions.
34001         * omp-offload.c (struct oacc_loop): Change 'ifns' to vector of call
34002         stmts, add e_mask field.
34003         (oacc_dim_call): New function, abstracted out from oacc_thread_numbers.
34004         (oacc_thread_numbers): Use oacc_dim_call.
34005         (oacc_xform_tile): New.
34006         (new_oacc_loop_raw): Initialize e_mask, adjust for ifns vector.
34007         (finish_oacc_loop): Adjust for ifns vector.
34008         (oacc_loop_discover_walk): Append loop abstraction sites to list,
34009         add case for GOACC_TILE fns.
34010         (oacc_loop_xform_loop): Delete.
34011         (oacc_loop_process): Iterate over call list directly, and add
34012         handling for GOACC_TILE fns.
34013         (oacc_loop_fixed_partitions): Determine default auto, deal with TILE,
34014         dump partitioning.
34015         (oacc_loop_auto_partitions): Add outer_assign parm. Assign all but
34016         vector partitioning to outer loops.  Assign 2 partitions to loops
34017         when available. Add TILE handling.
34018         (oacc_loop_partition): Adjust oacc_loop_auto_partitions call.
34019         (execite_oacc_device_lower): Process GOACC_TILE fns,
34020         ignore unknown specs.
34021         * tree-nested.c (convert_nonlocal_omp_clauses): Allow OMP_CLAUSE_TILE.
34022         * tree.c (omp_clause_num_ops): Adjust TILE ops.
34023         * tree.h (OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_COUNT): New.
34024
34025 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
34026
34027         * configure.ac (ACX_BUGURL): Update.
34028         * configure: Regenerate.
34029
34030 2017-02-09  Richard Biener  <rguenther@suse.de>
34031
34032         PR tree-optimization/69823
34033         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
34034         Properly enumerate all BBs in the region.  Use auto_vec/auto_bitmap.
34035
34036 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
34037
34038         * config/arc/arc-c.def: Add __NPS400__ definition.
34039         * config/arc/arc.h (CPP_SPEC): Don't define __NPS400__ here.
34040         (TARGET_NPS400): Define.
34041
34042 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
34043
34044         * config/arc/arc-arch.h (arc_arch_t): Move unchanged to earlier in
34045         file.
34046         (arc_cpu_t): Change base_architecture field, arch, to a arc_arc_t
34047         pointer, arch_info.
34048         (arc_cpu_types): Fill the arch_info field with a pointer into the
34049         arc_arch_types table.
34050         (arc_selected_cpu): Declare.
34051         * config/arc/arc.c (arc_selected_cpu): Make global.
34052         (arc_selected_arch): Delete.
34053         (arc_base_cpu): Delete.
34054         (arc_override_options): Remove references to deleted variables,
34055         update access to arch information.
34056         (ARC_OPT): Update access to arch information.
34057         (ARC_OPTX): Likewise.
34058         * config/arc/arc.h (arc_base_cpu): Remove declaration.
34059         (TARGET_ARC600): Update access to arch information.
34060         (TARGET_ARC601): Likewise.
34061         (TARGET_ARC700): Likewise.
34062         (TARGET_EM): Likewise.
34063         (TARGET_HS): Likewise.
34064         * config/arc/driver-arc.c (arc_cpu_to_as): Update access to arch
34065         information.
34066
34067 2017-02-08  Pat Haugen  <pthaugen@us.ibm.com>
34068
34069         PR target/78604
34070         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Invert
34071         condition/operands for integer GE/LE/GEU/LEU operations.
34072
34073 2017-02-08  Segher Boessenkool  <segher@kernel.crashing.org>
34074
34075         PR translation/79397
34076         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Fix spelling
34077         of AltiVec.
34078
34079 2017-02-08  Martin Jambor  <mjambor@suse.cz>
34080
34081         PR ipa/79375
34082         * ipa-prop.c (ipa_alloc_node_params): Make static, return bool
34083         whether allocation happened.
34084         (ipa_initialize_node_params): Do not call ipa_alloc_node_params if
34085         nothing was allocated.
34086
34087 2017-02-08  Jakub Jelinek  <jakub@redhat.com>
34088
34089         PR tree-optimization/79408
34090         * tree-vrp.c (simplify_div_or_mod_using_ranges): If op1 is not
34091         constant, but SSA_NAME with a known integer range, use the minimum
34092         of that range instead of op1 to determine if modulo can be replaced
34093         with its first operand.
34094
34095 2016-02-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
34096
34097         * config/riscv/riscv.c (riscv_build_integer_1): Avoid use of INT16_MAX.
34098
34099 2017-02-08  Richard Biener  <rguenther@suse.de>
34100
34101         PR tree-optimization/71824
34102         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
34103         Check all loops contained in the merged region.
34104
34105 2017-02-07  Andrew Pinski  <apinski@cavium.com>
34106
34107         * config/aarch64/aarch64.md (popcount<mode>2): New pattern.
34108
34109 2017-02-07  Andrew Pinski  <apinski@cavium.com>
34110
34111         * config/aarch64/aarch64-cores.def (thunderx): Disable LSE.
34112         (thunderxt88): Likewise.
34113         (thunderxt81): Disable LSE and change v8.1 to v8.
34114         (thunderxt83): Likewise.
34115
34116 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
34117             Richard Biener  <rguenther@suse.de>
34118
34119         PR middle-end/79399
34120         * ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
34121         type from int to size_t.
34122         * ira-costs.c (struct_costs_size): Change type from int to size_t.
34123
34124 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
34125
34126         PR rtl-optimization/79386
34127         * cprop.c (bypass_conditional_jumps): Initialize
34128         bypass_last_basic_block already before splitting bbs after
34129         unconditional traps...
34130         (bypass_conditional_jumps): ... rather than here.
34131
34132         PR target/79299
34133         * config/i386/sse.md (xtg_mode, gatherq_mode): New mode attrs.
34134         (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2,
34135         *avx512f_gatherdi<mode>, *avx512f_gatherdi<mode>_2): Use them,
34136         fix -masm=intel patterns.
34137
34138 2017-02-07  Richard Biener  <rguenther@suse.de>
34139
34140         PR tree-optimization/79256
34141         PR middle-end/79278
34142         * builtins.c (get_object_alignment_2): Use min_align_of_type
34143         to extract alignment for MEM_REFs to honor BIGGEST_FIELD_ALIGNMENT
34144         and ADJUST_FIELD_ALIGN.
34145
34146         * doc/tm.texi.in (ADJUST_FIELD_ALIGN): Adjust to take additional
34147         type parameter.
34148         * doc/tm.texi: Regenerate.
34149         * stor-layout.c (layout_decl): Adjust.
34150         (update_alignment_for_field): Likewise.
34151         (place_field): Likewise.
34152         (min_align_of_type): Likewise.
34153         * config/arc/arc.h (ADJUST_FIELD_ALIGN): Adjust.
34154         * config/epiphany/epiphany.h (ADJUST_FIELD_ALIGN): Likewise.
34155         * config/epiphany/epiphany.c (epiphany_adjust_field_align): Likewise.
34156         * config/frv/frv.h (ADJUST_FIELD_ALIGN): Likewise.
34157         * config/frv/frv.c (frv_adjust_field_align): Likewise.
34158         * config/i386/i386.h (ADJUST_FIELD_ALIGN): Likewise.
34159         * config/i386/i386.c (x86_field_alignment): Likewise.
34160         * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Likewise.
34161         * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Likewise.
34162         * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
34163         * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
34164         * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Likewise.
34165         * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p):
34166          Likewise.
34167
34168         Revert
34169         2017-01-30  Richard Biener  <rguenther@suse.de>
34170
34171         PR tree-optimization/79256
34172         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
34173         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
34174         alignment on TYPE.
34175
34176 2017-02-07  Toma Tabacu  <toma.tabacu@imgtec.com>
34177
34178         * config/mips/mips.c (mips_expand_builtin_insn): Convert the QImode
34179         argument of the pshufh, psllh, psllw, psrah, psraw, psrlh, psrlw
34180         builtins to SImode and emit a zero-extend, if necessary.
34181
34182 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
34183
34184         * docs/invoke.texi (RISC-V Options): Alphabetize.
34185
34186 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
34187
34188         * doc/invoke.texi (RISC-V Options): Use two spaces to separate
34189         options.
34190
34191 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
34192
34193         * config/riscv/riscv.c: New file.
34194         * common/config/riscv/riscv-common.c: Likewise.
34195         * config.gcc: Likewise.
34196         * config/riscv/constraints.md: Likewise.
34197         * config/riscv/elf.h: Likewise.
34198         * config/riscv/generic.md: Likewise.
34199         * config/riscv/linux.h: Likewise.
34200         * config/riscv/multilib-generator: Likewise.
34201         * config/riscv/peephole.md: Likewise.
34202         * config/riscv/pic.md: Likewise.
34203         * config/riscv/predicates.md: Likewise.
34204         * config/riscv/riscv-builtins.c: Likewise.
34205         * config/riscv/riscv-c.c: Likewise.
34206         * config/riscv/riscv-ftypes.def: Likewise.
34207         * config/riscv/riscv-modes.def: Likewise.
34208         * config/riscv/riscv-opts.h: Likewise.
34209         * config/riscv/riscv-protos.h: Likewise.
34210         * config/riscv/riscv.h: Likewise.
34211         * config/riscv/riscv.md: Likewise.
34212         * config/riscv/riscv.opt: Likewise.
34213         * config/riscv/sync.md: Likewise.
34214         * config/riscv/t-elf-multilib: Likewise.
34215         * config/riscv/t-linux: Likewise.
34216         * config/riscv/t-linux-multilib: Likewise.
34217         * config/riscv/t-riscv: Likewise.
34218         * configure.ac: Likewise.
34219         * doc/contrib.texi: Add Kito Cheng, Palmer Dabbelt, and Andrew
34220         Waterman as RISC-V maintainers.
34221         * doc/install.texi: Add RISC-V entries.
34222         * doc/invoke.texi: Add RISC-V options section.
34223         * doc/md.texi: Add RISC-V constraints section.
34224         * configure: Regenerated.
34225
34226 2017-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
34227
34228         PR target/66144
34229         * config/rs6000/vector.md (vcond<mode><mode>): Allow the true and
34230         false values to be constant vectors with all 0 or all 1 bits set.
34231         (vcondu<mode><mode>): Likewise.
34232         * config/rs6000/predicates.md (vector_int_reg_or_same_bit): New
34233         predicate.
34234         (fpmask_comparison_operator): Update comment.
34235         (vecint_comparison_operator): New predicate.
34236         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Optimize
34237         vector conditionals when the true and false values are constant
34238         vectors with all 0 bits or all 1 bits set.
34239
34240 2017-02-06  Martin Sebor  <msebor@redhat.com>
34241
34242         PR  tree-optimization/79376
34243         * gimple-fold.c (get_range_strlen): Set the minimum length to zero.
34244
34245 2017-02-06  Uros Bizjak  <ubizjak@gmail.com>
34246
34247         * config/i386/sse.md (vector modes -> vec_extract* splitter): Use
34248         explicit subreg RTX with operand 1.  Use VECTOR_MODE_P predicate
34249         to simplify split condition.
34250
34251 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
34252
34253         * omp-expand.c (oxpand_omp_atomic_fetch_op,
34254         expand_omp_atomic_pipeline): Return false if can_atomic_load_p is
34255         false.
34256
34257 2017-02-06  Segher Boessenkool  <segher@kernel.crashing.org>
34258
34259         PR rtl-optimization/68664
34260         * target.def (can_speculate_insn): New hook.
34261         * doc/tm.texi.in (TARGET_SCHED_CAN_SPECULATE_INSN): New hook.
34262         * doc/tm.texi: Regenerate.
34263         * sched-rgn.c (can_schedule_ready_p): Use the new hook.
34264         * config/rs6000/rs6000.c (TARGET_SCHED_CAN_SPECULATE_INSN): New macro.
34265         (rs6000_sched_can_speculate_insn): New function.
34266
34267 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
34268
34269         PR tree-optimization/79284
34270         * tree-vectorizer.h (VECT_SCALAR_BOOLEAN_TYPE_P): Define.
34271         * tree-vect-stmts.c (vect_get_vec_def_for_operand,
34272         vectorizable_mask_load_store, vectorizable_operation,
34273         vect_is_simple_cond, get_same_sized_vectype): Use it instead
34274         of comparing TREE_CODE of a type against BOOLEAN_TYPE.
34275         * tree-vect-patterns.c (check_bool_pattern, search_type_for_mask_1,
34276         vect_recog_bool_pattern, vect_recog_mask_conversion_pattern): Likewise.
34277         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
34278         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
34279         Remove redundant gimple_code (stmt) == GIMPLE_ASSIGN test after
34280         is_gimple_assign (stmt).  Replace another such test with
34281         is_gimple_assign (stmt).
34282
34283 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
34284
34285         PR target/78883
34286         * config/avr/avr.c (rtl-iter.h): Include it.
34287         (TARGET_LEGITIMATE_COMBINED_INSN): New hook define...
34288         (avr_legitimate_combined_insn): ...and implementation.
34289
34290 2017-02-06  Dominik Vogt  <vogt@linux.vnet.ibm.com>
34291
34292         * config/s390/predicates.md ("larl_operand"): Use macros from hwint.h.
34293         * config/s390/s390.c (s390_const_operand_ok)
34294         (s390_canonicalize_comparison, s390_extract_part)
34295         (s390_single_part, s390_contiguous_bitmask_nowrap_p)
34296         (s390_contiguous_bitmask_p, s390_rtx_costs)
34297         (legitimize_pic_address): Likewise.
34298         * config/s390/s390.md ("clzdi2", "clztidi2"): Likewise.
34299         * config/s390/vx-builtins.md ("vec_genbytemaskv16qi")
34300         ("vec_permi<mode>", "vfae<mode>", "*vfaes<mode>", "vstrc<mode>")
34301         ("*vstrcs<mode>"): Use UINTVAL() to set unsigned HOST_WIDE_INT.
34302         * config/s390/vector.md ("vec_vfenes<mode>"): Likewise.
34303
34304 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
34305
34306         * config/avr/avr.md (*addhi3_zero_extend): Add alternative where
34307         REGNO($0) == REGNO($1).
34308
34309 2017-02-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34310
34311         * config/s390/linux.h(SIZE_TYPE): Add comment.
34312
34313 2017-02-06  Julian Brown  <julian@codesourcery.com>
34314             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
34315             Virendra Pathak  <virendra.pathak@broadcom.com>
34316
34317         * config/aarch64/aarch64-cores.def: Change the scheduler
34318         to Thunderx2t99.
34319         * config/aarch64/aarch64.md: Include thunderx2t99.md.
34320         * config/aarch64/thunderx2t99.md: New file.
34321
34322 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
34323
34324         * doc/standards.texi (Go Language): Update link to language
34325         standard.
34326
34327 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
34328
34329         * tree-eh.c (lower_resx): Sanitize profile.
34330         (cleanup_empty_eh_move_lp): Likewise.
34331
34332 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
34333
34334         PR tree-ssa/79347
34335         * cfgloopmanip.c (lv_adjust_loop_entry_edge, loop_version): Add
34336         ELSE_PROB.
34337         * cfgloopmanip.h (loop_version): Update prototype.
34338         * modulo-sched.c (sms_schedule): Update call of loop_version.
34339         * tree-if-conv.c(version_loop_for_if_conversion): Likewise.
34340         * tree-parloops.c (gen_parallel_loop): Likewise.
34341         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Likewise.
34342         * tree-ssa-loop-split.c (split_loop): Likewise.
34343         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Likewise.
34344         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
34345
34346 2017-02-05  Martin Liska  <mliska@suse.cz>
34347
34348         PR bootstrap/78985
34349         * config/s390/s390.c (s390_gimplify_va_arg): Initialize local
34350         variable to NULL.
34351         (print_operand_address): Initialize a struct to zero.
34352
34353 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
34354
34355         * doc/contrib.texi (Contributors): Refer to Hans Boehm's
34356         garbage collector only in textual form.
34357
34358 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
34359
34360         * doc/extend.texi (x86 specific memory model extensions for
34361         transactional memory): Simplify a phrase.
34362
34363 2017-02-05  Eric Botcazou  <ebotcazou@adacore.com>
34364
34365         PR target/79353
34366         * config/sparc/sync.md (atomic_loaddi_1): Replace 'U' constraint with
34367         'r', 'm' constraint with 'T' and !TARGET_ARCH64 with TARGET_ARCH32.
34368         (atomic_storedi_1): Likewise.
34369
34370 2017-02-04  Jakub Jelinek  <jakub@redhat.com>
34371
34372         PR tree-optimization/79338
34373         * tree-parloops.c (gather_scalar_reductions): Don't call
34374         vect_analyze_loop_form for loop->inner before destroying loop's
34375         loop_vinfo.
34376
34377 2017-02-03  Martin Sebor  <msebor@redhat.com>
34378
34379         PR tree-optimization/79327
34380         * gimple-ssa-sprintf.c (tree_digits): Avoid adding the base prefix
34381         when precision has resulted in leading zeros.
34382         (format_integer): Adjust the likely counter to assume an unknown
34383         argument that may be zero is non-zero.
34384
34385 2017-02-03  Jason Merrill  <jason@redhat.com>
34386
34387         PR c++/78689
34388         * tree-inline.c (copy_tree_body_r) [COND_EXPR]: Revert change to
34389         avoid copying non-taken branch.
34390
34391 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
34392
34393         PR tree-optimization/79340
34394         * tree-vect-loop.c (vectorizable_reduction): Release
34395         vec_defs elements after safe_splicing them into other vectors.
34396         Formatting fixes.
34397
34398         PR tree-optimization/79327
34399         * gimple-ssa-sprintf.c (adjust_range_for_overflow): If returning
34400         true, always set *argmin and *argmax to TYPE_{MIN,MAX}_VALUE of
34401         dirtype.
34402         (format_integer): Use wide_int_to_tree instead of build_int_cst
34403         + to_?hwi.  If argmin is NULL, just set argmin and argmax to
34404         TYPE_{MIN,MAX}_VALUE of argtype.  Simplify and fix computation
34405         of shortest and longest sequence.
34406
34407 2017-02-03  Uros Bizjak  <ubizjak@gmail.com>
34408
34409         * config/i386/i386.c (dimode_scalar_chain::convert_reg):
34410         Use pextrd for TARGET_SSE4_1 when creating scalar copy.
34411
34412 2017-02-03  Walter Lee  <walt@tilera.com>
34413
34414         PR target/78862
34415         * config/tilegx/tilegx.md (tilegx_expand_prologue): Add blockage
34416         after initial stackframe link reg save.
34417         * config/tilepro/tilepro.md (tilepro_expand_prologue): Likewise.
34418
34419 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
34420
34421         PR target/79354
34422         * config/rs6000/rs6000.md (movsi_from_sf): Use wb constraint instead of
34423         wu for stxssp alternative.
34424
34425 2017-02-03  Martin Sebor  <msebor@redhat.com>
34426
34427         PR tree-optimization/79352
34428         * gimple-fold.c (get_range_strlen): Add argument.
34429         (get_range_strlen): Change return type to bool.
34430         (get_maxval_strlen): Pass in a dummy argument.
34431         * gimple-fold.h (get_range_strlen): Change return type to bool.
34432         * gimple-ssa-sprintf.c (get_string_length): Set unlikely counter.
34433         * tree.h (array_at_struct_end_p): Add argument.
34434         * tree.c (array_at_struct_end_p): Handle it.
34435
34436 2017-02-03  Martin Liska  <mliska@suse.cz>
34437
34438         PR lto/66295
34439         * multiple_target.c (create_dispatcher_calls): Redirect edge
34440         from a caller of a dispatcher.
34441         (expand_target_clones): Make the clones local.
34442         (ipa_target_clone): Do both target clones and resolvers.
34443         (ipa_dispatcher_calls): Remove the pass.
34444         (pass_dispatcher_calls::gate): Likewise.
34445         (make_pass_dispatcher_calls): Likewise.
34446         * passes.def (pass_target_clone): Put as very first IPA early
34447         pass.
34448
34449 2017-02-03  Martin Liska  <mliska@suse.cz>
34450
34451         * symtab.c (symtab_node::binds_to_current_def_p): Bail out
34452         in case of a function with ifunc attribute.
34453
34454 2017-02-03  Martin Liska  <mliska@suse.cz>
34455
34456         * cgraph.c (cgraph_node::dump): Dump function version info.
34457         * symtab.c (symtab_node::dump_base): Add missing new line.
34458
34459 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
34460
34461         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): New function.
34462         (ifcombine_ifandif): Use it.
34463
34464 2017-02-03  Martin Liska  <mliska@suse.cz>
34465
34466         * doc/invoke.texi: Document default value for
34467         use-after-scope-direct-emission-threshold.
34468
34469 2017-02-03  Martin Liska  <mliska@suse.cz>
34470
34471         PR tree-optimization/79339
34472         * gimple-ssa-sprintf.c (format_floating_max): Call mpfr_clear.
34473         (format_floating): Likewise.
34474
34475 2017-02-03  Martin Liska  <mliska@suse.cz>
34476
34477         PR ipa/79337
34478         * ipa-prop.c (ipa_node_params_t::insert): Remove current
34479         implementation.
34480         (ipa_node_params_t::remove): Likewise.
34481         * ipa-prop.h (ipa_node_params::ipa_node_params): Make default
34482         initialization from removed ipa_node_params_t::insert.
34483         (ipa_node_params::~ipa_node_params): Move from removed
34484         ipa_node_params_t::release.
34485         * symbol-summary.h (symbol_summary::m_released): New member.
34486         Do not release a summary twice.  Do not allow to call finalizer
34487         for types of a summary that live in GGC memory.
34488
34489 2017-02-02  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
34490
34491         * config/aarch64/aarch64.c (thunderx2t99_tunings): Enable AES and
34492         cmp_branch fusion.
34493
34494 2017-02-02  Martin Sebor  <msebor@redhat.com>
34495
34496         PR middle-end/79275
34497         * gimple-ssa-sprintf.c (get_string_length): Set lower bound to zero.
34498         (format_string): Tighten up the range of output for non-constant
34499         strings and correct the expected range for wide non-constant strings.
34500
34501 2017-02-02  Martin Sebor  <msebor@redhat.com>
34502
34503         * doc/invoke.texi (-maccumulate-args): Fix bad grammar.
34504
34505         PR middle-end/32003
34506         * doc/invoke.texi (-fdump-tree-): Remove pass-specific options from
34507         index.
34508         (-fdump-tree-@var): Add to index and document how to come up
34509         with pass-specific option and dump file names.
34510         (-fdump-passes): Clarify where to look for output.
34511
34512 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
34513
34514         PR middle-end/77445
34515         * tree-ssa-threadbackward.c (profitable_jump_thread_path): Dump
34516         statistics of the analyzed path; allow threading for speed when
34517         any of BBs along the path are optimized for speed.
34518
34519 2017-02-02  Eric Botcazou  <ebotcazou@adacore.com>
34520
34521         PR middle-end/78468
34522         * emit-rtl.c (init_emit): Add ??? comment for problematic alignment
34523         settings of the virtual registers.
34524
34525         Revert again
34526         2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
34527
34528         * explow.c (get_dynamic_stack_size): Take known alignment of stack
34529         pointer + STACK_DYNAMIC_OFFSET into account when calculating the size
34530         needed.
34531
34532 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34533
34534         * config/s390/vx-builtins.md ("vec_ceil", "vec_floor")
34535         ("vec_trunc", "vec_roundc", "vec_round"): Remove expanders.
34536
34537 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34538
34539         * config/s390/s390.md: Add missing comments with the expanded
34540         mnemonics.
34541         * config/s390/vector.md: Likewise.
34542         * config/s390/vx-builtins.md: Likewise.
34543
34544 2017-02-02  Jakub Jelinek  <jakub@redhat.com>
34545
34546         PR target/79197
34547         * config/rs6000/rs6000.md (*fixuns_trunc<mode>di2_fctiduz): Rename to ...
34548         (fixuns_trunc<mode>di2): ... this, remove previous expander.  Put all
34549         conditions on a single line.
34550
34551 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34552
34553         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
34554         __S390_VX__ to __VX__.
34555
34556 2017-02-01  Andrew Pinski  <apinski@cavium.com>
34557
34558         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Pass
34559         stmt_info to record_stmt_cost.
34560         (vect_get_known_peeling_cost): Pass stmt_info if known to
34561         record_stmt_cost.
34562         * config/aarch64/aarch64-protos.h (cpu_vector_cost): Split
34563         cpu_vector_cost field into
34564         scalar_int_stmt_cost and scalar_fp_stmt_cost.  Split vec_stmt_cost
34565         field into vec_int_stmt_cost and vec_fp_stmt_cost.
34566         * config/aarch64/aarch64.c (generic_vector_cost): Update for the
34567         splitting of scalar_stmt_cost and vec_stmt_cost.
34568         (thunderx_vector_cost): Likewise.
34569         (cortexa57_vector_cost): LIkewise.
34570         (exynosm1_vector_cost): Likewise.
34571         (xgene1_vector_cost): Likewise.
34572         (thunderx2t99_vector_cost): Improve after the splitting of the two
34573         fields.
34574         (aarch64_builtin_vectorization_cost): Update for the splitting of
34575         scalar_stmt_cost and vec_stmt_cost.
34576
34577 2017-02-01  Torvald Riegel  <triegel@redhat.com>
34578             Richard Henderson  <rth@redhat.com>
34579
34580         * builtins.c (fold_builtin_atomic_always_lock_free): Make "lock-free"
34581         conditional on existance of a fast atomic load.
34582         * optabs-query.c (can_atomic_load_p): New function.
34583         * optabs-query.h (can_atomic_load_p): Declare it.
34584         * optabs.c (expand_atomic_exchange): Always delegate to libatomic if
34585         no fast atomic load is available for the particular size of access.
34586         (expand_atomic_compare_and_swap): Likewise.
34587         (expand_atomic_load): Likewise.
34588         (expand_atomic_store): Likewise.
34589         (expand_atomic_fetch_op): Likewise.
34590         * testsuite/lib/target-supports.exp
34591         (check_effective_target_sync_int_128): Remove x86 because it provides
34592         no fast atomic load.
34593         (check_effective_target_sync_int_128_runtime): Likewise.
34594
34595 2017-02-01  Richard Biener  <rguenther@suse.de>
34596
34597         * graphite.c: Include tree-vectorizer.h for find_loop_location.
34598         (graphite_transform_loops): Provide opt-info for optimized nests.
34599         * tree-parloop.c (parallelize_loops): Provide opt-info for
34600         parallelized loops.
34601
34602 2017-02-01  Richard Biener  <rguenther@suse.de>
34603
34604         PR middle-end/79315
34605         * tree-cfg.c (move_stmt_op): Never set TREE_BLOCK when it
34606         was not set before.
34607
34608 2017-02-01  Richard Biener  <rguenther@suse.de>
34609
34610         PR tree-optimization/71824
34611         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
34612         Verify the loops are valid in the merged SESE region.
34613         (scop_detection::can_represent_loop_1): Check analyzing the
34614         evolution of the number of iterations in the region succeeds.
34615
34616 2017-01-31  Ian Lance Taylor  <iant@golang.org>
34617
34618         * config/i386/i386.c (ix86_expand_split_stack_prologue): Add
34619         REG_ARGS_SIZE note to 32-bit push insns and call insn.
34620
34621 2017-01-31  David Malcolm  <dmalcolm@redhat.com>
34622
34623         PR preprocessor/79210
34624         * input.c (get_substring_ranges_for_loc): Replace line_width
34625         assertion with error-handling.
34626
34627 2017-01-31  Richard Biener  <rguenther@suse.de>
34628
34629         PR tree-optimization/77318
34630         * graphite-sese-to-poly.c (extract_affine): Fix assert.
34631         (create_pw_aff_from_tree): Take loop parameter.
34632         (add_condition_to_pbb): Pass loop of the condition to
34633         create_pw_aff_from_tree.
34634
34635 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
34636
34637         * config/s390/s390.c (s390_asan_shadow_offset): New function.
34638         (TARGET_ASAN_SHADOW_OFFSET): Redefine.
34639
34640 2017-01-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
34641
34642         PR target/78597
34643         PR target/79038
34644         * config/rs6000/rs6000-protos.h (convert_float128_to_int): Delete,
34645         no longer used.
34646         (convert_int_to_float128): Likewise.
34647         * config/rs6000/rs6000.c (convert_float128_to_int): Likewise.
34648         (convert_int_to_float128): Likewise.
34649         * config/rs6000/rs6000.md (UNSPEC_IEEE128_MOVE): Likewise.
34650         (UNSPEC_IEEE128_CONVERT): Likewise.
34651         (floatsi<mode>2, FLOAT128 iterator): Bypass calling
34652         rs6000_expand_float128_convert if we have IEEE 128-bit hardware.
34653         Use local variables for IBM extended format.
34654         (fix_trunc<mode>si2, FLOAT128 iterator): Likewise.
34655         (fix_trunc<mode>si2_fprs): Likewise.
34656         (fixuns_trunc<IEEE128:mode><SDI:mode>2): Likewise.
34657         (floatuns<IEEE128:mode>2, IEEE128 iterator): Likewise.
34658         (fix<uns>_<mode>si2_hw): Rework the IEEE 128-bt hardware support
34659         to know that we can now have integers of all sizes in vector
34660         registers.
34661         (fix<uns>_<mode>di2_hw): Likewise.
34662         (float<uns>_<mode>si2_hw): Likewise.
34663         (fix_<mode>si2_hw): Likewise.
34664         (fixuns_<mode>si2_hw): Likewise.
34665         (float<uns>_<mode>di2_hw): Likewise.
34666         (float_<mode>di2_hw): Likewise.
34667         (float_<mode>si2_hw): Likewise.
34668         (floatuns_<mode>di2_hw): Likewise.
34669         (floatuns_<mode>si2_hw): Likewise.
34670         (xscvqp<su>wz_<mode>): Delete, no longer used.
34671         (xscvqp<su>dz_<mode>): Likewise.
34672         (xscv<su>dqp_<mode>): Likewise.
34673         (ieee128_mfvsrd_64bit): Likewise.
34674         (ieee128_mfvsrd_32bit): Likewise.
34675         (ieee128_mfvsrwz): Likewise.
34676         (ieee128_mtvsrw): Likewise.
34677         (ieee128_mtvsrd_64bit): Likewise.
34678         (ieee128_mtvsrd_32bit): Likewise.
34679
34680 2017-01-31  Martin Liska  <mliska@suse.cz>
34681
34682         PR ipa/79285
34683         * ipa-prop.c (ipa_free_all_node_params): Call release method
34684         instead of ~sumbol_summary to not to trigger double times
34685         dtor of hash_map.
34686
34687 2017-01-31  Aldy Hernandez  <aldyh@redhat.com>
34688
34689         PR tree-optimization/71691
34690         * bitmap.h (class auto_bitmap): New.
34691         * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Call
34692         is_maybe_undefined instead of ssa_undefined_value_p.
34693
34694 2017-01-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34695
34696         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
34697         __S390_ARCH_LEVEL__ to __ARCH__.
34698
34699 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
34700
34701         PR tree-optimization/79267
34702         * value-prof.c (gimple_ic): Only drop lhs for noreturn calls
34703         if should_remove_lhs_p is true.
34704
34705 2017-01-30  Alexandre Oliva <aoliva@redhat.com>
34706
34707         PR debug/63238
34708         * dwarf2out.c (clone_as_declaration): Drop DW_AT_alignment.
34709         (add_alignment_attribute): New.
34710         (base_type_die): Add alignment attribute.
34711         (subrange_type_die): Likewise.
34712         (modified_type_die): Likewise.
34713         (gen_array_type_die): Likewise.
34714         (gen_descr_array_type_die: Likewise.
34715         (gen_enumeration_type_die): Likewise.
34716         (gen_subprogram_die): Likewise.
34717         (gen_variable_die): Likewise.
34718         (gen_field_die): Likewise.
34719         (gen_ptr_to_mbr_type_die): Likewise.
34720         (gen_struct_or_union_type_die): Likewise.
34721         (gen_subroutine_type_die): Likewise.
34722         (gen_typedef_die): Likewise.
34723         (base_type_cmp): Compare alignment attribute.
34724
34725 2017-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
34726
34727         PR target/79170
34728         * config/rs6000/altivec.md (*setb_internal): Rename to setb_signed.
34729         (setb_unsigned) New pattern for setb with CCUNS.
34730         * config/rs6000/rs6000.c (expand_block_compare): Use a different
34731         subfc./subfe sequence to avoid overflow problems.  Generate a
34732         shorter sequence with cmpld/setb for power9.
34733         * config/rs6000/rs6000.md (subf<mode>3_carry_dot2): Add a new pattern
34734         for generating subfc. instruction.
34735         (cmpstrsi): Add TARGET_POPCNTD predicate as the generate sequence
34736         now uses this instruction.
34737
34738 2017-01-30  Ian Lance Taylor  <iant@google.com>
34739
34740         PR debug/79289
34741         * dwarf2out.c (gen_type_die_with_usage): When picking a variant
34742         for FUNCTION_TYPE/METHOD_TYPE, use the first matching one.
34743
34744 2017-01-30  Martin Sebor  <msebor@redhat.com>
34745
34746         * gimple-ssa-sprintf.c (fmtresult::adjust_for_width_or_precision):
34747         Move constant to the right of a relational operator.
34748         (get_mpfr_format_length, format_character, format_string): Ditto.
34749         (should_warn_p, maybe_warn): Same.
34750
34751         * doc/invoke.texi (-Wformat-truncation=1): Fix typo.
34752
34753 2017-01-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
34754
34755         PR lto/79061
34756         * asan.c (get_translation_unit_decl): Remove function.
34757         (asan_add_global): Force has_dynamic_init to zero in LTO mode.
34758
34759 2017-01-30  Martin Liska  <mliska@suse.cz>
34760
34761         PR gcov-profile/79259
34762         * opts.c (common_handle_option): Enable flag_ipa_bit_cp w/
34763         -fprofile-generate.
34764
34765 2017-01-30  Martin Liska  <mliska@suse.cz>
34766
34767         PR bootstrap/78985
34768         * config/aarch64/cortex-a57-fma-steering.c (func_fma_steering::analyze):
34769         Initialize variables with NULL value.
34770
34771 2017-01-30  Richard Earnshaw  <rearnsh@arm.com>
34772
34773         PR target/79260
34774         * config.gcc (arm*-*-*): Add arm/arm-flags.h and arm/arm-isa.h to
34775         tm_p_file.
34776         * arm/arm-protos.h: Don't directly include arm-flags.h and arm-isa.h.
34777
34778 2017-01-30  Richard Biener  <rguenther@suse.de>
34779
34780         PR tree-optimization/79276
34781         * tree-vrp.c (process_assert_insertions): Properly adjust common
34782         when removing a duplicate.
34783
34784 2017-01-30  Richard Biener  <rguenther@suse.de>
34785
34786         PR tree-optimization/79256
34787         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
34788         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
34789         alignment on TYPE.
34790         * tree.c (build_aligned_type): Set TYPE_USER_ALIGN.
34791
34792 2017-01-30  Dominik Vogt  <vogt@linux.vnet.ibm.com>
34793
34794         PR target/79240
34795         * config/s390/s390.md ("*r<noxa>sbg_<mode>_srl_bitmask")
34796         ("*r<noxa>sbg_<mode>_sll_bitmask")
34797         ("*extzv_<mode>_srl<clobbercc_or_nocc>")
34798         ("*extzv_<mode>_sll<clobbercc_or_nocc>"):
34799         Use contiguous_bitmask_nowrap_operand.
34800
34801 2017-01-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34802
34803         PR target/79268
34804         * config/rs6000/altivec.h (vec_xl): Revise #define.
34805         (vec_xst): Likewise.
34806
34807 2017-01-27  Uros Bizjak  <ubizjak@gmail.com>
34808
34809         * config/i386/i386.c (print_reg): Use REGNO instead of true_regnum.
34810
34811 2017-01-27  Bernd Schmidt  <bschmidt@redhat.com>
34812
34813         PR rtl-optimization/79194
34814         * cprop.c (one_cprop_pass): Move deletion of code after unconditional
34815         traps before call to bypass_conditional_jumps.
34816
34817 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
34818
34819         PR tree-optimization/71374
34820         * lra-constraints.c (check_conflict_input_operands): New.
34821         (match_reload): Use it.
34822
34823 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
34824
34825         PR target/79131
34826         * lra-assigns.c (find_hard_regno_for_1): Take endianess for into
34827         account to calculate conflict_set.
34828
34829 2017-01-27  Bin Cheng  <bin.cheng@arm.com>
34830
34831         PR rtl-optimization/78559
34832         * combine.c (try_combine): Discard REG_EQUAL and REG_EQUIV for
34833         other_insn in combine.
34834
34835 2017-01-27  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
34836
34837         * builtin-types.def: Use unsigned_char_type_node for BT_UINT8.  Use
34838         uint16_type_node for BT_UINT16.
34839
34840 2017-01-27  David Malcolm  <dmalcolm@redhat.com>
34841
34842         * doc/sourcebuild.texi (Testsuites): Add "GIMPLE Tests" and
34843         "RTL Tests" to menu.
34844         (GIMPLE Tests): New node.
34845         (RTL Tests): New node.
34846
34847 2017-01-27  Richard Biener  <rguenther@suse.de>
34848
34849         PR tree-optimization/79245
34850         * tree-loop-distribution.c (distribute_loop): Apply cost
34851         modeling also to detected patterns.
34852
34853 2017-01-27  Richard Biener  <rguenther@suse.de>
34854
34855         PR tree-optimization/71433
34856         * tree-vrp.c (register_new_assert_for): Revert earlier changes.
34857         (compare_assert_loc): New function.
34858         (process_assert_insertions): Sort and optimize assert locations
34859         to remove duplicates and push down identical assertions on
34860         edges to their destination block.
34861
34862 2017-01-27  Richard Biener  <rguenther@suse.de>
34863
34864         PR tree-optimization/79244
34865         * tree-vrp.c (remove_range_assertions): Forcefully propagate
34866         out SSA names even if abnormal.
34867
34868 2017-01-27  Jakub Jelinek  <jakub@redhat.com>
34869
34870         * realmpfr.h: Poison MPFR_RND{N,Z,U,D}.
34871         * gimple-ssa-sprintf.c (format_floating_max): Use GMP_RNDN
34872         instead of MPFR_RNDN.
34873
34874 2017-01-27  Richard Earnshaw  <rearnsha@arm.com>
34875
34876         PR target/79239
34877         * arm.c (arm_option_override): Don't call build_target_option_node
34878         until after doing all option overrides.
34879         (arm_valid_target_attribute_tree): Likewise.
34880
34881 2017-01-27  Martin Liska  <mliska@suse.cz>
34882
34883         * doc/invoke.texi (-fprofile-arcs): Document profiling support
34884         for {cd}tors and C++ {cd}tors.
34885
34886 2017-01-27  Dominik Vogt  <vogt@linux.vnet.ibm.com>
34887
34888         * config/s390/s390.md ("*setmem_long_and")
34889         ("*setmem_long_and_31z"): Use zero_extend instead of and.
34890
34891 2017-01-26  Martin Sebor  <msebor@redhat.com>
34892
34893         * gimple-ssa-sprintf.c (format_floating): Simplify the computation
34894         of precision.
34895
34896 2017-01-26  Martin Sebor  <msebor@redhat.com>
34897
34898         * gimple-ssa-sprintf.c (format_floating): Test HAVE_XFmode and
34899         HAVE_DFmode before using XFmode or DFmode.
34900         (parse_directive): Avoid using the z length modifier to avoid
34901         the ISO C++98 does not support the â€˜z’ gnu_printf length modifier.
34902
34903         PR middle-end/78703
34904         * gimple-ssa-sprintf.c (adjust_for_width_or_precision): Change
34905         to accept adjustment as an array.
34906         (get_int_range): New function.
34907         (struct directive): Make width and prec arrays.
34908         (directive::set_width, directive::set_precision): Call get_int_range.
34909         (format_integer, format_floating): Handle width and precision ranges.
34910         (format_string, parse_directive): Same.
34911
34912 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
34913
34914         PR debug/79129
34915         * dwarf2out.c (generate_skeleton_bottom_up): For children with
34916         comdat_type_p set, just clone them, but keep the children in the
34917         original DIE.
34918
34919         PR debug/78835
34920         * dwarf2out.c (prune_unused_types): Mark all functions with DIEs
34921         which have direct callers with -fvar-tracking-assignments enabled
34922         in the current TU.
34923         (resolve_addr): Avoid adding skeleton DIEs for DW_AT_call_origin
34924         inside of type units.
34925
34926 2017-01-26  Martin Sebor  <msebor@redhat.com>
34927
34928         PR middle-end/78703
34929         * gimple-ssa-sprintf.c (struct result_range): Add likely and
34930         unlikely counters.
34931         (struct format_result): Replace number_chars, number_chars_min,
34932         and number_chars_max with a single member of struct result_range.
34933         Remove bounded.
34934         (format_result::operator+=): Adjust.
34935         (struct fmtresult): Remove bounded.  Handle likely and unlikely
34936         counters.
34937         (fmtresult::adjust_for_width_or_precision): New function.
34938         (fmtresult:type_max_digits): New function.
34939         (bytes_remaining): Handle likely and unlikely counters.
34940         (min_bytes_remaining): Remove.
34941         (format_percent): Simplify.
34942         (format_integer, format_floating): Set likely and unlikely counters.
34943         (get_string_length, format_character, format_string): Same.
34944         (format_plain, should_warn_p): New function.
34945         (maybe_warn): Call should_warn_p.  Update diagnostic messages
34946         and handle those for all directives, including plain strings.
34947         (format_directive): Handle likely and unlikely counters.
34948         Remove unnecessary quoting from diagnostics.  Add an informational
34949         note.
34950         (add_bytes): Remove.
34951         (pass_sprintf_length::compute_format_length): Simplify.
34952         (try_substitute_return_value): Handle likely and unlikely counters.
34953
34954 2017-01-26  Carl Love  <cel@us.ibm.com>
34955
34956         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Remove
34957         bogus entries for the P8V_BUILTIN_VEC_VGBBD built-ins
34958
34959 2017-01-26  Vladimir Makarov  <vmakarov@redhat.com>
34960
34961         PR target/79131
34962         * lra-assigns.c (setup_live_pseudos_and_spill_after_risky): Take
34963         endianess for subregs into account.
34964         * lra-constraints.c (lra_constraints): Do risky transformations
34965         always on the first iteration.
34966         * lra-lives.c (check_pseudos_live_through_calls): Add arg
34967         last_call_used_reg_set.
34968         (process_bb_lives): Define and use last_call_used_reg_set.
34969         * lra.c (lra): Always continue after lra_constraints on the first
34970         iteration.
34971
34972 2017-01-26  Kirill Yukhin  <kirill.yukhin@gmail.com>
34973
34974         * gcc.target/i386/avx512bw-kshiftlq-2.c: Use unsigned long long
34975         constant.
34976         * gcc.target/i386/avx512bw-kshiftrq-2.c: Ditto.
34977
34978 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
34979
34980         * config/i386/avx512fintrin.h (_ktest_mask16_u8,
34981         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): Move to ...
34982         * config/i386/avx512dqintrin.h (_ktest_mask16_u8,
34983         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): ... here.
34984         * config/i386/i386-builtin.def (__builtin_ia32_ktestchi,
34985         __builtin_ia32_ktestzhi, __builtin_ia32_kaddhi): Use
34986         OPTION_MASK_ISA_AVX512DQ instead of OPTION_MASK_ISA_AVX512F.
34987         * config/i386/sse.md (SWI1248_AVX512BWDQ2): New mode iterator.
34988         (kadd<mode>, ktest<mode>): Use it instead of SWI1248_AVX512BWDQ.
34989
34990 2017-01-26  Marek Polacek  <polacek@redhat.com>
34991
34992         PR c/79199
34993         * fold-const.c (operand_equal_p) [COND_EXPR]: Use OP_SAME_WITH_NULL
34994         for the third operand.
34995
34996 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
34997
34998         PR middle-end/79236
34999         * omp-low.c (struct omp_context): Add simt_stmt field.
35000         (scan_omp_for): Return omp_context *.
35001         (scan_omp_simd): Set simt_stmt on the non-_simt_ SIMD
35002         context to the _simt_ SIMD stmt.
35003         (lower_omp_for): For combined SIMD with sibling _simt_
35004         SIMD, make sure to use the same decls in _looptemp_
35005         clauses as in the sibling.
35006
35007 2017-01-26  David Sherwood  <david.sherwood@arm.com>
35008
35009         PR middle-end/79212
35010         * gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
35011         all contexts.
35012
35013 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
35014
35015         PR target/70465
35016         * reg-stack.c (emit_swap_insn): Instead of fld a; fld b; fxchg %st(1);
35017         emit fld b; fld a; if possible.
35018
35019         * brig-builtins.def: Update copyright years.
35020         * config/arm/arm_acle_builtins.def: Update copyright years.
35021
35022 2017-01-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
35023
35024         PR target/79179
35025         * config/rs6000/vsx.md (vsx_extract_<mode>_store): Use wY
35026         constraint instead of o for the stxsd instruction.
35027
35028 2017-01-25  Carl Love  <cel@us.ibm.com>
35029
35030         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Fix order
35031         of entries for ALTIVEC_BUILTIN_VEC_PACKS and P8V_BUILTIN_VEC_VGBBD.
35032
35033 2017-01-25  Jonathan Wakely  <jwakely@redhat.com>
35034
35035         * doc/invoke.texi (C++ Dialect Options): Fix typo.
35036
35037 2017-01-25  Richard Biener  <rguenther@suse.de>
35038
35039         PR tree-optimization/69264
35040         * target.def (vector_alignment_reachable): Improve documentation.
35041         * doc/tm.texi: Regenerate.
35042         * targhooks.c (default_builtin_vector_alignment_reachable): Simplify
35043         and add a comment.
35044         * tree-vect-data-refs.c (vect_supportable_dr_alignment): Revert
35045         earlier changes with respect to TYPE_USER_ALIGN.
35046         (vector_alignment_reachable_p): Likewise.  Improve dumping.
35047
35048 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35049
35050         PR target/79145
35051         * config/arm/arm.md (xordi3): Force constant operand into a register
35052         for TARGET_IWMMXT.
35053
35054 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35055
35056         * doc/invoke.texi (-fstore-merging): Correct default optimization
35057         levels at which it is enabled.
35058         (-O): Move -fstore-merging from list to...
35059         (-O2): ... Here.
35060
35061 2017-01-25  Richard Biener  <rguenther@suse.de>
35062
35063         PR debug/78363
35064         * omp-expand.c: Include debug.h.
35065         (expand_omp_taskreg): Make sure to generate early debug before
35066         outlining anything from a function.
35067         (expand_omp_target): Likewise.
35068         (grid_expand_target_grid_body): Likewise.
35069
35070 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
35071
35072         PR lto/79061
35073         * asan.c (get_translation_unit_decl): New function.
35074         (asan_add_global): Extract modules file name from globals
35075         TRANSLATION_UNIT_DECL name.
35076
35077 2017-01-24  Eric Botcazou  <ebotcazou@adacore.com>
35078
35079         PR target/77439
35080         * config/arm/arm.c (arm_function_ok_for_sibcall): Add back restriction
35081         for long calls with APCS frame and VFP.
35082
35083 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
35084
35085         * cfg.c (original_copy_tables_initialized_p): New function.
35086         * cfg.h (original_copy_tables_initialized_p): New decl.
35087         * cfgrtl.c (relink_block_chain): Guard the call to
35088         free_original_copy_tables with a call to
35089         original_copy_tables_initialized_p.
35090         * cgraph.h (symtab_node::native_rtl_p): New decl.
35091         * cgraphunit.c (symtab_node::native_rtl_p): New function.
35092         (symtab_node::needed_p): Don't assert for early assembly output
35093         for __RTL functions.
35094         (cgraph_node::finalize_function): Set "force_output" for __RTL
35095         functions.
35096         (cgraph_node::analyze): Bail out early for __RTL functions.
35097         (analyze_functions): Update assertion to support __RTL functions.
35098         (cgraph_node::expand): Bail out early for __RTL functions.
35099         * final.c (rest_of_clean_state): Don't call delete_tree_ssa for
35100         __RTL functions.
35101         * function.h (struct function): Update comment for field
35102         "pass_startwith".
35103         * gimple-expr.c: Include "tree-pass.h".
35104         (gimple_has_body_p): Return false for __RTL functions.
35105         * Makefile.in (OBJS): Add run-rtl-passes.o.
35106         * pass_manager.h (gcc::pass_manager::get_rest_of_compilation): New
35107         accessor.
35108         (gcc::pass_manager::get_clean_slate): New accessor.
35109         * passes.c: Include "insn-addr.h".
35110         (should_skip_pass_p): Add logging.  Update logic for running
35111         "expand" to be compatible with both __GIMPLE and __RTL.  Guard
35112         property-provider override so it is only done for gimple passes.
35113         Don't skip dfinit.
35114         (skip_pass): New function.
35115         (execute_one_pass): Call skip_pass when skipping passes.
35116         * read-md.c (md_reader::read_char): Support filtering
35117         the input to a subset of line numbers.
35118         (md_reader::md_reader): Initialize fields
35119         m_first_line and m_last_line.
35120         (md_reader::read_file_fragment): New function.
35121         * read-md.h (md_reader::read_file_fragment): New decl.
35122         (md_reader::m_first_line): New field.
35123         (md_reader::m_last_line): New field.
35124         * read-rtl-function.c (function_reader::create_function): Only
35125         create cfun if it doesn't already exist.  Set PROP_rtl on cfun's
35126         curr_properties.  Set DECL_INITIAL to a dummy block.
35127         (read_rtl_function_body_from_file_range): New function.
35128         * read-rtl-function.h (read_rtl_function_body_from_file_range):
35129         New decl.
35130         * run-rtl-passes.c: New file.
35131         * run-rtl-passes.h: New file.
35132
35133 2017-01-24  Jeff Law  <law@redhat.com>
35134
35135         * config/microblaze/microblaze.h (ASM_FORMAT_PRIVATE_NAME): Increase
35136         buffer size.
35137
35138 2017-01-24  Bin Cheng  <bin.cheng@arm.com>
35139
35140         PR tree-optimization/79159
35141         * tree-ssa-loop-niter.c (get_cst_init_from_scev): New function.
35142         (record_nonwrapping_iv): Improve boundary using above function if no
35143         value range information.
35144
35145 2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
35146             Martin Jambor  <mjambor@suse.cz>
35147
35148         * brig-builtins.def: New file.
35149         * builtins.def (DEF_HSAIL_BUILTIN): New macro.
35150         (DEF_HSAIL_ATOMIC_BUILTIN): Likewise.
35151         (DEF_HSAIL_SAT_BUILTIN): Likewise.
35152         (DEF_HSAIL_INTR_BUILTIN): Likewise.
35153         (DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise.
35154         * builtin-types.def (BT_INT8): New.
35155         (BT_INT16): Likewise.
35156         (BT_UINT8): Likewise.
35157         (BT_UINT16): Likewise.
35158         (BT_FN_ULONG): Likewise.
35159         (BT_FN_UINT_INT): Likewise.
35160         (BT_FN_UINT_ULONG): Likewise.
35161         (BT_FN_UINT_LONG): Likewise.
35162         (BT_FN_UINT_PTR): Likewise.
35163         (BT_FN_ULONG_PTR): Likewise.
35164         (BT_FN_INT8_FLOAT): Likewise.
35165         (BT_FN_INT16_FLOAT): Likewise.
35166         (BT_FN_UINT32_FLOAT): Likewise.
35167         (BT_FN_UINT16_FLOAT): Likewise.
35168         (BT_FN_UINT8_FLOAT): Likewise.
35169         (BT_FN_UINT64_FLOAT): Likewise.
35170         (BT_FN_UINT16_UINT32): Likewise.
35171         (BT_FN_UINT32_UINT16): Likewise.
35172         (BT_FN_UINT16_UINT16_UINT16): Likewise.
35173         (BT_FN_INT_PTR_INT): Likewise.
35174         (BT_FN_UINT_PTR_UINT): Likewise.
35175         (BT_FN_LONG_PTR_LONG): Likewise.
35176         (BT_FN_ULONG_PTR_ULONG): Likewise.
35177         (BT_FN_VOID_UINT64_UINT64): Likewise.
35178         (BT_FN_UINT8_UINT8_UINT8): Likewise.
35179         (BT_FN_INT8_INT8_INT8): Likewise.
35180         (BT_FN_INT16_INT16_INT16): Likewise.
35181         (BT_FN_INT_INT_INT): Likewise.
35182         (BT_FN_UINT_FLOAT_UINT): Likewise.
35183         (BT_FN_FLOAT_UINT_UINT): Likewise.
35184         (BT_FN_ULONG_UINT_UINT): Likewise.
35185         (BT_FN_ULONG_UINT_PTR): Likewise.
35186         (BT_FN_ULONG_ULONG_ULONG): Likewise.
35187         (BT_FN_UINT_UINT_UINT): Likewise.
35188         (BT_FN_VOID_UINT_PTR): Likewise.
35189         (BT_FN_UINT_UINT_PTR: Likewise.
35190         (BT_FN_UINT32_UINT64_PTR): Likewise.
35191         (BT_FN_INT_INT_UINT_UINT): Likewise.
35192         (BT_FN_UINT_UINT_UINT_UINT): Likewise.
35193         (BT_FN_UINT_UINT_UINT_PTR): Likewise.
35194         (BT_FN_UINT_ULONG_ULONG_UINT): Likewise.
35195         (BT_FN_ULONG_ULONG_ULONG_ULONG): Likewise.
35196         (BT_FN_LONG_LONG_UINT_UINT): Likewise.
35197         (BT_FN_ULONG_ULONG_UINT_UINT): Likewise.
35198         (BT_FN_VOID_UINT32_UINT64_PTR): Likewise.
35199         (BT_FN_VOID_UINT32_UINT32_PTR): Likewise.
35200         (BT_FN_UINT_UINT_UINT_UINT_UINT): Likewise.
35201         (BT_FN_UINT_FLOAT_FLOAT_FLOAT_FLOAT): Likewise.
35202         (BT_FN_ULONG_ULONG_ULONG_UINT_UINT): Likewise.
35203         * doc/frontends.texi: List BRIG FE.
35204         * doc/install.texi (Testing): Add BRIG tesring requirements.
35205         * doc/invoke.texi (Overall Options): Mention BRIG.
35206         * doc/standards.texi (Standards): Doucment BRIG HSA version.
35207
35208 2017-01-24  Richard Biener  <rguenther@suse.de>
35209
35210         PR translation/79208
35211         * ipa-devirt.c (odr_types_equivalent_p): Fix typo in diagnostic.
35212
35213 2017-01-24  Martin Jambor  <mjambor@suse.cz>
35214
35215         PR bootstrap/79198
35216         * ipa-prop.c (ipa_free_all_node_params): Call summary destructor.
35217         * ipa-prop.c (ipa_node_params_t::insert): Initialize fields known_csts
35218         and known_contexts.
35219
35220 2017-01-24  Aldy Hernandez  <aldyh@redhat.com>
35221
35222         PR middle-end/79123
35223         * gimple-ssa-warn-alloca.c (alloca_call_type): Make sure
35224         casts from signed to unsigned really don't have a range.
35225
35226 2017-01-24  Markus Trippelsdorf  <markus@trippelsdorf.de>
35227
35228         * gimple-ssa-sprintf.c (format_floating): Change MPFR_RNDx to
35229         GMP_RNDx for compatiblity.
35230
35231 2017-01-24  Martin Liska  <mliska@suse.cz>
35232
35233         PR bootstrap/79132
35234         * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Insert assert
35235         that would prevent us to call alloca with -1 as argument.
35236
35237 2017-01-24  Jakub Jelinek  <jakub@redhat.com>
35238
35239         * dwarf2out.c (output_compilation_unit_header, output_file_names):
35240         Avoid -Wformat-security warning.
35241
35242 2017-01-23  Andrew Pinski  <apinski@cavium.com>
35243
35244         * config/aarch64/aarch64.c (thunderx2t99_addrcost_table): Improve
35245         cost table.
35246
35247 2017-01-23  Martin Sebor  <msebor@redhat.com>
35248
35249         PR middle-end/78703
35250         * gimple-ssa-sprintf.c (warn_level): New global.
35251         (format_integer): Use it here and throughout the rest of the file.
35252         Use the same switch to compute sign as base.
35253         (maybe_warn): New function.
35254         (format_directive): Factor out warnings into maybe_warn.
35255         Add debugging output.  Use warn_level.
35256         (add_bytes): Use warn_level.
35257         (pass_sprintf_length::compute_format_length): Add debugging output.
35258         (try_substitute_return_value): Same.
35259         (pass_sprintf_length::handle_gimple_call): Set and use warn_level.
35260
35261         PR middle-end/78703
35262         * gimple-ssa-sprintf.c (struct format_result): Remove constant member.
35263         (struct fmtresult, format_integer, format_floating): Adjust.
35264         (fmtresult::fmtresult): Set max correctly in two argument ctor.
35265         (get_string_length, format_string,format_directive): Same.
35266         (pass_sprintf_length::compute_format_length): Same.
35267         (try_substitute_return_value): Simplify slightly.
35268
35269         PR middle-end/78703
35270         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust formatting.
35271         (fmtresult::operator+=): Outlined.
35272         (struct fmtresult): Add ctors.
35273         (struct conversion_spec): Rename...
35274         (struct directive): ...to this.  Add and remove data members.
35275         (directive::set_width, directive::set_precision): New functions.
35276         (format_percent): Use fmtresult ctor.
35277         (get_width_and_precision): Remove.
35278         (format_integer): Make naming changes.  Avoid computing width and
35279         precision.
35280         (format_floating): Same.  Adjust indentation.
35281         (format_character, format_none): New functions.
35282         (format_string): Moved character handling to format_character.
35283         (format_directive): Remove arguments, change return type.
35284         (parse_directive): New function.
35285         (pass_sprintf_length::compute_format_length): Move directive
35286         parsing to parse_directive.
35287
35288 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
35289
35290         * tree.h (assign_assembler_name_if_neeeded): Rename to ...
35291         (assign_assembler_name_if_needed): ... this.
35292         * tree.c (assign_assembler_name_if_neeeded): Rename to ...
35293         (assign_assembler_name_if_needed): ... this.
35294         (free_lang_data_in_cgraph): Adjust callers.
35295         * cgraphunit.c (cgraph_node::analyze): Likewise.
35296         * omp-expand.c (expand_omp_taskreg, expand_omp_target):
35297         Likewise.
35298
35299 2017-01-23  Richard Biener  <rguenther@suse.de>
35300
35301         PR tree-optimization/79088
35302         PR tree-optimization/79188
35303         * tree-ssa-threadupdate.c (mark_threaded_blocks): Move code
35304         resetting loop bounds after last path deletion.  Reset loop
35305         bounds of the target loop, make code match the comments.
35306         * tree-ssa-threadbackwards.c (pass_early_thread_jumps::execute):
35307         Make sure loops need no fixups.
35308
35309 2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
35310
35311         * config/rs6000/rs6000-builtin.def (VSIEDPF): Add scalar insert
35312         exponent support with double type for first argument.
35313         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Changed
35314         type returned by __builtin_vec_extract_sig,
35315         __builtin_vec_extract_sig_sp, and __builtin_vec_extract_sig_dp
35316         functions from "vector int" to "vector unsigned int" or from
35317         "vector long long int" to "vector unsigned long long int".
35318         Changed type returned by __builtin_vec_extract_exp,
35319         __builtin_vec_extract_exp_sp, and __builtin_vec_extract_exp_dp
35320         functions from "vector int" to "vector unsigned int" or from
35321         "vector long long int" to "vector unsigned long long int".
35322         Changed return type of __builtin_vec_test_data_class,
35323         __builtin_vec_test_data_class_sp, and
35324         __builtin_vec_test_data_class_dp from "vector int" to
35325         "vector bool int" or from "vector long long int" to "vector bool
35326         long long int" and changed second argument type from "unsigned
35327         int" to "int".  Added new overloaded function forms "vector float
35328         __builtin_vec_insert_exp (vector float, vector unsigned int)" and
35329         "vector float __builtin_vec_insert_exp_sp (vector float, vector
35330         unsigned int)" and "vector double __builtin_vec_insert_exp (vector
35331         double, vector unsigned long long int)" and "vector double
35332         __builtin_vec_insert_exp_dp (vector double, vector unsigned long
35333         long int)".  Changed return type of
35334         __builtin_scalar_test_data_class and
35335         __builtin_scalar_test_data_class_sp and
35336         __builtin_scalar_test_data_class_dp from "unsigned int" to "bool
35337         int" and changed second argument from "unsigned int" to "int".
35338         Changed type returned by __builtin_scalar_test_neg,
35339         __builtin_scalar_test_neg_sp, and __builtin_scalar_test_neg_dp
35340         from "int" to "bool int".  Added new overloaded function form
35341         "double __builtin_scalar_insert_exp (double, unsigned long long int)".
35342         * config/rs6000/vsx.md (xsiexpdpf): New insn for scalar insert
35343         exponent double-precision with floating point first argument.
35344         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
35345         documentation of scalar_test_data_class, scalar_test_neg,
35346         scalar_extract_sig, scalar_extract_exp, scalar_insert_exp,
35347         vector_extract_exp, vec_extract_sig, vec_insert_exp, and
35348         vec_test_data_class built-in functions to reflect refinements in
35349         their type signatures.
35350
35351 2017-01-23  Andreas Tobler  <andreast@gcc.gnu.org>
35352
35353         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor): Increase
35354         size of buf.
35355         (aarch64_elf_asm_destructor): Likewise.
35356
35357 2017-01-23  Bernd Schmidt  <bschmidt@redhat.com>
35358
35359         PR rtl-optimization/78634
35360         * config/i386/i386.c (ix86_max_noce_ifcvt_seq_cost): New function.
35361         (TARGET_MAX_NOCE_IFCVT_SEQ_COST): Define.
35362         * ifcvt.c (noce_try_cmove): Add missing cost check.
35363
35364         PR rtl-optimization/71724
35365         * combine.c (if_then_else_cond): Look for situations where it is
35366         beneficial to undo the work of one of the recursive calls.
35367
35368 2017-01-23  Bin Cheng  <bin.cheng@arm.com>
35369
35370         PR tree-optimization/70754
35371         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
35372         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
35373         combined stmt before it if not NULL.
35374         (combine_chains): Process refs reversely and compute dominance point
35375         for root ref.
35376
35377 2017-01-23  Martin Liska  <mliska@suse.cz>
35378
35379         PR tree-optimization/79196
35380         * tree-ssa-strlen.c (fold_strstr_to_memcmp): Rename to ...
35381         (fold_strstr_to_strncmp): ... this.  Fold the pattern to strncmp
35382         instead of memcmp.
35383         (strlen_optimize_stmt): Call the renamed function.
35384
35385 2017-01-23  Michael Matz  <matz@suse.de>
35386
35387         PR tree-optimization/78384
35388         * tree-ssa-loop-split.c (patch_loop_exit): Use correct edge.
35389
35390 2017-01-23  Richard Biener  <rguenther@suse.de>
35391
35392         PR tree-optimization/79186
35393         * tree-vrp.c (register_new_assert_for): Make sure we've seen
35394         both incoming edges before moving an assert.
35395
35396 2017-01-23  Martin Jambor  <mjambor@suse.cz>
35397
35398         * ipa-prop.c (load_from_param_1): Removed.
35399         (load_from_unmodified_param): Bits from load_from_param_1 put back
35400         here.
35401         (load_from_param): Removed.
35402         (compute_complex_assign_jump_func): Removed stmt2 and just replaced it
35403         with stmt.  Reverted back to use of load_from_unmodified_param.
35404
35405 2017-01-23  Martin Jambor  <mjambor@suse.cz>
35406
35407         PR ipa/79108
35408         * ipa-prop.h (ipa_param_descriptor): Anotate with with GTY(()).
35409         (ipa_node_params): Annotate with GTY((for_user)).  Make descriptors
35410         field a pointer to garbage collected vector, mark lattices and
35411         ipcp_orig_node with GTY((skip)).
35412         (ipa_get_param_count): Adjust to descriptors being a pointer.
35413         (ipa_get_param): Likewise.
35414         (ipa_get_type): Likewise.
35415         (ipa_get_param_move_cost): Likewise.
35416         (ipa_set_param_used): Likewise.
35417         (ipa_get_controlled_uses): Likewise.
35418         (ipa_set_controlled_uses): Likewise.
35419         (ipa_is_param_used): Likewise.
35420         (ipa_node_params_t): Move into garbage collector.  New methods insert
35421         and remove.
35422         (ipa_node_params_sum): Annotate wth GTY(()).
35423         (ipa_check_create_node_params): Adjust to ipa_node_params_sum being
35424         garbage collected.
35425         (ipa_load_from_parm_agg): Adjust declaration.
35426         * ipa-icf.c (param_used_p): Adjust to descriptors being a pointer.
35427         * ipa-profile.c (ipa_profile): Likewise.
35428         * ipa-prop.c (ipa_get_param_decl_index_1): Likewise.
35429         (ipa_populate_param_decls): Make descriptors parameter garbage
35430         collected.
35431         (ipa_dump_param): Adjust to descriptors being a pointer.
35432         (ipa_alloc_node_params): Likewise.
35433         (ipa_initialize_node_params): Likewise.
35434         (load_from_param_1): Make descriptors parameter garbage collected.
35435         (load_from_unmodified_param): Likewise.
35436         (load_from_param): Likewise.
35437         (ipa_load_from_parm_agg): Likewise.
35438         (ipa_node_params::~ipa_node_params): Removed.
35439         (ipa_free_all_node_params): Remove call to delete operator.
35440         (ipa_node_params_t::insert): New.
35441         (ipa_node_params_t::remove): Likewise.
35442         (ipa_node_params_t::duplicate): Adjust to descriptors being a pointer,
35443         copy known_csts and known_contexts vectors.
35444         (ipa_read_node_info): Adjust to descriptors being a pointer.
35445         (ipcp_modif_dom_walker): Make m_descriptors field garbage
35446         collected.
35447         (ipcp_transform_function): Make descriptors variable garbage
35448         collected.
35449
35450 2017-01-23  Andrew Senkevich  <andrew.senkevich@intel.com>
35451
35452         * config/i386/avx512bwintrin.h: Add k-mask test, kortest intrinsics.
35453         * config/i386/avx512dqintrin.h: Ditto.
35454         * config/i386/avx512fintrin.h: Ditto.
35455         * config/i386/i386.c: Handle new builtins.
35456         * config/i386/i386-builtin.def: Add new builtins.
35457         * config/i386/sse.md (ktest<mode>, kortest<mode>): New.
35458         (UNSPEC_KORTEST, UNSPEC_KTEST): New.
35459
35460 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
35461             Martin Liska  <mliska@suse.cz>
35462
35463         * asan.h: Define ASAN_USE_AFTER_SCOPE_ATTRIBUTE.
35464         * asan.c (asan_expand_poison_ifn): Support stores and use
35465         appropriate ASAN report function.
35466         * internal-fn.c (expand_ASAN_POISON_USE): New function.
35467         * internal-fn.def (ASAN_POISON_USE): Declare.
35468         * tree-into-ssa.c (maybe_add_asan_poison_write): New function.
35469         (maybe_register_def): Create ASAN_POISON_USE when sanitizing.
35470         * tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove
35471         ASAN_POISON calls w/o LHS.
35472         * tree-ssa.c (execute_update_addresses_taken): Create clobber
35473         for ASAN_MARK (UNPOISON, &x, ...) in order to prevent usage of a LHS
35474         from ASAN_MARK (POISON, &x, ...) coming to a PHI node.
35475         * gimplify.c (asan_poison_variables): Add attribute
35476         use_after_scope_memory to variables that really needs to live
35477         in memory.
35478         * tree-ssa.c (is_asan_mark_p): Do not rewrite into SSA when
35479         having the attribute.
35480
35481 2017-01-23  Martin Liska  <mliska@suse.cz>
35482
35483         * asan.c (create_asan_shadow_var): New function.
35484         (asan_expand_poison_ifn): Likewise.
35485         * asan.h (asan_expand_poison_ifn): New declaration.
35486         * internal-fn.c (expand_ASAN_POISON): Likewise.
35487         * internal-fn.def (ASAN_POISON): New builtin.
35488         * sanopt.c (pass_sanopt::execute): Expand
35489         asan_expand_poison_ifn.
35490         * tree-inline.c (copy_decl_for_dup_finish): Make function
35491         external.
35492         * tree-inline.h (copy_decl_for_dup_finish): Likewise.
35493         * tree-ssa.c (is_asan_mark_p): New function.
35494         (execute_update_addresses_taken): Rewrite local variables
35495         (identified just by use-after-scope as addressable) into SSA.
35496
35497 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
35498
35499         * doc/install.texi (Specific): opensource.apple.com uses https
35500         now. Remove trailing slash.
35501
35502 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
35503
35504         * README.Portability: Remove note on an Irix compatibility issue.
35505
35506 2017-01-22  Dimitry Andric <dim@FreeBSD.org>
35507
35508         * gcov.c (INCLUDE_ALGORITHM): Define.
35509         (INCLUDE_VECTOR): Define.
35510         No longer include <vector> and <algorithm> directly.
35511
35512 2017-01-21  Gerald Pfeifer  <gerald@pfeifer.com>
35513
35514         * doc/extend.texi (Thread-Local): Change www.akkadia.org reference
35515         to https.
35516         * doc/invoke.texi (Code Gen Options): Ditto.
35517
35518 2017-01-21  Jan Hubicka  <hubicka@ucw.cz>
35519
35520         PR lto/78407
35521         * cfg.c (update_bb_profile_for_threading): Fix updating of probablity.
35522
35523 2017-01-21  Bernd Schmidt  <bschmidt@redhat.com>
35524
35525         rtl-optimization/79125
35526         * cprop.c (local_cprop_pass): Handle cases where we make an
35527         unconditional trap.
35528
35529 2017-01-20  Segher Boessenkool  <segher@kernel.crashing.org>
35530
35531         PR target/61729
35532         PR target/77850
35533         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
35534         read from, for big endian.
35535
35536 2017-01-20  Jiong Wang  <jiong.wang@arm.com>
35537
35538         * config/aarch64/aarch64-builtins.c (aarch64_init_builtins): Register
35539         register pauth builtins for LP64 only.
35540
35541 2017-01-20  Marek Polacek  <polacek@redhat.com>
35542
35543         PR c/79152
35544         * gimplify.c (should_warn_for_implicit_fallthrough): Handle consecutive
35545         non-case labels.
35546
35547 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
35548
35549         * omp-expand.c (expand_omp_simd): Clear PROP_gimple_lomp_dev regardless
35550         of safelen status.
35551         * omp-offload.c (pass_omp_device_lower::gate): Use PROP_gimple_lomp_dev.
35552         * passes.c (dump_properties): Handle PROP_gimple_lomp_dev.
35553         * tree-inline.c (expand_call_inline): Propagate PROP_gimple_lomp_dev.
35554
35555 2017-01-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35556
35557         PR target/71270
35558         * config/arm/arm.c (neon_valid_immediate): Reject vector constants
35559         in big-endian mode when they are not a single duplicated value.
35560
35561 2017-01-20  Richard Biener  <rguenther@suse.de>
35562
35563         * BASE-VER: Bump to 7.0.1.
35564
35565 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
35566
35567         * omp-low.c (omplow_simd_context): New struct.  Use it...
35568         (lower_rec_simd_input_clauses): ...here and...
35569         (lower_rec_input_clauses): ...here to hold common data.  Adjust all
35570         references to idx, lane, max_vf, is_simt.
35571
35572 2017-01-20  Graham Markall  <graham.markall@embecosm.com>
35573
35574         * config/arc/arc.h (LINK_SPEC): Use arclinux_nps emulation when
35575         mcpu=nps400.
35576
35577 2017-01-20  Martin Jambor  <mjambor@suse.cz>
35578
35579         * hsa.h: Renaed to hsa-common.h.  Adjusted a comment.
35580         * hsa.c: Renaed to hsa-common.c.  Change include of gt-hsa.h to
35581         gt-hsa-common.h.
35582         * Makefile.in (OBJS): Rename hsa.o to hsa-common.o.
35583         (GTFILES): Rename hsa.c to hsa-common.c.
35584         * hsa-brig.c: Change include of hsa.h to hsa-common.h.
35585         * hsa-dump.c: Likewise.
35586         * hsa-gen.c: Likewise.
35587         * hsa-regalloc.c: Likewise.
35588         * ipa-hsa.c: Likewise.
35589         * omp-expand.c: Likewise.
35590         * omp-low.c: Likewise.
35591         * toplev.c: Likewise.
35592
35593 2017-01-20  Marek Polacek  <polacek@redhat.com>
35594
35595         PR c/64279
35596         * doc/invoke.texi: Document -Wduplicated-branches.
35597         * fold-const.c (operand_equal_p): Handle MODIFY_EXPR, INIT_EXPR,
35598         COMPOUND_EXPR, PREDECREMENT_EXPR, PREINCREMENT_EXPR,
35599         POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, CLEANUP_POINT_EXPR, EXPR_STMT,
35600         STATEMENT_LIST, and RETURN_EXPR.  For non-pure non-const functions
35601         return 0 only when not OEP_LEXICOGRAPHIC.
35602         (fold_build_cleanup_point_expr): Use the expression
35603         location when building CLEANUP_POINT_EXPR.
35604         * tree-core.h (enum operand_equal_flag): Add OEP_LEXICOGRAPHIC.
35605         * tree.c (add_expr): Handle error_mark_node.
35606
35607 2017-01-20  Martin Liska  <mliska@suse.cz>
35608
35609         PR lto/69188
35610         * tree-profile.c (init_ic_make_global_vars): Do not call
35611         finalize_decl.
35612         (gimple_init_gcov_profiler): Likewise.
35613
35614 2017-01-20  Martin Liska  <mliska@suse.cz>
35615
35616         PR ipa/71190
35617         * cgraph.h (maybe_create_reference): Remove argument and
35618         update comment.
35619         * cgraphclones.c (cgraph_node::create_virtual_clone): Remove one
35620         argument.
35621         * ipa-cp.c (create_specialized_node): Likewise.
35622         * symtab.c (symtab_node::maybe_create_reference): Handle
35623         VAR_DECLs and ADDR_EXPRs and select ipa_ref_use type.
35624
35625 2017-01-20  Martin Liska  <mliska@suse.cz>
35626
35627         * read-rtl-function.c (function_reader::create_function): Use
35628         build_decl instread of build_decl_stat.
35629
35630 2017-01-20  Andrew Senkevich  <andrew.senkevich@intel.com>
35631
35632         * config/i386/avx512bwintrin.h: Add k-mask registers shift intrinsics.
35633         * config/i386/avx512dqintrin.h: Ditto.
35634         * config/i386/avx512fintrin.h: Ditto.
35635         * config/i386/i386-builtin-types.def: Add new types.
35636         * config/i386/i386.c: Handle new types.
35637         * config/i386/i386-builtin.def (__builtin_ia32_kshiftliqi)
35638         (__builtin_ia32_kshiftlihi, __builtin_ia32_kshiftlisi)
35639         (__builtin_ia32_kshiftlidi, __builtin_ia32_kshiftriqi)
35640         (__builtin_ia32_kshiftrihi, __builtin_ia32_kshiftrisi)
35641         (__builtin_ia32_kshiftridi): New.
35642         * config/i386/sse.md (k<code><mode>): Rename *k<code><mode>.
35643
35644 2017-01-19  Segher Boessenkool  <segher@kernel.crashing.org>
35645
35646         PR target/78875
35647         PR target/79140
35648         * config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Unconditionally
35649         define to rs6000_init_stack_protect_guard.
35650         (rs6000_init_stack_protect_guard): New function.
35651
35652 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
35653             Yunqiang Su  <yunqiang.su@imgtec.com>
35654
35655         * config.gcc (supported_defaults): Add madd4.
35656         (with_madd4): Add validation.
35657         (all_defaults): Add madd4.
35658         * config/mips/mips.opt (mmadd4): New option.
35659         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
35660         mmadd4.
35661         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
35662         __mips_no_madd4.
35663         (ISA_HAS_UNFUSED_MADD4): Gate with mips_madd4.
35664         (ISA_HAS_FUSED_MADD4): Likewise.
35665         * doc/invoke.texi (-mmadd4): Document the new option.
35666         * doc/install.texi (--with-madd4): Document the new option.
35667
35668 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
35669
35670         * config/aarch64/aarch64-builtins.c (enum aarch64_builtins): New
35671         entries for AARCH64_PAUTH_BUILTIN_XPACLRI,
35672         AARCH64_PAUTH_BUILTIN_PACIA1716, AARCH64_PAUTH_BUILTIN_AUTIA1716.
35673         (aarch64_init_pauth_hint_builtins): New.
35674         (aarch64_init_builtins): Call aarch64_init_pauth_hint_builtins.
35675         (aarch64_expand_builtin): Expand new builtins.
35676
35677 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
35678
35679         * reg-notes.def (CFA_TOGGLE_RA_MANGLE): New reg-note.
35680         * combine-stack-adj.c (no_unhandled_cfa): Handle
35681         REG_CFA_TOGGLE_RA_MANGLE.
35682         * dwarf2cfi.c (dwarf2out_frame_debug): Handle REG_CFA_TOGGLE_RA_MANGLE.
35683         * config/aarch64/aarch64.c (aarch64_expand_prologue): Generates DWARF
35684         info for return address signing.
35685         (aarch64_expand_epilogue): Likewise.
35686
35687 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
35688
35689         * config/aarch64/aarch64-opts.h (aarch64_function_type): New enum.
35690         * config/aarch64/aarch64-protos.h
35691         (aarch64_return_address_signing_enabled): New declaration.
35692         * config/aarch64/aarch64.c (aarch64_return_address_signing_enabled):
35693         New function.
35694         (aarch64_expand_prologue): Sign return address before it's pushed onto
35695         stack.
35696         (aarch64_expand_epilogue): Authenticate return address fetched from
35697         stack.
35698         (aarch64_override_options): Sanity check for ILP32 and ISA level.
35699         (aarch64_attributes): New function attributes for "sign-return-address".
35700         * config/aarch64/aarch64.md (UNSPEC_AUTI1716, UNSPEC_AUTISP,
35701         UNSPEC_PACI1716, UNSPEC_PACISP, UNSPEC_XPACLRI): New unspecs.
35702         ("*do_return"): Generate combined instructions according to key index.
35703         ("<pauth_mnem_prefix>sp", "<pauth_mnem_prefix1716", "xpaclri"): New.
35704         * config/aarch64/iterators.md (PAUTH_LR_SP, PAUTH_17_16): New integer
35705         iterators.
35706         (pauth_mnem_prefix, pauth_hint_num_a): New integer attributes.
35707         * config/aarch64/aarch64.opt (msign-return-address=): New.
35708         * doc/extend.texi (AArch64 Function Attributes): Documents
35709         "sign-return-address=".
35710         * doc/invoke.texi (AArch64 Options): Documents "-msign-return-address=".
35711
35712 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
35713
35714         * doc/invoke.texi: Add missing -mlxc1-sxc1 options to
35715         overall option summary.
35716
35717 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
35718
35719         * config/aarch64/aarch64-arches.def: New entry for "armv8.3-a".
35720         * config/aarch64/aarch64.h (AARCH64_FL_V8_3, AARCH64_FL_FOR_ARCH8_3,
35721         AARCH64_ISA_V8_3, TARGET_ARMV8_3): New.
35722         * doc/invoke.texi (AArch64 Options): Document "armv8.3-a".
35723
35724 2017-01-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
35725
35726         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Enable
35727         -mpower9-minmax by default for -mcpu=power9.
35728         (ISA_3_MASKS_IEEE): Require -mvsx-small-integer to enable IEEE
35729         128-bit floating point.
35730
35731 2017-01-20  Alan Modra  <amodra@gmail.com>
35732
35733         * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if
35734         optimizing for size.
35735
35736 2017-01-20  Alan Modra  <amodra@gmail.com>
35737
35738         PR target/79144
35739         * config/rs6000/rs6000.c (expand_strn_compare): Get the asm name
35740         for strcmp and strncmp from corresponding builtin decl.
35741
35742 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
35743
35744         * config.gcc (x86_64-*-rtems*): Use i386/rtemself.h
35745         instead of i386/rtems-64.h.
35746         * config/i386/rtems-64.h: Remove.
35747
35748 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
35749
35750         PR target/78478
35751         Revert:
35752         2013-11-05  Uros Bizjak  <ubizjak@gmail.com>
35753
35754         * config/i386/rtemself.h (LONG_DOUBLE_TYPE_SIZE): New define.
35755
35756 2017-01-19  Tamar Christina  <tamar.christina@arm.com>
35757
35758         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
35759         Change int to HOST_WIDE_INT.
35760         * config/aarch64/aarch64-protos.h
35761         (aarch64_simd_gen_const_vector_dup): Likewise.
35762         * config/aarch64/aarch64-simd.md: Add copysign<mode>3.
35763
35764 2017-01-19  David Malcolm  <dmalcolm@redhat.com>
35765
35766         * langhooks-def.h (lhd_type_for_size): New decl.
35767         (LANG_HOOKS_TYPE_FOR_SIZE): Define as lhd_type_for_size.
35768         * langhooks.c (lhd_type_for_size): New function, taken from
35769         lto_type_for_size.
35770
35771 2017-01-19  Pat Haugen  <pthaugen@us.ibm.com>
35772
35773         * config/rs6000/power9.md (power9-alu): Remove 'cmp' type and add
35774         define_bypass for CR latency.
35775         (power9-cracked-alu): Update bypass latency and remove power9-branch.
35776         (power9-alu2): Add define_bypass for CR latency.
35777         (power9-cmp): New.
35778         (power9-mul): Update insn latency.
35779         (power9-mul-compare): Update insn latency, bypass latency and remove
35780         power9-branch.
35781
35782 2016-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35783
35784         * config/aarch64/aarch64-protos.h (aarch64_nopcrelative_literal_loads):
35785         Delete.
35786         * config/aarch64/aarch64.md
35787         (aarch64_reload_movcp<GPF_TF:mode><P:mode>): Delete reference to
35788         aarch64_nopcrelative_literal_loads.
35789         (aarch64_reload_movcp<VALL:mode><P:mode>): Likewise.
35790
35791 2017-01-19  Chenghua Xu  <paul.hua.gm@gmail.com>
35792
35793         * config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for
35794         TARGET_LOONGSON_3A.
35795         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A.
35796
35797 2017-01-19  Doug Gilmore  <doug.gilmore@imgtec.com>
35798
35799         PR target/78176
35800         * config.gcc (supported_defaults): Add lxc1-sxc1.
35801         (with_lxc1_sxc1): Add validation.
35802         (all_defaults): Add lxc1-sxc1.
35803         * config/mips/mips.opt (mlxc1-sxc1): New option.
35804         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
35805         mlxc1-sxc1.
35806         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
35807         __mips_no_lxc1_sxc1.
35808         (ISA_HAS_LXC1_SXC1): Gate with mips_lxc1_sxc1.
35809         * doc/invoke.texi (-mlxc1-sxc1): Document the new option.
35810         * doc/install.texi (--with-lxc1-sxc1): Document the new option.
35811
35812 2017-01-19  Richard Biener  <rguenther@suse.de>
35813
35814         PR tree-optimization/72488
35815         * tree-ssa-sccvn.c (run_scc_vn): When we abort the VN make
35816         sure to restore SSA info.
35817         * tree-ssa.c (verify_ssa): Verify SSA info is not shared.
35818
35819 2017-01-19  Richard Earnshaw  <rearnsha@arm.com>
35820
35821         PR rtl-optimization/79121
35822         * expr.c (expand_expr_real_2, case LSHIFT_EXPR): Look at the signedness
35823         of the inner type when shifting an extended value.
35824
35825 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
35826
35827         PR lto/78407
35828         * symtab.c (symtab_node::equal_address_to): Fix comparing of
35829         interposable aliases.
35830
35831 2017-01-18  Peter Bergner  <bergner@vnet.ibm.com>
35832
35833         PR target/78516
35834         * config/rs6000/spe.md (mov_si<mode>_e500_subreg0): Fix constraints.
35835         Use the evmergelohi instruction.
35836         (mov_si<mode>_e500_subreg4_2_le): Likewise.
35837         (mov_sitf_e500_subreg8_2_be): Likewise.
35838         (mov_sitf_e500_subreg12_2_le): Likewise.
35839         (mov_si<mode>_e500_subreg0_2_le): Fix constraints.
35840         (mov_si<mode>_e500_subreg4_2_be): Likewise.
35841         (mov_sitf_e500_subreg8_2_le): Likewise.
35842         (mov_sitf_e500_subreg12_2_be): Likewise.
35843
35844 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
35845
35846         * config/rs6000/altivec.md (altivec_vbpermq): Change "type"
35847         attribute from vecsimple to vecperm.
35848         (altivec_vbpermq2): Likewise.
35849
35850 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
35851
35852         PR target/79040
35853         * config/rs6000/altivec.h: Fix typo of vec_cntlz to vec_cnttz.
35854
35855 2017-01-18  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
35856         * config/rs6000/rs6000-protos.h (expand_strn_compare): Add arg.
35857         * config/rs6000/rs6000.c (expand_strn_compare): Add ability to expand
35858         strcmp. Fix bug where comparison didn't stop with zero byte. Fix
35859         case where N arg is SIZE_MAX.
35860         * config/rs6000/rs6000.md (cmpstrnsi): Args to expand_strn_compare.
35861         (cmpstrsi): Add pattern.
35862
35863 2017-01-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
35864
35865         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
35866         __builtin_vec_revb builtins.
35867         * config/rs6000/rs6000-builtins.def (P9V_BUILTIN_XXBRQ_V16QI): Add
35868         built-in functions to support generation of the ISA 3.0 XXBR<x>
35869         vector byte reverse instructions.
35870         (P9V_BUILTIN_XXBRQ_V1TI): Likewise.
35871         (P9V_BUILTIN_XXBRD_V2DI): Likewise.
35872         (P9V_BUILTIN_XXBRD_V2DF): Likewise.
35873         (P9V_BUILTIN_XXBGW_V4SI): Likewise.
35874         (P9V_BUILTIN_XXBGW_V4SF): Likewise.
35875         (P9V_BUILTIN_XXBGH_V8HI): Likewise.
35876         (P9V_BUILTIN_VEC_REVB): Likewise.
35877         * config/rs6000/vsx.md (p9_xxbrq_v1ti): New insns/expanders to
35878         generate the ISA 3.0 XXBR<x> vector byte reverse instructions.
35879         (p9_xxbrq_v16qi): Likewise.
35880         (p9_xxbrd_<mode>, VSX_D iterator): Likewise.
35881         (p9_xxbrw_<mode>, VSX_W iterator): Likewise.
35882         (p9_xxbrh_v8hi): Likewise.
35883         * config/rs6000/altivec.h (vec_revb): Define if ISA 3.0.
35884         * doc/extend.texi (RS/6000 Altivec Built-ins): Document the
35885         vec_revb built-in functions.
35886
35887 2017-01-18  Uros Bizjak  <ubizjak@gmail.com>
35888
35889         PR rtl-optimization/78952
35890         * config/i386/i386.md (any_extract): New code iterator.
35891         (*insvqi_2): Use any_extract for source operand.
35892         (*insvqi_3): Use any_shiftrt for source operand.
35893
35894 2017-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
35895
35896         * config/aarch64/aarch64.c (aarch64_sched_adjust_priority)
35897         New function.
35898         (TARGET_SCHED_ADJUST_PRIORITY): Define target hook.
35899
35900 2017-01-18  Matthias Klose  <doko@ubuntu.com>
35901
35902         * doc/install.texi: Allow default for --with-target-bdw-gc-include.
35903
35904 2016-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
35905
35906         * config/rs6000/altivec.h (vec_bperm): Change #define.
35907         * config/rs6000/altivec.md (UNSPEC_VBPERMD): New enum constant.
35908         (altivec_vbpermq2): New define_insn.
35909         (altivec_vbpermd): Likewise.
35910         * config/rs6000/rs6000-builtin.def (VBPERMQ2): New monomorphic
35911         function interface.
35912         (VBPERMD): Likewise.
35913         (VBPERM): New polymorphic function interface.
35914         * config/rs6000/r6000-c.c (altivec_overloaded_builtins_table):
35915         Add entries for P9V_BUILTIN_VEC_VBPERM.
35916         * doc/extend.texi: Add interfaces for vec_bperm.
35917
35918 2017-01-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35919
35920         * config/s390/s390-c.c (s390_expand_overloaded_builtin): Downcase
35921         first letter of error messages.
35922         (s390_resolve_overloaded_builtin): Likewise.
35923         * config/s390/s390.c (s390_expand_builtin): Likewise.
35924         (s390_invalid_arg_for_unprototyped_fn): Likewise.
35925         (s390_valid_target_attribute_inner_p): Likewise.
35926         * config/s390/s390.md ("tabort"): Likewise.
35927
35928 2017-01-18  Toma Tabacu  <toma.tabacu@imgtec.com>
35929
35930         * config/mips/mips.h (ISA_HAS_DIV3): Remove unused macro.
35931         (ISA_AVOID_DIV_HILO): New macro.
35932         (ISA_HAS_DIV): Use new ISA_AVOID_DIV_HILO macro.
35933         (ISA_HAS_DDIV): Likewise.
35934
35935 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
35936
35937         * doc/invoke.texi (fabi-version): Correct number of occurrences.
35938
35939 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
35940
35941         * doc/invoke.texi (fabi-version): Spelling fix.
35942
35943 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
35944
35945         PR c++/70182
35946         * doc/invoke.texi (fabi-version): Mention mangling fix for
35947         operator names.
35948
35949 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
35950
35951         PR c++/77489
35952         * doc/invoke.texi (fabi-version): Document discriminator mangling.
35953
35954 2017-01-17  Segher Boessenkool  <segher@kernel.crashing.org>
35955
35956         PR target/78875
35957         * config/rs6000/rs6000-opts.h (stack_protector_guard): New enum.
35958         * config/rs6000/rs6000.c (rs6000_option_override_internal): Handle
35959         the new options.
35960         * config/rs6000/rs6000.md (stack_protect_set): Handle the new more
35961         flexible settings.
35962         (stack_protect_test): Ditto.
35963         * config/rs6000/rs6000.opt (mstack-protector-guard=,
35964         mstack-protector-guard-reg=, mstack-protector-guard-offset=): New
35965         options.
35966         * doc/invoke.texi (Option Summary) [RS/6000 and PowerPC Options]:
35967         Add -mstack-protector-guard=, -mstack-protector-guard-reg=, and
35968         -mstack-protector-guard-offset=.
35969         (RS/6000 and PowerPC Options): Ditto.
35970
35971 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
35972
35973         * config/i386/i386.h (MASK_CLASS_P): New define.
35974         * config/i386/i386.c (inline_secondary_memory_needed): Ensure that
35975         there are no registers from different register sets also when
35976         mask registers are used.  Update function comment.
35977         * config/i386/i386.md (*movsi_internal): Split (*k/*krm) alternative
35978         to (*k/*r) and (*k/*km) alternatives.
35979
35980 2017-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
35981
35982         * config/aarch64/aarch64.md (eh_return): Remove pattern and splitter.
35983         * config/aarch64/aarch64.h (AARCH64_EH_STACKADJ_REGNUM): Remove.
35984         (EH_RETURN_HANDLER_RTX): New define.
35985         * config/aarch64/aarch64.c (aarch64_frame_pointer_required):
35986         Force frame pointer in EH return functions.
35987         (aarch64_expand_epilogue): Add barrier for eh_return.
35988         (aarch64_final_eh_return_addr): Remove.
35989         (aarch64_eh_return_handler_rtx): New function.
35990         * config/aarch64/aarch64-protos.h (aarch64_final_eh_return_addr):
35991         Remove.
35992         (aarch64_eh_return_handler_rtx): New prototype.
35993
35994 2017-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
35995
35996         * config/rs6000/altivec.h (vec_rlmi): New #define.
35997         (vec_vrlnm): Likewise.
35998         (vec_rlnm): Likewise.
35999         * config/rs6000/altivec.md (UNSPEC_VRLMI): New UNSPEC enum value.
36000         (UNSPEC_VRLNM): Likewise.
36001         (VIlong): New mode iterator.
36002         (altivec_vrl<VI_char>mi): New define_insn.
36003         (altivec_vrl<VI_char>nm): Likewise.
36004         * config/rs6000/rs6000-builtin.def (VRLWNM): New monomorphic
36005         function entry.
36006         (VRLDNM): Likewise.
36007         (RLNM): New polymorphic function entry.
36008         (VRLWMI): New monomorphic function entry.
36009         (VRLDMI): Likewise.
36010         (RLMI): New polymorphic function entry.
36011         * config/rs6000/r6000-c.c (altivec_overloaded_builtin_table): Add
36012         new entries for P9V_BUILTIN_VEC_RLMI and P9V_BUILTIN_VEC_RLNM.
36013         * doc/extend.texi: Add description of vec_rlmi, vec_rlnm, and
36014         vec_vrlnm.
36015
36016 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
36017
36018         PR debug/78839
36019         * dwarf2out.c (field_byte_offset): Restore the
36020         PCC_BITFIELD_TYPE_MATTERS behavior for INTEGER_CST DECL_FIELD_OFFSET
36021         and DECL_FIELD_BIT_OFFSET.  Use fold_build2 instead of build2 + fold.
36022         (analyze_variants_discr, gen_variant_part): Use fold_build2 instead
36023         of build2 + fold.
36024
36025 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
36026
36027         PR ada/67205
36028         * config/aarch64/aarch64.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define
36029
36030 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
36031
36032         PR debug/71669
36033         * dwarf2out.c (add_data_member_location_attribute): For constant
36034         offset bitfield emit for -gdwarf-5 DW_AT_data_bit_offset attribute
36035         instead of DW_AT_data_member_location, DW_AT_bit_offset and
36036         DW_AT_byte_size attributes.
36037
36038 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
36039
36040         * config/rs6000/rs6000.c (rs6000_emit_move): Also use a TOC reference
36041         after forcing to constant memory when the code model is medium.
36042
36043 2017-01-17  Julia Koval  <julia.koval@intel.com>
36044
36045         PR target/76731
36046         * config/i386/avx512fintrin.h
36047         (_mm512_i32gather_ps): Change __addr type to void const*.
36048         (_mm512_mask_i32gather_ps): Ditto.
36049         (_mm512_i32gather_pd): Ditto.
36050         (_mm512_mask_i32gather_pd): Ditto.
36051         (_mm512_i64gather_ps): Ditto.
36052         (_mm512_mask_i64gather_ps): Ditto.
36053         (_mm512_i64gather_pd): Ditto.
36054         (_mm512_mask_i64gather_pd): Ditto.
36055         (_mm512_i32gather_epi32): Ditto.
36056         (_mm512_mask_i32gather_epi32): Ditto.
36057         (_mm512_i32gather_epi64): Ditto.
36058         (_mm512_mask_i32gather_epi64): Ditto.
36059         (_mm512_i64gather_epi32): Ditto.
36060         (_mm512_mask_i64gather_epi32): Ditto.
36061         (_mm512_i64gather_epi64): Ditto.
36062         (_mm512_mask_i64gather_epi64): Ditto.
36063         (_mm512_i32scatter_ps): Change __addr type to void*.
36064         (_mm512_mask_i32scatter_ps): Ditto.
36065         (_mm512_i32scatter_pd): Ditto.
36066         (_mm512_mask_i32scatter_pd): Ditto.
36067         (_mm512_i64scatter_ps): Ditto.
36068         (_mm512_mask_i64scatter_ps): Ditto.
36069         (_mm512_i64scatter_pd): Ditto.
36070         (_mm512_mask_i64scatter_pd): Ditto.
36071         (_mm512_i32scatter_epi32): Ditto.
36072         (_mm512_mask_i32scatter_epi32): Ditto.
36073         (_mm512_i32scatter_epi64): Ditto.
36074         (_mm512_mask_i32scatter_epi64): Ditto.
36075         (_mm512_i64scatter_epi32): Ditto.
36076         (_mm512_mask_i64scatter_epi32): Ditto.
36077         (_mm512_i64scatter_epi64): Ditto.
36078         (_mm512_mask_i64scatter_epi64): Ditto.
36079         * config/i386/avx512pfintrin.h
36080         (_mm512_mask_prefetch_i32gather_pd): Change __addr type to void const*.
36081         (_mm512_mask_prefetch_i32gather_ps): Ditto.
36082         (_mm512_mask_prefetch_i64gather_pd): Ditto.
36083         (_mm512_mask_prefetch_i64gather_ps): Ditto.
36084         (_mm512_prefetch_i32scatter_pd): Change __addr type to void*.
36085         (_mm512_prefetch_i32scatter_ps): Ditto.
36086         (_mm512_mask_prefetch_i32scatter_pd): Ditto.
36087         (_mm512_mask_prefetch_i32scatter_ps): Ditto.
36088         (_mm512_prefetch_i64scatter_pd): Ditto.
36089         (_mm512_prefetch_i64scatter_ps): Ditto.
36090         (_mm512_mask_prefetch_i64scatter_pd): Ditto.
36091         (_mm512_mask_prefetch_i64scatter_ps): Ditto.
36092         * config/i386/avx512vlintrin.h
36093         (_mm256_mmask_i32gather_ps): Change __addr type to void const*.
36094         (_mm_mmask_i32gather_ps): Ditto.
36095         (_mm256_mmask_i32gather_pd): Ditto.
36096         (_mm_mmask_i32gather_pd): Ditto.
36097         (_mm256_mmask_i64gather_ps): Ditto.
36098         (_mm_mmask_i64gather_ps): Ditto.
36099         (_mm256_mmask_i64gather_pd): Ditto.
36100         (_mm_mmask_i64gather_pd): Ditto.
36101         (_mm256_mmask_i32gather_epi32): Ditto.
36102         (_mm_mmask_i32gather_epi32): Ditto.
36103         (_mm256_mmask_i32gather_epi64): Ditto.
36104         (_mm_mmask_i32gather_epi64): Ditto.
36105         (_mm256_mmask_i64gather_epi32): Ditto.
36106         (_mm_mmask_i64gather_epi32): Ditto.
36107         (_mm256_mmask_i64gather_epi64): Ditto.
36108         (_mm_mmask_i64gather_epi64): Ditto.
36109         (_mm256_i32scatter_ps): Change __addr type to void*.
36110         (_mm256_mask_i32scatter_ps): Ditto.
36111         (_mm_i32scatter_ps): Ditto.
36112         (_mm_mask_i32scatter_ps): Ditto.
36113         (_mm256_i32scatter_pd): Ditto.
36114         (_mm256_mask_i32scatter_pd): Ditto.
36115         (_mm_i32scatter_pd): Ditto.
36116         (_mm_mask_i32scatter_pd): Ditto.
36117         (_mm256_i64scatter_ps): Ditto.
36118         (_mm256_mask_i64scatter_ps): Ditto.
36119         (_mm_i64scatter_ps): Ditto.
36120         (_mm_mask_i64scatter_ps): Ditto.
36121         (_mm256_i64scatter_pd): Ditto.
36122         (_mm256_mask_i64scatter_pd): Ditto.
36123         (_mm_i64scatter_pd): Ditto.
36124         (_mm_mask_i64scatter_pd): Ditto.
36125         (_mm256_i32scatter_epi32): Ditto.
36126         (_mm256_mask_i32scatter_epi32): Ditto.
36127         (_mm_i32scatter_epi32): Ditto.
36128         (_mm_mask_i32scatter_epi32): Ditto.
36129         (_mm256_i32scatter_epi64): Ditto.
36130         (_mm256_mask_i32scatter_epi64): Ditto.
36131         (_mm_i32scatter_epi64): Ditto.
36132         (_mm_mask_i32scatter_epi64): Ditto.
36133         (_mm256_i64scatter_epi32): Ditto.
36134         (_mm256_mask_i64scatter_epi32): Ditto.
36135         (_mm_i64scatter_epi32): Ditto.
36136         (_mm_mask_i64scatter_epi32): Ditto.
36137         (_mm256_i64scatter_epi64): Ditto.
36138         (_mm256_mask_i64scatter_epi64): Ditto.
36139         (_mm_i64scatter_epi64): Ditto.
36140         (_mm_mask_i64scatter_epi64): Ditto.
36141         * config/i386/i386-builtin-types.def (V16SF_V16SF_PCFLOAT_V16SI_HI_INT)
36142         (V8DF_V8DF_PCDOUBLE_V8SI_QI_INT, V8SF_V8SF_PCFLOAT_V8DI_QI_INT)
36143         (V8DF_V8DF_PCDOUBLE_V8DI_QI_INT, V16SI_V16SI_PCINT_V16SI_HI_INT)
36144         (V8DI_V8DI_PCINT64_V8SI_QI_INT, V8SI_V8SI_PCINT_V8DI_QI_INT)
36145         (V8DI_V8DI_PCINT64_V8DI_QI_INT, V2DF_V2DF_PCDOUBLE_V4SI_QI_INT)
36146         (V4DF_V4DF_PCDOUBLE_V4SI_QI_INT, V2DF_V2DF_PCDOUBLE_V2DI_QI_INT)
36147         (V4DF_V4DF_PCDOUBLE_V4DI_QI_INT, V4SF_V4SF_PCFLOAT_V4SI_QI_INT)
36148         (V8SF_V8SF_PCFLOAT_V8SI_QI_INT, V4SF_V4SF_PCFLOAT_V2DI_QI_INT)
36149         (V4SF_V4SF_PCFLOAT_V4DI_QI_INT, V2DI_V2DI_PCINT64_V4SI_QI_INT)
36150         (V4DI_V4DI_PCINT64_V4SI_QI_INT, V2DI_V2DI_PCINT64_V2DI_QI_INT)
36151         (V4DI_V4DI_PCINT64_V4DI_QI_INT, V4SI_V4SI_PCINT_V4SI_QI_INT)
36152         (V8SI_V8SI_PCINT_V8SI_QI_INT, V4SI_V4SI_PCINT_V2DI_QI_INT)
36153         (V4SI_V4SI_PCINT_V4DI_QI_INT, VOID_PFLOAT_HI_V16SI_V16SF_INT)
36154         (VOID_PFLOAT_QI_V8SI_V8SF_INT, VOID_PFLOAT_QI_V4SI_V4SF_INT)
36155         (VOID_PDOUBLE_QI_V8SI_V8DF_INT, VOID_PDOUBLE_QI_V4SI_V4DF_INT)
36156         (VOID_PDOUBLE_QI_V4SI_V2DF_INT, VOID_PFLOAT_QI_V8DI_V8SF_INT)
36157         (VOID_PFLOAT_QI_V4DI_V4SF_INT, VOID_PFLOAT_QI_V2DI_V4SF_INT)
36158         (VOID_PDOUBLE_QI_V8DI_V8DF_INT, VOID_PDOUBLE_QI_V4DI_V4DF_INT)
36159         (VOID_PDOUBLE_QI_V2DI_V2DF_INT, VOID_PINT_HI_V16SI_V16SI_INT)
36160         (VOID_PINT_QI_V8SI_V8SI_INT, VOID_PINT_QI_V4SI_V4SI_INT)
36161         (VOID_PLONGLONG_QI_V8SI_V8DI_INT, VOID_PLONGLONG_QI_V4SI_V4DI_INT)
36162         (VOID_PLONGLONG_QI_V4SI_V2DI_INT, VOID_PINT_QI_V8DI_V8SI_INT)
36163         (VOID_PINT_QI_V4DI_V4SI_INT, VOID_PINT_QI_V2DI_V4SI_INT)
36164         (VOID_PLONGLONG_QI_V8DI_V8DI_INT, VOID_QI_V8SI_PCINT64_INT_INT)
36165         (VOID_PLONGLONG_QI_V4DI_V4DI_INT, VOID_PLONGLONG_QI_V2DI_V2DI_INT)
36166         (VOID_HI_V16SI_PCINT_INT_INT, VOID_QI_V8DI_PCINT64_INT_INT)
36167         (VOID_QI_V8DI_PCINT_INT_INT): Remove.
36168         (V16SF_V16SF_PCVOID_V16SI_HI_INT,  V8DF_V8DF_PCVOID_V8SI_QI_INT)
36169         (V8SF_V8SF_PCVOID_V8DI_QI_INT, V8DF_V8DF_PCVOID_V8DI_QI_INT)
36170         (V16SI_V16SI_PCVOID_V16SI_HI_INT, V8DI_V8DI_PCVOID_V8SI_QI_INT)
36171         (V8SI_V8SI_PCVOID_V8DI_QI_INT, V8DI_V8DI_PCVOID_V8DI_QI_INT)
36172         (VOID_PVOID_HI_V16SI_V16SF_INT, VOID_PVOID_QI_V8SI_V8DF_INT)
36173         (VOID_PVOID_QI_V8DI_V8SF_INT, VOID_PVOID_QI_V8DI_V8DF_INT)
36174         (VOID_PVOID_HI_V16SI_V16SI_INT, VOID_PVOID_QI_V8SI_V8DI_INT)
36175         (VOID_PVOID_QI_V8DI_V8SI_INT, VOID_PVOID_QI_V8DI_V8DI_INT)
36176         (V2DF_V2DF_PCVOID_V4SI_QI_INT, V4DF_V4DF_PCVOID_V4SI_QI_INT)
36177         (V2DF_V2DF_PCVOID_V2DI_QI_INT, V4DF_V4DF_PCVOID_V4DI_QI_INT
36178         (V4SF_V4SF_PCVOID_V4SI_QI_INT, V8SF_V8SF_PCVOID_V8SI_QI_INT)
36179         (V4SF_V4SF_PCVOID_V2DI_QI_INT, V4SF_V4SF_PCVOID_V4DI_QI_INT)
36180         (V2DI_V2DI_PCVOID_V4SI_QI_INT, V4DI_V4DI_PCVOID_V4SI_QI_INT)
36181         (V2DI_V2DI_PCVOID_V2DI_QI_INT, V4DI_V4DI_PCVOID_V4DI_QI_INT)
36182         (V4SI_V4SI_PCVOID_V4SI_QI_INT, V8SI_V8SI_PCVOID_V8SI_QI_INT)
36183         (V4SI_V4SI_PCVOID_V2DI_QI_INT, V4SI_V4SI_PCVOID_V4DI_QI_INT)
36184         (VOID_PVOID_QI_V8SI_V8SF_INT, VOID_PVOID_QI_V4SI_V4SF_INT)
36185         (VOID_PVOID_QI_V4SI_V4DF_INT, VOID_PVOID_QI_V4SI_V2DF_INT)
36186         (VOID_PVOID_QI_V4DI_V4SF_INT, VOID_PVOID_QI_V2DI_V4SF_INT)
36187         (VOID_PVOID_QI_V4DI_V4DF_INT, VOID_PVOID_QI_V2DI_V2DF_INT)
36188         (VOID_PVOID_QI_V8SI_V8SI_INT, VOID_PVOID_QI_V4SI_V4SI_INT)
36189         (VOID_PVOID_QI_V4SI_V4DI_INT, VOID_PVOID_QI_V4SI_V2DI_INT)
36190         (VOID_PVOID_QI_V4DI_V4SI_INT, VOID_PVOID_QI_V2DI_V4SI_INT)
36191         (VOID_PVOID_QI_V4DI_V4DI_INT, VOID_PVOID_QI_V2DI_V2DI_INT)
36192         (VOID_QI_V8SI_PCVOID_INT_INT, VOID_HI_V16SI_PCVOID_INT_INT)
36193         (VOID_QI_V8DI_PCVOID_INT_INT): Add.
36194         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Adjust builtin
36195         definitions accordingly.
36196
36197 2017-01-17  Kito Cheng  <kito.cheng@gmail.com>
36198             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
36199
36200         PR target/79079
36201         * internal-fn.c (expand_mul_overflow): Use convert_modes instead of
36202         gen_lowpart.
36203
36204 2017-01-17  Vladimir Makarov  <vmakarov@redhat.com>
36205
36206         PR target/79058
36207         * ira-conflicts.c (ira_build_conflicts): Update total conflict
36208         hard regs for inner regno.
36209
36210 2017-01-17  Martin Liska  <mliska@suse.cz>
36211
36212         PR ipa/71207
36213         * ipa-polymorphic-call.c (contains_type_p): Fix wrong
36214         assumption and add comment.
36215
36216 2017-01-17  Nathan Sidwell  <nathan@acm.org>
36217
36218         * ipa-visibility.c (localize_node): New function, broken out of ...
36219         (function_and_variable_visibility): ... here. Call it.
36220
36221 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
36222
36223         PR middle-end/77445
36224         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges):
36225         correctly set frequency of oudgoing edge.
36226         (duplicate_thread_path): Fix profile updating.
36227
36228 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
36229
36230         PR other/79046
36231         * configure.ac: Add GCC_BASE_VER.
36232         * Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
36233         version from BASE-VER file.
36234         (CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
36235         (gcc.o): Depend on $(BASEVER).
36236         * common.opt (dumpfullversion): New option.
36237         * gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
36238         * doc/invoke.texi: Document -dumpfullversion.
36239         * doc/install.texi: Document --with-gcc-major-version-only.
36240         * configure: Regenerated.
36241
36242 2017-01-17  Richard Biener  <rguenther@suse.de>
36243
36244         PR tree-optimization/71433
36245         * tree-vrp.c (register_new_assert_for): Merge same asserts
36246         on all incoming edges.
36247         (process_assert_insertions_for): Handle insertions at the
36248         beginning of BBs.
36249
36250 2017-01-17  Gerald Pfeifer  <gerald@pfeifer.com>
36251
36252         * config/i386/cygwin.h (LIBGCJ_SONAME): Remove.
36253         * config/i386/mingw32.h (LIBGCJ_SONAME): Remove.
36254
36255 2017-01-17  Kaz Kojima  <kkojima@gcc.gnu.org>
36256
36257         PR target/78633
36258         * config/sh/sh.md (cmpeqsi_t+1): Call copy_rtx to avoid invalid
36259         RTL sharing.
36260
36261 2017-01-17  Alan Modra  <amodra@gmail.com>
36262
36263         PR target/79066
36264         * config/rs6000/rs6000.md (elf_high, elf_low): Disable when pic.
36265         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Don't allow
36266         symbolic stack limit when pic.
36267
36268 2017-01-16  Martin Sebor  <msebor@redhat.com>
36269
36270         PR tree-optimization/78608
36271         * gimple-ssa-sprintf.c (tree_digits): Avoid negating TYPE_MIN.
36272
36273 2017-01-16  Jeff Law  <law@redhat.com>
36274
36275         Revert:
36276         2016-12-02  Tadek Kijkowski  <tkijkowski@gmail.com>
36277         * Makefile.in (PREPROCESSOR_DEFINES): Add a level of indirection
36278         for several include directories that may be relative to sysroot.
36279         * config/i386/x-mingw32 (gplus_includedir): Define.
36280         (gplus_tool_includedir, gplus_backward_include_dir): Likewise.
36281         (native_system_includedir): Likewise.
36282         * config/i386/mingw32.h (STANDARD_STARTFILE_PREFIX_1): Do not
36283         override if TARGET_SYSTEM_ROOT is defined.
36284         (NATIVE_SYSTEM_HEADER_DIR): Likewise.
36285
36286         PR tree-optimization/79090
36287         PR tree-optimization/33562
36288         PR tree-optimization/61912
36289         PR tree-optimization/77485
36290         * tree-ssa-dse.c (compute_trims): Accept STMT argument.  Dump STMT
36291         and computed trims into the dump file.
36292
36293 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
36294
36295         * config/i386/i386.h (LIMIT_RELOAD_CLASS): Remove.
36296
36297 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
36298
36299         PR c/79089
36300         * gimplify.c (gimplify_init_constructor): If want_value and
36301         object == lhs, unshare lhs to avoid invalid tree sharing.  Formatting
36302         fix.
36303
36304         PR target/79080
36305         * loop-doloop.c (doloop_modify): Call unshare_all_rtl_in_chain on
36306         sequence.  Formatting fixes.
36307         (doloop_optimize): Formatting fixes.
36308
36309         PR driver/49726
36310         * gcc.c (debug_level_greater_than_spec_func): New function.
36311         (static_spec_functions): Add debug-level-gt spec function.
36312         (ASM_DEBUG_SPEC, cpp_options): Use %:debug-level-gt(0) instead of
36313         !g0.
36314         * config/darwin.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
36315         * config/darwin9.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
36316         * common.opt (g, gcoff, gdwarf, gdwarf-, ggdb, gno-pubnames,
36317         gpubnames, ggnu-pubnames, gno-record-gcc-switches,
36318         grecord-gcc-switches, gno-strict-dwarf, gstrict-dwarf, gstabs,
36319         gstabs+, gtoggle, gvms, gxcoff, gxcoff+): Add Driver flag.
36320
36321 2017-01-16  Uros Bizjak  <ubizjak@gmail.com>
36322
36323         * config/i386/i386.h (HARD_REGNO_CALLER_SAVE_MODE): Apply HImode and
36324         QImode fixups to general and mask registers only.
36325
36326 2017-01-16  Carl Love  <cel@us.ibm.com>
36327
36328         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Add support
36329         for built-in functions
36330         vector signed char vec_nabs (vector signed char)
36331         vector signed short vec_nabs (vector signed short)
36332         vector signed int vec_nabs (vector signed int)
36333         vector signed long long vec_nabs (vector signed long long)
36334         vector float vec_nabs (vector float)
36335         vector double vec_nabs (vector double)
36336         * config/rs6000/rs6000-builtin.def: Add definitions for NABS functions
36337         and NABS overload.
36338         * config/rs6000/altivec.md: New define_expand nabs<mode>2 types
36339         * config/rs6000/altivec.h: New define for vec_nabs built-in function.
36340         * doc/extend.texi: Update the documentation file for the new built-in
36341         functions.
36342
36343 2017-01-16  Martin Sebor  <msebor@redhat.com>
36344
36345         * gimple-ssa-sprintf.c (format_directive): Correct a typo in a warning
36346         message.
36347
36348 2017-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
36349
36350         * config/rs6000/rs6000.c (rtx_is_swappable_p): Change
36351         UNSPEC_VSX__XXSPLTD to require special splat handling.
36352
36353 2017-01-16  David Malcolm  <dmalcolm@redhat.com>
36354
36355         PR bootstrap/78616
36356         * system.h: Poison strndup.
36357
36358 2017-01-16  Alan Modra  <amodra@gmail.com>
36359
36360         PR target/79098
36361         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Don't
36362         use a switch.
36363
36364 2017-01-16  Georg-Johann Lay  <avr@gjlay.de>
36365
36366         * config/avr/avr.h (BRANCH_COST) [reload_completed]: Increase by 4.
36367
36368 2017-01-15  Uros Bizjak  <ubizjak@gmail.com>
36369
36370         * config/i386/i386.c (ix86_legitimate_combined_insn): Do not
36371         call recog here.  Assert that INSN_CODE (insn) is non-negative.
36372
36373 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
36374
36375         PR target/72749
36376         * cfgrtl.c (rtl_split_edge): Also patch jump insns that jump to the
36377         fallthrough.
36378         * haifa-sched.c (dump_insn_stream): Don't crash if there is a label
36379         in the currently scheduled RTL fragment.
36380
36381 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
36382
36383         PR rtl-optimization/78751
36384         * ifcvt.c (find_cond_trap): If we generated a non-existing insn,
36385         give up.
36386
36387 2017-01-14  Jeff Law  <law@redhat.com>
36388
36389         PR tree-optimization/79090
36390         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject zero length and
36391         variable length stores.
36392         (compute_trims): Delete dead assignment to *trim_tail.
36393         (dse_dom_walker::dse_optimize_stmt): Optimize mem* calls with
36394         zero length.
36395
36396 2017-01-14  Bernd Schmidt  <bschmidt@redhat.com>
36397
36398         PR rtl-optimization/78626
36399         PR rtl-optimization/78727
36400         * cprop.c (one_cprop_pass): Collect unconditional traps in the middle
36401         of a block, and split such blocks after everything else is finished.
36402
36403 2017-01-14  Alan Modra  <amodra@gmail.com>
36404
36405         PR target/72749
36406         * combine.c (recog_for_combine_1): Set INSN_CODE before calling
36407         target legitimate_combined_insn.
36408         * config/rs6000/rs6000.c (TARGET_LEGITIMATE_COMBINED_INSN): Define.
36409         (rs6000_legitimate_combined_insn): New function.
36410         * config/rs6000/rs6000.md (UNSPEC_DOLOOP): Delete, and remove
36411         all uses.
36412         (ctr<mode>_internal3): Rename from *ctr<mode>_internal5.
36413         (ctr<mode>_internal4): Rename from *ctr<mode>_internal6.
36414         (ctr<mode>_internal1, ctr<mode>_internal2): Remove '*' from name.
36415
36416 2017-01-14  Gerald Pfeifer  <gerald@pfeifer.com>
36417
36418         * doc/frontends.texi (G++ and GCC): Remove references to Java.
36419
36420 2017-01-13  Jeff Law  <law@redhat.com>
36421
36422         PR tree-optimization/33562
36423         PR tree-optimization/61912
36424         PR tree-optimization/77485
36425         * tree-ssa-dse.c (delete_dead_call): Accept gsi rather than
36426         a statement.
36427         (delete_dead_assignment): Likewise.
36428         (dse_dom_walker::dse_optimize_stmt): Pass in the gsi rather than
36429         statement to delete_dead_call and delete_dead_assignment.
36430
36431 2017-01-13  David Malcolm  <dmalcolm@redhat.com>
36432
36433         PR c/78304
36434         * substring-locations.c (format_warning_va): Strengthen case 1 so
36435         that both endpoints of the substring must be within the format
36436         range for just the substring to be printed.
36437
36438 2017-01-13  Uros Bizjak  <ubizjak@gmail.com>
36439
36440         * config/i386/i386.opt (msgx): Use ix86_isa_flags2 variable.
36441         * config/i386/i386.c (ix86_target_string): Add missing options
36442         to isa_opts and reorder options by implied ISAs.  Rename isa_opts2 to
36443         isa2_opts, ix86_flag_opts to flag2_opts, ix86_target_other to
36444         flags_other and ix86_target_other to flags2_other.  Display unknown
36445         isa2 options.
36446         (ix86_valid_target_attribute_inner_p): Add missing options and
36447         reorder options by implied ISAs, as in ix86_target_string.
36448
36449 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
36450
36451         * hash-table.h (hash_table::too_empty_p): New function.
36452         (hash_table::expand): Use it.
36453         (hash_table::traverse): Likewise.
36454         (hash_table::empty_slot): Use sizeof (value_type) instead of
36455         sizeof (PTR) to convert bytes to elements.  Shrink the table
36456         if the current size is excessive for the current number of
36457         elements.
36458
36459 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
36460
36461         * ira-costs.c (record_reg_classes): Break from the inner loop
36462         early once alt_fail is known to be true.  Update outer loop
36463         handling accordingly.
36464
36465 2017-01-13  Jeff Law  <law@redhat.com>
36466
36467         * tree-ssa-dse.c (decrement_count): New function.
36468         (increment_start_addr, maybe_trim_memstar_call): Likewise.
36469         (dse_dom_walker::optimize_stmt): Call maybe_trim_memstar_call directly
36470         when we know the partially dead statement is a mem* function.
36471
36472         PR tree-optimization/61912
36473         PR tree-optimization/77485
36474         * tree-ssa-dse.c: Include expr.h.
36475         (maybe_trim_constructor_store): New function.
36476         (maybe_trim_partially_dead_store): Call maybe_trim_constructor_store.
36477
36478         PR tree-optimization/33562
36479         PR tree-optimization/61912
36480         PR tree-optimization/77485
36481         * doc/invoke.texi: Document new dse-max-object-size param.
36482         * params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
36483         * tree-ssa-dse.c: Include params.h.
36484         (dse_store_status): New enum.
36485         (initialize_ao_ref_for_dse): New, partially extracted from
36486         dse_optimize_stmt.
36487         (valid_ao_ref_for_dse, normalize_ref): New.
36488         (setup_live_bytes_from_ref, compute_trims): Likewise.
36489         (clear_bytes_written_by, maybe_trim_complex_store): Likewise.
36490         (maybe_trim_partially_dead_store): Likewise.
36491         (maybe_trim_complex_store): Likewise.
36492         (dse_classify_store): Renamed from dse_possibly_dead_store_p.
36493         Track what bytes live from the original store.  Return tri-state
36494         for dead, partially dead or live.
36495         (dse_dom_walker): Add constructor, destructor and new private members.
36496         (delete_dead_call, delete_dead_assignment): New extracted from
36497         dse_optimize_stmt.
36498         (dse_optimize_stmt): Make a member of dse_dom_walker.
36499         Use initialize_ao_ref_for_dse.
36500
36501         PR tree-optimization/33562
36502         PR tree-optimization/61912
36503         PR tree-optimization/77485
36504         * sbitmap.h (bitmap_count_bits): Prototype.
36505         (bitmap_clear_range, bitmap_set_range): Likewise.
36506         * sbitmap.c (bitmap_clear_range): New function.
36507         (bitmap_set_range, sbitmap_popcount, bitmap_count_bits): Likewise.
36508
36509 2017-01-13  Martin Liska  <mliska@suse.cz>
36510
36511         PR ipa/79043
36512         * function.c (set_cfun): Add new argument force.
36513         * function.h (set_cfun): Likewise.
36514         * ipa-inline-transform.c (inline_call): Use the function when
36515         strict alising from is dropped for function we inline to.
36516
36517 2017-01-13  Richard Biener  <rguenther@suse.de>
36518
36519         * tree-pretty-print.c (dump_generic_node): Fix inverted condition
36520         for dumping GIMPLE INTEGER_CSTs.
36521
36522 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
36523
36524         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define __STDC_VERSION__
36525         to 201112L since C++17.
36526
36527 2017-01-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
36528
36529         PR sanitizer/78887
36530         * asan.c (asan_needs_odr_indicator_p): Don't emit ODR indicators
36531         if -fsanitize=kernel-address is present.
36532
36533 2017-01-13  Richard Biener  <rguenther@suse.de>
36534
36535         * tree-pretty-print.c (dump_generic_node): Dump INTEGER_CSTs
36536         as _Literal ( type ) number in case usual suffixes do not
36537         preserve all information.
36538
36539 2017-01-13  Richard Biener  <rguenther@suse.de>
36540
36541         PR tree-optimization/77283
36542         * gimple-ssa-split-paths.c: Include gimple-ssa.h, tree-phinodes.h
36543         and ssa-iterators.h.
36544         (is_feasible_trace): Implement a cost model based on joiner
36545         PHI node uses.
36546
36547 2017-01-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
36548
36549         PR target/79004
36550         * config/rs6000/rs6000.md (FP_ISA3): Do not optimize converting
36551         char or short to __float128/_Float128 directly.
36552
36553 2017-01-12  Martin Sebor  <msebor@redhat.com>
36554
36555         to -Wformat-overflow.
36556         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust.
36557         (min_bytes_remaining): Same.
36558         (get_string_length): Same.
36559         (format_string): Same.
36560         (format_directive): Same.
36561         (add_bytes): Same.
36562         (pass_sprintf_length::handle_gimple_call): Same.
36563
36564 2017-01-12  Jakub Jelinek  <jakub@redhat.com>
36565
36566         * gimple-ssa-sprintf.c (try_substitute_return_value): Remove
36567         info.nowrite calls with no lhs that can't throw.  Return bool
36568         whether gsi_remove has been called or not.
36569         (pass_sprintf_length::handle_gimple_call): Return bool whether
36570         try_substitute_return_value called gsi_remove.  Formatting fix.
36571         (pass_sprintf_length::execute): Don't use gsi_remove if
36572         handle_gimple_call returned true.
36573
36574         PR bootstrap/79069
36575         * cfgrtl.c (rtl_tidy_fallthru_edge): For any_uncondjump_p that can't
36576         be removed due to side-effects, don't remove following barrier nor
36577         turn the successor edge into fallthru edge.
36578
36579 2017-01-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
36580
36581         PR target/79044
36582         * config/rs6000/rs6000.c (insn_is_swappable_p): Mark
36583         element-reversing loads and stores as not swappable.
36584
36585 2017-01-12  Nathan Sidwell  <nathan@acm.org>
36586             Nicolai Stange  <nicstange@gmail.com>
36587
36588         * combine.c (try_combine): Don't ignore result of overlap checking
36589         loop.  Combine overlap & asm check into single loop.
36590
36591 2017-01-12  Richard Biener  <rguenther@suse.de>
36592
36593         * tree-pretty-print.c (dump_generic_node): Provide -gimple
36594         variant for MEM_REF.  Sanitize INTEGER_CST for -gimple.
36595
36596 2017-01-12  Richard Biener  <rguenther@suse.de>
36597
36598         * tree.c (initialize_tree_contains_struct): Make TS_OPTIMIZATION
36599         and TS_TARGET_OPTION directly derive from TS_BASE.
36600         * tree-core.h (tree_optimization_option): Derive from tree_base.
36601         (tree_target_option): Likewise.
36602
36603 2017-01-11  Uros Bizjak  <ubizjak@gmail.com>
36604
36605         * config/i386/i386.c (memory_address_length): Increase len
36606         only when rip_relative_addr_p returns false.
36607
36608 2017-01-11  Julia Koval  <julia.koval@intel.com>
36609
36610         * common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
36611         (OPTION_MASK_ISA_SGX_SET): New.
36612         (ix86_handle_option): Handle OPT_msgx.
36613         * config.gcc: Added sgxintrin.h.
36614         * config/i386/driver-i386.c (host_detect_local_cpu): Detect sgx.
36615         * config/i386/i386-c.c (ix86_target_macros_internal): Define __SGX__.
36616         * config/i386/i386.c (ix86_target_string): Add -msgx.
36617         (PTA_SGX): New.
36618         (ix86_option_override_internal): Handle new options.
36619         (ix86_valid_target_attribute_inner_p): Add sgx.
36620         * config/i386/i386.h (TARGET_SGX, TARGET_SGX_P): New.
36621         * config/i386/i386.opt: Add msgx.
36622         * config/i386/sgxintrin.h: New file.
36623         * config/i386/x86intrin.h: Add sgxintrin.h.
36624
36625 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
36626
36627         PR c++/71537
36628         * fold-const.c (maybe_nonzero_address): Return 1 for function
36629         local objects.
36630         (tree_single_nonzero_warnv_p): Don't handle function local objects
36631         here.
36632
36633         PR c++/72813
36634         * gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps
36635         of c-header.
36636
36637 2017-01-11  David Malcolm  <dmalcolm@redhat.com>
36638
36639         PR driver/78877
36640         * opts.c: Include "spellcheck.h"
36641         (struct string_fragment): New struct.
36642         (struct edit_distance_traits<const string_fragment &>): New
36643         struct.
36644         (get_closest_sanitizer_option): New function.
36645         (parse_sanitizer_options): Offer suggestions for unrecognized arguments.
36646
36647 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
36648
36649         * dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): For DWARF5 decrease
36650         by 12.
36651         (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Always
36652         DWARF_COMPILE_UNIT_HEADER_SIZE plus 12.
36653         (DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE): Define.
36654         (calc_base_type_die_sizes): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE
36655         for initial die_offset if dwarf_split_debug_info.
36656         (output_comp_unit): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE for
36657         initial next_die_offset if dwo_id is non-NULL.  Don't emit padding
36658         fields.
36659         (output_skeleton_debug_sections): Formatting fix.  Use
36660         DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE instead of
36661         DWARF_COMPILE_UNIT_HEADER_SIZE.  Don't emit padding.
36662
36663 2017-01-11  Wilco Dijkstra  <wdijkstr@arm.com>
36664
36665         * config/arm/cortex-a53.md: Add bypasses for
36666         cortex_a53_r2f_cvt.
36667         (cortex_a53_r2f): Only use for transfers.
36668         (cortex_a53_f2r): Likewise.
36669         (cortex_a53_r2f_cvt): Add reservation for conversions.
36670         (cortex_a53_f2r_cvt): Likewise.
36671
36672 2017-01-11  Tamar Christina  <tamar.christina@arm.com>
36673
36674         * config/arm/arm_neon.h: Add __artificial__ and gnu_inline
36675         to all inlined functions, change static to extern.
36676
36677 2017-01-11  Christophe Lyon  <christophe.lyon@linaro.org>
36678
36679         PR target/78253
36680         * config/arm/arm.c (legitimize_pic_address): Handle reference to
36681         weak symbol.
36682         (arm_assemble_integer): Likewise.
36683
36684 2017-01-11  Richard Earnshaw  <rearnsha@arm.com>
36685
36686         * config.gcc: Use new awk script to check CPU, FPU and architecture
36687         parameters for --with-... options.
36688         * config/arm/parsecpu.awk: New file
36689         * config/arm/arm-cpus.in: New file.
36690         * config/arm/arm-opts.h: Include arm-cpu.h instead of processing .def
36691         files.
36692         * config/arm/arm.c: Include arm-cpu-data.h instead of processing .def
36693         files.
36694         * config/arm/t-arm: Update dependency rules.
36695         * common/config/arm/arm-common.c: Include arm-cpu-cdata.h instead
36696         of processing .def files.
36697         * config/arm/genopt.sh: Deleted.
36698         * config/arm/gentune.sh: Deleted.
36699         * config/arm/arm-cores.def: Deleted.
36700         * config/arm/arm-arches.def: Deleted.
36701         * config/arm/arm-fpus.def: Deleted.
36702         * config/arm/arm-tune.md: Regenerated.
36703         * config/arm/arm-tables.opt: Regenerated.
36704         * config/arm/arm-cpu.h: New generated file.
36705         * config/arm/arm-cpu-data.h: New generated file.
36706         * config/arm/arm-cpu-cdata.h: New generated file.
36707
36708 2017-01-11  Maxim Ostapenko  <m.ostapenko@samsung.com>
36709
36710         PR lto/79042
36711         * lto-cgraph.c (lto_output_varpool_node): Pack dynamically_initialized
36712         bit.
36713         (input_varpool_node): Unpack dynamically_initialized bit.
36714
36715 2017-01-11  Eric Botcazou  <ebotcazou@adacore.com>
36716
36717         PR rtl-optimization/79032
36718         * lra-constraints.c (simplify_operand_subreg): In the MEM case, test
36719         the alignment of the adjusted memory reference against that of MODE,
36720         instead of the alignment of the original memory reference.
36721
36722 2017-01-11  Martin Jambor  <mjambor@suse.cz>
36723
36724         * hsa.c (hsa_callable_function_p): Revert addition of DECL_ARTIFICIAL
36725         test.
36726         * ipa-hsa.c (process_hsa_functions): Only duplicate non-artificial
36727         decorated functions.
36728
36729 2017-01-11  Richard Biener  <rguenther@suse.de>
36730
36731         * tree-vrp.c (evrp_dom_walker::before_dom_children): Also
36732         set range/nonnull info for PHI results.  Do not set it on
36733         stmts marked for removal.
36734
36735 2017-01-10  Eric Botcazou  <ebotcazou@adacore.com>
36736
36737         * expr.c (store_field): In the bitfield case, fetch the return value
36738         from the registers before applying a single big-endian adjustment.
36739         Always do a final load for a BLKmode value not larger than a word.
36740
36741 2017-01-10  David Malcolm  <dmalcolm@redhat.com>
36742
36743         PR c++/77949
36744         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
36745         that we correctly handle column numbers greater than
36746         LINE_MAP_MAX_COLUMN_NUMBER.
36747
36748 2017-01-10  Martin Sebor  <msebor@redhat.com>
36749
36750         PR middle-end/78245
36751         * gimple-ssa-sprintf.c (get_destination_size): Call
36752         {init,fini}object_sizes.
36753         * tree-object-size.c (addr_object_size): Adjust.
36754         (pass_through_call): Adjust.
36755         (pass_object_sizes::execute): Adjust.
36756         * tree-object-size.h (fini_object_sizes): Declare.
36757
36758 2017-01-10  Martin Sebor  <msebor@redhat.com>
36759
36760         PR tree-optimization/78775
36761         * builtins.c (get_size_range): Move...
36762         * calls.c: ...to here.
36763         (alloc_max_size): Accept zero argument.
36764         (operand_signed_p): Remove.
36765         (maybe_warn_alloc_args_overflow): Call get_size_range.
36766         * calls.h (get_size_range): Declare.
36767
36768 2017-01-10  Joe Seymour  <joe.s@somniumtech.com>
36769
36770         * config/msp430/driver-msp430.c (msp430_mcu_data): Sync with data
36771         from TI's devices.csv file as of September 2016.
36772         * config/msp430/msp430.c (msp430_mcu_data): Likewise.
36773
36774 2017-01-10  Sandra Loosemore  <sandra@codesourcery.com>
36775
36776         * doc/extend.texi: Tweak formatting to fix overfull hbox warnings.
36777         * doc/invoke.texi: Likewise.
36778         * doc/md.texi: Likewise.
36779         * doc/objc.texi: Likewise.
36780
36781 2017-01-10  Joshua Conner  <joshconner@google.com>
36782
36783         * config/arm/fuchsia-elf.h: New file.
36784         * config/fuchsia.h: New file.
36785         * config.gcc (*-*-fuchsia*): Set native_system_header_dir.
36786         (aarch64*-*-fuchsia*, arm*-*-fuchsia*, x86_64-*-fuchsia*): Add to
36787         targets.
36788         * config.host: (aarch64*-*-fuchsia*, arm*-*-fuchsia*): Add to hosts.
36789
36790 2016-01-10  Richard Biener  <rguenther@suse.de>
36791
36792         PR tree-optimization/79034
36793         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
36794         Propagate out degenerate PHIs in the joiner.
36795
36796 2017-01-10  Martin Liska  <mliska@suse.cz>
36797
36798         * ipa-icf.c (sort_sem_items_by_decl_uid): New function.
36799         (sort_congruence_classes_by_decl_uid): Likewise.
36800         (sort_congruence_class_groups_by_decl_uid): Likewise.
36801         (sem_item_optimizer::merge_classes): Sort class, groups in these
36802         classes and members in the groups by DECL_UID of declarations.
36803         This would make merge operations stable.
36804
36805 2017-01-10  Martin Liska  <mliska@suse.cz>
36806
36807         * ipa-icf.c (sem_item_optimizer::sem_item_optimizer): Remove
36808         usage of m_classes_vec.
36809         (sem_item_optimizer::~sem_item_optimizer):  Likewise.
36810         (sem_item_optimizer::get_group_by_hash): Likewise.
36811         (sem_item_optimizer::subdivide_classes_by_equality): Likewise.
36812         (sem_item_optimizer::subdivide_classes_by_sensitive_refs): Likewise.
36813         (sem_item_optimizer::verify_classes): Likewise.
36814         (sem_item_optimizer::process_cong_reduction): Likewise.
36815         (sem_item_optimizer::dump_cong_classes): Likewise.
36816         (sem_item_optimizer::merge_classes): Likewise.
36817         * ipa-icf.h (congruence_class_hash): Rename from
36818         congruence_class_group_hash.  Remove declaration of m_classes_vec.
36819
36820 2017-01-10  Andrew Senkevich  <andrew.senkevich@intel.com>
36821
36822         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
36823         OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET): New.
36824         * config.gcc: Add avx512vpopcntdqintrin.h.
36825         * config/i386/avx512vpopcntdqintrin.h: New.
36826         * config/i386/cpuid.h (bit_AVX512VPOPCNTDQ): New.
36827         * config/i386/i386-builtin-types.def: Add new types.
36828         * config/i386/i386-builtin.def (__builtin_ia32_vpopcountd_v16si,
36829         __builtin_ia32_vpopcountd_v16si_mask, __builtin_ia32_vpopcountq_v8di,
36830         __builtin_ia32_vpopcountq_v8di_mask): New.
36831         * config/i386/i386-c.c (ix86_target_macros_internal): Define
36832         __AVX512VPOPCNTDQ__.
36833         * config/i386/i386.c (ix86_target_string): Add -mavx512vpopcntdq.
36834         (PTA_AVX512VPOPCNTDQ): Define.
36835         * config/i386/i386.h (TARGET_AVX512VPOPCNTDQ,
36836         TARGET_AVX512VPOPCNTDQ_P): Define.
36837         * config/i386/i386.opt: Add mavx512vpopcntdq.
36838         * config/i386/immintrin.h: Include avx512vpopcntdqintrin.h.
36839         * config/i386/sse.md (define_insn "vpopcount<mode><mask_name>"): New.
36840
36841 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
36842
36843         PR middle-end/77484
36844         * predict.def (PRED_CALL): Set to 67.
36845
36846 2017-01-09  Eric Botcazou  <ebotcazou@adacore.com>
36847
36848         * expr.c (store_field): In the bitfield case, if the value comes from
36849         a function call and is of an aggregate type returned in registers, do
36850         not modify the field mode; extract the value in all cases if the mode
36851         is BLKmode and the size is not larger than a word.
36852
36853 2017-01-09  Dominique d'Humieres  <dominiq@lps.ens.fr>
36854
36855         PR target/71017
36856         * config/i386/cpuid.h: Fix undefined behavior.
36857
36858 2017-01-04  Jeff Law  <law@redhat.com>
36859
36860         PR tree-optimization/79007
36861         PR tree-optimization/67955
36862         * tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
36863         conservative for pt.null when flag_non_call_exceptions is on.
36864
36865 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
36866
36867         PR translation/79019
36868         PR translation/79020
36869         * params.def (PARAM_INLINE_MIN_SPEEDUP,
36870         PARAM_IPA_CP_SINGLE_CALL_PENALTY,
36871         PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
36872         in descriptions.
36873         * config/avr/avr.opt (maccumulate-args): Likewise.
36874         * config/msp430/msp430.opt (mwarn-mcu): Likewise.
36875         * common.opt (freport-bug): Likewise.
36876         * cif-code.def (CIF_FINAL_ERROR): Likewise.
36877         * doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
36878         * config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
36879         translatable string.
36880         * config/i386/i386.c (function_value_32): Likewise.
36881         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
36882         * config/msp430/msp430.c (msp430_option_override, msp430_attr):
36883         Likewise.
36884         * config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
36885         * common/config/msp430/msp430-common.c (msp430_handle_option):
36886         Likewise.
36887         * symtab.c (symtab_node::verify_base): Likewise.
36888         * opts.c (set_debug_level): Likewise.
36889         * tree.c (verify_type_variant): Likewise.  Fix typo in comment.
36890         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
36891         missing whitespace to translatable strings.
36892         * config/avr/avr.md (bswapsi2): Fix typo in comment.
36893         * config/sh/superh.h: Likewise.
36894         * config/i386/xopintrin.h: Likewise.
36895         * config/i386/znver1.md: Likewise.
36896         * config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
36897         * ipa-inline-analysis.c (compute_inline_parameters): Likewise.
36898         * double-int.h (struct double_int): Likewise.
36899         * double-int.c (div_and_round_double): Likewise.
36900         * wide-int.cc: Likewise.
36901         * tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
36902         * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
36903         * cfgcleanup.c (crossjumps_occured): Renamed to ...
36904         (crossjumps_occurred): ... this.
36905         (try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
36906         Adjust all uses.
36907
36908         PR tree-optimization/78899
36909         * tree-if-conv.c (version_loop_for_if_conversion): Instead of
36910         returning bool return struct loop *, NULL for failure and the new
36911         loop on success.
36912         (versionable_outer_loop_p): Don't version outer loop if it has
36913         dont_vectorized bit set.
36914         (tree_if_conversion): When versioning outer loop, ensure
36915         tree_if_conversion is performed also on the inner loop of the
36916         non-vectorizable outer loop copy.
36917         * tree-vectorizer.c (set_uid_loop_bbs): Formatting fix.  Fold
36918         LOOP_VECTORIZED in inner loop of the scalar outer loop and
36919         prevent vectorization of it.
36920         (vectorize_loops): For outer + inner LOOP_VECTORIZED, ensure
36921         the outer loop vectorization of the non-scalar version is attempted
36922         before vectorization of the inner loop in scalar version.  If
36923         outer LOOP_VECTORIZED guarded loop is not vectorized, prevent
36924         vectorization of its inner loop.
36925         * tree-vect-loop-manip.c (rename_variables_in_bb): If outer_loop
36926         has 2 inner loops, rename also on edges from bb whose single pred
36927         is outer_loop->header.  Fix typo in function comment.
36928
36929 2017-01-09  Martin Sebor  <msebor@redhat.com>
36930
36931         PR bootstrap/79033
36932         * asan.c (asan_emit_stack_protection): Increase local buffer size
36933         to avoid snprintf truncation warning.
36934
36935 2017-01-09  Andrew Pinski  <apinski@cavium.com>
36936
36937         * config/aarch64/aarch64-cores.def: Add thunderx2t99.  Change vulcan
36938         to reference thunderx2t99 for the tuning structure
36939         * config/aarch64/aarch64-cost-tables.h (vulcan_extra_costs):
36940         Rename to ...
36941         (thunderx2t99_extra_costs): This.
36942         * config/aarch64/aarch64-tune.md: Regenerate.
36943         * config/aarch64/aarch64.c (vulcan_addrcost_table): Rename to ...
36944         (vulcan_addrcost_table): This.
36945         (vulcan_regmove_cost): Rename to ...
36946         (thunderx2t99_regmove_cost): This.
36947         (vulcan_vector_cost): Rename to ...
36948         (thunderx2t99_vector_cost): this.
36949         (vulcan_branch_cost): Rename to ...
36950         (thunderx2t99_branch_cost): This.
36951         (vulcan_tunings): Rename to ...
36952         (thunderx2t99_tunings): This and s/vulcan/thunderx2t99 .
36953         * doc/invoke.texi (AARCH64/mtune): Add thunderx2t99.
36954
36955 2017-01-09  Martin Jambor  <mjambor@suse.cz>
36956
36957         PR ipa/78365
36958         PR ipa/78599
36959         * ipa-prop.h (ipa_jump_func): Swap positions of vr_known and m_vr.
36960         * ipa-cp.c (ipa_vr_operation_and_type_effects): New function.
36961         (propagate_vr_accross_jump_function): Use the above function for all
36962         value range computations for pass-through jump functions and type
36963         converasion from explicit value range values.
36964         (ipcp_propagate_stage): Do not attempt to deduce types of formal
36965         parameters from TYPE_ARG_TYPES.
36966         * ipa-prop.c (ipa_write_jump_function): Remove trailing whitespace.
36967         (ipa_write_node_info): Stream type of the actual argument.
36968         (ipa_read_node_info): Likewise. Also remove trailing whitespace.
36969
36970 2017-01-09  Martin Liska  <mliska@suse.cz>
36971
36972         PR pch/78970
36973         * gcc.c (driver_handle_option): Handle OPT_E and set have_E.
36974         (lookup_compiler): Do not show error message with have_E.
36975
36976 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
36977
36978         PR tree-optimization/78938
36979         * tree-vect-stmts.c (vectorizable_condition): For non-masked COND_EXPR
36980         where comp_vectype is VECTOR_BOOLEAN_TYPE_P, use
36981         BIT_{NOT,XOR,AND,IOR}_EXPR on the comparison operands instead of
36982         {EQ,NE,GE,GT,LE,LT}_EXPR directly inside of VEC_COND_EXPR.  Formatting
36983         fixes.
36984
36985 2017-01-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
36986
36987         * tree-ssa-address.c (gen_addr_rtx): Don't handle index if it
36988         is const0_rtx.
36989
36990 2017-01-09  Richard Biener  <rguenther@suse.de>
36991
36992         PR tree-optimization/78997
36993         * tree-vect-slp.c (vect_mask_constant_operand_p): Handle SSA
36994         name condition properly.
36995
36996 2017-01-09  Richard Biener  <rguenther@suse.de>
36997
36998         PR debug/79000
36999         * dwarf2out.c (is_cxx): New overload with context.
37000         (is_naming_typedef_decl): Use it.
37001
37002 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
37003
37004         * invoke.texi (Option Summary): Correct spacing in option lists
37005         and add line breaks to fix over-long lines.
37006
37007 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
37008
37009         PR middle-end/17660
37010
37011         * extend.texi (Common Variable Attributes): Add xref to GCC
37012         Internals manual to explain mode attribute keywords.
37013
37014 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
37015
37016         PR other/16519
37017         * doc/invoke.texi (Option Summary): Move -pthread to Linker Options
37018         and Preprocessor Options.
37019         (Options for Linking): Document -pthread here....
37020         (RS/6000 and PowerPC Options): ...not here.
37021         (Solaris 2 Options): ...or here.
37022         * doc/cppopts.texi: Document -pthread.
37023
37024 2017-01-08  Martin Sebor  <msebor@redhat.com>
37025
37026         PR middle-end/77708
37027         * doc/invoke.texi (Warning Options): Document -Wformat-truncation.
37028         * gimple-ssa-sprintf.c (call_info::reval_used, call_info::warnopt):
37029         New member functions.
37030         (format_directive): Used them.
37031         (add_bytes): Same.
37032         (pass_sprintf_length::handle_gimple_call): Same.
37033         * graphite-sese-to-poly.c (tree_int_to_gmp): Increase buffer size
37034         to avoid truncation for any argument.
37035         (extract_affine_mul): Same.
37036         * tree.c (get_file_function_name): Same.
37037
37038 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
37039
37040         PR middle-end/77484
37041         * predict.def (PRED_INDIR_CALL): Set to 86.
37042
37043 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
37044
37045         PR preprocessor/54124
37046         * doc/cppopts.texi: Reformat -d subtable to list the full name
37047         of the options.  Add cross-reference to the docs for the general
37048         compiler -d options.
37049         * doc/invoke.texi (Developer Options): Add cross-reference to the
37050         preprocessor-specific -d option documentation.
37051
37052 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
37053
37054         PR preprocessor/13498
37055         * doc/cpp.texi (Search Path): Rewrite to remove obsolete and
37056         redudant material, and reflect new command-line options.
37057         (System Headers): Likewise.
37058
37059 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
37060
37061         * doc/cppdiropts.texi: Merge documentation of -I, -iquote,
37062         -isystem, and -idirafter.  Copy-edit.
37063         * doc/cppopts.texi: Copy-edit.  Remove contradiction about
37064         default for -ftrack-macro-expansion.  Delete obsolete and
37065         badly-formatted implementation details about -fdebug-cpp output.
37066         * doc/cppwarnopts.texi: Copy-edit.
37067
37068 2017-01-07  David Malcolm  <dmalcolm@redhat.com>
37069
37070         PR c++/72803
37071         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
37072         that the transition from a max line width >= 1<<10 to narrower
37073         lines works correctly.
37074
37075 2017-01-07  Alexandre Oliva <aoliva@redhat.com>
37076
37077         * doc/options.texi (PerFunction): New.
37078         * opt-functions.awk (switch_flags): Map both Optimization and
37079         PerFunction to CL_OPTIMIZATION.
37080         * opth-gen.awk: Test for PerFunction flag along with
37081         Optimization.
37082         * optc-save-gen.awk: Likewise.  Introduce var_opt_hash and set
37083         it only when the latter is present.  Skip those that don't in
37084         the hash function generator.
37085         * common.opt (fvar-tracking): Mark as PerFunction instead of
37086         Optimization.
37087         (fvar-tracking-assignments): Likewise.
37088         (fvar-tracking-assignments-toggle): Likewise.
37089         (fvar-tracking-uninit): Likewise.
37090
37091 2017-01-07  Jakub Jelinek  <jakub@redhat.com>
37092
37093         PR translation/79018
37094         * params.def (PARAM_MAX_STORES_TO_MERGE): Add missing space between
37095         the and store.
37096
37097 2017-01-06  Mikael Pettersson  <mikpelinux@gmail.com>
37098
37099         PR target/57583
37100         * config/m68k/m68k.opt (LONG_JUMP_TABLE_OFFSETS): New option.
37101         * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Handle
37102         TARGET_LONG_JUMP_TABLE_OFFSETS.
37103         * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise.
37104         * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise.
37105         * config/m68k/m68k.h (CASE_VECTOR_MODE): Likewise.
37106         (ASM_OUTPUT_ADDR_DIFF_ELF): Likewise.
37107         * config/m68k/m68k.md (tablejump expander): Likewise.
37108         (*tablejump_pcrel_hi): Renamed from unnamed insn, reject
37109         TARGET_LONG_JUMP_TABLE_OFFSETS.
37110         (*tablejump_pcrel_si): New insn, handle TARGET_LONG_JUMP_TABLE_OFFSETS.
37111         * doc/invoke.texi (M68K options): Add -mlong-jump-table-offsets.
37112
37113 2017-01-06  Edgar E. Iglesias <edgar.iglesias@xilinx.com>
37114             David Holsgrove <david.holsgrove@xilinx.com>
37115
37116         * common/config/microblaze/microblaze-common.c
37117         (TARGET_EXCEPT_UNWIND_INFO): Remove.
37118         * config/microblaze/microblaze-protos.h (microblaze_eh_return):
37119         New prototype.
37120         * config/microblaze/microblaze.c (microblaze_must_save_register)
37121         (microblaze_expand_epilogue, microblaze_return_addr): Handle
37122         calls_eh_return.
37123         (microblaze_eh_return): New function.
37124         * config/microblaze/microblaze.h (RETURN_ADDR_OFFSET)
37125         (EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM)
37126         (EH_RETURN_STACKADJ_RTX, ASM_PREFERRED_EH_DATA_FORMAT): New macros.
37127         * config/microblaze/microblaze.md (eh_return): New pattern.
37128
37129 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
37130
37131         * system.h (GCC_DIAGNOSTIC_PUSH_IGNORED, GCC_DIAGNOSTIC_POP,
37132         GCC_DIAGNOSTIC_STRINGIFY): Define.
37133
37134         * read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare warning.
37135
37136 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
37137
37138         * config/arm/arm.md (<mcrr>): New.
37139         (<mrrc>): New.
37140         * config/arm/arm.c (arm_arch5te): New.
37141         (arm_option_override): Set arm_arch5te.
37142         (arm_coproc_builtin_available): Add support for mcrr, mcrr2, mrrc
37143         and mrrc2.
37144         * config/arm/arm-builtins.c (MCRR_QUALIFIERS): Define to...
37145         (arm_mcrr_qualifiers): ... this. New.
37146         (MRRC_QUALIFIERS): Define to...
37147         (arm_mrrc_qualifiers): ... this. New.
37148         * config/arm/arm_acle.h (__arm_mcrr, __arm_mcrr2, __arm_mrrc,
37149         __arm_mrrc2): New.
37150         * config/arm/arm_acle_builtins.def (mcrr, mcrr2, mrrc, mrrc2): New.
37151         * config/arm/iterators.md (MCRRI, mcrr, MCRR): New.
37152         (MRRCI, mrrc, MRRC): New.
37153         * config/arm/unspecs.md (VUNSPEC_MCRR, VUNSPEC_MCRR2, VUNSPEC_MRRC,
37154         VUNSPEC_MRRC2): New.
37155
37156 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
37157
37158         * config/arm/arm.md (<mcr>): New.
37159         (<mrc>): New.
37160         * config/arm/arm.c (arm_coproc_builtin_available): Add
37161         support for mcr, mrc, mcr2 and mrc2.
37162         * config/arm/arm-builtins.c (MCR_QUALIFIERS): Define to...
37163         (arm_mcr_qualifiers): ... this. New.
37164         (MRC_QUALIFIERS): Define to ...
37165         (arm_mrc_qualifiers): ... this. New.
37166         (MCR_QUALIFIERS): Define to ...
37167         (arm_mcr_qualifiers): ... this. New.
37168         * config/arm/arm_acle.h (__arm_mcr, __arm_mrc, __arm_mcr2,
37169         __arm_mrc2): New.
37170         * config/arm/arm_acle_builtins.def (mcr, mcr2, mrc, mrc2): New.
37171         * config/arm/iterators.md (MCRI, mcr, MCR, MRCI, mrc, MRC): New.
37172         * config/arm/unspecs.md (VUNSPEC_MCR, VUNSPEC_MCR2, VUNSPEC_MRC,
37173         VUNSPEC_MRC2): New.
37174
37175 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
37176
37177         * config/arm/arm.md (*ldc): New.
37178         (*stc): New.
37179         (<ldc>): New.
37180         (<stc>): New.
37181         * config/arm/arm.c (arm_coproc_builtin_available): Add
37182         support for ldc,ldcl,stc,stcl,ldc2,ldc2l,stc2 and stc2l.
37183         (arm_coproc_ldc_stc_legitimate_address): New.
37184         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
37185         'qualifier_const_pointer'.
37186         (LDC_QUALIFIERS): Define to...
37187         (arm_ldc_qualifiers): ... this. New.
37188         (STC_QUALIFIERS): Define to...
37189         (arm_stc_qualifiers): ... this. New.
37190         * config/arm/arm-protos.h
37191         (arm_coproc_ldc_stc_legitimate_address): New.
37192         * config/arm/arm_acle.h (__arm_ldc, __arm_ldcl, __arm_stc,
37193         __arm_stcl, __arm_ldc2, __arm_ldc2l, __arm_stc2, __arm_stc2l): New.
37194         * config/arm/arm_acle_builtins.def (ldc, ldc2, ldcl, ldc2l, stc,
37195         stc2, stcl, stc2l): New.
37196         * config/arm/constraints.md (Uz): New.
37197         * config/arm/iterators.md (LDCI, STCI, ldc, stc, LDC STC): New.
37198         * config/arm/unspecs.md (VUNSPEC_LDC, VUNSPEC_LDC2, VUNSPEC_LDCL,
37199         VUNSPEC_LDC2L, VUNSPEC_STC, VUNSPEC_STC2, VUNSPEC_STCL,
37200         VUNSPEC_STC2L): New.
37201
37202 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
37203
37204         * config/arm/arm.md (<cdp>): New.
37205         * config/arm/arm.c (neon_const_bounds): Rename this ...
37206         (arm_const_bounds): ... this.
37207         (arm_coproc_builtin_available): New.
37208         * config/arm/arm-builtins.c (SIMD_MAX_BUILTIN_ARGS): Increase.
37209         (arm_type_qualifiers): Add 'qualifier_unsigned_immediate'.
37210         (CDP_QUALIFIERS): Define to...
37211         (arm_cdp_qualifiers): ... this. New.
37212         (void_UP): Define.
37213         (arm_expand_builtin_args): Add case for 6 arguments.
37214         * config/arm/arm-protos.h (neon_const_bounds): Rename this ...
37215         (arm_const_bounds): ... this.
37216         (arm_coproc_builtin_available): New.
37217         * config/arm/arm_acle.h (__arm_cdp): New.
37218         (__arm_cdp2): New.
37219         * config/arm/arm_acle_builtins.def (cdp): New.
37220         (cdp2): New.
37221         * config/arm/iterators.md (CDPI,CDP,cdp): New.
37222         * config/arm/neon.md: Rename all 'neon_const_bounds' to
37223         'arm_const_bounds'.
37224         * config/arm/types.md (coproc): New.
37225         * config/arm/unspecs.md (VUNSPEC_CDP, VUNSPEC_CDP2): New.
37226         * doc/extend.texi (ACLE): Add a mention of Coprocessor intrinsics.
37227         * doc/sourcebuild.texi (arm_coproc1_ok, arm_coproc2_ok,
37228         arm_coproc3_ok, arm_coproc4_ok): Document new effective targets.
37229
37230 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
37231
37232         * config/arm/arm-builtins.c (arm_unsigned_binop_qualifiers): New.
37233         (UBINOP_QUALIFIERS): New.
37234         (si_UP): Define.
37235         (acle_builtin_data): New. Change comment.
37236         (arm_builtins): Remove ARM_BUILTIN_CRC32B, ARM_BUILTIN_CRC32H,
37237         ARM_BUILTIN_CRC32W, ARM_BUILTIN_CRC32CB, ARM_BUILTIN_CRC32CH,
37238         ARM_BUILTIN_CRC32CW. Add ARM_BUILTIN_ACLE_BASE and include
37239         arm_acle_builtins.def.
37240         (ARM_BUILTIN_ACLE_PATTERN_START): Define.
37241         (arm_init_acle_builtins): New.
37242         (CRC32_BUILTIN): Remove.
37243         (bdesc_2arg): Remove entries for crc32b, crc32h, crc32w,
37244         crc32cb, crc32ch and crc32cw.
37245         (arm_init_crc32_builtins): Remove.
37246         (arm_init_builtins): Use arm_init_acle_builtins rather
37247         than arm_init_crc32_builtins.
37248         (arm_expand_acle_builtin): New.
37249         (arm_expand_builtin): Use 'arm_expand_acle_builtin'.
37250         * config/arm/arm_acle_builtins.def: New.
37251
37252 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
37253
37254         * config/arm/arm-builtins.c (neon_builtin_datum): Rename to ..
37255         (arm_builtin_datum): ... this.
37256         (arm_init_neon_builtin): Rename to ...
37257         (arm_init_builtin): ... this. Add a new parameters PREFIX
37258         and USE_SIG_IN_NAME.
37259         (arm_init_neon_builtins): Replace 'arm_init_neon_builtin' with
37260         'arm_init_builtin'. Replace type 'neon_builtin_datum' with
37261         'arm_builtin_datum'.
37262         (arm_init_vfp_builtins): Likewise.
37263         (builtin_arg): Rename enum's replacing 'NEON_ARG' with
37264         'ARG_BUILTIN' and add a 'ARG_BUILTIN_NEON_MEMORY.
37265         (arm_expand_neon_args): Rename to ...
37266         (arm_expand_builtin_args): ... this. Rename builtin_arg
37267         enum values and differentiate between ARG_BUILTIN_MEMORY
37268         and ARG_BUILTIN_NEON_MEMORY.
37269         (arm_expand_neon_builtin_1): Rename to ...
37270         (arm_expand_builtin_1): ... this. Rename builtin_arg enum
37271         values, arm_expand_builtin_args and add bool parameter NEON.
37272         (arm_expand_neon_builtin): Use arm_expand_builtin_1.
37273         (arm_expand_vfp_builtin): Likewise.
37274         (NEON_MAX_BUILTIN_ARGS): Remove, it was unused.
37275
37276 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
37277
37278         PR middle-end/77484
37279         * predict.def (PRED_POLYMORPHIC_CALL): Set to 59.
37280         * predict.c (tree_estimate_probability_bb): Reverse direction of
37281         polymorphic call predictor.
37282
37283 2017-01-06  David Malcolm  <dmalcolm@redhat.com>
37284
37285         * passes.c (execute_one_pass): Split out pass-skipping logic into...
37286         (determine_pass_name_match): ...this new function and...
37287         (should_skip_pass_p): ...this new function.
37288
37289 2017-01-06  Nathan Sidwell  <nathan@acm.org>
37290
37291         * ipa-visibility.c (function_and_variable_visibility): Reformat
37292         comments and long lines.  Remove extrneous if.
37293         * symtab.c (symtab_node::make_decl_local): Fix code format.
37294         (symtab_node::set_section_for_node): Fix comment typo.
37295
37296 2017-01-06  Martin Liska  <mliska@suse.cz>
37297
37298         PR bootstrap/79003
37299         * lra-constraints.c: Rename invariant to lra_invariant.
37300         * predict.c (set_even_probabilities): Initialize e to NULL.
37301
37302 2017-01-05  Martin Sebor  <msebor@redhat.com>
37303
37304         PR tree-optimization/78910
37305         * gimple-ssa-sprintf.c (tree_digits): Add an argument.
37306         (format_integer): Correct off-by-one error in the handling
37307         of precision with negative numbers in signed conversions..
37308
37309 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
37310
37311         * doc/invoke.texi (C Dialect Options): Adjust -fsso-struct entry.
37312
37313 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
37314
37315         PR tree-optimization/71016
37316         * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Pass cond_stmt to
37317         factor_out_conditional_conversion.  Formatting fix.
37318         (factor_out_conditional_conversion): Add cond_stmt argument.
37319         If arg1 is INTEGER_CST, punt if new_arg0 is not any operand of
37320         cond_stmt and if arg0_def_stmt is not the only stmt in its bb.
37321         Formatting fix.
37322
37323 2017-01-05  David Malcolm  <dmalcolm@redhat.com>
37324
37325         * Makefile.in (OBJS): Add read-md.o, read-rtl.o,
37326         read-rtl-function.o, and selftest-rtl.o.
37327         * config/aarch64/aarch64.c: Include selftest.h and selftest-rtl.h.
37328         (selftest::aarch64_test_loading_full_dump): New function.
37329         (selftest::aarch64_run_selftests): New function.
37330         (TARGET_RUN_TARGET_SELFTESTS): Wire it up to
37331         selftest::aarch64_run_selftests.
37332         * config/i386/i386.c
37333         (selftest::ix86_test_loading_dump_fragment_1): New function.
37334         (selftest::ix86_test_loading_call_insn): New function.
37335         (selftest::ix86_test_loading_full_dump): New function.
37336         (selftest::ix86_test_loading_unspec): New function.
37337         (selftest::ix86_run_selftests): Call the new functions.
37338         * emit-rtl.c (maybe_set_max_label_num): New function.
37339         * emit-rtl.h (maybe_set_max_label_num): New decl.
37340         * function.c (instantiate_decls): Guard call to
37341         instantiate_decls_1 with if (DECL_INITIAL (fndecl)).
37342         * function-tests.c (selftest::verify_three_block_rtl_cfg): Remove
37343         "static".
37344         * gensupport.c (gen_reader::gen_reader): Pass "false"
37345         for new "compact" param of rtx_reader.
37346         * print-rtl.c (rtx_writer::print_rtx_operand): Print "(nil)"
37347         rather than an empty string for NULL strings.
37348         * read-md.c: Potentially include config.h rather than bconfig.h.
37349         Wrap include of errors.h with #ifdef GENERATOR_FILE.
37350         (have_error): New global, copied from errors.c.
37351         (md_reader::read_name): Rename to...
37352         (md_reader::read_name_1): ...this, adding "out_loc" param,
37353         and converting "missing name or number" to returning false, rather
37354         than failing.
37355         (md_reader::read_name): Reimplement in terms of read_name_1.
37356         (md_reader::read_name_or_nil): New function.
37357         (md_reader::read_string): Handle "(nil)" by returning NULL.
37358         (md_reader::md_reader): Add new param "compact".
37359         (md_reader::read_md_files): Wrap with #ifdef GENERATOR_FILE.
37360         (md_reader::read_file): New method.
37361         * read-md.h (md_reader::md_reader): Add new param "compact".
37362         (md_reader::read_file): New method.
37363         (md_reader::is_compact): New accessor.
37364         (md_reader::read_name): Convert return type from void to file_location.
37365         (md_reader::read_name_or_nil): New decl.
37366         (md_reader::read_name_1): New decl.
37367         (md_reader::m_compact): New field.
37368         (noop_reader::noop_reader): Pass "false" for new "compact" param
37369         of rtx_reader.
37370         (rtx_reader::rtx_reader): Add new "compact" param.
37371         (rtx_reader::read_rtx_operand): Make virtual and convert return
37372         type from void to rtx.
37373         (rtx_reader::read_until): New decl.
37374         (rtx_reader::handle_any_trailing_information): New virtual function.
37375         (rtx_reader::postprocess): New virtual function.
37376         (rtx_reader::finalize_string): New virtual function.
37377         (rtx_reader::m_in_call_function_usage): New field.
37378         (rtx_reader::m_reuse_rtx_by_id): New field.
37379         * read-rtl-function.c: New file.
37380         * selftest-rtl.c (selftest::assert_rtx_ptr_eq_at): New function.
37381         * selftest-rtl.h (ASSERT_RTX_PTR_EQ): New macro.
37382         (selftest::verify_three_block_rtl_cfg): New decl.
37383         * read-rtl-function.h: New file.
37384         * read-rtl.c: Potentially include config.h rather than bconfig.h.
37385         For host, include function.h, memmodel.h, and emit-rtl.h.
37386         (one_time_initialization): New function.
37387         (struct compact_insn_name): New struct.
37388         (compact_insn_names): New array.
37389         (find_code): Handle insn codes in compact dumps.
37390         (apply_subst_iterator): Wrap with #ifdef GENERATOR_FILE.
37391         (bind_subst_iter_and_attr): Likewise.
37392         (add_condition_to_string): Likewise.
37393         (add_condition_to_rtx): Likewise.
37394         (apply_attribute_uses): Likewise.
37395         (add_current_iterators): Likewise.
37396         (apply_iterators): Likewise.
37397         (initialize_iterators): Guard usage of apply_subst_iterator with
37398         #ifdef GENERATOR_FILE.
37399         (read_conditions): Wrap with #ifdef GENERATOR_FILE.
37400         (md_reader::read_mapping): Likewise.
37401         (add_define_attr_for_define_subst): Likewise.
37402         (add_define_subst_attr): Likewise.
37403         (read_subst_mapping): Likewise.
37404         (check_code_iterator): Likewise.
37405         (rtx_reader::read_rtx): Likewise.  Move one-time initialization
37406         logic to...
37407         (one_time_initialization): New function.
37408         (rtx_reader::read_until): New method.
37409         (read_flags): New function.
37410         (parse_reg_note_name): New function.
37411         (rtx_reader::read_rtx_code): Initialize "iterator" to NULL.
37412         Handle reuse_rtx ids.
37413         Wrap iterator lookup within #ifdef GENERATOR_FILE.
37414         Add parsing support for RTL dumps, mirroring the special-cases in
37415         print_rtx, by calling read_flags, reading REG_NOTE names, INSN_UID
37416         values, and calling handle_any_trailing_information.
37417         (rtx_reader::read_rtx_operand): Convert return type from void
37418         to rtx, returning return_rtx.  Handle case 'e'.  Call
37419         finalize_string on XSTR and XTMPL fields.
37420         (rtx_reader::read_nested_rtx):  Handle dumps in which trailing
37421          "(nil)" values were omitted.  Call the postprocess vfunc on the
37422         return_rtx.
37423         (rtx_reader::rtx_reader): Add new "compact" param and pass to base
37424         class ctor.  Initialize m_in_call_function_usage.  Call
37425         one_time_initialization.
37426         * rtl-tests.c (selftest::test_uncond_jump): Call
37427         set_new_first_and_last_insn.
37428         * rtl.h (read_rtx): Wrap decl with #ifdef GENERATOR_FILE.
37429         * selftest-rtl.c: New file.
37430         * selftest-rtl.h (class selftest::rtl_dump_test): New class.
37431         (selftest::get_insn_by_uid): New decl.
37432         * selftest-run-tests.c (selftest::run_tests): Call
37433         read_rtl_function_c_tests.
37434         * selftest.h  (selftest::read_rtl_function_c_tests): New decl.
37435         * tree-dfa.c (ssa_default_def): Return NULL_TREE for rtl function
37436         dumps.
37437
37438 2017-01-05  Uros Bizjak  <ubizjak@gmail.com>
37439
37440         * config/i386/i386.md (*testqi_ext_3): No need to handle memory
37441         operands in a special way.  Assert that pos+len <= mode precision.
37442
37443 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
37444
37445         * common.opt (fvect-cost-model): Remove RejectNegative flag, use
37446         3 argument Alias with unlimited for the negative form.
37447         (fno-vect-cost-model): Removed.
37448
37449 2017-01-05  Martin Liska  <mliska@suse.cz>
37450
37451         * hsa-gen.c (gen_hsa_divmod): New function.
37452         (gen_hsa_insn_for_internal_fn_call): Use the function for IFN_DIVMOD.
37453
37454 2017-01-05  Martin Liska  <mliska@suse.cz>
37455
37456         PR pch/78970
37457         * gcc.c (lookup_compiler): Reject '-' filename for a precompiled
37458         header.
37459
37460 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
37461
37462         * config/s390/s390.c (s390_expand_setmem): Unroll the loop for
37463         small constant length operands.
37464
37465 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
37466
37467         * config/s390/s390.c (s390_expand_setmem): Avoid overlapping bytes
37468         between loop iterations.
37469
37470 2017-01-05  Martin Liska  <mliska@suse.cz>
37471
37472         PR sanitizer/78815
37473         * gimplify.c (gimplify_decl_expr): Compare to
37474         asan_poisoned_variables instread of checking flags.
37475         (gimplify_target_expr): Likewise.
37476         (gimplify_expr): Likewise.
37477         (gimplify_function_tree): Conditionally initialize
37478         asan_poisoned_variables.
37479
37480 2017-01-04  Jeff Law  <law@redhat.com>
37481
37482         PR tree-optimizatin/78812
37483         * rtl.h (contains_mem_rtx_p): Prototype.
37484         * ifcvt.c (containts_mem_rtx_p): Move from here to...
37485         * rtlanal.c (contains_mem_rtx_p): Here and remove static linkage.
37486         * gcse.c (prune_expressions): Use contains_mem_rtx_p to discover
37487         and prune MEMs that are not at the toplevel of a SET_SRC rtx.  Look
37488         through ZERO_EXTEND and SIGN_EXTEND when trying to avoid pruning MEMs.
37489
37490 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
37491
37492         * input.c (assert_char_at_range): Default-initialize actual_range.
37493
37494 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
37495
37496         * df-scan.c (df_ref_create_structure): Make regno unsigned,
37497         to match the caller.
37498
37499 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
37500
37501         * cfgexpand.c (expand_gimple_basic_block): Disregard debug
37502         insns after final jump in test to emit dummy move.
37503
37504 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
37505
37506         * gimple-iterator.h (gsi_one_nondebug_before_end_p): New.
37507         * tree-eh.c (cleanup_empty_eh): Skip more debug stmts.
37508
37509 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
37510
37511         * multiple_target.c (create_dispatcher_calls): Init e_next.
37512         * tree-ssa-loop-split.c (split_loop): Init border.
37513         * tree-vect-loop.c (vect_determine_vectorization_factor): Init
37514         scalar_type.
37515
37516 2017-01-04  Michael Meissner  <meissner@linux.vnet.ibm.com>
37517
37518         PR target/71977
37519         PR target/70568
37520         PR target/78823
37521         * config/rs6000/predicates.md (sf_subreg_operand): New predicate.
37522         (altivec_register_operand): Do not return true if the operand
37523         contains a SUBREG mixing SImode and SFmode.
37524         (vsx_register_operand): Likewise.
37525         (vsx_reg_sfsubreg_ok): New predicate.
37526         (vfloat_operand): Do not return true if the operand contains a
37527         SUBREG mixing SImode and SFmode.
37528         (vint_operand): Likewise.
37529         (vlogical_operand): Likewise.
37530         (gpc_reg_operand): Likewise.
37531         (int_reg_operand): Likewise.
37532         * config/rs6000/rs6000-protos.h (valid_sf_si_move): Add declaration.
37533         * config/rs6000/rs6000.c (valid_sf_si_move): New function to
37534         determine if a MOVSI or MOVSF operation contains SUBREGs that mix
37535         SImode and SFmode.
37536         (rs6000_emit_move_si_sf_subreg): New helper function.
37537         (rs6000_emit_move): Call rs6000_emit_move_si_sf_subreg to possbily
37538         fixup SUBREGs involving SImode and SFmode.
37539         * config/rs6000/vsx.md (SFBOOL_*): New constants that are operand
37540         numbers for the new peephole2 optimization.
37541         (peephole2 for SFmode unions): New peephole2 to optimize cases in
37542         the GLIBC math library that do AND/IOR/XOR operations on single
37543         precision floating point.
37544         * config/rs6000/rs6000.h (TARGET_NO_SF_SUBREG): New internal
37545         target macros to say whether we need to avoid SUBREGs mixing
37546         SImode and SFmode.
37547         (TARGET_ALLOW_SF_SUBREG): Likewise.
37548         * config/rs6000/rs6000.md (UNSPEC_SF_FROM_SI): New unspecs.
37549         (UNSPEC_SI_FROM_SF): Likewise.
37550         (iorxor): Change spacing.
37551         (and_ior_xor): New iterator for AND, IOR, and XOR.
37552         (movsi_from_sf): New insns for SImode/SFmode SUBREG support.
37553         (movdi_from_sf_zero_ext): Likewise.
37554         (mov<mode>_hardfloat, FMOVE32 iterator): Use register_operand
37555         instead of gpc_reg_operand.  Add SImode/SFmode SUBREG support.
37556         (movsf_from_si): New insn for SImode/SFmode SUBREG support.
37557         (fma<mode>4): Use gpc_reg_operand instead of register_operand.
37558         (fms<mode>4): Likewise.
37559         (fnma<mode>4): Likewise.
37560         (fnms<mode>4): Likewise.
37561         (nfma<mode>4): Likewise.
37562         (nfms<mode>4): Likewise.
37563
37564 2017-01-04  Marek Polacek  <polacek@redhat.com>
37565
37566         PR c++/64767
37567         * doc/invoke.texi: Document -Wpointer-compare.
37568
37569 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
37570
37571         * optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without
37572         RejectNegative.
37573
37574         * dwarf2out.c (output_loc_list): Don't throw away 64K+ location
37575         descriptions for -gdwarf-5 and emit them as uleb128 instead of
37576         2-byte data.
37577
37578 2017-01-04  Kelvin Nilsen  <kelvin@gcc.gnu.org>
37579
37580         PR target/78056
37581         * doc/sourcebuild.texi (PowerPC-specific attributes): Add
37582         documentation of the powerpc_popcntb_ok attribute.
37583         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
37584         code to issue warning messages if a requested CPU configuration is
37585         not supported by the binary (assembler and loader) toolchain.
37586         (spe_init_builtins): Add two assertions to prevent ICE if attempt is
37587         made to define a built-in function that has been disabled.
37588         (paired_init_builtins): Add assertion to prevent ICE if attempt is
37589         made to define a built-in function that has been disabled.
37590         (altivec_init_builtins): Add comment explaining why definition
37591         of the DST built-in functions is not preceded by an assertion
37592         check.  Add assertions to prevent ICE if attempts are made to
37593         define an altivec predicate or an abs* built-in function that has
37594         been disabled.
37595         (htm_init_builtins): Add comment explaining why definition of the
37596         htm built-in functions is not preceded by an assertion check.
37597
37598 2017-01-04  Jeff Law  <law@redhat.com>
37599
37600         PR tree-optimizatin/67955
37601         * tree-ssa-alias.c (same_addr_size_stores_p): Check offsets first.
37602         Allow any SSA_VAR_P as the base objects.  Use integer_zerop.  Verify
37603         the points-to solution does not include pt_null.  Use DECL_PT_UID
37604         unconditionally.
37605
37606 2017-01-04  Uros Bizjak  <ubizjak@gmail.com>
37607
37608         * config/i386/i386.md (HI/SImode test with imm to QImode splitters):
37609         Use gen_int_mode instead of gen_lopwart for const_int operands.
37610
37611 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
37612
37613         PR tree-optimization/71563
37614         * match.pd: Simplify X << Y into X if Y is known to be 0 or
37615         out of range value - has low bits known to be zero.
37616
37617 2017-01-04  Alan Modra  <amodra@gmail.com>
37618
37619         * Makefile.in (aclocal_deps): Update and order as per aclocal.m4.
37620         * configure: Regenerate.
37621         * config.in: Regenerate.
37622
37623 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
37624
37625         PR bootstrap/77569
37626         * input.c (ebcdic_execution_charset::on_error): Don't use strstr for
37627         a substring of the message, but strcmp with the whole message.  Ifdef
37628         ENABLE_NLS, translate the message first using dgettext.
37629
37630 2017-01-03  Jeff Law  <law@redhat.com>
37631
37632         PR tree-optimizatin/78856
37633         * tree-ssa-threadupdate.c: Include tree-vectorizer.h.
37634         (mark_threaded_blocks): Remove code to truncate thread paths that
37635         cross multiple loop headers.  Instead invalidate the cached loop
37636         iteration information and handle case of a thread path walking
37637         into an irreducible region.
37638
37639 2017-01-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
37640
37641         PR target/78900
37642         * config/rs6000/rs6000.c (rs6000_split_signbit): Change some
37643         assertions.  Add support for doing the signbit if the IEEE 128-bit
37644         floating point value is in a GPR.
37645         * config/rs6000/rs6000.md (Fsignbit): Delete.
37646         (signbit<mode>2_dm): Delete using <Fsignbit> and just use "wa".
37647         Update the length attribute if the value is in a GPR.
37648         (signbit<mode>2_dm_<su>ext): Add combiner pattern to eliminate
37649         the sign or zero extension instruction, since the value is always 0/1.
37650         (signbit<mode>2_dm2): Delete using <Fsignbit>.
37651
37652         PR target/78953
37653         * config/rs6000/vsx.md (vsx_extract_<mode>_store_p9): If we are
37654         extracting SImode to a GPR register so that we can generate a
37655         store, limit the vector to be in a traditional Altivec register
37656         for the vextuwrx instruction.
37657
37658 2017-01-03  Ian Lance Taylor  <iant@google.com>
37659
37660         * godump.c (go_format_type): Treat ENUMERAL_TYPE like INTEGER_TYPE.
37661
37662 2017-01-03  Martin Sebor  <msebor@redhat.com>
37663
37664         PR tree-optimization/78696
37665         * gimple-ssa-sprintf.c (format_floating): Correct handling of
37666         precision.  Use MPFR for %f for greater fidelity.  Correct handling
37667         of %g.
37668         (pass_sprintf_length::compute_format_length): Set width and precision
37669         specified by asrerisk to void_node for vararg functions.
37670         (try_substitute_return_value): Adjust dump output.
37671
37672 2017-01-03  David Edelsohn  <dje.gcc@gmail.com>
37673
37674         * doc/invoke.texi (RS6000 options): LRA is enabled by default.
37675
37676 2017-01-03  Eric Botcazou  <ebotcazou@adacore.com>
37677
37678         * doc/invoke.texi (SPARC options): Document -mlra as the default.
37679         * config/sparc/sparc.c (sparc_option_override): Force LRA unless
37680         -mlra/-mno-lra was passed to the compiler.
37681
37682 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
37683
37684         PR rtl-optimization/65618
37685         * emit-rtl.c (try_split): Move initialization of "before" and
37686         "after" to just before the call to emit_insn_after_setloc.
37687
37688 2017-01-03  Gerald Pfeifer  <gerald@pfeifer.com>
37689
37690         * doc/md.texi (Standard Names): Remove reference to Java frontend.
37691
37692 2017-01-03  Pierre-Marie de Rodat  <derodat@adacore.com>
37693
37694         * dwarf2out.c (gen_enumeration_type_die): When
37695         -gno-strict-dwarf, add a DW_AT_encoding attribute.
37696
37697 2017-01-03  Jakub Jelinek  <jakub@redhat.com>
37698
37699         PR tree-optimization/78965
37700         * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length):
37701         Change first argument from const call_info & to call_info &.  For %n
37702         set info.nowrite to false.
37703
37704         PR middle-end/78901
37705         * gimple-ssa-sprintf.c (try_substitute_return_value): Don't change
37706         possibly throwing calls.
37707
37708         * genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME
37709         and exprs_len || fns_len, emit the code for SSA_NAME next to the exprs
37710         and fns handling, rather than in a separate case SSA_NAME.
37711
37712 2017-01-02  Jeff Law  <law@redhat.com>
37713
37714         * config/darwin-driver.c (darwin_driver_init): Const-correctness
37715         fixes for first_period and second_period variables.
37716
37717 2017-01-02  Uros Bizjak  <ubizjak@gmail.com>
37718
37719         PR target/78967
37720         * config/i386/i386.md (UNSPEC_NOREX_MEM): New unspec.
37721         (*insvqi_1): New insn pattern.
37722         (*insvqi_1_mem_rex64): Ditto.
37723         (*insvqi_2): Ditto.
37724         (*insvqi_3): Rename from *insvqi.
37725
37726         (*extzvqi_mem_rex64): Add UNSPEC_NOREX_MEM tag.
37727
37728 2017-01-02  Gerald Pfeifer  <gerald@pfeifer.com>
37729
37730         * doc/cfg.texi (Edges): Remove reference to Java.
37731         (Maintaining the CFG): Ditto.
37732
37733 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
37734
37735         PR middle-end/77674
37736         * symtab.c (symtab_node::binds_to_current_def_p): Fix handling of
37737         transparent aliases.
37738
37739 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
37740
37741         PR middle-end/77484
37742         * predict.def (PRED_CALL): Update hitrate.
37743         (PRED_INDIR_CALL, PRED_POLYMORPHIC_CALL): New predictors.
37744         * predict.c (tree_estimate_probability_bb): Split CALL predictor
37745         into direct/indirect/polymorphic variants.
37746
37747 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
37748
37749         Update copyright years.
37750
37751         * gcc.c (process_command): Update copyright notice dates.
37752         * gcov-dump.c (print_version): Ditto.
37753         * gcov.c (print_version): Ditto.
37754         * gcov-tool.c (print_version): Ditto.
37755         * gengtype.c (create_file): Ditto.
37756         * doc/cpp.texi: Bump @copying's copyright year.
37757         * doc/cppinternals.texi: Ditto.
37758         * doc/gcc.texi: Ditto.
37759         * doc/gccint.texi: Ditto.
37760         * doc/gcov.texi: Ditto.
37761         * doc/install.texi: Ditto.
37762         * doc/invoke.texi: Ditto.
37763 \f
37764 Copyright (C) 2017 Free Software Foundation, Inc.
37765
37766 Copying and distribution of this file, with or without modification,
37767 are permitted in any medium without royalty provided the copyright
37768 notice and this notice are preserved.