aarch64: Force TImode values into even registers
[gcc.git] / gcc / ChangeLog
1 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
2
3 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
4 16-byte modes held in GP registers to use an even regno.
5
6 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
7 (aarch64_atomic_ldop_supported_p): Remove.
8 (aarch64_gen_atomic_ldop): Remove.
9 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
10 Fully expand LSE operations here.
11 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
12 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
13 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
14 and use ATOMIC_LDOP instead; use register_operand for the input;
15 drop the split and emit insns directly.
16 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
17 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
18 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
19
20 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
21 (aarch64_gen_atomic_ldop): Don't call it.
22 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
23 Use aarch64_reg_or_zero.
24 (aarch64_atomic_exchange<ALLI>): Likewise.
25 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
26 operand 0; use aarch64_reg_or_zero for input; merge ...
27 (@aarch64_atomic_swp<ALLI>): ... this and remove.
28
29 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
30 (aarch64_split_compare_and_swap): Use it.
31 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
32 test oldval against the proper predicate.
33 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
34 Use nonmemory_operand for expected.
35 (cas_short_expected_pred): New.
36 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
37 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
38 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
39 (aarch64_plushi_operand): New.
40
41 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
42 Force oldval into the rval register for TARGET_LSE; emit the compare
43 during initial expansion so that it may be deleted if unused.
44 (aarch64_gen_atomic_cas): Remove.
45 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
46 Change =&r to +r for operand 0; use match_dup for operand 2;
47 remove is_weak and mod_f operands as unused. Drop the split
48 and merge with...
49 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
50 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
51 (@aarch64_atomic_cas<GPI>): Similarly.
52
53 2018-10-31 Richard Biener <rguenther@suse.de>
54
55 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
56 using ABSU_EXPR.
57
58 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
59
60 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
61 * config/aarch64/aarch64.md: Include saphira.md
62 * config/aarch64/saphira.md: New file for pipeline description.
63
64 2018-10-30 Martin Sebor <msebor@redhat.com>
65
66 PR middle-end/87041
67 * gimple-ssa-sprintf.c (format_directive): Use %G to include
68 inlining context.
69 (sprintf_dom_walker::compute_format_length):
70 Avoid setting POSUNDER4K here.
71 (get_destination_size): Handle null argument values.
72 (get_user_idx_format): New function.
73 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
74 functions, including user-defined with attribute format printf.
75 Use %G to include inlining context.
76 Set POSUNDER4K here.
77
78 2018-10-30 Jan Hubicka <jh@suse.cz>
79
80 * params.def (lto-partitions): Bump from 32 to 128.
81
82 2018-10-30 Jan Hubicka <jh@suse.cz>
83
84 * tree.c
85 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
86 head in file.
87 (free_lang_data_in_type): Forward declare.
88 (fld_type_variant_equal_p): New function.
89 (fld_type_variant): New function
90 (fld_incomplete_types): New hash.
91 (fld_incomplete_type_of): New function
92 (fld_simplfied-type): New function.
93 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
94 (free_lang_data): Allocate and free fld_incomplete_type; update call
95 of free_lang_data_in_decl.
96
97 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
98
99 * gcov.c (output_lines): Remove duplicate line.
100
101 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
102
103 * config/rs6000/rs6000.md (bswapdi2): Force address into register
104 if not in indexed or indirect form.
105 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
106 (bswapdi2_store): Ditto.
107 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
108 helper function.
109 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
110 Prototype for helper function.
111
112 2018-10-30 Martin Sebor <msebor@redhat.com>
113
114 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
115 (target, pragma GCC optimize, pragma GCC target): Ditto.
116
117 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
118
119 * doc/extend.texi: Fix prototype and description of
120 __builtin_expect_with_probability.
121
122 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
123
124 * cgraph.h (clone_function_name_1): Replaced by new
125 clone_function_name_numbered that takes name as string; for
126 privatize_symbol_name_1 use only.
127 (clone_function_name): Renamed to
128 clone_function_name_numbered to be explicit about numbering.
129 (clone_function_name): New two-argument function that does
130 not number its output.
131 (clone_function_name): New three-argument function that
132 takes a number to append to its output.
133 * cgraphclones.c (duplicate_thunk_for_node):
134 (clone_function_name_1): Renamed.
135 (clone_function_name_numbered): Two new functions.
136 (clone_function_name): Improved documentation.
137 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
138 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
139 * final.c (final_scan_insn_1): Use the new clone_function_name
140 without numbering.
141 * multiple_target.c (create_dispatcher_calls): Ditto.
142 (create_target_clone): Ditto.
143 * omp-expand.c (grid_expand_target_grid_body): Ditto.
144 * omp-low.c (create_omp_child_function_name): Ditto.
145 * omp-simd-clone.c (simd_clone_create): Ditto.
146 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
147 new clone_function_name without numbering.
148
149 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
150
151 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
152 Assert that the allocation size is not zero.
153
154 2018-10-30 Richard Biener <rguenther@suse.de>
155
156 PR tree-optimization/87800
157 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
158 non-induction or reduction PHIs.
159
160 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
161
162 * config/aarch64/falkor-tag-collision-avoidance.c
163 (execute_tag_collision_avoidance): Call df_note_add_problem.
164
165 2018-10-30 Martin Liska <mliska@suse.cz>
166
167 * doc/extend.texi: Fix typo in documentation
168 of __builtin_expect_with_probability.
169
170 2018-10-29 David Malcolm <dmalcolm@redhat.com>
171
172 PR c++/87721
173 * input.c (get_substring_ranges_for_loc): Detect if
174 linemap_resolve_location gives us a NULL map, and reject
175 this case.
176
177 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
178
179 * config.gcc (xstormy16-*-elf): Set tm_d_file.
180
181 2018-10-29 David Malcolm <dmalcolm@redhat.com>
182 Martin Sebor <msebor@redhat.com>
183 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
184
185 * doc/ux.texi (Quoting): New subsection, adapted from material at
186 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
187 MartinSebor and ManuelLopezIbanez.
188 (Fix-it hints): Note that fix-it hints shouldn't be marked for
189 translation.
190
191 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
192
193 PR middle-end/87469
194 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
195 max value.
196
197 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
198
199 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
200
201 2018-10-29 Paul Koning <ni1d@arrl.net>
202
203 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
204
205 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
206
207 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
208 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
209 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
210 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
211 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
212 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
213 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
214 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
215 Change 'vector' to '__vector'.
216 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
217 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
218 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
219 _mm_avg_pu16): Likewise. And, whitespace corrections.
220
221 2018-10-29 Richard Biener <rguenther@suse.de>
222
223 PR tree-optimization/87785
224 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
225 internal defs.
226
227 2018-10-29 Olivier Hainque <hainque@adacore.com>
228
229 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
230
231 2018-10-29 Olivier Hainque <hainque@adacore.com>
232
233 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
234 ports configuration macro, defaults to "gnu".
235 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
236 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
237
238 2018-10-29 Olivier Hainque <hainque@adacore.com>
239
240 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
241
242 2018-10-29 Richard Biener <rguenther@suse.de>
243
244 PR tree-optimization/87790
245 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
246 (vect_make_slp_decision): Adjust.
247 (vect_slp_analyze_bb_1): Likewise.
248 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
249 edges.
250
251 2018-10-29 Richard Biener <rguenther@suse.de>
252
253 PR tree-optimization/87785
254 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
255 and processing.
256 (vect_build_slp_tree): Likewise.
257 (vect_gather_slp_loads): New function.
258 (vect_analyze_slp_instance): Gather loads separately from the
259 SLP tree build.
260
261 2018-10-29 Martin Liska <mliska@suse.cz>
262
263 * Makefile.in: Make dependency to json.o.
264 * doc/gcov.texi: Document new JSON format, remove
265 old intermediate format documentation.
266 * gcov.c (struct function_info): Come up with m_name and
267 m_demangled_name.
268 (function_info::function_info): Initialize it.
269 (function_info::~function_info): Release it.
270 (main): Rename flag_intermediate_format to flag_json_format.
271 (print_usage): Describe --json-format.
272 (process_args): Set flag_json_format.
273 (output_intermediate_line): Remove.
274 (output_intermediate_json_line): Likewise.
275 (get_gcov_intermediate_filename): Return new extension
276 ".gcov.json.gz".
277 (output_intermediate_file): Implement JSON emission.
278 (output_json_intermediate_file): Implement JSON emission.
279 (generate_results): Use ::get_name for function name.
280 Handle JSON output file.
281 (read_graph_file): Use ::get_name instead of cplus_demangle.
282 (read_count_file): Likewise.
283 (solve_flow_graph): Likewise.
284 (add_line_counts): Likewise.
285 (accumulate_line_counts): Use new flag_json_format.
286 (output_function_details): Use ::get_name instead of cplus_demangle.
287 (output_lines): Likewise.
288 * json.cc (test_writing_literals): Add new tests.
289 * json.h (class literal): Add new boolean constructor.
290
291 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
292
293 PR rtl-optimization/87701
294 PR rtl-optimization/87780
295 * combine.c (make_more_copies): Rewrite.
296
297 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
298
299 * doc/generic.texi (ABSU_EXPR): Document.
300 * match.pd (absu(x)*absu(x) -> x*x): Handle.
301 (absu(absu(X)) -> absu(X)): Likewise.
302 (absu(-X) -> absu(X)): Likewise.
303 (absu(X) where X is nonnegative -> X): Likewise.
304
305 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
306
307 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
308 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
309 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
310 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
311 (s-tm-texi): Also check timestamp on d-target.def.
312 (generated_files): Add TM_D_H and d-target-hooks-def.h.
313 (build/genhooks.o): Also depend on D_TARGET_DEF.
314 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
315 variables.
316 * config/aarch64/aarch64-d.c: New file.
317 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
318 Define.
319 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
320 prototype.
321 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
322 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
323 * config/arm/arm-d.c: New file.
324 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
325 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
326 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
327 * config/arm/t-arm (arm-d.o): New rule.
328 * config/default-d.c: New file.
329 * config/glibc-d.c: New file.
330 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
331 * config/i386/i386-d.c: New file.
332 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
333 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
334 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
335 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
336 * config/i386/t-i386 (i386-d.o): New rule.
337 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
338 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
339 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
340 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
341 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
342 * config/mips/mips-d.c: New file.
343 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
344 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
345 * config/mips/t-mips (mips-d.o): New rule.
346 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
347 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
348 * config/powerpcspe/powerpcspe-d.c: New file.
349 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
350 New prototype.
351 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
352 Support GNU D by using 0 as the language type.
353 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
354 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
355 * config/riscv/riscv-d.c: New file.
356 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
357 prototype.
358 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
359 * config/riscv/t-riscv (riscv-d.o): New rule.
360 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
361 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
362 * config/rs6000/rs6000-d.c: New file.
363 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
364 prototype.
365 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
366 Support GNU D by using 0 as the language type.
367 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
368 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
369 * config/s390/s390-d.c: New file.
370 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
371 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
372 * config/s390/t-s390 (s390-d.o): New rule.
373 * config/sparc/sparc-d.c: New file.
374 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
375 prototype.
376 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
377 * config/sparc/t-sparc (sparc-d.o): New rule.
378 * config/t-glibc (glibc-d.o): New rule.
379 * configure: Regenerated.
380 * configure.ac (tm_d_file): New variable.
381 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
382 * doc/contrib.texi (Contributors): Add self for the D frontend.
383 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
384 * doc/install.texi (Configuration): Mention libphobos as an option for
385 --enable-shared. Mention d as an option for --enable-languages.
386 (Testing): Mention check-d as a target.
387 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
388 name suffixes. Mention d as a -x option.
389 * doc/sourcebuild.texi (Top Level): Mention libphobos.
390 * doc/standards.texi (Standards): Add section on D language.
391 * doc/tm.texi: Regenerated.
392 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
393 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
394 * dwarf2out.c (is_dlang): New function.
395 (gen_compile_unit_die): Use DW_LANG_D for D.
396 (declare_in_namespace): Return module die for D, instead of adding
397 extra declarations into the namespace.
398 (gen_namespace_die): Generate DW_TAG_module for D.
399 (gen_decl_die): Handle CONST_DECLSs for D.
400 (dwarf2out_decl): Likewise.
401 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
402 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
403 kinds of aggregates.
404 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
405 * genhooks.c: Include d/d-target.def.
406
407 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
408
409 PR target/85669
410 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
411 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
412 (STACK_DYNAMIC_OFFSET): Likewise.
413
414 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
415
416 PR target/80024
417 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
418 error message.
419
420 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
421
422 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
423 return type and other typos.
424
425 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
426
427 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
428 a shorter sequence with fewer branches.
429 (emit_final_str_compare_gpr): Ditto.
430
431 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
432
433 * config/rs6000/tmmintrin.h: New file.
434 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
435
436 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
437
438 * config/rs6000/mmintrin.h: Enable 32bit compilation.
439 * config/rs6000/xmmintrin.h: Likewise.
440
441 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
442
443 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
444
445 2018-10-26 Richard Biener <rguenther@suse.de>
446
447 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
448 and wrapper.
449 (vect_mark_slp_stmts_relevant): Likewise.
450 (vect_detect_hybrid_slp_stmts): Likewise.
451 (vect_bb_slp_scalar_cost): Likewise.
452 (vect_remove_slp_scalar_calls): Likewise.
453
454 2018-10-26 Jan Hubicka <jh@suse.cz>
455
456 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
457 (warn_types_mismatch): Fix walk of DECL_NAME.
458 (odr_types_equivalent_p): Fix overactive assert.
459
460 2018-10-26 Richard Biener <rguenther@suse.de>
461
462 PR tree-optimization/87105
463 * tree-vectorizer.h (_slp_tree::refcnt): New member.
464 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
465 refcnt.
466 (vect_create_new_slp_node): Initialize refcnt to one.
467 (bst_traits): Move.
468 (scalar_stmts_set_t, bst_fail): Remove.
469 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
470 (vect_build_slp_tree): Add bst_map argument and lookup
471 already created SLP nodes.
472 (vect_print_slp_tree): Handle a SLP graph, print SLP node
473 addresses.
474 (vect_slp_rearrange_stmts): Handle a SLP graph.
475 (vect_analyze_slp_instance): Adjust and free SLP nodes from
476 the CSE map. Fix indenting.
477 (vect_schedule_slp_instance): Add short-cut.
478
479 2018-10-26 Martin Liska <mliska@suse.cz>
480
481 PR testsuite/86158
482 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
483 addr_expr and not with pointers.
484
485 2018-10-26 Jan Hubicka <jh@suse.cz>
486
487 * tree.c (free_lang_data_in_type): Only check main variants.
488 * ipa-devirt.c (warn_odr): Make static.
489 (types_same_for_odr): Drop strict variant.
490 (types_odr_comparable): Likewise.
491 (odr_or_derived_type_p): Look for main variants.
492 (odr_name_hasher::equal): Cleanup comment.
493 (odr_subtypes_equivalent): Add warn and warned arguments; check main
494 variants.
495 (type_variants_equivalent_p): break out from ...
496 (odr_types_equivalent): ... here; go for main variants where needed.
497 (warn_odr): ... here; turn static.
498 (warn_types_mismatch): Compare mangled names of main variants.
499 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
500 (type_with_linkage_p): Sanity check that we look at main variant.
501 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
502 * tree.h (types_same_for_odr): Drop strict argument.
503
504 2018-10-26 Richard Biener <rguenther@suse.de>
505
506 PR tree-optimization/87746
507 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
508 Simplify and fix WRT strided store groups with size not
509 equal to step in element count.
510 (vect_analyze_group_access_1): Dump the whole group.
511
512 2018-10-25 Carl Love <cel@us.ibm.com>
513
514 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
515 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
516 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
517 precicion entry for each overloaded builtin.
518 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
519 VSCEDPUO): Rename overloaded name.
520 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
521 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
522 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
523 define_expand for xscmpexqp instruction.
524 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
525
526 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
527 Jinsong Ji <jji@us.ibm.com>
528
529 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
530 function with vec_sl.
531 (_mm_slli_epi32): Likewise.
532 (_mm_slli_epi64): Likewise.
533 (_mm_srai_epi16): Replace deprecated function with vec_sra.
534 (_mm_srai_epi32): Likewise.
535 (_mm_srli_epi16): Replace deprecated function with vec_sr.
536 (_mm_srli_epi32): Likewise.
537 (_mm_srli_epi64): Likewise.
538 (_mm_sll_epi16): Replace deprecated function with vec_sl.
539 (_mm_sll_epi32): Likewise.
540 (_mm_sll_epi64): Likewise.
541 (_mm_sra_epi16): Replace deprecated function with vec_sra.
542 (_mm_sra_epi32): Likewise.
543 (_mm_srl_epi16): Replace deprecated function with vec_sr.
544 (_mm_srl_epi32): Likewise.
545 (_mm_srl_epi64): Likewise.
546
547 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
548 Jinsong Ji <jji@us.ibm.com>
549
550 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
551 comparison operators with vec_cmp* for compatibility due to
552 unfortunate history; clean up formatting and use types more
553 appropriately.
554 (_mm_sll_epi32): Likewise.
555 (_mm_sll_epi64): Likewise.
556 (_mm_srl_epi16): Likewise.
557 (_mm_srl_epi32): Likewise.
558 (_mm_srl_epi64): Likewise.
559
560 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
561 Jinsong Ji <jji@us.ibm.com>
562
563 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
564 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
565 __vector __bool int. Use vec_cmpgt in preference to deprecated
566 function vec_vcmpgtfp.
567 (_mm_max_ps): Likewise.
568
569 2018-10-25 Jeff Law <law@redhat.com>
570
571 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
572 if returning false.
573
574 2018-10-25 Martin Sebor <msebor@redhat.com>
575
576 * doc/extend.texi (aligned): Expand attribute description.
577 (Alignment): Rename section. Discuss function arguments.
578
579 2018-10-25 Jan Hubicka <jh@suse.cz>
580
581 * ipa-devirt.c (main_odr_variant): Remove.
582 (hash_odr_name, types_same_for_odr, types_odr_comparable,
583 odr_name_hasher::equal, odr_subtypes_equivalent_p):
584 Drop use of main_odr_variant.
585 (add_type_duplicate): Silence confused warnings on integer types.
586 (get_odr_type): Always look for main variant.
587 (register_odr_type): Simplify.
588
589 2018-10-25 Richard Biener <rguenther@suse.de>
590
591 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
592 Initialize ng to silence error with release checking bootstrap.
593
594 2018-10-25 Richard Biener <rguenther@suse.de>
595
596 * tree-if-conv.c: Include tree-ssa-sccvn.h.
597 (tree_if_conversion): Run CSE on the if-converted loop body.
598
599 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
600
601 * config/s390/constraints.md (ZL): New constraint.
602 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
603 operands.
604 * config/s390/s390.md (movdi_larl): Remove.
605 (movdi_64): Add the LARL alternative.
606
607 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
608
609 PR bootstrap/87747
610 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
611 (RTX_CODE_HWINT_P): New macro.
612 (rtx_code_size): Use RTX_CODE_HWINT_P ().
613
614 2018-10-25 Jan Hubicka <jh@suse.cz>
615
616 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
617 is anonymous.
618
619 2018-10-25 Richard Biener <rguenther@suse.de>
620
621 PR tree-optimization/87665
622 PR tree-optimization/87745
623 * tree-vectorizer.h (get_earlier_stmt): Remove.
624 (get_later_stmt): Pick up UID from the original non-pattern stmt.
625
626 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
627
628 * options.texi (Deprecated): Move list to Var section.
629
630 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
631 Jinsong Ji <jji@us.ibm.com>
632
633 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
634 __vector long to __vector long long.
635 (_mm_cvtpd_ps): Likewise.
636 (_mm_cvttpd_epi32): Likewise.
637 (_mm_cvtpi32_pd): Likewise.
638 (_mm_unpackhi_epi64): Likewise.
639 (_mm_unpacklo_epi64): Likewise.
640
641 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
642
643 PR rtl-optimization/87720
644 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
645
646 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
647
648 * gimple-ssa-isolate-paths.c
649 (find_implicit_erroneous_behavior): Do not change code if the
650 pass is running for warnings only.
651 (find_explicit_erroneous_behavior): Likewise.
652
653 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
654
655 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
656 Define as rs6000_mangle_decl_assembler_name.
657 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
658 long double to IEEE long double, switch the names of the long
659 double built-in functions to be <func>f128 instead of <func>l.
660
661 2018-10-24 Martin Sebor <msebor@redhat.com>
662
663 * doc/extend.texi (nonnull): List no-argument form. Reference
664 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
665
666 2018-10-24 Richard Biener <rguenther@suse.de>
667
668 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
669
670 2018-10-24 Martin Liska <mliska@suse.cz>
671
672 PR tree-optimization/84436
673 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
674 Remove.
675 (switch_conversion::contains_linear_function_p): New.
676 (switch_conversion::build_one_array): Support linear
677 transformation on input.
678 * tree-switch-conversion.h (struct switch_conversion): Add
679 contains_linear_function_p declaration.
680
681 2018-10-24 Richard Biener <rguenther@suse.de>
682
683 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
684 if its argument is CONSTANT_CLASS_P.
685
686 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
687
688 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
689 it is wrong for forward declarations.
690
691 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
692
693 * config/s390/s390.c (s390_check_qrst_address): Add the missing
694 SYMBOL_REF_P () check.
695
696 2018-10-24 Richard Biener <rguenther@suse.de>
697
698 PR tree-optimization/87105
699 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
700 dump classification.
701 (vect_analyze_data_ref_accesses): Handle duplicate loads and
702 stores by splitting the affected group after the fact.
703 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
704 fail the SLP build because of size constraints.
705
706 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
707
708 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
709 * configure: Regenerate.
710 * config.in: Regenerate.
711 * varasm.c (mergeable_string_section): Use readonly_data_section
712 if linker doesn't support SHF_MERGE with alignment > 8.
713 (mergeable_constant_section): Likewise.
714
715 2018-10-24 Richard Biener <rguenther@suse.de>
716
717 PR tree-optimization/84013
718 * tree-ssa-structalias.c (struct msdi_data): New struct for
719 marshalling data to walk_stmt_load_store_ops.
720 (maybe_set_dependence_info): Refactor as callback for
721 walk_stmt_load_store_ops.
722 (compute_dependence_clique): Set restrict info on all stmt kinds.
723
724 2018-10-24 Martin Liska <mliska@suse.cz>
725
726 * cgraph.c (cgraph_node::dump):
727 Remove reduntant dumps and make tp_first_run dump more compact.
728
729 2018-10-24 Richard Biener <rguenther@suse.de>
730
731 PR tree-optimization/87665
732 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
733 to reflect reality.
734
735 2018-10-12 Jeff Law <law@redhat.com>
736
737 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
738 for H8/S.
739
740 2018-10-23 Richard Biener <rguenther@suse.de>
741
742 * tree-vrp.c (add_assert_info): Guard dump_printf with
743 dump_enabled_p.
744 * gimple-ssa-evrp-analyze.c
745 (evrp_range_analyzer::record_ranges_from_incoming_edge):
746 Use value_range::ignore_equivs_equal_p.
747
748 2018-10-23 Richard Biener <rguenther@suse.de>
749
750 PR tree-optimization/87105
751 PR tree-optimization/87608
752 * passes.def (pass_all_early_optimizations): Add early phi-opt
753 after dce.
754 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
755 addition to debug stmts.
756 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
757 and abs replacement early.
758 * tree-cfg.c (gimple_empty_block_p): Likewise.
759
760 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
761
762 PR target/86383
763 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
764 specified to configure.
765 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
766
767 2018-10-23 Richard Biener <rguenther@suse.de>
768
769 PR tree-optimization/87700
770 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
771
772 2018-10-23 Jakub Jelinek <jakub@redhat.com>
773
774 PR target/87674
775 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
776 second argument from __mmask16 to __mmask8.
777 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
778 _mm_mask_packs_epi32): Likewise.
779 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
780 Likewise.
781 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
782
783 2018-10-23 Richard Biener <rguenther@suse.de>
784
785 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
786
787 2018-10-23 Richard Biener <rguenther@suse.de>
788
789 PR tree-optimization/86144
790 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
791 over simd attribute.
792
793 2018-10-23 Richard Biener <rguenther@suse.de>
794
795 PR tree-optimization/87693
796 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
797 the case we do not find the taken edge.
798
799 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
800 Jinsong Ji <jji@us.ibm.com>
801
802 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
803 (_mm_store_pd): Use unaligned vector type for pointer cast.
804 (_mm_maskmoveu_si128): Likewise.
805 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
806 (_mm_store_ps): Use unaligned vector type for pointer cast.
807
808 2018-10-22 Paul Koning <ni1d@arrl.net>
809
810 * symtab.c (symtab_node::increase_alignment): Correct max
811 alignment check.
812
813 2018-10-22 Yury Gribov <tetra2005@gmail.com>
814
815 PR tree-optimization/87633
816 * match.pd: Do not generate unordered integer comparisons.
817
818 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
819
820 PR rtl-optimization/87600
821 * combine.c: Add include of expr.h.
822 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
823 register to a pseudo.
824 (make_more_copies): New function, add a copy to a new pseudo after
825 the moves from hard registers into pseudos.
826 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
827 later. Call make_more_copies.
828
829 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
830
831 * lra-constraints.c (process_alt_operands): New local array,
832 matching_early_clobber. Check matching_early_clobber before
833 decrementing reject, and set matching_early_clobber after.
834
835 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
836
837 PR target/87598
838 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
839 call output_addr_const and hope for the best.
840
841 2018-10-22 Richard Biener <rguenther@suse.de>
842
843 * gimple-ssa-evrp-analyze.c
844 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
845 smarter about what ranges to use.
846 * tree-vrp.c (add_assert_info): Dump here.
847 (register_edge_assert_for_2): Instead of here at multiple but
848 not all places.
849
850 * gcc.dg/tree-ssa/evrp12.c: New testcase.
851 * gcc.dg/predict-6.c: Adjust.
852 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
853 * gcc.dg/tree-ssa/vrp02.c: Likewise.
854 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
855
856 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
857 Richard Biener <rguenther@suse.de>
858
859 * bitmap.h: Update data structure documentation, including a
860 description of bitmap views as either linked-lists or splay trees.
861 (struct bitmap_element_def): Update comments for splay tree bitmaps.
862 (struct bitmap_head_def): Likewise.
863 (bitmap_list_view, bitmap_tree_view): New prototypes.
864 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
865 tree_form fields.
866 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
867 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
868 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
869 released bitmap element here.
870 (bitmap_element_free): Remove.
871 (bitmap_elt_clear_from): Work on splay tree bitmaps.
872 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
873 this function similar ones such that linked-list bitmap implementation
874 functions are grouped.
875 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
876 and moved for grouping.
877 (bitmap_list_insert_element_after): Renamed from
878 bitmap_elt_insert_after, and moved for grouping.
879 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
880 (bitmap_tree_link_left, bitmap_tree_link_right,
881 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
882 bitmap_tree_link_element, bitmap_tree_unlink_element,
883 bitmap_tree_find_element): New functions for splay-tree bitmap
884 implementation.
885 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
886 Renamed and moved, see above entries.
887 (bitmap_tree_listify_from): New function to convert part of a splay
888 tree bitmap to a linked-list bitmap.
889 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
890 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
891 (bitmap_find_bit): Remove.
892 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
893 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
894 Handle splay tree bitmaps.
895 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
896 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
897 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
898 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
899 bitmap_intersect_compl_p, bitmap_ior_and_compl,
900 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
901 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
902 corresponding changes to use linked-list specific bitmap_element
903 manipulation functions as applicable for efficiency.
904 (bitmap_tree_to_vec): New function.
905 (debug_bitmap_elt_file): New function split out from ...
906 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
907 (bitmap_print): Likewise.
908
909 PR tree-optimization/63155
910 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
911 SSA edge worklists.
912 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
913 in tree-view.
914
915 2018-10-22 Martin Liska <mliska@suse.cz>
916
917 PR tree-optimization/87686
918 Revert
919 2018-08-29 Martin Liska <mliska@suse.cz>
920
921 * tree-switch-conversion.c (switch_conversion::expand):
922 Strenghten assumption about gswitch statements.
923
924 2018-10-22 Martin Liska <mliska@suse.cz>
925
926 * ipa-icf.c (sem_item::compare_attributes): Remove.
927 (sem_item::compare_referenced_symbol_properties): Use
928 attribute_list_equal instead.
929 (sem_function::equals_wpa): Likewise.
930 * ipa-icf.h: Remove compare_attributes.
931
932 2018-10-22 Richard Biener <rguenther@suse.de>
933
934 PR middle-end/87682
935 * mem-stats.h (mem_usage::operator==): Fix pasto.
936
937 2018-10-22 Richard Biener <rguenther@suse.de>
938
939 PR tree-optimization/87640
940 * tree-vrp.c (set_value_range_with_overflow): Decompose
941 incomplete result.
942 (extract_range_from_binary_expr_1): Adjust.
943
944 2018-10-22 Martin Jambor <mjambor@suse.cz>
945
946 * tree-eh.h (stmt_could_throw_p): Add function parameter.
947 (stmt_can_throw_external): Likewise.
948 (stmt_can_throw_internal): Likewise.
949 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
950 (lower_eh_constructs_2): Likewise.
951 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
952 (stmt_can_throw_external): Likewise.
953 (stmt_can_throw_internal): Likewise.
954 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
955 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
956 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
957 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
958 (pass_lower_eh_dispatch::execute): Pass cfun to
959 stmt_can_throw_external.
960 (cleanup_empty_eh): Likewise.
961 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
962 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
963 stmt_can_throw_external instead of pushing it to cfun.
964 (symbol_table::create_edge): Likewise.
965 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
966 stmt_can_throw_internal.
967 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
968 to stmt_could_throw_p.
969 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
970 stmt_can_throw_internal.
971 (pass_store_merging::execute): Likewise.
972 * gimple-ssa-strength-reduction.c
973 (find_candidates_dom_walker::before_dom_children): Pass cfun to
974 stmt_could_throw_p.
975 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
976 stmt_can_throw_internal.
977 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
978 to stmt_can_throw_external.
979 (check_stmt): Pass cfun to stmt_could_throw_p.
980 (check_stmt): Pass cfun to stmt_can_throw_external.
981 (pass_nothrow::execute): Likewise.
982 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
983 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
984 stmt_can_throw_internal.
985 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
986 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
987 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
988 * tree-complex.c (expand_complex_libcall): Pass cfun to
989 stmt_could_throw_p and to stmt_can_throw_internal.
990 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
991 * tree-inline.c (copy_edges_for_bb): Likewise.
992 (maybe_move_debug_stmts_to_successors): Likewise.
993 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
994 stmt_could_throw_p.
995 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
996 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
997 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
998 stmt_can_throw_internal.
999 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
1000 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
1001 stmt_could_throw_p.
1002 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
1003 stmt_can_throw_internal.
1004 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
1005 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
1006 stmt_could_throw_p.
1007 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
1008 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
1009 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1010 (convert_mult_to_fma_1): Likewise.
1011 (convert_to_divmod): Likewise.
1012 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
1013 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
1014 * tree-ssa-propagate.c
1015 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
1016 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
1017 (maybe_optimize_range_tests): Likewise.
1018 (linearize_expr_tree): Likewise.
1019 (reassociate_bb): Likewise.
1020 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1021 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
1022 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
1023 (handle_char_store): Likewise.
1024 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
1025 stmt_can_throw_internal.
1026 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
1027 stmt_could_throw_p.
1028 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1029 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
1030 (vectorizable_simd_clone_call): Likewise.
1031 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
1032 (gimple_stringop_fixed_value): Likewise.
1033
1034 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
1035
1036 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
1037 literal pool references.
1038 (s390_check_qrst_address): Adapt to the new behavior of
1039 s390_loadrelative_operand_p ().
1040
1041 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1042
1043 PR target/72782
1044 * config/i386/sse.md (*andnot<mode>3_bcst): New.
1045
1046 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1047
1048 PR target/72782
1049 * config/i386/sse.md (*<code><mode>3_bcst): New.
1050
1051 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1052
1053 PR target/72782
1054 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
1055 V4DI, V16SI and V8DI.
1056 (*sub<mode>3<mask_name>_bcst): New.
1057 (*add<mode>3<mask_name>_bcst): Likewise.
1058
1059 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
1060 Jinsong Ji <jji@us.ibm.com>
1061
1062 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
1063 __m64 with __vector unsigned long long for compatibility.
1064 (_mm_movemask_epi8): Likewise.
1065 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
1066 (_mm_cvttps_pi32): Likewise.
1067 (_mm_cvtpi32_ps): Likewise.
1068 (_mm_cvtps_pi16): Likewise.
1069 (_mm_loadh_pi): Likewise.
1070 (_mm_storeh_pi): Likewise.
1071 (_mm_movehl_ps): Likewise.
1072 (_mm_movelh_ps): Likewise.
1073 (_mm_loadl_pi): Likewise.
1074 (_mm_storel_pi): Likewise.
1075 (_mm_movemask_ps): Likewise.
1076 (_mm_shuffle_pi16): Likewise.
1077
1078 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1079
1080 PR target/72782
1081 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
1082 __builtin_ia32_vfnmsubpd512_mask.
1083 (_mm512_mask_fnmsub_round_pd): Likewise.
1084 (_mm512_fnmsub_pd): Likewise.
1085 (_mm512_mask_fnmsub_pd): Likewise.
1086 (_mm512_maskz_fnmsub_round_pd): Use
1087 __builtin_ia32_vfnmsubpd512_maskz.
1088 (_mm512_maskz_fnmsub_pd): Likewise.
1089 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
1090 (_mm512_mask_fnmsub_round_ps): Likewise.
1091 (_mm512_fnmsub_ps): Likewise.
1092 (_mm512_mask_fnmsub_ps): Likewise.
1093 (_mm512_maskz_fnmsub_round_ps): Use
1094 __builtin_ia32_vfnmsubps512_maskz.
1095 (_mm512_maskz_fnmsub_ps): Likewise.
1096 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
1097 __builtin_ia32_vfnmsubpd256_mask.
1098 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
1099 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1100 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
1101 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1102 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1103 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
1104 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
1105 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
1106 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
1107 __builtin_ia32_vfnmsubpd.
1108 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
1109 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
1110 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
1111 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
1112 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
1113 * config/i386/i386-builtin.def: Add
1114 __builtin_ia32_vfnmsubpd256_mask,
1115 __builtin_ia32_vfnmsubpd256_maskz,
1116 __builtin_ia32_vfnmsubpd128_mask,
1117 __builtin_ia32_vfnmsubpd128_maskz,
1118 __builtin_ia32_vfnmsubps256_mask,
1119 __builtin_ia32_vfnmsubps256_maskz,
1120 __builtin_ia32_vfnmsubps128_mask,
1121 __builtin_ia32_vfnmsubps128_maskz,
1122 __builtin_ia32_vfnmsubpd512_mask,
1123 __builtin_ia32_vfnmsubpd512_maskz,
1124 __builtin_ia32_vfnmsubps512_mask,
1125 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
1126 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
1127 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
1128 __builtin_ia32_vfnmsubpd256.
1129 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
1130 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
1131 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
1132 Likewise.
1133 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
1134 Likewise.
1135 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
1136 Likewise.
1137 (fmai_vmfnmsub_<mode><round_name>): Likewise.
1138
1139 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1140
1141 PR target/72782
1142 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
1143 __builtin_ia32_vfnmaddpd512_mask.
1144 (_mm512_mask_fnmadd_round_pd): Likewise.
1145 (_mm512_fnmadd_pd): Likewise.
1146 (_mm512_mask_fnmadd_pd): Likewise.
1147 (_mm512_maskz_fnmadd_round_pd): Use
1148 __builtin_ia32_vfnmaddpd512_maskz.
1149 (_mm512_maskz_fnmadd_pd): Likewise.
1150 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
1151 (_mm512_mask_fnmadd_round_ps): Likewise.
1152 (_mm512_fnmadd_ps): Likewise.
1153 (_mm512_mask_fnmadd_ps): Likewise.
1154 (_mm512_maskz_fnmadd_round_ps): Use
1155 __builtin_ia32_vfnmaddps512_maskz.
1156 (_mm512_maskz_fnmadd_ps): Likewise.
1157 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
1158 __builtin_ia32_vfnmaddpd256_mask.
1159 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1160 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1161 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1162 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1163 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1164 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1165 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1166 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1167 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1168 __builtin_ia32_vfnmaddpd.
1169 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1170 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1171 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1172 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1173 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1174 * config/i386/i386-builtin.def: Add
1175 __builtin_ia32_vfnmaddpd256_mask,
1176 __builtin_ia32_vfnmaddpd256_maskz,
1177 __builtin_ia32_vfnmaddpd128_mask,
1178 __builtin_ia32_vfnmaddpd128_maskz,
1179 __builtin_ia32_vfnmaddps256_mask,
1180 __builtin_ia32_vfnmaddps256_maskz,
1181 __builtin_ia32_vfnmaddps128_mask,
1182 __builtin_ia32_vfnmaddps128_maskz,
1183 __builtin_ia32_vfnmaddpd512_mask,
1184 __builtin_ia32_vfnmaddpd512_maskz,
1185 __builtin_ia32_vfnmaddps512_mask,
1186 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1187 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1188 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1189 __builtin_ia32_vfnmaddpd256.
1190 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1191 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1192 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1193 Likewise.
1194 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1195 Likewise.
1196 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1197 Likewise.
1198 (fmai_vmfnmadd_<mode><round_name>): Likewise.
1199
1200 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1201
1202 PR target/72782
1203 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1204 __builtin_ia32_vfmsubpd512_mask.
1205 (_mm512_mask_fmsub_round_pd): Likewise.
1206 (_mm512_fmsub_pd): Likewise.
1207 (_mm512_mask_fmsub_pd): Likewise.
1208 (_mm512_maskz_fmsub_round_pd): Use
1209 __builtin_ia32_vfmsubpd512_maskz.
1210 (_mm512_maskz_fmsub_pd): Likewise.
1211 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1212 (_mm512_mask_fmsub_round_ps): Likewise.
1213 (_mm512_fmsub_ps): Likewise.
1214 (_mm512_mask_fmsub_ps): Likewise.
1215 (_mm512_maskz_fmsub_round_ps): Use
1216 __builtin_ia32_vfmsubps512_maskz.
1217 (_mm512_maskz_fmsub_ps): Likewise.
1218 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1219 __builtin_ia32_vfmsubpd256_mask.
1220 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1221 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1222 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1223 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1224 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1225 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1226 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1227 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1228 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1229 __builtin_ia32_vfmsubpd.
1230 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1231 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1232 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1233 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1234 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1235 * config/i386/i386-builtin.def: Add
1236 __builtin_ia32_vfmsubpd256_mask,
1237 __builtin_ia32_vfmsubpd256_maskz,
1238 __builtin_ia32_vfmsubpd128_mask,
1239 __builtin_ia32_vfmsubpd128_maskz,
1240 __builtin_ia32_vfmsubps256_mask,
1241 __builtin_ia32_vfmsubps256_maskz,
1242 __builtin_ia32_vfmsubps128_mask,
1243 __builtin_ia32_vfmsubps128_maskz,
1244 __builtin_ia32_vfmsubpd512_mask,
1245 __builtin_ia32_vfmsubpd512_maskz,
1246 __builtin_ia32_vfmsubps512_mask,
1247 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1248 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1249 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1250 __builtin_ia32_vfmsubpd256.
1251 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1252 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1253 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1254 Likewise.
1255 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1256 Likewise.
1257 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1258 Likewise.
1259 (fmai_vmfmsub_<mode><round_name>): Likewise.
1260
1261 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1262
1263 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1264 Remove plus. Renamed to ...
1265 (*sub<mode>3<mask_name>_bcst): This.
1266 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1267 (*add<mode>3<mask_name>_bcst): This.
1268
1269 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1270
1271 PR target/72782
1272 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1273
1274 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1275
1276 PR target/87662
1277 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1278 (_mm_or_epi32): Likewise.
1279 (_mm256_xor_epi32): Likewise.
1280 (_mm_xor_epi32): Likewise.
1281 (_mm256_or_epi64): Likewise.
1282 (_mm_or_epi64): Likewise.
1283 (_mm256_xor_epi64): Likewise.
1284 (_mm_xor_epi64): Likewise.
1285
1286 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
1287
1288 PR target/72782
1289 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1290
1291 2018-10-20 Jakub Jelinek <jakub@redhat.com>
1292
1293 PR middle-end/87647
1294 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1295
1296 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
1297
1298 * doc/ux.texi: Move @section directly after @node.
1299
1300 2018-10-19 Jakub Jelinek <jakub@redhat.com>
1301
1302 PR middle-end/85488
1303 PR middle-end/87649
1304 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1305 depend closely nested inside of loop with ordered clause with
1306 a parameter.
1307
1308 2018-10-19 David Malcolm <dmalcolm@redhat.com>
1309
1310 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1311 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1312 * doc/ux.texi: New file.
1313
1314 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
1315
1316 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1317 be the first CR field allocated.
1318
1319 2018-10-19 Richard Biener <rguenther@suse.de>
1320
1321 PR target/87657
1322 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1323 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1324
1325 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1326
1327 PR target/72782
1328 * config/i386/sse.md
1329 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1330 (*add<mode>3<mask_name>_bcst_2): Likewise.
1331
1332 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1333
1334 * config/i386/sse.md
1335 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1336 Replace nonimmediate_operand with register_operand.
1337 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1338 Likewise.
1339 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1340 Likewise.
1341
1342 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
1343
1344 PR rtl-optimization/87596
1345 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1346 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1347 for instructions in FROM..TO range.
1348
1349 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
1350
1351 * cfgexpand.c (expand_one_var): Use specific wording in error message
1352 for non-local frame variables.
1353 * stor-layout.c (layout_decl): Do not issue a warning for them.
1354
1355 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
1356
1357 * haifa-sched.c (priority): Add force_recompute parameter.
1358 (apply_replacement): Call priority () with force_recompute = true.
1359 (restore_pattern): Likewise.
1360
1361 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1362
1363 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1364 HOST_BITS_PER_WIDE_INT.
1365 (test_vector_ops_duplicate): Likewise.
1366
1367 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1368
1369 PR target/72782
1370 * config/i386/sse.md (VF_AVX512): New.
1371 (avx512bcst): Likewise.
1372 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1373 Likewise.
1374 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1375 Likewise.
1376 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1377 Likewise.
1378
1379 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
1380
1381 * doc/invoke.texi (-dumpversion): Improve grammar.
1382 (-dumpfullversion): Make more consistent with -dumpversion.
1383
1384 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
1385
1386 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1387 Set JUMP_LABEL to the jump insn.
1388 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1389 Predict emitted jump and add label to jump insn.
1390
1391 2018-10-18 David Malcolm <dmalcolm@redhat.com>
1392
1393 PR tree-optimization/87562
1394 * input.c (get_substring_ranges_for_loc): Use
1395 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1396 getting the linemap for the endpoint. Verify that it's either
1397 in the same linemap as the start point's spelling location, or
1398 at least in the same file.
1399
1400 2018-10-18 Richard Biener <rguenther@suse.de>
1401
1402 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1403 feed width-specific load/store costs through ix86_vec_cost.
1404 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1405 (k8_cost): Likewise.
1406 (bdver_cost): Likewise.
1407 (znver1_cost): Likewise.
1408 (btver1_cost): Likewise.
1409 (btver2_cost): Likewise.
1410
1411 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1412
1413 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
1414 to simplify subreg of vec_merge.
1415
1416 2018-10-18 Richard Biener <rguenther@suse.de>
1417
1418 * config/i386/i386.c: Fix costing of vector FMA.
1419
1420 2018-10-18 Richard Biener <rguenther@suse.de>
1421
1422 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
1423 and argument.
1424 (ix86_builtin_vectorization_cost): For vec_construct properly
1425 cost insertion into SSE regs.
1426 (...): Adjust calls to ix86_vec_cost.
1427
1428 2018-10-18 Richard Biener <rguenther@suse.de>
1429
1430 PR middle-end/87087
1431 Revert
1432 2018-02-07 Richard Biener <rguenther@suse.de>
1433
1434 PR tree-optimization/84204
1435 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
1436 this place.
1437
1438 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1439
1440 PR target/87537
1441 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
1442 of vec_duplicate.
1443 (test_vector_ops_duplicate): Add test for a scalar subreg of a
1444 VEC_MERGE of a VEC_DUPLICATE.
1445
1446 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1447
1448 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
1449 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
1450 * doc/standards.texi (C Language): Document C2X.
1451 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
1452 (rl78_option_override): Handle "GNU C2X" language name.
1453
1454 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1455
1456 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
1457 Document C17 as published in 2018.
1458
1459 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
1460
1461 PR middle-end/87623
1462 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
1463 bail out if both sides do not have the same storage order.
1464
1465 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1466
1467 * bitmap.c (bitmap_head::dump): New.
1468 * bitmap.h (bitmap_head): Add dump().
1469 * gimple-ssa-evrp-analyze.c
1470 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
1471 (evrp_range_analyzer::set_ssa_range_info): Same.
1472 (evrp_range_analyzer::record_ranges_from_phis): Same.
1473 (evrp_range_analyzer::record_ranges_from_stmt): Same.
1474 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
1475 * gimple-ssa-sprintf.c (get_int_range): Same.
1476 (format_integer): Same.
1477 (sprintf_dom_walker::handle_gimple_call): Same.
1478 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
1479 (ipcp_vr_lattice::top_p): Same.
1480 (ipcp_vr_lattice::bottom_p): Same.
1481 (ipcp_vr_lattice::set_to_bottom): Same.
1482 (ipa_vr_operation_and_type_effects): Same.
1483 (propagate_vr_across_jump_function): Same.
1484 (ipcp_store_vr_results): Same.
1485 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
1486 (ipa_print_node_jump_functions_for_edge): Same.
1487 (ipa_get_value_range): Same.
1488 (ipa_compute_jump_functions_for_edge): Same.
1489 (ipa_write_jump_function): Same.
1490 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
1491 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1492 Same.
1493 * vr-values.c (set_value_range_to_nonnegative): Same.
1494 (set_value_range_to_truthvalue): Same.
1495 (vr_values::get_value_range): Same.
1496 (vr_values::set_defs_to_varying): Same.
1497 (vr_values::update_value_range): Same.
1498 (symbolic_range_based_on_p): Same.
1499 (vr_values::op_with_boolean_value_range_p): Same.
1500 (vr_values::extract_range_for_var_from_comparison_expr): Same.
1501 (vr_values::extract_range_from_ssa_name): Same.
1502 (vr_values::extract_range_from_binary_expr): Same.
1503 (vr_values::extract_range_from_unary_expr): Same.
1504 (vr_values::extract_range_from_cond_expr): Same.
1505 (vr_values::extract_range_from_comparison): Same.
1506 (vr_values::check_for_binary_op_overflow): Same.
1507 (vr_values::extract_range_basic): Same.
1508 (vr_values::extract_range_from_assignment): Same.
1509 (compare_ranges): Same.
1510 (compare_range_with_value): Same.
1511 (vr_values::adjust_range_with_scev): Same.
1512 (vrp_valueize): Same.
1513 (vrp_valueize_1): Same.
1514 (vr_values::get_vr_for_comparison): Same.
1515 (vr_values::compare_name_with_value): Same.
1516 (vr_values::compare_names): Same.
1517 (vr_values::vrp_evaluate_conditional): Same.
1518 (find_case_label_ranges): Same.
1519 (vr_values::vrp_visit_switch_stmt): Same.
1520 (vr_values::extract_range_from_phi_node): Same.
1521 (vr_values::simplify_div_or_mod_using_ranges): Same.
1522 (vr_values::simplify_bit_ops_using_ranges): Same.
1523 (test_for_singularity): Same.
1524 (range_fits_type_p): Same.
1525 (vr_values::simplify_cond_using_ranges_1): Same.
1526 (vr_values::simplify_switch_using_ranges): Same.
1527 (vr_values::simplify_float_conversion_using_ranges): Same.
1528 (vr_values::two_valued_val_range_p): Same.
1529 (vr_values::add_equivalence): Move to value_range::equiv_add.
1530 * vr-values.h (vr_values::add_equivalence): Remove.
1531 (VR_INITIALIZER): Remove.
1532 * tree-vrp.c (value_range::set): New.
1533 (value_range::equiv_add): New.
1534 (value_range::value_range): New.
1535 (value_range::deep_copy): New.
1536 (value_range::check): New.
1537 (value_range::equal_p): New.
1538 (value_range::ignore_equivs_equal_p): New.
1539 (value_range::operator==): New.
1540 (value_range::operator!=): New.
1541 (value_range::symbolic_p): New.
1542 (value_range::numeric_p): New.
1543 (value_range::set_undefined): New.
1544 (value_range::set_varying): New.
1545 (value_range::may_contain_p): New.
1546 (value_range::equiv_clear): New.
1547 (value_range::singleton_p): New.
1548 (value_range::intersect): New.
1549 (value_range::dump): New.
1550 (value_range::set_and_canonicalize): New.
1551 (set_value_range): Adjust for value_range API.
1552 (set_value_range_to_undefined): Same.
1553 (set_value_range_to_varying): Same.
1554 (set_and_canonicalize_value_range): Same.
1555 (set_value_range_to_nonnull): Same.
1556 (set_value_range_to_null): Same.
1557 (range_is_null): Same.
1558 (range_is_nonnull): Same.
1559 (range_int_cst_p): Same.
1560 (range_int_cst_singleton_p): Same.
1561 (symbolic_range_p): Same.
1562 (range_includes_zero_p): Same.
1563 (value_range_constant_singleton): Same.
1564 (vrp_set_zero_nonzero_bits): Same.
1565 (ranges_from_anti_range): Same.
1566 (extract_range_into_wide_ints): Same.
1567 (extract_range_from_multiplicative_op): Same.
1568 (set_value_range_with_overflow): Same.
1569 (extract_range_from_binary_expr_1): Same.
1570 (extract_range_from_unary_expr): Same.
1571 (dump_value_range): Same.
1572 (debug_value_range): Same.
1573 (vrp_prop::check_array_ref): Same.
1574 (vrp_prop::check_mem_ref): Same.
1575 (vrp_prop::vrp_initialize): Same.
1576 (vrp_prop::visit_stmt): Same.
1577 (intersect_ranges): Same.
1578 (vrp_prop::visit_phi): Same.
1579 (vrp_prop::vrp_finalize): Same.
1580 (determine_value_range_1): Same.
1581 (determine_value_range): Same.
1582 (vrp_intersect_ranges_1): Rename to...
1583 (vrp_intersect_1): this.
1584 (vrp_intersect_ranges): Rename to...
1585 (value_range::intersect_helper): ...this.
1586 (vrp_meet_1): Rename to...
1587 (value_range::union_helper): ...this.
1588 (vrp_meet): Rename to...
1589 (value_range::union_): ...this.
1590 (copy_value_range): Remove.
1591 * tree-vrp.h (struct value_range): Rewrite into a proper class.
1592 (value_range::vrtype): New.
1593 (value_range::type): New.
1594 (value_range::equiv): New.
1595 (value_range::min): New.
1596 (value_range::max): New.
1597 (value_range::varying_p): New.
1598 (value_range::undefined_p): New.
1599 (value_range::null_p): New.
1600 (value_range::equiv_add): New.
1601 (copy_value_range): Remove.
1602
1603 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1604
1605 * Makefile.in (SELFTEST_TARGETS): New.
1606 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
1607 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1608 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
1609 c/Make-lang.in.
1610 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
1611 (selftest-c++-gdb, selftest-c++-valgrind): Move to
1612 cp/Make-lang.in.
1613 * configure: Regenerate.
1614 * configure.ac (selftest_languages): New.
1615
1616 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1617
1618 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
1619 overflow wraps argument.
1620 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
1621 wide_int_range_multiplicative_op.
1622 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
1623 overflow wraps argument.
1624 (wide_int_range_multiplicative_op): Same.
1625 (wide_int_range_lshift): Same.
1626 (wide_int_range_div): Same.
1627 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
1628 (wide_int_range_lshift): Same.
1629 (wide_int_range_div): Same.
1630
1631 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1632
1633 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
1634 use sign as argument.
1635 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
1636 wide_int_range_shift_undefined_p.
1637
1638 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1639
1640 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
1641 Rename to...
1642 (@despeculate_copy<ALLI_TI:mode>): ... This.
1643 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
1644 switch statement.
1645
1646 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1647
1648 * config.gcc: Obsolete *-*-solaris2.10*.
1649 * doc/install.texi (Specific, *-*-solaris2*): Document it.
1650
1651 2018-10-12 Jeff Law <law@redhat.com>
1652
1653 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
1654 reg + sym +- const_int addressing modes.
1655
1656 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1657
1658 * common.opt (fdiagnostics-minimum-margin-width=): New option.
1659 * diagnostic-show-locus.c (layout::layout): Apply the minimum
1660 margin width.
1661 (layout::start_annotation_line): Only print up to 3 of the
1662 margin character, to avoid touching the left-hand side.
1663 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
1664 minimum margin width, as set by test_diagnostic_context's ctor.
1665 (selftest::test_fixit_insert_containing_newline): Likewise.
1666 (selftest::test_fixit_insert_containing_newline_2): Likewise.
1667 (selftest::test_line_numbers_multiline_range): Clear
1668 dc.min_margin_width.
1669 * diagnostic.c (diagnostic_initialize): Initialize
1670 min_margin_width.
1671 * diagnostic.h (struct diagnostic_context): Add field
1672 "min_margin_width".
1673 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
1674 * opts.c (common_handle_option): Handle
1675 OPT_fdiagnostics_minimum_margin_width_.
1676 * selftest-diagnostic.c
1677 (selftest::test_diagnostic_context::test_diagnostic_context):
1678 Initialize min_margin_width to 6.
1679 * toplev.c (general_init): Initialize global_dc->min_margin_width.
1680
1681 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1682
1683 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
1684 Fix usage of "error_at_rich_loc" in the comment.
1685
1686 2018-10-15 Renlin Li <renlin.li@arm.com>
1687
1688 PR target/87563
1689 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
1690 if-conversioned loop when it contains ifn with types not
1691 supported by backend.
1692 * internal-fn.c (expand_direct_optab_fn): Add an assert.
1693 (direct_internal_fn_supported_p): New helper function.
1694 * internal-fn.h (direct_internal_fn_supported_p): Declare.
1695
1696 2018-10-15 Jakub Jelinek <jakub@redhat.com>
1697
1698 PR target/87572
1699 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1700 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1701 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1702
1703 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
1704
1705 PR tree-optimization/87022
1706 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
1707 bits in dist vector rather than the first one.
1708
1709 2018-10-15 Richard Biener <rguenther@suse.de>
1710
1711 PR middle-end/87610
1712 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
1713 (visit_loadstore): When a used restrict tag escaped verify that
1714 the points-to solution of "other" pointers do not include
1715 escaped.
1716 (compute_dependence_clique): If a used restrict tag escaped
1717 communicated that down to visit_loadstore.
1718
1719 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
1720
1721 * config/s390/s390.c (s390_expand_vec_init): Force vector element
1722 into reg if it isn't a general operand.
1723
1724 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1725
1726 PR target/87599
1727 * config/i386/sse.md (*vec_dupv2di): Add register source to
1728 movddup.
1729
1730 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1731
1732 PR target/87572
1733 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1734 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
1735 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1736 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1737
1738 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
1739
1740 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
1741 (notice_args_size): Set it in the current trace if no insn that can
1742 throw internally has been seen yet.
1743 (connect_traces): When connecting args_size between traces, allow the
1744 incoming values not to match if there is an insn setting it before the
1745 first insn that can throw internally; in that case, force the creation
1746 of a CFI note on this latter insn.
1747
1748 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
1749
1750 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
1751 the base class, because using the injected-class-name was not clearly
1752 specified until DR 176.
1753
1754 2018-10-12 Paul Koning <ni1d@arrl.net>
1755
1756 * config/pdp11/pdp11.md (doloop_end): New expander.
1757 (doloop_end_insn): renamed from "doloop_end".
1758 (addqi3): New pattern.
1759 (subqi3): New pattern.
1760 * config/pdp11/predicates.md (incdec_operand): New predicate.
1761
1762 2018-10-12 Yury Gribov <tetra2005@gmail.com>
1763
1764 PR middle-end/81376
1765 * real.c (format_helper::can_represent_integral_type_p): New function
1766 * real.h (format_helper::can_represent_integral_type_p): Ditto.
1767 * match.pd: New pattern.
1768
1769 2018-10-12 Alexandre Oliva <oliva@adacore.com>
1770
1771 * configure.ac: Introduce --enable-large-address-aware
1772 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
1773 * doc/install.texi: Document it.
1774 * configure, config.in: Rebuilt.
1775 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
1776 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
1777 (LINK_SPEC): Insert it.
1778 * config/i386/mingw-264.h: Likewise.
1779
1780 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
1781
1782 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
1783
1784 PR rtl-optimization/87600
1785 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
1786
1787 2018-10-12 Paul Koning <ni1d@arrl.net>
1788
1789 * doc/md.texi (doloop_end): Document that the pattern code may
1790 need to check operand mode.
1791
1792 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
1793
1794 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
1795 to zero-extend between int and floating-point registers.
1796 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
1797 ldp into floating-point registers. Add type and arch attributes.
1798 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
1799 Use f_loads for type attribute.
1800
1801 2018-10-11 Martin Sebor <msebor@redhat.com>
1802
1803 * doc/extend.texi (attribute packed): Correct typos.
1804
1805 2018-10-11 Martin Sebor <msebor@redhat.com>
1806
1807 * doc/extend.texi (attribute flatten): Mention interaction with
1808 noinline.
1809
1810 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
1811
1812 PR target/87156
1813 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
1814 Set new_decl virtual flag to zero.
1815
1816 2018-10-11 Martin Sebor <msebor@redhat.com>
1817
1818 PR middle-end/87593
1819 * doc/extend.texi (attribute format_arg): Discuss using multiple
1820 attributes on a single function.
1821
1822 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
1823
1824 PR tree-optimization/86829
1825 * match.pd (sin (atan (x))): New simplification rules.
1826 (cos (atan (x))): Likewise.
1827 * real.c (build_sinatan_real): New function.
1828 * real.h (build_sinatan_real): Prototype.
1829
1830 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
1831
1832 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
1833 function.
1834 (fold_mergeeo_helper): New helper function.
1835 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
1836 intrinsics. Correct some whitespace indentation issues.
1837
1838 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
1839
1840 PR target/87511
1841 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
1842 Use HOST_WIDE_INT_1U for shift.
1843
1844 2018-10-11 Doug Rupp <rupp@adacore.com>
1845 Olivier Hainque <hainque@adacore.com>
1846
1847 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
1848 Pass --relax to the linker for RTPs.
1849 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
1850
1851 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
1852 Jan Hubicka <jh@suse.cz>
1853 Martin Jambor <mjambor@suse.cz>
1854
1855 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
1856 the same elements are repeated rather than printing all of them.
1857 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
1858 "repeated" elements.
1859 * read-rtl-function.c (test_loading_repeat): New function.
1860 (read_rtl_function_c_tests): Call test_loading_repeat.
1861 * rtl-tests.c (test_dumping_repeat): New function.
1862 (rtl_tests_c_tests): Call test_dumping_repeat.
1863
1864 2018-10-11 Richard Biener <rguenther@suse.de>
1865
1866 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
1867 bdver?_cost): Unify to ...
1868 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
1869 * config/i386/i386.c (processor_cost_table): Adjust.
1870
1871 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
1872
1873 PR middle-end/87574
1874 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
1875 the thunk when expanding to GIMPLE.
1876
1877 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
1878
1879 * varasm.c (mergeable_string_section): Don't try to move zero-length
1880 strings to the merge section.
1881
1882 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
1883
1884 PR target/87573
1885 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
1886
1887 2018-10-10 Jakub Jelinek <jakub@redhat.com>
1888
1889 PR target/87550
1890 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
1891 to special_args set.
1892
1893 2018-10-10 Richard Biener <rguenther@suse.de>
1894
1895 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
1896 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
1897 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
1898 and recursing and pattern terminating the recursion on SSE
1899 vector width using ix86_expand_reduc.
1900 (reduc_sminmax_scal_<mode>): Split into part reducing to half
1901 width and recursing and SSE2 vector variant doing the final
1902 reduction with ix86_expand_reduc.
1903 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
1904 with terminating the recursion at AVX level, splitting that
1905 to SSE there.
1906
1907 2018-10-09 David Malcolm <dmalcolm@redhat.com>
1908
1909 * genmatch.c (error_cb): Rename to...
1910 (diagnostic_cb): ...this, converting int params to enums.
1911 (fatal_at): Update for renaming.
1912 (warning_at): Likewise.
1913 (main): Likewise.
1914 * input.c (selftest::ebcdic_execution_charset::apply):
1915 Update for renaming of...
1916 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
1917 to...
1918 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
1919 converting level and reason to enums.
1920 (class selftest::lexer_error_sink): Rename to...
1921 (class selftest::lexer_test_options): ...this, renaming field
1922 "m_errors" to "m_diagnostics".
1923 (selftest::lexer_test_options::apply): Update for renaming of...
1924 (selftest::lexer_test_options::on_error): ...this, renaming to...
1925 (selftest::lexer_test_options::on_diagnostic): ...this
1926 converting level and reason to enums.
1927 (selftest::test_lexer_string_locations_raw_string_unterminated):
1928 Update for renamings.
1929 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
1930 "reason".
1931
1932 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
1933
1934 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
1935 * config/rs6000/pmmintrin.h: New file.
1936
1937 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
1938
1939 PR tree-optimization/86659
1940 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
1941
1942 2018-10-09 Richard Biener <rguenther@suse.de>
1943
1944 PR tree-optimization/63155
1945 * tree-ssa-structalias.c: Include tree-ssa.h.
1946 (get_constraint_for_ssa_var): For undefs return nothing_id.
1947 (find_func_aliases): Cleanup PHI handling.
1948
1949 2018-10-09 Richard Biener <rguenther@suse.de>
1950
1951 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
1952 replacements.
1953
1954 2018-10-09 Martin Liska <mliska@suse.cz>
1955
1956 * asan.c (asan_emit_stack_protection): If a stack variable
1957 is located in a same file as current function, then emit
1958 line info into variable definition string.
1959
1960 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1961
1962 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
1963 information.
1964
1965 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1966
1967 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
1968 on the thunk.
1969
1970 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1971
1972 PR tree-optimization/86659
1973 * gimple-match.h (struct gimple_match_op): Add reverse field.
1974 (gimple_match_op::set_op): New overloaded method.
1975 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
1976 the REF_REVERSE_STORAGE_ORDER flag on the value.
1977 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
1978 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
1979
1980 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1981
1982 PR middle-end/63155
1983 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
1984 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
1985
1986 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
1987
1988 PR target/87517
1989 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
1990 Defined with __builtin_ia32_vfmaddsubpd512_mask.
1991
1992 2018-10-08 Richard Biener <rguenther@suse.de>
1993
1994 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
1995 cost the same as AVX128 ones.
1996
1997 2018-10-08 Paul Koning <ni1d@arrl.net>
1998
1999 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
2000 (expand_block_move): New function.
2001 * config/pdp11/pdp11.c (output_block_move): Remove.
2002 (expand_block_move): New function.
2003 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
2004 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
2005 (*movmemhi1): Remove.
2006
2007 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
2008
2009 * config/s390/2827.md: Increase latencies for some FP instructions.
2010
2011 2018-10-08 Richard Biener <rguenther@suse.de>
2012
2013 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2014 Open a dump scope.
2015 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
2016 * tree-vectorizer.h (dump_stmt_cost): Adjust.
2017 (add_stmt_cost): Dump return value of the hook.
2018
2019 2018-10-08 Richard Biener <rguenther@suse.de>
2020
2021 PR tree-optimization/63155
2022 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2023 (ssa_propagation_engine::ssa_propagate): Remove redundant
2024 bitmap bit clearing.
2025
2026 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
2027
2028 PR rtl-optimization/86939
2029 PR rtl-optimization/87479
2030 * ira.h (non_conflicting_reg_copy_p): New prototype.
2031 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
2032 (make_hard_regno_dead): Don't add conflicts for register
2033 ignore_reg_for_conflicts.
2034 (make_object_dead): Likewise.
2035 (non_conflicting_reg_copy_p): New function.
2036 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
2037 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
2038 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
2039 (make_hard_regno_dead): Don't add conflicts for register
2040 ignore_reg_for_conflicts. Remove special conflict handling of
2041 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
2042 check_pic_pseudo_p and update callers.
2043 (mark_pseudo_dead): Don't add conflicts for register
2044 ignore_reg_for_conflicts.
2045 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
2046
2047 2018-10-05 Andrew Waterman <andrew@sifive.com>
2048 Jim Wilson <jimw@sifive.com>
2049
2050 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
2051 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
2052 new pattern using HONOR_SNANS that emits one extra instruction.
2053
2054 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2055
2056 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
2057 patterns): Merge SI and DI patterns to a GPR pattern.
2058 (unnamed define_insn and define_split for record form of that): Merge
2059 to a single define_insn_and_split pattern.
2060
2061 2018-10-05 David Malcolm <dmalcolm@redhat.com>
2062
2063 PR c++/56856
2064 * input.c (expand_location_to_spelling_point): Add param "aspect"
2065 and use rather than hardcoding LOCATION_ASPECT_CARET.
2066 (get_substring_ranges_for_loc): Handle the case of a single token
2067 within a macro expansion.
2068 * input.h (expand_location_to_spelling_point): Add "aspect" param,
2069 defaulting to LOCATION_ASPECT_CARET.
2070
2071 2018-10-05 Paul Koning <ni1d@arrl.net>
2072
2073 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
2074 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
2075 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
2076 (pdp11_guard_type): New function.
2077
2078 2018-10-05 Paul Koning <ni1d@arrl.net>
2079
2080 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
2081 * config/pdp11/pdp11.opt (mfloat32): Remove.
2082 (mfloat64): Remove.
2083 * doc/invoke.texi (pdp11 -mfloat32): Remove:
2084 (pdp11 -mfloat64): Remove.
2085
2086 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2087
2088 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
2089 (*cmp<mode>_cc_i387): Ditto.
2090 (*cmpu<mode>_cc_i387): Ditto.
2091 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2092 * config/i386/i386.c (ix86_expand_fp_compare): Remove
2093 "scratch" argument.
2094 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
2095 Emit x86_sahf_1 pattern.
2096 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
2097 (ix86_expand_carry_flag_compare): Ditto.
2098
2099 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2100
2101 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
2102 to reg_or_0_operand. Add "C" constraint.
2103 (*cmpxf_cc_i387): Ditto.
2104 (*cmp<mode>_i387): Change operand 2 predicate
2105 to nonimm_or_0_operand. Add "C" constraint.
2106 (*cmp<mode>_cc_i387): Ditto.
2107 (*cmp<mode>_0_i387): Remove insn pattern.
2108 (*cmp<mode>_0_cc_i387): Ditto.
2109
2110 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2111
2112 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
2113 * config/i386/predicates.md (nonimm_or_0_operand): Rename
2114 from vector_move_operand. Update all uses.
2115
2116 2018-10-05 Martin Sebor <msebor@redhat.com>
2117
2118 PR tree-optimization/87490
2119 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
2120 consistently.
2121
2122 2018-10-05 Richard Biener <rguenther@suse.de>
2123
2124 PR tree-optimization/63155
2125 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2126 vertical space in dumpfiles.
2127 * tree-ssa-propagate.h
2128 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2129 * tree-ssa-propagate.c (cfg_blocks_back): New global.
2130 (ssa_edge_worklist_back): Likewise.
2131 (curr_order): Likewise.
2132 (cfg_blocks_get): Remove abstraction.
2133 (cfg_blocks_add): Likewise.
2134 (cfg_blocks_empty_p): Likewise.
2135 (add_ssa_edge): Add to current or next worklist based on
2136 RPO index.
2137 (add_control_edge): Likewise.
2138 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2139 into ...
2140 (ssa_propagation_engine::ssa_propagate): ... here. Unify
2141 iteration from CFG and SSA edge worklist so we process
2142 everything in RPO order, prioritizing forward progress
2143 over iteration.
2144 (ssa_prop_init): Allocate new worklists, do not dump
2145 immediate uses.
2146 (ssa_prop_fini): Free new worklists.
2147
2148 2018-10-05 Richard Biener <rguenther@suse.de>
2149
2150 * tree-core.h (tree_block::abstract_flag): Remove.
2151 (tree_block::block_num): Make full 32bits.
2152 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
2153 * tree.h (BLOCK_ABSTRACT): Remove.
2154 * dwarf2out.c (gen_lexical_block_die): Remove dead code
2155 resulting from BLOCK_ABSTRACT being always false.
2156 (gen_inlined_subroutine_die): Likewise.
2157 (gen_block_die): Likewise.
2158 * tree.c (block_ultimate_origin): Likewise.
2159 * tree-pretty-print.c (dump_block_node): Remove code dealing
2160 with BLOCK_ABSTRACT.
2161 * tree-ssa-live.c (dump_scope_block): Likewise.
2162 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2163 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2164
2165 2018-10-05 Richard Biener <rguenther@suse.de>
2166
2167 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2168 is asked for initialize mode to the component mode of the
2169 vector type.
2170
2171 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2172
2173 PR target/87522
2174 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2175 assembler for -mavx.
2176 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2177
2178 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2179
2180 PR target/87509
2181 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2182 RS6000_BTM_DFP.
2183 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2184 to be DImode. When using mffscrn, force the operand to a register.
2185
2186 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
2187
2188 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2189 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2190 X87MODEF mode iterator.
2191 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2192 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2193 X87MODEF mode iterator.
2194
2195 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2196
2197 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2198 -Wno-prio-ctor-dtor.
2199
2200 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2201
2202 * Makefile.in (OBJS): Add opt-problem.o.
2203 * dump-context.h: Include "selftest.h.
2204 (selftest::temp_dump_context): New forward decl.
2205 (class dump_context): Make friend of class
2206 selftest::temp_dump_context.
2207 (dump_context::dump_loc_immediate): New decl.
2208 (class dump_pretty_printer): Move here from dumpfile.c.
2209 (class temp_dump_context): Move to namespace selftest.
2210 (temp_dump_context::temp_dump_context): Add param
2211 "forcibly_enable_dumping".
2212 (selftest::verify_dumped_text):
2213 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2214 (selftest::verify_item):
2215 (ASSERT_IS_TEXT): Move here from dumpfile.c.
2216 (ASSERT_IS_TREE): Likewise.
2217 (ASSERT_IS_GIMPLE): Likewise.
2218 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2219 to...
2220 (dump_context::dump_loc_immediate): ...this new function.
2221 (class dump_pretty_printer): Move to dump-context.h.
2222 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2223 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2224 (temp_dump_context::temp_dump_context): Move to "selftest"
2225 namespace. Add param "forcibly_enable_dumping", and use it to
2226 conditionalize the use of m_pp;
2227 (selftest::verify_dumped_text): Make non-static.
2228 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2229 (selftest::verify_item): Make non-static.
2230 (ASSERT_IS_TEXT): Move to dump-context.h.
2231 (ASSERT_IS_TREE): Likewise.
2232 (ASSERT_IS_GIMPLE): Likewise.
2233 (selftest::test_capture_of_dump_calls): Pass "true" for new
2234 param of temp_dump_context.
2235 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2236 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
2237 TDF_COMPARE_DEBUG.
2238 * opt-problem.cc: New file.
2239 * opt-problem.h: New file.
2240 * optinfo-emit-json.cc
2241 (selftest::test_building_json_from_dump_calls): Pass "true" for
2242 new param of temp_dump_context.
2243 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2244 (optinfo::emit_for_opt_problem): New function.
2245 (optinfo::emit): Clarity which emit_item is used.
2246 * optinfo.h (optinfo::get_dump_location): New accessor.
2247 (optinfo::emit_for_opt_problem): New decl.
2248 (optinfo::emit): Make const.
2249 * selftest-run-tests.c (selftest::run_tests): Call
2250 selftest::opt_problem_cc_tests.
2251 * selftest.h (selftest::opt_problem_cc_tests): New decl.
2252 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2253 bool to opt_result, converting fprintf messages to
2254 opt_result::failure_at calls. Add "stmt" param for use by the
2255 failure_at calls.
2256 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2257 (runtime_alias_check_p): Convert return type from bool to
2258 opt_result, converting dump_printf calls to
2259 opt_result::failure_at, using the statement DDR_A for their
2260 location.
2261 (find_data_references_in_stmt): Convert return type from bool to
2262 opt_result, converting "return false" to opt_result::failure_at
2263 with a new message.
2264 * tree-data-ref.h: Include "opt-problem.h".
2265 (dr_analyze_innermost): Convert return type from bool to opt_result,
2266 and add a const gimple * param.
2267 (find_data_references_in_stmt): Convert return type from bool to
2268 opt_result.
2269 (runtime_alias_check_p): Likewise.
2270 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2271 dr_analyze_innermost.
2272 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2273 Convert return type from bool to opt_result, adding a message for
2274 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2275 (vect_analyze_data_ref_dependence): Convert return type from bool
2276 to opt_result. Change sense of return type from "false"
2277 effectively meaning "no problems" to "false" meaning a problem,
2278 so that "return false" becomes "return opt_result::success".
2279 Convert "return true" calls to opt_result::failure_at, using
2280 the location of statement A rather than vect_location.
2281 (vect_analyze_data_ref_dependences): Convert return type from bool
2282 to opt_result.
2283 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2284 calls to opt_result::failure_at, using the stmt location rather
2285 than vect_location.
2286 (vect_verify_datarefs_alignment): Convert return type from bool
2287 to opt_result.
2288 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
2289 into multiple more-tightly-scoped copies.
2290 (vect_analyze_data_refs_alignment): Convert return type from bool
2291 to opt_result.
2292 (vect_analyze_data_ref_accesses): Likewise, converting a
2293 "return false" to a "return opt_result::failure_at", adding a
2294 new message.
2295 (vect_prune_runtime_alias_test_list): Convert return type from
2296 bool to opt_result, converting dump_printf_loc to
2297 opt_result::failure_at. Add a %G to show the pertinent statement,
2298 and use the stmt's location rather than vect_location.
2299 (vect_find_stmt_data_reference): Convert return type from
2300 bool to opt_result, converting dump_printf_loc to
2301 opt_result::failure_at, using stmt's location.
2302 (vect_analyze_data_refs): Convert return type from bool to
2303 opt_result. Convert "return false" to "return
2304 opt_result::failure_at", adding messages as needed.
2305 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2306 type from bool to opt_result.
2307 (vect_determine_vf_for_stmt): Likewise.
2308 (vect_determine_vectorization_factor): Likewise, converting
2309 dump_printf_loc to opt_result::failure_at, using location of phi
2310 rather than vect_location.
2311 (vect_analyze_loop_form_1): Convert return type from bool to
2312 opt_result, converting dump_printf_loc calls, retaining the use of
2313 vect_location.
2314 (vect_analyze_loop_form): Convert return type from loop_vec_info
2315 to opt_loop_vec_info.
2316 (vect_analyze_loop_operations): Convert return type from bool to
2317 opt_result, converting dump_printf_loc calls, using the location
2318 of phi/stmt rather than vect_location where available. Convert
2319 various "return false" to "return opt_result::failure_at" with
2320 "unsupported phi" messages.
2321 (vect_get_datarefs_in_loop): Convert return type from bool to
2322 opt_result. Add a message for the
2323 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2324 (vect_analyze_loop_2): Convert return type from bool to
2325 opt_result. Ensure "ok" is set to a opt_result::failure_at before
2326 each "goto again;", adding new messages where needed.
2327 Add "unsupported grouped {store|load}" messages.
2328 (vect_analyze_loop): Convert return type from loop_vec_info to
2329 opt_loop_vec_info.
2330 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2331 bool to opt_result.
2332 * tree-vect-stmts.c (process_use): Likewise, converting
2333 dump_printf_loc call and using stmt location, rather than
2334 vect_location.
2335 (vect_mark_stmts_to_be_vectorized): Likeise.
2336 (vect_analyze_stmt): Likewise, adding a %G.
2337 (vect_get_vector_types_for_stmt): Convert return type from bool to
2338 opt_result, converting dump_printf_loc calls and using stmt
2339 location, rather than vect_location.
2340 (vect_get_mask_type_for_stmt): Convert return type from tree to
2341 opt_tree, converting dump_printf_loc calls and using stmt location.
2342 * tree-vectorizer.c: Include "opt-problem.h.
2343 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2344 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
2345 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
2346 enabled, use it to report at the top level "couldn't vectorize
2347 loop" followed by the problem.
2348 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2349 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2350 to opt_result.
2351 (vect_analyze_stmt): Likewise.
2352 (vect_get_vector_types_for_stmt): Likewise.
2353 (tree vect_get_mask_type_for_stmt): Likewise.
2354 (vect_analyze_data_ref_dependences): Likewise.
2355 (vect_enhance_data_refs_alignment): Likewise.
2356 (vect_analyze_data_refs_alignment): Likewise.
2357 (vect_verify_datarefs_alignment): Likewise.
2358 (vect_analyze_data_ref_accesses): Likewise.
2359 (vect_prune_runtime_alias_test_list): Likewise.
2360 (vect_find_stmt_data_reference): Likewise.
2361 (vect_analyze_data_refs): Likewise.
2362 (vect_analyze_loop): Convert return type from loop_vec_info to
2363 opt_loop_vec_info.
2364 (vect_analyze_loop_form): Likewise.
2365 (vect_analyze_slp): Convert return type from bool to opt_result.
2366
2367 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2368
2369 * doc/invoke.texi (-fopt-info): Document new "internals"
2370 sub-option.
2371 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2372 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2373 MSG_ALL_KINDS.
2374 (optinfo_verbosity_options): Add "internals".
2375 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2376 (dump_context::apply_dump_filter_p): New member function.
2377 (dump_context::dump_loc): Use apply_dump_filter_p rather than
2378 explicitly masking the dump_kind.
2379 (dump_context::begin_scope): Increment the scope depth first. Use
2380 apply_dump_filter_p rather than explicitly masking the dump_kind.
2381 (dump_context::emit_item): Use apply_dump_filter_p rather than
2382 explicitly masking the dump_kind.
2383 (dump_dec): Likewise.
2384 (dump_hex): Likewise.
2385 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2386 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2387 (opt_info_switch_p): Update handling of default
2388 MSG_OPTIMIZED_LOCATIONS to cope with default of
2389 MSG_PRIORITY_USER_FACING.
2390 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2391 masking the dump_kind.
2392 (selftest::test_capture_of_dump_calls): Update test_dump_context
2393 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2394 than MSG_ALL. Generalize scope test to be run at all four
2395 combinations of with/without MSG_PRIORITY_USER_FACING and
2396 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2397 for each of the two values.
2398 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2399 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
2400 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2401 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2402 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2403 with MSG_PRIORITY_*.
2404 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2405 dump messages as MSG_PRIORITY_USER_FACING.
2406 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2407 about the interaction with MSG_PRIORITY_*.
2408
2409 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2410
2411 * varasm.c (output_constant): Add new parameter merge_strings.
2412 Make strings properly zero terminated in merge string sections.
2413 (mergeable_string_section): Don't fail if the last char is non-zero.
2414 (assemble_variable_contents): Handle merge string sections.
2415 (assemble_variable): Likewise.
2416 (assemble_constant_contents): Likewise.
2417 (output_constant_def_contents): Likewise.
2418 (output_constructor_array_range,
2419 output_constructor_regular_field): Adjust call to output_constant.
2420 (output_object_block): Adjust call to assemble_constant_contents
2421 and assemble_variable_contents.
2422
2423 2018-10-04 Martin Liska <mliska@suse.cz>
2424
2425 PR c/87483
2426 * cgraphunit.c (process_function_and_variable_attributes):
2427 Warn about a function with alias attribute and a body.
2428
2429 2018-10-04 Martin Liska <mliska@suse.cz>
2430
2431 PR ipa/82625
2432 * multiple_target.c (redirect_to_specific_clone): New function.
2433 (ipa_target_clone): Use it.
2434 * tree-inline.c: Fix comment.
2435
2436 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2437
2438 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
2439 fields.
2440 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
2441 (gcc::dump_manager::register_pass): New member function, adapted
2442 from loop body in gcc::pass_manager::register_pass, adding a
2443 call to update_dfi_for_opt_info.
2444 (gcc::dump_manager::opt_info_enable_passes): Store the
2445 -fopt-info options into the new fields. Move the loop
2446 bodies into...
2447 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
2448 function.
2449 * dumpfile.h (struct opt_pass): New forward decl.
2450 (gcc::dump_manager::register_pass): New decl.
2451 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
2452 (class gcc::dump_manager): Add fields "m_optgroup_flags",
2453 "m_optinfo_flags", and "m_optinfo_filename".
2454 * passes.c (gcc::pass_manager::register_pass): Move all of the
2455 dump-handling code to gcc::dump_manager::register_pass.
2456
2457 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
2458
2459 PR rtl-optimization/87466
2460 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
2461 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
2462 * doc/tm.texi: Regenerate.
2463 * ira-lives.c (process_bb_node_lives): Use the new target hook.
2464 * lra-lives.c (process_bb_lives): Likewise.
2465 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
2466 Define.
2467
2468 2018-10-04 Tamar Christina <tamar.christina@arm.com>
2469
2470 * params.c (add_params): Fix initialization.
2471
2472 2018-10-04 Martin Liska <mliska@suse.cz>
2473
2474 PR gcov-profile/84107
2475 * tree-profile.c (init_ic_make_global_vars):
2476 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
2477 Come up with new ic_tuple* variables. Emit
2478 __gcov_indirect_call{,_topn} variables.
2479 (gimple_gen_ic_profiler): Access the variable
2480 and emit gimple.
2481 (gimple_gen_ic_func_profiler): Access
2482 __gcov_indirect_call.callee field.
2483 (gimple_init_gcov_profiler): Use ptr_type_node.
2484 * value-prof.c (gimple_ic): Use ptr_type_node.
2485
2486 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2487
2488 PR tree-optimization/85787
2489 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
2490 into this function and add support for detecting multiple phis.
2491 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
2492
2493 2018-10-04 Martin Liska <mliska@suse.cz>
2494
2495 PR ipa/87491
2496 * ipa-inline.c (inline_to_all_callers_1):
2497 Call ultimate_alias_target for node being inlined.
2498
2499 2018-10-03 Jeff Law <law@redhat.com>
2500
2501 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
2502 target's wchar_t.
2503 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
2504 * tree.h (get_typenode_from_name): Prototype.
2505
2506 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2507
2508 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
2509 Change operand 2 predicate to nonimmediate_operand.
2510 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2511
2512 2018-10-03 Martin Sebor <msebor@redhat.com>
2513 Jeff Law <law@redhat.com>
2514
2515 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
2516 initialize it.
2517 (get_string_length): Detect unterminated arrays.
2518 (format_string): Same.
2519 (format_directive): Warn about unterminated arrays.
2520 (handle_gimple_call): Mark statements with no_warning as needed.
2521
2522 2018-10-03 Jim Wilson <jimw@sifive.com>
2523
2524 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
2525 also define __riscv_abi_rve. Delete trailing white space.
2526
2527 2018-10-03 Paul Koning <ni1d@arrl.net>
2528
2529 Enable LRA register allocator for PDP11.
2530 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
2531 (R): Likewise.
2532 (D): Likewise.
2533 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
2534 * config/pdp11/pdp11.opt (-mlra): New option.
2535 * doc/invoke.texi (PDP-11 Options): Document -mlra.
2536
2537 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2538
2539 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
2540 (*<absneg:code>extend<mode>xf2): Ditto.
2541
2542 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2543
2544 PR tree-optimization/87415
2545 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
2546 precision fields.
2547
2548 2018-10-02 Jeff Law <law@redhat.com>
2549
2550 * gimple-fold.c (get_range_strlen): Only set *nonstr when
2551 an unterminated string is discovered. Bubble up range
2552 even for unterminated strings.
2553 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
2554 indicates the string was not terminated via NONSTR.
2555
2556 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2557
2558 * tree-vrp.c (extract_range_from_unary_expr): Special case all
2559 pointer conversions.
2560 Do not do anything special for anti-ranges.
2561
2562 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
2563
2564 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
2565 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
2566
2567 2018-10-03 Martin Liska <mliska@suse.cz>
2568
2569 PR gcov-profile/86109
2570 * coverage.c (coverage_begin_function): Do not
2571 mark lambdas as artificial.
2572 * tree-core.h (struct GTY): Remove tm_clone_flag
2573 and introduce new lambda_function.
2574 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2575
2576 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2577
2578 PR target/87474
2579 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
2580 P8_VECTOR and VSX are enabled.
2581
2582 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2583
2584 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
2585 0x3907 as CPU model number.
2586
2587 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2588
2589 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
2590 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
2591 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
2592 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
2593 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
2594 * config/s390/s390.md: Likewise. Rename also the cpu attribute
2595 value from arch12 to z14.
2596
2597 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2598
2599 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
2600 (isinfxf2): Ditto.
2601 (isinf<mode>2): Ditto.
2602
2603 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2604
2605 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
2606 before emitting fxam. Perform calculations in XFmode.
2607
2608 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2609
2610 * match.pd (((X /[ex] A) +- B) * A): New transformation.
2611
2612 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2613
2614 PR middle-end/87319
2615 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
2616 * tree.c (signed_or_unsigned_type_for): Handle complex.
2617
2618 2018-10-02 Jeff Law <law@redhat.com>
2619
2620 * gimple-fold.c (get_range_strlen): Remove dead code.
2621
2622 2018-10-02 Martin Sebor <msebor@redhat.com>
2623 Jeff Law <law@redhat.com>
2624
2625 * builtins.c (unterminated_array): Add new arguments.
2626 If argument is not terminated, bubble up size and exact
2627 state to callers.
2628 (expand_builtin_strnlen): Detect, avoid expanding
2629 and diagnose unterminated arrays.
2630 (c_strlen): Fill in offset of start of unterminated strings.
2631 * builtins.h (unterminated_array): Update prototype.
2632
2633 2018-10-02 Richard Biener <rguenther@suse.de>
2634
2635 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
2636 of haddv4df, first reduce to SSE width and exploit the fact
2637 that we only need element zero with the reduction result.
2638 (reduc_plus_scal_v2df): Likewise.
2639
2640 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2641
2642 * dojump.h (do_jump): Delete.
2643 (do_jump_1): Likewise.
2644 (split_comparison): Move around.
2645 * dojump.c (do_jump): Make static.
2646 (do_jump_1): Likewise.
2647 (jumpifnot): Move around.
2648 (jumpifnot_1): Likewise.
2649 (jumpif): Likewise.
2650 (jumpif_1): Likewise.
2651 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
2652
2653 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2654
2655 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
2656 insns in the delay slot and add_insn_after for the jump insn.
2657
2658 2018-10-02 Richard Biener <rguenther@suse.de>
2659
2660 * tree-inline.c (expand_call_inline): Use the location of
2661 the callee declaration for the inline-entry marker.
2662 * final.c (notice_source_line): Remove special-casing of
2663 NOTE_INSN_INLINE_ENTRY.
2664
2665 2018-10-01 Carl Love <cel@us.ibm.com>
2666
2667 PR 69431
2668 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
2669 (__builtin_mtfsb0): New.
2670 (__builtin_mtfsb1): New.
2671 ( __builtin_set_fpscr_rn): New.
2672 (__builtin_set_fpscr_drn): New.
2673 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
2674 (rs6000_expand_set_fpscr_rn_builtin): Add.
2675 (rs6000_expand_set_fpscr_drn_builtin): Add.
2676 (rs6000_expand_builtin): Add case statement entries for
2677 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
2678 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
2679 RS6000_BUILTIN_MFFSL.
2680 (rs6000_init_builtins): Add ftype initialization and def_builtin
2681 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
2682 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
2683 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
2684 rs6000_mffscdrn): Add define_insn.
2685 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
2686 * doc/extend.texi: Add documentation for the builtins.
2687
2688 2018-10-01 Richard Biener <rguenther@suse.de>
2689
2690 PR tree-optimization/87465
2691 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
2692 causing branch miscounts.
2693
2694 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2695
2696 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
2697 aarch64_option_default_param): New.
2698 (params.h): Include.
2699 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
2700 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
2701 stack-clash protection validation code.
2702
2703 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2704
2705 * params.c (validate_param): New.
2706 (add_params): Use it.
2707 (set_param_value): Refactor param validation into validate_param.
2708 (diagnostic.h): Include.
2709 * diagnostic.h (diagnostic_ready_p): New.
2710
2711 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2712
2713 * params.c (set_param_value):
2714 Add index of parameter being validated.
2715 * common/common-target.def (option_validate_param): New.
2716 * common/common-targhooks.h (default_option_validate_param): New.
2717 * common/common-targhooks.c (default_option_validate_param): New.
2718 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
2719 * doc/tm.texi: Regenerate.
2720
2721 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2722
2723 PR target/86486
2724 * config/aarch64/aarch64.c (aarch64_override_options_internal):
2725 Add validation for stack-clash parameters and set defaults.
2726
2727 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2728
2729 PR target/86486
2730 * configure.ac: Add stack-clash-protection-guard-size.
2731 * doc/install.texi: Document it.
2732 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
2733 * params.def: Update comment for guard-size.
2734 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
2735 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
2736 * configure: Regenerate.
2737
2738 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2739
2740 PR target/86486
2741 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
2742 STACK_DYNAMIC_OFFSET): New.
2743 * config/aarch64/aarch64.c (aarch64_layout_frame):
2744 Update outgoing args size.
2745 (aarch64_stack_clash_protection_alloca_probe_range,
2746 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2747
2748 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2749
2750 PR target/86486
2751 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
2752 probe ranges.
2753 * target.def (stack_clash_protection_alloca_probe_range): New.
2754 (stack_clash_protection_final_dynamic_probe): Remove.
2755 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
2756 (default_stack_clash_protection_final_dynamic_probe): Remove.
2757 * targhooks.c: Likewise.
2758 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2759 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
2760 * doc/tm.texi: Regenerate.
2761
2762 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2763
2764 PR target/86486
2765 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
2766 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
2767 aarch64_clamp_to_uimm12_shift): New.
2768 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
2769 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
2770
2771 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2772
2773 PR target/86486
2774 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
2775
2776 2018-10-01 Jeff Law <law@redhat.com>
2777 Richard Sandiford <richard.sandiford@linaro.org>
2778 Tamar Christina <tamar.christina@arm.com>
2779
2780 PR target/86486
2781 * config/aarch64/aarch64.md
2782 (probe_stack_range): Add k (SP) constraint.
2783 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
2784 STACK_CLASH_MAX_UNROLL_PAGES): New.
2785 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
2786 stack probes for stack clash.
2787 (aarch64_allocate_and_probe_stack_space): New.
2788 (aarch64_expand_prologue): Use it.
2789 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
2790 (aarch64_sub_sp): Add emit_move_imm optional param.
2791
2792 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
2793
2794 PR tree-optimization/87261
2795 * match.pd: Remove trailing whitespace.
2796 Add (x & y) | ~(x | y) -> ~(x ^ y),
2797 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
2798
2799 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2800
2801 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
2802 constraints.
2803 (ashlsi3_insn): Update instruction constraints.
2804 (ashrsi3_insn): Likewise.
2805 (rotrsi3): Likewise.
2806 (add_shift): Likewise.
2807 * config/arc/constraints.md (Csz): New 32 bit constraint. It
2808 avoids placing in the limm field small constants which, otherwise,
2809 could end into a small instruction.
2810
2811 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2812
2813 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
2814 destination register is not odd-even.
2815 (umaddsidi4_split): Likewise.
2816
2817 2018-10-01 Richard Biener <rguenther@suse.de>
2818
2819 * tree-inline.c (expand_call_inline): Store origin of fn
2820 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
2821 * tree.c (block_ultimate_origin): Simplify and do some
2822 checking.
2823
2824 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
2825
2826 * config/i386/mmx.md (EMMS): New int iterator.
2827 (emms): New int attribute.
2828 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
2829 EMMS int iterator. Explicitly declare clobbers.
2830 (mmx_emms): Remove expander.
2831 (mmx_femms): Ditto.
2832 * config/i386/predicates.md (emms_operation): Remove predicate.
2833 (vzeroall_pattern): New predicate.
2834 (vzeroupper_pattern): Rename from vzeroupper_operation.
2835 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
2836 vzeroupper_pattern and vzeroall_pattern predicates.
2837
2838 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
2839
2840 PR rtl-optimization/86939
2841 * ira-lives.c (make_hard_regno_born): Rename from this...
2842 (make_hard_regno_live): ... to this. Remove update to conflict
2843 information. Update function comment.
2844 (make_hard_regno_dead): Add conflict information update. Update
2845 function comment.
2846 (make_object_born): Rename from this...
2847 (make_object_live): ... to this. Remove update to conflict information.
2848 Update function comment.
2849 (make_object_dead): Add conflict information update. Update function
2850 comment.
2851 (mark_pseudo_regno_live): Call make_object_live.
2852 (mark_pseudo_regno_subword_live): Likewise.
2853 (mark_hard_reg_dead): Update function comment.
2854 (mark_hard_reg_live): Call make_hard_regno_live.
2855 (process_bb_node_lives): Likewise.
2856 * lra-lives.c (make_hard_regno_born): Rename from this...
2857 (make_hard_regno_live): ... to this. Remove update to conflict
2858 information. Remove now uneeded check_pic_pseudo_p argument.
2859 Update function comment.
2860 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
2861 to conflict information. Update function comment.
2862 (mark_pseudo_live): Remove update to conflict information. Update
2863 function comment.
2864 (mark_pseudo_dead): Add conflict information update.
2865 (mark_regno_live): Call make_hard_regno_live.
2866 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
2867 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
2868
2869 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
2870
2871 PR target/87370
2872 * config/i386/i386.c (construct_container): Use TImode for
2873 BLKmode values in 2 integer registers.
2874
2875 2018-09-29 Jeff Law <law@redhat.com>
2876
2877 * builtins.c (unterminated_array): Pass in c_strlen_data * to
2878 c_strlen rather than just a tree *.
2879 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
2880 Update recursive calls appropriately. If caller did not provide a
2881 suitable data pointer, create a local one. When a non-terminated
2882 string is discovered, bubble up information about the string via the
2883 c_strlen_data object.
2884 * builtins.h (c_strlen): Update prototype.
2885 (c_strlen_data): New structure.
2886 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
2887 For a type 2 call, if c_strlen indicates a non-terminated string
2888 use the length of the non-terminated string.
2889 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
2890
2891 2018-09-29 Jakub Jelinek <jakub@redhat.com>
2892
2893 PR target/87467
2894 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
2895 __m512d type for __A argument rather than __m512.
2896
2897 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
2898
2899 * match.pd (simple_comparison): Don't optimize if either operand is
2900 a function pointer when target needs function pointer canonicalization.
2901
2902 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2903
2904 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
2905 power5 .. power9 to remove indirection.
2906 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
2907 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
2908 ASM_CPU_476_SPEC): Delete.
2909 (ASM_CPU_SPEC): Adjust.
2910 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
2911 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
2912
2913 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2914
2915 * config.in: Delete HAVE_AS_DCI.
2916 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
2917 * config/rs6000/rs6000.h: Ditto.
2918 * configure.ac: Delete HAVE_AS_DCI.
2919 * configure: Regenerate.
2920
2921 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2922
2923 * config.in (HAVE_AS_LWSYNC): Delete.
2924 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2925 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
2926 do it as a .long .
2927 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2928 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
2929 as a .long .
2930 * configure.ac: Delete HAVE_AS_LWSYNC.
2931 * configure: Regenerate.
2932
2933 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
2934 Pierre-Marie de Rodat <derodat@adacore.com>
2935
2936 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
2937 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
2938 (cgraph_node::create_thunk): Add indirect_offset parameter.
2939 (thunk_adjust): Likewise.
2940 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
2941 and initialize the corresponding field with it.
2942 (cgraph_node::dump): Dump indirect_offset field.
2943 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
2944 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
2945 (thunk_adjust): Add indirect_offset parameter and deal with it.
2946 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
2947 pass it to thunk_adjust. Do not call the target hook if it's non-zero
2948 or if the thunk is external or local. Fix formatting. Do not chain
2949 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
2950 if any, in the GIMPLE representation.
2951 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
2952 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
2953 (input_node): Read indirect_offset field.
2954 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
2955 call to thunk_adjust.
2956 * tree-nested.c (struct nesting_info): Add thunk_p field.
2957 (create_nesting_tree): Set it.
2958 (convert_all_function_calls): Copy static chain from targets to thunks.
2959 (finalize_nesting_tree_1): Return early for thunks.
2960 (unnest_nesting_tree_1): Do not finalize thunks.
2961 (gimplify_all_functions): Do not gimplify thunks.
2962
2963 2018-09-28 David Malcolm <dmalcolm@redhat.com>
2964
2965 * opt-suggestions.c (option_proposer::build_option_suggestions):
2966 Release "option_values".
2967
2968 2018-09-28 David Malcolm <dmalcolm@redhat.com>
2969
2970 * coverage.c (get_coverage_counts): Convert problem-reporting dump
2971 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
2972 * dumpfile.c (kind_as_string): New function.
2973 (dump_loc): Rather than a hardcoded prefix of "note: ", use
2974 kind_as_string to vary the prefix based on dump_kind.
2975 (selftest::test_capture_of_dump_calls): Update for above.
2976
2977 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
2978
2979 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
2980 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
2981
2982 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
2983
2984 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
2985 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
2986 INVALID_REGNUM instead of FPSR_REG.
2987 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
2988 * config/i386/i386.md: Update comment of FP compares.
2989 (fldenv): Do not clobber FPSR_REG.
2990
2991 2018-09-28 Richard Biener <rguenther@suse.de>
2992
2993 * tree.h (BLOCK_ORIGIN): New.
2994 * omp-expand.c (grid_expand_target_grid_body): Assign
2995 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
2996 * tree-inline.c (remap_block): Likewise.
2997 * auto-profile.c (get_function_decl_from_block): Simplify
2998 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
2999 * langhooks.c (lhd_print_error_function): Likewise.
3000 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
3001 Likewise.
3002 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3003 * tree.c (block_nonartificial_location): Likewise.
3004 (block_ultimate_origin): Likewise.
3005 * tree-pretty-print.c (percent_K_format): Likewise. Remove
3006 no longer needed LTO case.
3007
3008 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
3009 Jan Hubicka <jh@suse.cz>
3010 Martin Jambor <mjambor@suse.cz>
3011
3012 * simplify-rtx.c (simplify_merge_mask): New function.
3013 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
3014 same masks are used in op1 or op2.
3015 (test_vec_merge): New function.
3016 (test_vector_ops): Call test_vec_merge.
3017
3018 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3019
3020 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
3021 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
3022 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
3023 (cypress_costs): Set it.
3024 (supersparc_costs): Likewise.
3025 (hypersparc_costs): Likewise.
3026 (leon_cost): Likewise.
3027 (leon3_costs): Likewise.
3028 (sparclet_costs): Likewise.
3029 (ultrasparc_costs): Likewise.
3030 (ultrasparc_costs): Likewise.
3031 (niagara_costs): Likewise.
3032 (niagara2_costs): Likewise.
3033 (niagara3_costs): Likewise.
3034 (niagara4_costs): Likewise.
3035 (niagara7_costs): Likewise.
3036 (m8_costs): Likewise.
3037 (TARGET_CAN_FOLLOW_JUMP): Define.
3038 (pass_work_around_errata::gate): Minor tweak.
3039 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
3040 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
3041 Automaitcally clear MASK_FSMULD mask for V7 processors.
3042 (sparc_can_follow_jump): New static function.
3043 (output_ubranch): Deal with CROSSING_JUMP_P.
3044 (sparc_use_sched_lookahead): Rewrite using switch statement.
3045 (sparc_issue_rate): Reorder.
3046 (sparc_branch_cost): New function.
3047
3048 2018-09-27 Martin Sebor <msebor@redhat.com>
3049
3050 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
3051 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
3052 (int_fits_type_p): Same.
3053
3054 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
3055
3056 * config/i386/i386.md (FPCR_REG): Remove.
3057 (UNSPEC_FLDCW): Remove.
3058 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
3059 (x86_fldcw_1): Remove insn pattern.
3060 (fnstenv): Do not clobber FPCR_REG.
3061 (fldenv): Ditto.
3062 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
3063 (CALL_USED_REGISTERS): Ditto.
3064 (REG_ALLOC_ORDER): Ditto.
3065 (REG_CLASS_CONTENTS): Ditto.
3066 (HI_REGISTER_NAMES): Ditto.
3067 (ADDITIONAL_REGISTER_NAMES): Use defines instead
3068 of numerical constants.
3069 * config/i386/i386.c (regclass_map): Remove fpsr register.
3070 (dbx_register_map): Ditto.
3071 (dbx64_register_map): Ditto.
3072 (svr4_dbx_register_map): Ditto.
3073 (print_reg): Do not handle FPCR_REG.
3074
3075 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
3076
3077 PR target/87149
3078 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
3079 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
3080 Delete, always treat as true.
3081 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3082 Ditto. Simplify remaining code.
3083 * config/powerpcspe/powerpcspe.h: Ditto.
3084 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
3085 Simplify remaining code.
3086 (rs6000_expand_builtin): Ditto.
3087 * config/rs6000/rs6000.h: Ditto.
3088 * configure.ac: Ditto.
3089 * configure: Regenerate.
3090
3091 2018-09-27 Martin Liska <mliska@suse.cz>
3092
3093 * coverage.c (get_coverage_counts): Revert the formatting
3094 of missing profile opt info.
3095
3096 2018-09-27 Richard Biener <rguenther@suse.de>
3097
3098 PR debug/37801
3099 PR debug/87440
3100 * dwarf2out.c (set_block_origin_self): Do not mark outermost
3101 block as we do not output that.
3102 (gen_inlined_subroutine_die): Elide the originally outermost
3103 block, matching what we do for concrete instances.
3104 (decls_for_scope): Add parameter specifying whether to recurse
3105 to subblocks.
3106
3107 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
3108 Tom de Vries <tom@codesourcery.com>
3109
3110 PR 82089
3111
3112 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
3113 STORE_FLAG_VALUE == 1.
3114
3115 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
3116
3117 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
3118 constant definitions.
3119 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
3120 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
3121 ("speculation_barrier"): New expander definition.
3122
3123 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
3124
3125 PR gcov-profile/86957
3126 * common.opt: New warning option -Wmissing-profile.
3127 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
3128 * doc/invoke.texi: Document -Wmissing-profile.
3129
3130 2018-09-26 Jim Wilson <jimw@sifive.com>
3131
3132 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
3133 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
3134
3135 2018-09-26 Martin Sebor <msebor@redhat.com>
3136
3137 * tree.c (zerop): Change return type to bool.
3138 (integer_zerop, integer_onep, integer_each_onep): Same.
3139 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3140 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3141 (real_onep, real_minus_onep, chain_index): Same.
3142 (print_type_hash_statistics, type_list_equal): Same.
3143 * tree.h (zerop): Same.
3144 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
3145 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3146 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3147 (real_onep, real_minus_onep, chain_index): Same.
3148 (print_type_hash_statistics, type_list_equal): Same.
3149
3150 2018-09-26 Jim Wilson <jimw@sifive.com>
3151
3152 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
3153
3154 2018-09-26 Jakub Jelinek <jakub@redhat.com>
3155
3156 PR target/87414
3157 * config/i386/i386.c: Include debug.h and dwarf2out.h.
3158 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3159 call.
3160
3161 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
3162
3163 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3164
3165 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3166
3167 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3168 and FP_SECOND_SSE_REGS.
3169 (REG_CLASS_NAMES): Ditto.
3170 (REG_CLASS_CONTENTS): Ditto.
3171 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3172 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3173 (ix86_preferred_output_reload_class): Ditto.
3174 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3175 clobber constraint to "=&f".
3176 (fix_truncdi_i387): Ditto.
3177 (lrintxfdi2): Ditto.
3178 (fistdi2_<rounding>): Ditto.
3179 (fpremxf4_i387): Change "=u" constraint to "=f".
3180 (fprem1xf4_i387): Ditto.
3181 (sincosxf3): Ditto.
3182 (fptanxf4_i387): Ditto.
3183 (fxtractxf3_i387): Ditto.
3184 (fscalexf4_i387): Ditto.
3185 (atan2xf3): Change "u" constraint to "f".
3186 (fyl2xxf3_i387): Ditto.
3187 (fyl2xp1xf3_i387): Ditto.
3188
3189 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3190
3191 PR target/87439
3192 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3193 for removed I387_MASK_PM entity.
3194
3195
3196 2018-09-26 Jeff Law <law@redhat.com>
3197 Revert
3198 2018-09-26 Alexey Neyman <stilor@att.net>
3199
3200 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3201 headers are no longer pulled in by <isl/val.h>.
3202
3203 2018-09-26 Richard Biener <rguenther@suse.de>
3204
3205 PR debug/87443
3206 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3207 or concrete instance DIE to the tree. Create abstract origin
3208 attributes also for concrete instances.
3209
3210 2018-09-26 Alexey Neyman <stilor@att.net>
3211
3212 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3213 headers are no longer pulled in by <isl/val.h>.
3214
3215 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
3216
3217 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3218 Use new helper functions.
3219 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3220 Use new helper functions.
3221 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3222 aarch_mm_needs_release): New declarations.
3223 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3224 aarch_mm_needs_release): New.
3225
3226 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
3227
3228 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3229 (arm32_output_mi_thunk): Deal with long calls.
3230
3231 2018-09-26 Richard Biener <rguenther@suse.de>
3232
3233 PR debug/87428
3234 PR debug/87362
3235 * tree-inline.c (expand_call_inline): When the location
3236 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3237 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3238 the inserted BLOCK to make inlined_function_outer_scope_p
3239 recognize it.
3240 * dwarf2out.c (add_call_src_coords_attributes): Do not add
3241 coords for reserved locations.
3242
3243 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3244
3245 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3246 (*call_indirect_nonlocal_sysv<mode>): Ditto.
3247 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3248 (*sibcall_nonlocal_sysv<mode>): Ditto.
3249 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3250 (<bd>_<mode>): Ditto.
3251 (<bd>tf_<mode>): Ditto.
3252
3253 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3254
3255 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3256 control string as a list of templates instead of as C code.
3257 (*altivec_movti): Ditto.
3258 * config/rs6000/darwin.md (movdf_low_di): Ditto.
3259
3260 2018-09-25 Jim Wilson <jimw@sifive.com>
3261
3262 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3263 when target symbol is weak.
3264
3265 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3266
3267 PR c/87387
3268 * builtins.c (unterminated_array): Simplify.
3269 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
3270 where pointer arithmetic is safe.
3271
3272 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3273
3274 PR target/86987
3275 * config/rs6000/altivec.md (altivec_vspltb): Use
3276 const_0_to_15_operand instead of u5bit_cint_operand.
3277 (*altivec_vspltb_internal): Ditto.
3278 (altivec_vspltb_direct): Ditto.
3279 (altivec_vsplth): Use const_0_to_7_operand instead of
3280 u5bit_cint_operand.
3281 (*altivec_vsplth_internal): Ditto.
3282 (altivec_vsplth_direct): Ditto.
3283 (altivec_vspltw): Use const_0_to_3_operand instead of
3284 u5bit_cint_operand.
3285 (*altivec_vspltw_internal): Ditto.
3286 (altivec_vspltw_direct): Ditto.
3287 (altivec_vspltsf): Ditto.
3288 (*altivec_vspltsf_internal): Ditto.
3289 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3290 various splats with the proper size immediate. Reorder the various
3291 cases by ascending size of immediate, and put all such together.
3292
3293 2018-09-25 Richard Biener <rguenther@suse.de>
3294
3295 PR debug/83941
3296 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3297 GC-ification.
3298 (maybe_create_die_with_external_ref): Do not create
3299 DW_TAG_imported_unit here.
3300 (add_abstract_origin_attribute): Handle external BLOCK refs.
3301 (dwarf2out_abstract_function): Simplify LTO case.
3302 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3303 rather than using maybe_create_die_with_external_ref.
3304
3305 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
3306
3307 PR target/71278
3308 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3309 (frndintxf2_mask_pm_i387): Ditto.
3310 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3311 Enable for !flag_trapping_math.
3312 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3313 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3314 Change operand 1 predicate to nonimmediate_operand.
3315 (attr "i387_cw"): Remove mask_pm.
3316 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3317 (enum ix86_entity): Remove I387_MASK_PM.
3318 * config/i386/i386.c (ix86_i387_mode_needed): Do not
3319 handle I387_MASK_PM.
3320 (ix86_mode_needed): Ditto.
3321 (ix86_mode_after): Ditto.
3322 (ix86_mode_entry): Ditto.
3323 (ix86_mode_exit): Ditto.
3324 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3325
3326 2018-09-25 Jakub Jelinek <jakub@redhat.com>
3327
3328 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3329 to_update_switch_stmts to vNULL instead of calling create on them
3330 immediately.
3331
3332 2018-09-25 Richard Biener <rguenther@suse.de>
3333
3334 PR tree-optimization/87402
3335 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3336 (visit_phi): Re-instantiate handling of supposed to be VARYING
3337 but non-VARYING backedge value.
3338
3339 2018-09-25 Richard Biener <rguenther@suse.de>
3340
3341 PR debug/83941
3342 * dwarf2out.c (struct sym_off_pair): New.
3343 (external_die_map): New global.
3344 (lookup_decl_die): When in LTO create DIEs lazily from the
3345 external_die_map.
3346 (lookup_block_die): New function, create DIEs lazily in LTO.
3347 (equate_block_to_die): New function.
3348 (dwarf2out_die_ref_for_decl): During WPA get the association
3349 from the external DIE map.
3350 (dwarf2out_register_external_die): Record mapping into the
3351 external DIE map.
3352 (maybe_create_die_with_external_ref): New function split out from
3353 DIE generation part of old dwarf2out_register_external_die.
3354 (add_abstract_origin_attribute): Do not return the DIE. When
3355 in LTO reference externals directly.
3356 (dwarf2out_abstract_function): When in LTO ignore calls for
3357 decls with external DIEs (already present abstract instances).
3358 (gen_call_site_die): Adjust.
3359 (add_high_low_attributes): Likewise.
3360 (gen_lexical_block_die): Likewise.
3361 (gen_inlined_subroutine_die): Likewie.
3362 (gen_block_die): Likewise.
3363 (dwarf2out_inline_entry): Likewise.
3364 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3365 DIEs.
3366
3367 2018-09-25 Martin Liska <mliska@suse.cz>
3368
3369 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3370 integers and not by a float value.
3371
3372 2018-09-25 Martin Liska <mliska@suse.cz>
3373
3374 PR fortran/87394
3375 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3376 instead of NULL.
3377 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3378 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3379 * godump.c (go_format_type): Remove extra parenthesis.
3380
3381 2018-09-25 Martin Liska <mliska@suse.cz>
3382
3383 * alias.c (set_dest_equal_p): Remove unused function.
3384 * config/i386/i386.c (def_builtin_pure2): Likewise.
3385 * diagnostic-show-locus.c (class layout): Remove
3386 unused field.
3387 (layout::layout): Likewise here.
3388 * dump-context.h (class temp_dump_context): Likewise.
3389 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3390 (add_AT_loclistsptr): Likewise.
3391 (add_AT_offset): Likewise.
3392 (get_AT_hi_pc): Likewise.
3393 (is_comdat_die): Likewise.
3394 (type_is_enum): Likewise.
3395 (ceiling): Likewise.
3396 (add_AT_vms_delta): Likewise.
3397 (is_class_die): Likewise.
3398 * edit-context.c (class line_event): Remove unused field.
3399 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3400 unused function.
3401 * ipa-cp.c (ipa_get_vr_lat): Likewise.
3402 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3403 (ok_for_base_p_nonstrict): Likewise.
3404 * tree-chrec.c (is_not_constant_evolution): Likewise.
3405 (chrec_fold_poly_cst): Likewise.
3406 * tree-if-conv.c (has_pred_critical_p): Likewise.
3407 * tree-ssa-coalesce.c (print_exprs): Likewise.
3408 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3409 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
3410 * tree-vrp.c (value_ranges_intersect_p): Likewise.
3411 (value_range_nonnegative_p): Likewise.
3412
3413 2018-09-25 Martin Liska <mliska@suse.cz>
3414
3415 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3416 Do not handle "GNU Pascal".
3417 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3418 Likewise.
3419 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
3420 from documentation. Likewise.
3421 * dbxout.c (dbxout_range_type): Likewise.
3422 * doc/cpp.texi: Likewise.
3423 * doc/extend.texi: Likewise.
3424 * doc/frontends.texi: Likewise.
3425 * doc/invoke.texi: Remove Pascal entry.
3426 * tree.def (CLEANUP_POINT_EXPR): Likewise.
3427 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
3428
3429 2018-09-25 Martin Liska <mliska@suse.cz>
3430
3431 PR middle-end/86078
3432 * doc/invoke.texi: Document all parameters and remove default
3433 of the parameters.
3434
3435 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
3436
3437 PR bootstrap/87417
3438 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
3439 contains HOST_WIDE_INTs when computing its size.
3440
3441 2018-09-24 Jim Wilson <jimw@sifive.com>
3442
3443 PR target/87391
3444 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
3445 not TARGET_RVE.
3446 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
3447
3448 2018-09-24 Andrew Pinski <apinski@marvell.com>
3449
3450 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3451 access prev before checking it for NULLness in the
3452 AARCH64_FUSE_CMP_BRANCH case.
3453
3454 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
3455
3456 PR target/82699
3457 * config/i386/i386.c (rest_of_insert_endbranch): Set
3458 endbr_queued_at_entrance to true and don't insert ENDBR if
3459 x86_function_profiler will be called.
3460 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3461 is true.
3462 * config/i386/i386.h (machine_function): Add
3463 endbr_queued_at_entrance.
3464
3465 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3466
3467 * genattrtab.c (mk_attr_alt): Use alternative_mask.
3468 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
3469 types.
3470 (check_attr_test): Use alternative_mask.
3471 (get_attr_value): Likewise.
3472 (compute_alternative_mask): Use alternative_mask and XWINT.
3473 (make_alternative_compare): Use alternative_mask.
3474 (attr_alt_subset_p): Use XWINT.
3475 (attr_alt_subset_of_compl_p): Likewise.
3476 (attr_alt_intersection): Use alternative_mask and XWINT.
3477 (attr_alt_union): Likewise.
3478 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
3479 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
3480 (simplify_test_exp): Use alternative_mask and XWINT.
3481 (write_test_expr): Use alternative_mask and XWINT, adjust bit
3482 number calculation to support 64 bits. Generate code that
3483 checks 64-bit masks.
3484 (main): Use alternative_mask.
3485 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
3486
3487 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3488
3489 PR target/80080
3490 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
3491 RETURN+USE when returning via %r14.
3492
3493 2018-09-24 Martin Liska <mliska@suse.cz>
3494
3495 * gcov.c (output_lines): Print colorization legend
3496 for both flag_use_colors and flag_use_hotness_colors.
3497 Reword the help.
3498
3499 2018-09-24 Martin Liska <mliska@suse.cz>
3500
3501 * coverage.c (get_coverage_counts): Use warning_at
3502 with current_function_decl location. Use %qD in warning
3503 message.
3504
3505 2018-09-24 Martin Liska <mliska@suse.cz>
3506
3507 * memory-block.h (memory_block_pool::release): Annotate with
3508 valgrind that the memory is not accessible.
3509
3510 2018-09-24 Martin Liska <mliska@suse.cz>
3511
3512 PR sanitizer/85774
3513 * asan.c: Make asan_handled_variables extern.
3514 * asan.h: Likewise.
3515 * cfgexpand.c (expand_stack_vars): Make sure
3516 a representative is unpoison if another
3517 variable in the partition is handled by
3518 use-after-scope sanitization.
3519
3520 2018-09-24 Richard Biener <rguenther@suse.de>
3521
3522 PR tree-optimization/63155
3523 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
3524 the worklist when the edge of the respective argument isn't
3525 executable.
3526
3527 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3528
3529 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
3530 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
3531 (MASK_CLASS_P): Update for rename.
3532 (MAYBE_MASK_CLASS_P): Ditto.
3533 (REG_CLASS_NAMES): Update.
3534 (REG_CLASS_CONTENT): Update.
3535 * config/i386/i386.c (regclass_map): Update for MASK_REG
3536 and ALL_MASK_REGS rename.
3537 * config/i386/constraints.md (Yk): Update for rename.
3538 (k): Ditto.
3539
3540 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3541
3542 * config/i386/i386.h (enum reg_class): Remove
3543 EVEX_SSE_REGS and MOD4_SSE_REGS.
3544 (REG_CLASS_NAMES): Update.
3545 (REG_CLASS_CONTENT): Update.
3546 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
3547 registers as ALL_SSE_REGS.
3548 (ix86_additional_allocno_class_p): Remove.
3549 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
3550 (ix86_register_priority): Lower priority of EVEX SSE registers.
3551 Use IN_RANGE macro where appropriate.
3552 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
3553 AVX-5124VNNIW checks.
3554 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
3555 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
3556 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
3557 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
3558 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
3559 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
3560 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
3561 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
3562 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
3563 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
3564 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
3565 * config/i386/constraints.md (Yh): Remove.
3566
3567 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3568
3569 * config/i386/i386.c (regclass_map): Declare integer REX registers
3570 as GENERAL_REGS.
3571
3572 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
3573
3574 * doc/service.texi (Service): Switch the fsf.org link to https.
3575
3576 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
3577
3578 PR target/86798
3579 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3580 Define to speculation_safe_value_not_needed.
3581
3582 2018-09-21 Florian Weimer <fweimer@redhat.com>
3583
3584 PR middle-end/81035
3585 * doc/extend.texi (Common Function Attributes): Mention that
3586 noreturn suppresses tail call optimization.
3587
3588 2018-09-21 Jeff Law <law@redhat.com>
3589
3590 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
3591 vr_values::cleanup_edges_and_switches.
3592 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
3593 vr_values class.
3594 (identify_jump_threads): Remove EDGE_IGNORE handling.
3595 (execute_vrp): Move handling of to_remove_edges and
3596 to_update_switch_stmts into vr_values class member functions.
3597 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
3598 (to_update_switch_stmts): Likewise.
3599 * vr-values.c: Include cfghooks.h.
3600 (vr_values::vr_values): Initialize to_remove_edges and
3601 to_update_switch_stmts.
3602 (vr_values::~vr_values): Verify to_remove_edges and
3603 to_update_switch_stmts are empty.
3604 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
3605 (vr_values::cleanup_edges_and_switches): New member function.
3606 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
3607 function. Add new data members.
3608
3609 2018-09-21 David Malcolm <dmalcolm@redhat.com>
3610
3611 PR tree-optimization/87309
3612 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
3613 calls with pflags and alt_flags.
3614 (selftest::test_capture_of_dump_calls): Add test of interaction of
3615 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
3616
3617 2018-09-21 Olivier Hainque <hainque@adacore.com>
3618
3619 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
3620
3621 2018-09-21 Olivier Hainque <hainque@adacore.com>
3622
3623 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
3624
3625 2018-09-21 Olivier Hainque <hainque@adacore.com>
3626
3627 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
3628 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
3629 (VXWORKS_LIBS_RTP): Minor reordering.
3630
3631 2018-09-21 Olivier Hainque <hainque@adacore.com>
3632
3633 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
3634 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
3635
3636 2018-09-21 Olivier Hainque <hainque@adacore.com>
3637
3638 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
3639 (PTRDIFF_TYPE): Likewise.
3640
3641 2018-09-21 Olivier Hainque <hainque@adacore.com>
3642
3643 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
3644 triplet, similar to support for VxWorks7.
3645 * config/vxworks-dummy.h: Provide a default definition
3646 of TARGET_VXWORKS64 to 0.
3647
3648 2018-09-21 Olivier Hainque <hainque@adacore.com>
3649
3650 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
3651 * config/vxworks-dummy.h: here.
3652
3653 2018-09-21 Olivier Hainque <hainque@adacore.com>
3654
3655 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
3656
3657 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
3658 Bo Zhou <zbo.zhou@hisilicon.com>
3659
3660 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
3661 * config/aarch64/aarch64-tune.md: Regenerated.
3662 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
3663 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
3664 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
3665
3666 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
3667 Julian Brown <julian@codesourcery.com>
3668
3669 * builtins.c (get_builtin_sync_mem): Handle address spaces.
3670
3671 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3672
3673 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
3674 if the call takes a static chain.
3675
3676 2018-09-21 Martin Liska <mliska@suse.cz>
3677
3678 * auto-profile.c (autofdo_source_profile::read): Do not
3679 set sum_all.
3680 (read_profile): Do not add working sets.
3681 (read_autofdo_file): Remove sum_all.
3682 (afdo_callsite_hot_enough_for_early_inline): Remove const
3683 qualifier.
3684 * coverage.c (struct counts_entry): Remove gcov_summary.
3685 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
3686 do not support GCOV_TAG_PROGRAM_SUMMARY.
3687 (get_coverage_counts): Remove summary and expected
3688 arguments.
3689 * coverage.h (get_coverage_counts): Likewise.
3690 * doc/gcov-dump.texi: Remove -w option.
3691 * gcov-dump.c (dump_working_sets): Remove.
3692 (main): Do not support '-w' option.
3693 (print_usage): Likewise.
3694 (tag_summary): Likewise.
3695 * gcov-io.c (gcov_write_summary): Do not dump
3696 histogram.
3697 (gcov_read_summary): Likewise.
3698 (gcov_histo_index): Remove.
3699 (gcov_histogram_merge): Likewise.
3700 (compute_working_sets): Likewise.
3701 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
3702 it not obsolete.
3703 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
3704 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
3705 (GCOV_HISTOGRAM_SIZE): Remove.
3706 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
3707 (struct gcov_summary): Simplify rapidly just
3708 to runs and sum_max fields.
3709 (gcov_histo_index): Remove.
3710 (NUM_GCOV_WORKING_SETS): Likewise.
3711 (compute_working_sets): Likewise.
3712 * gcov-tool.c (print_overlap_usage_message): Remove
3713 trailing empty line.
3714 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
3715 (output_lines): Remove program related line.
3716 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
3717 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
3718 histogram.
3719 (input_profile_summary): Do not read it.
3720 (merge_profile_summaries): And do not merge it.
3721 (input_symtab): Do not call removed function.
3722 * modulo-sched.c (sms_schedule): Do not print sum_max.
3723 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
3724 removed when histogram method was invented.
3725 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
3726 mode.
3727 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
3728 GCOV coding style.
3729 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
3730 and dump selected value.
3731 * profile.c (add_working_set): Remove.
3732 (get_working_sets): Likewise.
3733 (find_working_set): Likewise.
3734 (get_exec_counts): Do not work with working sets.
3735 (read_profile_edge_counts): Do not inform as sum_max is removed.
3736 (compute_branch_probabilities): Likewise.
3737 (compute_value_histograms): Remove argument for call of
3738 get_coverage_counts.
3739 * profile.h: Do not make gcov_summary const.
3740
3741 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
3742
3743 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
3744
3745 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3746
3747 PR tree-optimization/86990
3748 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
3749 Check that the entire merged store group is made of constants only for
3750 overlapping stores.
3751
3752 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
3753
3754 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
3755 (VTABLE_VERIFICATION_SPEC): Likewise.
3756 (SANITIZER_EARLY_SPEC): Likewise.
3757 (SANITIZER_SPEC): Likewise.
3758 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
3759 * doc/invoke.texi (Link Options): Document -r.
3760
3761 2018-09-20 Richard Biener <rguenther@suse.de>
3762
3763 PR middle-end/87054
3764 * gimplify.c (gimplify_expr): Retain alignment of
3765 addressable lvalue in dereference.
3766
3767 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
3768
3769 PR bootstrap/87013
3770 * configure.ac: Check for .loc is_stmt support.
3771 * configure, config.in: Rebuilt.
3772 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
3773 if not supported.
3774
3775 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3776
3777 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
3778 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
3779 -misel=no.
3780
3781 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3782
3783 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
3784 VECTOR_OTHER.
3785 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
3786 case VECTOR_OTHER.
3787
3788 2018-09-20 Marek Polacek <polacek@redhat.com>
3789
3790 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
3791
3792 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3793
3794 PR tree-optimization/87288
3795 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
3796 into account when determining PEELING_FOR_NITERS.
3797
3798 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3799
3800 PR tree-optimization/86877
3801 * tree-vect-loop.c (vect_analyze_loop_2): Call
3802 vect_verify_datarefs_alignment.
3803
3804 2018-09-19 Marek Polacek <polacek@redhat.com>
3805
3806 * doc/invoke.texi: Document -Wclass-conversion.
3807
3808 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
3809
3810 * config/pa/pa.c (pa_adjust_priority): Delete.
3811 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
3812
3813 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
3814 (atomic_storehi): Likewise.
3815 (atomic_storesi): Likewise.
3816 (atomic_loaddi): Restore compare and swap exchange loop code.
3817
3818 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
3819
3820 PR rtl-optimization/86902
3821 * combine.c (try_combine): When changing the CC mode used, don't change
3822 an unrelated mode in other_insn to that new CC mode.
3823
3824 2018-09-19 David Malcolm <dmalcolm@redhat.com>
3825
3826 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
3827 with %T in place of calls to dump_generic_expr.
3828 (prune_runtime_alias_test_list): Likewise.
3829 (create_runtime_alias_checks): Likewise.
3830 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
3831 (vect_analyze_data_ref_dependence): Likewise.
3832 (vect_slp_analyze_data_ref_dependence): Likewise.
3833 (vect_record_base_alignment): Likewise. Use %G in place of call
3834 to dump_gimple_stmt.
3835 (vect_compute_data_ref_alignment): Likewise.
3836 (verify_data_ref_alignment): Likewise.
3837 (vect_find_same_alignment_drs): Likewise.
3838 (vect_analyze_group_access_1): Likewise.
3839 (vect_analyze_data_ref_accesses): Likewise.
3840 (dependence_distance_ge_vf): Likewise.
3841 (dump_lower_bound): Likewise.
3842 (vect_prune_runtime_alias_test_list): Likewise.
3843 (vect_find_stmt_data_reference): Likewise.
3844 (vect_analyze_data_refs): Likewise.
3845 (vect_create_addr_base_for_vector_ref): Likewise.
3846 (vect_create_data_ref_ptr): Likewise.
3847 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
3848 (vect_can_advance_ivs_p): Likewise.
3849 (vect_update_ivs_after_vectorizer): Likewise.
3850 (vect_gen_prolog_loop_niters): Likewise.
3851 (vect_prepare_for_masked_peels): Likewise.
3852 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3853 (vect_determine_vectorization_factor): Likewise.
3854 (vect_is_simple_iv_evolution): Likewise.
3855 (vect_analyze_scalar_cycles_1): Likewise.
3856 (vect_analyze_loop_operations): Likewise.
3857 (report_vect_op): Likewise.
3858 (vect_is_slp_reduction): Likewise.
3859 (check_reduction_path): Likewise.
3860 (vect_is_simple_reduction): Likewise.
3861 (vect_create_epilog_for_reduction): Likewise.
3862 (vect_finalize_reduction:): Likewise.
3863 (vectorizable_induction): Likewise.
3864 (vect_transform_loop_stmt): Likewise.
3865 (vect_transform_loop): Likewise.
3866 (optimize_mask_stores): Likewise.
3867 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
3868 (vect_split_statement): Likewise.
3869 (vect_recog_over_widening_pattern): Likewise.
3870 (vect_recog_average_pattern): Likewise.
3871 (vect_determine_min_output_precision_1): Likewise.
3872 (vect_determine_precisions_from_range): Likewise.
3873 (vect_determine_precisions_from_users): Likewise.
3874 (vect_mark_pattern_stmts): Likewise.
3875 (vect_pattern_recog_1): Likewise.
3876 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3877 (vect_record_max_nunits): Likewise.
3878 (vect_build_slp_tree_1): Likewise.
3879 (vect_build_slp_tree_2): Likewise.
3880 (vect_print_slp_tree): Likewise.
3881 (vect_analyze_slp_instance): Likewise.
3882 (vect_detect_hybrid_slp_stmts): Likewise.
3883 (vect_detect_hybrid_slp_1): Likewise.
3884 (vect_slp_analyze_operations): Likewise.
3885 (vect_slp_analyze_bb_1): Likewise.
3886 (vect_transform_slp_perm_load): Likewise.
3887 (vect_schedule_slp_instance): Likewise.
3888 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3889 (vect_mark_stmts_to_be_vectorized): Likewise.
3890 (vect_init_vector_1): Likewise.
3891 (vect_get_vec_def_for_operand): Likewise.
3892 (vect_finish_stmt_generation_1): Likewise.
3893 (vect_check_load_store_mask): Likewise.
3894 (vectorizable_call): Likewise.
3895 (vectorizable_conversion): Likewise.
3896 (vectorizable_operation): Likewise.
3897 (vectorizable_load): Likewise.
3898 (vect_analyze_stmt): Likewise.
3899 (vect_is_simple_use): Likewise.
3900 (vect_get_vector_types_for_stmt): Likewise.
3901 (vect_get_mask_type_for_stmt): Likewise.
3902 * tree-vectorizer.c (increase_alignment): Likewise.
3903
3904 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
3905
3906 * doc/rtl.texi: Adjust vec_select description.
3907 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
3908 non-constant selectors.
3909
3910 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
3911
3912 * config/aarch64/aarch64-protos.h
3913 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
3914 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
3915 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
3916 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
3917 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
3918 (AARCH64_FL_PROFILE): Move index so flags are ordered.
3919 (AARCH64_ISA_RCPC8_4): New flag.
3920 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
3921 to aarch64_offset_9bit_signed_unscaled_p.
3922 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
3923 and use stlur.
3924 * config/aarch64/constraints.md (Ust): New constraint.
3925 * config/aarch64/predicates.md.
3926 (aarch64_9bit_offset_memory_operand): New predicate.
3927 (aarch64_rcpc_memory_operand): New predicate.
3928
3929 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
3930
3931 PR rtl-optimization/87361
3932 * rtlanal.c (nonzero_bits1): Revert accidental change.
3933
3934 2018-09-19 Richard Biener <rguenther@suse.de>
3935
3936 PR tree-optimization/87349
3937 PR tree-optimization/87342
3938 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
3939
3940 2018-09-18 Marek Polacek <polacek@redhat.com>
3941
3942 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
3943 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
3944
3945 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
3946
3947 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
3948
3949 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
3950
3951 PR rtl-optimization/86882
3952 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
3953
3954 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
3955
3956 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
3957 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
3958
3959 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
3960
3961 PR other/87353
3962 * doc/invoke.texi (Link Options): Fix formatting and grammar.
3963
3964 2018-09-18 Richard Biener <rguenther@suse.de>
3965
3966 PR middle-end/63155
3967 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
3968 (compute_samebase_partition_bases): Likewise.
3969 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
3970 (gimple_can_coalesce_p): Simplify.
3971
3972 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
3973
3974 Handle a library implementation of ffs calling __builtin_ffs.
3975 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
3976 (mmix_init_libfuncs): New function: make __builtin_ffs expand
3977 to __ffsdi2.
3978
3979 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3980
3981 * diagnostic-show-locus.c (class layout_range): Add field
3982 "m_original_idx".
3983 (layout_range::layout_range): Add "original_idx" param and use it
3984 to initialize new field.
3985 (make_range): Use 0 for original_idx.
3986 (layout::layout): Pass in index to calls to
3987 maybe_add_location_range.
3988 (layout::maybe_add_location_range): Add param "original_idx" and
3989 pass it on to layout_range.
3990 (layout::print_any_labels): Pass on range->m_original_idx to
3991 get_text call.
3992 (gcc_rich_location::add_location_if_nearby): Use 0 for
3993 original_idx.
3994 * gcc-rich-location.h (text_range_label::get_text): Update for new
3995 param.
3996 (range_label_for_type_mismatch::get_text): Likewise.
3997
3998 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
3999
4000 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
4001
4002 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4003
4004 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
4005 format_string_diagnostic_t.
4006 (fmtwarn_n): Likewise.
4007 * substring-locations.c
4008 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
4009 (format_warning_n_va): Convert to...
4010 (format_string_diagnostic_t::emit_warning_n_va): ...this.
4011 (format_warning_va): Convert to...
4012 (format_string_diagnostic_t::emit_warning_va): ...this.
4013 (format_warning_at_substring): Convert to...
4014 (format_string_diagnostic_t::emit_warning): ...this.
4015 (format_warning_at_substring_n): Convert to...
4016 (format_string_diagnostic_t::emit_warning_n): ...this.
4017 * substring-locations.h (class format_string_diagnostic_t): New
4018 class.
4019 (format_warning_va): Convert to
4020 format_string_diagnostic_t::emit_warning_va.
4021 (format_warning_n_va): Convert to
4022 format_string_diagnostic_t::emit_warning_n_va.
4023 (format_warning_at_substring): Convert to
4024 format_string_diagnostic_t::emit_warning.
4025 (format_warning_at_substring_n): Convert to
4026 format_string_diagnostic_t::emit_warning_n.
4027
4028 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
4029 Bernd Schmidt <bernds_cb1@t-online.de>
4030
4031 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
4032 SImode args.
4033
4034 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4035
4036 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
4037 operand 0 predicate to nonimmediate operand.
4038 (rint<mode>2_frndint): Remove insn pattern.
4039 (rint<mode>2): Change operand 1 predicate to general_operand.
4040 Extend operand 1 to XFmode and generate rintxf2 insn.
4041 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
4042 Do not use X87MODEF mode macro.
4043 (frndintxf2_<rounding>_i387): Rename from
4044 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
4045 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
4046 to XFmode and generate significandxf3 insn.
4047
4048 2018-09-17 Richard Biener <rguenther@suse.de>
4049
4050 PR tree-optimization/87328
4051 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
4052 visiting unexecutable backedges when not iterating.
4053 (do_rpo_vn): Mark all edges not executable even when not
4054 iterating.
4055
4056 2018-09-17 Martin Jambor <mjambor@suse.cz>
4057
4058 PR c/63886
4059 * doc/invoke.texi (Warning Options): Likewise.
4060
4061 2018-09-17 Richard Biener <rguenther@suse.de>
4062
4063 PR tree-optimization/87301
4064 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
4065 clean EH info from leftover copy assignments.
4066
4067 2018-09-17 Martin Liska <mliska@suse.cz>
4068
4069 PR gcov-profile/85871
4070 * gcov.c (output_intermediate_file): Fix out of bounds
4071 access.
4072
4073 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
4074
4075 * config/arc/arc.c: Object attributes for core4 not reflected
4076 correctly.
4077 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
4078 core3).
4079
4080 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
4081
4082 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
4083
4084 2018-09-17 Martin Liska <mliska@suse.cz>
4085
4086 * doc/gcov.texi: Document new option --use-hotness-colors.
4087 * gcov.c (struct source_info): Declare new field.
4088 (source_info::source_info): Set default for maximum_count.
4089 (print_usage): Add new -q option.
4090 (process_args): Process it.
4091 (accumulate_line_info): Save src->maximum_count.
4092 (output_line_beginning): Make color line number if
4093 flag_use_hotness_colors is set.
4094 (output_line_details): Pass default argument value.
4095 (output_lines): Pass src->maximum_count.
4096
4097 2018-09-17 Martin Liska <mliska@suse.cz>
4098
4099 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
4100 Use processor_names table.
4101 * config/i386/i386.c (ix86_default_align): Use
4102 processor_cost_table for alignment values.
4103 (ix86_option_override_internal): Use processor_names.
4104 (ix86_function_specific_print): Likewise.
4105 * config/i386/i386.h (struct processor_costs):
4106 Add alignment values.
4107 (struct ptt): Remove and replace with const char *.
4108 * config/i386/x86-tune-costs.h (struct processor_costs):
4109 Declare default alignments for all costs.
4110
4111 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
4112
4113 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
4114 symbolics or VR_VARYING ranges for ABS_EXPR.
4115 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
4116 when range will wrap.
4117
4118 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
4119
4120 PR middle-end/86864
4121 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
4122 before and after a JUMP_TABLE_DATA.
4123
4124 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
4125
4126 PR middle-end/87188
4127 * dojump.c (do_compare_and_jump): Canonicalize function pointers
4128 when one operand is a function pointer. Use POINTER_TYPE_P and
4129 FUNC_OR_METHOD_TYPE_P.
4130 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
4131 * fold-const.c (build_range_check): Likewise.
4132 * match.pd (simple_comparison): Likewise.
4133
4134 2018-09-14 David Malcolm <dmalcolm@redhat.com>
4135
4136 PR c/82967
4137 * spellcheck.c (get_edit_distance_cutoff): New function.
4138 (selftest::test_edit_distance_unit_test_oneway): Rename to...
4139 (selftest::test_get_edit_distance_one_way): ...this.
4140 (selftest::test_get_edit_distance_unit): Rename to...
4141 (selftest::test_get_edit_distance_both_ways): ...this.
4142 (selftest::test_edit_distances): Move tests to this new function,
4143 and test some more pairs of strings. Update for above renaming.
4144 (selftest::get_old_cutoff): New function.
4145 (selftest::test_get_edit_distance_cutoff): New function.
4146 (selftest::assert_suggested_for): New function.
4147 (ASSERT_SUGGESTED_FOR): New macro.
4148 (selftest::assert_not_suggested_for): New function.
4149 (ASSERT_NOT_SUGGESTED_FOR): New macro.
4150 (selftest::test_suggestions): New function.
4151 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
4152 tests to selftest::test_edit_distances and call it. Add calls to
4153 selftest::test_get_edit_distance_cutoff and
4154 selftest::test_suggestions.
4155 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
4156 (best_match::consider): Replace hard-coded cutoff calculation with
4157 a call to...
4158 (best_match::get_cutoff): New declaration.
4159 (best_match::get_best_meaningful_candidate): Likewise.
4160
4161 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4162
4163 * builtins.c (fold_builtin_strlen): Remove TODO comment.
4164
4165 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4166
4167 revert:
4168 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4169
4170 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4171 terminated string literal.
4172
4173 2018-09-14 Martin Sebor <msebor@redhat.com>
4174
4175 * builtins.c (unterminated_array): Handle ARRAY_REF.
4176 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4177 * builtins.h (unterminated_array): Declare extern.
4178 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4179 arrays.
4180 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4181 calls.
4182
4183 2018-09-14 Martin Sebor <msebor@redhat.com>
4184 Jeff Law <law@redhat.com>
4185
4186 * builtins.c (unterminated_array): New.
4187 (expand_builtin_strcpy): Adjust.
4188 (expand_builtin_strcpy_args): Detect unterminated arrays.
4189 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
4190 unterminated arrays.
4191 * gimple-fold.h (get_maxval_strlen): Add argument.
4192 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4193
4194 * gimple-fold.c (get_range_strlen): Add argument.
4195 (get_maxval_strlen): Adjust.
4196 * gimple-fold.h (get_range_strlen): Add argument.
4197
4198 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
4199
4200 * config/i386/movdirintrin.h: Fix copyright year.
4201
4202 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
4203
4204 * reg-stack.c: Include regs.h.
4205 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4206 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4207 FIRST_STACK_REG, not DFmode.
4208 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4209 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
4210 (change stack): Default register mode to the reg_raw_mode of
4211 FIRST_STACK_REG, not DFmode.
4212 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4213 (*swapxf): Rename from swapxf.
4214
4215 2018-09-14 Carl Love <cel@us.ibm.com>
4216
4217 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4218 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4219
4220 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
4221
4222 PR target/87224
4223 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4224 alternatives.
4225
4226 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
4227
4228 PR target/85628
4229 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4230
4231 2018-09-14 Jason Merrill <jason@redhat.com>
4232
4233 Fix --enable-gather-detailed-mem-stats.
4234 * hash-table.c (hash_table_usage): Change from variable to function.
4235 * hash-table.h: Adjust.
4236 * Makefile.in: Add missing dependencies on hash-table.h.
4237
4238 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4239
4240 PR tree-optimization/87259
4241 PR lto/87283
4242 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4243 execute_cse_reciprocals_1 has tried transforming.
4244
4245 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
4246
4247 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4248 VR_VARYING for PLUS/MINUS_EXPR.
4249
4250 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
4251
4252 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4253 formatting.
4254
4255 2018-09-14 Richard Biener <rguenther@suse.de>
4256
4257 PR middle-end/63155
4258 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4259 bits for the merged partition.
4260
4261 2018-09-13 Martin Sebor <msebor@redhat.com>
4262 Bernd Edlinger <bernd.edlinger@hotmail.de>
4263
4264 * builtins.h (c_srlen): Add argument.
4265 * builtins.c (warn_string_no_nul): New function.
4266 (c_strlen): Add argument and use it. Update recursive calls.
4267 Pass DECL argument to string_constant to get info on non
4268 terminated strings. Update *NONSTR as needed.
4269 (fold_builtin_strlen): Add argument to calls to c_strlen.
4270 Warn for unterminated arrays.
4271 (warn_string_no_null): Add prototype.
4272 * expr.c (string_constant): Update arguments. Update recursive
4273 calls appropriately. Detect missing NUL terminator and outermost
4274 declaration its missing in.
4275 Improve checks for arrays with nonzero lower bound or elements
4276 that are not a single byte. Simplify offset computation.
4277 Simplify checks for non-NUL terminated strings.
4278 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4279 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4280
4281 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4282
4283 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4284 correctly.
4285 * fold-const.c (c_getstr): Fix function comment. Remove unused third
4286 argument. Fix range checks.
4287 * fold-const.h (c_getstr): Adjust protoype.
4288 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4289 string is constant but contains no NUL byte.
4290
4291 * expr.c (string_constant): Adjust function comment.
4292 Remove bogus check for zero termination.
4293
4294 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4295
4296 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4297 (get_constant_size): Don't make STRING_CSTs larger than they are.
4298 (check_string_literal): New check function for STRING_CSTs.
4299 (output_constant): Use it.
4300
4301 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
4302
4303 PR target/86812
4304 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4305
4306 2018-09-13 Richard Biener <rguenther@suse.de>
4307
4308 PR tree-optimization/87263
4309 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4310 (struct unwind_state): Add max_rpo field.
4311 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4312 Compute max_rpo, the max RPO number a block can be backwards reached
4313 from. Re-write non-iterating mode to a RPO ordered worklist approach,
4314 separating it from the iterating mode.
4315
4316 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4317
4318 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4319 (rfs_decision): New scheduling decision.
4320
4321 2018-09-13 Richard Biener <rguenther@suse.de>
4322
4323 PR bootstrap/87134
4324 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4325 (vn_nary_op_insert_pieces_predicated): Do not write useless
4326 valid_dominated_by_p entry outside of the allocated storage.
4327
4328 2018-09-13 Omar Sandoval <osandov@osandov.com>
4329 Tom de Vries <tdevries@suse.de>
4330
4331 PR debug/86985
4332 * dwarf2out.c (is_c): New function.
4333 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4334
4335 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
4336
4337 PR target/85628
4338 * config/aarch64/aarch64.md (*aarch64_bfxil):
4339 Define.
4340 * config/aarch64/constraints.md (Ulc): Define.
4341 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4342 Define.
4343 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4344 New function.
4345
4346 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4347
4348 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4349 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4350 aarch64_layout_frame call.
4351 (aarch64_expand_epilogue): Likewise.
4352 (aarch64_initial_elimination_offset): Likewise.
4353 (aarch64_get_separate_components): Likewise.
4354 (aarch64_use_return_insn_p): Likewise.
4355 (aarch64_layout_frame): Remove unneeded check.
4356
4357 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4358
4359 * configure.ac: Only append
4360 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4361 gcc_config_arguments if it was never reconfigured or last reconfigure
4362 was with different arguments.
4363 * configure: Regenerated.
4364
4365 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4366 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4367
4368 PR middle-end/87290
4369 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4370 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4371
4372 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4373
4374 PR tree-optimization/87287
4375 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4376 X % C == 0 to X % (unsigned) C == 0 optimization to ...
4377 * match.pd (X % C == 0): ... here. New optimization.
4378
4379 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4380
4381 PR middle-end/82853
4382 * expr.h (maybe_optimize_mod_cmp): Declare.
4383 * expr.c (mod_inv): New function.
4384 (maybe_optimize_mod_cmp): New function.
4385 (do_store_flag): Use it.
4386 * cfgexpand.c (expand_gimple_cond): Likewise.
4387
4388 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
4389 Julian Brown <julian@codesourcery.com>
4390
4391 PR middle-end/86336
4392 * gimplify.c (gimplify_scan_omp_clauses): Set
4393 target_firstprivatize_array_bases in OpenACC parallel and kernels
4394 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4395 OpenACC data regions.
4396
4397 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
4398
4399 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4400 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4401
4402 2018-09-12 Richard Biener <rguenther@suse.de>
4403
4404 PR tree-optimization/87280
4405 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4406 edge but unreachable target.
4407 (do_rpo_vn): For conservatively handling a PHI only mark
4408 the backedge executable but not the block reachable.
4409
4410 2018-09-12 Richard Biener <rguenther@suse.de>
4411
4412 PR tree-optimization/87266
4413 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
4414 visited blocks.
4415
4416 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
4417
4418 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
4419 constants.
4420 ("trunc<BFP:mode><DFP_ALL:mode>2")
4421 ("trunc<DFP_ALL:mode><BFP:mode>2")
4422 ("extend<BFP:mode><DFP_ALL:mode>2")
4423 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
4424 according to the target operand type.
4425
4426 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4427 Andreas Krebbel <krebbel@linux.ibm.com>
4428
4429 PR tree-optimization/86844
4430 * gimple-ssa-store-merging.c
4431 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
4432 there are any overlapping stores in between them, make sure they are
4433 also coalesced or we give up completely.
4434
4435 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4436
4437 PR middle-end/87248
4438 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
4439 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
4440
4441 2018-09-12 Tom de Vries <tdevries@suse.de>
4442
4443 * common.opt (gdescribe-dies): Add option.
4444 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
4445 attribute for artifical and nameless decls.
4446 (dwarf2out_register_external_die): Add description attribute to
4447 external reference die.
4448 (add_desc_attribute): New functions.
4449 (gen_subprogram_die): Add description attribute to
4450 DW_TAG_call_site_parameter.
4451 * tree-pretty-print.c (print_generic_expr_to_str): New function.
4452 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
4453 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
4454 -gno-describe-dies.
4455 (@item -gdescribe-dies): Add.
4456
4457 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4458
4459 * tree-vrp.c (vrp_shift_undefined_p): Remove.
4460 (extract_range_from_binary_expr_1: Call
4461 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
4462 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
4463 depend on sign.
4464
4465 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4466
4467 * gimple-ssa-warn-alloca.c
4468 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
4469 field for ALLOCA_BOUND_*_LARGE.
4470
4471 2018-09-11 Nathan Sidwell <nathan@acm.org>
4472
4473 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
4474
4475 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4476
4477 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
4478 for clobbers. Remove obsolete comment.
4479
4480 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4481
4482 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
4483 mpxchk, mpxld and mpxst types.
4484 (define_attr length_immediate): Remove all processing of mpx types.
4485 (define_attr prefix_0f): Ditto.
4486 (define_attr memory): Ditto.
4487
4488 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4489
4490 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
4491 (log<mode>2): Change operand 1 predicate to general_operand.
4492 Extend operand 1 to XFmode and generate logxf3 insn.
4493 (log10<mode>2): Change operand 1 predicate to general_operand.
4494 Extend operand 1 to XFmode and generate log10xf3 insn.
4495 (log2<mode>2): Change operand 1 predicate to general_operand.
4496 Extend operand 1 to XFmode and generate log2xf3 insn.
4497 (fyl2xp1_extend<mode>xf3_i387): Remove.
4498 (log1p<mode>2): Change operand 1 predicate to general_operand.
4499 Extend operand 1 to XFmode and generate log1pxf3 insn.
4500 (fxtract_extend<mode>xf3_i387): Remove.
4501 (logb<mode>2): Change operand 1 predicate to general_operand.
4502 Extend operand 1 to XFmode and generate logbxf3 insn.
4503 (ilogb<mode>2): Change operand 1 predicate to general_operand.
4504 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
4505 (significand<mode>2): Change operand 1 predicate to general_operand.
4506 Extend operand 1 to XFmode and generate significandxf3 insn.
4507
4508 2018-09-11 Nathan Sidwell <nathan@acm.org>
4509
4510 * gcc.c (perror_with_name, pfatal_with_name): Delete.
4511 (load_specs): Use fatal_error.
4512 (DELETE_IF_ORDINARY, process_command): Use error.
4513 (execute, run_attempt): Use fatal_error.
4514
4515 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
4516
4517 * diagnostic-core.h (sorry_at): New prototype.
4518 * diagnostic.c (sorry_at): New function.
4519
4520 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
4521
4522 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
4523 by zero as VR_UNDEFINED.
4524
4525 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4526
4527 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
4528 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
4529 (<sincos>mode2): New expander.
4530 (sincos_extend<mode>xf3_i387): Remove insn pattern.
4531 (sincos -> sin, cos splitters): Remove splitter patterns.
4532 (sincos<mode>3): Change operand 2 predicate to general_operand.
4533 Extend operand 2 to XFmode and generate sincosxf3 insn.
4534 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
4535 Change operand 3 predicate to const1_operand.
4536 (fptan_extend<mode>xf4_i387): Remove insn pattern.
4537 (tanxf2): Update operands in the call to fptanxf4_i387.
4538 (tan<mode>2): Change operand 1 predicate to general_operand.
4539 Extend operand 1 to XFmode and generate tanxf3 insn.
4540 (atan2xf3): Rename from *fpatanxf3_i387.
4541 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
4542 (atan2xf3): Remove expander.
4543 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
4544 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
4545 (atan<mode>2): Change operand 1 predicate to general_operand.
4546 Extend operand 1 to XFmode and generate atanxf3 insn.
4547
4548 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4549
4550 * config/i386/i386.md (x87/SSE constant load splitter): Use
4551 memory_operand instead of nonimmediate_operand for input operand
4552 predicate.
4553
4554 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
4555
4556 * config/i386/i386.md (float partial SSE register stall splitter): Move
4557 splitter near its instruction pattern.
4558 (float_extend partial SSE register stall splitter): Ditto.
4559 (float_truncate partial SSE register stall splitter): Ditto.
4560
4561 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
4562
4563 PR target/86794
4564 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4565 to speculation_safe_value_not_needed.
4566
4567 PR target/85666
4568 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
4569 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
4570 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
4571 leaf_function_p, instead use has_hard_reg_initial_val.
4572
4573 2018-09-09 Nathan Sidwell <nathan@acm.org>
4574
4575 * gcc.h (pfatal_with_name): Don't declare here.
4576 * gcc.c (pfatal_with_name): Make static.
4577
4578 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
4579
4580 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
4581 earlyclobber.
4582
4583 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
4584
4585 PR rtl-optimization/85458
4586 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
4587 priority hook to reduce the priority of EXPR.
4588
4589 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
4590
4591 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
4592 DImode for x87 on 32bit targets. Conditionally disable x87 modes
4593 with X87_ENABLE_FLOAT. Remove preparation code.
4594 (*float<SWI48:mode><MODEF:mode>2): Rename from
4595 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
4596 math using "enabled" attribute.
4597 (*floatdi<MODEF:mode>2_i387): Rename from
4598 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
4599 enable for 32bit targets only.
4600 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
4601 splitter.
4602 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
4603 as operand 1 predicate. Rewrite as define_insn_and_split.
4604 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
4605
4606 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4607
4608 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
4609 to fallthru to FLOAT case.
4610
4611 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4612
4613 PR target/86731
4614 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
4615 around folding of vec_sl to handle out of range shift values.
4616
4617 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4618
4619 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
4620 Update callers to gen_fix_trunc<mode>_i387_fisttp
4621 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
4622 nonimmediate_operand.
4623 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
4624 and corresponding splitters.
4625 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
4626 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
4627 (fix_truncdi_i387_with_temp): Remove insn pattern
4628 and corresponding splitters.
4629 (fix_trunc<mode>_i387): Change operand 0 predicate to
4630 nonimmediate_operand.
4631 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
4632 and corresponding splitters.
4633 (*fistdi2_1): Remove.
4634 (fistdi2): Ditto.
4635 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
4636 (lrintxfdi2): Remove expander. Reimplement as define_insn.
4637 (*fist<mode>2_1): Remove.
4638 (fist<mode>2): Ditto.
4639 (fist<mode>2_with_temp): Remove insn pattern and corresponding
4640 splitters.
4641 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
4642 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
4643 (fistdi2_<rounding>): Change operand 0 predicate to
4644 nonimmediate_operand.
4645 (fistdi2_<rounding>_with_temp): Remove insn pattern
4646 and corresponding splitters.
4647 (fist<mode>2_<rounding>): Change operand 0 predicate to
4648 nonimmediate_operand.
4649 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
4650 and corresponding splitters.
4651
4652 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
4653
4654 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4655
4656 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
4657 the init value.
4658
4659 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4660
4661 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
4662 early gimple folding of vec_splat().
4663 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
4664 * gimple-fold.h: Add an extern define for tree_vec_extract().
4665
4666 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4667
4668 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
4669 wrappers around TREE_TYPE comparisons.
4670
4671 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4672
4673 PR target/80080
4674 * config/s390/predicates.md: Add nonsym_memory_operand.
4675 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
4676 contains a SYMBOL_REF, load it into an intermediate pseudo.
4677 (s390_emit_compare_and_swap): Legitimize operand.
4678 * config/s390/s390.md: Use the new nonsym_memory_operand
4679 with UNSPECV_CAS patterns.
4680
4681 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4682
4683 PR target/80080
4684 * config/s390/s390-passes.def: New file.
4685 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
4686 declaration.
4687 (make_pass_s390_early_mach): Add declaration.
4688 * config/s390/s390.c (make_pass_s390_early_mach):
4689 (s390_option_override): Remove dynamic registration.
4690 * config/s390/t-s390: Add s390-passes.def.
4691
4692 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4693
4694 * config/s390/s390.c (s390_decompose_constant_pool_ref):
4695 Remove UNSPEC_LTREL_BASE check.
4696 (annotate_constant_pool_refs): Likewise.
4697 (find_constant_pool_ref): Likewise.
4698 (find_ltrel_base): Removed.
4699 (replace_ltrel_base): Removed.
4700 (s390_mainpool_finish): Remove replace_ltrel_base call.
4701 (s390_chunkify_start): Remove pending LTREL_BASE logic.
4702 (s390_chunkify_finish): Remove replace_ltrel_base call.
4703 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
4704
4705 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
4706
4707 PR target/86779
4708 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4709 to speculation_safe_value_not_needed.
4710
4711 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
4712 Bernd Schmidt <bernds_cb1@t-online.de>
4713
4714 * config/nvptx/nvptx-opts.h: New file.
4715 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
4716 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
4717 (ASM_SPEC): Define.
4718 (TARGET_SM35): New macro.
4719 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
4720 correct predicate.
4721 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
4722 values.
4723 (misa=): New option.
4724 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
4725
4726 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
4727
4728 * config/i386/i386.md (truncdfsf2): Remove expander.
4729 (truncdfsf2_with_temp): Ditto.
4730 (truncxf<mode>2): Ditto.
4731 (*truncdfsf_fast_mixed): Remove insn pattern.
4732 (*truncdfsf_fast_i387): Ditto.
4733 (*truncdfsf_mixed): Ditto.
4734 (*truncdfsf_i387): Ditto.
4735 (*truncdfsf2_i387_1): Ditto.
4736 (*truncxfsf2_mixed): Ditto.
4737 (*truncxfdf2_mixed): Ditto.
4738 (*truncxf<mode>2_i387_noop): Ditto. Update callers
4739 to call gen_truncxf<mode>2 instead.
4740 (*truncxf<mode>2_i387): Remove.
4741 (reg->reg splitters): Remove splitter pattern.
4742 (reg->mem splitters): Ditto.
4743
4744 (truncdfsf2): New insn pattern.
4745 (truncxf<mode>2): Ditto.
4746
4747 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4748
4749 * tree-ssa-math-opts.c (is_mult_by): New function.
4750 (is_square_of): Use the above.
4751 (optimize_recip_sqrt): New function.
4752 (pass_cse_reciprocals::execute): Use the above.
4753
4754 2018-09-05 Richard Biener <rguenther@suse.de>
4755
4756 PR bootstrap/87134
4757 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
4758 to zero-init the emplaced vec.
4759
4760 2018-09-05 Martin Liska <mliska@suse.cz>
4761
4762 PR tree-optimization/87205
4763 * tree-switch-conversion.c (pass_lower_switch::execute):
4764 Group cases for switch statements.
4765
4766 2018-09-05 Richard Biener <rguenther@suse.de>
4767
4768 PR tree-optimization/87217
4769 * tree-ssa-sccvn.c (vuse_valueize): New.
4770 (vn_reference_lookup_pieces): Use it.
4771 (vn_reference_lookup): Likewise.
4772
4773 2018-09-05 Nathan Sidwell <nathan@acm.org>
4774
4775 PR c++/87137
4776 * stor-layout.c (place_field): Scan forwards to check last
4777 bitfield when ms_bitfield_placement is in effect.
4778
4779 2018-09-05 Richard Biener <rguenther@suse.de>
4780
4781 PR bootstrap/87225
4782 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
4783 return.
4784
4785 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
4786 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
4787
4788 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
4789 * config.gcc (extra_objs): Build it.
4790 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
4791 Likewise.
4792 * config/aarch64/aarch64-passes.def
4793 (pass_tag_collision_avoidance): New pass.
4794 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
4795 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
4796 (aarch64_classify_address): Remove static qualifier.
4797 (aarch64_address_info, aarch64_address_type): Move to...
4798 * config/aarch64/aarch64-protos.h: ... here.
4799 (make_pass_tag_collision_avoidance): New function.
4800 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
4801 New tuning flag.
4802
4803 2018-09-05 Martin Liska <mliska@suse.cz>
4804
4805 * doc/gcov.texi: Update documentation of humar
4806 readable mode.
4807 * gcov.c (format_count): Print one decimal place, it provides
4808 more fine number of situations like '1G' vs. '1.4G'.
4809
4810 2018-09-05 Martin Liska <mliska@suse.cz>
4811
4812 PR target/87164
4813 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
4814 * optc-gen.awk: Allow 'Var' for Deprecated options in order
4815 to generate a MASK value.
4816
4817 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
4818
4819 PR debug/86593
4820 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
4821 if frame pointer isn't used.
4822 (compute_frame_pointer_to_fb_displacement): Likewise.
4823
4824 2018-09-04 Jakub Jelinek <jakub@redhat.com>
4825
4826 PR target/87198
4827 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
4828 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
4829 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
4830 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
4831 and OPTION_MASK_ISA_XSAVEC_UNSET.
4832
4833 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
4834
4835 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
4836 XOR operations in NAND case.
4837
4838 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4839
4840 * wide-int-range.cc (wide_int_range_convert): New.
4841 * wide-int-range.h (wide_int_range_convert): New.
4842 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
4843 code into wide_int_range_convert.
4844 (extract_range_into_wide_ints): Do not munge anti range constants
4845 into the entire domain. Just return the range back.
4846
4847 2018-09-04 Martin Liska <mliska@suse.cz>
4848
4849 * genmatch.c (output_line_directive): Add new argument
4850 fnargs.
4851 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
4852
4853 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4854
4855 * doc/invoke.texi (Option Summary): Add whitespace.
4856
4857 * doc/invoke.texi (Option Summary): Add -Waligned-new.
4858
4859 2018-09-04 Richard Biener <rguenther@suse.de>
4860
4861 PR tree-optimization/87211
4862 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
4863 backedge value we're supposed to treat as VARYING also number
4864 the PHI to VARYING in case it got a different value-number already.
4865
4866 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4867
4868 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
4869 (extract_range_from_binary_expr_1): Do not call
4870 vrp_can_optimize_bit_op.
4871 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
4872 static.
4873 (wide_int_range_get_mask_and_bounds): New.
4874 (wide_int_range_optimize_bit_op): New.
4875 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
4876 (wide_int_range_bit_and): Same.
4877 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
4878 (wide_int_range_optimize_bit_op): New.
4879 (wide_int_range_get_mask_and_bounds): New.
4880
4881 2018-09-04 Richard Biener <rguenther@suse.de>
4882
4883 PR tree-optimization/87176
4884 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
4885 variable. When value-numbering a virtual PHI node make sure
4886 to not value-number to the backedge value.
4887
4888 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4889
4890 * doc/extend.texi (Long Long, Hex Floats): Document support for
4891 long long and hex floats in more recent versions of ISO C++.
4892
4893 2018-09-03 Richard Biener <rguenther@suse.de>
4894
4895 PR tree-optimization/87177
4896 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
4897 cleanup.
4898
4899 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4900
4901 * bb-reorder.c (edge_order): Convert to C-qsort-style
4902 tri-state comparator.
4903 (reorder_basic_blocks_simple): Change std::stable_sort to
4904 gcc_stablesort.
4905
4906 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4907
4908 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
4909 tri-state comparator.
4910 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
4911
4912 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4913
4914 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
4915 (mergesort): ... here as maximum count for using netsort.
4916 (gcc_qsort): Set nlim to 3 if stable sort is requested.
4917 (gcc_stablesort): New.
4918 * system.h (gcc_stablesort): Declare.
4919
4920 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4921
4922 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
4923 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
4924 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
4925
4926 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
4927
4928 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
4929 lxsdx and stxsdx alternatives.
4930 (*mov<mode>_hardfloat64): Ditto.
4931 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
4932
4933 2018-09-03 Richard Biener <rguenther@suse.de>
4934
4935 PR tree-optimization/87200
4936 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
4937 simplify result.
4938
4939 2018-09-03 Martin Liska <mliska@suse.cz>
4940
4941 PR tree-optimization/87201
4942 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4943 Fix parenthesis in an expression.
4944
4945 2018-09-03 Richard Biener <rguenther@suse.de>
4946
4947 PR tree-optimization/87197
4948 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
4949 visited. CSE the VN_INFO hashtable lookup.
4950
4951 PR tree-optimization/87169
4952 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
4953 iterating make sure there's no extra backedges from irreducible
4954 regions feeding the header. Mark the destination block
4955 executable.
4956
4957 2018-09-03 Martin Liska <mliska@suse.cz>
4958
4959 PR driver/83193
4960 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
4961 * common/common-targhooks.c (default_get_valid_option_values):
4962 New function.
4963 * common/common-targhooks.h (default_get_valid_option_values):
4964 Likewise.
4965 * common/config/i386/i386-common.c: Move processor_target_table
4966 from i386.c.
4967 (ix86_get_valid_option_values): New function.
4968 (TARGET_GET_VALID_OPTION_VALUES): New macro.
4969 * config/i386/i386.c (struct ptt): Move to i386-common.c.
4970 (PTA_*): Move all defined masks into i386-common.c.
4971 (ix86_function_specific_restore): Use new processor_cost_table.
4972 * config/i386/i386.h (struct ptt): Moved from i386.c.
4973 (struct pta): Likewise.
4974 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
4975 * doc/tm.texi.in: Likewise.
4976 * opt-suggestions.c (option_proposer::suggest_option):
4977 Pass prefix to build_option_suggestions.
4978 (option_proposer::get_completions): Likewise.
4979 (option_proposer::build_option_suggestions): Use the new target
4980 hook.
4981 * opts.c (struct option_help_tuple): New struct.
4982 (print_filtered_help): Use the new target hook.
4983
4984 2018-09-03 Martin Liska <mliska@suse.cz>
4985
4986 PR middle-end/59521
4987 * predict.c (set_even_probabilities): Add likely_edges
4988 argument and handle cases where we have precisely one
4989 likely edge.
4990 (combine_predictions_for_bb): Catch also likely_edges.
4991 (tree_predict_by_opcode): Handle gswitch statements.
4992 * tree-cfg.h (find_case_label_for_value): New declaration.
4993 (find_taken_edge_switch_expr): Likewise.
4994 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4995 Find pivot in decision tree based on probabily, not by number of
4996 nodes.
4997
4998 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
4999
5000 * doc/standards.texi (Standards): Update Objective-C reference.
5001
5002 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5003
5004 * doc/install.texi (Prerequisites): Update link for MPC.
5005
5006 2018-09-01 Michael Matz <matz@suse.de>
5007
5008 PR tree-optimization/87074
5009 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
5010 PHIs for outer-loop uses.
5011
5012 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5013
5014 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
5015 * doc/invoke.texi (C Dialect Options): Ditto.
5016
5017 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5018
5019 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
5020
5021 2018-08-31 Richard Biener <rguenther@suse.de>
5022
5023 PR tree-optimization/87168
5024 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
5025 (rpo_elim::eliminate_avail): When OP was not visited it must
5026 be available.
5027
5028 2018-08-31 David Malcolm <dmalcolm@redhat.com>
5029
5030 * tree-vrp.c (copy_value_range): Convert param "from" from
5031 "value_range *" to "const value_range *".
5032 (range_is_null): Likewise for param "vr".
5033 (range_int_cst_p): Likewise.
5034 (range_int_cst_singleton_p): Likewise.
5035 (symbolic_range_p): Likewise.
5036 (value_ranges_intersect_p): Likewise for both params.
5037 (value_range_nonnegative_p): Likewise for param "vr".
5038 (value_range_constant_singleton): Likewise.
5039 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
5040 (extract_range_into_wide_ints): Likewise for param "vr".
5041 (extract_range_from_multiplicative_op): Likewise for params "vr0"
5042 and "vr1".
5043 (vrp_can_optimize_bit_op): Likewise.
5044 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
5045 "vr1_".
5046 (extract_range_from_unary_expr): Likewise.
5047 (debug_value_range): Likewise for param "vr".
5048 (value_range::dump): Add "const" qualifier.
5049 (vrp_prop::check_array_ref): Convert local "vr" from
5050 "value_range *" to "const value_range *".
5051 (vrp_prop::check_mem_ref): Likewise.
5052 (vrp_prop::visit_stmt): Likewise for local "old_vr".
5053 (vrp_intersect_ranges_1): Likewise for param "vr_1".
5054 (vrp_intersect_ranges): Likewise.
5055 (simplify_stmt_for_jump_threading): Likewise for local "vr".
5056 (vrp_prop::vrp_finalize): Likewise.
5057 * tree-vrp.h (value_range::dump): Add "const" qualifier.
5058 (vrp_intersect_ranges): Add "const" qualifier to params as above.
5059 (extract_range_from_unary_expr): Likewise.
5060 (value_range_constant_singleton): Likewise.
5061 (symbolic_range_p): Likewise.
5062 (copy_value_range): Likewise.
5063 (extract_range_from_binary_expr_1): Likewise.
5064 (range_int_cst_p): Likewise.
5065 (vrp_set_zero_nonzero_bits): Likewise.
5066 (range_int_cst_singleton_p): Likewise.
5067
5068 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
5069
5070 * config/aarch64/arm_neon.h (vabsd_s64): New.
5071 (vnegd_s64): Likewise.
5072
5073 2018-08-31 Martin Jambor <mjambor@suse.cz>
5074
5075 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
5076
5077 2018-08-31 Martin Liska <mliska@suse.cz>
5078
5079 * ipa-icf.c (sem_item::add_type): Use
5080 sem_item::m_type_hash_cache.
5081 * ipa-icf.h: Move the cache from sem_item_optimizer
5082 to sem_item.
5083
5084 2018-08-31 Nathan Sidwell <nathan@acm.org>
5085
5086 * doc/extend.texi (Backwards Compatibility): Remove implicit
5087 extern C leeway of () being (...).
5088
5089 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5090
5091 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
5092
5093 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
5094
5095 PR target/86684
5096 PR target/87149
5097 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
5098
5099 2018-08-31 Jakub Jelinek <jakub@redhat.com>
5100
5101 PR middle-end/87138
5102 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
5103 gen_int_mode. Formatting fixes.
5104
5105 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
5106
5107 * target.def (custom_function_descriptors): Improve documentation.
5108 * doc/tm.texi.in (Trampolines): Expand discussion of function
5109 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
5110 beginning of the section.
5111 * doc/tm.texi: Regenerated.
5112
5113 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
5114
5115 * cfg.h (class auto_edge_flag): Spell out the template-id of the
5116 base class in the initializer list. This is a workaround for
5117 building with older GCC.
5118 (class auto_bb_flag): Likewise.
5119
5120 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
5121
5122 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
5123 (altivec_vcmpequ<VI_char>_p): Remove star.
5124 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
5125 vector load modes.
5126 (expand_strncmp_vec_sequence): New function.
5127 (emit_final_str_compare_vec): New function.
5128 (expand_strn_compare): Add support for vector strncmp.
5129 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
5130 length specification to bytes.
5131 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
5132 (vcmpnezb_p): New pattern.
5133 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
5134 for option -mstring-compare-inline-limit.
5135
5136 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
5137
5138 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
5139 (PTA_SKYLAKE): Add PTA_AES.
5140 (PTA_GOLDMONT): Likewise.
5141
5142 2018-08-29 Jan Hubicka <jh@suse.cz>
5143
5144 PR lto/86517
5145 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
5146 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
5147
5148 2018-08-29 Jan Hubicka <jh@suse.cz>
5149
5150 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
5151 TYPE_STUB_DECL.
5152 (hash_tree): Do not visit TYPE_STUB_DECL.
5153 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
5154 stream TYPE_STUB_DECL.
5155 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
5156 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
5157 after free_lang_data.
5158 (type_in_anonymous_namespace_p): Likewise.
5159
5160 2018-08-29 Jan Hubicka <jh@suse.cz>
5161
5162 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5163 comment that it has to be even number.
5164 (class sreal): Change m_sig type to int32_t.
5165 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5166 int64_t for temporary calculations.
5167 (sreal_verify_basics): Drop one bit from minimum and maximum.
5168
5169 2018-08-30 Richard Biener <rguenther@suse.de>
5170
5171 PR tree-optimization/87147
5172 * tree-ssa-sccvn.c (SSA_VISITED): New function.
5173 (visit_phi): When the degenerate result is from the backedge and
5174 we didn't visit its definition yet drop to VARYING.
5175 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5176
5177 2018-08-29 Jan Hubicka <jh@suse.cz>
5178
5179 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5180 DECL_VINDEX.
5181 (hash_tree): Likewise.
5182
5183 2018-08-29 Jan Hubicka <jh@suse.cz>
5184
5185 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5186 and TYPE_NEXT_REF_TO.
5187
5188 2018-08-29 Jan Hubicka <jh@suse.cz>
5189
5190 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5191 comment that it has to be even number.
5192 (class sreal): Change m_sig type to int32_t.
5193 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5194 int64_t for temporary calculations.
5195 (sreal_verify_basics): Drop one bit from minimum and maximum.
5196
5197 2018-08-30 Tamar Christina <tamar.christina@arm.com>
5198
5199 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5200
5201 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
5202
5203 PR middle-end/86995
5204 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5205 if to_add is negative.
5206
5207 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
5208
5209 PR middle-end/87053
5210 * builtins.c (c_strlen): Improve range checks.
5211
5212 2018-08-29 Martin Sebor <msebor@redhat.com>
5213 Jeff Law <law@redhat.com>
5214
5215 PR tree-optimization/86714
5216 PR tree-optimization/86711
5217 * builtins.c (c_strlen): Add arguments to call to string_constant.
5218 * expr.c (string_constant): Add argument. Detect missing nul
5219 terminator and outermost declaration it's missing in.
5220 * expr.h (string_constant): Add argument.
5221 * fold-const.c (read_from_constant_string): Add arguments to call to
5222 string_constant.
5223 (c_getstr): Likewise.
5224 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5225 to string_constant.
5226 * tree-ssa-strlen.c (get_stridx): Likewise.
5227
5228 2018-08-29 Jan Hubicka <jh@suse.cz>
5229
5230 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5231 Do not stream DECL_VINDEX.
5232 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5233 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5234 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5235
5236 2018-08-29 Richard Biener <rguenther@suse.de>
5237
5238 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5239 virtual operands that are not default defs to honor region
5240 boundaries.
5241 (rpo_vn_valueize): Remove ineffective code here.
5242
5243 2018-08-29 Richard Biener <rguenther@suse.de>
5244
5245 PR tree-optimization/87132
5246 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5247 when skipping defs reachable over backedges.
5248
5249 2018-08-29 Richard Biener <rguenther@suse.de>
5250
5251 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5252 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5253 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5254 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5255 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5256 (vn_reference_lookup_3): Remove use of const_parms.
5257 (free_rpo_vn): Do not free const_parms.
5258 (do_rpo_vn): Do not call init_const_parms.
5259 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5260 SSA_NAME_POINTS_TO_READONLY_MEMORY.
5261 (call_may_clobber_ref_p_1): Likewise.
5262
5263 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
5264
5265 PR other/86726
5266 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5267 (-O): Ditto.
5268 (-ftree-scev-cprop): Document.
5269
5270 2018-08-29 Jan Hubicka <jh@suse.cz>
5271
5272 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5273 parameters.
5274 (sreal constructor): Update.
5275 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5276 sreal:operator/): Update.
5277
5278 2018-08-29 Martin Liska <mliska@suse.cz>
5279
5280 * tree-switch-conversion.c (switch_conversion::expand):
5281 Strenghten assumption about gswitch statements.
5282
5283 2018-08-29 Richard Biener <rguenther@suse.de>
5284
5285 PR tree-optimization/87117
5286 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5287 re-value-number released SSA VDEFs.
5288
5289 2018-08-29 Richard Biener <rguenther@suse.de>
5290
5291 PR tree-optimization/87126
5292 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5293
5294 2018-08-28 Jim Wilson <jimw@sifive.com>
5295
5296 * config/riscv/pic.md: Rewrite.
5297 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5298 invalid address.
5299 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5300 (SOFTF, default_load, softload, softstore): New.
5301
5302 2018-08-28 Jeff Law <law@redhat.com>
5303
5304 * fold-const.c (fold_binary_loc): Remove recently added assert.
5305
5306 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
5307
5308 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5309 to OP parmeter of generated function.
5310
5311 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
5312
5313 PR tree-optimization/87009
5314 * match.pd: Add boolean optimizations.
5315
5316 2018-08-28 Martin Sebor <msebor@redhat.com>
5317
5318 PR middle-end/86631
5319 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5320 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5321 (pass_walloca::gate): Use it.
5322 (alloca_call_type): Same.
5323 (pass_walloca::execute): Same.
5324 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5325
5326 2018-08-28 David Malcolm <dmalcolm@redhat.com>
5327
5328 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5329 GCC_VERSION for usage of "__gcc_dump_printf__" format from
5330 >= 3005 to >= 9000.
5331
5332 2018-08-28 Richard Biener <rguenther@suse.de>
5333
5334 PR tree-optimization/87124
5335 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5336 constants before looking up avail.
5337
5338 2018-08-28 Jakub Jelinek <jakub@redhat.com>
5339
5340 PR middle-end/87099
5341 * calls.c (maybe_warn_nonstring_arg): Punt early if
5342 warn_stringop_overflow is zero. Don't call get_range_strlen
5343 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5344 Swap comparison operands to have constants on rhs. Only use
5345 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
5346 increment lenrng[0].
5347
5348 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
5349
5350 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5351 use of tree_to_shwi. Remove duplicated test for the size being
5352 a whole number of bytes.
5353
5354 2018-08-28 Richard Biener <rguenther@suse.de>
5355
5356 PR tree-optimization/87117
5357 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5358 Handle removed stmt without LHS (GIMPLE_NOP).
5359
5360 2018-08-28 Richard Biener <rguenther@suse.de>
5361
5362 PR tree-optimization/87117
5363 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5364 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5365
5366 2018-08-28 Richard Biener <rguenther@suse.de>
5367
5368 PR tree-optimization/87117
5369 * tree-ssa-pre.c (compute_avail): Do not make expressions
5370 with predicated values available.
5371 (get_expr_value_id): Assert we do not run into predicated value
5372 expressions.
5373
5374 2018-08-28 Richard Biener <rguenther@suse.de>
5375
5376 PR tree-optimization/87117
5377 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5378 get virtual operands.
5379 (get_expr_operands): Handle STRING_CST like other decls.
5380
5381 2018-08-28 Martin Liska <mliska@suse.cz>
5382
5383 * tree.h: Update documentation of fndecl_built_in_p
5384 functions.
5385
5386
5387 2018-08-27 Jeff Law <law@redhat.com>
5388 PR tree-optimization/87110
5389 * tree-ssa-dse.c (compute_trims): Handle non-constant
5390 TYPE_SIZE_UNIT.
5391
5392 2018-08-27 Martin Sebor <msebor@redhat.com>
5393
5394 PR tree-optimization/86914
5395 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5396
5397 2018-08-27 Martin Sebor <msebor@redhat.com>
5398
5399 PR tree-optimization/87112
5400 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5401 the type of the bound argument.
5402
5403 2018-08-27 Jeff Law <law@redhat.com>
5404
5405 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5406 type does not have a TYPE_SIZE_UNIT.
5407
5408 2018-08-27 Steve Ellcey <sellcey@cavium.com>
5409
5410 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
5411 with include of backend.h.
5412
5413 2018-08-27 Richard Biener <rguenther@suse.de>
5414
5415 PR tree-optimization/86927
5416 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
5417 use const cond reduction code.
5418
5419 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
5420
5421 PR tree-optimization/85758
5422 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
5423
5424 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5425
5426 PR c++/87091
5427 * diagnostic-show-locus.c (class layout_range): Update for
5428 conversion of show_caret_p to a tri-state.
5429 (layout_range::layout_range): Likewise.
5430 (make_range): Likewise.
5431 (layout::maybe_add_location_range): Likewise.
5432 (layout::should_print_annotation_line_p): Don't show annotation
5433 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
5434 (layout::get_state_at_point): Update for conversion of
5435 show_caret_p to a tri-state. Bail out early for
5436 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
5437 underlining or source colorization.
5438 (gcc_rich_location::add_location_if_nearby): Update for conversion
5439 of show_caret_p to a tri-state.
5440 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
5441 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
5442 Likewise.
5443 (selftest::test_one_liner_labels): Likewise.
5444 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
5445 conversion of show_caret_p to a tri-state.
5446 * pretty-print.c (text_info::set_location): Likewise.
5447 * pretty-print.h (text_info::set_location): Likewise.
5448 * substring-locations.c (format_warning_n_va): Likewise.
5449 * tree-diagnostic.c (default_tree_printer): Likewise.
5450 * tree-pretty-print.c (newline_and_indent): Likewise.
5451
5452 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5453
5454 PR c++/87091
5455 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
5456 line above for line-insertion fix-it hints.
5457 (selftest::test_fixit_insert_containing_newline): Update the
5458 expected results, and add a test with line-numbering enabled.
5459
5460 2018-08-27 Martin Liska <mliska@suse.cz>
5461
5462 PR sanitizer/86962
5463 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
5464 params with DECL_HAS_VALUE_EXPR_P.
5465
5466 2018-08-27 Martin Liska <mliska@suse.cz>
5467
5468 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
5469 selected expansion strategy.
5470
5471 2018-08-27 Martin Liska <mliska@suse.cz>
5472
5473 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
5474 * builtins.c (is_builtin_fn): Likewise.
5475 * attribs.c (diag_attr_exclusions): Use new function
5476 fndecl_built_in_p and remove check for FUNCTION_DECL if
5477 possible.
5478 (builtin_mathfn_code): Likewise.
5479 (fold_builtin_expect): Likewise.
5480 (fold_call_expr): Likewise.
5481 (fold_builtin_call_array): Likewise.
5482 (fold_call_stmt): Likewise.
5483 (set_builtin_user_assembler_name): Likewise.
5484 (is_simple_builtin): Likewise.
5485 * calls.c (gimple_alloca_call_p): Likewise.
5486 (maybe_warn_nonstring_arg): Likewise.
5487 * cfgexpand.c (expand_call_stmt): Likewise.
5488 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
5489 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
5490 (cgraph_node::verify_node): Likewise.
5491 * cgraphclones.c (build_function_decl_skip_args): Likewise.
5492 (cgraph_node::create_clone): Likewise.
5493 * config/arm/arm.c (arm_insert_attributes): Likewise.
5494 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
5495 * dse.c (scan_insn): Likewise.
5496 * expr.c (expand_expr_real_1): Likewise.
5497 * fold-const.c (operand_equal_p): Likewise.
5498 (fold_binary_loc): Likewise.
5499 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
5500 * gimple-low.c (lower_stmt): Likewise.
5501 * gimple-pretty-print.c (dump_gimple_call): Likewise.
5502 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
5503 Likewise.
5504 * gimple.c (gimple_build_call_from_tree): Likewise.
5505 (gimple_call_builtin_p): Likewise.
5506 (gimple_call_combined_fn): Likewise.
5507 * gimplify.c (gimplify_call_expr): Likewise.
5508 (gimple_boolify): Likewise.
5509 (gimplify_modify_expr): Likewise.
5510 (gimplify_addr_expr): Likewise.
5511 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
5512 * ipa-cp.c (determine_versionability): Likewise.
5513 * ipa-fnsummary.c (compute_fn_summary): Likewise.
5514 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
5515 * ipa-split.c (visit_bb): Likewise.
5516 (split_function): Likewise.
5517 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5518 * lto-cgraph.c (input_node): Likewise.
5519 * lto-streamer-out.c (write_symbol): Likewise.
5520 * omp-low.c (setjmp_or_longjmp_p): Likewise.
5521 (lower_omp_1): Likewise.
5522 * predict.c (strip_predict_hints): Likewise.
5523 * print-tree.c (print_node): Likewise.
5524 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
5525 * trans-mem.c (is_tm_irrevocable): Likewise.
5526 (is_tm_load): Likewise.
5527 (is_tm_simple_load): Likewise.
5528 (is_tm_store): Likewise.
5529 (is_tm_simple_store): Likewise.
5530 (is_tm_abort): Likewise.
5531 (tm_region_init_1): Likewise.
5532 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
5533 * tree-cfg.c (verify_gimple_call): Likewise.
5534 (move_stmt_r): Likewise.
5535 (stmt_can_terminate_bb_p): Likewise.
5536 * tree-eh.c (lower_eh_constructs_2): Likewise.
5537 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
5538 * tree-inline.c (remap_gimple_stmt): Likewise.
5539 (copy_bb): Likewise.
5540 (estimate_num_insns): Likewise.
5541 (fold_marked_statements): Likewise.
5542 * tree-sra.c (scan_function): Likewise.
5543 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
5544 (optimize_stack_restore): Likewise.
5545 (pass_fold_builtins::execute): Likewise.
5546 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
5547 (mark_all_reaching_defs_necessary_1): Likewise.
5548 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
5549 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5550 (pass_forwprop::execute): Likewise.
5551 * tree-ssa-loop-im.c (stmt_cost): Likewise.
5552 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5553 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
5554 * tree-ssa-strlen.c (get_string_length): Likewise.
5555 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
5556 (find_func_aliases_for_call): Likewise.
5557 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
5558 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
5559 * tree-tailcall.c (find_tail_calls): Likewise.
5560 * tree.c (need_assembler_name_p): Likewise.
5561 (free_lang_data_in_decl): Likewise.
5562 (get_call_combined_fn): Likewise.
5563 * ubsan.c (is_ubsan_builtin_p): Likewise.
5564 * varasm.c (incorporeal_function_p): Likewise.
5565 * tree.h (DECL_BUILT_IN): Remove and replace with
5566 fndecl_built_in_p.
5567 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
5568 (fndecl_built_in_p): New.
5569
5570 2018-08-27 Martin Liska <mliska@suse.cz>
5571
5572 PR tree-optimization/86847
5573 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
5574 Dump also subtree probability.
5575 (switch_decision_tree::do_jump_if_equal): New function.
5576 (switch_decision_tree::emit_case_nodes): Handle special
5577 situations in balanced tree that can be emitted much simpler.
5578 Fix calculation of probabilities that happen in tree expansion.
5579 * tree-switch-conversion.h (struct cluster): Add
5580 is_single_value_p.
5581 (struct simple_cluster): Likewise.
5582 (struct case_tree_node): Add new function has_child.
5583 (do_jump_if_equal): New.
5584
5585 2018-08-27 Martin Liska <mliska@suse.cz>
5586
5587 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
5588 Add new argument to bit_test_cluster constructor.
5589 (bit_test_cluster::emit): Set bits really number of values
5590 handlel by a test.
5591 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
5592 probability argument.
5593 * tree-switch-conversion.h (struct bit_test_cluster):
5594 Add m_handles_entire_switch.
5595
5596 2018-08-27 Martin Liska <mliska@suse.cz>
5597
5598 PR tree-optimization/86702
5599 * tree-switch-conversion.c (jump_table_cluster::emit):
5600 Make probabilities even for values in jump table
5601 according to number of cases handled.
5602 (switch_decision_tree::compute_cases_per_edge): Pass
5603 argument to reset_out_edges_aux function.
5604 (switch_decision_tree::analyze_switch_statement): Likewise.
5605 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
5606 Make it static.
5607
5608 2018-08-27 Martin Liska <mliska@suse.cz>
5609
5610 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
5611 cfun argument explicitly.
5612 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
5613 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
5614 function gimple_switch_default_bb.
5615 (convert_switch_statements):
5616 (expand_builtins):
5617 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
5618 * stmt.c (label_to_block_fn): Use label_to_block and pass
5619 cfun argument explicitly and use gimple_switch_label_bb.
5620 (expand_case): Likewise.
5621 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
5622 cfun argument explicitly. Likewise.
5623 (make_edges_bb): Likewise.
5624 (make_cond_expr_edges): Likewise.
5625 (get_cases_for_edge): Likewise.
5626 (make_gimple_switch_edges): Likewise.
5627 (label_to_block_fn): Likewise.
5628 (label_to_block): Likewise.
5629 (make_goto_expr_edges): Likewise.
5630 (make_gimple_asm_edges): Likewise.
5631 (main_block_label): Likewise.
5632 (group_case_labels_stmt): Likewise.
5633 (find_taken_edge_computed_goto): Likewise.
5634 (find_taken_edge_switch_expr): Likewise.
5635 (gimple_verify_flow_info): Likewise.
5636 (gimple_redirect_edge_and_branch): Likewise.
5637 (gimple_switch_label_bb): New function.
5638 (gimple_switch_default_bb): Likewise.
5639 (gimple_switch_edge): Likewise.
5640 (gimple_switch_default_edge): Likewise.
5641 * tree-cfg.h (label_to_block_fn): Remove and replace ...
5642 (label_to_block): ... with this.
5643 (gimple_switch_label_bb): New.
5644 (gimple_switch_default_bb): Likewise.
5645 (gimple_switch_edge): Likewise.
5646 (gimple_switch_default_edge): Likewise.
5647 * tree-cfgcleanup.c (convert_single_case_switch): Use
5648 new gimple functions and pass new argument to label_to_block.
5649 (cleanup_control_flow_bb):
5650 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
5651 cfun argument explicitly.
5652 (make_eh_edges): Likewise.
5653 (redirect_eh_dispatch_edge): Likewise.
5654 (lower_resx): Likewise.
5655 (lower_eh_dispatch): Likewise.
5656 (maybe_remove_unreachable_handlers): Likewise.
5657 (unsplit_eh): Likewise.
5658 (cleanup_empty_eh): Likewise.
5659 (verify_eh_edges): Likewise.
5660 (verify_eh_dispatch_edge): Likewise.
5661 * tree-ssa-dom.c (record_edge_info): Likewise.
5662 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
5663 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
5664 (thread_through_normal_block): Likewise.
5665 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
5666 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
5667 * tree-switch-conversion.c (switch_conversion::collect): Use new
5668 gimple functions.
5669 (switch_conversion::check_final_bb): Likewise.
5670 (switch_conversion::gather_default_values): Pass new argument
5671 to label_to_block.
5672 (switch_conversion::build_constructors): Likewise.
5673 (switch_decision_tree::compute_cases_per_edge): Use new
5674 gimple_switch_edge function.
5675 (switch_decision_tree::analyze_switch_statement): Pass new argument
5676 to label_to_block.
5677 (switch_decision_tree::try_switch_expansion): Use
5678 gimple_switch_default_edge.
5679 * tree-vrp.c (find_switch_asserts): Pass new argument
5680 to label_to_block.
5681 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
5682 (vr_values::simplify_switch_using_ranges): Likewise.
5683
5684 2018-08-27 Richard Biener <rguenther@suse.de>
5685
5686 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
5687 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
5688
5689 * tree-ssa-sccvn.h (struct vn_pval): New structure.
5690 (struct vn_nary_op_s): Add unwind_to member. Add
5691 predicated_values flag and put result into a union together
5692 with a linked list of vn_pval.
5693 (struct vn_ssa_aux): Add name member to make maintaining
5694 a map of SSA name to vn_ssa_aux possible. Remove no longer
5695 needed info, dfsnum, low, visited, on_sccstack, use_processed
5696 and range_info_anti_range_p members.
5697 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
5698 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
5699 New functions.
5700 (vn_valueize): New global.
5701 (vn_context_bb): Likewise.
5702 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
5703 VN_INFO_PTR_INFO): Remove.
5704 * tree-ssa-sccvn.c: ... (rewrite)
5705 (pass_fre::execute): For -O2+ initialize loops and run
5706 RPO VN in optimistic mode (iterating). For -O1 and -Og
5707 run RPO VN in non-optimistic mode.
5708 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
5709 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
5710 * doc/invoke.texi (sccvn-max-scc-size): Remove.
5711 (rpo-vn-max-loop-depth): Document.
5712 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
5713 when valuezing the VUSE signals we walked out of the region.
5714 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
5715 (phi_translate): Set VN context block to use for availability
5716 lookup.
5717 (compute_avail): Likewise.
5718 (pre_valueize): New function.
5719 (pass_pre::execute): Adjust to the RPO VN API.
5720
5721 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
5722 (propagate_constants_for_unrolling): Remove.
5723 (tree_unroll_loops_completely): Perform value-numbering
5724 on the unrolled bodies loop parent.
5725
5726 2018-08-27 Richard Biener <rguenther@suse.de>
5727
5728 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
5729 for partial antic compute.
5730
5731 2018-08-27 Jakub Jelinek <jakub@redhat.com>
5732
5733 PR rtl-optimization/87065
5734 * combine.c (simplify_if_then_else): Formatting fix.
5735 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
5736 check.
5737 (known_cond): Don't return const_true_rtx for vector modes. Use
5738 CONST0_RTX instead of const0_rtx. Formatting fixes.
5739
5740 2018-08-27 Martin Liska <mliska@suse.cz>
5741
5742 PR gcov-profile/87069
5743 * gcov.c (process_file): Record files already processed
5744 and warn about a file being processed multiple times.
5745
5746 2018-08-27 Martin Liska <mliska@suse.cz>
5747
5748 PR driver/83193
5749 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5750 Set default values for x_aarch64_*_string strings.
5751 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
5752 prefix. For -mabi do not print '=ABI' in help and use
5753 <option_value> format for -msve-vector-bits and -moverride
5754 options.
5755
5756 2018-08-26 Jeff Law <law@redhat.com>
5757
5758 * config/mips/frame-header-opt.c: Include "backend.h" rather than
5759 "cfg.h"
5760
5761 2018-08-26 Marek Polacek <polacek@redhat.com>
5762
5763 PR c++/87029, Implement -Wredundant-move.
5764 * doc/invoke.texi: Document -Wredundant-move.
5765
5766 2018-08-25 Martin Sebor <msebor@redhat.com>
5767
5768 PR tree-optimization/87059
5769 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
5770 to the same type as the other.
5771 * fold-const.c (fold_binary_loc): Assert expectation.
5772
5773 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
5774
5775 * config/darwin.c (machopic_legitimize_pic_address): Clean up
5776 extraneous parentheses, dead code section and formatting.
5777
5778 2018-08-24 David Malcolm <dmalcolm@redhat.com>
5779
5780 PR c++/87091
5781 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
5782 wide enough for jumps in the line-numbering to be visible.
5783 (layout::print_gap_in_line_numbering): New member function.
5784 (layout::calculate_line_spans): When using line numbering, merge
5785 line spans that are only 1 line apart.
5786 (diagnostic_show_locus): When printing line numbers, show gaps in
5787 line numbering directly, rather than printing headers.
5788 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
5789 line-numbering with multiple line spans.
5790 (selftest::test_fixit_insert_containing_newline_2): Add test of
5791 line-numbering, in which the spans are close enough to be merged.
5792
5793 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5794
5795 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
5796 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
5797 * tree-vrp.c (range_is_nonnull): Remove.
5798 (range_includes_zero_p): Accept value_range instead of min/max.
5799 (extract_range_from_binary_expr_1): Do not early bail on
5800 POINTER_PLUS_EXPR.
5801 Use range_includes_zero_p instead of range_is_nonnull.
5802 (extract_range_from_unary_expr): Use range_includes_zero_p instead
5803 of range_is_nonnull.
5804 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
5805 special case VR_ANTI_RANGE.
5806 (vrp_finalize): Same.
5807 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
5808 instead of min/max.
5809 (range_is_nonnull): Remove.
5810 * vr-values.c (vrp_stmt_computes_nonzero): Use
5811 range_includes_zero_p instead of range_is_nonnull.
5812 (extract_range_basic): Pass value_range to range_includes_zero_p
5813 instead of range_is_nonnull.
5814
5815 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
5816
5817 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
5818 * emit-rtl.h (rtl_data): Remove return_bnd.
5819 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
5820 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
5821 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
5822 (POINTER_BOUNDS_MODE): Remove definition.
5823 (make_pointer_bounds_mode): Remove.
5824 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
5825 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
5826 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
5827 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
5828 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
5829 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
5830 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
5831
5832 * config/i386/i386-modes.def (BND32, BND64): Remove.
5833 * config/i386/i386.c (dbx_register_map): Remove bound registers.
5834 (dbx64_register_map): Ditto.
5835 (svr4_dbx_register_map): Ditto.
5836 (indirect_thunk_bnd_needed): Remove.
5837 (indirect_thunks_bnd_used): Ditto.
5838 (indirect_return_bnd_needed): Ditto.
5839 (indirect_return_via_cx_bnd): Ditto.
5840 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
5841 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
5842 (output_indirect_thunk): Ditto. Remove need_prefix argument.
5843 (output_indirect_thunk_function): Remove handling of
5844 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
5845 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
5846 (ix86_save_reg): Remove handling of crtl->return_bnd.
5847 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
5848 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
5849 and UNSPEC_BNDLX_ADDR.
5850 (ix86_output_indirect_branch_via_reg): Remove handling of
5851 indirect_thunk_prefix_bnd.
5852 (ix86_output_indirect_branch_via_push): Ditto.
5853 (ix86_output_function_return): Ditto.
5854 (ix86_output_indirect_function_return): Ditto.
5855 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
5856 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
5857 (CALL_USED_REGISTERS): Ditto.
5858 (REG_ALLOC_ORDER): Update for removal of bound registers.
5859 (HI_REGISTER_NAMES): Ditto.
5860 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
5861 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
5862 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
5863 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
5864 (FIRST_PSEUDO_REG): Update.
5865 (BND): Remove mode iterator.
5866 * config/i386/predicates.md (bnd_mem_operator): Remove.
5867
5868 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
5869
5870 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
5871 vectors.
5872
5873 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
5874
5875 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
5876 the case in which the permute needs only a single element and
5877 repeats for every vector of the result. Extend that case to
5878 handle variable-length vectors.
5879 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5880
5881 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
5882
5883 PR debug/79342
5884 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
5885 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
5886
5887 2018-08-24 Richard Biener <rguenther@suse.de>
5888
5889 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
5890 bb_flags_allocated members.
5891 (auto_flag): New RAII class for allocating flags.
5892 (auto_edge_flag): New RAII class for allocating edge flags.
5893 (auto_bb_flag): New RAII class for allocating bb flags.
5894 * cfgloop.c (verify_loop_structure): Allocate temporary edge
5895 flag dynamically.
5896 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
5897 in favor of temporarily allocated BB flag.
5898 * hsa-brig.c: Re-order includes.
5899 * hsa-dump.c: Likewise.
5900 * hsa-regalloc.c: Likewise.
5901 * print-rtl.c: Likewise.
5902 * profile-count.c: Likewise.
5903
5904 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
5905
5906 PR target/86989
5907 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
5908 the TOC register.
5909
5910 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5911
5912 PR 87073/bootstrap
5913 * wide-int-range.cc (wide_int_range_div): Do not ignore result
5914 from wide_int_range_multiplicative_op.
5915
5916 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5917
5918 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
5919 "permutaion".
5920
5921 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
5922
5923 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
5924 to 'expanded'.
5925
5926 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
5927
5928 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
5929 full GENERIC expression used for replacement.
5930
5931 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
5932
5933 * tree-vrp.c (abs_extent_range): Remove.
5934 (extract_range_into_wide_ints): Pass wide ints by reference.
5935 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
5936 Pass wide ints by reference in all calls to
5937 extract_range_into_wide_ints.
5938 * wide-int-range.cc (wide_int_range_div): New.
5939 * wide-int-range.h (wide_int_range_div): New.
5940 (wide_int_range_includes_zero_p): New.
5941 (wide_int_range_zero_p): New.
5942
5943 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
5944
5945 * config/aarch64/aarch64.md (arches): New enum.
5946 (arch): New enum attr.
5947 (arch_enabled): New attr.
5948 (enabled): Now uses arch_enabled only.
5949 (simd, sve, fp16): Removed attribute.
5950 (fp): Attr now defined in terms of 'arch'.
5951 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
5952 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
5953 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
5954 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
5955 attributes into 'arch'.
5956 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
5957 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
5958 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
5959 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
5960 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
5961 'simd' attribute into 'arch'.
5962 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
5963 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
5964 Convert use of 'fp' attribute to 'arch'.
5965 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
5966 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
5967 into 'arch'.
5968 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
5969 (different modes) Merge 'fp' and 'simd' into 'arch'.
5970 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
5971 'simd' into 'arch'.
5972
5973 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
5974
5975 PR rtl-optimization/87026
5976 * expmed.c (canonicalize_comparison): If we can no longer create
5977 pseudoregisters, don't.
5978
5979 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
5980
5981 PR target/86951
5982 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
5983 prototype.
5984 * config/arm/arm.c (speculation_barrier_libfunc): New static
5985 variable.
5986 (arm_init_libfuncs): Initialize it.
5987 (arm_emit_speculation_barrier): New function.
5988 * config/arm/arm.md (speculation_barrier): Call
5989 arm_emit_speculation_barrier for architectures that do not have
5990 DSB or ISB.
5991 (speculation_barrier_insn): Only match on Armv7 or later.
5992
5993 2018-08-23 Richard Biener <rguenther@suse.de>
5994
5995 PR middle-end/87024
5996 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
5997 calls.
5998
5999 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6000
6001 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
6002 of single-vector TBLs.
6003 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
6004 one input is given.
6005
6006 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6007
6008 PR target/85910
6009 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
6010 aarch64_evpc_tbl guard.
6011
6012 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
6013
6014 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
6015 behaviour.
6016
6017 2018-08-22 Martin Sebor <msebor@redhat.com>
6018
6019 PR middle-end/87052
6020 * tree-pretty-print.c (pretty_print_string): Add argument.
6021 (dump_generic_node): Call to pretty_print_string with string size.
6022
6023 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
6024
6025 PR rtl-optimization/86771
6026 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
6027 of two SETs into those two SETs, one to be placed at i2, if that SETs
6028 destination is modified between i2 and i3.
6029
6030 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6031
6032 PR tree-optimization/86725
6033 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
6034 function.
6035 (vect_analyze_scalar_cycles_1): Check it.
6036
6037 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6038
6039 PR tree-optimization/86725
6040 * tree-vect-loop.c (vect_is_simple_reduction): When treating
6041 an outer loop phi as a double reduction, make sure that the
6042 single user of the phi result is an inner loop phi.
6043
6044 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6045
6046 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
6047 grouped stores with gaps to a strided group.
6048
6049 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6050
6051 * tree-vect-stmts.c (get_group_load_store_type)
6052 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
6053 first statement in a group.
6054
6055 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6056
6057 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
6058 the sequence used in gcc/gcc.c.
6059
6060 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6061
6062 PR other/704
6063 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
6064 building it.
6065
6066 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6067
6068 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
6069 Darwin10-specific unwinder-shim.
6070 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
6071 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
6072 New to cater for Darwin10 Rosetta.
6073
6074 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6075
6076 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
6077 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
6078
6079 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6080
6081 PR bootstrap/81033
6082 PR target/81733
6083 PR target/52795
6084 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
6085 (dwarf2out_switch_text_section): Generate a local label for the
6086 second function sub-section and apply it as the second FDE start
6087 label.
6088 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
6089 second sub-section start.
6090
6091 2018-08-22 Richard Biener <rguenther@suse.de>
6092
6093 PR tree-optimization/86988
6094 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
6095
6096 2018-08-22 Richard Biener <rguenther@suse.de>
6097
6098 PR tree-optimization/86945
6099 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
6100
6101 2018-08-22 Alexandre Oliva <oliva@adacore.com>
6102
6103 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
6104 a comment about how uses of r2 for .sdata2 come about.
6105
6106 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
6107
6108 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
6109
6110 2018-08-21 Marek Polacek <polacek@redhat.com>
6111
6112 PR c++/86981, Implement -Wpessimizing-move.
6113 * doc/invoke.texi: Document -Wpessimizing-move.
6114
6115 2018-08-21 Jan Hubicka <jh@suse.cz>
6116
6117 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
6118 * tree.h (is_redundant_typedef): Remove.
6119 * dwarf2out.c (is_redundant_typedef): Turn into static function.
6120
6121 2018-08-21 Jan Hubicka <jh@suse.cz>
6122
6123 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
6124 when possible.
6125
6126 2018-08-21 Tamar Christina <tamar.christina@arm.com>
6127
6128 * expmed.c (extract_low_bits): Reject invalid subregs early.
6129
6130 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6131
6132 PR middle-end/86121
6133 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
6134 behaviour.
6135
6136 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6137
6138 * config/vxworks.h: Guard vxworks_asm_out_constructor and
6139 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
6140 * config/vxworks.c: Likewise.
6141
6142 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6143
6144 * config/vxworks.c: Set targetm.have_ctors_dtors
6145 if HAVE_INITFINI_ARRAY_SUPPORT.
6146 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
6147 if HAVE_INITFINI_ARRAY_SUPPORT.
6148
6149 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6150
6151 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
6152 default search path for VxWorks < 7.
6153
6154 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6155
6156 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
6157 (get_format_string): Refer to c_getstr.
6158
6159 2018-08-21 Tom de Vries <tdevries@suse.de>
6160
6161 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6162 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6163 (debuginfo_early_stop): Declare.
6164 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6165 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6166 (debuginfo_early_stop): New function.
6167 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6168 and debuginfo_early_stop.
6169 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6170 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6171 (general_init): Call debuginfo_early_init.
6172 (finalize): Call debuginfo_fini.
6173 (do_compile): Call debuginfo_init.
6174 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6175 -fdump-early-debug.
6176 (@item -fdump-debug, @item -fdump-earlydebug): Add.
6177
6178 2018-08-21 Tom de Vries <tdevries@suse.de>
6179
6180 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6181 flag_dump_noaddr and flag_dump_unnumbered.
6182
6183 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
6184
6185 * wide-int-range.cc (wide_int_range_abs): New.
6186 (wide_int_range_order_set): Rename from wide_int_range_min_max.
6187 * wide-int-range.h (wide_int_range_abs): New.
6188 (wide_int_range_min_max): New.
6189 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6190 case to call wide_int_range_abs.
6191 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6192 (extract_range_from_abs_expr): Delete.
6193
6194 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
6195
6196 PR target/87033
6197 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6198 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6199 for indexed loads.
6200
6201 2018-08-20 Nathan Sidwell <nathan@acm.org>
6202 Jeff Law <law@redhat.com>
6203
6204 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6205 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6206
6207 2018-08-20 David Malcolm <dmalcolm@redhat.com>
6208
6209 PR other/84889
6210 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6211 (decl_attributes): Likewise.
6212 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6213 instance.
6214 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6215 * diagnostic-core.h (class auto_diagnostic_group): New class.
6216 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6217 (diagnostic_report_diagnostic): Handle the first diagnostics within
6218 a group.
6219 (emit_diagnostic): Add auto_diagnostic_group instance.
6220 (inform): Likewise.
6221 (inform_n): Likewise.
6222 (warning): Likewise.
6223 (warning_at): Likewise.
6224 (warning_n): Likewise.
6225 (pedwarn): Likewise.
6226 (permerror): Likewise.
6227 (error): Likewise.
6228 (error_n): Likewise.
6229 (error_at): Likewise.
6230 (sorry): Likewise.
6231 (fatal_error): Likewise.
6232 (internal_error): Likewise.
6233 (internal_error_no_backtrace): Likewise.
6234 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6235 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6236 * diagnostic.h (struct diagnostic_context): Add fields
6237 "diagnostic_group_nesting_depth",
6238 "diagnostic_group_emission_count", "begin_group_cb",
6239 "end_group_cb".
6240 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6241 Add auto_diagnostic_group instance(s).
6242 (find_explicit_erroneous_behavior): Likewise.
6243 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6244 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6245 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6246 (gimplify_va_arg_expr): Likewise.
6247 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6248 (HSA_SORRY_AT): Likewise.
6249 * ipa-devirt.c (compare_virtual_tables): Likewise.
6250 (warn_odr): Likewise.
6251 * multiple_target.c (expand_target_clones): Likewise.
6252 * opts-common.c (cmdline_handle_error): Likewise.
6253 * reginfo.c (globalize_reg): Likewise.
6254 * substring-locations.c (format_warning_n_va): Likewise.
6255 * tree-inline.c (expand_call_inline): Likewise.
6256 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6257 * tree-ssa-loop-niter.c
6258 (do_warn_aggressive_loop_optimizations): Likewise.
6259 * tree-ssa-uninit.c (warn_uninit): Likewise.
6260 * tree.c (warn_deprecated_use): Likewise.
6261
6262 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
6263
6264 PR target/87014
6265 * config/i386/i386.md (eh_return): Always update EH return
6266 address in word_mode.
6267
6268 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
6269
6270 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6271 TARGET_SPLIT_COMPLEX_ARG is defined.
6272
6273 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6274
6275 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6276
6277 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6278
6279 PR target/86984
6280 * expr.c (expand_assignment): Assert that bitpos is positive.
6281 (store_field): Likewise
6282 (expand_expr_real_1): Make sure that bitpos is positive.
6283 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6284 integer overflow.
6285
6286 2018-08-20 Nathan Sidwell <nathan@acm.org>
6287
6288 * Makefile.in (CPP_ID_DATA_H): Delete.
6289 (CPP_INTERNAL_H): Don't add it.
6290 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6291 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6292
6293 2018-08-20 Richard Biener <rguenther@suse.de>
6294
6295 PR tree-optimization/78655
6296 * tree-vrp.c (extract_range_from_binary_expr_1): Make
6297 pointer + offset nonnull if either operand is nonnull work.
6298
6299 2018-08-20 Tom de Vries <tdevries@suse.de>
6300
6301 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6302 unless the referenced die describes the added property using
6303 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
6304 Otherwise, add a DW_AT_location to the referenced die.
6305
6306 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
6307
6308 PR target/86994
6309 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6310 register_operand when calling ix86_set_reg_reg_cost.
6311 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6312 Set *total to 0 for operands that satisfy x86_64_immediate_operand
6313 predicate and to 1 otherwise.
6314
6315 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
6316
6317 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6318 emit a diagnostic that it is not supported and reset the option.
6319 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6320 supported and consume the option. (ASM_FINAL_SPEC): New.
6321
6322 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6323
6324 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6325 a sentence.
6326
6327 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
6328
6329 C-SKY port: Documentation
6330
6331 * doc/extend.texi (C-SKY Function Attributes): New section.
6332 * doc/invoke.texi (Option Summary): Add C-SKY options.
6333 (C-SKY Options): New section.
6334 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6335
6336 2018-08-17 Jojo <jijie_rong@c-sky.com>
6337 Huibin Wang <huibin_wang@c-sky.com>
6338 Sandra Loosemore <sandra@codesourcery.com>
6339 Chung-Lin Tang <cltang@codesourcery.com>
6340
6341 C-SKY port: Backend implementation
6342
6343 * config/csky/*: New.
6344 * common/config/csky/*: New.
6345
6346 2018-08-17 Jojo <jijie_rong@c-sky.com>
6347 Huibin Wang <huibin_wang@c-sky.com>
6348 Sandra Loosemore <sandra@codesourcery.com>
6349 Chung-Lin Tang <cltang@codesourcery.com>
6350 Andrew Jenner <andrew@codesourcery.com>
6351
6352 C-SKY port: Configury
6353
6354 * config.gcc (csky-*-*): New.
6355 * configure.ac: Add csky to targets for dwarf2 debug_line support.
6356 * configure: Regenerated.
6357
6358 2018-08-17 David Malcolm <dmalcolm@redhat.com>
6359
6360 * dump-context.h: Include "dumpfile.h".
6361 (dump_context::dump_printf_va): Convert final param from va_list
6362 to va_list *. Convert from ATTRIBUTE_PRINTF to
6363 ATTRIBUTE_GCC_DUMP_PRINTF.
6364 (dump_context::dump_printf_loc_va): Likewise.
6365 * dumpfile.c: Include "stringpool.h".
6366 (make_item_for_dump_printf_va): Delete.
6367 (make_item_for_dump_printf): Delete.
6368 (class dump_pretty_printer): New class.
6369 (dump_pretty_printer::dump_pretty_printer): New ctor.
6370 (dump_pretty_printer::emit_items): New member function.
6371 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6372 function.
6373 (dump_pretty_printer::emit_item): New member function.
6374 (dump_pretty_printer::stash_item): New member function.
6375 (dump_pretty_printer::format_decoder_cb): New member function.
6376 (dump_pretty_printer::decode_format): New member function.
6377 (dump_context::dump_printf_va): Reimplement in terms of
6378 dump_pretty_printer.
6379 (dump_context::dump_printf_loc_va): Convert final param from va_list
6380 to va_list *.
6381 (dump_context::begin_scope): Reimplement call to
6382 make_item_for_dump_printf.
6383 (dump_printf): Update for change to dump_printf_va.
6384 (dump_printf_loc): Likewise.
6385 (selftest::test_capture_of_dump_calls): Convert "stmt" from
6386 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
6387 with %T, %E, and %G.
6388 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6389 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6390 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6391 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6392 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6393 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6394 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6395 within a dump_printf_loc call to "%wu".
6396 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6397 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
6398 missing space after "=".
6399 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6400 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6401 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6402 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6403 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
6404 duplicate "vectorized" from message.
6405
6406 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
6407
6408 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6409 polyNxK_t element's TYPE_STRING_FLAG.
6410
6411 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6412
6413 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
6414 (they were unnamed before). Fix comments.
6415
6416 2018-08-17 Nathan Sidwell <nathan@acm.org>
6417
6418 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
6419
6420 2018-08-17 Richard Biener <rguenther@suse.de>
6421
6422 PR tree-optimization/86841
6423 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6424
6425 2018-08-17 Martin Liska <mliska@suse.cz>
6426
6427 * common.opt: Remove Warn, Init and Report for options with
6428 Ignore/Deprecated flag. Warning is done automatically for
6429 Deprecated flags.
6430 * config/i386/i386.opt: Likewise.
6431 * config/ia64/ia64.opt: Likewise.
6432 * config/rs6000/rs6000.opt: Likewise.
6433 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
6434 Remove usage of flag_check_pointer_bounds.
6435 * lto-wrapper.c (merge_and_complain): Do not handle
6436 OPT_fcheck_pointer_bounds.
6437 (append_compiler_options): Likewise.
6438 * opt-functions.awk: Do not handle Deprecated.
6439 * optc-gen.awk: Check that Var, Report and Init are not
6440 used for an option with Ignore/Deprecated flag.
6441 * opts-common.c (decode_cmdline_option): Do not report
6442 CL_ERR_DEPRECATED.
6443 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
6444 options.
6445 * opts.h (struct cl_option): Remove cl_deprecated flag.
6446 (CL_ERR_DEPRECATED): Remove error enum value.
6447
6448 2018-08-17 Richard Biener <rguenther@suse.de>
6449
6450 PR middle-end/86505
6451 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
6452 across a va-arg-pack using call adjust its return value accordingly.
6453
6454 2018-08-16 Martin Sebor <msebor@redhat.com>
6455
6456 PR tree-optimization/86853
6457 * gimple-ssa-sprintf.c (struct format_result): Rename member.
6458 (struct fmtresult): Add member and initialize it in ctors.
6459 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
6460 (format_string): Handle %S the same as %ls. Set MAYFAIL.
6461 (format_directive): Set POSUNDER4K when MAYFAIL is set.
6462 (parse_directive): Handle %C same as %c.
6463 (sprintf_dom_walker::compute_format_length): Adjust.
6464 (is_call_safe): Adjust.
6465
6466 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6467
6468 * builtins.c (c_strlen): Add new parameter eltsize. Use it
6469 for determining how to count the elements.
6470 * builtins.h (c_strlen): Adjust prototype.
6471 * expr.c (string_constant): Add new parameter mem_size.
6472 Set *mem_size appropriately.
6473 * expr.h (string_constant): Adjust protoype.
6474 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
6475 * gimple-fold.h (get_range_strlen): Adjust prototype.
6476 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
6477 (format_string): Call get_string_length with eltsize.
6478
6479 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6480
6481 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
6482 to emit the span, rather than setting it as the prefix.
6483
6484 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6485
6486 * diagnostic-show-locus.c (layout::start_annotation_line): Add
6487 "margin_char" parameter, defaulting to space. Use it in place
6488 of pp_space for the initial part of the margin.
6489 (layout::print_leading_fixits): Use '+' when filling the margin
6490 of line-insertion fix-it hints.
6491
6492 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6493
6494 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
6495 Delete.
6496
6497 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6498
6499 * config/rs6000/altivec.md: Don't set length attribute to the default
6500 value.
6501 * config/rs6000/darwin.md: Ditto.
6502 * config/rs6000/dfp.md: Ditto.
6503 * config/rs6000/htm.md: Ditto.
6504 * config/rs6000/rs6000.md: Ditto.
6505 * config/rs6000/sync.md: Ditto.
6506 * config/rs6000/vsx.md: Ditto.
6507
6508 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6509
6510 * config/rs6000/altivec.md: Don't set length attribute to the default
6511 value, for branch instructions.
6512 * config/rs6000/darwin.md: Ditto.
6513 * config/rs6000/rs6000.md: Ditto.
6514
6515 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6516
6517 * config/rs6000/rs6000.md (length): Always define as const_int 4.
6518 (unnamed conditional branch define_insn): Set length to 4 or 8
6519 depending on offset.
6520 (<bd>_<mode>): Similar, for alternative 0.
6521 (<bd>tf_<mode>): Ditto.
6522
6523 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6524
6525 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
6526
6527 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
6528
6529 * doc/rtl.texi: Replace old RTX class names with new names.
6530
6531
6532 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
6533
6534 * expmed.h (canonicalize_comparison): New declaration.
6535 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
6536 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
6537 * optabs.c (prepare_cmp_insn): Likewise.
6538 * rtl.h (unsigned_condition_p): New function which checks if a
6539 comparison operator is unsigned.
6540
6541 2018-08-16 Nathan Sidwell <nathan@acm.org>
6542
6543 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
6544 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
6545
6546 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6547
6548 PR target/84711
6549 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
6550 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
6551 (mov<mov>): ..this and enable unconditionally.
6552
6553 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6554
6555 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
6556
6557 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
6558
6559 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
6560 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
6561 "Common" with "Target".
6562
6563 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6564
6565 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
6566 * doc/invoke.texi (mmitigate-rop): Remove.
6567 * config/i386/i386.c: Do not include "regrename.h".
6568 (ix86_rop_should_change_byte_p, reg_encoded_number)
6569 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
6570 Remove.
6571 (ix86_reorg): Remove call to ix86_mitigate_rop.
6572 * config/i386/i386.md (attr "modrm_class"): Remove.
6573 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
6574 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
6575 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
6576
6577 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
6578
6579 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
6580 allow folding of mergeh() and mergel() for the float and double types.
6581 (fold_mergehl_helper): Rework to handle building a permute tree
6582 for float vectors.
6583
6584 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6585
6586 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
6587 for TARGET_SSE.
6588
6589 2018-08-15 David Malcolm <dmalcolm@redhat.com>
6590
6591 * common.opt (fdiagnostics-show-labels): New option.
6592 * diagnostic-show-locus.c (class layout_range): Add field
6593 "m_label".
6594 (class layout): Add field "m_show_labels_p".
6595 (layout_range::layout_range): Add param "label" and use it to
6596 initialize m_label.
6597 (make_range): Pass in NULL for new "label" param of layout_range's
6598 ctor.
6599 (layout::layout): Initialize m_show_labels_p.
6600 (layout::maybe_add_location_range): Pass in loc_range->m_label
6601 when constructing layout_range instances.
6602 (struct line_label): New struct.
6603 (layout::print_any_labels): New member function.
6604 (layout::print_line): Call it if label-printing is enabled.
6605 (selftest::test_one_liner_labels): New test.
6606 (selftest::test_diagnostic_show_locus_one_liner): Call it.
6607 * diagnostic.c (diagnostic_initialize): Initialize
6608 context->show_labels_p.
6609 * diagnostic.h (struct diagnostic_context): Add field
6610 "show_labels_p".
6611 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6612 -fno-diagnostics-show-labels.
6613 * dwarf2out.c (gen_producer_string): Add
6614 OPT_fdiagnostics_show_labels to the ignored options.
6615 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
6616 param.
6617 (gcc_rich_location::maybe_add_expr): Likewise.
6618 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
6619 label" param, defaulting to NULL.
6620 (gcc_rich_location::add_expr): Add "label" param.
6621 (gcc_rich_location::maybe_add_expr): Likewise.
6622 (class text_range_label): New class.
6623 (class range_label_for_type_mismatch): New class.
6624 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
6625 of format_warning_va.
6626 (fmtwarn_n): Likewise for new params of format_warning_n_va.
6627 * lto-wrapper.c (merge_and_complain): Add
6628 OPT_fdiagnostics_show_labels to the "pick one setting" options.
6629 (append_compiler_options): Likewise to the dropped options.
6630 (append_diag_options): Likewise to the passed-on options.
6631 * opts.c (common_handle_option): Handle the new option.
6632 * selftest-diagnostic.c
6633 (test_diagnostic_context::test_diagnostic_context): Enable
6634 show_labels_p.
6635 * substring-locations.c: Include "gcc-rich-location.h".
6636 (format_warning_n_va): Add "fmt_label" and "param_label" params
6637 and use them as appropriate.
6638 (format_warning_va): Add "fmt_label" and "param_label" params,
6639 passing them on to format_warning_n_va.
6640 (format_warning_at_substring): Likewise.
6641 (format_warning_at_substring_n): Likewise.
6642 * substring-locations.h (format_warning_va): Add "fmt_label" and
6643 "param_label" params.
6644 (format_warning_n_va): Likewise.
6645 (format_warning_at_substring): Likewise.
6646 (format_warning_at_substring_n): Likewise.
6647 * toplev.c (general_init): Initialize global_dc->show_labels_p.
6648
6649 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
6650
6651 PR testsuite/86519
6652 * builtins.c (expand_builtin_memcmp): Do not expand the call
6653 when overflow is detected.
6654
6655 2018-08-15 Martin Sebor <msebor@redhat.com>
6656
6657 PR tree-optimization/71625
6658 * config/aarch64/aarch64-builtins.c
6659 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
6660
6661 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
6662
6663 * config/s390/s390.c (s390_reorg): Remove loop.
6664
6665 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6666
6667 * config/darwin.c
6668 (darwin_function_switched_text_sections): Delete.
6669 * gcc/config/darwin.h
6670 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
6671
6672 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6673
6674 PR target/81685
6675 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
6676 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
6677 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
6678
6679 2018-08-15 Martin Liska <mliska@suse.cz>
6680
6681 PR tree-optimization/86925
6682 * predict.c (expr_expected_value_1): When taking
6683 later predictor, assign also probability.
6684 Use fold_build2_initializer_loc in order to fold
6685 the expression in -frounding-math.
6686
6687 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
6688
6689 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
6690 patterns.
6691 (expand_vec_perm_1): Try the new method.
6692
6693 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
6694
6695 PR target/86547
6696 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
6697 Check whether lra_live_max_point is 0 before dividing.
6698
6699 2018-08-14 Martin Sebor <msebor@redhat.com>
6700
6701 PR tree-optimization/86650
6702 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
6703 (vrp_prop::check_mem_ref): Same.
6704
6705 2018-08-13 Liu Hao <lh_mouse@126.com>
6706
6707 * pretty-print.c (eat_esc_sequence): Swap the foreground and
6708 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
6709 and clear it thereafter, as it only works for DBCS.
6710
6711 2018-08-13 Liu Hao <lh_mouse@126.com>
6712
6713 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
6714 handle returned by _get_osf_handle().
6715
6716 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6717
6718 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
6719 for folding vec_perm.
6720
6721 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6722
6723 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
6724 Add support for gimple-folding of vec_pack() and vec_unpack()
6725 intrinsics.
6726
6727 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6728
6729 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
6730 vec_xst variants to the list.
6731 (rs6000_gimple_fold_builtin): Add support for folding unaligned
6732 vector loads and stores.
6733
6734 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
6735
6736 * config.gcc (rs6000-ibm-aix4.x): Delete.
6737 (rs6000-ibm-aix5.1): Delete.
6738 (rs6000-ibm-aix5.2): Delete.
6739 (rs6000-ibm-aix5.3): Delete.
6740 * config/rs6000/aix43.h: Delete.
6741 * config/rs6000/aix51.h: Delete.
6742 * config/rs6000/aix52.h: Delete.
6743 * config/rs6000/t-aix43: Delete.
6744
6745 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
6746
6747 * config/s390/s390.c (s390_decompose_constant_pool_ref):
6748 New function.
6749 (s390_decompose_address): Factor out constant pool ref
6750 decomposition.
6751
6752 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6753
6754 * config/nds32/nds32-predicates.c
6755 (nds32_can_use_bclr_p): Change return type as bool.
6756 (nds32_can_use_bset_p): Ditto.
6757 (nds32_can_use_btgl_p): Ditto.
6758 (nds32_can_use_bitci_p): Ditto.
6759 * config/nds32/nds32-protos.h
6760 (nds32_can_use_bclr_p): Change declaration.
6761 (nds32_can_use_bset_p): Ditto.
6762 (nds32_can_use_btgl_p): Ditto.
6763 (nds32_can_use_bitci_p): Ditto.
6764
6765 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6766
6767 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
6768 Support -msched-prolog-epilog option.
6769 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
6770
6771 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6772
6773 * common/config/nds32/nds32-common.c
6774 (nds32_option_optimization_table): Enalbe -malways-align.
6775
6776 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6777
6778 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
6779 extra_headers.
6780 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
6781 OPT_misr_secure_ case.
6782 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
6783 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
6784 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
6785 secure attribute.
6786 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
6787 (nds32_isr_info): New field security_level.
6788 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
6789 * config/nds32/nds32.md (return_internal): Consider critical attribute.
6790 * config/nds32/nds32.opt (misr-secure): New option.
6791 * config/nds32/nds32_init.inc: New file.
6792 * config/nds32/nds32_isr.h: New file.
6793
6794 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
6795
6796 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
6797 Update comment for atomic instructions.
6798 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
6799 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
6800 Remove.
6801 (atomic_loaddi): Revise fence expansion to only emit fence prior to
6802 load for __ATOMIC_SEQ_CST model.
6803 (atomic_loaddi_1): Remove float register target.
6804 (atomic_storedi): Handle CONST_INT values.
6805 (atomic_storedi_1): Remove float register source. Add special case
6806 for zero value.
6807 (memory_barrier): New expander and insn.
6808
6809 2018-08-11 Jakub Jelinek <jakub@redhat.com>
6810
6811 PR tree-optimization/86835
6812 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
6813 new_stmt after def_gsi, make sure to insert new_square_stmt after
6814 that stmt, not 2 stmts before it.
6815
6816 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
6817
6818 PR target/82418
6819 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
6820 instead of SWI48.
6821
6822 2018-08-10 Martin Liska <mliska@suse.cz>
6823
6824 PR target/83610
6825 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
6826 function type.
6827 * builtins.c (expand_builtin_expect_with_probability):
6828 New function.
6829 (expand_builtin_expect_with_probability): New function.
6830 (build_builtin_expect_predicate): Add new argumnet probability
6831 for BUILT_IN_EXPECT_WITH_PROBABILITY.
6832 (fold_builtin_expect):
6833 (fold_builtin_2):
6834 (fold_builtin_3):
6835 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
6836 * builtins.h (fold_builtin_expect): Set new argument.
6837 * doc/extend.texi: Document __builtin_expect_with_probability.
6838 * doc/invoke.texi: Likewise.
6839 * gimple-fold.c (gimple_fold_call): Pass new argument.
6840 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
6841 also BUILT_IN_EXPECT_WITH_PROBABILITY.
6842 * predict.c (get_predictor_value): New function.
6843 (expr_expected_value): Add new argument probability. Assume
6844 that predictor and probability are always non-null.
6845 (expr_expected_value_1): Likewise. For __builtin_expect and
6846 __builtin_expect_with_probability set probability. Handle
6847 combination in binary expressions.
6848 (tree_predict_by_opcode): Simplify code by simply calling
6849 get_predictor_value.
6850 (pass_strip_predict_hints::execute): Add handling of
6851 BUILT_IN_EXPECT_WITH_PROBABILITY.
6852 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
6853 new predictor.
6854 * tree.h (DECL_BUILT_IN_P): New function.
6855
6856 2018-08-10 Martin Liska <mliska@suse.cz>
6857
6858 PR tree-optimization/85799
6859 * passes.def: Add argument for pass_strip_predict_hints.
6860 * predict.c (class pass_strip_predict_hints): Add new argument
6861 early_p.
6862 (strip_predictor_early): New function.
6863 (pass_strip_predict_hints::execute): Call the function to
6864 strip predictors.
6865 (strip_predict_hints): New function.
6866 * predict.def: Fix comment.
6867
6868 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
6869
6870 * Makefile.in: Clarify which tm.texi to copy over to assert the
6871 right to grant a GFDL license for all.
6872
6873 2018-08-09 Jeff Law <law@redhat.com>
6874
6875 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
6876 unused variable.
6877
6878 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
6879
6880 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
6881 prototype.
6882
6883 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6884
6885 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
6886 reductions for variable-length vectors.
6887
6888 2018-08-09 David Malcolm <dmalcolm@redhat.com>
6889
6890 PR other/84889
6891 * common.opt (fdiagnostics-show-line-numbers): New option.
6892 * diagnostic-show-locus.c (class layout): Add fields
6893 "m_show_line_numbers_p" and "m_linenum_width";
6894 (num_digits): New function.
6895 (test_num_digits): New function.
6896 (layout::layout): Initialize new fields. Update m_x_offset
6897 logic to handle any left margin.
6898 (layout::print_source_line): Print line number when requested.
6899 (layout::start_annotation_line): New member function.
6900 (layout::print_annotation_line): Call it.
6901 (layout::print_leading_fixits): Likewise.
6902 (layout::print_trailing_fixits): Likewise. Update calls to
6903 move_to_column for new parameter.
6904 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
6905 it to potentially call start_annotation_line.
6906 (layout::show_ruler): Call start_annotation_line.
6907 (selftest::test_line_numbers_multiline_range): New selftest.
6908 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
6909 and selftest::test_line_numbers_multiline_range.
6910 * diagnostic.c (diagnostic_initialize): Initialize
6911 show_line_numbers_p.
6912 * diagnostic.h (struct diagnostic_context): Add field
6913 "show_line_numbers_p".
6914 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6915 -fno-diagnostics-show-line-numbers.
6916 * dwarf2out.c (gen_producer_string): Add
6917 OPT_fdiagnostics_show_line_numbers to the ignored options.
6918 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
6919 one setting" options.
6920 (append_compiler_options): Likewise to the dropped options.
6921 (append_diag_options): Likewise to the passed-on options.
6922 * opts.c (common_handle_option): Handle the new option.
6923 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
6924
6925 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
6926
6927 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
6928 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
6929 third argument of type "const signed char" to descriptions of
6930 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
6931 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
6932 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
6933 __builtin_bcdsub_ov functions.
6934
6935 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6936
6937 PR tree-optimization/86858
6938 * tree-vect-loop.c (vect_is_simple_reduction): Restore
6939 flow_bb_inside_loop_p calls.
6940
6941 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6942
6943 PR tree-optimization/86871
6944 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
6945 instead of gimple_assign_lhs.
6946
6947 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
6948
6949 PR target/86887
6950 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
6951 register constraint to operand 0.
6952 (add<mode>3_carryinC): Likewise.
6953 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
6954
6955 2018-08-09 Martin Liska <mliska@suse.cz>
6956
6957 PR c/86895
6958 * common.opt: Remove extra line.
6959
6960 2018-08-09 Martin Liska <mliska@suse.cz>
6961
6962 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
6963 at the end of a line, make first letter capital and end up
6964 a sentence with a dot.
6965 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
6966 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
6967 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
6968 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
6969 (PARAM_MAX_ISL_OPERATIONS): Likewise.
6970 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
6971 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
6972 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
6973 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
6974 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
6975 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
6976 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
6977 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
6978 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
6979 (PARAM_TREE_REASSOC_WIDTH): Likewise.
6980 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
6981 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
6982 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
6983
6984 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
6985
6986 PR target/84332
6987 * config/s390/s390.c (s390_option_override_internal): Reduce the
6988 stack-clash-protection-probe-interval param if it would be too big
6989 for z900.
6990
6991 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
6992
6993 PR target/46179
6994 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
6995 * config/m68k/m68k.c (handle_move_double): Don't call
6996 m68k_final_prescan_insn.
6997 (m68k_adjust_decorated_operand): Renamed from
6998 m68k_final_prescan_insn, remove first and third operand and
6999 simplify.
7000 (print_operand): Call it.
7001 (print_operand_address): Call it.
7002
7003 2018-08-08 Nathan Sidwell <nathan@acm.org>
7004
7005 * diagnostic.c (diagnostic_report_current_module): Use
7006 linemap_included_from & linemap_included_from_linemap.
7007
7008 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
7009
7010 * config/aarch64/aarch64-cores.def: Add phecda core.
7011 * config/aarch64/aarch64-tune.md: Regenerate.
7012 * doc/invoke.texi: Add phecda core.
7013
7014 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7015
7016 PR target/85295
7017 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
7018 definitions.
7019 * config/s390/s390.md ("movti"): Add more alternatives for
7020 constant to GPR copies.
7021
7022 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7023
7024 * config/s390/s390.c: Fix whitespace damage throughout the file.
7025 * config/s390/s390.h: Likewise.
7026 * config/s390/tpf.h: Likewise.
7027
7028 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7029
7030 * config/s390/s390.c (s390_loadrelative_operand_p):
7031 Remove TARGET_CPU_ZARCH usages.
7032 (s390_rtx_costs): Likewise.
7033 (s390_legitimate_constant_p): Likewise.
7034 (s390_cannot_force_const_mem): Likewise.
7035 (legitimate_reload_constant_p): Likewise.
7036 (s390_preferred_reload_class): Likewise.
7037 (legitimize_pic_address): Likewise.
7038 (legitimize_tls_address): Likewise.
7039 (s390_split_branches): Removed.
7040 (s390_add_execute): Removed.
7041 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
7042 (s390_mainpool_start): Likewise.
7043 (s390_mainpool_finish): Likewise.
7044 (s390_mainpool_cancel): Removed.
7045 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
7046 (s390_chunkify_cancel): Likewise.
7047 (s390_return_addr_rtx): Likewise.
7048 (s390_register_info): Remove split_branches_pending_p uages.
7049 (s390_optimize_register_info): Likewise.
7050 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
7051 split_branches_pending_p usages.
7052 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
7053 (s390_load_got): Likewise.
7054 (s390_expand_split_stack_prologue): Likewise.
7055 (output_asm_nops): Likewise.
7056 (s390_function_profiler): Likewise.
7057 (s390_emit_call): Likewise.
7058 (s390_conditional_register_usage): Likewise.
7059 (s390_optimize_prologue): Likewise.
7060 (s390_reorg): Remove TARGET_CPU_ZARCH and
7061 split_branches_pending_p usages.
7062 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
7063 usages.
7064 (s390_output_indirect_thunk_function): Likewise.
7065 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
7066 (TARGET_CPU_ZARCH_P): Removed.
7067 (struct machine_function): Remove split_branches_pending_p.
7068 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
7069
7070 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7071
7072 * common/config/s390/s390-common.c (processor_flags_table):
7073 Remove flags.
7074 * config.gcc: Remove with_arch/with_tune support.
7075 * config/s390/2064.md: Remove cpu attribute comparisons.
7076 * config/s390/driver-native.c (s390_host_detect_local_cpu):
7077 Remove MTN.
7078 * config/s390/linux.h (ASM_SPEC):
7079 Remove -march support.
7080 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
7081 Use a table to get an arch level.
7082 * config/s390/s390-opts.h (enum processor_type):
7083 Remove enum values.
7084 * config/s390/s390.c
7085 (processor_table): Remove entries, add arch_level values.
7086 (s390_issue_rate): Remove cases.
7087 (s390_option_override): Adjust
7088 s390_option_override_internal() call.
7089 (s390_option_override_internal): Remove deprecation warning.
7090 (s390_valid_target_attribute_tree): Adjust
7091 s390_option_override_internal() call.
7092 * config/s390/s390.h (struct s390_processor):
7093 Share with s390-c.c, add arch_level field.
7094 * config/s390/s390.md:
7095 Remove occurrences in cpu attribute.
7096 * config/s390/s390.opt: Remove -march/-mtune support.
7097 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
7098 * doc/invoke.texi: Remove deprecation warning.
7099
7100 2018-08-08 Luis Machado <luis.machado@linaro.org>
7101
7102 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
7103 global.
7104 (qdf24xx_tunings): Set vector cost structure to
7105 qdf24xx_vector_cost.
7106
7107 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
7108 <register_sextend>: Set to 3.
7109
7110 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
7111
7112 PR target/86838
7113 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
7114 * config/aarch64/aarch64-simd.md
7115 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
7116 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
7117 (aarch64_frecpx<mode>): ...this new pattern.
7118 * config/aarch64/aarch64-simd-builtins.def: Remove comment
7119 about aarch64_frecp<FRECP:frecp_suffix><mode>.
7120
7121 2018-08-07 Martin Liska <mliska@suse.cz>
7122
7123 PR middle-end/83023
7124 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
7125 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
7126 * predict.def (PRED_MALLOC_NONNULL): New predictor.
7127 * doc/extend.texi: Document that malloc attribute adds
7128 hit to compiler.
7129
7130 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
7131
7132 PR target/86785
7133 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7134 Define to speculation_safe_value_not_needed.
7135
7136 2018-08-06 Jeff Law <law@redhat.com>
7137
7138 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
7139 the vr_values instance to cprop_into_stmt.
7140 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
7141 (cprop_operand): Also query EVRP to determine if OP is a constant.
7142
7143 2018-08-06 Nathan Sidwell <nathan@acm.org>
7144
7145 * diagnostic.c (diagnostic_report_current_module): Reroll
7146 included-at loop. Translate text.
7147
7148 2018-08-06 David Malcolm <dmalcolm@redhat.com>
7149
7150 * function-tests.c (selftest::test_expansion_to_rtl): Call
7151 free_after_compilation.
7152
7153 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7154
7155 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
7156
7157 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
7158
7159 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7160 loops with memory block operations from getting unrolled.
7161
7162 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
7163
7164 PR target/86807
7165 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7166 Define to speculation_safe_value_not_needed.
7167
7168 2018-08-06 Jeff Law <law@redhat.com>
7169
7170 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7171 assert.
7172
7173 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7174
7175 PR target/86662
7176 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7177 with all enabled __intN types.
7178
7179 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7180
7181 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7182
7183 * alias.c (record_set): Check for clobber high.
7184 * cfgexpand.c (expand_gimple_stmt): Likewise.
7185 * combine-stack-adj.c (single_set_for_csa): Likewise.
7186 * combine.c (find_single_use_1): Likewise.
7187 (set_nonzero_bits_and_sign_copies): Likewise.
7188 (get_combine_src_dest): Likewise.
7189 (is_parallel_of_n_reg_sets): Likewise.
7190 (try_combine): Likewise.
7191 (record_dead_and_set_regs_1): Likewise.
7192 (reg_dead_at_p_1): Likewise.
7193 (reg_dead_at_p): Likewise.
7194 * dce.c (deletable_insn_p): Likewise.
7195 (mark_nonreg_stores_1): Likewise.
7196 (mark_nonreg_stores_2): Likewise.
7197 * df-scan.c (df_find_hard_reg_defs): Likewise.
7198 (df_uses_record): Likewise.
7199 (df_get_call_refs): Likewise.
7200 * dwarf2out.c (mem_loc_descriptor): Likewise.
7201 * haifa-sched.c (haifa_classify_rtx): Likewise.
7202 * ira-build.c (create_insn_allocnos): Likewise.
7203 * ira-costs.c (scan_one_insn): Likewise.
7204 * ira.c (equiv_init_movable_p): Likewise.
7205 (rtx_moveable_p): Likewise.
7206 (interesting_dest_for_shprep): Likewise.
7207 * jump.c (mark_jump_label_1): Likewise.
7208 * postreload-gcse.c (record_opr_changes): Likewise.
7209 * postreload.c (reload_cse_simplify): Likewise.
7210 (struct reg_use): Add source expr.
7211 (reload_combine): Check for clobber high.
7212 (reload_combine_note_use): Likewise.
7213 (reload_cse_move2add): Likewise.
7214 (move2add_note_store): Likewise.
7215 * print-rtl.c (print_pattern): Likewise.
7216 * recog.c (decode_asm_operands): Likewise.
7217 (store_data_bypass_p): Likewise.
7218 (if_test_bypass_p): Likewise.
7219 * regcprop.c (kill_clobbered_value): Likewise.
7220 (kill_set_value): Likewise.
7221 * reginfo.c (reg_scan_mark_refs): Likewise.
7222 * reload1.c (maybe_fix_stack_asms): Likewise.
7223 (eliminate_regs_1): Likewise.
7224 (elimination_effects): Likewise.
7225 (mark_not_eliminable): Likewise.
7226 (scan_paradoxical_subregs): Likewise.
7227 (forget_old_reloads_1): Likewise.
7228 * reorg.c (find_end_label): Likewise.
7229 (try_merge_delay_insns): Likewise.
7230 (redundant_insn): Likewise.
7231 (own_thread_p): Likewise.
7232 (fill_simple_delay_slots): Likewise.
7233 (fill_slots_from_thread): Likewise.
7234 (dbr_schedule): Likewise.
7235 * resource.c (update_live_status): Likewise.
7236 (mark_referenced_resources): Likewise.
7237 (mark_set_resources): Likewise.
7238 * rtl.c (copy_rtx): Likewise.
7239 * rtlanal.c (reg_referenced_p): Likewise.
7240 (single_set_2): Likewise.
7241 (noop_move_p): Likewise.
7242 (note_stores): Likewise.
7243 * sched-deps.c (sched_analyze_reg): Likewise.
7244 (sched_analyze_insn): Likewise.
7245
7246 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7247
7248 * cse.c (invalidate_reg): New function extracted from...
7249 (invalidate): ...here.
7250 (canonicalize_insn): Check for clobber high.
7251 (invalidate_from_clobbers): invalidate clobber highs.
7252 (invalidate_from_sets_and_clobbers): Likewise.
7253 (count_reg_usage): Check for clobber high.
7254 (insn_live_p): Likewise.
7255 * cselib.c (cselib_expand_value_rtx_1):Likewise.
7256 (cselib_invalidate_regno): Check for clobber in setter.
7257 (cselib_invalidate_rtx): Pass through setter.
7258 (cselib_invalidate_rtx_note_stores):
7259 (cselib_process_insn): Check for clobber high.
7260 * cselib.h (cselib_invalidate_rtx): Add operand.
7261
7262 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7263
7264 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7265 (mark_not_eliminable): Likewise.
7266 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7267 * lra-lives.c (process_bb_lives): Check for clobber high.
7268 * lra.c (new_insn_reg): Remember clobber highs.
7269 (collect_non_operand_hard_regs): Check for clobber high.
7270 (lra_set_insn_recog_data): Likewise.
7271 (add_regs_to_insn_regno_info): Likewise.
7272 (lra_update_insn_regno_info): Likewise.
7273
7274 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7275
7276 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7277 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7278
7279 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7280
7281 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7282 (copy_insn_1): Likewise.
7283 (gen_hard_reg_clobber_high): New gen function.
7284 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7285 * genemit.c (gen_exp): Likewise.
7286 (gen_emit_seq): Pass through info.
7287 (gen_insn): Check for CLOBBER_HIGH.
7288 (gen_expand): Pass through info.
7289 (gen_split): Likewise.
7290 (output_add_clobbers): Likewise.
7291 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7292 (remove_clobbers): Likewise.
7293 * rtl.h (gen_hard_reg_clobber_high): New declaration.
7294
7295 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7296
7297 * doc/rtl.texi (clobber_high): Add.
7298 (parallel): Add in clobber high
7299 * rtl.c (rtl_check_failed_code3): Add function.
7300 * rtl.def (CLOBBER_HIGH): Add expression.
7301 * rtl.h (RTL_CHECKC3): Add macro.
7302 (rtl_check_failed_code3): Add declaration.
7303 (XC3EXP): Add macro.
7304
7305 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
7306
7307 PR target/86386
7308 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7309 cfun->machine->max_used_stack_alignment if needed.
7310
7311 2018-08-04 Martin Sebor <msebor@redhat.com>
7312
7313 PR tree-optimization/86571
7314 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7315 NaN output to 4.
7316
7317 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
7318
7319 PR target/86799
7320 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7321 Define.
7322
7323 2018-08-03 Jeff Law <law@redhat.com>
7324
7325 PR target/86795
7326 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7327 Define to speculation_safe_value_not_needed.
7328
7329 2018-08-03 David Malcolm <dmalcolm@redhat.com>
7330
7331 * doc/gcov.texi (-x): Remove duplicate "to".
7332 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7333 (-Wif-not-aligned): Remove duplicate "is".
7334 (-flto): Remove duplicate "the".
7335 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7336 duplicate "v5.00.b".
7337 (MSP430 Options): Remove duplicate "and" from the description
7338 of "-mgprel-sec=regexp".
7339 (x86 Options): Remove duplicate copies of "vmldLog102" and
7340 vmlsLog104 from description of "-mveclibabi=type".
7341
7342 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
7343
7344 * internal-fn.h (first_commutative_argument): Declare.
7345 * internal-fn.c (first_commutative_argument): New function.
7346 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7347 restrictions for pattern statements. Use first_commutative_argument
7348 to look for commutative operands in calls to internal functions.
7349
7350 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
7351
7352 * Makefile.in (wide-int-range.o): New.
7353 * tree-vrp.c: Move all the wide_int_* functions to...
7354 * wide-int-range.cc: ...here.
7355 * tree-vrp.h: Move all the wide_int_* prototypes to...
7356 * wide-int-range.h: ...here.
7357
7358 2018-08-03 Tom de Vries <tdevries@suse.de>
7359
7360 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7361 UI_NONE.
7362 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7363 * except.c (output_function_exception_table): Do early exit if
7364 targetm_common.except_unwind_info (&global_options) == UI_NONE.
7365
7366 2018-08-03 Martin Liska <mliska@suse.cz>
7367
7368 * predict.c (dump_prediction): Change to 2 digits
7369 in fraction part.
7370
7371 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
7372
7373 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7374 neon_dup_q to...
7375 (falkor_am_1_gtov_gtov): ... a new insn reservation.
7376
7377 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
7378
7379 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7380 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7381 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7382 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7383 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7384
7385 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7386
7387 * diagnostic-show-locus.c (diagnostic_show_locus): Use
7388 pp_take_prefix when saving the existing prefix.
7389 * diagnostic.c (diagnostic_append_note): Likewise.
7390 * langhooks.c (lhd_print_error_function): Likewise.
7391 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7392 param's type. Free the existing prefix.
7393 (pp_take_prefix): New function.
7394 (pretty_printer::pretty_printer): Drop the prefix parameter.
7395 Rename the length parameter to match the comment.
7396 (pretty_printer::~pretty_printer): Free the prefix.
7397 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7398 parameter.
7399 (struct pretty_printer): Drop the "const" from "prefix" field's
7400 type and clarify memory management.
7401 (pp_set_prefix): Drop the "const" from the 2nd param.
7402 (pp_take_prefix): New decl.
7403
7404 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
7405
7406 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7407 for word_mode_ok here instead of passing as argument.
7408 (expand_block_compare): Change select_block_compare_mode() call.
7409 (expand_strncmp_gpr_sequence): New function.
7410 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
7411
7412 2018-08-02 Jeff Law <law@redhat.com>
7413
7414 PR target/86790
7415 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7416 Define to speculation_safe_value_not_needed.
7417
7418 PR target/86784
7419 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7420 Define to speculation_safe_value_not_needed.
7421
7422 2018-08-02 Tom de Vries <tdevries@suse.de>
7423
7424 PR target/86660
7425 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
7426 function. Return UI_TARGET unconditionally.
7427 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7428 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
7429
7430 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7431
7432 * genemit.c (print_overload_test): Fix typo.
7433
7434 2018-08-02 Richard Biener <rguenther@suse.de>
7435
7436 PR tree-optimization/86816
7437 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
7438 which checks for value availability before querying it.
7439 (gvn_uses_equal): Use it.
7440 (same_succ_hash): Likewise.
7441 (gimple_equal_p): Likewise.
7442
7443 2018-08-02 Nick Clifton <nickc@redhat.com>
7444
7445 PR target/86813
7446 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7447 Define to speculation_safe_value_not_needed.
7448
7449 PR target/86810
7450 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7451 Define to speculation_safe_value_not_needed.
7452
7453 PR target/86810
7454 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7455 Define to speculation_safe_value_not_needed.
7456
7457 PR target/86803
7458 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7459 Define to speculation_safe_value_not_needed.
7460
7461 PR target/86797
7462 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7463 Define to speculation_safe_value_not_needed.
7464
7465 PR target/86791
7466 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7467 Define to speculation_safe_value_not_needed.
7468
7469 PR target/86789
7470 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7471 Define to speculation_safe_value_not_needed.
7472
7473 PR target/86787
7474 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7475 Define to speculation_safe_value_not_needed.
7476
7477 PR target/86782
7478 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7479 speculation_safe_value_not_needed.
7480
7481 PR target/86781
7482 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
7483 to speculation_safe_value_not_needed.
7484
7485 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7486
7487 * doc/md.texi: Expand the documentation of instruction names
7488 to mention port-local uses. Document '@' in pattern names.
7489 * read-md.h (overloaded_instance, overloaded_name): New structs.
7490 (mapping): Declare.
7491 (md_reader::handle_overloaded_name): New member function.
7492 (md_reader::get_overloads): Likewise.
7493 (md_reader::m_first_overload): New member variable.
7494 (md_reader::m_next_overload_ptr): Likewise.
7495 (md_reader::m_overloads_htab): Likewise.
7496 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
7497 m_next_overload_ptr and m_overloads_htab.
7498 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
7499 (get_mode_token, get_code_token, get_int_token): New functions.
7500 (map_attr_string): Add an optional argument that passes back
7501 the associated iterator.
7502 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
7503 (md_reader::handle_overloaded_name, add_overload_instance): New
7504 functions.
7505 (apply_iterators): Handle '@' names. Report an error if '@'
7506 is used without iterators.
7507 (initialize_iterators): Initialize the new iterator_group fields.
7508 * genopinit.c (handle_overloaded_code_for)
7509 (handle_overloaded_gen): New functions.
7510 (main): Use them to print declarations of maybe_code_for_* and
7511 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
7512 * genemit.c (print_overload_arguments, print_overload_test)
7513 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
7514 (main): Use it to print definitions of maybe_code_for_* and
7515 maybe_gen_* functions.
7516 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
7517 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
7518 instead of explicit mode checks.
7519 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
7520 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
7521 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
7522 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
7523 (aarch64_expand_compare_and_swap): Likewise
7524 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
7525 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
7526 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
7527 (aarch64_constant_pool_reload_icode): Delete.
7528 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
7529 instead of aarch64_constant_pool_reload_icode. Use
7530 code_for_aarch64_reload_mov instead of explicit mode checks.
7531 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
7532 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
7533 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
7534 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
7535 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
7536 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
7537 (aarch64_atomic_load_op_code): Delete.
7538 (aarch64_emit_atomic_load_op): Likewise.
7539 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
7540 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
7541 instead of aarch64_emit_atomic_load_op.
7542 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
7543 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
7544 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
7545 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
7546 character before the pattern name.
7547 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
7548 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
7549 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
7550 (aarch64_frecps<mode>): Likewise.
7551 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
7552 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
7553 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
7554 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
7555 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
7556
7557 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7558
7559 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
7560 Allow HFmode constants if TARGET_FP_F16INST.
7561
7562 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
7563
7564 PR target/86014
7565 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
7566 No longer check last store for clobber of address register.
7567
7568 2018-08-02 Martin Liska <mliska@suse.cz>
7569
7570 PR gcov-profile/86817
7571 * gcov.c (process_all_functions): New function.
7572 (main): Call it.
7573 (process_file): Move functions processing to
7574 process_all_functions.
7575
7576 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7577
7578 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
7579 "const" to the "gimple *" and "rtx_insn *" parameters.
7580 * dumpfile.h (dump_user_location_t::dump_user_location_t):
7581 Likewise.
7582 (dump_location_t::dump_location_t): Likewise.
7583
7584 2018-08-01 Martin Sebor <msebor@redhat.com>
7585
7586 PR tree-optimization/86650
7587 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
7588 rather than a "gcall *". Directly pass the data of interest
7589 to percent_K_format, rather than building a temporary CALL_EXPR
7590 to hold it.
7591 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
7592 (gimple_fold_builtin_strncat): Adjust.
7593 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
7594 gcall* argument with gimple*.
7595 * gimple-ssa-warn-restrict.c (check_call): Same.
7596 (wrestrict_dom_walker::before_dom_children): Same.
7597 (builtin_access::builtin_access): Same.
7598 (check_bounds_or_overlap): Same
7599 (maybe_diag_overlap): Same.
7600 (maybe_diag_offset_bounds): Same.
7601 * tree-diagnostic.c (default_tree_printer): Move usage of
7602 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
7603 to this callsite.
7604 * tree-pretty-print.c (percent_K_format): Add argument.
7605 * tree-pretty-print.h: Add argument.
7606 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
7607 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
7608 (maybe_diag_stxncpy_trunc): Same.
7609 (handle_builtin_stxncpy): Same.
7610 (handle_builtin_strcat): Same.
7611
7612 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7613
7614 * match.pd: Optimise pointer range checks.
7615
7616 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7617
7618 PR tree-optimization/86758
7619 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
7620 to remove pattern statements.
7621
7622 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7623
7624 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
7625 result of dfs_enumerate_from when constructing stmt_vec_infos,
7626 instead of additionally calling get_loop_body.
7627
7628 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7629
7630 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
7631 parameter.
7632 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
7633 When creating an iv, assert that the step is not known to be zero.
7634 (vect_setup_realignment): Update call accordingly.
7635 * tree-vect-stmts.c (vectorizable_store): Likewise.
7636 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
7637
7638 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7639
7640 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
7641 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
7642 (vectorizable_reduction): Likewise.
7643 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7644 (vect_detect_hybrid_slp_stmts): Likewise.
7645 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7646
7647 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
7648
7649 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
7650 (wide_int_set_zero_nonzero_bits): ...this.
7651 (zero_nonzero_bits_from_vr): Rename to...
7652 (vrp_set_zero_nonzero_bits): ...this.
7653 (extract_range_from_multiplicative_op_1): Abstract wide int
7654 code...
7655 (wide_int_range_multiplicative_op): ...here.
7656 (extract_range_from_binary_expr_1): Extract wide int binary
7657 operations into their own functions.
7658 (wide_int_range_lshift): New.
7659 (wide_int_range_can_optimize_bit_op): New.
7660 (wide_int_range_shift_undefined_p): New.
7661 (wide_int_range_bit_xor): New.
7662 (wide_int_range_bit_ior): New.
7663 (wide_int_range_bit_and): New.
7664 (wide_int_range_trunc_mod): New.
7665 (extract_range_into_wide_ints): New.
7666 (vrp_shift_undefined_p): New.
7667 (extract_range_from_multiplicative_op): New.
7668 (vrp_can_optimize_bit_op): New.
7669 * tree-vrp.h (value_range::dump): New.
7670 (wide_int_range_multiplicative_op): New.
7671 (wide_int_range_lshift):New.
7672 (wide_int_range_shift_undefined_p): New.
7673 (wide_int_range_bit_xor): New.
7674 (wide_int_range_bit_ior): New.
7675 (wide_int_range_bit_and): New.
7676 (wide_int_range_trunc_mod): New.
7677 (zero_nonzero_bits_from_bounds): Rename to...
7678 (wide_int_set_zero_nonzero_bits): ...this.
7679 (zero_nonzero_bits_from_vr): Rename to...
7680 (vrp_set_zero_nonzero_bits): ...this.
7681 (range_easy_mask_min_max): Rename to...
7682 (wide_int_range_can_optimize_bit_op): this.
7683 * vr-values.c (simplify_bit_ops_using_ranges): Rename
7684 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
7685
7686 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7687
7688 * tree-vectorizer.h (vect_orig_stmt): New function.
7689 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
7690 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
7691 (vect_create_epilog_for_reduction): Likewise.
7692 (vectorizable_live_operation): Likewise.
7693 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7694 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
7695 * tree-vect-stmts.c (vectorizable_call): Likewise.
7696 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
7697
7698 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7699
7700 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
7701 argument.
7702 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
7703 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
7704 (vect_transform_loop): Likewise.
7705 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7706
7707 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7708
7709 * tree-vectorizer.h (vect_schedule_slp): Return void.
7710 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7711 (vect_schedule_slp): Likewise.
7712
7713 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7714
7715 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
7716 argument.
7717 (vect_transform_loop): Update calls accordingly. Schedule SLP
7718 instances before the main loop, if any exist.
7719
7720 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7721
7722 PR tree-optimization/86749
7723 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
7724 If the lhs is used in a COND_EXPR, check that it is being used
7725 as the "then" or "else" value.
7726
7727 2018-08-01 Tom de Vries <tdevries@suse.de>
7728
7729 PR target/86800
7730 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7731 speculation_safe_value_not_needed.
7732
7733 2018-08-01 Richard Biener <rguenther@suse.de>
7734
7735 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
7736 as base and offset.
7737
7738 2018-08-01 Martin Liska <mliska@suse.cz>
7739
7740 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
7741 format how successful transformation is dumped.
7742 (gimple_mod_pow2_value_transform): Likewise.
7743 (gimple_mod_subtract_transform): Likewise.
7744 (gimple_stringops_transform): Likewise.
7745
7746 2018-08-01 Martin Liska <mliska@suse.cz>
7747
7748 PR value-prof/35543
7749 * value-prof.c (interesting_stringop_to_profile_p):
7750 Simplify the code and add BUILT_IN_MEMMOVE.
7751 (gimple_stringops_transform): Likewise.
7752
7753 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
7754
7755 * config/aarch64/aarch64-simd.md
7756 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
7757 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
7758 use GPI iterator instead of SI mode.
7759
7760 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7761
7762 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
7763 rs6000_speculation_barrier.
7764 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
7765 new barrier pattern name.
7766
7767 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7768
7769 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
7770 (speculation_barrier): New insn.
7771
7772 2018-08-01 Richard Biener <rguenther@suse.de>
7773
7774 PR bootstrap/86724
7775 * graphite.h: Include isl/id.h and isl/space.h to allow build
7776 with ISL 0.20.
7777
7778 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
7779
7780 PR target/86651
7781 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7782 mode for COFF targets.
7783 * defaults.h (TARGET_COFF): Define.
7784 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
7785 TARGET_COFF): Define.
7786 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
7787 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
7788 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
7789
7790 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7791
7792 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
7793 * gimple-streamer-out.c (output_bb): Save it.
7794 * lto-streamer-in.c (input_struct_function_base): Restore
7795 instance discriminator if available. Create map on demand.
7796 * lto-streamer-out.c (output_struct_function_base): Save it if
7797 available.
7798 * final.c (decl_to_instance_map): Document LTO strategy.
7799
7800 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7801 Olivier Hainque <hainque@adacore.com>
7802
7803 * debug.h (decl_to_instance_map_t): New type.
7804 (decl_to_instance_map): Declare.
7805 (maybe_create_decl_to_instance_map): New inline function.
7806 * final.c (bb_discriminator, last_bb_discriminator): New statics,
7807 to track basic block discriminators.
7808 (final_start_function_1): Initialize them.
7809 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
7810 bb_discriminator.
7811 (decl_to_instance_map): New variable.
7812 (map_decl_to_instance, maybe_set_discriminator): New functions.
7813 (notice_source_line): Set discriminator.
7814
7815 2018-07-31 Ian Lance Taylor <iant@golang.org>
7816
7817 * targhooks.c (default_have_speculation_safe_value): Add
7818 ATTRIBUTE_UNUSED.
7819
7820 2018-07-31 David Malcolm <dmalcolm@redhat.com>
7821
7822 * dump-context.h: Include "pretty-print.h".
7823 (dump_context::refresh_dumps_are_enabled): New decl.
7824 (dump_context::emit_item): New decl.
7825 (class dump_context): Add fields "m_test_pp" and
7826 "m_test_pp_flags".
7827 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7828 (temp_dump_context::get_dumped_text): New decl.
7829 (class temp_dump_context): Add field "m_pp".
7830 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
7831 (dump_context::refresh_dumps_are_enabled): ...and add a test for
7832 m_test_pp.
7833 (set_dump_file): Update for above change.
7834 (set_alt_dump_file): Likewise.
7835 (dump_loc): New overload, taking a pretty_printer *.
7836 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
7837 to any test pretty-printer.
7838 (make_item_for_dump_gimple_stmt): New function, adapted from
7839 optinfo::add_gimple_stmt.
7840 (dump_context::dump_gimple_stmt): Call it, and use the result,
7841 eliminating the direct usage of dump_file and alt_dump_file in
7842 favor of indirectly using them via emit_item.
7843 (make_item_for_dump_gimple_expr): New function, adapted from
7844 optinfo::add_gimple_expr.
7845 (dump_context::dump_gimple_expr): Call it, and use the result,
7846 eliminating the direct usage of dump_file and alt_dump_file in
7847 favor of indirectly using them via emit_item.
7848 (make_item_for_dump_generic_expr): New function, adapted from
7849 optinfo::add_tree.
7850 (dump_context::dump_generic_expr): Call it, and use the result,
7851 eliminating the direct usage of dump_file and alt_dump_file in
7852 favor of indirectly using them via emit_item.
7853 (make_item_for_dump_printf_va): New function, adapted from
7854 optinfo::add_printf_va.
7855 (make_item_for_dump_printf): New function.
7856 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
7857 and use the result, eliminating the direct usage of dump_file and
7858 alt_dump_file in favor of indirectly using them via emit_item.
7859 (make_item_for_dump_dec): New function.
7860 (dump_context::dump_dec): Call it, and use the result,
7861 eliminating the direct usage of dump_file and alt_dump_file in
7862 favor of indirectly using them via emit_item.
7863 (make_item_for_dump_symtab_node): New function, adapted from
7864 optinfo::add_symtab_node.
7865 (dump_context::dump_symtab_node): Call it, and use the result,
7866 eliminating the direct usage of dump_file and alt_dump_file in
7867 favor of indirectly using them via emit_item.
7868 (dump_context::begin_scope): Reimplement, avoiding direct usage
7869 of dump_file and alt_dump_file in favor of indirectly using them
7870 via emit_item.
7871 (dump_context::emit_item): New member function.
7872 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7873 Set up test pretty-printer on the underlying context. Call
7874 refresh_dumps_are_enabled.
7875 (temp_dump_context::~temp_dump_context): Call
7876 refresh_dumps_are_enabled.
7877 (temp_dump_context::get_dumped_text): New member function.
7878 (selftest::verify_dumped_text): New function.
7879 (ASSERT_DUMPED_TEXT_EQ): New macro.
7880 (selftest::test_capture_of_dump_calls): Run all tests twice, with
7881 and then without optinfo enabled. Add uses of
7882 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
7883 * dumpfile.h: Update comment for the dump_* API.
7884 * optinfo-emit-json.cc
7885 (selftest::test_building_json_from_dump_calls): Update for new
7886 param for temp_dump_context ctor.
7887 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
7888 and "m_owned" field.
7889 (optinfo_item::~optinfo_item): Likewise.
7890 (optinfo::add_item): New member function.
7891 (optinfo::emit): Update comment.
7892 (optinfo::add_string): Delete.
7893 (optinfo::add_printf): Delete.
7894 (optinfo::add_printf_va): Delete.
7895 (optinfo::add_gimple_stmt): Delete.
7896 (optinfo::add_gimple_expr): Delete.
7897 (optinfo::add_tree): Delete.
7898 (optinfo::add_symtab_node): Delete.
7899 (optinfo::add_dec): Delete.
7900 * optinfo.h (class dump_context): New forward decl.
7901 (optinfo::add_item): New decl.
7902 (optinfo::add_string): Delete.
7903 (optinfo::add_printf): Delete.
7904 (optinfo::add_printf_va): Delete.
7905 (optinfo::add_gimple_stmt): Delete.
7906 (optinfo::add_gimple_expr): Delete.
7907 (optinfo::add_tree): Delete.
7908 (optinfo::add_symtab_node): Delete.
7909 (optinfo::add_dec): Delete.
7910 (optinfo::add_poly_int): Delete.
7911 (optinfo_item::optinfo_item): Remove "owned" param.
7912 (class optinfo_item): Remove field "m_owned".
7913
7914 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7915
7916 PR middle-end/86705
7917 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
7918 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
7919 requested variable alignment.
7920 (expand_one_ssa_partition): Likewise.
7921 (expand_one_var): Likewise.
7922
7923 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7924
7925 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7926 to speculation_safe_value_not_needed.
7927
7928 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7929
7930 * targhooks.h (speculation_safe_value_not_needed): New prototype.
7931 * targhooks.c (speculation_safe_value_not_needed): New function.
7932 * target.def (have_speculation_safe_value): Update documentation.
7933 * doc/tm.texi: Regenerated.
7934
7935 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7936
7937 * config/aarch64/iterators.md (ALLI_TI): New iterator.
7938 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
7939 expand.
7940 (despeculate_copy<ALLI:mode>_insn): New insn.
7941 (despeculate_copyti_insn): New insn.
7942 (despeculate_simple<ALLI:mode>): New insn
7943 (despeculate_simpleti): New insn.
7944 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
7945 function.
7946 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
7947 aarch64_speculation_safe_value.
7948 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
7949
7950 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7951
7952 * config/aarch64/aarch64-speculation.cc: New file.
7953 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
7954 before pass_reorder_blocks.
7955 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
7956 prototype.
7957 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
7958 X14 and X15 when tracking speculation.
7959 * config/aarch64/aarch64.md (register name constants): Add
7960 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
7961 (unspec): Add UNSPEC_SPECULATION_TRACKER.
7962 (speculation_barrier): New insn attribute.
7963 (cmp<mode>): Allow SP in comparisons.
7964 (speculation_tracker): New insn.
7965 (speculation_barrier): Add speculation_barrier attribute.
7966 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
7967 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
7968 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
7969
7970 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7971
7972 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
7973 aarch64_track_speculation is true.
7974 (tb<optab><mode>1): Likewise.
7975 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
7976 generate CB[N]Z when tracking speculation.
7977 (aarch64_split_compare_and_swap): Likewise.
7978 (aarch64_split_atomic_op): Likewise.
7979
7980 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7981
7982 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
7983
7984 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7985
7986 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
7987 (speculation_barrier): New insn.
7988
7989 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7990
7991 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
7992 * config/arm/arm.md (speculation_barrier): New expand.
7993 (speculation_barrier_insn): New pattern.
7994
7995 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7996
7997 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
7998 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
7999 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
8000 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
8001 list.
8002 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
8003 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
8004 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
8005 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
8006 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
8007 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
8008 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
8009 * builtins.c (expand_speculation_safe_value): New function.
8010 (expand_builtin): Call it.
8011 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
8012 * doc/extend.texi: Document __builtin_speculation_safe_value.
8013 * doc/md.texi: Document "speculation_barrier" pattern.
8014 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
8015 TARGET_HAVE_SPECULATION_SAFE_VALUE.
8016 * doc/tm.texi: Regenerated.
8017 * target.def (have_speculation_safe_value, speculation_safe_value): New
8018 hooks.
8019 * targhooks.c (default_have_speculation_safe_value): New function.
8020 (default_speculation_safe_value): New function.
8021 * targhooks.h (default_have_speculation_safe_value): Add prototype.
8022 (default_speculation_safe_value): Add prototype.
8023
8024 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8025
8026 * dump-context.h (dump_context::dump_loc): New decl.
8027 * dumpfile.c (dump_context::dump_loc): New member function.
8028 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
8029 and dump_gimple_stmt.
8030 (dump_context::dump_gimple_expr_loc): Likewise, using
8031 dump_gimple_expr.
8032 (dump_context::dump_generic_expr_loc): Likewise, using
8033 dump_generic_expr.
8034 (dump_context::dump_printf_loc_va): Likewise, using
8035 dump_printf_va.
8036 (dump_context::begin_scope): Explicitly using the global function
8037 "dump_loc", rather than the member function.
8038
8039 2018-07-31 Martin Sebor <msebor@redhat.com>
8040
8041 PR tree-optimization/86741
8042 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
8043
8044 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
8045
8046 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
8047 depend on whether prefetch instructions will be emitted or not.
8048 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
8049 will be emitted or not.
8050 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
8051 (TARGET_SETMEM_PFD): New macros.
8052
8053 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8054
8055 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
8056 (NULL_STMT_VEC_INFO): Delete.
8057 (stmt_vec_info::operator*): Likewise.
8058 (stmt_vec_info::operator gimple *): Likewise.
8059 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
8060 of NULL_STMT_VEC_INFO.
8061 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8062 (vect_reassociating_reduction_p): Likewise.
8063 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8064 (vectorizable_store): Likewise.
8065 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
8066 (vec_info::free_stmt_vec_infos): Likewise.
8067
8068 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8069
8070 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
8071 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
8072
8073 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8074
8075 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
8076 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8077 (vec_info::free_stmt_vec_info): New private member functions.
8078 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
8079 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
8080 * tree-parloops.c (gather_scalar_reductions): Remove calls to
8081 set_stmt_vec_info_vec and free_stmt_vec_infos.
8082 * tree-vect-loop.c (_loop_vec_info): Remove call to
8083 set_stmt_vec_info_vec.
8084 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
8085 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
8086 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
8087 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8088 (vec_info::free_stmt_vec_info): ...these new functions. Remove
8089 assignments in {vec_info::,}new_stmt_vec_info that are redundant
8090 with the clearing in the xcalloc.
8091 (stmt_vec_info_vec): Delete.
8092 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
8093 (vectorize_loops): Likewise.
8094 (vec_info::~vec_info): Remove argument from call to
8095 free_stmt_vec_infos.
8096 (vec_info::add_stmt): Remove vinfo argument from call to
8097 new_stmt_vec_info.
8098
8099 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8100
8101 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
8102 rather than a gimple stmt.
8103 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
8104 information for pattern statements when passed the original
8105 statement; instead wait to be passed the pattern statement itself.
8106 Don't call set_vinfo_for_stmt here.
8107 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
8108 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
8109 stmt_vec_infos here.
8110 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
8111 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
8112 stmt_vec_infos entry.
8113
8114 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8115
8116 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
8117 * tree-vectorizer.c (vec_info::replace_stmt): New function.
8118 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
8119 * tree-vect-stmts.c (vectorizable_call): Likewise.
8120 (vectorizable_simd_clone_call): Likewise.
8121
8122 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8123
8124 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
8125 * tree-vectorizer.c (vec_info::remove_stmt): New function.
8126 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
8127 * tree-vect-loop.c (vect_transform_loop): Likewise.
8128 * tree-vect-slp.c (vect_schedule_slp): Likewise.
8129 * tree-vect-stmts.c (vect_remove_stores): Likewise.
8130
8131 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8132
8133 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
8134 (vect_dr_stmt): Delete.
8135 * tree-vectorizer.c (vec_info::lookup_dr): New function.
8136 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
8137 of DR_VECT_AUX.
8138 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
8139 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
8140 (vect_verify_datarefs_alignment, vect_peeling_supportable)
8141 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8142 (vect_analyze_data_refs): Likewise.
8143 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
8144 argument.
8145 (vect_find_same_alignment_drs): Likewise.
8146 (vect_slp_analyze_node_dependences): Update calls accordingly.
8147 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8148 instead of DR_VECT_AUX.
8149 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
8150 of a vector data references. Use vec_info::lookup_dr instead of
8151 DR_VECT_AUX.
8152 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
8153 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8154 instead of DR_VECT_AUX.
8155
8156 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8157
8158 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8159 dr_vec_info.
8160 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8161 accordingly.
8162 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8163 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8164 (vect_gen_prolog_loop_niters): Likewise.
8165
8166 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8167
8168 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8169 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8170 (vect_known_alignment_in_bytes, vect_dr_behavior)
8171 (vect_get_scalar_dr_size): Take references as dr_vec_infos
8172 instead of data_references. Update calls to other routines for
8173 which the same change has been made.
8174 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8175 dr_vec_infos instead of stmt_vec_infos.
8176 (vect_analyze_data_ref_dependence): Update call accordingly.
8177 (vect_slp_analyze_data_ref_dependence)
8178 (vect_record_base_alignments): Use DR_VECT_AUX.
8179 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8180 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8181 (vector_alignment_reachable_p, vect_get_data_access_cost)
8182 (vect_peeling_supportable, vect_analyze_group_access_1)
8183 (vect_analyze_group_access, vect_analyze_data_ref_access)
8184 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8185 (vect_compile_time_alias, vect_small_gap_p)
8186 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8187 (vect_supportable_dr_alignment): Take references as dr_vec_infos
8188 instead of data_references. Update calls to other routines for
8189 which the same change has been made.
8190 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8191 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8192 (vect_slp_analyze_and_verify_node_alignment)
8193 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8194 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8195 (vect_setup_realignment): Use dr_vec_infos. Update calls after
8196 above changes.
8197 (_vect_peel_info::dr): Replace with...
8198 (_vect_peel_info::dr_info): ...this new field.
8199 (vect_peeling_hash_get_most_frequent)
8200 (vect_peeling_hash_choose_best_peeling): Update accordingly.
8201 (vect_peeling_hash_get_lowest_cost):
8202 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
8203 routines for which the same change has been made.
8204 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
8205 data_reference.
8206 * tree-vect-loop-manip.c (get_misalign_in_elems)
8207 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
8208 above changes.
8209 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8210 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8211 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8212 (get_group_load_store_type, get_negative_load_store_type)
8213 (vect_get_data_ptr_increment, vectorizable_store)
8214 (vectorizable_load): Likewise.
8215 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8216 Update calls to other routines for which the same change has been made.
8217
8218 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8219
8220 * tree-vectorizer.h (vec_info::move_dr): New member function.
8221 (dataref_aux): Rename to...
8222 (dr_vec_info): ...this and add "dr" and "stmt" fields.
8223 (_stmt_vec_info::dr_aux): Update accordingly.
8224 (_stmt_vec_info::data_ref_info): Delete.
8225 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8226 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8227 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8228 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8229 of data_ref.
8230 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
8231 (STMT_VINFO_DR_INFO): New macro.
8232 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8233 (set_dr_misalignment): Update after rename of dataref_aux.
8234 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
8235 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8236 initialization of STMT_VINFO_DATA_REF.
8237 * tree-vectorizer.c (vec_info::move_dr): New function.
8238 * tree-vect-patterns.c (vect_recog_bool_pattern)
8239 (vect_recog_mask_conversion_pattern)
8240 (vect_recog_gather_scatter_pattern): Use it.
8241 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8242 the "dr" and "stmt" fields of dr_vec_info instead of
8243 STMT_VINFO_DATA_REF.
8244
8245 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8246
8247 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8248 (is_pattern_stmt_p): Use it.
8249 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8250 on pattern statements.
8251
8252 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8253
8254 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8255 original stmt as a stmt_vec_info rather than a gimple stmt.
8256 (vect_pattern_recog_1): Take the statement directly as a
8257 stmt_vec_info, rather than via a gimple_stmt_iterator.
8258 Update call to vect_mark_pattern_stmts.
8259 (vect_pattern_recog): Update calls accordingly.
8260
8261 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8262
8263 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8264 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8265 a vect_def_type for the first argument.
8266 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8267 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8268 operand if it isn't defined by a vectorized statement.
8269 (vect_build_gather_load_calls): Remove the mask_dt argument and
8270 update calls to vect_get_vec_def_for_stmt_copy.
8271 (vectorizable_bswap): Likewise the dt argument.
8272 (vectorizable_call): Update calls to vectorizable_bswap and
8273 vect_get_vec_def_for_stmt_copy.
8274 (vectorizable_simd_clone_call, vectorizable_assignment)
8275 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8276 (vectorizable_comparison): Update calls to
8277 vect_get_vec_def_for_stmt_copy.
8278 (vectorizable_store): Likewise. Remove now-unnecessary calls to
8279 vect_is_simple_use.
8280 (vect_get_loop_based_defs): Remove dt argument and update call
8281 to vect_get_vec_def_for_stmt_copy.
8282 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8283 and vect_get_vec_def_for_stmt_copy.
8284 (vectorizable_load): Update calls to vect_build_gather_load_calls
8285 and vect_get_vec_def_for_stmt_copy.
8286 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8287 (vectorizable_reduction, vectorizable_live_operation): Update calls
8288 to vect_get_vec_def_for_stmt_copy.
8289
8290 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8291
8292 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8293 and gimple stmt arguments with a stmt_vec_info.
8294 (vect_record_base_alignments): Update calls accordingly.
8295 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8296 and gimple stmt arguments with a stmt_vec_info.
8297 (vect_build_slp_tree_1): Remove vinfo argument and update call
8298 to vect_record_max_nunits.
8299 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8300 and vect_record_max_nunits.
8301
8302 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8303
8304 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8305 file and take a stmt_vec_info instead of a gimple stmt.
8306 (supportable_widening_operation, vect_finish_replace_stmt)
8307 (vect_finish_stmt_generation, vect_get_store_rhs)
8308 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8309 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8310 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8311 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8312 (vect_create_data_ref_ptr, bump_vector_ptr)
8313 (vect_permute_store_chain, vect_setup_realignment)
8314 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8315 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8316 (vectorizable_reduction, vectorizable_induction)
8317 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8318 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8319 than gimple stmts as arguments.
8320 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8321 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8322 (can_group_stmts_p, vect_check_gather_scatter)
8323 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8324 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8325 (vect_permute_load_chain, vect_shift_permute_load_chain)
8326 (vect_transform_grouped_load)
8327 (vect_record_grouped_load_vectors): Likewise.
8328 * tree-vect-loop.c (vect_fixup_reduc_chain)
8329 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8330 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8331 (vectorizable_reduction, vectorizable_induction)
8332 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8333 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8334 (vect_get_load_store_mask): Likewise.
8335 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8336 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8337 * tree-vect-stmts.c (vect_mark_relevant)
8338 (is_simple_and_all_uses_invariant)
8339 (exist_non_indexing_operands_for_use_p, process_use)
8340 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8341 (vect_get_vec_def_for_operand, vect_get_vec_defs)
8342 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8343 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8344 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8345 (get_negative_load_store_type, get_load_store_type)
8346 (vect_check_load_store_mask, vect_check_store_rhs)
8347 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8348 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8349 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8350 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8351 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8352 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8353 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8354 (supportable_widening_operation): Likewise.
8355
8356 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8357
8358 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8359 a stmt_vec_info instead of a gcall.
8360 (vect_check_gather_scatter): Update call accordingly.
8361 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8362 of a gphi.
8363 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8364 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8365 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8366 instead of a gimple stmt.
8367 (vect_transform_loop): Update calls accordingly.
8368 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8369 stmt_vec_infos instead of gimple stmts.
8370 (vect_analyze_slp_instance): Update use accordingly.
8371 * tree-vect-stmts.c (read_vector_array, write_vector_array)
8372 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8373 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8374 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8375 (vect_gen_widened_results_half, vect_get_loop_based_defs)
8376 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8377 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8378 down to subroutines.
8379
8380 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8381
8382 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8383 of the worklist from a vector of gimple stmts to a vector of
8384 stmt_vec_infos.
8385 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8386 (vect_mark_stmts_to_be_vectorized): Likewise
8387
8388 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8389
8390 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8391 statement before passing it to vect_analyze_stmt.
8392 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8393 the chain of phi vector definitions. Track the exit phi via its
8394 stmt_vec_info.
8395 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8396 STMT_VINFO_REDUC_DEF.
8397 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8398 stmt_vec_infos to handle the statement chains.
8399 (vect_get_slp_defs): Record the first statement in the node
8400 using a stmt_vec_info.
8401 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8402 statements here and pass their stmt_vec_info down to subroutines.
8403 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8404 down to vect_finish_stmt_generation.
8405 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8406 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8407 stmt_vec_infos to subroutines.
8408 (vect_remove_stores): Use stmt_vec_infos to handle the statement
8409 chains.
8410
8411 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8412
8413 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
8414 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
8415 (vect_permute_store_chain, vect_setup_realignment)
8416 (vect_permute_load_chain, vect_shift_permute_load_chain)
8417 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
8418 stmts internally, and when passing values to other vectorizer routines.
8419 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8420 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
8421 (vect_analyze_loop_operations, get_initial_def_for_reduction)
8422 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
8423 (vectorizable_reduction, vectorizable_induction)
8424 (vectorizable_live_operation, vect_transform_loop_stmt)
8425 (vect_transform_loop): Likewise.
8426 * tree-vect-patterns.c (vect_reassociating_reduction_p)
8427 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
8428 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
8429 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8430 (vect_slp_analyze_node_operations_1): Likewise.
8431 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8432 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
8433 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
8434 (vect_finish_stmt_generation_1, get_group_load_store_type)
8435 (get_load_store_type, vect_build_gather_load_calls)
8436 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8437 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8438 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8439 (vectorizable_store, vectorizable_load, vectorizable_condition)
8440 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
8441 (supportable_widening_operation): Likewise.
8442 (vect_get_vector_types_for_stmt): Likewise.
8443 * tree-vectorizer.h (vect_dr_behavior): Likewise.
8444
8445 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8446
8447 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8448 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
8449 (vect_permute_store_chain, vect_permute_load_chain)
8450 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
8451 repeated stmt_vec_info lookups.
8452 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8453 (vect_update_ivs_after_vectorizer): Likewise.
8454 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
8455 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8456 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
8457 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8458 (vect_bb_slp_scalar_cost): Likewise.
8459 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
8460
8461 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8462
8463 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
8464 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
8465 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
8466 to get gassigns and gcalls, rather than operating on generc gimple
8467 stmts.
8468 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
8469 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
8470 (vectorizable_load, vect_analyze_stmt): Likewise.
8471 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
8472
8473 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8474
8475 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
8476 return stmt_vec_infos rather than gimple stmts. Do not accept
8477 null arguments.
8478 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
8479 of a gimple stmt.
8480 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8481 Update use of get_later_stmt.
8482 (vect_get_constant_vectors): Update call accordingly.
8483 (vect_schedule_slp_instance): Likewise
8484 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
8485 (vect_slp_analyze_instance_dependence): Likewise.
8486 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
8487
8488 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8489
8490 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
8491 (stmt_info_for_cost::stmt_info): ...this new field.
8492 (add_stmt_costs): Update accordingly.
8493 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8494 (vect_get_known_peeling_cost): Likewise.
8495 (vect_estimate_min_profitable_iters): Likewise.
8496 * tree-vect-stmts.c (record_stmt_cost): Likewise.
8497
8498 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8499
8500 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
8501 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8502 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8503 accordingly.
8504 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
8505
8506 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8507
8508 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
8509 a gimple stmt to a stmt_vec_info.
8510 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8511
8512 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8513
8514 * tree-vectorizer.h (vec_info::grouped_stores): Change from
8515 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8516 (_loop_vec_info::reduction_chains): Likewise.
8517 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
8518 accordingly.
8519 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8520
8521 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8522
8523 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
8524 a gimple stmt to a stmt_vec_info.
8525 (_stmt_vec_info::next_element): Likewise.
8526 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
8527 (vect_slp_analyze_and_verify_node_alignment)
8528 (vect_analyze_group_access_1, vect_analyze_group_access)
8529 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
8530 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
8531 (vect_supportable_dr_alignment): Update accordingly.
8532 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
8533 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
8534 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
8535 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8536 * tree-vect-slp.c (vect_build_slp_tree_1)
8537 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
8538 (vect_split_slp_store_group, vect_analyze_slp_instance)
8539 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
8540 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
8541 (get_group_load_store_type, get_load_store_type)
8542 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
8543 (vect_transform_stmt, vect_remove_stores): Likewise.
8544
8545 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8546
8547 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
8548 than a gimple stmt.
8549 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8550 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
8551 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
8552 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
8553 (vector_alignment_reachable_p, vect_get_data_access_cost)
8554 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
8555 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
8556 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8557 (vect_analyze_group_access_1, vect_analyze_group_access)
8558 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
8559 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
8560 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
8561 result of vect_dr_stmt and use the stmt_vec_info instead of
8562 the associated gimple stmt.
8563 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8564 (vect_gen_prolog_loop_niters): Likewise.
8565 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8566
8567 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8568
8569 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
8570 to a vec<stmt_vec_info>.
8571 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
8572 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
8573 vec<stmt_vec_info>.
8574 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
8575 to a vec<stmt_vec_info>.
8576 (bst_traits::value_type, bst_traits::value_type): Likewise.
8577 (bst_traits::hash): Update accordingly.
8578 (vect_get_and_check_slp_defs): Change the stmts parameter from
8579 a vec<gimple *> to a vec<stmt_vec_info>.
8580 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
8581 (vect_build_slp_tree): Likewise.
8582 (vect_build_slp_tree_2): Likewise. Update uses of
8583 SLP_TREE_SCALAR_STMTS.
8584 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
8585 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
8586 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
8587 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
8588 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
8589 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
8590 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
8591 (vect_get_constant_vectors, vect_get_slp_defs)
8592 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
8593 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
8594 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
8595 instead of gimple stmts.
8596 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
8597 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
8598 (vect_slp_analyze_instance_dependence): Update uses of
8599 SLP_TREE_SCALAR_STMTS.
8600 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8601 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
8602 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
8603 (get_initial_defs_for_reduction): Likewise.
8604 (vect_create_epilog_for_reduction): Likewise.
8605 (vectorize_fold_left_reduction): Likewise.
8606 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
8607 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
8608 (can_vectorize_live_stmts): Likewise.
8609
8610 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8611
8612 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
8613 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8614 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
8615 than gimple stmts.
8616 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
8617 of a gimple stmt.
8618 (gather_scalar_reductions): Update after above interface changes.
8619 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
8620 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
8621 than gimple stmts.
8622 (vect_force_simple_reduction): Likewise.
8623 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
8624 LOOP_VINFO_REDUCTIONS.
8625 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8626
8627 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8628
8629 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
8630 a gimple stmt to a stmt_vec_info.
8631 * tree-vect-loop.c (vect_active_double_reduction_p)
8632 (vect_force_simple_reduction, vectorizable_reduction): Update
8633 accordingly.
8634
8635 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8636
8637 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
8638 vec<gimple *> to a vec<stmt_vec_info>.
8639 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
8640 the reduction_phis argument from a vec<gimple *> to a
8641 vec<stmt_vec_info>.
8642 (vectorizable_reduction): Likewise the phis local variable that
8643 is passed to vect_create_epilog_for_reduction. Update for new type
8644 of SLP_TREE_VEC_STMTS.
8645 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
8646 (vectorizable_live_operation): Likewise.
8647 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
8648 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
8649
8650 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8651
8652 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
8653 a gimple stmt to a stmt_vec_info.
8654 (vectorizable_condition, vectorizable_live_operation)
8655 (vectorizable_reduction, vectorizable_induction): Pass back the
8656 vectorized statement as a stmt_vec_info.
8657 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
8658 use of STMT_VINFO_VEC_STMT.
8659 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
8660 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
8661 as stmt_vec_infos rather than gimple stmts.
8662 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
8663 to a stmt_vec_info.
8664 (vectorizable_live_operation): Likewise.
8665 (vectorizable_reduction, vectorizable_induction): Likewise,
8666 updating use of STMT_VINFO_VEC_STMT.
8667 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
8668 of STMT_VINFO_VEC_STMT.
8669 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
8670 (vectorizable_simd_clone_call, vectorizable_conversion)
8671 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8672 (vectorizable_store, vectorizable_load, vectorizable_condition)
8673 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
8674 from a gimple stmt to a stmt_vec_info.
8675 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
8676 pointer to a stmt_vec_info to the vectorizable_* routines.
8677
8678 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8679
8680 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
8681 a gimple stmt to a stmt_vec_info.
8682 (is_pattern_stmt_p): Update accordingly.
8683 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
8684 (vect_record_grouped_load_vectors): Likewise.
8685 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8686 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
8687 (vect_model_reduction_cost): Likewise.
8688 (vect_create_epilog_for_reduction): Likewise.
8689 (vectorizable_reduction, vectorizable_induction): Likewise.
8690 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8691 Return the stmt_vec_info for the pattern statement.
8692 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
8693 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
8694 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8695 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
8696 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8697 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
8698 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
8699 (free_stmt_vec_info, vect_is_simple_use): Likewise.
8700
8701 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8702
8703 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
8704 (vect_finish_stmt_generation): Likewise.
8705 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8706 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
8707 (vect_build_gather_load_calls): Use the return value of the above
8708 functions instead of a separate call to vinfo_for_stmt. Use narrow
8709 scopes for the input gimple stmt and wider scopes for the associated
8710 stmt_vec_info. Use vec_info::lookup_def when setting these
8711 stmt_vec_infos from an SSA_NAME definition.
8712 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8713 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8714 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8715 (vectorizable_store, vectorizable_load, vectorizable_condition)
8716 (vectorizable_comparison): Likewise.
8717 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
8718 (vectorizable_reduction): Likewise.
8719
8720 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8721
8722 * tree-vectorizer.h (vect_is_simple_use): Add an optional
8723 stmt_vec_info * parameter before the optional gimple **.
8724 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8725 (process_use, vect_get_vec_def_for_operand_1): Update callers.
8726 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
8727 * tree-vect-loop.c (vectorizable_reduction): Likewise.
8728 (vectorizable_live_operation): Likewise.
8729 * tree-vect-patterns.c (type_conversion_p): Likewise.
8730 (vect_look_through_possible_promotion): Likewise.
8731 (vect_recog_rotate_pattern): Likewise.
8732 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8733
8734 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8735
8736 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
8737 a typedef to a wrapper class.
8738 (NULL_STMT_VEC_INFO): New macro.
8739 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
8740 (stmt_vec_info::operator*): New function.
8741 (stmt_vec_info::operator gimple *): Likewise.
8742 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
8743 (add_stmt_costs): Likewise.
8744 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
8745 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8746 (vect_get_known_peeling_cost): Likewise.
8747 (vect_estimate_min_profitable_iters): Likewise.
8748 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8749 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
8750 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8751 (vectorizable_store, free_stmt_vec_infos): Likewise.
8752 (new_stmt_vec_info): Change return type of xcalloc to
8753 _stmt_vec_info *.
8754
8755 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8756
8757 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
8758 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
8759 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
8760 a single_imm_use-based sequence.
8761 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
8762
8763 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8764
8765 * tree-vectorizer.h (vec_info::lookup_def): Declare.
8766 * tree-vectorizer.c (vec_info::lookup_def): New function.
8767 * tree-vect-patterns.c (vect_get_internal_def): Use it.
8768 (vect_widened_op_tree): Likewise.
8769 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8770 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
8771 (vectorizable_reduction): Likewise.
8772 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
8773 of a gimple *.
8774 (vect_is_slp_reduction): Update calls accordingly. Use
8775 vec_info::lookup_def.
8776 (vect_is_simple_reduction): Likewise
8777 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
8778
8779 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8780
8781 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
8782 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
8783 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
8784 of vinfo_for_stmt.
8785 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
8786 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
8787 (vect_update_vf_for_slp, vect_analyze_loop_operations)
8788 (vect_is_slp_reduction, vectorizable_induction)
8789 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
8790 * tree-vect-patterns.c (vect_init_pattern_stmt):
8791 (vect_determine_min_output_precision_1, vect_determine_precisions)
8792 (vect_pattern_recog): Likewise.
8793 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
8794 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
8795 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
8796 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8797 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
8798 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
8799 info field from a loop to a loop_vec_info.
8800
8801 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8802
8803 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
8804 (vec_info::add_stmt): Declare.
8805 * tree-vectorizer.c (vec_info::add_stmt): New function.
8806 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
8807 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
8808 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8809 (vectorizable_induction): Likewise.
8810 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
8811 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8812 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
8813 (vectorizable_load): Likewise.
8814 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8815 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
8816 (vect_recog_gather_scatter_pattern): Likewise.
8817 (append_pattern_def_seq): Likewise. Remove a check that is
8818 performed by add_stmt itself.
8819
8820 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8821
8822 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
8823 which make_ssa_name was called with new_stmt before new_stmt
8824 had been created.
8825
8826 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8827
8828 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
8829 split out from...
8830 (vect_is_slp_reduction): ...here...
8831 (vect_is_simple_reduction): ...and here. Remove repetition of tests
8832 that are already known to be false.
8833
8834 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8835
8836 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
8837 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
8838 STMT_VINFO_NUM_SLP_USES when it's true.
8839 (vect_free_slp_instance): Add a final_p parameter and pass it to
8840 vect_free_slp_tree.
8841 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
8842 (vect_analyze_slp_instance): Likewise.
8843 (vect_slp_analyze_operations): Likewise.
8844 (vect_slp_analyze_bb_1): Likewise.
8845 * tree-vectorizer.c (vec_info): Likewise.
8846 * tree-vect-loop.c (vect_transform_loop): Likewise.
8847
8848 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8849
8850 * tree-vect-loop.c (vectorizable_reduction): Assert that the
8851 function is not called for second and subsequent members of
8852 a reduction group.
8853
8854 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8855
8856 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
8857 cases for nested loops from here to ...
8858 (vect_create_epilog_for_reduction): ...here. Only call
8859 vect_is_simple_use for inner-loop reductions.
8860
8861 2018-07-31 Martin Liska <mliska@suse.cz>
8862
8863 PR gcov-profile/85338
8864 PR gcov-profile/85350
8865 PR gcov-profile/85372
8866 * profile.c (struct location_triplet): New.
8867 (struct location_triplet_hash): Likewise.
8868 (output_location): Do not output a BB that
8869 is already recorded for a line.
8870 (branch_prob): Use streamed_locations.
8871
8872 2018-07-31 Martin Liska <mliska@suse.cz>
8873
8874 PR gcov-profile/85370
8875 * coverage.c (coverage_begin_function): Do not mark target
8876 clones as artificial functions.
8877
8878 2018-07-31 Martin Liska <mliska@suse.cz>
8879
8880 PR gcov-profile/83813
8881 PR gcov-profile/84758
8882 PR gcov-profile/85217
8883 PR gcov-profile/85332
8884 * profile.c (branch_prob): Do not record GOTO expressions
8885 for GIMPLE statements which locations are already streamed.
8886
8887 2018-07-31 Olivier Hainque <hainque@adacore.com>
8888
8889 * gcc.c (handle_spec_function): Accept a soft_matched_part
8890 argument, as do_spec_1. Pass it down to ...
8891 (eval_spec_function): Accept a soft_matched_part argument,
8892 and pass it down to ...
8893 (do_spec_2): Accept a soft_matched_part argument, and pass
8894 it down to do_spec_1.
8895 (do_spec_1): Pass soft_matched_part to handle_spec_function.
8896 (handle_braces): Update call to handle_spec_function.
8897 (driver::set_up_specs): Update calls to do_spec_2.
8898 (compare_debug_dump_opt_spec_function): Likewise.
8899 (compare_debug_self_opt_spec_function): Likewise.
8900
8901 2018-07-31 Olivier Hainque <hainque@adacore.com>
8902
8903 * common.opt (nolibc): New option.
8904 * doc/invoke.texi (Link Options): Document it.
8905 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
8906 * config/alpha/linux.h: Likewise.
8907 * config/arc/elf.h: Likewise.
8908 * config/arm/uclinux-elf.h: Likewise.
8909 * config/arm/unknown-elf.h: Likewise.
8910 * config/avr/avrlibc.h: Likewise.
8911 * config/bfin/bfin.h: Likewise.
8912 * config/bfin/linux.h: Likewise.
8913 * config/bfin/uclinux.h: Likewise.
8914 * config/darwin.h: Likewise.
8915 * config/darwin10.h: Likewise.
8916 * config/darwin12.h: Likewise.
8917 * config/gnu-user.h: Likewise.
8918 * config/lm32/uclinux-elf.h: Likewise.
8919 * config/pa/pa-hpux11.h: Likewise.
8920 * config/pa/pa64-hpux.h: Likewise.
8921 * config/sparc/sparc.h: Likewise.
8922
8923 2018-07-31 Olivier Hainque <hainque@adacore.com>
8924
8925 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
8926 undefined variables.
8927
8928 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
8929
8930 PR target/86640
8931 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
8932 instead of GEN_INT.
8933
8934 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
8935
8936 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8937 terminated string literal.
8938
8939 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
8940
8941 PR rtl-optimization/85160
8942 * combine.c (is_just_move): New function.
8943 (try_combine): Allow combining two instructions into two if neither of
8944 the original instructions was a move.
8945
8946 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
8947
8948 PR target/86673
8949 * doc/extend.texi (Global Register Variables): Discourage use of type
8950 qualifiers.
8951 (Local Register Variables): Likewise.
8952
8953 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
8954
8955 PR tree-optimization/86506
8956 * hwint.h (ceil_log2): Resync with hwint.c implementation.
8957
8958 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
8959
8960 PR target/86547
8961 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
8962 hard_regno, make sure no insn between `from` and `to` clobbers it.
8963
8964 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
8965 Tom de Vries <tdevries@suse.de>
8966
8967 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
8968 (PTX_DEFAULT_RUNTIME_DIM): ... this.
8969 (nvptx_goacc_validate_dims): Set default worker and gang dims to
8970 PTX_DEFAULT_RUNTIME_DIM.
8971 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
8972
8973 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
8974
8975 * config/pa/pa.c (pa_output_addr_vec): Align address table.
8976 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
8977 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
8978
8979 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
8980
8981 * config/rs6000/constraints.md (wG constraint): Delete, no longer
8982 used.
8983 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
8984 predicate to reflect toc fusion has been deleted.
8985 (toc_fusion_mem_raw): Delete, no longer used.
8986 (toc_fusion_mem_wrapped): Likewise.
8987 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
8988 fusion mask bit.
8989 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
8990 Delete, no longer used.
8991 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
8992 meant to be used for toc fusion.
8993 (rs6000_debug_print_mode): Delete toc fusion debugging.
8994 (rs6000_debug_reg_global): Likewise.
8995 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
8996 fusion and secondary reload support that were never used.
8997 (rs6000_option_override_internal): Delete TOC fusion, that was only
8998 partially defined, and it did not work unless you also used the
8999 -mcmodel= switch.
9000 (rs6000_legitimate_address_p): Delete TOC fusion support.
9001 (rs6000_opt_masks): Likewise.
9002 (fusion_wrap_memory_address): Delete function, no longer used.
9003 (fusion_split_address); Delete TOC fusion support.
9004 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
9005 longer used with toc fusion being deleted.
9006 (TARGET_TOC_FUSION_FP): Likewise.
9007 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
9008 UNSPEC.
9009 (toc fusion spliter): Delete TOC fusion support.
9010 (toc_fusionload_<mode>): Likewise.
9011 (toc_fusionload_di): Likewise.
9012 (fusion_gpr_load_<mode>): Delete generator function, this insn no
9013 longer needs to be named. Rename predicate to delete TOC fusion.
9014 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9015 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9016 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9017 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9018 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
9019
9020 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
9021
9022 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
9023 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
9024 __int128 in built-in function prototypes.
9025 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
9026 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
9027
9028 2018-07-27 Martin Sebor <msebor@redhat.com>
9029
9030 PR tree-optimization/86696
9031 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
9032 types, including enums.
9033 (handle_char_store): Be prepared for the above function to fail.
9034
9035 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
9036
9037 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
9038 when optimization level is lower than 2 or optimize for size.
9039
9040 2018-07-26 Martin Sebor <msebor@redhat.com>
9041
9042 PR tree-optimization/86043
9043 PR tree-optimization/86042
9044 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
9045 (get_string_cst_length): Rename...
9046 (get_min_string_length): ...to this. Add argument.
9047 (handle_char_store): Extend to handle multi-character stores by
9048 MEM_REF.
9049 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
9050 * tree.h (initializer_zerop): Add argument.
9051
9052 2018-07-26 Jakub Jelinek <jakub@redhat.com>
9053
9054 PR middle-end/86660
9055 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
9056 declare target to variables if they have always,{to,from,tofrom} map
9057 kinds.
9058
9059 2018-07-26 Martin Liska <mliska@suse.cz>
9060
9061 PR lto/86548
9062 * lto-wrapper.c: Add linker_output as prefix
9063 for ltrans_output_file.
9064
9065 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
9066
9067 PR rtl-optimization/85805
9068 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
9069 value for hard registers if that was written in the same mode.
9070
9071 2018-07-26 Martin Liska <mliska@suse.cz>
9072
9073 PR gcov-profile/86536
9074 * gcov.c (format_gcov): Use printf format %.*f directly
9075 and do not handle special values.
9076
9077 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9078
9079 * common/config/arc/arc-common.c (arc_option_optimization_table):
9080 Update default optimizations for size.
9081
9082 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9083
9084 * config/arc/arc.md (movsf_insn): Add short instruction selection.
9085 * config/arc/constraints.md (CfZ): New constraint.
9086 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
9087 (subsf3_fpu): Likewise.
9088 (cmpsf_fpu): Likewise.
9089 (cmpsf_fpu_uneq): Likewise.
9090
9091 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9092
9093 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
9094 accesses as well.
9095 (arc_is_uncached_mem_p): uncached applies to both the variable and
9096 the pointer.
9097
9098 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9099
9100 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
9101 register names.
9102
9103 2018-07-25 David Malcolm <dmalcolm@redhat.com>
9104
9105 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
9106 field "m_scopes" from vec to auto_vec.
9107
9108 2018-07-25 Martin Liska <mliska@suse.cz>
9109
9110 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
9111 return type.
9112
9113 2018-07-25 Richard Biener <rguenther@suse.de>
9114
9115 PR debug/86654
9116 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
9117 special wrt context_die late.
9118 (gen_subprogram_die): Re-use DIEs in local scope.
9119
9120 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
9121
9122 PR tree-optimization/86644
9123 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
9124
9125 2018-07-25 Martin Liska <mliska@suse.cz>
9126
9127 PR middle-end/86645
9128 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
9129 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
9130
9131 2018-07-25 Martin Liska <mliska@suse.cz>
9132
9133 PR sanitizer/79635
9134 * params.def: Explain ASan abbreviation and provide
9135 a documentation link.
9136
9137 2018-07-24 Martin Sebor <msebor@redhat.com>
9138
9139 PR tree-optimization/86622
9140 PR tree-optimization/86532
9141 * builtins.h (string_length): Declare.
9142 * builtins.c (c_strlen): Correct handling of non-constant offsets.
9143 (check_access): Be prepared for non-constant length ranges.
9144 (string_length): Make extern.
9145 * expr.c (string_constant): Only handle the minor non-constant
9146 array index. Use string_constant to compute the length of
9147 a generic string constant.
9148
9149 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
9150
9151 PR tree-optimization/86618
9152 * tree-vect-stmts.c (vectorizable_call): Don't take the address
9153 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
9154
9155 2018-07-24 David Malcolm <dmalcolm@redhat.com>
9156
9157 PR tree-optimization/86636
9158 * json.cc (json::object::set): Fix comment. Add assertions.
9159 (json::array::append): Move here from json.h. Add comment and an
9160 assertion.
9161 (json::string::string): Likewise.
9162 * json.h (json::array::append): Move to json.cc.
9163 (json::string::string): Likewise.
9164 * optinfo-emit-json.cc
9165 (optrecord_json_writer::impl_location_to_json): Assert that we
9166 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9167 wrapper around it. Expand the location once, rather than three
9168 times.
9169 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9170 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9171 wrappers.
9172 (optrecord_json_writer::optinfo_to_json): Likewise, in four
9173 places. Fix some overlong lines.
9174
9175 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
9176
9177 * config/aarch64/aarch64-simd.md
9178 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9179 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9180 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9181 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9182 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9183 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9184 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9185 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9186 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9187
9188 2018-07-24 Jakub Jelinek <jakub@redhat.com>
9189
9190 PR middle-end/86627
9191 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9192 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
9193 and abs_d == d, do the power of two handling if profitable.
9194
9195 2018-07-24 Richard Biener <rguenther@suse.de>
9196
9197 * match.pd: Add BIT_FIELD_REF canonicalizations.
9198
9199 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9200
9201 PR c/86617
9202 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9203
9204 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9205
9206 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9207 terminated STRING_CST object.
9208
9209 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9210
9211 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9212
9213 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9214
9215 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9216 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9217 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9218 the elements into a register.
9219 (rs6000_split_v4si_init_di_reg): Delete.
9220 (rs6000_split_v4si_init): Delete.
9221 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9222 (vsx_init_v4si): Rewrite as a define_expand.
9223
9224 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9225
9226 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9227 zero_extend argument from memory): New.
9228
9229 2018-07-22 Martin Sebor <msebor@redhat.com>
9230
9231 PR bootstrap/86621
9232 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9233 diagnosing calls with unknown arguments unless -Walloca-larger-than
9234 is restricted to less than PTRDIFF_MAX bytes.
9235
9236 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
9237
9238 * doc/gcov.texi (Invoking Gcov): Editorial changes.
9239
9240 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9241
9242 * pretty-print.c (text_info::set_location): Remove redundant
9243 "line_table" parameter from call to rich_location::set_range.
9244
9245 2018-07-20 Martin Sebor <msebor@redhat.com>
9246
9247 PR middle-end/82063
9248 * builtins.c (expand_builtin_alloca): Adjust.
9249 * calls.c (alloc_max_size): Simplify.
9250 * cgraphunit.c (cgraph_node::expand): Adjust.
9251 * common.opt (larger_than_size, warn_frame_larger_than): Remove
9252 variables.
9253 (frame_larger_than_size): Same.
9254 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9255 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9256 Initialize.
9257 * doc/invoke.texi (GCC Command Options): Document option arguments.
9258 Explain byte-size arguments and suffixes.
9259 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9260 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9261 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9262 * doc/options.texi (UInteger): Expand.
9263 (Host_Wide_Int, ByteSize): Document new properties.
9264 * final.c (final_start_function_1): Include sizes in an error message.
9265 * function.c (frame_offset_overflow): Same.
9266 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9267 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9268 Diagnose unbounded alloca calls only for limits of less than
9269 PTRDIFF_MAX.
9270 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
9271 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
9272 for alloca(0).
9273 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
9274 only for limits of less than PTRDIFF_MAX.
9275 * langhooks-def.h (lhd_handle_option): Change function argument
9276 to HOST_WIDE_INT.
9277 * langhooks.c (lhd_handle_option): Same.
9278 * langhooks.h (handle_option): Same.
9279 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9280 ByteSize flags.
9281 (var_type, var_type_struct): Same.
9282 (var_set): Handle ByteSize flag.
9283 * optc-gen.awk: Add comments to output to ease debugging. Make
9284 use of HOST_WIDE_INT where appropriate.
9285 * opts-gen-save.awk: Use %lx to format unsigned long.
9286 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9287 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9288 arguments. Parse bytes-size suffixes.
9289 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9290 (enum_value_to_arg): Same.
9291 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
9292 (handle_option): Adjust.
9293 (generate_option): Change function argument to HOST_WIDE_INT.
9294 (cmdline_handle_error): Adjust.
9295 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9296 (set_option): Change function argument to HOST_WIDE_INT.
9297 (option_enabled): Handle cl_host_wide_int.
9298 (get_option_state): Handle CLVC_SIZE.
9299 (control_warning_option): Same.
9300 * opts.c (common_handle_option): Change function argument to
9301 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
9302 OPT_Wvla_larger_than_.
9303 * opts.h (enum cl_var_type): Add an enumerator.
9304 * stor-layout.c (layout_decl): Print a more meaningful warning.
9305 * toplev.c (output_stack_usage): Adjust.
9306
9307 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
9308
9309 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9310 call to inline_expand_builtin_string_cmp.
9311 (expand_builtin_strcmp): Likewise.
9312 (expand_builtin_strncmp): Likewise.
9313 (inline_string_cmp): Delete the last parameter, change char_type_node
9314 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9315 two operands.
9316 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9317 the inlining expansion on target where the type of the call has same or
9318 narrower precision than unsigned char.
9319
9320 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9321
9322 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9323 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9324 * common.opt (fsave-optimization-record): New option.
9325 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9326 * doc/invoke.texi (-fsave-optimization-record): New option.
9327 * dumpfile.c: Include "optinfo-emit-json.h".
9328 (struct kv_pair): Move to coretypes.h.
9329 (optgroup_options): Make non-static.
9330 (dump_context::end_scope): Call
9331 optimization_records_maybe_pop_dump_scope.
9332 * dumpfile.h (optgroup_options): New decl.
9333 * json.cc: New file.
9334 * json.h: New file.
9335 * optinfo-emit-json.cc: New file.
9336 * optinfo-emit-json.h: New file.
9337 * optinfo.cc: Include "optinfo-emit-json.h".
9338 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9339 (optinfo_enabled_p): Check optimization_records_enabled_p.
9340 (optinfo_wants_inlining_info_p): Likewise.
9341 * optinfo.h: Update comment.
9342 * profile-count.c (profile_quality_as_string): New function.
9343 * profile-count.h (profile_quality_as_string): New decl.
9344 (profile_count::quality): New accessor.
9345 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9346 and optinfo_emit_json_cc_tests.
9347 * selftest.h (selftest::json_cc_tests): New decl.
9348 (selftest::optinfo_emit_json_cc_tests): New decl.
9349 * toplev.c: Include "optinfo-emit-json.h".
9350 (compile_file): Call optimization_records_finish.
9351 (do_compile): Call optimization_records_start.
9352 * tree-ssa-live.c: Include optinfo.h.
9353 (remove_unused_scope_block_p): Retain inlining information if
9354 optinfo_wants_inlining_info_p returns true.
9355
9356 2018-07-20 Richard Biener <rguenther@suse.de>
9357
9358 PR debug/86585
9359 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9360 to cover -flto-partition=none.
9361
9362 2018-07-20 Martin Liska <mliska@suse.cz>
9363
9364 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9365 (get_decl_source_range): Remove unused function.
9366
9367 2018-07-20 Richard Biener <rguenther@suse.de>
9368
9369 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9370 (struct vn_phi_s): Likewise.
9371 (struct vn_reference_s): Likewise.
9372 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9373 for searching the slot of an entry known to be in the hash itself.
9374 (vn_phi_hasher::equal): Likewise.
9375 (vn_reference_hasher::equal): Likewise.
9376 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9377 globals.
9378 (optimistic_info, current_info): Remove, keeping only valid_info.
9379 (vn_reference_lookup_1): Remove fallback lookup.
9380 (vn_reference_lookup_2): Likewise.
9381 (vn_nary_op_lookup_1): Likewise.
9382 (vn_phi_lookup): Likewise.
9383 (vn_nary_build_or_lookup_1): Make sure to not chain the built
9384 hash element.
9385 (vn_reference_insert): Adjust, chain the inserted hash element
9386 at last_inserted_ref.
9387 (vn_reference_insert_pieces): Likewise.
9388 (visit_reference_op_call): Likewise.
9389 (vn_nary_op_insert_into): Chain the inserted hash element at
9390 last_inserted_nary.
9391 (vn_nary_op_insert_pieces): Adjust.
9392 (vn_nary_op_insert): Likewise.
9393 (vn_nary_op_insert_stmt): Likewise.
9394 (vn_phi_insert): Adjust, chain the inserted hash element at
9395 last_inserted_phi.
9396 (process_scc): Remove clearing and copying the optimistic
9397 table. Instead remove elements inserted during an optimistic
9398 iteration from the single table we maintain.
9399 (init_scc_vn): Adjust.
9400 (free_scc_vn): Likewise.
9401 (sccvn_dom_walker::record_cond): Likewise.
9402 (sccvn_dom_walker::after_dom_children): Likewise.
9403
9404 2018-07-19 Martin Sebor <msebor@redhat.com>
9405
9406 PR tree-optimization/84047
9407 PR tree-optimization/83776
9408 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9409 (check_array_bounds): Call it.
9410
9411 2018-07-19 Martin Sebor <msebor@redhat.com>
9412
9413 * align.h (align_flags): Use member initialization.
9414
9415 2018-07-19 David Malcolm <dmalcolm@redhat.com>
9416
9417 * Makefile.in (OBJS): Add optinfo.o.
9418 * coretypes.h (class symtab_node): New forward decl.
9419 (struct cgraph_node): New forward decl.
9420 (class varpool_node): New forward decl.
9421 * dump-context.h: New file.
9422 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
9423 "tree-pass.h".
9424 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
9425 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
9426 (set_alt_dump_file): Likewise.
9427 (dump_context::~dump_context): New dtor.
9428 (dump_gimple_stmt): Move implementation to...
9429 (dump_context::dump_gimple_stmt): ...this new member function.
9430 Add the stmt to any pending optinfo, creating one if need be.
9431 (dump_gimple_stmt_loc): Move implementation to...
9432 (dump_context::dump_gimple_stmt_loc): ...this new member function.
9433 Start a new optinfo and add the stmt to it.
9434 (dump_gimple_expr): Move implementation to...
9435 (dump_context::dump_gimple_expr): ...this new member function.
9436 Add the stmt to any pending optinfo, creating one if need be.
9437 (dump_gimple_expr_loc): Move implementation to...
9438 (dump_context::dump_gimple_expr_loc): ...this new member function.
9439 Start a new optinfo and add the stmt to it.
9440 (dump_generic_expr): Move implementation to...
9441 (dump_context::dump_generic_expr): ...this new member function.
9442 Add the tree to any pending optinfo, creating one if need be.
9443 (dump_generic_expr_loc): Move implementation to...
9444 (dump_context::dump_generic_expr_loc): ...this new member
9445 function. Add the tree to any pending optinfo, creating one if
9446 need be.
9447 (dump_printf): Move implementation to...
9448 (dump_context::dump_printf_va): ...this new member function. Add
9449 the text to any pending optinfo, creating one if need be.
9450 (dump_printf_loc): Move implementation to...
9451 (dump_context::dump_printf_loc_va): ...this new member function.
9452 Start a new optinfo and add the stmt to it.
9453 (dump_dec): Move implementation to...
9454 (dump_context::dump_dec): ...this new member function. Add the
9455 value to any pending optinfo, creating one if need be.
9456 (dump_context::dump_symtab_node): New member function.
9457 (dump_context::get_scope_depth): New member function.
9458 (dump_context::begin_scope): New member function.
9459 (dump_context::end_scope): New member function.
9460 (dump_context::ensure_pending_optinfo): New member function.
9461 (dump_context::begin_next_optinfo): New member function.
9462 (dump_context::end_any_optinfo): New member function.
9463 (dump_context::s_current): New global.
9464 (dump_context::s_default): New global.
9465 (dump_scope_depth): Delete global.
9466 (dumpfile_ensure_any_optinfo_are_flushed): New function.
9467 (dump_symtab_node): New function.
9468 (get_dump_scope_depth): Reimplement in terms of dump_context.
9469 (dump_begin_scope): Likewise.
9470 (dump_end_scope): Likewise.
9471 (selftest::temp_dump_context::temp_dump_context): New ctor.
9472 (selftest::temp_dump_context::~temp_dump_context): New dtor.
9473 (selftest::verify_item): New function.
9474 (ASSERT_IS_TEXT): New macro.
9475 (ASSERT_IS_TREE): New macro.
9476 (ASSERT_IS_GIMPLE): New macro.
9477 (selftest::test_capture_of_dump_calls): New test.
9478 (selftest::dumpfile_c_tests): Call it.
9479 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
9480 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
9481 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
9482 descriptive comment.
9483 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
9484 (dump_node, dump_bb): Move these unrelated decls.
9485 (class dump_manager): Add leading comment.
9486 * optinfo.cc: New file.
9487 * optinfo.h: New file.
9488
9489 2018-07-19 Michael Collison <michael.collison@arm.com>
9490 Richard Henderson <rth@redhat.com>
9491
9492 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
9493 (subti): Handle op1 zero.
9494 (subvti4, usub4ti4): New.
9495 (*sub<GPI>3_compare1_imm): New.
9496 (sub<GPI>3_carryinCV): New.
9497 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
9498 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
9499
9500 2018-07-19 Michael Collison <michael.collison@arm.com>
9501 Richard Henderson <rth@redhat.com>
9502
9503 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
9504 (addti3): Create simpler code if low part is already known to be 0.
9505 (addvti4, uaddvti4): New.
9506 (*add<GPI>3_compareC_cconly_imm): New.
9507 (*add<GPI>3_compareC_cconly): New.
9508 (*add<GPI>3_compareC_imm): New.
9509 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
9510 handle constants within this pattern..
9511 (*add<GPI>3_compareV_cconly_imm): New.
9512 (*add<GPI>3_compareV_cconly): New.
9513 (*add<GPI>3_compareV_imm): New.
9514 (add<GPI>3_compareV): New.
9515 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
9516 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
9517 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
9518 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
9519 with 'comparison' operator.
9520 (*add<GPI>3_compareV_cconly_imm): Ditto.
9521 (*add<GPI>3_compareV_cconly): Ditto.
9522 (*add<GPI>3_compareV_imm): Ditto.
9523 (add<GPI>3_compareV): Ditto.
9524 (add<mode>3_carryinC): Ditto.
9525 (*add<mode>3_carryinC_zero): Ditto.
9526 (*add<mode>3_carryinC): Ditto.
9527 (add<mode>3_carryinV): Ditto.
9528 (*add<mode>3_carryinV_zero): Ditto.
9529 (*add<mode>3_carryinV): Ditto.
9530
9531 2018-07-19 Michael Collison <michael.collison@arm.com>
9532 Richard Henderson <rth@redhat.com>
9533
9534 * config/aarch64/aarch64-modes.def (CC_V): New.
9535 * config/aarch64/aarch64-protos.h
9536 (aarch64_addti_scratch_regs): Declare
9537 (aarch64_subvti_scratch_regs): Declare.
9538 (aarch64_expand_subvti): Declare.
9539 (aarch64_gen_unlikely_cbranch): Declare
9540 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
9541 for signed overflow using CC_Vmode.
9542 (aarch64_get_condition_code_1): Handle CC_Vmode.
9543 (aarch64_gen_unlikely_cbranch): New function.
9544 (aarch64_addti_scratch_regs): New function.
9545 (aarch64_subvti_scratch_regs): New function.
9546 (aarch64_expand_subvti): New function.
9547
9548 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9549
9550 * config/aarch64/aarch64-option-extensions.def: New entry for profile
9551 extension.
9552 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
9553 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
9554 extension.
9555
9556 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9557
9558 PR target/83009
9559 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9560 address check not strict.
9561
9562 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9563
9564 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
9565 Umq with Umn.
9566 (store_pair_lanes<mode>): Likewise.
9567 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
9568 enum value 'ADDR_QUERY_LDP_STP_N'.
9569 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
9570 (aarch64_print_address_internal): Add declaration.
9571 (aarch64_print_ldpstp_address): Remove.
9572 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
9573 (aarch64_print_operand): Change printing of 'y'.
9574 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
9575 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
9576 'true' rather than '1'.
9577 * config/aarch64/constraints.md (Uml): Likewise.
9578 (Uml): Rename to Umn.
9579 (Umq): Remove.
9580
9581 2018-07-19 Richard Biener <rguenther@suse.de>
9582
9583 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
9584 a trailing array.
9585 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
9586 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
9587 (vn_reference_hasher): Likewise.
9588 (struct vn_tables_s): Remove obstack and alloc-pool members.
9589 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
9590 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
9591 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
9592 (vn_reference_insert_pieces): Likewise.
9593 (alloc_vn_nary_op_noinit): Adjust.
9594 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
9595 (vn_phi_eq): Adjust.
9596 (shared_lookup_phiargs): Remove.
9597 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
9598 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
9599 (visit_reference_op_call): Likewise.
9600 (copy_nary, copy_phi, copy_reference): Remove.
9601 (process_scc): Rewind the obstack when iterating. Do not
9602 copy the elements to valid_info but just move them from one
9603 hashtable to the other.
9604 (allocate_vn_table): Adjust.
9605 (free_vn_table): Likewise.
9606 (init_scc_vn): Likewise.
9607 (free_scc_vn): Likewise.
9608
9609 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
9610
9611 PR target/86560
9612 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
9613 indirect_return as function type attribute.
9614 (ix86_attribute_table): Change indirect_return to function
9615 type attribute.
9616 * doc/extend.texi: Update indirect_return attribute.
9617
9618 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
9619
9620 * wide-int.h (widest2_int): New.
9621 * gimple-fold.c (arith_overflowed_p): Use it.
9622 * tree.h (widest2_int_cst): New.
9623 * tree-vrp.c (wide_int_binop_overflow): Rename from
9624 vrp_int_const_binop.
9625 Rewrite to work on trees.
9626 (extract_range_from_multiplicative_op_1): Abstract code to...
9627 (wide_int_range_min_max): ...here.
9628 (wide_int_range_cross_product): ...and here.
9629 (extract_range_from_binary_expr_1): Abstract overflow code to...
9630 (wide_int_range_mult_wrapping): ...here.
9631 * tree-vrp.h (wide_int_range_cross_product): New.
9632 (wide_int_range_mult_wrapping): New.
9633
9634 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
9635 Julia Koval <julia.koval@intel.com>
9636
9637 * config/i386/x86-tune-costs.h (skylake_memcpy,
9638 skylake_memset): Replace rep_prefix with unrolling for size 512.
9639
9640 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
9641
9642 PR middle-end/86544
9643 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
9644 comparision with EQ_EXPR in last stmt.
9645
9646 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
9647
9648 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
9649 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
9650 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
9651 previously known as "PowerPC AltiVec Built-in Functions". Move
9652 some material to new subsubsections "PowerPC AltiVec Built-in
9653 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
9654 ISA 2.07".
9655 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
9656 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
9657 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
9658 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
9659
9660 2018-07-18 Richard Biener <rguenther@suse.de>
9661
9662 PR tree-optimization/86557
9663 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
9664 EXACT_DIV_EXPR.
9665
9666 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
9667
9668 * config/s390/s390.c (s390_function_profiler): Generate CFI.
9669
9670 2018-07-17 Jeff Law <law@redhat.com>
9671
9672 * config/arm/arm.c (get_label_padding): Update for recent
9673 changes to label_to_alignment.
9674
9675 PR tree-optimization/86010
9676 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
9677
9678 * config/mips/mips.c (vr4130_align_insns): Update for recent
9679 changes to label_to_alignment.
9680
9681 * config/frv/frv.c (frv_label_align): Update for recent changes
9682 to label_to_alignment.
9683
9684 * config/nios2/nios2.c (nios2_label_align): Update for recent
9685 changes which dropped ALIGN_LABELS_LOG.
9686
9687 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
9688
9689 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
9690 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
9691
9692 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
9693
9694 * config/arc/arc.c (arc_label_align): Use align_labels instead of
9695 deprecated align_labels_log.
9696
9697 2018-07-17 Richard Biener <rguenther@suse.de>
9698
9699 PR lto/86456
9700 * dwarf2out.c (init_sections_and_labels): Always generate
9701 a debug_line_str_section for early LTO debug.
9702 (dwarf2out_finish): Reset debug_line_str_hash output early.
9703 Bump counter for extra dwarf5 .debug_loc labels to not conflict
9704 with fat LTO part.
9705 (dwarf2out_early_finish): Output debug_line_str.
9706
9707 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9708
9709 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
9710 index register on z196 or later.
9711
9712 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9713
9714 * config/s390/s390.c (s390_default_align): Set default function
9715 alignment to 16.
9716 (s390_override_options_after_change): Call s390_default align.
9717 (s390_option_override_internal): Call s390_default_align.
9718 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
9719
9720 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9721
9722 PR middle-end/86542
9723 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
9724 to _looptemp_ clauses, other than the first two.
9725
9726 2018-07-17 Martin Liska <mliska@suse.cz>
9727
9728 * opts.c: Do not enable OPT_falign_* for -Os.
9729
9730 2018-07-17 Martin Liska <mliska@suse.cz>
9731
9732 * align.h (MAX_CODE_ALIGN): New.
9733 (MAX_CODE_ALIGN_VALUE): New.
9734 * common/config/i386/i386-common.c (ix86_handle_option):
9735 (MAX_CODE_ALIGN): Moved to align.h.
9736 * final.c (MAX_CODE_ALIGN): Likewise.
9737 * opts.c (parse_and_check_align_values):
9738 (MAX_CODE_ALIGN): Likewise.
9739 (MAX_CODE_ALIGN_VALUE): Likewise.
9740
9741 2018-07-17 Martin Liska <mliska@suse.cz>
9742
9743 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
9744 in order to fulfil coding style.
9745 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
9746 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9747 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9748 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
9749 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
9750 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
9751 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
9752 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
9753 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9754
9755 2018-07-17 Martin Liska <mliska@suse.cz>
9756
9757 * align.h: New file.
9758 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
9759 directly.
9760 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
9761 align_flags of label_to_alignment.
9762 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
9763 align_flags class.
9764 * config/m68k/m68k.c: Do not use removed align_labels_value and
9765 align_loops_value.
9766 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
9767 (LOOP_ALIGN): Likewise.
9768 (LABEL_ALIGN): Likewise.
9769 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9770 Remove not used macro.
9771 (rs6000_loop_align): Change return type to align_flags.
9772 (rs6000_loop_align_max_skip): Remove.
9773 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
9774 Change return type to align_flags.
9775 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9776 Remove not used macro.
9777 (rs6000_loop_align): Change return type to align_flags.
9778 (rs6000_loop_align_max_skip): Remove.
9779 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
9780 * config/rx/rx-protos.h (rx_align_for_label): Make it
9781 static function.
9782 * config/rx/rx.c (rx_align_for_label): Change return type
9783 to align_flags.
9784 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
9785 macro definitions.
9786 into align_flags class.
9787 (LABEL_ALIGN): Likewise.
9788 (LOOP_ALIGN): Likewise.
9789 * config/s390/s390.c (s390_label_align): Use align_flags
9790 class member.
9791 (s390_asm_output_function_label): Likewise.
9792 * config/sh/sh.c (sh_override_options_after_change):
9793 Use align_flags class directly without macros.
9794 (find_barrier): Likewise.
9795 (barrier_align): Likewise.
9796 (sh_loop_align): Likewise.
9797 * config/spu/spu.c (spu_option_override):
9798 Use align_flags_tuple::get_value instead of removed macros.
9799 (spu_sched_init): Likewise.
9800 * config/spu/spu.h (GTY): Likewise.
9801 * config/visium/visium.c (visium_option_override):
9802 Set "8" as default secondary alignment.
9803 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
9804 in order to guarantee secondary alignment of 8.
9805 * coretypes.h: Include align.h header file.
9806 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
9807 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
9808 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
9809 * doc/tm.texi.in: Likewise.
9810 * final.c (struct label_alignment): Remove not used structure.
9811 (LABEL_ALIGN): Change type to align_flags.
9812 (LOOP_ALIGN): Likewise.
9813 (JUMP_ALIGN): Likewise.
9814 (default_loop_align_max_skip): Remove.
9815 (default_label_align_max_skip): Likewise.
9816 (default_jump_align_max_skip): Likewise.
9817 (default_label_align_after_barrier_max_skip):
9818 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
9819 (LABEL_TO_MAX_SKIP): Remove.
9820 (label_to_alignment): Return align_flags type instead of integer.
9821 (label_to_max_skip): Remove.
9822 (align_fuzz): Use align_flags type.
9823 (compute_alignments): Use align_flags type and use align_flags::max
9824 to combine multiple alignments.
9825 (grow_label_align): Grow vec instead of C array.
9826 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
9827 (shorten_branches): Use align_flags type and use align_flags::max
9828 to combine multiple alignments.
9829 (final_scan_insn_1): Remove usage of secondary alignment that comes
9830 from label alignment, but instead use proper secondary alignment
9831 which is computed in grow_label_align.
9832 * flags.h (struct align_flags_tuple): Move to align.h.
9833 (struct align_flags): Likewise.
9834 (state_align_loops): Rename to align_loops.
9835 (state_align_jumps): Rename to align_jumps.
9836 (state_align_labels): Rename to align_labels.
9837 (state_align_functions): Rename to align_functions.
9838 (align_loops_log): Remove.
9839 (align_jumps_log): Remove.
9840 (align_labels_log): Remove.
9841 (align_functions_log): Remove.
9842 (align_loops_max_skip): Remove.
9843 (align_jumps_max_skip): Remove.
9844 (align_labels_max_skip): Remove.
9845 (align_functions_max_skip): Remove.
9846 (align_loops_value): Remove.
9847 (align_jumps_value): Remove.
9848 (align_labels_value): Remove.
9849 (align_functions_value): Remove.
9850 * output.h (label_to_alignment): Change return type to align_flags.
9851 (label_to_max_skip): Remove.
9852 * target.def: Remove loop_align_max_skip, label_align_max_skip,
9853 jump_align_max_skip macros.
9854 * targhooks.h (default_loop_align_max_skip): Remove.
9855 (default_label_align_max_skip): Likewise.
9856 (default_jump_align_max_skip): Likewise.
9857 (default_label_align_after_barrier_max_skip): Remove.
9858 * toplev.c (read_log_maxskip): Use ::normalize function.
9859 (parse_N_M): Remove not used argument and also call ::normalize.
9860 (parse_alignment_opts): Do not pass unused arguments.
9861 * varasm.c (assemble_start_function): Use directly align_functions
9862 instead of removed macros.
9863 * system.h: Do not poison removed macros.
9864
9865 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9866
9867 PR middle-end/86539
9868 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
9869 and cond temporaries don't have reference type if iterator has
9870 pointer type. For init use &for_pre_body instead of pre_p if
9871 for_pre_body is non-empty.
9872
9873 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9874
9875 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
9876 double-double modes to SFmode directly directly.
9877 (trunc<mode>sf2_fprs): Delete.
9878
9879 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9880
9881 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
9882 for conversions between IFmode and the decimal floating point modes.
9883 (init_float128_ieee): Use the correct names for conversions between
9884 KFmode and the decimal floating point modes.
9885
9886 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9887
9888 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
9889 for the conversions between TDmode and IFmode.
9890 (init_float128_ieee): Use more correct names for the conversions
9891 between TDmode and KFmode.
9892
9893 2018-07-16 Jakub Jelinek <jakub@redhat.com>
9894
9895 PR tree-optimization/86526
9896 * builtins.c (expand_builtin_memcmp): Formatting fixes.
9897 (inline_expand_builtin_string_cmp): Likewise.
9898 (inline_string_cmp): Likewise. Use c_readstr instead of
9899 builtin_memcpy_read_str. Add unit_mode temporary.
9900
9901 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
9902
9903 PR middle-end/86528
9904 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
9905 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
9906
9907 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
9908
9909 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
9910 Alphabetize prototypes of built-in functions, separating out
9911 built-in functions that are listed in this section but should be
9912 described elsewhere.
9913
9914 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
9915
9916 PR target/86511
9917 * expmed.c (emit_store_flag): Do not emit setcc followed by a
9918 conditional move when trapping comparison was split to a
9919 non-trapping one (and vice versa).
9920
9921 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9922
9923 * config/s390/s390.c (s390_function_profiler): Generate nops
9924 instead of profiler call sequences.
9925 * config/s390/s390.opt: Add the new option.
9926
9927 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9928
9929 * config/s390/s390.c (s390_function_profiler): Generate
9930 __mcount_loc section.
9931 * config/s390/s390.opt: Add the new option.
9932
9933 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9934
9935 * common.opt: Add the new warning.
9936 * config/s390/s390.c (s390_function_profiler): Emit "brasl
9937 %r0,__fentry__" when -mfentry is specified.
9938 (s390_option_override_internal): Disallow -mfentry for 31-bit
9939 CPUs.
9940 * config/s390/s390.opt: Add the new option.
9941
9942 2018-07-16 Richard Biener <rguenther@suse.de>
9943
9944 PR lto/86523
9945 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
9946 for function-local FUNCTION_DECL and RESULT_DECL immediately.
9947
9948 2018-07-16 Martin Liska <mliska@suse.cz>
9949
9950 PR ipa/86529
9951 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
9952 to ::get_create.
9953
9954 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
9955
9956 * config/arc/arcHS.md: Update ARCHS scheduling rules.
9957
9958 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
9959
9960 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
9961 for ARCHS4x.
9962 * config/arc/arc-cpus.def (hs4x): New cpu.
9963 (hs4xd): Likewise.
9964 * config/arc/arc-tables.opt: Regenerate.
9965 * config/arc/arc.c (arc_sched_issue_rate): New function.
9966 (TARGET_SCHED_ISSUE_RATE): Define.
9967 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
9968 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
9969 fpu_cvt.
9970 (attr tune): Add ARCHS4x tune values.
9971 (attr tune_dspmpy): Define.
9972 (*tst): Correct instruction type.
9973 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
9974 * config/arc/arcHS4x.md: New file.
9975 * config/arc/fpu.md: Update instruction type attributes.
9976 * config/arc/t-multilib: Regenerate.
9977
9978 2018-07-16 Tom de Vries <tdevries@suse.de>
9979
9980 PR debug/86455
9981 * var-tracking.c (vt_initialize): Fix pre_dec handling.
9982
9983 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9984
9985 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
9986 early clobber.
9987
9988 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
9989
9990 PR tree-optimization/86514
9991 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
9992 conversion to a boolean type from a type with greater precision.
9993
9994 2018-07-16 Tom de Vries <tdevries@suse.de>
9995
9996 * var-tracking.c (vt_initialize): Print adjusted insn slim if
9997 dump_flags request TDF_SLIM.
9998
9999 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
10000
10001 * fold-const.c (int_const_binop_1): Abstract...
10002 (wide_int_binop): ...wide int code here.
10003 (poly_int_binop): ...poly int code here.
10004 Abstract the rest of int_const_binop_1 into int_const_binop.
10005 * fold-const.h (wide_int_binop): New.
10006 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
10007 Remove useless PLUS/MINUS_EXPR case.
10008 (zero_nonzero_bits_from_vr): Move wide int code...
10009 (zero_nonzero_bits_from_bounds): ...here.
10010 (extract_range_from_binary_expr_1): Move mask optimization code...
10011 (range_easy_mask_min_max): ...here.
10012 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
10013 (range_easy_mask_min_max): New.
10014
10015 2018-07-15 Jeff Law <law@redhat.com>
10016
10017 PR target/85993
10018 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
10019 block.
10020
10021 2018-07-14 Jim Wilson <jimw@sifive.com>
10022
10023 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
10024
10025 2018-07-14 Paul Koning <ni1d@arrl.net>
10026
10027 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
10028
10029 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
10030
10031 * lto-streamer-out.c (copy_function_or_variable): Dump info about
10032 copying section.
10033
10034 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
10035 Steve Munroe <munroesj52@gmail.com>
10036
10037 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
10038 (_mm_andnot_si128): Likewise.
10039 (_mm_or_si128): Likewise.
10040 (_mm_xor_si128): Likewise.
10041
10042 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
10043
10044 PR middle-end/78809
10045 * builtins.c (expand_builtin_memcmp): Inline the calls first
10046 when result_eq is false.
10047 (expand_builtin_strcmp): Inline the calls first.
10048 (expand_builtin_strncmp): Likewise.
10049 (inline_string_cmp): New routine. Expand a string compare
10050 call by using a sequence of char comparison.
10051 (inline_expand_builtin_string_cmp): New routine. Inline expansion
10052 a call to str(n)cmp/memcmp.
10053 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
10054 New option.
10055 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
10056
10057 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
10058
10059 * config/arm/driver-arm.c: Include arm-native.h.
10060 (host_detect_local_cpu): Use auto-generated data tables.
10061 (vendors, arm_cpu_table): Delete. Move part information to ...
10062 * config/arm/arm-cpus.in: ... here.
10063 * config/arm/parsecpu.awk (gen_native): New function.
10064 (vendor, part): New CPU fields.
10065 (END): Add support for building the native CPU detection tables.
10066 * config/arm/t-arm (arm-native.h): Add build rule.
10067 (driver-arm.o): Add dependency on arm-native.h.
10068
10069 2018-07-13 Richard Biener <rguenther@suse.de>
10070
10071 PR middle-end/85974
10072 * match.pd (addr1 - addr2): Allow either of the operand to
10073 have a conversion.
10074
10075 2018-07-13 Tom de Vries <tdevries@suse.de>
10076
10077 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
10078 in remap_ssa_name.
10079
10080 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
10081
10082 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
10083 arrays instead of numbered variables.
10084
10085 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
10086
10087 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
10088 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
10089
10090 2018-07-13 Richard Biener <rguenther@suse.de>
10091
10092 PR debug/86452
10093 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
10094 instead of get_context_die.
10095
10096 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
10097 Richard Biener <rguenther@suse.de>
10098
10099 PR middle-end/86489
10100 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
10101 that the loop latch destination where phi is defined.
10102
10103 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
10104
10105 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
10106 (riscv_expand_epilogue): Add assertion to check interrupt mode.
10107 (riscv_set_current_function): Extract getting interrupt type to new
10108 function.
10109 (riscv_get_interrupt_type): New function.
10110 (riscv_merge_decl_attributes): New function, checking interrupt type is
10111 same.
10112 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
10113
10114 2018-07-12 Paul Koning <ni1d@arrl.net>
10115
10116 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
10117 directive.
10118
10119 2018-07-12 Paul Koning <ni1d@arrl.net>
10120
10121 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
10122 zero reference, add doloop_end instead.
10123 * doc/md.texi (decrement_and_branch_until_zero): Remove.
10124 (Looping patterns): Remove decrement_and_branch_until_zero. Add
10125 detail for doloop_end.
10126
10127 2018-07-12 Martin Sebor <msebor@redhat.com>
10128
10129 PR c/86453
10130 * attribs.c (decl_attributes): Reject conflicting attributes before
10131 calling attribute handlers.
10132
10133 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10134
10135 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
10136 parameter.
10137 (gcc::dump_manager::get_dump_file_name): likewise.
10138 (dump_begin): Likewise.
10139 * dumpfile.h (dump_begin): Update prototype.
10140 (gcc::dump_manager::get_dump_file_name,
10141 gcc::dump_manager::get_dump_file_name): Update prototype.
10142
10143 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10144
10145 * internal-fn.h (vectorizable_internal_fn_p): New function.
10146 * tree-vect-slp.c (compatible_calls_p): Likewise.
10147 (vect_build_slp_tree_1): Remove nops argument. Handle calls
10148 to internal functions.
10149 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
10150
10151 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10152
10153 * fold-const.h (inverse_conditions_p): Declare.
10154 * fold-const.c (inverse_conditions_p): New function.
10155 * match.pd: Use inverse_conditions_p. Add folds of view_converts
10156 that test the inverse condition of a conditional internal function.
10157 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
10158 * internal-fn.c (internal_fn_mask_index): Handle conditional
10159 internal functions.
10160 (vectorized_internal_fn_supported_p): New function.
10161 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10162 (any_pred_load_store): Replace with...
10163 (need_to_predicate): ...this new variable.
10164 (redundant_ssa_names): New variable.
10165 (ifcvt_can_use_mask_load_store): Move initial checks to...
10166 (ifcvt_can_predicate): ...this new function. Handle tree codes
10167 for which a conditional internal function exists.
10168 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10169 instead of ifcvt_can_use_mask_load_store. Update after variable
10170 name change.
10171 (predicate_load_or_store): New function, split out from
10172 predicate_mem_writes.
10173 (check_redundant_cond_expr): New function.
10174 (value_available_p): Likewise.
10175 (predicate_rhs_code): Likewise.
10176 (predicate_mem_writes): Rename to...
10177 (predicate_statements): ...this. Use predicate_load_or_store
10178 and predicate_rhs_code.
10179 (combine_blocks, tree_if_conversion): Update after above name changes.
10180 (ifcvt_local_dce): Handle redundant_ssa_names.
10181 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10182 general conditional functions.
10183 * tree-vect-stmts.c (vectorizable_call): Likewise.
10184
10185 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10186 Alan Hayward <alan.hayward@arm.com>
10187 David Sherwood <david.sherwood@arm.com>
10188
10189 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10190 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10191 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10192 plus and minus and convert them into IFN_COND_FMA-based sequences.
10193 (convert_mult_to_fma): Handle conditional plus and minus.
10194
10195 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10196
10197 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10198 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10199 (cond_fnms_optab): New optabs.
10200 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10201 internal functions.
10202 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10203 * internal-fn.h (get_conditional_internal_fn): Declare.
10204 (get_unconditional_internal_fn): Likewise.
10205 * internal-fn.c (cond_ternary_direct): New macro.
10206 (expand_cond_ternary_optab_fn): Likewise.
10207 (direct_cond_ternary_optab_supported_p): Likewise.
10208 (FOR_EACH_COND_FN_PAIR): Likewise.
10209 (get_conditional_internal_fn): New function.
10210 (get_unconditional_internal_fn): Likewise.
10211 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10212 (gimple_match_op::gimple_match_op): Add a new overload for 5
10213 operands.
10214 (gimple_match_op::set_op): Likewise.
10215 (gimple_resimplify5): Declare.
10216 * genmatch.c (decision_tree::gen): Generate simplifications for
10217 5 operands.
10218 * gimple-match-head.c (gimple_simplify): Define an overload for
10219 5 operands. Handle calls with 5 arguments in the top-level overload.
10220 (convert_conditional_op): Handle conversions from unconditional
10221 internal functions to conditional ones.
10222 (gimple_resimplify5): New function.
10223 (build_call_internal): Pass a fifth operand.
10224 (maybe_push_res_to_seq): Likewise.
10225 (try_conditional_simplification): Try converting conditional
10226 internal functions to unconditional internal functions.
10227 Handle 3-operand unconditional forms.
10228 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10229 Define ternary equivalents of the current rules for binary conditional
10230 internal functions.
10231 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10232 ternary operations.
10233 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10234 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10235 (optab): Handle them.
10236 (SVE_COND_FP_TERNARY): New int iterator.
10237 (sve_fmla_op, sve_fmad_op): New int attributes.
10238 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10239 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10240 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10241
10242 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10243
10244 * target.def (preferred_else_value): New target hook.
10245 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10246 * doc/tm.texi: Regenerate.
10247 * targhooks.h (default_preferred_else_value): Declare.
10248 * targhooks.c (default_preferred_else_value): New function.
10249 * internal-fn.h (conditional_internal_fn_code): Declare.
10250 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10251 (get_conditional_internal_fn): Use it.
10252 (conditional_internal_fn_code): New function.
10253 * gimple-match.h (gimple_match_cond): New struct.
10254 (gimple_match_op): Add a cond member function.
10255 (gimple_match_op::gimple_match_op): Update all forms to take a
10256 gimple_match_cond.
10257 * genmatch.c (expr::gen_transform): Use the same condition as res_op
10258 for the suboperation, but don't specify a particular else_value.
10259 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10260 (visit_nary_op, visit_reference_op_load): Pass
10261 gimple_match_cond::UNCOND to the gimple_match_op constructor.
10262 * gimple-match-head.c: Include tree-eh.h
10263 (convert_conditional_op): New function.
10264 (maybe_resimplify_conditional_op): Likewise.
10265 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10266 (gimple_resimplify2): Likewise.
10267 (gimple_resimplify3): Likewise.
10268 (gimple_resimplify4): Likewise.
10269 (maybe_push_res_to_seq): Return null for conditional operations.
10270 (try_conditional_simplification): New function.
10271 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
10272 constructor.
10273 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10274 IFN_COND_* call.
10275 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10276 function.
10277 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10278
10279 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10280
10281 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10282 DECL_FCONTEXT
10283 (hash_tree): Do not hash DECL_FCONTEXT
10284 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10285 Do not stream DECL_FCONTEXT.
10286 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10287 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10288
10289 2018-07-12 Richard Biener <rguenther@suse.de>
10290
10291 PR debug/86462
10292 * dwarf2out.c (gen_block_die): Only output blocks when they have
10293 at least one !DECL_IGNORED_P variable.
10294
10295 2018-07-12 Richard Biener <rguenther@suse.de>
10296
10297 PR target/84829
10298 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10299 Remove -mieee-fp handling.
10300
10301 2018-07-12 Richard Biener <rguenther@suse.de>
10302
10303 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10304 left-over from last patch.
10305
10306 2018-07-12 Jakub Jelinek <jakub@redhat.com>
10307
10308 PR tree-optimization/86492
10309 * gimple-ssa-store-merging.c
10310 (imm_store_chain_info::coalesce_immediate_stores): Call
10311 check_no_overlap even for the merge_overlapping case. Formatting fix.
10312
10313 2018-07-12 Richard Biener <rguenther@suse.de>
10314
10315 PR middle-end/86479
10316 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10317 move possibly trapping operations into the conditional.
10318
10319 2018-07-12 Richard Biener <rguenther@suse.de>
10320
10321 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10322 (vn_lookup_simplify_result): Remove recursion limit applied
10323 here.
10324 (vn_nary_build_or_lookup_1): Adjust.
10325 (try_to_simplify): Likewise.
10326 * gimple-match-head.c (gimple_resimplify1): Instead apply one
10327 here.
10328 (gimple_resimplify2): Likewise.
10329 (gimple_resimplify3): Likewise.
10330 (gimple_resimplify4): Likewise.
10331
10332 2018-07-11 Jakub Jelinek <jakub@redhat.com>
10333
10334 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10335 Use __mmask64 type instead of __mmask8 for __M argument.
10336 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10337 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10338 __U argument.
10339 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10340 __mmask16 for __M argument.
10341 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10342 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10343 to __mmask16 instead of __mmask8.
10344 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10345 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10346 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10347 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10348 instead of __mmask16 for __U argument.
10349 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10350 __mmask16 instead of __mmask8 for __U argument.
10351 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10352 __U argument.
10353 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10354 __mmask16.
10355 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10356 argument.
10357 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10358 __U argument.
10359 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10360 __mmask16.
10361 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10362 of __mmask16.
10363 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10364 __U argument.
10365 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10366 __U argument.
10367 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10368 __U argument.
10369 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10370 __U argument.
10371 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10372 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10373 return type as well as __M argument type and all casts from __mmask8
10374 to __mmask32.
10375 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10376 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10377 return type as well as __M argument type and all casts from __mmask8
10378 to __mmask16.
10379 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10380 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10381 return type as well as __M argument type and all casts from __mmask8
10382 to __mmask32.
10383 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10384 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10385 return type as well as __M argument type and all casts from __mmask8
10386 to __mmask16.
10387 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10388 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10389 __mmask16.
10390
10391 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
10392
10393 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10394 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10395 for __U argument.
10396
10397 2018-07-11 Paul Koning <ni1d@arrl.net>
10398
10399 * doc/md.texi (define_subst): Document how multiple occurrences of
10400 the same argument in the replacement pattern are handled.
10401
10402 2018-07-11 Paul Koning <ni1d@arrl.net>
10403
10404 * doc/extend.texi (Common Variable Attributes): Move "mode" into
10405 alphabetical order.
10406 (Common Type Attributes): Add "mode" attribute.
10407
10408 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
10409
10410 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
10411 stream DECL_ORIGINAL_TYPE.
10412 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
10413 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
10414 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
10415 Do not walk original type.
10416 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
10417 external decls.
10418 (write_ts_decl_non_common_tree_pointers): Do not stream
10419 DECL_ORIGINAL_TYPE
10420 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
10421 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
10422
10423 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10424
10425 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
10426 thread twice from the same starting edge.
10427
10428 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10429
10430 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
10431 * gimple.c (gimple_call_nonnull_result_p): ...here...
10432 (gimple_call_nonnull_arg): ...and here.
10433 * gimple.h (gimple_call_nonnull_result_p): New.
10434 (gimple_call_nonnull_arg): New.
10435
10436 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
10437
10438 * config/arm/arm-cpus.in: Move information from fpu field of each
10439 cpu definition to the isa field.
10440 * config/arm/parsecpu.awk (fpu): Delete match rule.
10441 (gen_comm_data): Don't add bits from the CPU's FPU entry.
10442
10443 2018-07-11 Richard Biener <rguenther@suse.de>
10444
10445 PR debug/86457
10446 * dwarf2out.c (init_sections_and_labels): Use
10447 output_asm_line_debug_info consistently.
10448 (dwarf2out_early_finish): Likewise.
10449 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
10450 type units.
10451
10452 2018-07-11 Richard Biener <rguenther@suse.de>
10453
10454 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
10455 Rework father_bb setting in a way to avoid propagating constants
10456 multiple times on a loop body.
10457
10458 2018-07-10 Mark Wielaard <mark@klomp.org>
10459
10460 PR debug/86459
10461 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
10462
10463 2018-07-10 Richard Biener <rguenther@suse.de>
10464
10465 * hash-map.h (hash_map::iterator::operator*): Return
10466 references to key and value.
10467
10468 2018-07-10 Jakub Jelinek <jakub@redhat.com>
10469
10470 PR c++/86443
10471 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10472 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
10473 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
10474 (gimplify_omp_for): For composite loops, move outer
10475 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
10476 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
10477 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
10478 TREE_LIST for both the original class iterator and the "last" helper
10479 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
10480 loop, remember has_decl_expr from outer composite loops for the
10481 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
10482
10483 2018-07-09 Martin Sebor <msebor@redhat.com>
10484
10485 PR middle-end/77357
10486 PR middle-end/86428
10487 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
10488 accessing implicitly initialized array elements.
10489 * expr.c (string_constant): Handle string initializers of
10490 character arrays within aggregates.
10491 * gimple-fold.c (fold_array_ctor_reference): Add argument.
10492 Store element offset. As a special case, handle zero size.
10493 (fold_nonarray_ctor_reference): Same.
10494 (fold_ctor_reference): Add argument. Store subobject offset.
10495 * gimple-fold.h (fold_ctor_reference): Add argument.
10496
10497 2018-07-09 Paul Koning <ni1d@arrl.net>
10498
10499 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
10500 (pdp11_insn_cost): New function.
10501 (pdp11_md_asm_adjust): New function.
10502 (TARGET_INVALID_WITHIN_DOLOOP): Define.
10503 (pdp11_rtx_costs): Update to match machine better.
10504 (output_addr_const_pdp11): Correct format mismatch warnings.
10505 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
10506 * config/pdp11/pdp11.md: General change to add base_cost and/or
10507 length attributes for use by new pdp11_insn_cost function.
10508 (MIN_BRANCH): Correct definition.
10509 (MIN_SOB): Ditto.
10510 (doloop_end): Use standard pattern name for looping pattern.
10511 (doloop_end_nocc): New.
10512 (movsf): Add another constraint alternative.
10513 (zero_extendqihi2): Add constraint alternatives for not in place
10514 extend.
10515 (zero_extendhisi2): Remove.
10516 (shift patterns): Add CC handling variants.
10517 (bswaphi2): New.
10518 (bswapsi2): New.
10519 (rothi3): New.
10520 (define_peephole2): New peephole to recognize mov that sets CC for
10521 subsequent test.
10522
10523 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10524
10525 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
10526 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
10527 wi::add.
10528
10529 2018-07-09 Jakub Jelinek <jakub@redhat.com>
10530
10531 PR c/86420
10532 * real.c (real_nextafter): Return true if result is denormal.
10533
10534 2018-07-09 Martin Liska <mliska@suse.cz>
10535
10536 * common.opt: Add back wrongly removed attribute.
10537
10538 2018-07-09 Richard Biener <rguenther@suse.de>
10539
10540 PR debug/86413
10541 * dwarf2out.c (gen_block_die): For an early generated DIE
10542 always output high/low PC attributes.
10543
10544 2018-07-09 Tom de Vries <tdevries@suse.de>
10545
10546 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
10547 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
10548 onto VAR_DECL with abstract origin.
10549
10550 2018-07-07 Jim Wilson <jimw@sifive.com>
10551
10552 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
10553
10554 2018-07-07 Tom de Vries <tdevries@suse.de>
10555
10556 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
10557
10558 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
10559
10560 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
10561 overflow_type.
10562 (combine_bound): Use wide-int overflow calculation instead of
10563 rolling our own.
10564 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
10565 overflow_type.
10566 * fold-const.c (int_const_binop_2): Same.
10567 (extract_muldiv_1): Same.
10568 (fold_div_compare): Same.
10569 (fold_abs_const): Same.
10570 * match.pd: Same.
10571 * poly-int.h (add): Same.
10572 (sub): Same.
10573 (neg): Same.
10574 (mul): Same.
10575 * predict.c (predict_iv_comparison): Same.
10576 * profile-count.c (slow_safe_scale_64bit): Same.
10577 * simplify-rtx.c (simplify_const_binary_operation): Same.
10578 * tree-chrec.c (tree_fold_binomial): Same.
10579 * tree-data-ref.c (split_constant_offset_1): Same.
10580 * tree-if-conv.c (idx_within_array_bound): Same.
10581 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
10582 * tree-ssa-phiopt.c (minmax_replacement): Same.
10583 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
10584 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
10585 * vr-values.c (vr_values::adjust_range_with_scev): Same.
10586 * wide-int.cc (wi::add_large): Same.
10587 (wi::mul_internal): Same.
10588 (wi::sub_large): Same.
10589 (wi::divmod_internal): Same.
10590 * wide-int.h: Change overflow type to overflow_type for neg, add,
10591 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
10592 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
10593 mul_internal, divmod_internal.
10594 (overflow_type): New enum.
10595 (accumulate_overflow): New.
10596
10597 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
10598
10599 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
10600 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
10601
10602 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10603
10604 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
10605 argument is checked for zero before entering loop, avoid checking again.
10606
10607 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10608
10609 * gimplify.h (generic_expr_could_trap_p): Set as global function.
10610 * gimplify.h (generic_expr_could_trap_p): Likwise.
10611 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
10612
10613 2018-07-06 Jakub Jelinek <jakub@redhat.com>
10614
10615 PR tree-optimization/86401
10616 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
10617 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
10618 (fold_bit_and_mask): ... here. New helper function for match.pd.
10619 * fold-const.h (fold_bit_and_mask): Declare.
10620 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
10621
10622 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
10623
10624 PR target/86324
10625 * target.def (translate_mode_attribute): New hook.
10626 * targhooks.h (default_translate_mode_attribute): Declare.
10627 * targhooks.c (default_translate_mode_attribute): New function.
10628 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
10629 * doc/tm.texi: Regenerate.
10630 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
10631 (rs6000_translate_mode_attribute): New function.
10632
10633 2018-07-06 Paul Koning <ni1d@arrl.net>
10634
10635 * doc/md.texi (define_split): Document DONE and FAIL.
10636 (define_peephole2): Ditto.
10637
10638 2018-07-05 Jeff Law <law@redhat.com>
10639
10640 PR tree-optimization/86010
10641 * tree-ssa-dse.c (compute_trims): More aggressively trim at
10642 both the head and tail of mem* and str* calls.
10643
10644 2018-07-05 Jim Wilson <jimw@sifive.com>
10645
10646 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
10647
10648 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
10649
10650 * config/aarch64/aarch64-simd.md: correct flags text for
10651 MIN_EXPR replacement.
10652
10653 2018-07-05 James Clarke <jrtc27@jrtc27.com>
10654
10655 * configure: Regenerated.
10656
10657 2018-07-05 Carl Love <cel@us.ibm.com>
10658
10659 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
10660 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
10661 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
10662 VSX_BUILTIN_DOUBLEL_V4SF.
10663
10664 2018-07-05 Martin Sebor <msebor@redhat.com>
10665
10666 PR c++/86400
10667 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
10668 than its domain to compute its the upper bound of a char array.
10669
10670 2018-07-05 Nathan Sidwell <nathan@acm.org>
10671
10672 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
10673 * doc/cpp.texi: Update comment.
10674 * doc/tm.texi: Rebuilt.
10675 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
10676 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
10677 * doc/extend.texi (Backwards Compatibility): Clarify it is system
10678 headers affected by extern "C".
10679 * system.h: Poison NO_IMPLICIT_EXTERN_C.
10680 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
10681 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
10682 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
10683 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
10684 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
10685 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
10686 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
10687 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
10688 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
10689 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
10690 config/sparc/sp64-elf.h, config/spu/spu.h,
10691 config/stormy16/stormy16.h, config/v850/v850.h,
10692 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
10693 define NO_IMPLICIT_EXTERN_C.
10694 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
10695
10696 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10697
10698 PR target/84711
10699 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10700 instead of GET_MODE_SIZE when comparing Units.
10701
10702 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10703
10704 PR target/84711
10705 * rtlanal.c (set_noop_p): Constrain on mode change,
10706 include hard-reg-set.h
10707
10708 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10709
10710 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
10711
10712 2018-07-05 Jakub Jelinek <jakub@redhat.com>
10713
10714 Revert
10715 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10716
10717 PR sanitizer/84250
10718 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10719 libasan.
10720 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10721
10722 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10723
10724 PR sanitizer/84250
10725 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10726 libasan.
10727 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10728
10729 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
10730
10731 PR middle-end/86380
10732 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
10733
10734 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
10735
10736 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
10737 neg_*_op* variables.
10738
10739 2018-07-04 Martin Liska <mliska@suse.cz>
10740
10741 * tree-switch-conversion.c: Define
10742 max_ratio_for_speed and max_ratio_for_size constants.
10743
10744 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10745 Martin Liska <mliska@suse.cz>
10746
10747 PR middle-end/66240
10748 PR target/45996
10749 PR c/84100
10750 * common.opt: Rename align options with 'str_' prefix.
10751 * common/config/i386/i386-common.c (set_malign_value): New
10752 function.
10753 (ix86_handle_option): Use it to set -falign-* options/
10754 * config/aarch64/aarch64-protos.h (struct tune_params): Change
10755 type from int to string.
10756 * config/aarch64/aarch64.c: Update default values from int
10757 to string.
10758 * config/alpha/alpha.c (alpha_override_options_after_change):
10759 Likewise.
10760 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
10761 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10762 max skip conditionally.
10763 * config/i386/freebsd.h (SUBALIGN_LOG): New.
10764 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10765 max skip conditionally.
10766 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10767 max skip conditionally.
10768 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
10769 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10770 max skip conditionally.
10771 * config/i386/i386.c (struct ptt): Change type from int to
10772 string.
10773 (ix86_default_align): Set default values.
10774 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
10775 max skip conditionally.
10776 * config/i386/iamcu.h (SUBALIGN_LOG): New.
10777 (ASM_OUTPUT_MAX_SKIP_ALIGN):
10778 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
10779 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10780 max skip conditionally.
10781 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
10782 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
10783 * config/i386/x86-64.h (SUBALIGN_LOG): New.
10784 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10785 max skip conditionally.
10786 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10787 * config/ia64/ia64.c (ia64_option_override): Set default values
10788 for alignment options.
10789 * config/m68k/m68k.c: Handle new str_align_* options.
10790 * config/mips/mips.c (mips_set_compression_mode): Change
10791 type of constants.
10792 (mips_option_override): Set default values for options.
10793 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
10794 Likewise.
10795 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10796 Likewise.
10797 * config/rx/rx.c (rx_option_override): Likewise.
10798 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
10799 (LABEL_ALIGN): Use align_labels_log.
10800 (LOOP_ALIGN): Use align_loops_align.
10801 * config/s390/s390.c (s390_asm_output_function_label): Use new
10802 macros.
10803 * config/sh/sh.c (sh_override_options_after_change):
10804 Change type of constants.
10805 * config/spu/spu.c (spu_sched_init): Likewise.
10806 * config/sparc/sparc.c (sparc_option_override): Set default
10807 values for options.
10808 * config/visium/visium.c (visium_option_override): Likewise.
10809 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
10810 emit p2align format with last argument if it's not needed.
10811 * doc/invoke.texi: Document extended format of -falign-*.
10812 * final.c: Use align_labels alignment.
10813 * flags.h (struct target_flag_state): Change type to use
10814 align_flags.
10815 (struct align_flags_tuple): New.
10816 (struct align_flags): Likewise.
10817 (align_loops_log): Redefine macro to use new types.
10818 (align_loops_max_skip): Redefine macro to use new types.
10819 (align_jumps_log): Redefine macro to use new types.
10820 (align_jumps_max_skip): Redefine macro to use new types.
10821 (align_labels_log): Redefine macro to use new types.
10822 (align_labels_max_skip): Redefine macro to use new types.
10823 (align_functions_log): Redefine macro to use new types.
10824 (align_loops): Redefine macro to use new types.
10825 (align_jumps): Redefine macro to use new types.
10826 (align_labels): Redefine macro to use new types.
10827 (align_functions): Redefine macro to use new types.
10828 (align_functions_max_skip): Redefine macro to use new types.
10829 (align_loops_value): New macro.
10830 (align_jumps_value): New macro.
10831 (align_labels_value): New macro.
10832 (align_functions_value): New macro.
10833 * function.c (invoke_set_current_function_hook): Propagate
10834 alignment values from flags to global variables default in
10835 topleev.h.
10836 * ipa-icf.c (sem_function::equals_wpa): Use
10837 cl_optimization_option_eq instead of memcmp.
10838 * lto-streamer.h (cl_optimization_stream_out): Support streaming
10839 of string types.
10840 (cl_optimization_stream_in): Likewise.
10841 * optc-save-gen.awk: Support strings in cl_optimization.
10842 * opth-gen.awk: Likewise.
10843 * opts.c (finish_options): Remove error checking of invalid
10844 value ranges.
10845 (MAX_CODE_ALIGN): Remove.
10846 (MAX_CODE_ALIGN_VALUE): Likewise.
10847 (parse_and_check_align_values): New function.
10848 (check_alignment_argument): Likewise.
10849 (common_handle_option): Use check_alignment_argument.
10850 * opts.h (parse_and_check_align_values): Declare.
10851 * toplev.c (init_alignments): Remove.
10852 (read_log_maxskip): New.
10853 (parse_N_M): Likewise.
10854 (parse_alignment_opts): Likewise.
10855 (backend_init_target): Remove usage of init_alignments.
10856 * toplev.h (parse_alignment_opts): Declare.
10857 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
10858 argument.
10859 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
10860 * tree.c (cl_option_hasher::equal): New.
10861 * varasm.c: Use new global macros.
10862
10863 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10864
10865 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
10866 Use a simpler align directive also if MAXSKIP = ALIGN-1.
10867 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10868 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10869 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10870 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10871 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
10872 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
10873 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
10874 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10875 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10876 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10877 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10878
10879 2018-07-04 Martin Liska <mliska@suse.cz>
10880 Jonathan Wakely <jwakely@redhat.com>
10881
10882 * coverage.c: Use correct type.
10883 * doc/invoke.texi: Language correction.
10884
10885 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
10886
10887 PR target/85620
10888 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
10889 ENDBRANCH for non-tail call which may return via indirect branch.
10890 * doc/extend.texi: Document indirect_return attribute.
10891
10892 2018-07-03 Martin Sebor <msebor@redhat.com>
10893
10894 PR tree-optimization/86274
10895 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
10896 precondition.
10897 (format_floating): Correct handling of infinities and NaNs.
10898
10899 2018-07-03 Martin Sebor <msebor@redhat.com>
10900
10901 * print-tree.c (print_real_cst): New function.
10902 (print_node_brief): Call it.
10903 (print_node): Ditto.
10904
10905 2018-07-03 Jeff Law <law@redhat.com>
10906
10907 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
10908 into a single pattern.
10909
10910 * config/h8300/h8300.md (ors code_iterator): New.
10911 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
10912 a single pattern and single splitter.
10913 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
10914 (iorqi3_1, xorqi3_1): Likewise.
10915 (iorqi3, xorqi3 expanders): Similarly.
10916
10917 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
10918 (movmd_internal) into a single pattern using the P mode iterator.
10919 (movmd splitters): Similarly.
10920 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
10921 (movsd splitters): Similarly.
10922
10923 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
10924 ADDB, ADDW and ADDL into a single ADD attribute which selects the
10925 right table based on the size of the operand.
10926 * config/h8300/h8300.md (length_table): Corresponding changes. All
10927 references to "addb", "addw" and "addl" changed to "add".
10928 (btst patterns): Merge two variants into a single pattern.
10929 (tstqi, tsthi): Likewise.
10930 (addhi3_incdec, addsi3_incdec): Likewise.
10931 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
10932 (mulhi3, mulsi3): Likewise.
10933 (udivhi3, udivsi3): Likewise.
10934 (divhi3, divsi3): Likewise.
10935 (andorqi3, andorhi3, andorsi3): Likewise.
10936
10937 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
10938
10939 PR target/85694
10940 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
10941 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
10942
10943 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10944
10945 PR tree-optimization/85694
10946 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
10947 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
10948 UNSPEC_URHADD.
10949 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
10950 (<u>avg<mode>3_ceil): New patterns.
10951
10952 2018-07-03 David Malcolm <dmalcolm@redhat.com>
10953
10954 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
10955 scan-tree-dump directive.
10956 * gcc.dg/vect/slp-perm-2.c: Likewise.
10957 * gcc.dg/vect/slp-perm-3.c: Likewise.
10958 * gcc.dg/vect/slp-perm-5.c: Likewise.
10959 * gcc.dg/vect/slp-perm-6.c: Likewise.
10960 * gcc.dg/vect/slp-perm-7.c: Likewise.
10961 * gcc.dg/vect/slp-perm-8.c: Likewise.
10962
10963 2018-07-03 Marek Polacek <polacek@redhat.com>
10964
10965 PR middle-end/86202
10966 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
10967
10968 2018-07-03 Richard Biener <rguenther@suse.de>
10969
10970 PR ipa/86389
10971 * tree-ssa-structalias.c (find_func_clobbers): Properly
10972 handle indirect calls.
10973
10974 2018-07-03 Jeff Law <law@redhat.com>
10975
10976 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
10977 (shifts): New code iterator.
10978 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
10979 expander. Fix HImode handling on H8/SX.
10980 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
10981 (subqi3, subhi3, subsi3 expanders): Likewise.
10982 (andqi3, andhi3, andsi3 expanders): Likewise.
10983 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
10984 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
10985 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
10986 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
10987 (zero_extendqihi2, zero_extendqisi2): Likewise.
10988 (extendqihi2, extendqisi2): Likewise.
10989 (rotlqi3, rotlhi3, rotlsi3): Likewise.
10990 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
10991 (rotlqi3_1, rotlhi3_1): Likewise.
10992 (logicalhi3_sn, logicalsi3_sn): Likewise.
10993 (logicalhi3, logicalsi3): Likewise.
10994
10995 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10996
10997 * tree-vect-patterns.c (vect_recog_rotate_pattern)
10998 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
10999 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
11000 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
11001 type to append_pattern_def_seq instead of creating a stmt_vec_info
11002 directly.
11003 (build_mask_conversion): Likewise. Remove vinfo argument.
11004 (vect_add_conversion_to_patterm): Likewise, renaming to...
11005 (vect_add_conversion_to_pattern): ...this.
11006 (vect_recog_mask_conversion_pattern): Update call to
11007 build_mask_conversion. Pass the vector type to
11008 append_pattern_def_seq here too.
11009 (vect_recog_gather_scatter_pattern): Update call to
11010 vect_add_conversion_to_pattern.
11011
11012 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11013
11014 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
11015 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11016 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
11017 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
11018 STMT_VINFO_PATTERN_DEF_SEQ to null here.
11019 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
11020 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
11021 append_pattern_def_seq instead of new_pattern_def_seq.
11022 (vect_recog_divmod_pattern): Do both of the above.
11023 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
11024 is null.
11025
11026 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11027
11028 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
11029 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
11030 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
11031 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
11032 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
11033 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11034 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
11035 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11036 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11037 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
11038 parameter with a single stmt_vec_info.
11039 (vect_recog_func_ptr): Likewise.
11040 (vect_recog_gather_scatter_pattern): Likewise, folding in...
11041 (vect_try_gather_scatter_pattern): ...this.
11042 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
11043 the stmt_vec_info of the statement to be matched. Don't clear
11044 STMT_VINFO_RELATED_STMT.
11045 (vect_pattern_recog): Update call accordingly.
11046
11047 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11048
11049 PR tree-optimization/85694
11050 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
11051 (uavgM3_ceil): Document new optabs.
11052 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
11053 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
11054 functions.
11055 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
11056 (savg_ceil_optab): New optabs.
11057 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
11058 (vect_vect_recog_func_ptrs): Add it.
11059 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
11060 constant directly from the associated lhs.
11061
11062 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11063
11064 * tree-vect-patterns.c (vect_split_statement): New function.
11065 (vect_convert_input): Use it to try to split an existing cast.
11066
11067 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11068
11069 * poly-int.h (print_hex): New function.
11070 * dumpfile.h (dump_dec, dump_hex): Declare.
11071 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
11072 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
11073 min_input_precision, operation_precision and operation_sign.
11074 * tree-vect-patterns.c (vect_get_range_info): New function.
11075 (vect_same_loop_or_bb_p, vect_single_imm_use)
11076 (vect_operation_fits_smaller_type): Delete.
11077 (vect_look_through_possible_promotion): Add an optional
11078 single_use_p parameter.
11079 (vect_recog_over_widening_pattern): Rewrite to use new
11080 stmt_vec_info infomration. Handle one operation at a time.
11081 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
11082 (vect_truncatable_operation_p, vect_set_operation_type)
11083 (vect_set_min_input_precision): New functions.
11084 (vect_determine_min_output_precision_1): Likewise.
11085 (vect_determine_min_output_precision): Likewise.
11086 (vect_determine_precisions_from_range): Likewise.
11087 (vect_determine_precisions_from_users): Likewise.
11088 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
11089 (vect_vect_recog_func_ptrs): Put over_widening first.
11090 Add cast_forwprop.
11091 (vect_pattern_recog): Call vect_determine_precisions.
11092
11093 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11094
11095 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
11096 statements that have been replaced by further pattern statements.
11097 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
11098
11099 2018-07-03 Richard Biener <rguenther@suse.de>
11100
11101 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
11102 always set *dt. Dump vectype in vectype overload.
11103 * dumpfile.h (dump_gimple_expr): New function.
11104 (dump_gimple_expr_loc): Likewise.
11105 * dumpfile.c (dump_gimple_expr): New function.
11106 (dump_gimple_expr_loc): Likewise.
11107
11108 2018-07-02 Jeff Law <law@redhat.com>
11109
11110 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
11111 the H8/300, H8/300H and H8/S variants into a single pattern.
11112 (movhi_h8300, movqi_h8300hs): Similarly.
11113 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
11114 (QHI mode iterator): New.
11115
11116 * config/h8300/h8300.md: Remove trailing whitespace.
11117
11118 2018-07-02 Jim Wilson <jimw@sifive.com>
11119
11120 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
11121 instead of emit_insn for interrupt returns.
11122 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
11123 (riscv_sret, riscv_uret): Likewise.
11124
11125 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11126
11127 * pretty-print.c (selftest::test_pp_format): Move save and restore
11128 of quotes to class auto_fix_quotes, and add an instance.
11129 * selftest.c: Include "intl.h".
11130 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
11131 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
11132 * selftest.h (selftest::auto_fix_quotes): New class.
11133
11134 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
11135
11136 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
11137 (aarch64_sve_prepare_conditional_op): Remove.
11138 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
11139 Allow aarch64_simd_reg_or_zero as select operand; remove
11140 the aarch64_sve_prepare_conditional_op call.
11141 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
11142 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11143 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
11144 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
11145 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
11146 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
11147 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
11148 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
11149 and a splitters to match all of the *_any patterns.
11150 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
11151
11152 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
11153 (SVE_COND_FP_BINARY_REV): Remove.
11154 (sve_int_op_rev, sve_fp_op_rev): New.
11155 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
11156 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
11157 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
11158 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11159 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11160 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11161 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11162 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11163 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11164
11165 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11166 Remove match_dup 1 from the inner unspec.
11167 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11168
11169 * config/aarch64/aarch64.md (movprfx): New attr.
11170 (length): Default movprfx to 8.
11171 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11172 (*madd<SVE_I>, *msub<SVE_I): Likewise.
11173 (*<su>mul<SVE_I>3_highpart): Likewise.
11174 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11175 (*v<ASHIFT><SVE_I>3): Likewise.
11176 (*<su><MAXMIN><SVE_I>3): Likewise.
11177 (*<su><MAXMIN><SVE_F>3): Likewise.
11178 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11179 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11180 (*div<SVE_F>4): Likewise.
11181
11182 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
11183
11184 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11185 in dump string.
11186
11187 2018-07-02 Richard Biener <rguenther@suse.de>
11188
11189 PR tree-optimization/86363
11190 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11191 memset argument refers to a non-variable address.
11192
11193 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11194
11195 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11196 {PLUS,MINUS}_EXPR code to...
11197 (adjust_symbolic_bound): ...here,
11198 (combine_bound): ...here,
11199 (set_value_range_with_overflow): ...and here.
11200
11201 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11202
11203 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11204 code...
11205 (extract_range_from_abs_expr): ...here.
11206
11207 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
11208
11209 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11210 -fno-omit-frame-pointer when not optimizing.
11211
11212 2018-07-02 Martin Liska <mliska@suse.cz>
11213
11214 PR ipa/86279
11215 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11216 (propagate_nothrow): Likewise.
11217
11218 2018-07-02 Martin Liska <mliska@suse.cz>
11219
11220 PR ipa/86323
11221 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11222
11223 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11224
11225 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11226 function in r262149, changing "loc" param from source_location to
11227 const dump_location_t &.
11228 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11229 declaration, as above.
11230
11231 2018-07-01 Paul Koning <ni1d@arrl.net>
11232
11233 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11234 -munit-asm, -mgnu-asm, -mdec-asm.
11235 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11236 (pdp11_output_labelref): New.
11237 (pdp11_output_def): New.
11238 (pdp11_output_addr_vec_elt): New.
11239 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
11240 %# and %@ format codes.
11241 (pdp11_option_override): New.
11242 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11243 (pdp11_output_ident): New.
11244 (pdp11_asm_named_section): New.
11245 (pdp11_asm_init_sections): New.
11246 (pdp11_file_start): New.
11247 (pdp11_file_end): New.
11248 (output_ascii): Use .ascii/.asciz for -mdec-asm.
11249 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
11250 %o, like %c but octal.
11251 (pdp11_option_override): New.
11252 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11253 -mdec-asm.
11254 (DATA_SECTION_ASM_OP): Ditto.
11255 (READONLY_DATA_SECTION_ASM_OP): New.
11256 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11257 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11258 (ASM_OUTPUT_LABELREF): Ditto.
11259 (ASM_OUTPUT_DEF): Ditto.
11260 (ASM_OUTPUT_EXTERNAL): New.
11261 (ASM_OUTPUT_SOURCE_FILENAME): New.
11262 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11263 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11264 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
11265 %# and %@ format codes.
11266 * config/pdp11/pdp11.opt (mgnu-asm): New.
11267 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11268 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11269 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11270
11271 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
11272
11273 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11274 dereferencing path[] beyond its length.
11275 (debug_path): New.
11276 (debug_all_paths): New.
11277 (rewire_first_differing_edge): New.
11278 (adjust_paths_after_duplication): New.
11279 (duplicate_thread_path): Call adjust_paths_after_duplication.
11280 Add new argument.
11281 (thread_through_all_blocks): Add new argument to
11282 duplicate_thread_path.
11283
11284 2018-06-30 Jim Wilson <jimw@sifive.com>
11285
11286 * config/riscv/predicates.md (p2m1_shift_operand): New.
11287 (high_mask_shift_operand): New.
11288 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11289 pattern using p2m1_shift_operand.
11290 (lshsi3_zero_extend_3+2): New combiner pattern using
11291 high_mask_shift_operand.
11292
11293 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11294
11295 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11296 split out from...
11297 (vect_recog_rotate_pattern): ...here.
11298 (vect_convert_input): Try to insert casts of invariants in the
11299 preheader.
11300 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11301 preheader to be empty.
11302
11303 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11304
11305 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11306 vector type. If given, install it in the new statement's
11307 STMT_VINFO_VECTYPE.
11308 (vect_element_precision): New function.
11309 (vect_unpromoted_value): New struct.
11310 (vect_unpromoted_value::vect_unpromoted_value): New function.
11311 (vect_unpromoted_value::set_op): Likewise.
11312 (vect_look_through_possible_promotion): Likewise.
11313 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11314 (vect_widened_op_tree, vect_convert_input): Likewise.
11315 (vect_convert_inputs, vect_convert_output): Likewise.
11316 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11317 to handle the optional cast of the multiplication result and
11318 vect_widened_op_tree to detect the widened multiplication itself.
11319 Do not require the input and output of promotion casts to have
11320 the same sign, but base the signedness of the operation on the
11321 input rather than the result. If the pattern includes two
11322 promotions, check that those promotions have the same sign.
11323 Do not restrict the MULT_EXPR handling to a double-width result;
11324 handle quadruple-width results and wider. Use vect_convert_inputs
11325 to convert the inputs to the common type.
11326 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
11327 to handle the optional cast of the ABS result. Also allow a sign
11328 change or a sign extension between the ABS and MINUS.
11329 Use vect_widened_op_tree to detect the widened subtraction and use
11330 vect_convert_inputs to convert the inputs to the common type.
11331 (vect_handle_widen_op_by_const): Delete.
11332 (vect_recog_widen_op_pattern): New function.
11333 (vect_recog_widen_mult_pattern): Use it.
11334 (vect_recog_widen_shift_pattern): Likewise.
11335 (vect_recog_widen_sum_pattern): Use
11336 vect_look_through_possible_promotion to handle the promoted
11337 PLUS_EXPR operand.
11338
11339 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11340
11341 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11342 the containing gimple_seq *.
11343 * gimple-iterator.h (gsi_for_stmt): Declare it.
11344 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11345 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11346 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11347 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11348 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11349 checks.
11350 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11351 split out from...
11352 (vect_mark_pattern_stmts): ...here. Handle cases in which the
11353 statement being replaced is part of an existing pattern
11354 definition sequence, inserting the new pattern statements before
11355 the original one.
11356 (vect_pattern_recog_1): Don't return a bool. If the statement
11357 is already part of a pattern, instead apply pattern matching
11358 to the pattern definition statements. Don't clear the
11359 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11360 (vect_pattern_recog): Don't break after the first match;
11361 continue processing the pattern definition statements instead.
11362 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11363
11364 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11365
11366 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11367 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11368 (vect_recog_widen_sum_pattern): Use it.
11369
11370 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11371
11372 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11373 phi is not a pattern statement and has not been replaced by
11374 a pattern statement.
11375 * tree-vect-patterns.c (type_conversion_p): Don't check
11376 STMT_VINFO_IN_PATTERN_P.
11377 (vect_recog_vector_vector_shift_pattern): Likewise.
11378 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11379 the pattern statement rather than the original statement; check
11380 directly for a WIDEN_MULT_EXPR here.
11381 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11382 vect_is_simple_use to return the pattern statement rather
11383 than the original statement; use is_pattern_stmt_p to check
11384 for such a pattern statement.
11385 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11386 to return the pattern statement rather than the original statement;
11387 don't do the same transformation here.
11388 (vect_is_simple_use): If the defining statement has been replaced
11389 by a pattern statement, return the pattern statement instead.
11390 Remove the corresponding (local) transformation from the vectype
11391 overload.
11392
11393 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11394
11395 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11396 end and default to null.
11397 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11398 (vectorizable_reduction): Update calls accordingly, dropping the
11399 gimple ** argument if the passed-back statement isn't needed.
11400 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11401 (vect_recog_rotate_pattern): Likewise.
11402 (vect_recog_mask_conversion_pattern): Likewise.
11403 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11404 (vect_mask_constant_operand_p): Likewise.
11405 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11406 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11407 (get_group_load_store_type, get_load_store_type): Likewise.
11408 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11409 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
11410 (vectorizable_conversion, vectorizable_assignment): Likewise.
11411 (vectorizable_shift, vectorizable_operation): Likewise.
11412 (vectorizable_store, vect_is_simple_cond): Likewise.
11413 (vectorizable_condition, vectorizable_comparison): Likewise.
11414 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
11415 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
11416 and move it to the end. Cope with null def_stmt_outs.
11417
11418 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11419
11420 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
11421
11422 2018-06-29 Jeff Law <law@redhat.com>
11423
11424 * config/v850/v850.c (v850_legitimate_address_p): Handle large
11425 displacements for TARGET_V850E2V3 and newer.
11426 (TARGET_LRA_P): Remove. Defaults to LRA now.
11427 * config/v850/v850.md (sign23byte_load): Remove.
11428 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
11429 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
11430
11431 2018-06-29 Martin Liska <mliska@suse.cz>
11432
11433 PR lto/85759
11434 * coverage.c (coverage_init): Mangle full path name.
11435 * doc/invoke.texi: Document the change.
11436 * gcov-io.c (mangle_path): New.
11437 * gcov-io.h (mangle_path): Likewise.
11438 * gcov.c (mangle_name): Use mangle_path for path mangling.
11439
11440 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11441
11442 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
11443 if starting source register is not even.
11444
11445 2018-06-29 Martin Liska <mliska@suse.cz>
11446
11447 PR tree-optimization/86263
11448 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
11449 Make edge redirection.
11450
11451 2018-06-29 David Malcolm <dmalcolm@redhat.com>
11452
11453 * dumpfile.c (dump_loc): Add indentation based on scope depth.
11454 (dump_scope_depth): New variable.
11455 (get_dump_scope_depth): New function.
11456 (dump_begin_scope): New function.
11457 (dump_end_scope): New function.
11458 * dumpfile.h (get_dump_scope_depth): New declaration.
11459 (dump_begin_scope): New declaration.
11460 (dump_end_scope): New declaration.
11461 (class auto_dump_scope): New class.
11462 (AUTO_DUMP_SCOPE): New macro.
11463 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
11464 AUTO_DUMP_SCOPE.
11465
11466 2018-06-29 Richard Biener <rguenther@suse.de>
11467
11468 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
11469 compute_all_dependences succeeds.
11470 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
11471 exceed --param loop-max-datarefs-for-datadeps.
11472
11473 2018-06-29 Jakub Jelinek <jakub@redhat.com>
11474
11475 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
11476
11477 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
11478
11479 PR target/86348
11480 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
11481 alternative 0 in preferred_for_speed attribute.
11482
11483 2018-06-28 Paul Koning <ni1d@arrl.net>
11484
11485 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
11486 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
11487 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
11488 * config/pdp11/pdp11.md: Correct "length" attribute calculation
11489 for shift insn patterns.
11490
11491 2018-06-28 David Malcolm <dmalcolm@redhat.com>
11492
11493 * cgraph.c (cgraph_node::get_body): Replace assignments to
11494 "dump_file" with calls to set_dump_file.
11495 * dumpfile.c (alt_dump_file): Make static, and group with...
11496 (alt_flags): ...this definition.
11497 (dumps_are_enabled): New variable.
11498 (refresh_dumps_are_enabled): New function.
11499 (set_dump_file): New function.
11500 (set_alt_dump_file): New function.
11501 (gcc::dump_manager::dump_start): Replace assignments to
11502 "dump_file" and "alt_dump_file" with calls to set_dump_file and
11503 set_alt_dump_file.
11504 (gcc::dump_manager::dump_finish): Likewise.
11505 * dumpfile.h (alt_dump_file): Delete decl.
11506 (dumps_are_enabled): New variable decl.
11507 (set_dump_file): New function decl.
11508 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
11509 global.
11510 * tree-nested.c (lower_nested_functions): Replace assignments to
11511 "dump_file" with calls to set_dump_file.
11512
11513 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11514
11515 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
11516 goto_locus of each outgoing edge of each basic block.
11517
11518 2018-06-28 Richard Biener <rguenther@suse.de>
11519
11520 * dwarf2out.c (decl_scope_table): Remove.
11521 (push_decl_scope): Likewise.
11522 (pop_decl_scope): Likewise.
11523 (gen_type_die_for_member): Do not call push/pop_decl_scope.
11524 (gen_struct_or_union_type_die): Likewise.
11525 (gen_tagged_type_die): Likewise.
11526 (dwarf2out_init): Do not initialize decl_scope_table.
11527 (dwarf2out_c_finalize): Do not free it.
11528
11529 2018-06-28 Richard Biener <rguenther@suse.de>
11530
11531 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
11532 deciding whether to not re-use a DIE.
11533
11534 2018-06-28 Richard Biener <rguenther@suse.de>
11535
11536 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
11537 DW_AT_abstract_origin attribute.
11538
11539 2018-06-28 Martin Liska <mliska@suse.cz>
11540
11541 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11542 Use newly introduced constants.
11543 * tree-switch-conversion.h (struct jump_table_cluster):
11544 Define max_ratio_for_size and max_ratio_for_speed.
11545
11546 2018-06-28 Martin Liska <mliska@suse.cz>
11547
11548 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11549 Add new checking assert to catch invalid state.
11550 (jump_table_cluster::can_be_handled): Handle single case
11551 clusters.
11552 (jump_table_cluster::is_beneficial): Bail out for such case.
11553 (bit_test_cluster::find_bit_tests):
11554 Add new checking assert to catch invalid state.
11555 (bit_test_cluster::can_be_handled): Handle single case
11556 clusters.
11557 (bit_test_cluster::is_beneficial): Bail out for such case.
11558 (switch_decision_tree::analyze_switch_statement):
11559 Fix comment.
11560
11561 2018-06-28 Martin Liska <mliska@suse.cz>
11562
11563 * common.opt: Introduce -completion option.
11564 * gcc.c (driver_handle_option): Handle it.
11565 (driver::main): Print completions if completion
11566 is set.
11567 * opt-suggestions.c (option_proposer::get_completions):
11568 New function.
11569 (option_proposer::suggest_completion): Likewise.
11570 (option_proposer::find_param_completions): Likewise.
11571 (verify_autocompletions): Likewise.
11572 (test_completion_valid_options): Likewise.
11573 (test_completion_valid_params): Likewise.
11574 (in_completion_p): Likewise.
11575 (empty_completion_p): Likewise.
11576 (test_completion_partial_match): Likewise.
11577 (test_completion_garbage): Likewise.
11578 (opt_proposer_c_tests): Likewise.
11579 * opt-suggestions.h: Declare new functions.
11580 * opts.c (common_handle_option): Handle OPT__completion_.
11581 * selftest-run-tests.c (selftest::run_tests): Add
11582 opt_proposer_c_tests.
11583 * selftest.c (assert_str_startswith): New.
11584 * selftest.h (assert_str_startswith): Likewise.
11585 (opt_proposer_c_tests): New.
11586 (ASSERT_STR_STARTSWITH): Likewise.
11587
11588 2018-06-28 Martin Liska <mliska@suse.cz>
11589
11590 * Makefile.in: Add opt-suggestions.o.
11591 * gcc-main.c: Include opt-suggestions.h.
11592 * gcc.c (driver::driver): Likewise.
11593 (driver::~driver): Remove m_option_suggestions.
11594 (driver::build_option_suggestions): Moved to option_proposer.
11595 (driver::suggest_option): Likewise.
11596 (driver::handle_unrecognized_options): Use option_proposer.
11597 * gcc.h (class driver): Add new memver m_option_proposer.
11598 * opt-suggestions.c: New file.
11599 * opt-suggestions.h: New file.
11600
11601 2018-06-28 Martin Liska <mliska@suse.cz>
11602
11603 * vec.h (class auto_string_vec): New (moved from auto_argvec).
11604 (auto_string_vec::~auto_string_vec): Likewise.
11605
11606 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11607
11608 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
11609 prevent_decl_creation_for_types fields up and add reset_location field.
11610 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
11611 statement if id->reset_location is true.
11612 (copy_edges_for_bb): Do not set goto_locus on the new edges if
11613 id->reset_location is true.
11614 (copy_phis_for_bb): Force input_location on the arguments if
11615 id->reset_location is true.
11616 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
11617 is set on the function to be inlined.
11618
11619 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
11620
11621 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
11622
11623 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
11624
11625 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
11626 registers for Pmode.
11627 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
11628 hard registers for the clobbered pseudo.
11629
11630 2018-06-27 Paul Koning <ni1d@arrl.net>
11631
11632 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11633 mutually exclusive options.
11634 * config/pdp11/constraints.md (h): New constraint.
11635 (O): Update definition to match shift code generation.
11636 (D): New constraint.
11637 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
11638 (CCFP): Remove.
11639 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
11640 function.
11641 (output_jump): Change arguments.
11642 (pdp11_fixed_cc_regs): New function.
11643 (pdp11_cc_mode): Ditto.
11644 (pdp11_expand_shift): Ditto.
11645 (pdp11_assemble_shift): Ditto.
11646 (pdp11_small_shift): Ditto.
11647 (pdp11_branch_cost): Remove.
11648 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
11649 from output.
11650 (pdp11_register_move_cost): Update for CC registers.
11651 (pdp11_rtx_costs): Add case for LSHIFTRT.
11652 (pdp11_output_jump): Add CCNZ mode conditional branches.
11653 (notice_update_cc_on_set): Remove.
11654 (pdp11_cc_mode): New function.
11655 (simple_memory_operand): Correct pre/post decrement case.
11656 (no_side_effect_operand): New function.
11657 (pdp11_regno_reg_class): Add CC_REGS class.
11658 (pdp11_fixed_cc_regs): New function.
11659 (pdp11_small_shift): New function.
11660 (pdp11_expand_shift): New function to expand shift insns.
11661 (pdp11_assemble_shift): New function to output shifts.
11662 (pdp11_branch_cost): Remove.
11663 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
11664 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
11665 (WCHAR_TYPE): Ditto.
11666 (PTRDIFF_TYPE): Ditto.
11667 (ADJUST_INSN_LENGTH): New macro.
11668 (FIXED_REGISTERS): Add CC registers.
11669 (CALL_USED_REGISTERS): Ditto.
11670 (reg_class): Ditto.
11671 (REG_CLASS_NAMES): Ditto.
11672 (REG_CLASS_CONTENTS): Ditto.
11673 (SELECT_CC_MODE): Use new function.
11674 (TARGET_FLAGS_REGNUM): New macro.
11675 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
11676 (cc0_reg_rtx): Remove.
11677 (CC_STATUS_MDEP): Remove.
11678 (CC_STATUS_MDEFP_INIT): Remove.
11679 (CC_IN_FPU): Remove.
11680 (NOTICE_UPDATE_CC): Remove.
11681 (REGISTER_NAMES): Add CC registers.
11682 (BRANCH_COST): Change to constant 1.
11683 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
11684 handling.
11685 * config/pdp11/pdp11.opt (mbcopy): Remove.
11686 (mbcopy-builtin): Remove.
11687 (mbranch-cheap): Remove.
11688 (mbranch-expensive): Remove.
11689 * config/pdp11/predicates.md (expand_shift_operand): Update to
11690 match shift code generation.
11691 (ccnz_operator): New predicate.
11692 * doc/invoke.texi (PDP-11 Options): Remove deleted options
11693 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
11694 Remove non-existent option -mabshi, -mno-abshi. Document mutually
11695 exclusive options.
11696 * doc/md.texi (PDP-11): Document new D and h constraints. Update
11697 description of O constraint.
11698
11699 2018-06-27 Jeff Law <law@redhat.com>
11700 Austin Law <austinklaw@gmail.com>
11701
11702 * config/v850/v850.md (addsi3_set_flags): New pattern.
11703 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
11704 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
11705 (zero_extendhisi2_v850_set_flags): Likewise.
11706 (zero_extendqisi2_v850_set_flags): Likewise.
11707 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
11708 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
11709 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
11710
11711 * config/v850/v850-protos.h (notice_update_cc): Remove.
11712 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
11713 (v850_print_operand): Handle 'D' and "d".
11714 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
11715 Add handling of arithmetic/logical operations compared against zero.
11716 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
11717 Do not look at v850_compare_op, instead get mode from last argument.
11718 (v850_gen_compare): Remove
11719 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
11720 after reload for prologue insns.
11721 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
11722 patterns.
11723 (construct_save_jarl): Likewise.
11724 (TARGET_FLAGS_REGNUM): Define.
11725 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
11726 (NOTICE_UPDATE_CC): Remove.
11727 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
11728 than cc0. Conditionalize on reload_completed.
11729 (cmpsi_insn, setfcc_insn): Likewise.
11730 (tst1 splitter): Turn into define_and_split which sets the flags
11731 after reload.
11732 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
11733 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
11734 (cstoresf4, cstoredf4): Clobber the flags.
11735 (cmpsi, cmpsf, cmpdf): Remove expanders.
11736 (setf_insn): Remove pattern.
11737 (addsi3): Turn into define_and_split which clobbers the flags after
11738 reload and a suitable pattern (addsi3_clobber_flags) for use after
11739 reload.
11740 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
11741 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
11742 (ashrsi3, ashrsi3_v850e2): Likewise.
11743 (bins): Clobber the flags.
11744 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
11745 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
11746 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
11747 (call_value_internal_short, call_value_internal_long): Likewise.
11748 (callt_save_interrupt, callt_return_interrupt): Likewise.
11749 (save_interrupt, return_interrupt): Likewise.
11750 (callt_save_all_interrupt, save_all_interrupt): Likewise.
11751 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
11752 (restore_all_interrupt, _restore_all_interrupt): Likewise.
11753 (All FP comparisons): Only allow after reload has completed.
11754 (trfsr): Likewise.
11755 (divh, divhu): Tweak output template.
11756 (branch_z_normal, branch_z_invert): Remove
11757 (branch_nz_normal, branch_nz_invert): Likewise.
11758 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
11759
11760 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
11761 * config/v850/v850.c (notice_update_cc): Remove.
11762 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
11763 (CC_NO_CARRY): Likewise.
11764 (NOTICE_UPDATE_CC): Define to nothing.
11765 * config/v850/v850.md: Remove block comment on cc0 handling
11766 Remove "cc" attribute from all patterns. Remove cc_status handling
11767 from all patterns. Minor formatting fixes.
11768
11769 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11770
11771 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
11772 (cortex-a76.cortex-a55): Likewise.
11773 * config/aarch64/aarch64-tune.md: Regenerate.
11774 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
11775 cortex-a76.cortex-a55.
11776
11777 2018-06-27 Jeff Law <law@redhat.com>
11778
11779 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
11780 (MULTILIB_DIRNAMES): Similarly.
11781
11782 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
11783
11784 * gimple.h (gimple_return_retbnd): Delete.
11785 (gimple_return_set_retbnd): Likewise.
11786 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
11787 gimple_return_set_retbnd.
11788 * gimple-pretty-print.c (dump_gimple_return): Remove call to
11789 gimple_return_retbnd and adjust.
11790 * tree-inline.h (struct copy_body_data): Remove retbnd field.
11791 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
11792 Explicitly return NULL in a couple more cases. Move assertion
11793 on debug statements and remove unreachable code.
11794 (reset_debug_binding): Do not test id->retbnd.
11795 (expand_call_inline): Do not set it.
11796
11797 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
11798
11799 * configure.ac: Add --disable-gcov option.
11800 * configure: Regenerate.
11801 * Makefile.in: Honour @enable_gcov@.
11802 * doc/install.texi: Document --disable-gcov.
11803
11804 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11805
11806 * config/arm/arm-cpus.in (cortex-a76): New entry.
11807 (cortex-a76.cortex-a55): Likewise.
11808 * config/arm/arm-tables.opt: Regenerate.
11809 * config/arm/arm-tune.md: Likewise.
11810 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
11811 * doc/invoke.texi (ARM Options): Document cortex-a76 and
11812 cortex-a76.cortex-a55.
11813
11814 2018-06-27 Tamar Christina <tamar.christina@arm.com>
11815
11816 PR target/85769
11817 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
11818
11819 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
11820
11821 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
11822 comment.
11823 (EPILOGUE_USES): Likewise.
11824
11825 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
11826
11827 * tree-inline.c (remap_location): New function extracted from...
11828 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
11829 (copy_phis_for_bb): ...here. Call remap_location.
11830 (copy_cfg_body): Adjust call to copy_edges_for_bb.
11831
11832 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
11833
11834 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
11835 unaligned vsx for 16B memset.
11836
11837 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
11838
11839 PR target/86285
11840 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
11841 ieee128_float_type_node to long_double_type_node unless
11842 TARGET_LONG_DOUBLE_128 is set.
11843
11844 2018-06-26 David Malcolm <dmalcolm@redhat.com>
11845
11846 * cfgloop.c (get_loop_location): Convert return type from
11847 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
11848 by implicit construction from rtx_insn *, and using
11849 dump_user_location_t::from_function_decl for the fallback case.
11850 * cfgloop.h (get_loop_location): Convert return type from
11851 location_t to dump_user_location_t.
11852 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
11853 dump_printf_loc to pass in a dump_location_t rather than a
11854 location_t, via the gimple stmt.
11855 * coverage.c (get_coverage_counts): Update calls to
11856 dump_printf_loc to pass in dump_location_t rather than a
11857 location_t.
11858 * doc/optinfo.texi (Dump types): Convert example of
11859 dump_printf_loc from taking "locus" to taking "insn". Update
11860 description of the "_loc" calls to cover dump_location_t.
11861 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
11862 "selftest.h".
11863 (dump_user_location_t::dump_user_location_t): New constructors,
11864 from gimple *stmt and rtx_insn *.
11865 (dump_user_location_t::from_function_decl): New function.
11866 (dump_loc): Make static.
11867 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
11868 const dump_location_t &.
11869 (dump_generic_expr_loc): Delete.
11870 (dump_printf_loc): Convert param "loc" from location_t to
11871 const dump_location_t &.
11872 (selftest::test_impl_location): New function.
11873 (selftest::dumpfile_c_tests): New function.
11874 * dumpfile.h: Include "profile-count.h".
11875 (class dump_user_location_t): New class.
11876 (struct dump_impl_location_t): New struct.
11877 (class dump_location_t): New class.
11878 (dump_printf_loc): Convert 2nd param from source_location to
11879 const dump_location_t &.
11880 (dump_generic_expr_loc): Delete.
11881 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
11882 const dump_location_t &.
11883 * gimple-fold.c (fold_gimple_assign): Update call to
11884 dump_printf_loc to pass in a dump_location_t rather than a
11885 location_t, via the gimple stmt.
11886 (gimple_fold_call): Likewise.
11887 * gimple-loop-interchange.cc
11888 (loop_cand::analyze_iloop_reduction_var): Update for change to
11889 check_reduction_path.
11890 (tree_loop_interchange::interchange): Update for change to
11891 find_loop_location.
11892 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
11893 change in return-type of find_loop_location.
11894 (graphite_regenerate_ast_isl): Likewise.
11895 * graphite-optimize-isl.c (optimize_isl): Likewise.
11896 * graphite.c (graphite_transform_loops): Likewise.
11897 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
11898 pass in a dump_location_t rather than a location_t, via the
11899 gimple stmt.
11900 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11901 * ipa.c (walk_polymorphic_call_targets): Likewise.
11902 * loop-unroll.c (report_unroll): Convert "locus" param from
11903 location_t to dump_location_t.
11904 (decide_unrolling): Update for change to get_loop_location's
11905 return type.
11906 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
11907 location_t to dump_user_location_t.
11908 (grid_find_single_omp_among_assignments_1): Updates calls to
11909 dump_printf_loc to pass in a dump_location_t rather than a
11910 location_t, via the gimple stmt.
11911 (grid_parallel_clauses_gridifiable): Convert "tloc" from
11912 location_t to dump_location_t. Updates calls to dump_printf_loc
11913 to pass in a dump_location_t rather than a location_t, via the
11914 gimple stmt.
11915 (grid_inner_loop_gridifiable_p): Likewise.
11916 (grid_dist_follows_simple_pattern): Likewise.
11917 (grid_gfor_follows_tiling_pattern): Likewise.
11918 (grid_target_follows_gridifiable_pattern): Likewise.
11919 (grid_attempt_target_gridification): Convert initialization
11920 of local "grid" from memset to zero-initialization; FIXME: does
11921 this require C++11? Update call to dump_printf_loc to pass in a
11922 optinfo_location rather than a location_t, via the gimple stmt.
11923 * profile.c (read_profile_edge_counts): Updates call to
11924 dump_printf_loc to pass in a dump_location_t rather than a
11925 location_t
11926 (compute_branch_probabilities): Likewise.
11927 * selftest-run-tests.c (selftest::run_tests): Call
11928 dumpfile_c_tests.
11929 * selftest.h (dumpfile_c_tests): New decl.
11930 * tree-loop-distribution.c (pass_loop_distribution::execute):
11931 Update for change in return type of find_loop_location.
11932 * tree-parloops.c (parallelize_loops): Likewise.
11933 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
11934 "locus" from location_t to dump_user_location_t.
11935 (canonicalize_loop_induction_variables): Likewise.
11936 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
11937 for change in return type of find_loop_location.
11938 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
11939 to dump_printf_loc to pass in a dump_location_t rather than a
11940 location_t, via the stmt.
11941 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
11942 Likewise.
11943 * tree-vect-loop-manip.c (find_loop_location): Convert return
11944 type from source_location to dump_user_location_t.
11945 (vect_do_peeling): Update for above change.
11946 (vect_loop_versioning): Update for change in type of
11947 vect_location.
11948 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
11949 from location_t to dump_user_location_t.
11950 (vect_estimate_min_profitable_iters): Update for change in type
11951 of vect_location.
11952 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
11953 location_t to dump_location_t.
11954 (vect_slp_bb): Update for change in type of vect_location.
11955 * tree-vectorizer.c (vect_location): Convert from source_location
11956 to dump_user_location_t.
11957 (try_vectorize_loop_1): Update for change in vect_location's type.
11958 (vectorize_loops): Likewise.
11959 (increase_alignment): Likewise.
11960 * tree-vectorizer.h (vect_location): Convert from source_location
11961 to dump_user_location_t.
11962 (find_loop_location): Convert return type from source_location to
11963 dump_user_location_t.
11964 (check_reduction_path): Convert 1st param from location_t to
11965 dump_user_location_t.
11966 * value-prof.c (check_counter): Update call to dump_printf_loc to
11967 pass in a dump_user_location_t rather than a location_t; update
11968 call to error_at for change in type of "locus".
11969 (check_ic_target): Update call to dump_printf_loc to
11970 pass in a dump_user_location_t rather than a location_t, via the
11971 call_stmt.
11972
11973 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
11974
11975 * config/s390/s390.h (enum processor_flags): Do not use
11976 default tune parameter when -march was specified.
11977
11978 2018-06-26 Jakub Jelinek <jakub@redhat.com>
11979
11980 PR target/86314
11981 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
11982 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
11983 operands.
11984
11985 2018-06-26 Richard Biener <rguenther@suse.de>
11986
11987 PR tree-optimization/86287
11988 PR bootstrap/86316
11989 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
11990 (vect_analyze_loop): Initialize n_stmts.
11991
11992 2018-06-26 Richard Biener <rguenther@suse.de>
11993
11994 PR middle-end/86271
11995 * fold-const.c (fold_convertible_p): Pointer extension
11996 isn't valid.
11997
11998 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
11999
12000 PR debug/86064
12001 * dwarf2out.c (loc_list_has_views): Adjust comments.
12002 (dw_loc_list): Split single cross-partition range with
12003 nonzero locview.
12004
12005 2018-06-25 Jeff Law <law@redhat.com>
12006
12007 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
12008 on -mbig-switch by default.
12009
12010 * config/v850/predicates.md (const_float_1_operand): Fix match_code
12011 test.
12012 (const_float_0_operand): Remove unused predicate.
12013 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
12014 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
12015 (recipsf2): New expander. Original pattern now called
12016 (recipsf2_insn).
12017 (recipdf2, recipdf2_insn): Similarly.
12018 (rsqrtsf2, rsqrtsf2_insn): Similarly
12019 (rsqrtdf2, rsqrtdf2_insn): Similarly
12020
12021 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
12022
12023 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
12024 Simplify logic for FreeBSD (twice).
12025
12026 2018-06-25 Martin Sebor <msebor@redhat.com>
12027
12028 PR tree-optimization/86204
12029 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
12030 a strnlen result if it's less than the length of the string.
12031
12032 2018-06-25 Martin Sebor <msebor@redhat.com>
12033
12034 PR tree-optimization/85700
12035 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
12036 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
12037 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
12038
12039 2018-06-25 Martin Sebor <msebor@redhat.com>
12040
12041 * doc/extend.texi (Zero-length arrays): Update and clarify.
12042
12043 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
12044
12045 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
12046 added IEEE/IBM long double multilib support on PowerPC little
12047 endian Linux systems.
12048 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
12049 (MULTILIB_DEFAULTS): Likewise.
12050 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12051 Likewise.
12052 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
12053 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
12054 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
12055
12056 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
12057
12058 PR middle-end/86311
12059 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
12060 (REORDER_45): Likewise.
12061
12062 2018-06-25 Jeff Law <law@redhat.com>
12063
12064 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
12065 dividend to 32 bits. Adjust length.
12066 (udivmodhi4): Cleanup output template. Fix length.
12067
12068 2018-06-25 Carl Love <cel@us.ibm.com>
12069
12070 * config/rs6000/vsx.md: Change word selector to prefered location.
12071
12072 2018-06-25 Richard Biener <rguenther@suse.de>
12073
12074 PR tree-optimization/86304
12075 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
12076 epilogue-if-converted loops as well.
12077
12078 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
12079
12080 * lto-section-out.c (lto_begin_section): Do not print section
12081 name for noaddr and unnumbered dumps.
12082
12083 2018-06-25 Richard Biener <rguenther@suse.de>
12084
12085 * tree-vectorizer.h (struct vec_info_shared): New structure
12086 with parts split out from struct vec_info and loop_nest from
12087 struct _loop_vec_info.
12088 (struct vec_info): Adjust accordingly.
12089 (struct _loop_vec_info): Likewise.
12090 (LOOP_VINFO_LOOP_NEST): Adjust.
12091 (LOOP_VINFO_DATAREFS): Likewise.
12092 (LOOP_VINFO_DDRS): Likewise.
12093 (struct _bb_vec_info): Likewise.
12094 (BB_VINFO_DATAREFS): Likewise.
12095 (BB_VINFO_DDRS): Likewise.
12096 (struct _stmt_vec_info): Add dr_aux member.
12097 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
12098 (DR_MISALIGNMENT_UNINITIALIZED): New.
12099 (set_dr_misalignment): Adjust.
12100 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
12101 (vect_analyze_loop): Adjust prototype.
12102 (vect_analyze_loop_form): Likewise.
12103 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12104 Compute dependences lazily.
12105 (vect_record_base_alignments): Use shared datarefs/ddrs.
12106 (vect_verify_datarefs_alignment): Likewise.
12107 (vect_analyze_data_refs_alignment): Likewise.
12108 (vect_analyze_data_ref_accesses): Likewise.
12109 (vect_analyze_data_refs): Likewise.
12110 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
12111 constructor parameter for shared part.
12112 (vect_analyze_loop_form): Pass in shared part and adjust.
12113 (vect_analyze_loop_2): Pass in storage for the number of
12114 stmts. Move loop nest finding to the caller. Compute
12115 datarefs lazily.
12116 (vect_analyze_loop): Pass in shared part.
12117 (vect_transform_loop): Verify shared datarefs are unchanged.
12118 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
12119 constructor parameter for shared part.
12120 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
12121 (vect_slp_bb): Verify shared datarefs are unchanged before
12122 transform.
12123 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
12124 change.
12125 (new_stmt_vec_info): Initialize DR_AUX misalignment to
12126 DR_MISALIGNMENT_UNINITIALIZED.
12127 * tree-vectorizer.c (vec_info::vec_info): Add constructor
12128 parameter for shared part.
12129 (vec_info::~vec_info): Adjust.
12130 (vec_info_shared::vec_info_shared): New.
12131 (vec_info_shared::~vec_info_shared): Likewise.
12132 (vec_info_shared::save_datarefs): Likewise.
12133 (vec_info_shared::check_datarefs): Likewise.
12134 (try_vectorize_loop_1): Construct shared part live for analyses
12135 of a single loop for multiple vector sizes.
12136 * tree-parloops.c (gather_scalar_reductions): Adjust.
12137
12138 2018-06-25 Richard Biener <rguenther@suse.de>
12139
12140 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
12141 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
12142 (vect_analyze_data_refs): Remove similar code from here and
12143 simplify accordingly.
12144
12145 2018-06-25 Richard Biener <rguenther@suse.de>
12146
12147 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
12148 for reverse storage order accesses rather than asserting
12149 they cannot happen here.
12150
12151 2018-06-25 Tom de Vries <tdevries@suse.de>
12152
12153 PR debug/86257
12154 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
12155 Use data16 instead of .byte for insn prefix.
12156
12157 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
12158
12159 PR C++/86082
12160 * parser.c (make_char_string_pack): Pass this literal chars
12161 through cpp_interpret_string.
12162 (cp_parser_userdef_numeric_literal): Check the result of
12163 make_char_string_pack.
12164
12165 2018-06-24 Maya Rashish <coypu@sdf.org>
12166
12167 * ginclude/stddef.h: Simplify conditions around avoiding
12168 re-definition of __size_t.
12169
12170 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12171
12172 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12173 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12174
12175 2018-06-22 Maya Rashish <coypu@sdf.org>
12176
12177 * doc/invoke.texi (mno-fancy-math-387): Update for changes
12178 made to OpenBSD and NetBSD through the years.
12179
12180 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12181
12182 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12183 behavior of vec_pack (vector double, vector double) to match
12184 behavior of vec_float2 (vector double, vector double).
12185
12186 2018-06-22 Olivier Hainque <hainque@adacore.com>
12187
12188 * gimplify.c (gimplify_function_tree): Prevent creation
12189 of a trampoline for the address of the current function
12190 passed to entry/exit instrumentation hooks.
12191
12192 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
12193
12194 PR target/86222
12195 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12196 correctly.
12197
12198 2018-06-22 Martin Liska <mliska@suse.cz>
12199
12200 PR tree-optimization/86263
12201 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12202 Bail out if is_enabled is false.
12203 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12204 New declaration.
12205 (jump_table_cluster::is_enabled): New function.
12206
12207 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12208
12209 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12210 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12211 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12212 (lto_input_ts_binfo_tree_pointers): Likewise.
12213 * tree-streamer-out.c (streamer_write_tree_bitfields,
12214 write_ts_binfo_tree_pointers): Likewise.
12215 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12216
12217 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12218
12219 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12220
12221 2018-06-22 Martin Liska <mliska@suse.cz>
12222
12223 * symbol-summary.h (get): Make it pure and inline move
12224 functionality from ::get function.
12225 (get): Remove and inline into ::get and ::get_create.
12226 (get_create): Move code from ::get function.
12227
12228 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12229
12230 PR target/85994
12231 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12232 -x assembler-with-cpp.
12233
12234 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12235
12236 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12237 _FILE_OFFSET_BITS=64 for C++.
12238
12239 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
12240
12241 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12242 conversion insn that shows up when pr85657-3.c is compiled using
12243 IEEE 128-bit long double.
12244 (neg<mode>2_internal): Use the correct mode to check whether the
12245 mode is IBM extended.
12246 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12247 multiply and divide external functions from being created more
12248 than once.
12249
12250 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12251
12252 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12253 functions.
12254 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
12255 the edge can be forwarded.
12256 (cfg_layout_merge_blocks): Likewise.
12257
12258 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12259
12260 * except.c (finish_eh_generation): Commit edge insertions only after
12261 the EH edges have been redirected from post-landing to landing pads.
12262
12263 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12264
12265 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12266 create_tmp_var_for to create the FRAME decl.
12267 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12268
12269 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12270
12271 * tree-inline.c (copy_edges_for_bb): Minor tweak.
12272 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12273 debug statement when resetting its value.
12274 (expand_call_inline): Copy the locus of the call onto the assignment
12275 of the return value, if any. Use local variable in more cases.
12276
12277 2018-06-21 Martin Liska <mliska@suse.cz>
12278
12279 * ipa-pure-const.c (propagate_nothrow): Use
12280 funct_state_summaries->get.
12281 (dump_malloc_lattice): Likewise.
12282 (propagate_malloc): Likewise.
12283
12284 2018-06-21 Richard Biener <rguenther@suse.de>
12285
12286 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12287 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12288 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12289 comment.
12290 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12291 BLOCK_ABSTRACT_ORIGIN unconditionally.
12292
12293 2018-06-21 David Malcolm <dmalcolm@redhat.com>
12294
12295 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12296 deleting it.
12297 * ipa-reference.c (ipa_reference_c_finalize): Delete
12298 ipa_ref_opt_sum_summaries and set it to NULL.
12299
12300 2018-06-21 Tom de Vries <tdevries@suse.de>
12301
12302 PR tree-optimization/85859
12303 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12304 test with comment from bb_no_side_effects_p.
12305
12306 2018-06-21 Richard Biener <rguenther@suse.de>
12307
12308 PR tree-optimization/86232
12309 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12310 max for constant niter.
12311
12312 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12313
12314 * config/aarch64/aarch64-simd.md
12315 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12316
12317 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12318
12319 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12320 Make opernads of the unspec commutative.
12321
12322 2018-06-21 Richard Biener <rguenther@suse.de>
12323
12324 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12325 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12326 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12327 (vect_analyze_data_ref_dependence): Re-order checks to deal with
12328 NULL DR_STEP.
12329 (vect_record_base_alignments): Do not record base alignment
12330 for gathers or scatters.
12331 (vect_compute_data_ref_alignment): Drop return value that is always
12332 true. Bail out early for gathers or scatters.
12333 (vect_enhance_data_refs_alignment): Bail out early for gathers
12334 or scatters.
12335 (vect_find_same_alignment_drs): Likewise.
12336 (vect_analyze_data_refs_alignment): Remove dead code.
12337 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12338 (vect_analyze_data_refs): For possible gathers or scatters do
12339 not create an alternate DR, just check their possible validity
12340 and mark them. Adjust DECL_NONALIASED handling to not rely
12341 on DR_BASE_ADDRESS.
12342 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12343 update inits of gathers or scatters.
12344 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12345 Also copy gather/scatter flag to pattern vinfo.
12346
12347 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
12348
12349 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12350 behavior of vec_packsu (vector unsigned long long, vector unsigned
12351 long long) to match behavior of vec_packs with same signature.
12352
12353 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
12354 Thomas Schwinge <thomas@codesourcery.com>
12355 Cesar Philippidis <cesar@codesourcery.com>
12356
12357 * gimplify.c (gimplify_scan_omp_clauses): Add support for
12358 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12359 (gimplify_adjust_omp_clauses): Likewise.
12360 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12361 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12362 (gimplify_omp_target_update): Update handling of acc update and
12363 enter/exit data.
12364 * omp-low.c (install_var_field): Remove unused parameter
12365 base_pointers_restrict.
12366 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12367 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12368 FINALIZE}
12369 (omp_target_base_pointers_restrict_p): Delete.
12370 (scan_omp_target): Update call to scan_sharing_clauses.
12371 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12372 FINALIZE}.
12373 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12374 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12375 (convert_local_omp_clauses): Likewise.
12376 * tree-pretty-print.c (dump_omp_clause): Likewise.
12377 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
12378 FINALIZE}.
12379 (omp_clause_code_name): Likewise.
12380
12381 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12382
12383 PR debug/86194
12384 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12385 be narrowed.
12386
12387 PR tree-optimization/86231
12388 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
12389 anti-range don't overwrite *vr0min before using it to compute *vr0max.
12390
12391 2018-06-20 Tom de Vries <tdevries@suse.de>
12392
12393 PR tree-optimization/86097
12394 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12395 iv type if signedness of iv type is not the same as that of *nit.
12396
12397 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12398
12399 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
12400 EDGE_EH edges, verify they are all EDGE_EH.
12401
12402 2018-06-20 Maya Rashish <coypu@sdf.org>
12403
12404 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12405
12406 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12407
12408 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12409 * config/aarch64/aarch64.c (xgene1_tunings): Add
12410 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
12411 (aarch64_mode_valid_for_sched_fusion_p):
12412 Allow 16-byte modes.
12413 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
12414 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
12415 128-bit modes.
12416 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
12417 New pattern.
12418 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
12419 * config/aarch64/iterators.md (VQ2): New mode iterator.
12420
12421 2018-06-20 Martin Liska <mliska@suse.cz>
12422
12423 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12424 Change default ratio from 10 to 8.
12425
12426 2018-06-20 Martin Liska <mliska@suse.cz>
12427
12428 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12429 New.
12430 (bit_test_cluster::find_bit_tests): Likewise.
12431 (switch_decision_tree::analyze_switch_statement): Find clusters.
12432 * tree-switch-conversion.h (struct jump_table_cluster): Document
12433 hierarchy.
12434
12435 2018-06-20 Martin Liska <mliska@suse.cz>
12436
12437 * tree-switch-conversion.c (switch_conversion::collect):
12438 Record m_uniq property.
12439 (switch_conversion::expand): Bail out for special conditions.
12440 (group_cluster::~group_cluster): New.
12441 (group_cluster::group_cluster): Likewise.
12442 (group_cluster::dump): Likewise.
12443 (jump_table_cluster::emit): New.
12444 (switch_decision_tree::fix_phi_operands_for_edges): New.
12445 (struct case_node): Remove struct.
12446 (jump_table_cluster::can_be_handled): New.
12447 (case_values_threshold): Moved to header.
12448 (reset_out_edges_aux): Likewise.
12449 (jump_table_cluster::is_beneficial): New.
12450 (bit_test_cluster::can_be_handled): Likewise.
12451 (add_case_node): Remove.
12452 (bit_test_cluster::is_beneficial): New.
12453 (case_bit_test::cmp): New.
12454 (bit_test_cluster::emit): New.
12455 (expand_switch_as_decision_tree_p): Remove.
12456 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
12457 (fix_phi_operands_for_edge): Likewise.
12458 (switch_decision_tree::analyze_switch_statement): New.
12459 (compute_cases_per_edge): Move ...
12460 (switch_decision_tree::compute_cases_per_edge): ... here.
12461 (try_switch_expansion): Likewise.
12462 (switch_decision_tree::try_switch_expansion): Likewise.
12463 (record_phi_operand_mapping): Likewise.
12464 (switch_decision_tree::record_phi_operand_mapping): Likewise.
12465 (emit_case_decision_tree): Likewise.
12466 (switch_decision_tree::emit): Likewise.
12467 (balance_case_nodes): Likewise.
12468 (switch_decision_tree::balance_case_nodes): Likewise.
12469 (dump_case_nodes): Likewise.
12470 (switch_decision_tree::dump_case_nodes): Likewise.
12471 (emit_jump): Likewise.
12472 (switch_decision_tree::emit_jump): Likewise.
12473 (emit_cmp_and_jump_insns): Likewise.
12474 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
12475 (emit_case_nodes): Likewise.
12476 (switch_decision_tree::emit_case_nodes): Likewise.
12477 (conditional_probability): Remove.
12478 * tree-switch-conversion.h (enum cluster_type): New.
12479 (PRINT_CASE): New.
12480 (struct cluster): Likewise.
12481 (cluster::cluster): Likewise.
12482 (struct simple_cluster): Likewise.
12483 (simple_cluster::simple_cluster): Likewise.
12484 (struct group_cluster): Likewise.
12485 (struct jump_table_cluster): Likewise.
12486 (struct bit_test_cluster): Likewise.
12487 (struct min_cluster_item): Likewise.
12488 (struct case_tree_node): Likewise.
12489 (case_tree_node::case_tree_node): Likewise.
12490 (jump_table_cluster::case_values_threshold): Likewise.
12491 (struct case_bit_test): Likewise.
12492 (struct switch_decision_tree): Likewise.
12493 (struct switch_conversion): Likewise.
12494 (switch_decision_tree::reset_out_edges_aux): Likewise.
12495
12496 2018-06-20 Martin Liska <mliska@suse.cz>
12497
12498 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
12499 (hoist_edge_and_branch_if_true): Likewise.
12500 (expand_switch_using_bit_tests_p): Likewise.
12501 (struct case_bit_test): Likewise.
12502 (case_bit_test_cmp): Likewise.
12503 (emit_case_bit_tests): Likewise.
12504 (switch_conversion::switch_conversion): New class.
12505 (struct switch_conv_info): Remove old struct.
12506 (collect_switch_conv_info): More to ...
12507 (switch_conversion::collect): ... this.
12508 (check_range): Likewise.
12509 (switch_conversion::check_range): Likewise.
12510 (check_all_empty_except_final): Likewise.
12511 (switch_conversion::check_all_empty_except_final): Likewise.
12512 (check_final_bb): Likewise.
12513 (switch_conversion::check_final_bb): Likewise.
12514 (create_temp_arrays): Likewise.
12515 (switch_conversion::create_temp_arrays): Likewise.
12516 (free_temp_arrays): Likewise.
12517 (gather_default_values): Likewise.
12518 (switch_conversion::gather_default_values): Likewise.
12519 (build_constructors): Likewise.
12520 (switch_conversion::build_constructors): Likewise.
12521 (constructor_contains_same_values_p): Likewise.
12522 (switch_conversion::contains_same_values_p): Likewise.
12523 (array_value_type): Likewise.
12524 (switch_conversion::array_value_type): Likewise.
12525 (build_one_array): Likewise.
12526 (switch_conversion::build_one_array): Likewise.
12527 (build_arrays): Likewise.
12528 (switch_conversion::build_arrays): Likewise.
12529 (gen_def_assigns): Likewise.
12530 (switch_conversion::gen_def_assigns): Likewise.
12531 (prune_bbs): Likewise.
12532 (switch_conversion::prune_bbs): Likewise.
12533 (fix_phi_nodes): Likewise.
12534 (switch_conversion::fix_phi_nodes): Likewise.
12535 (gen_inbound_check): Likewise.
12536 (switch_conversion::gen_inbound_check): Likewise.
12537 (process_switch): Use the newly created class.
12538 (switch_conversion::expand): New.
12539 (switch_conversion::~switch_conversion): New.
12540 * tree-switch-conversion.h: New file.
12541
12542 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12543
12544 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
12545 tree-vect-patterns.c.
12546 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
12547 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
12548 (vect_recog_sad_pattern): Likewise.
12549 (vect_recog_widen_sum_pattern): Likewise.
12550 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
12551 (vect_recog_widen_shift_pattern): Remove the type_in argument.
12552 (vect_recog_rotate_pattern): Likewise.
12553 (vect_recog_mult_pattern): Likewise.
12554 (vect_recog_vector_vector_shift_pattern): Likewise.
12555 (vect_recog_divmod_pattern): Likewise.
12556 (vect_recog_mixed_size_cond_pattern): Likewise.
12557 (vect_recog_bool_pattern): Likewise.
12558 (vect_recog_mask_conversion_pattern): Likewise.
12559 (vect_try_gather_scatter_pattern): Likewise.
12560 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
12561 (vect_recog_over_widening_pattern): Likewise.
12562 (vect_recog_gather_scatter_pattern): Likewise.
12563 (vect_recog_func_ptr): Move from tree-vectorizer.h
12564 (vect_vect_recog_func_ptrs): Move further down the file.
12565 (vect_recog_func): Likewise. Remove the third argument.
12566 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
12567 (vect_pattern_recog_1): Expect the pattern function to do any
12568 necessary target tests. Also expect it to provide a vector type.
12569 Remove the type_in handling.
12570
12571 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12572
12573 * tree-vect-patterns.c (vect_pattern_detected): New function.
12574 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
12575 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
12576 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
12577 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
12578 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12579 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12580 (vect_recog_mask_conversion_pattern)
12581 (vect_try_gather_scatter_pattern): Likewise.
12582
12583 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12584
12585 * tree-vect-patterns.c (vect_get_internal_def): New function.
12586 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12587 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
12588 (search_type_for_mask_1): Use it.
12589
12590 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12591
12592 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12593 redundant WIDEN_SUM_EXPR handling.
12594 (vect_recog_sad_pattern): Likewise.
12595
12596 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12597
12598 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12599 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
12600 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
12601 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
12602 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
12603
12604 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12605
12606 * tree-vect-stmts.c (vectorizable_call): Make sure that we
12607 use the stmt_vec_info of the original bb statement for the
12608 new zero assignment, even if the call is part of a pattern.
12609
12610 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12611
12612 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
12613 that the sequence is attached to the original statement rather
12614 than the pattern statement.
12615 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
12616 PATTERN_DEF_SEQ from the original statement rather than
12617 the main pattern statement.
12618 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
12619 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
12620 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
12621
12622 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12623
12624 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
12625 definition statements before the early exit for statements that aren't
12626 live or relevant.
12627 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
12628 split out from...
12629 (vect_transform_loop): ...here. Process pattern definition
12630 statements without first checking whether the main pattern
12631 statement is live or relevant.
12632
12633 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12634
12635 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
12636 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
12637
12638 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
12639
12640 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
12641 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
12642 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
12643 (expand_block_compare): Change select_block_compare_mode call.
12644 (expand_strncmp_align_check): Use new functions, fix comment.
12645 (emit_final_str_compare_gpr): New function.
12646 (expand_strn_compare): Refactor and clean up code.
12647 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
12648
12649 2018-06-19 Tony Reix <tony.reix@atos.com>
12650 Damien Bergamini <damien.bergamini@atos.com>
12651 David Edelsohn <dje.gcc@gmail.com>
12652
12653 * collect2.c (static_obj): New variable.
12654 (static_libs): New variable.
12655 (is_in_list): Uncomment declaration.
12656 (main): Track AIX libraries linked statically.
12657 (is_in_list): Uncomment definition.
12658 (scan_prog_file): Don't add AIX shared libraries initializer
12659 to constructor list if linking statically.
12660
12661 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
12662
12663 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
12664 constant.
12665 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
12666
12667 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
12668
12669 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
12670 blocks.
12671
12672 2018-06-19 Martin Liska <mliska@suse.cz>
12673
12674 * config/i386/i386.c (ix86_can_inline_p): Do not use
12675 ipa_fn_summaries::get_create.
12676 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
12677 get.
12678 (devirtualization_time_bonus): Likewise.
12679 (ipcp_propagate_stage): Likewise.
12680 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12681 (edge_set_predicate): Likewise.
12682 (evaluate_conditions_for_known_args): Likewise.
12683 (evaluate_properties_for_edge): Likewise.
12684 (ipa_call_summary::reset): Tranform to ...
12685 (ipa_call_summary::~ipa_call_summary): ... this.
12686 (ipa_fn_summary::reset): Transform to ...
12687 (ipa_fn_summary::~ipa_fn_summary): ... this.
12688 (ipa_fn_summary_t::remove): Rename to ...
12689 (ipa_fn_summary_t::remove_callees): ... this.
12690 (ipa_fn_summary_t::duplicate): Use placement new
12691 instead of memory copy.
12692 (ipa_call_summary_t::duplicate): Likewise.
12693 (ipa_call_summary_t::remove): Remove.
12694 (dump_ipa_call_summary): Change get_create to get.
12695 (ipa_dump_fn_summary): Dump only when summary exists.
12696 (analyze_function_body): Use symbol_summary::get instead
12697 of get_create.
12698 (compute_fn_summary): Likewise.
12699 (estimate_edge_devirt_benefit): Likewise.
12700 (estimate_edge_size_and_time): Likewise.
12701 (inline_update_callee_summaries): Likewise.
12702 (remap_edge_change_prob): Likewise.
12703 (remap_edge_summaries): Likewise.
12704 (ipa_merge_fn_summary_after_inlining): Likewise.
12705 (write_ipa_call_summary): Likewise.
12706 (ipa_fn_summary_write): Likewise.
12707 (ipa_free_fn_summary): Likewise.
12708 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
12709 (struct ipa_call_summary): Likewise.
12710 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
12711 of get_create.
12712 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
12713 (estimate_size_after_inlining): Likewise.
12714 (estimate_growth): Likewise.
12715 (growth_likely_positive): Likewise.
12716 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12717 (inline_call): Likewise.
12718 * ipa-inline.c (caller_growth_limits): Likewise.
12719 (can_inline_edge_p): Likewise.
12720 (can_inline_edge_by_limits_p): Likewise.
12721 (compute_uninlined_call_time): Likewise.
12722 (compute_inlined_call_time): Likewise.
12723 (want_inline_small_function_p): Likewise.
12724 (edge_badness): Likewise.
12725 (update_caller_keys): Likewise.
12726 (update_callee_keys): Likewise.
12727 (inline_small_functions): Likewise.
12728 (inline_to_all_callers_1): Likewise.
12729 (dump_overall_stats): Likewise.
12730 (early_inline_small_functions): Likewise.
12731 (early_inliner): Likewise.
12732 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12733 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12734 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12735 * ipa-split.c (execute_split_functions): Likewise.
12736 * symbol-summary.h: Likewise.
12737 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12738
12739 2018-06-19 Richard Biener <rguenther@suse.de>
12740
12741 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
12742 (vectorize_loops): ... here. Fix dbgcnt handling.
12743 (try_vectorize_loop): Wrap try_vectorize_loop_1.
12744
12745 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
12746
12747 PR target/86197
12748 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
12749 ieee128 argument takes up only one (vector) register, not two (floating
12750 point) registers.
12751
12752 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12753
12754 * gimplify.c (gimplify_init_constructor): Really never clear for an
12755 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
12756
12757 2018-06-19 Richard Biener <rguenther@suse.de>
12758
12759 PR tree-optimization/86179
12760 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
12761 after failed recognition.
12762
12763 2018-06-18 Martin Sebor <msebor@redhat.com>
12764
12765 PR middle-end/85602
12766 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
12767 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
12768 Handle integer subtraction.
12769 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
12770 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
12771
12772 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12773
12774 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
12775 param from rtx to rtx_insn *.
12776 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
12777 param.
12778 (frv_ifcvt_modify_insn): Likwise.
12779 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
12780 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
12781 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
12782 as_a <rtx_insn *> cast to local "unprotected_region" once
12783 it's been established that it's not NULL or pc_rtx.
12784 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
12785 param "sethi" from rtx to rtx_insn *.
12786 (nds32_group_float_insns): Likewise for param "insn".
12787 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
12788 param.
12789 (vax_output_int_subtract): Likewise.
12790 * config/vax/vax.c (vax_output_int_add): Likewise for param
12791 "insn".
12792 (vax_output_int_subtract): Likewise.
12793 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
12794 (emit_pattern_after): Likewise for param "after".
12795 (emit_insn_after): Likewise.
12796 (emit_jump_insn_after): Likewise.
12797 (emit_call_insn_after): Likewise.
12798 (emit_debug_insn_after): Likewise.
12799 (emit_pattern_before): Likewise for param "before".
12800 (emit_insn_before): Likewise.
12801 (emit_jump_insn_before): Likewise.
12802 * final.c (get_insn_template): Likewise for param "insn", removing
12803 a cast.
12804 * output.h (get_insn_template): Likewise for 2nd param.
12805 * rtl.h (emit_insn_before): Likewise.
12806 (emit_jump_insn_before): Likewise.
12807 (emit_debug_insn_before_noloc): Likewise.
12808 (emit_insn_after): Likewise.
12809 (emit_jump_insn_after): Likewise.
12810 (emit_call_insn_after): Likewise.
12811 (emit_debug_insn_after): Likewise.
12812 (set_insn_deleted): Likewise for param.
12813
12814 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
12815
12816 PR target/85358
12817 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
12818 floating point modes, so that IFmode is numerically greater than
12819 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
12820 to declare the ordering. This prevents IFmode from being
12821 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
12822 machine. Include rs6000-modes.h to share the fractional values
12823 between genmodes* and the rest of the compiler.
12824 (IFmode): Likewise.
12825 (KFmode): Likewise.
12826 (TFmode): Likewise.
12827 * config/rs6000/rs6000-modes.h: New file.
12828 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
12829 meaning of rs6000_long_double_size so that 126..128 selects an
12830 appropriate 128-bit floating point type.
12831 (rs6000_option_override_internal): Likewise.
12832 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
12833 (TARGET_LONG_DOUBLE_128): Change the meaning of
12834 rs6000_long_double_size so that 126..128 selects an appropriate
12835 128-bit floating point type.
12836 (LONG_DOUBLE_TYPE_SIZE): Update comment.
12837 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
12838 source and destination to match the standard usage.
12839 (truncifkf2): Likewise.
12840 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
12841 ISA 2.07 to use an explicit clobber, instead of passing in a
12842 temporary.
12843 (copysign<mode>3_soft): Likewise.
12844
12845 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12846
12847 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12848 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
12849 (vect_slp_analyze_instance_dependence): Likewise.
12850 (vect_enhance_data_refs_alignment): Likewise.
12851 (vect_analyze_data_refs_alignment): Likewise.
12852 (vect_slp_analyze_and_verify_instance_alignment
12853 (vect_analyze_data_ref_accesses): Likewise.
12854 (vect_prune_runtime_alias_test_list): Likewise.
12855 (vect_analyze_data_refs): Likewise.
12856 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
12857 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12858 (vect_analyze_scalar_cycles_1): Likewise.
12859 (vect_get_loop_niters): Likewise.
12860 (vect_analyze_loop_form_1): Likewise.
12861 (vect_update_vf_for_slp): Likewise.
12862 (vect_analyze_loop_operations): Likewise.
12863 (vect_analyze_loop): Likewise.
12864 (vectorizable_induction): Likewise.
12865 (vect_transform_loop): Likewise.
12866 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
12867 * tree-vect-slp.c (vect_analyze_slp): Likewise.
12868 (vect_make_slp_decision): Likewise.
12869 (vect_detect_hybrid_slp): Likewise.
12870 (vect_slp_analyze_operations): Likewise.
12871 (vect_slp_bb): Likewise.
12872 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
12873 (vectorizable_bswap): Likewise.
12874 (vectorizable_call): Likewise.
12875 (vectorizable_simd_clone_call): Likewise.
12876 (vectorizable_conversion): Likewise.
12877 (vectorizable_assignment): Likewise.
12878 (vectorizable_shift): Likewise.
12879 (vectorizable_operation): Likewise.
12880 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
12881
12882 2018-06-18 Martin Sebor <msebor@redhat.com>
12883
12884 PR tree-optimization/81384
12885 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
12886 * builtins.c (expand_builtin_strnlen): New function.
12887 (expand_builtin): Call it.
12888 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
12889 * builtins.def (BUILT_IN_STRNLEN): New.
12890 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
12891 Warn for bounds in excess of maximum object size.
12892 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
12893 single-value ranges. Handle strnlen.
12894 (handle_builtin_strlen): Handle strnlen.
12895 (strlen_check_and_optimize_stmt): Same.
12896 * doc/extend.texi (Other Builtins): Document strnlen.
12897
12898 2018-06-18 Maya Rashish <coypu@sdf.org>
12899
12900 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
12901 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
12902 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
12903
12904 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
12905 here to ...
12906 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
12907
12908 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12909
12910 * tree.c (escaped_string::escape): Replace cast to char * by
12911 const_cast<char *> (unescaped).
12912
12913 2018-06-18 Nick Clifton <nickc@redhat.com>
12914
12915 PR 84195
12916 * tree.c (escaped_string): New class. Converts an unescaped
12917 string into its escaped equivalent.
12918 (warn_deprecated_use): Use the new class to convert the
12919 deprecation message, if present.
12920 (test_escaped_strings): New self test.
12921 (test_c_tests): Add test_escaped_strings.
12922 * doc/extend.texi (deprecated): Add a note that the
12923 deprecation message is affected by the -fmessage-length
12924 option, and that control characters will be escaped.
12925 (#pragma GCC error): Document this pragma.
12926 (#pragma GCC warning): Likewise.
12927 * doc/invoke.texi (-fmessage-length): Document this option's
12928 effect on the #warning and #error preprocessor directives and
12929 the deprecated attribute.
12930
12931 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
12932
12933 * tree.c (decl_value_expr_lookup): Revert latest change.
12934 (decl_value_expr_insert): Likewise.
12935
12936 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
12937
12938 * gimplify.c (nonlocal_vlas): Delete.
12939 (nonlocal_vla_vars): Likewise.
12940 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
12941 referenced VLAs.
12942 (gimplify_body): Do not create and destroy nonlocal_vlas.
12943 * tree-nested.c: Include diagnostic.h.
12944 (use_pointer_in_frame): Tweak.
12945 (lookup_field_for_decl): Add assertion and declare the transformation.
12946 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
12947 internal error when the reference is in a wrong context. Do not
12948 create a debug decl by default.
12949 (note_nonlocal_block_vlas): Delete.
12950 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
12951 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
12952 create a debug decl by default.
12953 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
12954 call is in a wrong context.
12955 (fixup_vla_decls): New function.
12956 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
12957 debug variables were created.
12958 * tree.c (decl_value_expr_lookup): Add checking assertion.
12959 (decl_value_expr_insert): Likewise.
12960
12961 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
12962
12963 PR middle-end/82479
12964 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
12965 * tree-scalar-evolution.c (interpret_expr): Likewise.
12966 (expression_expensive_p): Likewise.
12967 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
12968 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
12969 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
12970 (ssa_defined_by_minus_one_stmt_p): New.
12971
12972 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
12973
12974 PR middle-end/64946
12975 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
12976 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
12977 * dojump.c (do_jump): Likewise.
12978 * expr.c (expand_expr_real_2): Check operand type's sign.
12979 * fold-const.c (const_unop): Handle ABSU_EXPR.
12980 (fold_abs_const): Likewise.
12981 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
12982 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
12983 (strip_sign_op_1): Likesise.
12984 * match.pd: Add new pattern to generate ABSU_EXPR.
12985 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
12986 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
12987 * tree-eh.c (operation_could_trap_helper_p): Likewise.
12988 * tree-inline.c (estimate_operator_cost): Likewise.
12989 * tree-pretty-print.c (dump_generic_node): Likewise.
12990 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
12991 * tree.def (ABSU_EXPR): New.
12992
12993 2018-06-16 Jakub Jelinek <jakub@redhat.com>
12994
12995 PR middle-end/86095
12996 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
12997 documented as preserved for backward compatibility only.
12998 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
12999
13000 PR rtl-optimization/86108
13001 * bb-reorder.c (create_forwarder_block): Renamed to ...
13002 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
13003 jump from new landing pad to the second part.
13004 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
13005 Adjust callers.
13006
13007 2018-06-15 Jakub Jelinek <jakub@redhat.com>
13008
13009 PR middle-end/85878
13010 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
13011 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
13012 Only call store_expr for halves if the mode is the same.
13013
13014 PR middle-end/86123
13015 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
13016 Fix up comment formatting.
13017
13018 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
13019
13020 * typed-splay-tree.h (typed_splay_tree::remove): New function.
13021 (typed_splay_tree::closure,
13022 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
13023 (typed_splay_tree::typed_splay_tree,
13024 typed_splay_tree::operator =): Declared private.
13025 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
13026 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
13027 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
13028 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
13029 typed_splay_tree::splay_tree_splay,
13030 typed_splay_tree::splay_tree_foreach_helper,
13031 typed_splay_tree::splay_tree_insert,
13032 typed_splay_tree::splay_tree_remove,
13033 typed_splay_tree::splay_tree_lookup,
13034 typed_splay_tree::splay_tree_predecessor,
13035 typed_splay_tree::splay_tree_successor,
13036 typed_splay_tree::splay_tree_min,
13037 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
13038 (typed_splay_tree::root, typed_splay_tree::comp,
13039 typed_splay_tree::delete_key,
13040 typed_splay_tree::delete_value): New data members.
13041 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
13042 typed_splay_tree::remove.
13043
13044 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
13045
13046 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
13047 -mginv and -mno-ginv to the assembler.
13048 * config/mips/mips.opt (-mcrc): New option.
13049 (-mginv): Likewise.
13050 * doc/invoke.text (-mcrc): Document.
13051 (-mginv): Likewise.
13052
13053 2018-06-15 Nick Clifton <nickc@redhat.com>
13054
13055 PR 84195
13056 * tree.c (escaped_string): New class. Converts an unescaped
13057 string into its escaped equivalent.
13058 (warn_deprecated_use): Use the new class to convert the
13059 deprecation message, if present.
13060 (test_escaped_strings): New self test.
13061 (test_c_tests): Add test_escaped_strings.
13062 * doc/extend.texi (deprecated): Add a note that the
13063 deprecation message is affected by the -fmessage-length
13064 option, and that control characters will be escaped.
13065 (#pragma GCC error): Document this pragma.
13066 (#pragma GCC warning): Likewise.
13067 * doc/invoke.texi (-fmessage-length): Document this option's
13068 effect on the #warning and #error preprocessor directives and
13069 the deprecated attribute.
13070
13071 2018-06-15 Richard Biener <rguenther@suse.de>
13072
13073 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
13074 here, also noting vector size used.
13075 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
13076 size used in MSG_OPTIMIZED_LOCATIONS dump.
13077 (pass_slp_vectorize::execute): Adjust.
13078
13079 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
13080
13081 PR target/85968
13082 * config/arc/arc.c (arc_return_address_register): Fix
13083 if-condition.
13084
13085 2018-06-15 Richard Biener <rguenther@suse.de>
13086
13087 PR middle-end/86159
13088 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
13089 leave useless conversion stripping to force_gimple_operand_gsi.
13090 (gimplify_build2): Likewise.
13091 (gimplify_build1): Likewise.
13092
13093 2018-06-15 Richard Biener <rguenther@suse.de>
13094
13095 PR middle-end/86076
13096 * tree-cfg.c (move_stmt_op): unshare invariant addresses
13097 before adjusting their block.
13098
13099 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
13100
13101 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
13102 multilibs for *-*-rtems*.
13103 * config/riscv/t-rtems: New file.
13104
13105 2018-06-14 Jakub Jelinek <jakub@redhat.com>
13106
13107 PR middle-end/86122
13108 * match.pd ((A +- CST1) +- CST2): Punt if last resort
13109 unsigned_type_for returns NULL.
13110
13111 PR target/85945
13112 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
13113 subregs of multi-word pseudos unless the float mode has word size.
13114
13115 2018-06-14 Richard Biener <rguenther@suse.de>
13116
13117 PR middle-end/86139
13118 * tree-vect-generic.c (build_word_mode_vector_type): Remove
13119 duplicate and harmful type_hash_canon.
13120 * tree.c (type_hash_canon): Assert we didn't find ourselves.
13121
13122 2018-06-14 Richard Biener <rguenther@suse.de>
13123
13124 PR ipa/86124
13125 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
13126 NULL cgraph_node.
13127
13128 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
13129
13130 * config/rtems.h (STDINT_LONG32): Define.
13131
13132 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
13133 Prachi Godbole <prachi.godbole@imgtec.com>
13134
13135 * config/mips/mips-cpus.def: Define P6600.
13136 * config/mips/mips-tables.opt: Regenerate.
13137 * config/mips/mips.c (mips_ucbranch_type): New enum.
13138 (mips_rtx_cost_data): Add support for P6600.
13139 (mips_issue_rate): Likewise.
13140 (mips_multipass_dfa_lookahead): Likewise.
13141 (mips_avoid_hazard): Likewise.
13142 (mips_reorg_process_insns): Likewise.
13143 (mips_classify_branch_p6600): New function.
13144 * config/mips/mips.h (TUNE_P6600): New define.
13145 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
13146 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
13147 * config/mips/mips.md: Include p6600.md.
13148 (processor): Add p6600.
13149 * config/mips/p6600.md: New file.
13150 * doc/invoke.texi: Add p6600 to supported architectures.
13151
13152 2018-06-13 Martin Sebor <msebor@redhat.com>
13153
13154 PR tree-optimization/86114
13155 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
13156 of integer types.
13157 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13158
13159 2018-06-13 Richard Biener <rguenther@suse.de>
13160
13161 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13162 Properly set vector type of the intermediate stmt.
13163 * tree-vect-stmts.c (vectorizable_operation): The destination
13164 var always has vectype_out type.
13165
13166 2018-06-13 Jeff Law <law@redhat.com>
13167
13168 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13169 integer 0 for argument to print_rtl_with_bb.
13170 (rl78_reorg): Likewise.
13171
13172 2018-06-13 David Malcolm <dmalcolm@redhat.com>
13173
13174 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13175 from rtx to rtx_insn *.
13176 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13177 "label".
13178 (add_sched_insns_for_speculation): Likewise for local "target",
13179 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13180 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13181 from rtx_insn ** to rtx_code_label **.
13182 (reorg_emit_nops): Likewise.
13183 (c6x_reorg): Likewise for local "call_labels".
13184 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13185 rtx to rtx_insn *.
13186 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13187 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13188 the loops over LABEL_REFS.
13189 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13190 braf_label.
13191 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13192 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13193 (split_branches): Strengthen local "olabel" from rtx to
13194 rtx_insn *, adding a safe_as_a cast.
13195 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13196 to "rtx_insn *".
13197 (add_insn_after): Likewise for first two params.
13198 (add_insn_before): Likewise.
13199 (remove_insn): Likewise for param.
13200 (emit_pattern_before_noloc): Likewise for second and third params.
13201 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13202 (emit_call_insn_before_noloc): Likewise.
13203 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13204 to "rtx_insn *".
13205 (emit_barrier_before): Likewise.
13206 (emit_label_before): Strengthen "label" param from "rtx" to
13207 "rtx_code_label *". Strengthen "before" param from "rtx" to
13208 "rtx_insn *".
13209 (emit_insn_after_1): Strengthen "after" param from "rtx" to
13210 "rtx_insn *".
13211 (emit_pattern_after_noloc): Likewise.
13212 (emit_insn_after_noloc): Likewise.
13213 (emit_jump_insn_after_noloc): Likewise.
13214 (emit_call_insn_after_noloc): Likewise.
13215 (emit_debug_insn_after_noloc): Likewise.
13216 (emit_barrier_after): Likewise.
13217 (emit_label_after): Likewise for both params.
13218 (emit_pattern_after_setloc): Likewise for "after" param. Convert
13219 "loc" param from "int" to "location_t".
13220 (emit_insn_after_setloc): Likewise.
13221 (emit_jump_insn_after_setloc): Likewise.
13222 (emit_call_insn_after_setloc): Likewise.
13223 (emit_debug_insn_after_setloc): Likewise.
13224 (emit_pattern_before_setloc): Likewise for "before" param. Convert
13225 "loc" param from "int" to "location_t".
13226 (emit_pattern_before): Convert NULL_RTX to NULL.
13227 (emit_insn_before_setloc): Convert "loc" param from "int" to
13228 "location_t".
13229 (emit_jump_insn_before_setloc): Likewise.
13230 (emit_call_insn_before_setloc): Likewise.
13231 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13232 rtx_insn *. Convert "loc" param from "int" to "location_t".
13233 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13234 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13235 Convert 3rd param from "int" to "location_t".
13236 (emit_barrier_before, emit_barrier_after, next_real_insn):
13237 Strengthen param from rtx to rtx_insn *.
13238 (emit_label_before): Strengthen 1st param from "rtx" to
13239 "rtx_code_label *". Strengthen 2nd param from "rtx" to
13240 "rtx_insn *".
13241 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13242 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13243 Strengthen 2nd param from "rtx" to "rtx_insn *".
13244 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13245 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13246 Likewise. Convert 3rd param from "int" to "location_t".
13247 (emit_label_after): Strengthen 1st param from "rtx" to
13248 "rtx_code_label *".
13249 (next_real_insn, remove_insn): Strengthen param from "rtx" to
13250 "rtx_insn *".
13251 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13252 from "rtx" to "rtx_insn *".
13253
13254 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
13255
13256 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13257 bodies streamed in with -Q.
13258 * dumpfile.c (dump_files): Add lto-stream-out dump file.
13259 * dumpfile.h (tree_dump_index): Add lto_stream_out.
13260 * gimple-streamer-out.c: Include gimple-pretty-print.h
13261 (output_bb): Dump stmts streamed.
13262 * lto-section-out.c: Include print-tree.h
13263 (lto_begin_section): Dump sections created.
13264 (lto_output_decl_index): Dump decl encoded.
13265 * lto-streamer-out.c: Include print-tree.h
13266 (create_output_block): Dump output block created.
13267 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13268 (output_function): Dump function output.
13269 (output_constructor): Dump constructor streamed.
13270 (write_global_stream): Output indexes encoded.
13271 (produce_asm_for_decls): Dump streams encoded.
13272 * lto-streamer.c (streamer_dump_file): New global var.
13273 * lto-streamer.h (streamer_dump_file): Declare.
13274 * passes.c (ipa_write_summaries): Initialize streamer dump.
13275 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13276 in.
13277
13278 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
13279
13280 PR target/86048
13281 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13282 offsets for register save directives. Emit a second batch of save
13283 directives, if need be, when the function accesses prior frames.
13284
13285 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13286
13287 * config/arc/fpu.md (fmasf4): Force operand to register.
13288 (fnmasf4): Likewise.
13289
13290 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13291
13292 * config/arc/arc-protos.h (arc_pad_return): Remove.
13293 * config/arc/arc.c (machine_function): Remove force_short_suffix
13294 and size_reason.
13295 (arc_print_operand): Adjust printing of '&'.
13296 (arc_verify_short): Remove conditional printing of short suffix.
13297 (arc_final_prescan_insn): Remove reference to size_reason.
13298 (pad_return): New function.
13299 (arc_reorg): Call pad_return.
13300 (arc_pad_return): Remove.
13301 (arc_init_machine_status): Remove reference to force_short_suffix.
13302 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13303 (attr length): When attribute iscompact is true force to 2
13304 regardless; in the case of maybe check if we want to force the
13305 instruction to have 4 bytes length.
13306 (nopv): Change it to generate 4 byte long nop as well.
13307 (blockage): New pattern.
13308 (simple_return): Remove call to arc_pad_return.
13309 (p_return_i): Likewise.
13310
13311 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13312
13313 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13314
13315 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13316
13317 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13318 ARC cores.
13319
13320 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13321
13322 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13323 for ARC700 and ARCv2.
13324
13325 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
13326
13327 PR target/86076
13328 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13329 operands[2] instead of operands[1].
13330
13331
13332 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13333
13334 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13335 case, check whether the outer register overlaps an unallocatable
13336 register, not just whether it fits the required class.
13337
13338 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13339
13340 * poly-int.h (can_div_trunc_p): Add new overload in which all values
13341 are poly_ints.
13342 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13343 (memrefs_conflict_p): Likewise.
13344 (init_alias_analysis): Likewise.
13345 * cfgexpand.c (expand_debug_expr): Likewise.
13346 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13347 * cse.c (fold_rtx): Likewise.
13348 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13349 * expr.c (emit_block_move_hints): Likewise.
13350 (clear_storage_hints, push_block, emit_push_insn): Likewise.
13351 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13352 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13353 (emit_group_store): Likewise.
13354 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
13355 to read the PRE/POST_MODIFY increment.
13356 * calls.c (store_one_arg): Use strip_offset.
13357 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13358 poly_int_rtx_p.
13359 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13360 by a VEC_SELECT.
13361 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13362 (simplify_binary_operation_1): Extend CONST_INT handling to
13363 poly_int_rtx_p.
13364 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13365 than a HOST_WIDE_INT.
13366 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13367 poly_int64.
13368 (adjust_mems, add_stores): Update accodingly.
13369 (vt_canonicalize_addr): Track polynomial offsets.
13370 (emit_note_insn_var_location): Likewise.
13371 (vt_add_function_parameter): Likewise.
13372 (vt_initialize): Likewise.
13373
13374 2018-06-12 Jeff Law <law@redhat.com>
13375
13376 * config.gcc (alpha*-*-freebsd*): Remove.
13377 * config/alpha/freebsd.h: Remove.
13378
13379 2018-06-12 David Malcolm <dmalcolm@redhat.com>
13380
13381 PR other/69968
13382 * spellcheck-tree.c (levenshtein_distance): Rename to...
13383 (get_edit_distance): ...this, and update for underlying renaming.
13384 * spellcheck-tree.h (levenshtein_distance): Rename to...
13385 (get_edit_distance): ...this.
13386 * spellcheck.c (levenshtein_distance): Rename to...
13387 (get_edit_distance): ...this. Convert from Levenshtein distance
13388 to Damerau-Levenshtein distance by supporting transpositions of
13389 adjacent characters. Rename "v1" to "v_next" and "v0" to
13390 "v_one_ago".
13391 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13392 (selftest::test_edit_distance_unit_test_oneway): ...this, and
13393 update for underlying renaming.
13394 (selftest::levenshtein_distance_unit_test): Rename to...
13395 (selftest::test_get_edit_distance_unit): ...this, and update for
13396 underlying renaming.
13397 (selftest::test_find_closest_string): Add example from PR 69968
13398 where transposition helps
13399 (selftest::test_metric_conditions): Update for renaming.
13400 (selftest::test_metric_conditions): Likewise.
13401 (selftest::spellcheck_c_tests): Likewise.
13402 * spellcheck.h (levenshtein_distance): Rename both overloads to...
13403 (get_edit_distance): ...this.
13404 (best_match::consider): Update for renaming.
13405
13406 2018-06-12 Martin Sebor <msebor@redhat.com>
13407
13408 PR tree-optimization/85259
13409 * builtins.c (compute_objsize): Handle constant offsets.
13410 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
13411 true iff a warning has been issued.
13412 * gimple.h (gimple_nonartificial_location): New function.
13413 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
13414 gimple_nonartificial_location and handle -Wno-system-headers.
13415 (handle_builtin_stxncpy): Same.
13416
13417 2018-06-12 Martin Sebor <msebor@redhat.com>
13418
13419 PR c/85931
13420 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
13421
13422 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
13423
13424 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13425 BUILTIN_VEC_XST entries for pointer to double and long long.
13426
13427 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
13428
13429 PR target/85990
13430 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13431 Update comments.
13432 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13433 Likewise.
13434
13435 2018-06-12 Martin Liska <mliska@suse.cz>
13436
13437 * doc/options.texi: Document IntegerRange.
13438
13439 2018-06-12 Martin Liska <mliska@suse.cz>
13440
13441 * config/i386/i386.opt: Make MPX-related options as Deprecated.
13442 * opt-functions.awk: Handle Deprecated flag.
13443 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
13444 and report error.
13445 (read_cmdline_option): Report warning for a deprecated option.
13446 * opts.h (struct cl_option): Add new field cl_deprecated.
13447 (CL_ERR_DEPRECATED): New.
13448
13449 2018-06-12 Martin Liska <mliska@suse.cz>
13450
13451 * doc/options.texi: Document Deprecated option flag.
13452
13453 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13454
13455 * config/arc/arc-arch.h (arc_extras): New enum.
13456 (arc_cpu_t):Add field extra.
13457 (arc_cpu_types): Consider the extras.
13458 * config/arc/arc-cpus.def: Add extras info.
13459 * config/arc/arc-opts.h (processor_type): Consider extra field.
13460 * config/arc/arc.c (arc_override_options): Handle extra field.
13461
13462 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13463
13464 * config/arc/arc-arch.h: Update ARC_OPTX macro.
13465 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
13466 field.
13467 * config/arc/arc.c (arc_init): Update pic warning.
13468 (irq_range): Update irq range parsing warnings.
13469 (arc_override_options): Update various warning messages.
13470 (arc_handle_aux_attribute): Likewise.
13471
13472 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
13473
13474 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
13475
13476 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13477
13478 * doc/sourcebuild.texi: Document usage of line number 0 in verify
13479 compiler messages directives.
13480
13481 2018-06-12 Matthew Fortune <mfortune@gmail.com>
13482
13483 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
13484 * config/mips/mips-tables.opt: Regenerate.
13485 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
13486 mips64r6.
13487 * doc/invoke.texi: Document -march=i6500.
13488
13489 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
13490
13491 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
13492 (i6400_gpmul): Add cpu_unit.
13493 (i6400_gpdiv): Likewise.
13494 (i6400_msa_add_d): Update reservations.
13495 (i6400_msa_int_add) Likewise.
13496 (i6400_msa_short_logic3) Likewise.
13497 (i6400_msa_short_logic2) Likewise.
13498 (i6400_msa_short_logic) Likewise.
13499 (i6400_msa_move) Likewise.
13500 (i6400_msa_cmp) Likewise.
13501 (i6400_msa_short_float2) Likewise.
13502 (i6400_msa_div_d) Likewise.
13503 (i6400_msa_long_logic1) Likewise.
13504 (i6400_msa_long_logic2) Likewise.
13505 (i6400_msa_mult) Likewise.
13506 (i6400_msa_long_float2) Likewise.
13507 (i6400_msa_long_float4) Likewise.
13508 (i6400_msa_long_float5) Likewise.
13509 (i6400_msa_long_float8) Likewise.
13510 (i6400_fpu_fadd): Include frint type.
13511 (i6400_fpu_store): New define_insn_reservation.
13512 (i6400_fpu_load): Likewise.
13513 (i6400_fpu_move): Likewise.
13514 (i6400_fpu_fcmp): Likewise.
13515 (i6400_fpu_fmadd): Likewise.
13516 (i6400_int_mult): Include imul3nc type and update reservation.
13517 (i6400_int_div): Include idiv3 type and update reservation.
13518 (i6400_int_load): Update to check type not move_type.
13519 (i6400_int_store): Likewise.
13520 (i6400_int_prefetch): Set zero latency.
13521
13522 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
13523
13524 * gcc.c: Document new %@{...} sequence.
13525 (LINK_COMMAND_SPEC): Use it for the -L switches.
13526 (cpp_unique_options): Use it for the -I switches.
13527 (at_file_argbuf): New global variable.
13528 (in_at_file): Likewise.
13529 (alloc_args): Create at_file_argbuf.
13530 (clear_args): Truncate at_file_argbuf.
13531 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
13532 (open_at_file): New function.
13533 (close_at_file): Likewise.
13534 (create_at_file): Delete.
13535 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
13536 <'o'>: Likewise.
13537 <'@'>: New case.
13538 (validate_switches_from_spec): Deal with %@{...} sequence.
13539 (validate_switches): Likewise.
13540 (driver::finalize): Call clear_args.
13541
13542 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
13543
13544 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
13545
13546 2018-06-11 Martin Sebor <msebor@redhat.com>
13547
13548 * doc/invoke.texi (-Wall): List -Wc++17-compat.
13549 (Wno-class-memaccess): Add @opindex.
13550 (Wno-templates, Wno-multiple-inheritance): Same.
13551 (Wno-virtual-inheritance, Wno-namespaces): Same.
13552 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
13553 (Wno-format-overflow, Wno-format-truncation): Same.
13554 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
13555 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
13556 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
13557 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
13558 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
13559 (Wno-misspelled-isr): Same.
13560
13561 2018-06-11 Martin Sebor <msebor@redhat.com>
13562
13563 * PR tree-optimization/86083
13564 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
13565
13566 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
13567
13568 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
13569
13570 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
13571
13572 PR target/85755
13573 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
13574 on the correct operand.
13575 (*movdi_internal64): Ditto.
13576
13577 2018-06-11 Martin Liska <mliska@suse.cz>
13578
13579 PR tree-optimization/86089
13580 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
13581
13582 2018-06-11 Julia Koval <julia.koval@intel.com>
13583
13584 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
13585 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
13586 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
13587
13588 2018-06-11 Olivier Hainque <hainque@adacore.com>
13589
13590 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
13591 for Ada with strict dwarf2.
13592
13593 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
13594
13595 PR target/85755
13596 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
13597 addresses.
13598
13599 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
13600
13601 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
13602
13603 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
13604
13605 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
13606 TARGET_ELF.
13607
13608 2018-06-08 Martin Liska <mliska@suse.cz>
13609
13610 * tree-cfg.h (debug_function): Fix argument type to match
13611 implementation.
13612
13613 2018-06-08 Martin Liska <mliska@suse.cz>
13614
13615 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
13616 Remove usage of MPX-related (and removed) fields.
13617 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
13618
13619 2018-06-08 David Malcolm <dmalcolm@redhat.com>
13620
13621 * cfg.c (debug): Use TDF_NONE rather than 0.
13622 * cfghooks.c (debug): Likewise.
13623 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
13624 (struct dump_option_value_info): Convert to...
13625 (struct kv_pair): ...this template type.
13626 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
13627 rather than 0.
13628 (optinfo_verbosity_options): Likewise.
13629 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
13630 OPTGROUP_NONE.
13631 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
13632 than int for "optgroup_flags" param.
13633 (dump_generic_expr_loc): Use dump_flags_t rather than int for
13634 "dump_kind" param.
13635 (dump_dec): Likewise.
13636 (dump_finish): Use TDF_NONE rather than 0.
13637 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
13638 rather than int for "optgroup_flags" param. Use TDF_NONE rather
13639 than 0. Update for change to option_ptr.
13640 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
13641 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
13642 0. Update for changes to optinfo_verbosity_options and
13643 optgroup_options.
13644 (opt_info_switch_p): Convert optgroup_flags from int to
13645 optgroup_flags_t.
13646 (dump_basic_block): Use dump_flags_t rather than int
13647 for "dump_kind" param.
13648 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
13649 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
13650 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
13651 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
13652 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
13653 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
13654 TDF_NONE): Convert from macros to...
13655 (enum dump_flag): ...this new enum.
13656 (dump_flags_t): Update to use enum.
13657 (operator|, operator&, operator~, operator|=, operator&=):
13658 Implement for dump_flags_t.
13659 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
13660 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
13661 Convert from macros to...
13662 (enum optgroup_flag): ...this new enum.
13663 (optgroup_flags_t): New typedef.
13664 (operator|, operator|=): Implement for optgroup_flags_t.
13665 (struct dump_file_info): Convert field "alt_flags" to
13666 dump_flags_t. Convert field "optgroup_flags" to
13667 optgroup_flags_t.
13668 (dump_basic_block): Use dump_flags_t rather than int for param.
13669 (dump_generic_expr_loc): Likewise.
13670 (dump_dec): Likewise.
13671 (dump_register): Convert param "optgroup_flags" to
13672 optgroup_flags_t.
13673 (opt_info_enable_passes): Likewise.
13674 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
13675 than 0.
13676 * gimple-pretty-print.c (debug): Likewise.
13677 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
13678 (merged_store_group::apply_stores): Likewise.
13679 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
13680 * gimple.c (verify_gimple_pp): Likewise.
13681 * graphite-poly.c (print_pbb_body): Likewise.
13682 * passes.c (pass_manager::register_one_dump_file): Convert
13683 local "optgroup_flags" to optgroup_flags_t.
13684 * print-tree.c (print_node): Use TDF_NONE rather than 0.
13685 (debug): Likewise.
13686 (debug_body): Likewise.
13687 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
13688 to optgroup_flags_t.
13689 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
13690 than 0.
13691 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
13692 (convert_mult_to_fma): Likewise.
13693 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
13694 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
13695 * tree-vect-data-refs.c (dump_lower_bound): Convert param
13696 "dump_kind" to dump_flags_t.
13697
13698 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13699
13700 * config/rs6000/rs6000.c (min, max): Delete.
13701
13702 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13703
13704 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
13705 -mabi=spe and -mabi=no-spe.
13706
13707 2018-06-08 Martin Liska <mliska@suse.cz>
13708
13709 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
13710 where we expect an existing summary.
13711
13712 2018-06-08 Martin Liska <mliska@suse.cz>
13713
13714 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
13715 * ipa-inline.h (estimate_edge_growth): Likewise.
13716
13717 2018-06-08 Martin Liska <mliska@suse.cz>
13718
13719 * cgraph.c (function_version_hasher::hash): Use
13720 cgraph_node::get_uid ().
13721 (function_version_hasher::equal):
13722 * cgraph.h (cgraph_node::get_uid): New method.
13723 * ipa-inline.c (update_caller_keys): Use
13724 cgraph_node::get_uid ().
13725 (update_callee_keys): Likewise.
13726 * ipa-utils.c (searchc): Likewise.
13727 (ipa_reduced_postorder): Likewise.
13728 * lto-cgraph.c (input_node): Likewise.
13729 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
13730 * symbol-summary.h (symtab_insertion): Likewise.
13731 (symtab_removal): Likewise.
13732 (symtab_duplication): Likewise.
13733 * tree-pretty-print.c (dump_function_header): Likewise.
13734 * tree-sra.c (convert_callers_for_node): Likewise.
13735
13736 2018-06-08 Martin Liska <mliska@suse.cz>
13737
13738 * cgraph.c (symbol_table::create_edge): Always assign a new
13739 unique number.
13740 (symbol_table::free_edge): Do not recycle numbers.
13741 * cgraph.h (cgraph_edge::get): New method.
13742 * symbol-summary.h (symtab_removal): Use it.
13743 (symtab_duplication): Likewise.
13744 (call_summary::hashable_uid): Remove.
13745
13746 2018-06-08 Martin Liska <mliska@suse.cz>
13747
13748 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
13749 (initialize_growth_caches): Remove.
13750 (free_growth_caches): Likewise.
13751 (do_estimate_edge_time): Use edge_growth_cache.
13752 (do_estimate_edge_size): Likewise.
13753 (do_estimate_edge_hints): Likewise.
13754 * ipa-inline.c (reset_edge_caches): Likewise.
13755 (recursive_inlining): Likewise.
13756 (inline_small_functions): Likewise.
13757 * ipa-inline.h (initialize_growth_caches): Remove.
13758 (estimate_edge_size): Likewise.
13759 (estimate_edge_time): Likewise.
13760 (estimate_edge_hints): Likewise.
13761 (reset_edge_growth_cache): Likewise.
13762 * symbol-summary.h (call_summary::remove): New method.
13763
13764 2018-06-08 Martin Liska <mliska@suse.cz>
13765
13766 * ipa-cp.c (class edge_clone_summary): New summary.
13767 (grow_edge_clone_vectors): Remove.
13768 (ipcp_edge_duplication_hook): Remove.
13769 (class edge_clone_summary_t): New call_summary class.
13770 (ipcp_edge_removal_hook): Remove.
13771 (edge_clone_summary_t::duplicate): New function.
13772 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
13773 (create_specialized_node): Likewise.
13774 (ipcp_driver): Initialize edge_clone_summaries and do not
13775 register hooks.
13776
13777 2018-06-08 Martin Liska <mliska@suse.cz>
13778
13779 * symbol-summary.h (get): New function.
13780 (call_summary::m_initialize_when_cloning): New class member.
13781
13782 2018-06-08 Martin Liska <mliska@suse.cz>
13783
13784 * cgraph.c (cgraph_node::remove): Do not recycle uid.
13785 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
13786 (symbol_table::allocate_cgraph_symbol): Do not set uid.
13787 * passes.c (uid_hash_t): Record removed_nodes by their uids.
13788 (remove_cgraph_node_from_order): Use the removed_nodes set.
13789 (do_per_function_toporder): Likwise.
13790 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
13791 instead of summary_uid.
13792 (symtab_removal): Likewise.
13793 (symtab_duplication): Likewise.
13794
13795 2018-06-08 Martin Liska <mliska@suse.cz>
13796
13797 * ipa-cp.c (ipcp_store_bits_results): Use
13798 ipcp_transformation_sum.
13799 (ipcp_store_vr_results): Likewise.
13800 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
13801 to ...
13802 (ipcp_transformation_initialize): ... this.
13803 (ipa_set_node_agg_value_chain):
13804 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
13805 (write_ipcp_transformation_info): Likewise.
13806 (read_ipcp_transformation_info): Likewise.
13807 (ipcp_update_bits): Likewise.
13808 (ipcp_update_vr): Likewise.
13809 (ipcp_transform_function): Likewise.
13810 * ipa-prop.h: Rename ipcp_transformation_summary to
13811 ipcp_transformation.
13812 (class ipcp_transformation_t): New function summary.
13813 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
13814 (ipa_get_agg_replacements_for_node): Likewise.
13815
13816 2018-06-08 Martin Liska <mliska@suse.cz>
13817
13818 * ipa-pure-const.c (struct funct_state_d): Do it class instead
13819 of struct.
13820 (class funct_state_summary_t): New function_summary class.
13821 (has_function_state): Remove.
13822 (get_function_state): Likewise.
13823 (set_function_state): Likewise.
13824 (add_new_function): Likewise.
13825 (funct_state_summary_t::insert): New function.
13826 (duplicate_node_data): Remove.
13827 (remove_node_data): Remove.
13828 (funct_state_summary_t::duplicate): New function.
13829 (register_hooks): Create new funct_state_summaries.
13830 (pure_const_generate_summary): Use it.
13831 (pure_const_write_summary): Likewise.
13832 (pure_const_read_summary): Likewise.
13833 (propagate_pure_const): Likewise.
13834 (propagate_nothrow): Likewise.
13835 (dump_malloc_lattice): Likewise.
13836 (propagate_malloc): Likewise.
13837 (execute): Do not register hooks, just remove summary
13838 instead.
13839 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
13840 constructor.
13841
13842 2018-06-08 Martin Liska <mliska@suse.cz>
13843
13844 * ipa-reference.c (remove_node_data): Remove.
13845 (duplicate_node_data): Likewise.
13846 (class ipa_ref_var_info_summary_t): New class.
13847 (class ipa_ref_opt_summary_t): Likewise.
13848 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
13849 (get_reference_optimization_summary): Use
13850 ipa_ref_opt_sum_summaries.
13851 (set_reference_vars_info): Remove.
13852 (set_reference_optimization_summary): Likewise.
13853 (ipa_init): Create summaries.
13854 (init_function_info): Use function summary.
13855 (ipa_ref_opt_summary_t::duplicate): New function.
13856 (ipa_ref_opt_summary_t::remove): New function.
13857 (get_read_write_all_from_node): Fix GNU coding style.
13858 (propagate): Use function summary.
13859 (write_node_summary_p): Fix GNU coding style.
13860 (stream_out_bitmap): Likewise.
13861 (ipa_reference_read_optimization_summary): Use function summary.
13862 (ipa_reference_c_finalize): Do not release hooks.
13863
13864 2018-06-08 Martin Liska <mliska@suse.cz>
13865
13866 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
13867 (analyze_function_body): Extract multiple calls of get_create.
13868 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13869 * ipa-inline.c (recursive_inlining): Use ::get method.
13870 * ipa-inline.h (estimate_edge_growth): Likewise.
13871
13872 2018-06-08 Martin Liska <mliska@suse.cz>
13873
13874 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
13875 HSA_INVALID.
13876 (hsa_function_summary::hsa_function_summary): Use the new enum
13877 value.
13878 (hsa_gpu_implementation_p): Use hsa_summaries::get.
13879 * hsa-gen.c (hsa_get_host_function): Likewise.
13880 (get_brig_function_name): Likewise.
13881 * ipa-hsa.c (process_hsa_functions): Likewise.
13882 (ipa_hsa_write_summary): Likewise.
13883 * symbol-summary.h (symtab_duplication): Use ::get function/
13884 (get): New function.
13885
13886 2018-06-08 Martin Liska <mliska@suse.cz>
13887
13888 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
13889 of get.
13890 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
13891 (hsa_register_kernel): Likewise.
13892 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
13893 * hsa-gen.c (hsa_get_host_function): Likewise.
13894 (get_brig_function_name): Likewise.
13895 (generate_hsa): Likewise.
13896 (pass_gen_hsail::execute): Likewise.
13897 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
13898 (devirtualization_time_bonus): Likewise.
13899 (ipcp_propagate_stage): Likewise.
13900 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13901 (edge_set_predicate): Likewise.
13902 (evaluate_conditions_for_known_args): Likewise.
13903 (evaluate_properties_for_edge): Likewise.
13904 (ipa_fn_summary::reset): Likewise.
13905 (ipa_fn_summary_t::duplicate): Likewise.
13906 (dump_ipa_call_summary): Likewise.
13907 (ipa_dump_fn_summary): Likewise.
13908 (analyze_function_body): Likewise.
13909 (compute_fn_summary): Likewise.
13910 (estimate_edge_devirt_benefit): Likewise.
13911 (estimate_edge_size_and_time): Likewise.
13912 (estimate_calls_size_and_time): Likewise.
13913 (estimate_node_size_and_time): Likewise.
13914 (inline_update_callee_summaries): Likewise.
13915 (remap_edge_change_prob): Likewise.
13916 (remap_edge_summaries): Likewise.
13917 (ipa_merge_fn_summary_after_inlining): Likewise.
13918 (ipa_update_overall_fn_summary): Likewise.
13919 (read_ipa_call_summary): Likewise.
13920 (inline_read_section): Likewise.
13921 (write_ipa_call_summary): Likewise.
13922 (ipa_fn_summary_write): Likewise.
13923 (ipa_free_fn_summary): Likewise.
13924 * ipa-hsa.c (process_hsa_functions): Likewise.
13925 (ipa_hsa_write_summary): Likewise.
13926 (ipa_hsa_read_section): Likewise.
13927 * ipa-icf.c (sem_function::merge): Likewise.
13928 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13929 (do_estimate_edge_time): Likewise.
13930 (estimate_size_after_inlining): Likewise.
13931 (estimate_growth): Likewise.
13932 (growth_likely_positive): Likewise.
13933 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13934 (inline_call): Likewise.
13935 * ipa-inline.c (caller_growth_limits): Likewise.
13936 (can_inline_edge_p): Likewise.
13937 (can_inline_edge_by_limits_p): Likewise.
13938 (compute_uninlined_call_time): Likewise.
13939 (compute_inlined_call_time): Likewise.
13940 (want_inline_small_function_p): Likewise.
13941 (edge_badness): Likewise.
13942 (update_caller_keys): Likewise.
13943 (update_callee_keys): Likewise.
13944 (recursive_inlining): Likewise.
13945 (inline_small_functions): Likewise.
13946 (inline_to_all_callers_1): Likewise.
13947 (dump_overall_stats): Likewise.
13948 (early_inline_small_functions): Likewise.
13949 (early_inliner): Likewise.
13950 * ipa-inline.h (estimate_edge_growth): Likewise.
13951 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13952 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13953 * ipa-prop.h (IPA_NODE_REF): Likewise.
13954 (IPA_EDGE_REF): Likewise.
13955 * ipa-pure-const.c (malloc_candidate_p): Likewise.
13956 (propagate_malloc): Likewise.
13957 * ipa-split.c (execute_split_functions): Likewise.
13958 * symbol-summary.h: Rename get to get_create.
13959 (get): Likewise.
13960 (get_create): Likewise.
13961 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13962
13963 2018-06-08 Martin Liska <mliska@suse.cz>
13964
13965 * symbol-summary.h (release): Move definition out of class
13966 declaration.
13967 (symtab_removal): Likewise.
13968 (symtab_duplication): Likewise.
13969
13970 2018-06-08 Martin Liska <mliska@suse.cz>
13971
13972 * symbol-summary.h (function_summary): Move constructor
13973 implementation out of class declaration.
13974 (release): Likewise.
13975 (symtab_insertion): Likewise.
13976 (symtab_removal): Likewise.
13977 (symtab_duplication): Likewise.
13978 (get): Likewise.
13979
13980 2018-06-08 Martin Liska <mliska@suse.cz>
13981
13982 * Makefile.in: Remove support for MPX (macros, related functions,
13983 fields in cgraph_node, ...).
13984 * builtin-types.def (BT_BND): Likewise.
13985 (BT_FN_BND_CONST_PTR): Likewise.
13986 (BT_FN_CONST_PTR_BND): Likewise.
13987 (BT_FN_VOID_PTR_BND): Likewise.
13988 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
13989 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
13990 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
13991 (expand_builtin_mempcpy_with_bounds): Likewise.
13992 (expand_builtin_memset_with_bounds): Likewise.
13993 (expand_builtin_memset_args): Likewise.
13994 (std_expand_builtin_va_start): Likewise.
13995 (expand_builtin): Likewise.
13996 (expand_builtin_with_bounds): Likewise.
13997 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
13998 (DEF_LIB_BUILTIN_CHKP): Likewise.
13999 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
14000 (DEF_CHKP_BUILTIN): Likewise.
14001 (BUILT_IN_MEMCPY): Likewise.
14002 (BUILT_IN_MEMMOVE): Likewise.
14003 (BUILT_IN_MEMPCPY): Likewise.
14004 (BUILT_IN_MEMSET): Likewise.
14005 (BUILT_IN_STPCPY): Likewise.
14006 (BUILT_IN_STRCAT): Likewise.
14007 (BUILT_IN_STRCHR): Likewise.
14008 (BUILT_IN_STRCPY): Likewise.
14009 (BUILT_IN_STRLEN): Likewise.
14010 (BUILT_IN_MEMCPY_CHK): Likewise.
14011 (BUILT_IN_MEMMOVE_CHK): Likewise.
14012 (BUILT_IN_MEMPCPY_CHK): Likewise.
14013 (BUILT_IN_MEMSET_CHK): Likewise.
14014 (BUILT_IN_STPCPY_CHK): Likewise.
14015 (BUILT_IN_STRCAT_CHK): Likewise.
14016 (BUILT_IN_STRCPY_CHK): Likewise.
14017 * calls.c (store_bounds): Likewise.
14018 (emit_call_1): Likewise.
14019 (special_function_p): Likewise.
14020 (maybe_warn_nonstring_arg): Likewise.
14021 (initialize_argument_information): Likewise.
14022 (finalize_must_preallocate): Likewise.
14023 (compute_argument_addresses): Likewise.
14024 (expand_call): Likewise.
14025 * cfgexpand.c (expand_call_stmt): Likewise.
14026 (expand_return): Likewise.
14027 (expand_gimple_stmt_1): Likewise.
14028 (pass_expand::execute): Likewise.
14029 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
14030 (cgraph_node::remove): Likewise.
14031 (cgraph_node::dump): Likewise.
14032 (cgraph_node::verify_node): Likewise.
14033 * cgraph.h (chkp_function_instrumented_p): Likewise.
14034 (symtab_node::get_alias_target): Likewise.
14035 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
14036 (cgraph_local_p): Likewise.
14037 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
14038 (cgraph_edge::rebuild_references): Likewise.
14039 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
14040 (walk_polymorphic_call_targets): Likewise.
14041 (cgraph_node::expand_thunk): Likewise.
14042 (symbol_table::output_weakrefs): Likewise.
14043 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
14044 (ix86_handle_option): Likewise.
14045 * config/i386/constraints.md: Likewise.
14046 * config/i386/i386-builtin-types.def (BND): Likewise.
14047 (VOID): Likewise.
14048 (PVOID): Likewise.
14049 (ULONG): Likewise.
14050 * config/i386/i386-builtin.def (BDESC_END): Likewise.
14051 (BDESC_FIRST): Likewise.
14052 (BDESC): Likewise.
14053 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
14054 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
14055 * config/i386/i386.c (enum reg_class): Likewise.
14056 (ix86_target_string): Likewise.
14057 (ix86_option_override_internal): Likewise.
14058 (ix86_conditional_register_usage): Likewise.
14059 (ix86_valid_target_attribute_inner_p): Likewise.
14060 (ix86_set_indirect_branch_type): Likewise.
14061 (ix86_set_current_function): Likewise.
14062 (ix86_function_arg_regno_p): Likewise.
14063 (init_cumulative_args): Likewise.
14064 (ix86_function_arg_advance): Likewise.
14065 (ix86_function_arg): Likewise.
14066 (ix86_pass_by_reference): Likewise.
14067 (ix86_function_value_regno_p): Likewise.
14068 (ix86_function_value_1): Likewise.
14069 (ix86_function_value_bounds): Likewise.
14070 (ix86_return_in_memory): Likewise.
14071 (ix86_setup_incoming_vararg_bounds): Likewise.
14072 (ix86_va_start): Likewise.
14073 (indirect_thunk_need_prefix): Likewise.
14074 (print_reg): Likewise.
14075 (ix86_print_operand): Likewise.
14076 (ix86_expand_call): Likewise.
14077 (ix86_output_function_return): Likewise.
14078 (reg_encoded_number): Likewise.
14079 (BDESC_VERIFYS): Likewise.
14080 (ix86_init_mpx_builtins): Likewise.
14081 (ix86_init_builtins): Likewise.
14082 (ix86_emit_cmove): Likewise.
14083 (ix86_emit_move_max): Likewise.
14084 (ix86_expand_builtin): Likewise.
14085 (ix86_builtin_mpx_function): Likewise.
14086 (ix86_get_arg_address_for_bt): Likewise.
14087 (ix86_load_bounds): Likewise.
14088 (ix86_store_bounds): Likewise.
14089 (ix86_load_returned_bounds): Likewise.
14090 (ix86_store_returned_bounds): Likewise.
14091 (ix86_class_likely_spilled_p): Likewise.
14092 (ix86_hard_regno_mode_ok): Likewise.
14093 (x86_order_regs_for_local_alloc): Likewise.
14094 (ix86_mitigate_rop): Likewise.
14095 (ix86_bnd_prefixed_insn_p): Likewise.
14096 (ix86_mpx_bound_mode): Likewise.
14097 (ix86_make_bounds_constant): Likewise.
14098 (ix86_initialize_bounds): Likewise.
14099 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
14100 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
14101 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
14102 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
14103 (TARGET_CHKP_BOUND_MODE): Likewise.
14104 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
14105 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
14106 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
14107 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
14108 * config/i386/i386.h (TARGET_MPX): Likewise.
14109 (TARGET_MPX_P): Likewise.
14110 (VALID_BND_REG_MODE): Likewise.
14111 (FIRST_BND_REG): Likewise.
14112 (LAST_BND_REG): Likewise.
14113 (enum reg_class): Likewise.
14114 (BND_REG_P): Likewise.
14115 (BND_REGNO_P): Likewise.
14116 (BNDmode): Likewise.
14117 (ADJUST_INSN_LENGTH): Likewise.
14118 * config/i386/i386.md: Likewise.
14119 * config/i386/i386.opt: Likewise.
14120 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
14121 (defined): Likewise.
14122 (LINK_MPX): Likewise.
14123 (MPX_SPEC): Likewise.
14124 (LIBMPX_SPEC): Likewise.
14125 (LIBMPXWRAPPERS_SPEC): Likewise.
14126 (CHKP_SPEC): Likewise.
14127 * config/i386/predicates.md: Likewise.
14128 * dbxout.c (dbxout_type): Likewise.
14129 * doc/extend.texi: Likewise.
14130 * doc/invoke.texi: Likewise.
14131 * doc/md.texi: Likewise.
14132 * doc/tm.texi: Likewise.
14133 * doc/tm.texi.in: Likewise.
14134 * dwarf2out.c (is_base_type): Likewise.
14135 (gen_formal_types_die): Likewise.
14136 (gen_subprogram_die): Likewise.
14137 (gen_type_die_with_usage): Likewise.
14138 (gen_decl_die): Likewise.
14139 (dwarf2out_late_global_decl): Likewise.
14140 * expr.c (expand_assignment): Likewise.
14141 (emit_storent_insn): Likewise.
14142 (store_expr_with_bounds): Likewise.
14143 (store_expr): Likewise.
14144 (expand_expr_real_1): Likewise.
14145 * expr.h (store_expr_with_bounds): Likewise.
14146 * function.c (use_register_for_decl): Likewise.
14147 (struct bounds_parm_data): Likewise.
14148 (assign_parms_augmented_arg_list): Likewise.
14149 (assign_parm_find_entry_rtl): Likewise.
14150 (assign_parm_is_stack_parm): Likewise.
14151 (assign_parm_load_bounds): Likewise.
14152 (assign_bounds): Likewise.
14153 (assign_parms): Likewise.
14154 (expand_function_start): Likewise.
14155 * gcc.c (CHKP_SPEC): Likewise.
14156 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14157 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
14158 (wrestrict_dom_walker::check_call): Likewise.
14159 * gimple.c (gimple_build_call_from_tree): Likewise.
14160 * gimple.h (enum gf_mask): Likewise.
14161 (gimple_call_with_bounds_p): Likewise.
14162 (gimple_call_set_with_bounds): Likewise.
14163 * gimplify.c (gimplify_init_constructor): Likewise.
14164 * ipa-cp.c (initialize_node_lattices): Likewise.
14165 (propagate_constants_across_call): Likewise.
14166 (find_more_scalar_values_for_callers_subset): Likewise.
14167 * ipa-hsa.c (process_hsa_functions): Likewise.
14168 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14169 * ipa-icf.c (sem_function::merge): Likewise.
14170 * ipa-inline.c (early_inliner): Likewise.
14171 * ipa-pure-const.c (warn_function_noreturn): Likewise.
14172 (warn_function_cold): Likewise.
14173 (propagate_pure_const): Likewise.
14174 * ipa-ref.h (enum GTY): Likewise.
14175 * ipa-split.c (find_retbnd): Likewise.
14176 (consider_split): Likewise.
14177 (split_function): Likewise.
14178 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14179 * ipa.c (walk_polymorphic_call_targets): Likewise.
14180 (symbol_table::remove_unreachable_nodes): Likewise.
14181 (process_references): Likewise.
14182 (cgraph_build_static_cdtor_1): Likewise.
14183 * lto-cgraph.c (lto_output_node): Likewise.
14184 (output_refs): Likewise.
14185 (compute_ltrans_boundary): Likewise.
14186 (input_overwrite_node): Likewise.
14187 (input_node): Likewise.
14188 (input_cgraph_1): Likewise.
14189 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14190 * passes.c (pass_manager::execute_early_local_passes): Likewise.
14191 (class pass_chkp_instrumentation_passes): Likewise.
14192 (make_pass_chkp_instrumentation_passes): Likewise.
14193 * passes.def: Likewise.
14194 * rtl.h (struct GTY): Likewise.
14195 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14196 * stor-layout.c (layout_type): Likewise.
14197 * symtab.c: Likewise.
14198 * target.def: Likewise.
14199 * targhooks.c (default_chkp_bound_type): Likewise.
14200 (default_chkp_bound_mode): Likewise.
14201 (default_builtin_chkp_function): Likewise.
14202 (default_chkp_function_value_bounds): Likewise.
14203 (default_chkp_make_bounds_constant): Likewise.
14204 (default_chkp_initialize_bounds): Likewise.
14205 * targhooks.h (default_chkp_bound_type): Likewise.
14206 (default_chkp_bound_mode): Likewise.
14207 (default_builtin_chkp_function): Likewise.
14208 (default_chkp_function_value_bounds): Likewise.
14209 (default_chkp_make_bounds_constant): Likewise.
14210 (default_chkp_initialize_bounds): Likewise.
14211 * toplev.c (compile_file): Likewise.
14212 (process_options): Likewise.
14213 * tree-core.h (DEF_BUILTIN): Likewise.
14214 (DEF_BUILTIN_CHKP): Likewise.
14215 * tree-inline.c (declare_return_variable): Likewise.
14216 (remap_gimple_stmt): Likewise.
14217 (copy_bb): Likewise.
14218 (initialize_inlined_parameters): Likewise.
14219 (expand_call_inline): Likewise.
14220 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14221 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14222 (make_pass_ipa_chkp_produce_thunks): Likewise.
14223 (make_pass_chkp): Likewise.
14224 (make_pass_chkp_opt): Likewise.
14225 (make_pass_chkp_instrumentation_passes): Likewise.
14226 * tree-pretty-print.c (dump_generic_node): Likewise.
14227 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14228 * tree-ssa-dce.c (propagate_necessity): Likewise.
14229 (eliminate_unnecessary_stmts): Likewise.
14230 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14231 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14232 * tree-ssa-sccvn.h: Likewise.
14233 * tree-ssa-strlen.c (get_string_length): Likewise.
14234 (valid_builtin_call): Likewise.
14235 (adjust_last_stmt): Likewise.
14236 (handle_builtin_strchr): Likewise.
14237 (handle_builtin_strcpy): Likewise.
14238 (handle_builtin_stxncpy): Likewise.
14239 (handle_builtin_memcpy): Likewise.
14240 (handle_builtin_strcat): Likewise.
14241 (strlen_check_and_optimize_stmt): Likewise.
14242 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14243 * tree-streamer-in.c: Likewise.
14244 * tree-streamer.c (record_common_node): Likewise.
14245 * tree.c (tree_code_size): Likewise.
14246 (wide_int_to_tree_1): Likewise.
14247 (type_contains_placeholder_1): Likewise.
14248 (build_common_tree_nodes): Likewise.
14249 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14250 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14251 (POINTER_BOUNDS_P): Likewise.
14252 (BOUNDED_TYPE_P): Likewise.
14253 (BOUNDED_P): Likewise.
14254 (CALL_WITH_BOUNDS_P): Likewise.
14255 (pointer_bounds_type_node): Likewise.
14256 * value-prof.c (gimple_ic): Likewise.
14257 * var-tracking.c (vt_add_function_parameters): Likewise.
14258 * varasm.c (make_decl_rtl): Likewise.
14259 (assemble_start_function): Likewise.
14260 (output_constant): Likewise.
14261 (maybe_assemble_visibility): Likewise.
14262 * varpool.c (ctor_for_folding): Likewise.
14263 * chkp-builtins.def: Remove.
14264 * ipa-chkp.c: Remove.
14265 * ipa-chkp.h: Remove.
14266 * rtl-chkp.c: Remove.
14267 * rtl-chkp.h: Remove.
14268 * tree-chkp-opt.c: Remove.
14269 * tree-chkp.c: Remove.
14270 * tree-chkp.h: Remove.
14271
14272 2018-06-07 Carl Love <cel@us.ibm.com>
14273
14274 * config/rs6000/vsx.md (vextract_fp_from_shorth,
14275 vextract_fp_from_shortl): Add BE support.
14276
14277 2018-06-07 Paul Koning <ni1d@arrl.net>
14278
14279 * compare-elim.c (try_merge_compare): Don't merge compare if
14280 address contains a side effect.
14281 (try_eliminate_compare): Likewise.
14282
14283 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
14284
14285 * config.gcc: Support "tremont".
14286 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14287 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14288 PROCESSOR_TREMONT.
14289 * config/i386/i386.c (m_TREMONT): Define.
14290 (processor_target_table): Add "tremont".
14291 (PTA_TREMONT): Define.
14292 (ix86_lea_outperforms): Add TARGET_TREMONT.
14293 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14294 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14295 and M_INTEL_GOLDMONT_PLUS.
14296 (fold_builtin_cpu): Add "tremont".
14297 (ix86_add_stmt_cost): Add TARGET_TREMONT.
14298 (ix86_option_override_internal): Add "tremont".
14299 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14300 (processor_type): Add PROCESSOR_TREMONT.
14301 * config/i386/x86-tune.def: Add m_TREMONT.
14302 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14303
14304 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14305
14306 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14307 symbol defined for msp430i* devices to be lower case.
14308
14309 2018-06-07 Richard Biener <rguenther@suse.de>
14310
14311 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14312 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
14313 Properly wrap signed arithmetic if overflow wraps.
14314
14315 2018-06-07 Jakub Jelinek <jakub@redhat.com>
14316
14317 PR tree-optimization/69615
14318 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14319 of a cast from a same precision integral SSA_NAME in a bb dominated
14320 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
14321 cast to utype if rhs2 has already a compatible type.
14322
14323 2018-06-07 Richard Biener <rguenther@suse.de>
14324
14325 PR tree-optimization/85935
14326 * graphite-scop-detection.c (find_params_in_bb): Analyze
14327 condition operands with respect to the correct loop. Assert
14328 the analysis doesn't fail.
14329
14330 2018-06-04 Carl Love <cel@us.ibm.com>
14331
14332 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14333 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
14334 as it is slightly cheaper.
14335 (first_match_or_eos_index_<mode>):
14336 Calculate index using natural element order.
14337 (first_match_index_<mode>):
14338 Calculate index using natural element order.
14339 (first_match_or_eos_index_<mode>):
14340 Calculate index using natural order.
14341 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14342 for BE and LE modes.
14343 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14344 P9V_BUILTIN_VCLZLSBB_V16QI.
14345 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14346 specific.
14347
14348 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14349
14350 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14351 indentation and line wrap for many prototypes. Add missing
14352 @smallexample directives around block of prototypes for vec_xl and
14353 vec_xst.
14354
14355 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
14356
14357 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14358 track if we pass or return IEEE 128-bit floating point.
14359 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14360 C++ mangling that is compatible with GCC 8.1.
14361 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14362 (init_cumulative_args): Note if we pass or return IEEE 128-bit
14363 floating point types.
14364 (rs6000_function_arg_advance_1): Likewise.
14365 (rs6000_mangle_type): Optionally generate mangled names that match
14366 what GCC 8.1 generated for IEEE 128-bit floating point types.
14367 (rs6000_globalize_decl_name): If we have an external function that
14368 passes or returns IEEE 128-bit types, generate a weak reference
14369 from the mangled name used in GCC 8.1 to the current mangled
14370 name.
14371 (rs6000_init_builtins): Make __ibm128 use the long double type if
14372 long double is IBM extended double. Make __float128 use the long
14373 double type if long double is IEEE 128-bit.
14374
14375 PR target/85657
14376 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14377 macro for __ibm128 built-in functions.
14378 (PACK_IF): Add __ibm128 pack/unpack functions.
14379 (UNPACK_IF): Likewise.
14380 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14381 enable long double built-in functions if long double is IEEE
14382 128-bit floating point.
14383 (rs6000_invalid_builtin): Update long double built-in function
14384 error message.
14385 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14386 functions, adjust the built-in function to use the long double
14387 built-in function if __ibm128 and long double are the same type.
14388 * doc/extend.texi (PowerPC builtins): Update documention for
14389 __builtin_{,un}pack_longdouble. Add documentation for
14390 __builtin_{,un}pack_ibm128.
14391
14392 2018-06-06 Jim Wilson <jimw@sifive.com>
14393
14394 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14395 (struct machine_function): New field interrupt_mode.
14396 (riscv_handle_type_attribute): New function. Add forward declaration.
14397 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14398 (riscv_expand_epilogue): Check interrupt_mode field.
14399 (riscv_set_current_function): Check interrupt attribute args and
14400 set interrupt_mode field.
14401 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14402 (riscv_sret, riscv_uret): New.
14403 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14404 new arguments to interrupt attribute.
14405
14406 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
14407
14408 PR target/63177
14409 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
14410 Don't handle -mcpu=power8 if -mpower9-vector is also used.
14411
14412 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14413
14414 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
14415 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
14416 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14417 several redundant entries.
14418
14419 2018-06-06 David Malcolm <dmalcolm@redhat.com>
14420
14421 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
14422 type from "rtx" to "rtx_insn *".
14423 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
14424 for local "call_insn", removing cast.
14425 (ix86_expand_call): Likewise, introducing a "call_insn" local.
14426
14427 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
14428
14429 PR tree-optimization/86066
14430 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
14431 for BIT_INSERT_EXPR stores.
14432
14433 2018-06-06 Richard Biener <rguenther@suse.de>
14434
14435 PR tree-optimization/86062
14436 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14437 component refs ontop
14438 of to be offsetted base.
14439
14440 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14441
14442 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
14443 to be static and remove check on interrupt attribute name.
14444
14445 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
14446
14447 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14448 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
14449
14450 2018-06-05 Steve Ellcey <sellcey@cavium.com>
14451
14452 PR target/79924
14453 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
14454 second argument.
14455 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
14456 Remove second argument, change how error is called.
14457 (aarch64_layout_arg): Remove second argument from
14458 aarch64_err_no_fpadvsimd call.
14459 (aarch64_init_cumulative_args): Ditto.
14460 (aarch64_gimplify_va_arg_expr): Ditto.
14461 * config/aarch64/aarch64.md (mov<mode>): Ditto.
14462
14463 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
14464
14465 * config/i386/i386.md (simple_return_indirect_internal): New expander.
14466 (*simple_return_indirect_internal<mode>): Rename from
14467 simple_return_indirect_internal. Use W mode iterator.
14468 (rstorssp): New expander.
14469 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
14470 (clrssbsy): New expander.
14471 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
14472
14473 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
14474
14475 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
14476 __typeof__.
14477 (cmse_check_pointed_object): Likewise.
14478
14479 2018-06-05 Martin Liska <mliska@suse.cz>
14480
14481 PR gcov-profile/47618
14482 * doc/invoke.texi: Document how -fprofile-dir format
14483 is extended.
14484
14485 2018-06-05 Richard Biener <rguenther@suse.de>
14486
14487 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
14488 removal pretend DOM info isn't available so we do not update
14489 it and only remove edges, not dominated blocks. Actually free
14490 DOM info in case we removed something. Remove unreachable blocks.
14491 (mfb_keep_latches): Work with either DOM info or marked backedges.
14492 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
14493 first. Mark backedges if DOM info isn't available.
14494 (Re-)compute DOM info after cleanup_control_flow_pre.
14495
14496 2018-06-05 Richard Biener <rguenther@suse.de>
14497
14498 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
14499 (locus_discrim_hasher::hash): Adjust.
14500 (locus_discrim_hasher::equal): Likewise.
14501 (next_discriminator_for_locus): Work on line directly.
14502 (same_line_p): Pass in expanded locus1 as well.
14503 (assign_discriminators): Avoid redundant location expansions.
14504
14505 2018-06-05 Richard Biener <rguenther@suse.de>
14506
14507 PR tree-optimization/86046
14508 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
14509 if required after clearing TREE_ADDRESSABLE.
14510
14511 2018-06-05 Richard Biener <rguenther@suse.de>
14512
14513 PR tree-optimization/86047
14514 * tree-ssa-loop.c (for_each_index): Glob handling of all
14515 decls and constants and really handle all of them.
14516
14517 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14518
14519 PR target/81497
14520 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
14521 qualifier_void_pointer and qualifier_const_void_pointer.
14522 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
14523 (arm_init_builtins): Handle the above.
14524 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
14525 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
14526 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
14527 void intrinsics.
14528
14529 2018-06-05 Martin Liska <mliska@suse.cz>
14530
14531 * auto-profile.c (read_autofdo_file): Do not use
14532 gcov_ctr_summary struct.
14533 (afdo_callsite_hot_enough_for_early_inline): Likewise.
14534 * coverage.c (struct counts_entry): Likewise.
14535 (read_counts_file): Read just single summary entry.
14536 (get_coverage_counts): Use gcov_summary struct.
14537 * coverage.h (get_coverage_counts): Likewise.
14538 * gcov-dump.c (dump_working_sets): Likewise.
14539 (tag_summary): Dump just single summary.
14540 * gcov-io.c (gcov_write_summary): Write just histogram
14541 summary.
14542 (gcov_read_summary): Read just single summary.
14543 (compute_working_sets): Use gcov_summary struct.
14544 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
14545 of GCOV_COUNTERS_SUMMABLE.
14546 (GCOV_COUNTERS_SUMMABLE): Remove.
14547 (GCOV_FIRST_VALUE_COUNTER): Replace with
14548 GCOV_COUNTER_V_INTERVAL.
14549 (struct gcov_ctr_summary): Remove.
14550 (struct gcov_summary): Directly use fields of former
14551 gcov_ctr_summary.
14552 (compute_working_sets): Use gcov_summary struct.
14553 * gcov.c (read_count_file): Do not use ctrs fields.
14554 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
14555 struct.
14556 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
14557 struct.
14558 * profile.c: Likewise.
14559 * profile.h: Likewise.
14560
14561 2018-06-05 Martin Liska <mliska@suse.cz>
14562
14563 PR gcov-profile/84846
14564 * gcov.c (output_lines): Print working directory only
14565 in intermediate format.
14566
14567 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
14568
14569 * config/s390/s390-builtin-types.def: Add void function type.
14570 * config/s390/s390-builtins.def: Use the function type for the
14571 tbeginc builtin.
14572
14573 2018-06-04 Jim Wilson <jimw@sifive.com>
14574
14575 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
14576 to int.
14577 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
14578 and maybe_eh_return. Change regno to unsigned int. Use new args to
14579 handle EH_RETURN_DATA_REGNO registers properly.
14580 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
14581 (riscv_expand_epilogue): Update comment. Change argument name and
14582 type. Update code to use new name and type. Pass new args to
14583 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
14584 EXCEPTION_RETURN.
14585 * config/riscv/riscv.md (NORMAL_RETURN): New.
14586 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
14587 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
14588 (eh_return): Call gen_eh_return_internal and emit barrier.
14589 (eh_return_internal): Call riscv_expand_epilogue.
14590
14591 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
14592
14593 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
14594 bit_insertion field and declare can_be_merged_into method.
14595 (merged_store_group::can_be_merged_into): New method.
14596 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
14597 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
14598 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
14599
14600 2018-06-04 Richard Biener <rguenther@suse.de>
14601
14602 PR tree-optimization/85955
14603 * builtins.c (fold_builtin_sincos): Convert pointers to
14604 destination to appropriate type before dereferencing.
14605
14606 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
14607
14608 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
14609
14610 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
14611
14612 * expr.c (expand_expr_real_1): Force the operand into memory if
14613 its TYPE_MODE is BLKmode and if there is no integer mode for
14614 the number of bits being extracted.
14615
14616 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14617
14618 PR target/85832
14619 PR target/86036
14620 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14621 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
14622
14623 2018-06-04 Richard Biener <rguenther@suse.de>
14624
14625 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
14626 (cleanup_tree_cfg_noloop): ... single caller. Do
14627 start_recording_case_labels later.
14628
14629 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
14630
14631 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
14632 to _IMMINTRIN_H_INCLUDED.
14633 * config/i386/pconfigintrin.h: Ditto.
14634 * config/i386/waitpkgintrin.h: Ditto.
14635 * config/i386/immintrin.h: Add includes for sgxintrin.h,
14636 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
14637 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
14638 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
14639 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
14640 waitpkgintrin.h and cldemoteintrin.h.
14641
14642 2018-06-04 Richard Biener <rguenther@suse.de>
14643
14644 PR tree-optimization/86038
14645 * tracer.c (find_best_successor): Check probability for
14646 being initialized, bail out if not.
14647
14648 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
14649
14650 PR target/86003
14651 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
14652 of bits to ignore when comparing architectures.
14653
14654 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14655
14656 PR tree-optimization/69615
14657 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
14658 maximum or minimum of the type, try to merge it also as if
14659 range1 is + [-, x - 1] or + [x + 1, -].
14660
14661 PR c++/86025
14662 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
14663
14664 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
14665
14666 PR tree-optimization/86034
14667 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
14668 the unsigned bitfield type in a bit insertion sequence if it does not
14669 have a larger precision than the bitfield size.
14670 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
14671
14672 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
14673
14674 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
14675
14676 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14677
14678 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
14679 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
14680 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
14681 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
14682
14683 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14684
14685 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
14686 Disable -fdelete-null-pointer-checks for ELF toolchain.
14687
14688 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14689 Kito Cheng <kito.cheng@gmail.com>
14690
14691 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
14692 (nds32le-*-*, nds32be-*-*): Integrate checking process.
14693 (nds32*-*-*): Add glibc and uclibc conditions.
14694 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
14695 (TARGET_EXCEPT_UNWIND_INFO): Define.
14696 * config/nds32/elf.h: New file.
14697 * config/nds32/linux.h: New file.
14698 * config/nds32/nds32-elf.opt: New file.
14699 * config/nds32/nds32-linux.opt: New file.
14700 * config/nds32/nds32-fp-as-gp.c
14701 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
14702 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
14703 TARGET_LINUX_ABI.
14704 (nds32_asm_file_end): Ditto.
14705 (nds32_print_operand): Ditto.
14706 (nds32_insert_attributes): Ditto.
14707 (nds32_init_libfuncs): New function.
14708 (TARGET_HAVE_TLS): Define.
14709 (TARGET_INIT_LIBFUNCS): Define.
14710 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
14711 spec content.
14712 (TARGET_ELF): Apply different mcmodel setting.
14713 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
14714 been migrated into elf.h and linux.h files.
14715 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
14716 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
14717 (mcmodel): The content has been migrated into nds32-elf.opt and
14718 nds32-linux.opt files.
14719 * config/nds32/t-elf: New file.
14720 * config/nds32/t-linux: New file.
14721
14722 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14723 Shiva Chen <shiva0217@gmail.com>
14724
14725 * config/nds32/constants.md (unspec_volatile_element): Add
14726 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
14727 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
14728 optimization.
14729 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
14730 (make_pass_nds32_fp_as_gp): Declare.
14731 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
14732 optmization pass.
14733 (nds32_asm_function_end_prologue): Remove unused asm output.
14734 (nds32_asm_function_begin_epilogue): Remove unused asm output.
14735 (nds32_asm_file_start): Output necessary fp_as_gp information.
14736 (nds32_option_override): Adjust register usage.
14737 (nds32_expand_prologue): Consider fp_as_gp situation.
14738 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
14739 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
14740 (epilogue): Ditto.
14741 (return): Ditto.
14742 (simple_return): Ditto.
14743 (omit_fp_begin): Output special directive for fp_as_gp.
14744 (omit_fp_end): Output special directive for fp_as_gp.
14745 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
14746 mforbid-fp-as-gp): New options.
14747
14748 2018-06-01 Mark Wielaard <mark@klomp.org>
14749
14750 * dwarf2out.c (dwarf2out_finish): Remove generation of
14751 DW_AT_loclists_base.
14752
14753 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
14754
14755 * gimple-ssa-store-merging.c: Include gimple-fold.h.
14756 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
14757 (struct merged_store_group): Add bit_insertion field.
14758 (dump_char_array): Use standard hexadecimal format.
14759 (merged_store_group::merged_store_group): Set bit_insertion to false.
14760 (merged_store_group::apply_stores): Use optimal buffer size. Deal
14761 with BIT_INSERT_EXPR stores. Move up code updating the mask and
14762 also print the mask in the dump file.
14763 (pass_store_merging::gate): Minor tweak.
14764 (imm_store_chain_info::coalesce_immediate): Fix wrong association
14765 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
14766 stores with INTEGER_CST stores.
14767 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
14768 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
14769 and use it throughout. Generate bit insertion sequences if need be.
14770 (pass_store_merging::process_store): Remove redundant condition.
14771 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
14772
14773 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
14774
14775 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
14776 the 128-bit floating point types. Fix function comment.
14777
14778 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14779
14780 * config/aarch64/aarch64-simd.md
14781 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
14782 mnemonics.
14783 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
14784 mnemonics.
14785
14786 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14787
14788 PR tree-optimization/85989
14789 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
14790 variable.
14791 (backprop::intersect_uses): Check it when deciding whether this
14792 is a backedge reference.
14793 (backprop::process_block): Add each phi to m_visited_phis
14794 after visiting it, then clear it at the end.
14795
14796 2018-06-01 Richard Biener <rguenther@suse.de>
14797
14798 * tree-vectorizer.h (vect_dr_stmt): New function.
14799 (vect_get_load_cost): Adjust.
14800 (vect_get_store_cost): Likewise.
14801 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
14802 Use vect_dr_stmt instead of DR_SMTT.
14803 (vect_record_base_alignments): Likewise.
14804 (vect_calculate_target_alignment): Likewise.
14805 (vect_compute_data_ref_alignment): Likewise and make static.
14806 (vect_update_misalignment_for_peel): Likewise.
14807 (vect_verify_datarefs_alignment): Likewise.
14808 (vector_alignment_reachable_p): Likewise.
14809 (vect_get_data_access_cost): Likewise. Pass down
14810 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
14811 (vect_get_peeling_costs_all_drs): Likewise.
14812 (vect_peeling_hash_get_lowest_cost): Likewise.
14813 (vect_enhance_data_refs_alignment): Likewise.
14814 (vect_find_same_alignment_drs): Likewise.
14815 (vect_analyze_data_refs_alignment): Likewise.
14816 (vect_analyze_group_access_1): Likewise.
14817 (vect_analyze_group_access): Likewise.
14818 (vect_analyze_data_ref_access): Likewise.
14819 (vect_analyze_data_ref_accesses): Likewise.
14820 (vect_vfa_segment_size): Likewise.
14821 (vect_small_gap_p): Likewise.
14822 (vectorizable_with_step_bound_p): Likewise.
14823 (vect_prune_runtime_alias_test_list): Likewise.
14824 (vect_analyze_data_refs): Likewise.
14825 (vect_supportable_dr_alignment): Likewise.
14826 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14827 (vect_gen_prolog_loop_niters): Likewise.
14828 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14829 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
14830 modify DR_STMT.
14831 (vect_recog_mask_conversion_pattern): Likewise.
14832 (vect_try_gather_scatter_pattern): Likewise.
14833 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
14834 to vect_get_store_cost.
14835 (vect_get_store_cost): Get stmt_info instead of DR.
14836 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
14837 (vect_get_load_cost): Get stmt_info instead of DR.
14838
14839 2018-06-01 Richard Biener <rguenther@suse.de>
14840
14841 PR middle-end/86017
14842 * gimple-fold.c (var_decl_component_p): Also allow offsetted
14843 vars wrapped in MEM_REFs.
14844
14845 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14846
14847 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14848 Fix subreg tests so that we only return a choice between
14849 GENERAL_REGS and FP_REGS if the original classes included both.
14850
14851 2018-06-01 Richard Biener <rguenther@suse.de>
14852
14853 PR ipa/85960
14854 * tree-ssa-structalias.c (get_function_part_constraint):
14855 Handle NULL fi->decl.
14856 (find_func_aliases_for_call): Properly handle indirect
14857 fi from direct call.
14858 (find_func_clobbers): Likewise.
14859 (ipa_pta_execute): Likewise.
14860 (create_variable_info_for): For functions that are ifunc_resolver
14861 resolve to a varinfo that contains the result of the resolver call.
14862 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
14863 aliases.
14864
14865 2018-05-31 Michael Collison <michael.collison@arm.com>
14866
14867 * config/aarch64/aarch64.md:
14868 (*fix_to_zero_extenddfdi2): New pattern.
14869 * gcc.target/aarch64/fix_extend1.c: New testcase.
14870
14871 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
14872
14873 PR middle-end/78809
14874 PR middle-end/83026
14875 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
14876 and BUILT_IN_STRNCMP_EQ.
14877 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
14878 BUILT_IN_STRNCMP_EQ.
14879 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
14880 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14881 (gimple_fold_builtin): Likewise.
14882 * tree-ssa-strlen.c (compute_string_length): New function.
14883 (determine_min_obsize): New function.
14884 (handle_builtin_string_cmp): New function to handle calls to
14885 string compare functions.
14886 (strlen_optimize_stmt): Add handling to builtin string compare
14887 calls.
14888 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
14889 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14890 * tree.c (build_common_builtin_nodes): Add new defines of
14891 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
14892
14893 2018-05-31 Jakub Jelinek <jakub@redhat.com>
14894
14895 PR target/85984
14896 * bb-reorder.c (pass_partition_blocks::gate): Return false for
14897 functions with naked attribute.
14898
14899 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
14900
14901 * config/i386/sse.md (avx_vec_concat<mode>):
14902 Substitute concat_tg_mode mode attribute with xtg_mode.
14903 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
14904 (concat_tg_mode): Remove mode attribute.
14905
14906 2018-05-31 Martin Sebor <msebor@redhat.com>
14907
14908 PR c/82063
14909 * calls.c (alloc_max_size): Correct a logic error/typo.
14910 Treat excessive arguments as infinite. Warn for invalid arguments.
14911 * doc/invoke.texi (-Walloc-size-larger-than): Update.
14912
14913 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
14914
14915 PR target/85829
14916 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
14917 and movx for Haswell.
14918
14919 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
14920 Cesar Philippidis <cesar@codesourcery.com>
14921
14922 PR middle-end/85879
14923 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
14924 when emitting error on private/firstprivate reductions.
14925 * omp-low.c (lower_omp_target): Avoid reference-type processing
14926 on pointers for firstprivate clause.
14927
14928 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
14929
14930 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
14931 (st1x2): Likewise.
14932 (st1x3): Likewise.
14933 * config/aarch64/aarch64-simd.md
14934 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
14935 (aarch64_ld1_x3_<mode>): Likewise
14936 (aarch64_st1x2<VALLDIF:mode>): Likewise
14937 (aarch64_st1_x2_<mode>): Likewise
14938 (aarch64_st1x3<VALLDIF:mode>): Likewise
14939 (aarch64_st1_x3_<mode>): Likewise
14940 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
14941 (vld1_s8_x3): Likewise.
14942 (vld1_u16_x3): Likewise.
14943 (vld1_s16_x3): Likewise.
14944 (vld1_u32_x3): Likewise.
14945 (vld1_s32_x3): Likewise.
14946 (vld1_u64_x3): Likewise.
14947 (vld1_s64_x3): Likewise.
14948 (vld1_f16_x3): Likewise.
14949 (vld1_f32_x3): Likewise.
14950 (vld1_f64_x3): Likewise.
14951 (vld1_p8_x3): Likewise.
14952 (vld1_p16_x3): Likewise.
14953 (vld1_p64_x3): Likewise.
14954 (vld1q_u8_x3): Likewise.
14955 (vld1q_s8_x3): Likewise.
14956 (vld1q_u16_x3): Likewise.
14957 (vld1q_s16_x3): Likewise.
14958 (vld1q_u32_x3): Likewise.
14959 (vld1q_s32_x3): Likewise.
14960 (vld1q_u64_x3): Likewise.
14961 (vld1q_s64_x3): Likewise.
14962 (vld1q_f16_x3): Likewise.
14963 (vld1q_f32_x3): Likewise.
14964 (vld1q_f64_x3): Likewise.
14965 (vld1q_p8_x3): Likewise.
14966 (vld1q_p16_x3): Likewise.
14967 (vld1q_p64_x3): Likewise.
14968 (vst1_s64_x2): Likewise.
14969 (vst1_u64_x2): Likewise.
14970 (vst1_f64_x2): Likewise.
14971 (vst1_s8_x2): Likewise.
14972 (vst1_p8_x2): Likewise.
14973 (vst1_s16_x2): Likewise.
14974 (vst1_p16_x2): Likewise.
14975 (vst1_s32_x2): Likewise.
14976 (vst1_u8_x2): Likewise.
14977 (vst1_u16_x2): Likewise.
14978 (vst1_u32_x2): Likewise.
14979 (vst1_f16_x2): Likewise.
14980 (vst1_f32_x2): Likewise.
14981 (vst1_p64_x2): Likewise.
14982 (vst1q_s8_x2): Likewise.
14983 (vst1q_p8_x2): Likewise.
14984 (vst1q_s16_x2): Likewise.
14985 (vst1q_p16_x2): Likewise.
14986 (vst1q_s32_x2): Likewise.
14987 (vst1q_s64_x2): Likewise.
14988 (vst1q_u8_x2): Likewise.
14989 (vst1q_u16_x2): Likewise.
14990 (vst1q_u32_x2): Likewise.
14991 (vst1q_u64_x2): Likewise.
14992 (vst1q_f16_x2): Likewise.
14993 (vst1q_f32_x2): Likewise.
14994 (vst1q_f64_x2): Likewise.
14995 (vst1q_p64_x2): Likewise.
14996 (vst1_s64_x3): Likewise.
14997 (vst1_u64_x3): Likewise.
14998 (vst1_f64_x3): Likewise.
14999 (vst1_s8_x3): Likewise.
15000 (vst1_p8_x3): Likewise.
15001 (vst1_s16_x3): Likewise.
15002 (vst1_p16_x3): Likewise.
15003 (vst1_s32_x3): Likewise.
15004 (vst1_u8_x3): Likewise.
15005 (vst1_u16_x3): Likewise.
15006 (vst1_u32_x3): Likewise.
15007 (vst1_f16_x3): Likewise.
15008 (vst1_f32_x3): Likewise.
15009 (vst1_p64_x3): Likewise.
15010 (vst1q_s8_x3): Likewise.
15011 (vst1q_p8_x3): Likewise.
15012 (vst1q_s16_x3): Likewise.
15013 (vst1q_p16_x3): Likewise.
15014 (vst1q_s32_x3): Likewise.
15015 (vst1q_s64_x3): Likewise.
15016 (vst1q_u8_x3): Likewise.
15017 (vst1q_u16_x3): Likewise.
15018 (vst1q_u32_x3): Likewise.
15019 (vst1q_u64_x3): Likewise.
15020 (vst1q_f16_x3): Likewise.
15021 (vst1q_f32_x3): Likewise.
15022 (vst1q_f64_x3): Likewise.
15023 (vst1q_p64_x3): Likewise.
15024
15025 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15026
15027 * config/msp430/msp430.c (msp430_output_labelref): Prepend
15028 user_label_prefix to name.
15029
15030 * tree-core.h: Update comment about the format of NAME string
15031 passed to handler in attribute_spec.
15032
15033 * config/msp430/msp430.md: Remove erroneous subreg expression from
15034 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
15035 zero_extend{q,h}isi2.
15036
15037 2018-05-30 Borislav Petkov <bp@suse.de>
15038
15039 * doc/extend.texi: Document some architecture specific
15040 constraints and sort entries.
15041
15042 2018-05-30 Martin Sebor <msebor@redhat.com>
15043
15044 PR middle-end/85369
15045 * builtins.c (expand_builtin_stpcpy_1): New function.
15046 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
15047 only if the former succeeds.
15048
15049 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15050
15051 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
15052 in saphira.
15053
15054 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15055
15056 * doc/invoke.texi (-flinker-output): Document
15057
15058 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15059
15060 * passes.c (ipa_write_summaries): Only modify statements if body
15061 is in memory.
15062 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
15063 incrementally linking.
15064 (ipa_passes): Likewise.
15065 * lto-cgraph.c (lto_output_node): When incrementally linking do not
15066 pass down resolution info.
15067 * common.opt (flag_incremental_link): Update info.
15068 * gcc.c (plugin specs): Turn flinker-output=* to
15069 -plugin-opt=-linker-output-known
15070 * toplev.c (compile_file): Also cut compilation when doing incremental
15071 link.
15072 * flag-types. (enum lto_partition_model): Add
15073 LTO_LINKER_OUTPUT_NOLTOREL.
15074 (invoke.texi): Add -flinker-output docs.
15075 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
15076 link same way as WPA; do not stream in dead initializers.
15077
15078 * dwarf2out.c (dwarf2out_die_ref_for_decl,
15079 darf2out_register_external_decl): Support incremental link.
15080
15081 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15082
15083 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
15084
15085 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15086
15087 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
15088 it down to simple_object_copy_lto_debug_sections.
15089 (run_gcc): Determine incremental LTO link time and configure
15090 lto1 into non-wpa mode, disable renaming of debug sections.
15091
15092 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
15093
15094 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15095 descriptions of various incorrectly documented functions.
15096
15097 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
15098
15099 Revert:
15100 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15101 address check not strict.
15102
15103 2018-05-30 Richard Biener <rguenther@suse.de>
15104
15105 PR tree-optimization/85964
15106 * tracer.c (better_p): Drop initialized count check, we only
15107 call the function with initialized counts now.
15108 (find_best_successor): Do find a best edge if one
15109 has uninitialized count.
15110 (find_best_predecessor): Likewise. Do BB frequency check only
15111 if count is initialized.
15112
15113 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
15114
15115 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
15116 (aarch64_ldrstr_offset_compare): New.
15117 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
15118 load/store orderings.
15119 (aarch64_gen_adjusted_ldpstp): Likewise.
15120
15121 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
15122
15123 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15124 Check for subset of GENERAL_REGS and FP_REGS.
15125 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
15126 r=w alternative.
15127
15128 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
15129
15130 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
15131 and wi::to_poly_offset. Add the current offset and then check
15132 whether the sum fits, rather than using an unchecked addition of
15133 a checked term. Check for a shwi rather than a uhwi.
15134 * expr.c (get_bit_range): Use tree_to_poly_uint64.
15135 (store_constructor): Use poly_int_tree_p.
15136 (expand_expr_real_1): Likewise.
15137 * function.c (assign_temp): Likewise.
15138 * fold-const.c (const_binop): Use poly_int_tree_p and
15139 wi::to_poly_offset.
15140 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
15141 division.
15142 * ipa-icf-gimple.c (func_checker::compare_operand): Use
15143 to_poly_offset for MEM offsets.
15144 * ipa-icf.c (sem_variable::equals): Likewise.
15145 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
15146 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
15147 wi::to_poly_offset for BIT_FIELD_REF offsets.
15148 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
15149 wi::to_poly_offset.
15150 * var-tracking.c (emit_note_insn_var_location): Use
15151 tree_to_poly_uint64.
15152
15153 2018-05-29 Jim Wilson <jimw@sifive.com>
15154
15155 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
15156
15157 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
15158
15159 PR target/85950
15160 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15161 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15162 sequence.
15163 (sse4_1_round<mode>2): Use nonimmediate_operand
15164 for operand 1 predicate.
15165
15166 2018-05-29 Martin Sebor <msebor@redhat.com>
15167 Richard Biener <rguenther@suse.de>
15168
15169 PR testsuite/85888
15170 * calls.c (get_size_range): Call determine_value_range instead
15171 of get_value_range..
15172 * tree-vrp.h (determine_value_range): Declared new function.
15173 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15174
15175 2018-05-29 Richard Biener <rguenther@suse.de>
15176
15177 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15178 sure to use non-pattern stmts for get_earlier_stmt arguments.
15179 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15180 called on pattern stmts.
15181 (get_later_stmt): Likewise.
15182
15183 2018-05-29 Martin Liska <mliska@suse.cz>
15184
15185 PR gcov-profile/85759
15186 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15187 env variables.
15188
15189 2018-05-29 Jakub Jelinek <jakub@redhat.com>
15190
15191 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15192 VEC_UNPACK_*_EXPR.
15193 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15194 VEC_PACK_*_EXPR.
15195
15196 PR target/85918
15197 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15198 VEC_PACK_FLOAT_EXPR): New tree codes.
15199 * tree-pretty-print.c (op_code_prio): Handle
15200 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15201 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15202 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15203 * tree-inline.c (estimate_operator_cost): Likewise.
15204 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15205 * fold-const.c (const_binop): Likewise.
15206 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15207 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15208 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15209 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15210 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15211 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15212 * expr.c (expand_expr_real_2): Likewise.
15213 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15214 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15215 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15216 optabs.
15217 * optabs.c (expand_widen_pattern_expr): For
15218 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15219 sign from result type rather than operand's type.
15220 (expand_binop_directly): For vec_packu_float_optab and
15221 vec_packs_float_optab allow result type to be different from operand's
15222 type.
15223 * optabs-tree.c (optab_for_tree_code): Handle
15224 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15225 VEC_PACK_FLOAT_EXPR. Formatting fixes.
15226 * tree-vect-generic.c (expand_vector_operations_1): Handle
15227 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15228 VEC_PACK_FLOAT_EXPR.
15229 * tree-vect-stmts.c (supportable_widening_operation): Handle
15230 FIX_TRUNC_EXPR.
15231 (supportable_narrowing_operation): Handle FLOAT_EXPR.
15232 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15233 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15234 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
15235 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15236 mode attributes.
15237 (vec_pack<floatprefix>_float_<mode>): New expander.
15238 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15239 attributes.
15240 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15241 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15242 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15243 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15244 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15245 Document.
15246 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15247 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15248 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15249 VEC_PACK_FLOAT_EXPR): Document.
15250
15251 2018-05-29 Richard Biener <rguenther@suse.de>
15252
15253 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15254 member.
15255 (stmt_vec_info_vec): Make pointer.
15256 (init_stmt_vec_info_vec): Remove.
15257 (free_stmt_vec_info_vec): Likewise.
15258 (set_stmt_vec_info_vec): New function.
15259 (free_stmt_vec_infos): Likewise.
15260 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15261 (set_vinfo_for_stmt): Likewise.
15262 (get_earlier_stmt): Likewise.
15263 (get_later_stmt): Likewise.
15264 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15265 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15266 (vec_info::~vec_info): Free stmt_vec_infos.
15267 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15268 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15269 (pass_slp_vectorize::execute): Likewise.
15270 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15271 (free_stmt_vec_info_vec): Likewise.
15272 (set_stmt_vec_info_vec): New function.
15273 (free_stmt_vec_infos): Likewise.
15274 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15275 the global stmt_vec_info_vec.
15276 * tree-parloops.c (gather_scalar_reductions): Use
15277 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15278 vector.
15279
15280 2018-05-29 Richard Biener <rguenther@suse.de>
15281
15282 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15283
15284 2018-05-29 Martin Liska <mliska@suse.cz>
15285 David Malcolm <dmalcolm@redhat.com>
15286
15287 * vec.c (test_reverse): New.
15288 (vec_c_tests): Add new test.
15289 * vec.h (vl_ptr>::reverse): New function.
15290
15291 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
15292
15293 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15294
15295 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15296 and later.
15297
15298 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
15299
15300 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15301
15302 2018-05-28 Richard Biener <rguenther@suse.de>
15303
15304 PR tree-optimization/85933
15305 * tree-vect-data-refs.c (vect_record_base_alignments): Only
15306 look at stmts marked as vectorizable.
15307
15308 2018-05-28 Richard Biener <rguenther@suse.de>
15309
15310 PR tree-optimization/85934
15311 * tree-vect-generic.c (expand_vector_operations_1): Hoist
15312 vector boolean check before scalar optimization.
15313
15314 2018-05-28 Jakub Jelinek <jakub@redhat.com>
15315
15316 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15317 for armv5te.
15318
15319 2018-05-28 Mark Wielaard <mark@klomp.org>
15320
15321 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15322 if it is an expression containing a minus sign.
15323
15324 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
15325
15326 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15327
15328 2018-05-27 Paul Koning <ni1d@arrl.net>
15329
15330 * config/pdp11/pdp11.md (truncsihi2): Remove.
15331
15332 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
15333 Chung-Ju Wu <jasonwucj@gmail.com>
15334
15335 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15336 implementation.
15337 (unaligned_store_dw): Ditto.
15338 * config/nds32/nds32-memory-manipulation.c
15339 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15340 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15341 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15342 (emit_setmem_word_loop): Rename to ...
15343 (emit_setmem_doubleword_loop): ... this.
15344 (nds32_gen_dup_4_byte_to_word_value): New function.
15345 (nds32_gen_dup_8_byte_to_double_word_value): New function.
15346 (nds32_expand_setmem_loop): Refine implementation.
15347 (nds32_expand_setmem_loop_v3m): Ditto.
15348 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15349 pattern.
15350
15351 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15352
15353 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15354
15355 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15356
15357 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15358 (nds32_init_machine_status): Initialize machine->attr_naked_p and
15359 machine->attr_no_prologue_p.
15360 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15361 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15362 (nds32_expand_epilogue): Consider attr_naked_p.
15363 (nds32_expand_epilogue_v3pop): Likewise.
15364 (nds32_can_use_return_insn): Likewise.
15365 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15366 attr_no_prologue_p fields.
15367 * config/nds32/nds32.opt (mret-in-naked-func): New option.
15368
15369 2018-05-27 Jakub Jelinek <jakub@redhat.com>
15370
15371 PR target/85918
15372 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15373 attributes.
15374 * config/i386/sse.md
15375 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15376 Rename to ...
15377 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15378 ... this.
15379 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15380 Rename to ...
15381 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15382 ... this.
15383 (*<floatsuffix>floatv2div2sf2): Rename to ...
15384 (*float<floatunssuffix>v2div2sf2): ... this.
15385 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15386 (float<floatunssuffix>v2div2sf2_mask): ... this.
15387 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15388 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15389 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15390 to ...
15391 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15392 ... this.
15393 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15394 Rename to ...
15395 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15396 ... this.
15397 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15398 Rename to ...
15399 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15400 ... this.
15401 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15402 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15403 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15404 gen_ufix_truncv8dfv8si2.
15405 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15406 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15407 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15408 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15409 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
15410 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
15411 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
15412 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
15413
15414 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15415
15416 PR target/85900
15417 PR target/85345
15418 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
15419
15420 2018-05-25 Jim Wilson <jimw@sifive.com>
15421
15422 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
15423 * config/riscv/riscv.c (struct machine_function): Add
15424 interrupt_handler_p and attribute_checked_p fields.
15425 (riscv_attribute_table): Add interrupt.
15426 (riscv_interrupt_type_p): New.
15427 (riscv_save_reg_p): Save extra regs for interrupt handler.
15428 (riscv_use_save_libcall): Return false for interrupt handler.
15429 (riscv_first_stack_step): Add forward declaration.
15430 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
15431 for interrupt handler with large frame. Use it for saved reg list.
15432 (riscv_expand_prologue): Move flag_stack_usage_info support to
15433 eliminate duplication.
15434 (riscv_expand_epilogue): Generate mret for interrupt handler.
15435 (riscv_epilogue_uses): New.
15436 (riscv_can_use_return_insn): Return false for interrupt handler.
15437 (riscv_function_ok_for_sibcall): Likewise.
15438 (riscv_set_current_function): Add interrupt handler support.
15439 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
15440 * config/riscv/riscv.md (UNSPECV_MRET): New.
15441 (GP_REGNUM): New.
15442 (riscv_frflags, riscv_fsflags): Use tab after opcode.
15443 (riscv_mret): New.
15444 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
15445
15446 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
15447
15448 PR tree-optimization/85712
15449 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
15450 this candidate has already been replaced in-situ by a copy.
15451
15452 2018-05-25 Jason Merrill <jason@redhat.com>
15453
15454 PR c++/80485 - inline function non-zero address.
15455 * symtab.c (nonzero_address): Check DECL_COMDAT.
15456
15457 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
15458
15459 PR target/83628
15460 * config/alpha/alpha.md (ashlsi3): New insn pattern.
15461 (*ashlsi_se): Rename from *ashldi_se. Define as sign
15462 extension of SImode operation. Use const123_operand predicate.
15463 (*saddsi_1): Remove.
15464 (*saddl_se_1): Ditto.
15465 (*ssubsi_1): Ditto.
15466 (*ssubl_se_1): Ditto.
15467 * config/alpha/predicates.md (const123_operand): New predicate.
15468 * config/alpha/constraints.md (P): Use IN_RANGE.
15469
15470 2018-05-25 Richard Biener <rguenther@suse.de>
15471
15472 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
15473 defaulted to true.
15474 (ref_maybe_used_by_stmt_p): Likewise.
15475 (stmt_may_clobber_ref_p): Likewise.
15476 (stmt_may_clobber_ref_p_1): Likewise.
15477 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
15478 and pass it along.
15479 (ref_maybe_used_by_stmt_p): Likewise.
15480 (stmt_may_clobber_ref_p): Likewise.
15481 (stmt_may_clobber_ref_p_1): Likewise.
15482 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
15483 the alias oracle to disambiguate DRs with stmts DR analysis
15484 couldn't handle.
15485 (vect_analyze_data_refs): Do not give up on not analyzable
15486 DRs for BB vectorization. Remove code truncating the dataref
15487 vector.
15488
15489 2018-05-25 Jakub Jelinek <jakub@redhat.com>
15490
15491 PR target/85832
15492 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15493 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
15494 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
15495
15496 2018-05-25 Richard Biener <rguenther@suse.de>
15497
15498 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
15499 function, combining stmt data ref gathering and fatal analysis
15500 parts.
15501 (vect_analyze_data_refs): Remove now redudnant code and simplify.
15502 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
15503 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
15504 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
15505 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
15506
15507 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15508
15509 PR tree-optimization/85720
15510 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
15511 SCC if all partitions are builtins.
15512 (version_loop_by_alias_check): New parameter. Generate cancelable
15513 runtime alias check if all partitions are builtins.
15514 (distribute_loop): Update call to above function.
15515
15516 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15517
15518 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
15519 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
15520 (parm_default_def_partition_arg): Ditto.
15521 (set_parm_default_def_partition): Ditto.
15522 (get_parm_default_def_partitions): Ditto and make it static.
15523 (get_undefined_value_partitions): Ditto and make it static.
15524 (remove_ssa_form): Refactor call to init_var_map here.
15525 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
15526 computation for loop region.
15527 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
15528 (register_default_def): Delete.
15529 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
15530 (parm_default_def_partition_arg): Ditto.
15531 (set_parm_default_def_partition): Ditto.
15532 (get_parm_default_def_partitions): Ditto and make it static.
15533 (get_undefined_value_partitions): Ditto and make it static.
15534 (coalesce_with_default, coalesce_with_default): Update comment.
15535 (create_coalesce_list_for_region): New func factored out from
15536 create_outofssa_var_map.
15537 (populate_coalesce_list_for_outofssa): New func factored out from
15538 create_outofssa_var_map and coalesce_ssa_name.
15539 (create_outofssa_var_map): Delete.
15540 (coalesce_ssa_name): Refactor to support live range computation.
15541 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
15542 (get_parm_default_def_partitions): Delete.
15543 (get_undefined_value_partitions): Ditto.
15544 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
15545 computation for loop region.
15546 (new_tree_live_info, loe_visit_block): Ditto.
15547 (live_worklist, set_var_live_on_entry): Ditto.
15548 (calculate_live_on_exit, verify_live_on_entry): Ditto.
15549 * tree-ssa-live.h (struct _var_map): New fields.
15550 (init_var_map): Change decl.
15551 (region_contains_p): New.
15552
15553 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15554
15555 * tree-ssa-live.h (live_merge_and_clear): Delete.
15556
15557 2018-05-25 Richard Biener <rguenther@suse.de>
15558
15559 PR c++/85912
15560 * tree-dump.c (dequeue_and_dump): Remove access to removed
15561 operand 2 of a SWITCH_EXPR.
15562
15563 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15564
15565 * doc/sourcebuild.texi (vect_double_cond_arith): Include
15566 multiplication and division.
15567 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
15568 (cond_udiv@var{m}, cond_umod@var{m}): Document.
15569 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
15570 (cond_udiv_optab, cond_umod_optab): New optabs.
15571 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
15572 (IFN_COND_RDIV): New internal functions.
15573 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
15574 TRUNC_MOD_EXPR and RDIV_EXPR.
15575 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
15576 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
15577 New unspecs.
15578 (SVE_INT_BINARY): Include mult.
15579 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
15580 (optab, sve_int_op): Handle mult.
15581 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
15582 UNSPEC_COND_DIV.
15583 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
15584 for SVE_INT_BINARY_SD.
15585
15586 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15587
15588 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
15589 (optab, sve_int_op): Handle div and udiv.
15590 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
15591 for SVE_INT_BINARY_SD.
15592 (*<optab><mode>3): New insn for the same.
15593
15594 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15595
15596 * tree-vect-patterns.c: Include predict.h.
15597 (vect_recog_divmod_pattern): Restrict check for division support
15598 to when optimizing for size.
15599
15600 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15601
15602 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
15603 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
15604 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
15605 (gimple_match_op::set_op): Likewise.
15606 (gimple_resimplify4): Declare.
15607 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
15608 (expr::gen_transform): Likewise.
15609 (decision_tree::gen): Generate a simplification routine for 4 operands.
15610 * gimple-match-head.c (gimple_simplify): Add an overload for
15611 4 operands. In the top-level function, handle up to 4 call
15612 arguments and call gimple_resimplify4.
15613 (gimple_resimplify4): New function.
15614 (build_call_internal): Pass a fourth operand.
15615 (maybe_push_to_seq): Likewise.
15616 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
15617 Fold VEC_COND_EXPRs of an operation and a default value into
15618 an IFN_COND_* function if possible.
15619 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
15620 New unspecs.
15621 (SVE_COND_FP_BINARY): Include them.
15622 (optab, sve_fp_op): Handle them.
15623 (SVE_INT_BINARY_REV): New code iterator.
15624 (SVE_COND_FP_BINARY_REV): New int iterator.
15625 (commutative): New int attribute.
15626 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
15627 Declare.
15628 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
15629 function.
15630 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
15631 (*cond_<optab><mode>): New patterns for reversed operands.
15632
15633 2018-05-25 Richard Biener <rguenther@suse.de>
15634
15635 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
15636 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
15637 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
15638 (STMT_VINFO_GROUPED_ACCESS): Adjust.
15639 * tree-vect-data-refs.c (everywhere): Adjust users.
15640 * tree-vect-loop.c (everywhere): Likewise.
15641 * tree-vect-slp.c (everywhere): Likewise.
15642 * tree-vect-stmts.c (everywhere): Likewise.
15643 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
15644
15645 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15646
15647 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
15648 Rename to...
15649 (gcc_cv_as_section_exclude): ... this.
15650 Try Solaris as #exclude syntax.
15651 * configure: Regenerate.
15652 * config.in: Regenerate.
15653 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
15654 SECTION_EXCLUDE.
15655 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
15656 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
15657
15658 * varasm.c (default_elf_asm_named_section): Don't check if
15659 HAVE_GAS_SECTION_EXCLUDE is defined.
15660
15661 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15662
15663 * doc/md.texi: Update the documentation of the cond_* optabs
15664 to mention the new final operand. Fix GET_MODE_NUNITS call.
15665 Describe the scalar case too.
15666 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
15667 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
15668 instead of 2.
15669 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
15670 (get_conditional_internal_fn): Update comment.
15671 * tree-vect-loop.c (vectorizable_reduction): Pass the original
15672 accumulator value as a final argument to conditional functions.
15673 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
15674 a define_expand and add an "else" operand. Assert for now that
15675 the else operand is equal to operand 2. Use SVE_INT_BINARY and
15676 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
15677 (*cond_<optab><mode>): New patterns.
15678 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
15679 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15680 (UNSPEC_COND_EOR): Delete.
15681 (optab): Remove associated mappings.
15682 (SVE_INT_BINARY): New code iterator.
15683 (sve_int_op): Remove int attribute and add "minus" to the code
15684 attribute.
15685 (SVE_COND_INT_OP): Delete.
15686 (SVE_COND_FP_OP): Rename to...
15687 (SVE_COND_FP_BINARY): ...this.
15688
15689 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15690
15691 * optabs.c (can_reuse_operands_p): New function.
15692 (maybe_legitimize_operands): Try to reuse the results for
15693 earlier operands.
15694
15695 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15696
15697 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
15698 Add {q} suffix to insn mnemonic.
15699
15700 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15701
15702 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
15703 (msp430_warn_func_return): New.
15704
15705 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
15706
15707 * fold-const.c (tree_nonzero_bits): New function.
15708 * fold-const.h (tree_nonzero_bits): Likewise.
15709 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
15710 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
15711
15712 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15713
15714 PR target/85900
15715 PR target/85345
15716 * varasm.c (assemble_alias): Check ifunc_resolver only on
15717 FUNCTION_DECL.
15718
15719 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15720
15721 PR target/85903
15722 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
15723 when memory input operand is handled.
15724
15725 2018-05-24 Luis Machado <luis.machado@linaro.org>
15726
15727 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
15728 global.
15729 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
15730
15731 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15732
15733 * match.pd: Delay FMA folds until after vectorization.
15734
15735 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
15736
15737 PR target/83009
15738 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15739 address check not strict.
15740
15741 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15742
15743 * gimple-match.h (gimple_match_op): New class.
15744 (mprts_hook): Replace parameters with a gimple_match_op *.
15745 (maybe_build_generic_op): Likewise.
15746 (gimple_simplified_result_is_gimple_val): Replace parameters with
15747 a const gimple_match_op *.
15748 (gimple_simplify): Replace code_helper * and tree * parameters with
15749 a gimple_match_op * parameter.
15750 (gimple_resimplify1): Replace code_helper *, tree and tree *
15751 parameters with a gimple_match_op * parameter.
15752 (gimple_resimplify2): Likewise.
15753 (gimple_resimplify3): Likewise.
15754 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
15755 parameters with a gimple_match_op * parameter.
15756 * gimple-match-head.c (gimple_simplify): Change prototypes of
15757 auto-generated functions to take a gimple_match_op * instead of
15758 separate code_helper * and tree * parameters. Make the same
15759 change in the top-level overload and update calls to the
15760 gimple_resimplify routines. Update calls to the auto-generated
15761 functions and to maybe_push_res_to_seq in the publicly-facing
15762 operation-specific gimple_simplify overloads.
15763 (gimple_match_op::MAX_NUM_OPS): Define.
15764 (gimple_resimplify1): Replace rcode and ops with a single res_op
15765 parameter. Update call to gimple_simplify.
15766 (gimple_resimplify2): Likewise.
15767 (gimple_resimplify3): Likewise.
15768 (mprts_hook): Replace parameters with a gimple_match_op *.
15769 (maybe_build_generic_op): Likewise.
15770 (build_call_internal): Replace type, nargs and ops with
15771 a gimple_match_op *.
15772 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
15773 with a single gimple_match_op *. Update calls to mprts_hook,
15774 build_call_internal and gimple_simplified_result_is_gimple_val.
15775 Factor out code that is common to the tree_code and combined_fn cases.
15776 * genmatch.c (expr::gen_transform): Replace tem_code and
15777 tem_ops with a gimple_match_op called tem_op. Update calls
15778 to the gimple_resimplify functions and maybe_push_res_to_seq.
15779 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
15780 res_ops. Update call to the gimple_resimplify functions.
15781 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
15782 (decision_tree::gen): Make the functions take a gimple_match_op *
15783 called res_op instead of separate res_code and res_ops parameters.
15784 Update call accordingly.
15785 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
15786 and ops with a single res_op parameter. Update calls to
15787 maybe_build_generic_op and maybe_push_res_to_seq.
15788 (fold_stmt_1): Update calls to gimple_simplify and
15789 replace_stmt_with_simplification.
15790 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
15791 and gimple_simplified_result_is_gimple_val.
15792 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
15793 gimple_simplify.
15794 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
15795 with a gimple_match_op *.
15796 (vn_nary_build_or_lookup): Likewise. Update call to
15797 vn_nary_build_or_lookup_1.
15798 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
15799 gimple_match_op *. Update calls to the gimple_resimplify routines
15800 and to gimple_simplified_result_is_gimple_val.
15801 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
15802 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
15803 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
15804 (visit_nary_op): Likewise.
15805 (visit_reference_op_load): Likewise.
15806
15807 2018-05-23 Luis Machado <luis.machado@linaro.org>
15808
15809 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
15810 modifier for printing the step amount.
15811
15812 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
15813
15814 PR target/78849
15815 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
15816 types.
15817
15818 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
15819
15820 * doc/sourcebuild.texi (Endianness): New subsubsection.
15821
15822 2018-05-23 Luis Machado <luis.machado@linaro.org>
15823
15824 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15825 <prefetch_dynamic_strides>: New const bool field.
15826 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15827 prefetch_dynamic_strides.
15828 (exynosm1_prefetch_tune): Likewise.
15829 (thunderxt88_prefetch_tune): Likewise.
15830 (thunderx_prefetch_tune): Likewise.
15831 (thunderx2t99_prefetch_tune): Likewise.
15832 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
15833 false.
15834 (aarch64_override_options_internal): Update to set
15835 PARAM_PREFETCH_DYNAMIC_STRIDES.
15836 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15837 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15838 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15839 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15840 prefetch-dynamic-strides setting.
15841
15842 2018-05-23 Luis Machado <luis.machado@linaro.org>
15843
15844 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15845 <minimum_stride>: New const int field.
15846 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15847 minimum_stride field defaulting to -1.
15848 (exynosm1_prefetch_tune): Likewise.
15849 (thunderxt88_prefetch_tune): Likewise.
15850 (thunderx_prefetch_tune): Likewise.
15851 (thunderx2t99_prefetch_tune): Likewise.
15852 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
15853 <default_opt_level>: Set to 3.
15854 (aarch64_override_options_internal): Update to set
15855 PARAM_PREFETCH_MINIMUM_STRIDE.
15856 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15857 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15858 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15859 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15860 stride is constant and is below the minimum stride threshold.
15861
15862 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15863
15864 * config/arm/arm-cpus.in (mode26): Delete.
15865 (armv4): Delete mode26 reference.
15866 * config/arm/arm.c (arm_configure_build_target): Delete use of
15867 isa_bit_mode26.
15868
15869 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
15870
15871 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
15872 New insn pattern.
15873 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
15874 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
15875 for non-SSE modes.
15876 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
15877 (floatunsdidf2): Ditto.
15878
15879 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
15880
15881 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
15882 (fixuns_trunc<mode>si2_avx512f): Ditto.
15883 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
15884 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
15885 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
15886
15887 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
15888
15889 PR rtl-optimization/79985
15890 * df-scan.c (df_insn_refs_collect): Remove special case for
15891 global registers and asm statements.
15892
15893 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
15894
15895 * extend.texi (Global Register Variables): Rewrite the bullet list.
15896 Note that the register is available for allocation. Note that access
15897 via inline asm must use constraints. Add note about async-signal
15898 handlers. Remove paragraph about automagic register selection.
15899
15900 2018-05-23 Richard Biener <rguenther@suse.de>
15901
15902 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
15903 of fixed offset from memset VN.
15904
15905 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
15906
15907 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
15908 first_interp field.
15909 (alloc_cand_and_find_basis): Initialize first_interp field.
15910 (slsr_process_mul): Modify first_interp field.
15911 (slsr_process_add): Likewise.
15912 (slsr_process_cast): Modify first_interp field for each new
15913 interpretation.
15914 (slsr_process_copy): Likewise.
15915 (dump_candidate): Dump first_interp field.
15916 (replace_mult_candidate): Process all interpretations, not just
15917 subsequent ones.
15918 (replace_rhs_if_not_dup): Likewise.
15919 (replace_one_candidate): Likewise.
15920
15921 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
15922
15923 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
15924 Add new boolean.
15925 (aarch64_needs_frame_chain): New function.
15926 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
15927
15928 2018-05-23 Sudakshina Das <sudi.das@arm.com>
15929
15930 PR target/84882
15931 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
15932 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
15933 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
15934 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
15935 as true for strict-align.
15936 (aarch64_can_inline_p): Perform checks even when callee has no
15937 attributes to check for strict alignment.
15938 * doc/extend.texi (AArch64 Function Attributes): Document
15939 no-strict-align.
15940 * doc/invoke.texi: (AArch64 Options): Likewise.
15941
15942 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
15943
15944 PR tree-optimization/85853
15945 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
15946 the handling of the root of the node to...
15947 (vect_slp_analyze_node_operations_1): ...this new function,
15948 and run the whole thing with the child nodes' def types
15949 set according to their SLP node's def type.
15950
15951 2018-05-23 Richard Biener <rguenther@suse.de>
15952
15953 PR middle-end/85874
15954 * tree-data-ref.c (create_runtime_alias_checks): Defer
15955 and ignore overflow warnings.
15956
15957 2018-05-23 Yury Gribov <tetra2005@gmail.com>
15958
15959 PR tree-optimization/85822
15960 * tree-vrp.c (is_masked_range_test): Fix handling of negative
15961 constants.
15962
15963 2018-05-23 Richard Biener <rguenther@suse.de>
15964
15965 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15966 memset constants via native_interpret_expr.
15967
15968 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
15969
15970 PR target/85345
15971 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
15972 attribute.
15973 (cgraph_node::create_alias): Likewise.
15974 (cgraph_node::get_availability): Check ifunc_resolver instead
15975 of looking up ifunc attribute.
15976 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
15977 * varasm.c (do_assemble_alias): Likewise.
15978 (assemble_alias): Likewise.
15979 (default_binds_local_p_3): Likewise.
15980 * cgraph.h (cgraph_node): Add ifunc_resolver.
15981 (cgraph_node::only_called_directly_or_aliased_p): Return false
15982 for IFUNC resolver.
15983 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
15984 attribute.
15985 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
15986 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
15987 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
15988 instead of looking up ifunc attribute.
15989
15990 2018-05-22 Luis Machado <luis.machado@linaro.org>
15991
15992 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
15993
15994 2018-05-22 Martin Sebor <msebor@redhat.com>
15995
15996 PR middle-end/85359
15997 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
15998 only when expasion succeeds.
15999 (expand_builtin_strcmp): Same.
16000 (expand_builtin_strncmp): Same.
16001
16002 2018-05-22 Martin Sebor <msebor@redhat.com>
16003
16004 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
16005
16006 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16007 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16008
16009 * config/aarch64/aarch64-ldpstp.md: Replace uses of
16010 aarch64_mem_pair_operand with memory_operand and delete operand swapping
16011 code.
16012 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16013 Add check for legitimate_address.
16014 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
16015 (aarch64_swap_ldrstr_operands): New.
16016 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
16017 Define prototype.
16018
16019 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16020 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16021
16022 * config/aarch64/aarch64.md: New patterns to generate stp
16023 and ldp.
16024 (store_pair_sw, store_pair_dw): New patterns to generate stp for
16025 single words and double words.
16026 (load_pair_sw, load_pair_dw): Likewise.
16027 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
16028 Delete.
16029 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
16030 Delete.
16031 * config/aarch64/aarch64-ldpstp.md: Modify peephole
16032 for different mode ldpstp and add peephole for merged zero stores.
16033 Likewise for loads.
16034 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16035 Add size check.
16036 (aarch64_gen_store_pair): Rename calls to match new patterns.
16037 (aarch64_gen_load_pair): Rename calls to match new patterns.
16038 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
16039 (load_pair<DREG:mode><DREG2:mode>): ... This.
16040 (store_pair<mode>): Rename to...
16041 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
16042 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
16043 New mode iterators.
16044 (V_INT_EQUIV): Handle SImode.
16045 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
16046 New predicate.
16047
16048 2018-05-22 Martin Sebor <msebor@redhat.com>
16049
16050 PR c/85623
16051 * calls.c (maybe_warn_nonstring_arg): Use string length to set
16052 or ajust the presumed bound on an operation to avoid unnecessary
16053 warnings.
16054
16055 2018-05-22 Martin Sebor <msebor@redhat.com>
16056
16057 PR tree-optimization/85826
16058 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
16059 assuming that a DECL necesarily has a constant size.
16060
16061 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
16062
16063 PR middle-end/85862
16064 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
16065
16066 2018-05-22 Richard Biener <rguenther@suse.de>
16067
16068 PR tree-optimization/85834
16069 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
16070 non-constant and non-zero memset arguments.
16071
16072 2018-05-22 Martin Liska <mliska@suse.cz>
16073
16074 PR ipa/85607
16075 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
16076
16077 2018-05-22 Richard Biener <rguenther@suse.de>
16078
16079 PR tree-optimization/85863
16080 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
16081 comparisons when vectype is specified.
16082 (vectorizable_condition): Do not specify vectype for
16083 vect_is_simple_cond when SLP vectorizing.
16084
16085 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
16086
16087 PR target/85657
16088 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
16089 define __ibm128 as long double.
16090 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
16091 as a distinct type when IEEE 128-bit support is enabled.
16092 (init_float128_ieee): Fix up conversions between IFmode and IEEE
16093 128-bit types to use the correct functions.
16094 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
16095 convert between 128-bit floating point types that have different
16096 modes but the same representation, instead of using gen_lowpart to
16097 makean alias.
16098 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
16099 KFmode.
16100 (IFKF_reg): New attributes to give the register constraints for
16101 IFmode and KFmode.
16102 (extend<mode>tf2_internal): New insns to mark an explicit
16103 conversion between 128-bit floating point types that have a
16104 different mode but share the same representation.
16105
16106 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
16107
16108 PR tree-optimization/85814
16109 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
16110 a null return from get_strinfo when unsharing the next
16111 strinfo in the chain.
16112
16113 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16114
16115 PR gcc/84923
16116 * varasm.c (weak_finish): Clean up weak_decls.
16117
16118 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16119
16120 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
16121 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
16122 UNSPEC_UADALP values.
16123 * config/aarch64/iterators.md (ABAL): New int iterator.
16124 (ABDL2): Likewise.
16125 (ADALP): Likewise.
16126 (sur): Add mappings for the above.
16127 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
16128 New define_insn.
16129 (aarch64_<sur>abal<mode>_4): Likewise.
16130 (aarch64_<sur>adalp<mode>_3): Likewise.
16131 (<sur>sadv16qi): New define_expand.
16132
16133 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
16134
16135 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
16136 (*movdf_internal): Ditto.
16137 (*rcpsf2_sse): Ditto.
16138 (*rsqrtsf2_sse): Ditto.
16139 (*sqrt<mode>2_sse): Ditto.
16140
16141 2018-05-21 Tamar Christina <tamar.christina@arm.com>
16142
16143 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
16144 eor3q<mode>4.
16145 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
16146 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
16147 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
16148 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
16149 vbcaxq_s64): New.
16150 * config/aarch64/arm_neon.h: Likewise.
16151 * config/aarch64/iterators.md (VQ_I): New.
16152
16153 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
16154
16155 * config.gcc: Add arc/t-multilib-linux to tmake_file for
16156 arc*-*-linux*.
16157 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16158 MULTILIB_DIRNAMES
16159
16160 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16161
16162 * config/nds32/constraints.md (S): New constraint.
16163 * config/nds32/nds32.md (call_internal): Use constraint S.
16164 (call_value_internal): Likewise.
16165 (sibcall_internal): Likewise.
16166 (sibcall_value_internal): Likewise.
16167
16168 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16169 Chung-Ju Wu <jasonwucj@gmail.com>
16170
16171 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16172 into consideration.
16173
16174 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16175 Chung-Ju Wu <jasonwucj@gmail.com>
16176
16177 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16178 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16179 (nds32_rtx_costs_impl): Simplify.
16180 (nds32_address_cost_impl): Simplify.
16181 (nds32_init_rtx_costs): New function.
16182 (nds32_rtx_costs_speed_prefer): Likewise.
16183 (nds32_rtx_costs_size_prefer): Likewise.
16184 (nds32_address_cost_speed_prefer): Likewise.
16185 (nds32_address_cost_speed_fwprop): Likewise.
16186 (nds32_address_cost_size_prefer): Likewise.
16187 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16188 * config/nds32/nds32.c (nds32_option_override): Use
16189 nds32_init_rtx_costs function.
16190
16191 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16192
16193 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16194 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16195 (TARGET_PIPELINE_N8): Likewise.
16196 (TARGET_PIPELINE_N10): Likewise.
16197 (TARGET_PIPELINE_N13): Likewise.
16198 (TARGET_PIPELINE_GRAYWOLF): Likewise.
16199
16200 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
16201
16202 * config/nds32/nds32-fpu.md: Update copyright year.
16203
16204 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16205
16206 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16207
16208 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16209
16210 * config/nds32/nds32.c
16211 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16212 * config/nds32/nds32.opt (minline-asm-r15): New option.
16213
16214 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16215
16216 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16217 MASK_HW_ABS.
16218 * config/nds32/nds32.md (abssi2): New pattern.
16219
16220 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
16221
16222 * config/i386/i386.md (rex64namesuffix): New mode attribute.
16223 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16224 Merge insn pattern from sse_cvtsi2ss<round_name> and
16225 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16226 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16227 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16228 using SWI48 mode iterator.
16229 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16230 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16231 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16232 pattern from sse_cvttss2si<round_saeonly_name>
16233 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16234 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16235 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16236 using SWI48 mode iterator.
16237 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16238 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16239 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16240 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16241 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16242 using SWI48 mode iterator.
16243 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16244 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16245 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16246 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16247 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16248 SWI48 mode iterator.
16249 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16250 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16251 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16252 pattern from sse_cvttsd2si<round_saeonly_name>
16253 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16254
16255 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16256
16257 * config/nds32/nds32-md-auxiliary.c
16258 (nds32_valid_smw_lwm_base_p): Refine.
16259 (nds32_output_smw_single_word): Refine.
16260 (nds32_output_smw_double_word): New.
16261 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16262
16263 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16264
16265 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16266 (nds32_output_stack_pop): Refine.
16267 (nds32_expand_unaligned_load): Refine.
16268 (nds32_expand_unaligned_store): Refine.
16269
16270 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16271 Chung-Ju Wu <jasonwucj@gmail.com>
16272
16273 * config/nds32/constants.md: Add TP_REGNUM constant.
16274 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16275 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16276 UNSPEC_ADD32.
16277 * config/nds32/nds32-doubleword.md: Consider flag_pic.
16278 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16279 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16280 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16281 and PIC code generation.
16282 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16283 code generation.
16284 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16285 optimization.
16286 * config/nds32/nds32.md: Support TLS and PIC.
16287 * config/nds32/nds32.c: Support TLS and PIC.
16288 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16289 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16290 predicate.
16291
16292 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16293
16294 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16295 mode with E_ prefix.
16296
16297 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16298 Chung-Ju Wu <jasonwucj@gmail.com>
16299
16300 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16301 * config/nds32/nds32-md-auxiliary.c
16302 (symbolic_reference_mentioned_p): New.
16303 (nds32_legitimize_ict_address): New.
16304 (nds32_expand_ict_move): New.
16305 (nds32_indirect_call_referenced_p): New.
16306 (nds32_symbol_binds_local_p): Delete.
16307 (nds32_long_call_p): Modify.
16308 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16309 * config/nds32/nds32-protos.h
16310 (symbolic_reference_mentioned_p): Declare.
16311 (nds32_legitimize_ict_address): Declare.
16312 (nds32_expand_ict_move): Declare.
16313 (nds32_indirect_call_referenced_p): Declare.
16314 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16315 (nds32_relax_group): Use nds32_ict_const_p as condition.
16316 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16317 (nds32_asm_file_start): Output ict_model directive in asm code.
16318 (nds32_legitimate_address_p): Consider indirect call.
16319 (nds32_print_operand): Consider indirect call.
16320 (nds32_print_operand_address): Consider indirect call.
16321 (nds32_insert_attributes): Handle "indirect_call" attribute.
16322 (TARGET_LEGITIMATE_ADDRESS_P): Define.
16323 (TARGET_LEGITIMATE_CONSTANT_P): Define.
16324 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16325 (TARGET_DELEGITIMIZE_ADDRESS): Define.
16326 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16327 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16328 (TARGET_ICT_MODEL_SMALL): Define.
16329 (TARGET_ICT_MODEL_LARGE): Define.
16330 * config/nds32/nds32.md (movsi): Consider ict model.
16331 (call, call_value): Consider ict model.
16332 (sibcall, sibcall_value): Consider ict model.
16333 * config/nds32/nds32.opt (mict-model): New option.
16334 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16335 model.
16336
16337 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
16338 Monk Chiang <sh.chiang04@gmail.com>
16339 Jim Wilson <jimw@sifive.com>
16340
16341 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16342 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
16343 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16344 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16345 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
16346 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16347 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16348 compute save_libcall_adjustment properly.
16349 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16350 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16351 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16352 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16353 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16354 (ABI_SPEC): Handle mabi=ilp32e.
16355 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16356 (RVE): Add RVE mask.
16357 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16358 <-march>: Add rv32e as an example.
16359
16360 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
16361
16362 PR c++/82899
16363 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16364 (intra_create_variable_infos): Handle C++ constructors.
16365
16366 2018-05-18 Martin Liska <mliska@suse.cz>
16367
16368 * passes.def: Remove a redundant pass.
16369
16370 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
16371
16372 PR bootstrap/85838
16373 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16374
16375 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16376
16377 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16378 (ARMv4): Update.
16379 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16380 (ARMv6m): Update.
16381 (armv2, armv2a, armv3, armv3m): Delete architectures.
16382 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16383 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16384 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16385 Delete cpus.
16386 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16387 (*mulsidi3adddi): Likewise.
16388 (mulsidi3): Likewise.
16389 (*mulsidi3_nov6): Likewise.
16390 (umulsidi3): Likewise.
16391 (umulsidi3_nov6): Likewise.
16392 (umaddsidi4): Likewise.
16393 (*umulsidi3adddi): Likewise.
16394 (smulsi3_highpart): Likewise.
16395 (*smulsi3_highpart_nov6): Likewise.
16396 (umulsi3_highpart): Likewise.
16397 (*umulsi3_highpart_nov6): Likewise.
16398 * config/arm/arm.h (arm_arch3m): Delete.
16399 * config/arm/arm.c (arm_arch3m): Delete.
16400 (arm_option_override_internal): Update armv3-related comment.
16401 (arm_configure_build_target): Delete use of isa_bit_mode32.
16402 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16403 (arm_rtx_costs_internal): Delete check of arm_arch3m.
16404 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16405 (mulsa3): Likewise.
16406 (mulusa3): Likewise.
16407 * config/arm/arm-protos.h (arm_arch3m): Delete.
16408 * config/arm/arm-tables.opt: Regenerate.
16409 * config/arm/arm-tune.md: Likewise.
16410 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
16411 deleted architectures.
16412
16413 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16414
16415 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
16416 (armv5t, armv5te): New features.
16417 (ARMv5, ARMv5e): Delete fgroups.
16418 (ARMv5t, ARMv5te): Adjust for above changes.
16419 (ARMv6m): Likewise.
16420 (armv5, armv5e): Delete arches.
16421 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
16422 arm_arch5.
16423 (*call_reg_arm): Likewise.
16424 (*call_value_reg_armv5): Likewise.
16425 (*call_value_reg_arm): Likewise.
16426 (*call_symbol): Likewise.
16427 (*call_value_symbol): Likewise.
16428 (*sibcall_insn): Likewise.
16429 (*sibcall_value_insn): Likewise.
16430 (clzsi2): Likewise.
16431 (prefetch): Likewise.
16432 (define_split and define_peephole2 dependent on arm_arch5):
16433 Likewise.
16434 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
16435 arm_arch5e.
16436 (TARGET_ARM_QBIT): Likewise.
16437 (TARGET_DSP_MULTIPLY): Likewise.
16438 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
16439 (arm_arch5, arm_arch5e): Delete.
16440 (arm_arch5t, arm_arch5te): Declare.
16441 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
16442 (arm_arch5t): Declare.
16443 (arm_option_reconfigure_globals): Update for the above.
16444 (arm_options_perform_arch_sanity_checks): Update comment, replace
16445 use of arm_arch5 with arm_arch5t.
16446 (use_return_insn): Likewise.
16447 (arm_emit_call_insn): Likewise.
16448 (output_return_instruction): Likewise.
16449 (arm_final_prescan_insn): Likewise.
16450 (arm_coproc_builtin_available): Likewise.
16451 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
16452 arm_arch5e with arm_arch5t and arm_arch5te.
16453 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
16454 (arm_arch5t, arm_arch5te): Declare.
16455 * config/arm/arm-tables.opt: Regenerate.
16456 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
16457 * config/arm/t-multilib: Likewise.
16458 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
16459 instead of arm_arch5.
16460 (*call_reg_thumb1): Likewise.
16461 (*call_value_reg_thumb1_v5): Likewise.
16462 (*call_value_reg_thumb1): Likewise.
16463 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
16464 unreachable path.
16465 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
16466
16467 2018-05-18 Martin Liska <mliska@suse.cz>
16468
16469 PR gcov-profile/84846
16470 * doc/gcov.texi: Document -t option of gcov tool.
16471
16472 2018-05-18 Martin Liska <mliska@suse.cz>
16473
16474 PR gcov-profile/84846
16475 * gcov.c (print_usage): Add new -t option.
16476 (process_args): Handle the option.
16477 (generate_results): Use stdout as output when requested by
16478 the option.
16479
16480 2018-05-18 Martin Liska <mliska@suse.cz>
16481
16482 PR gcov-profile/84846
16483 * coverage.c (coverage_init): Write PWD to .gcno file.
16484 * doc/gcov.texi: Document how working directory is printed.
16485 * gcov-dump.c (dump_gcov_file): Print PWD.
16486 * gcov.c (output_intermediate_file): Likewise.
16487 (read_graph_file): Read PWD string.
16488 (output_lines): Print PWD.
16489
16490 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16491
16492 PR middle-end/85817
16493 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
16494 for retval and return false if all args to phi are zero.
16495
16496 2018-05-18 Richard Biener <rguenther@suse.de>
16497
16498 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
16499 method.
16500 (evrp_dom_walker::before_dom_children): Call it.
16501
16502 2018-05-18 Richard Biener <rguenther@suse.de>
16503
16504 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
16505 results when processing array refs with variable index.
16506
16507 2018-05-18 Toon Moene <toon@moene.org>
16508
16509 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
16510 directly after that of -floop-interchange. Indicate that both
16511 options are enabled by default when specifying -O3.
16512
16513 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16514
16515 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
16516 iterator. Delete separate integer-mode vec_set<mode> expander.
16517 (aarch64_simd_vec_setv2di): Delete.
16518 (vec_setv2di): Delete.
16519 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
16520 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
16521 the "w, r" alternative.
16522
16523 2018-05-18 Martin Liska <mliska@suse.cz>
16524
16525 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
16526 * tree-pass.h (make_pass_lower_switch_O0): New function.
16527 * tree-switch-conversion.c (node_has_low_bound): Remove.
16528 (node_has_high_bound): Likewise.
16529 (node_is_bounded): Likewise.
16530 (class pass_lower_switch): Make it a template type and create
16531 two instances.
16532 (pass_lower_switch::execute): Add template argument.
16533 (make_pass_lower_switch): New function.
16534 (make_pass_lower_switch_O0): New function.
16535 (do_jump_if_equal): Remove.
16536 (emit_case_nodes): Simplify to just handle all 3 cases and leave
16537 all the hard work to tree optimization passes.
16538
16539 2018-05-18 Martin Liska <mliska@suse.cz>
16540
16541 * dbgcnt.c (limit_low): Renamed from limit.
16542 (limit_high): New variable.
16543 (dbg_cnt_is_enabled): Check for upper limit.
16544 (dbg_cnt): Adjust dumping.
16545 (dbg_cnt_set_limit_by_index): Add new argument for high
16546 value.
16547 (dbg_cnt_set_limit_by_name): Likewise.
16548 (dbg_cnt_process_single_pair): Parse new format.
16549 (dbg_cnt_process_opt): Use strtok.
16550 (dbg_cnt_list_all_counters): Remove 'value' and add
16551 'limit_high'.
16552 * doc/invoke.texi: Document changes.
16553
16554 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
16555
16556 * doc/sourcebuild.texi (scalar_all_fma): Document.
16557 * tree.def (FMA_EXPR): Delete.
16558 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
16559 * internal-fn.c (ternary_direct): New macro.
16560 (expand_ternary_optab_fn): Likewise.
16561 (direct_ternary_optab_supported_p): Likewise.
16562 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
16563 * builtins.c (fold_builtin_fma): Delete.
16564 (fold_builtin_3): Don't call it.
16565 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
16566 * expr.c (expand_expr_real_2): Likewise.
16567 * fold-const.c (operand_equal_p): Likewise.
16568 (fold_ternary_loc): Likewise.
16569 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
16570 * gimple.c (DEFTREECODE): Likewise.
16571 * gimplify.c (gimplify_expr): Likewise.
16572 * optabs-tree.c (optab_for_tree_code): Likewise.
16573 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
16574 * tree-eh.c (operation_could_trap_p): Likewise.
16575 (stmt_could_throw_1_p): Likewise.
16576 * tree-inline.c (estimate_operator_cost): Likewise.
16577 * tree-pretty-print.c (dump_generic_node): Likewise.
16578 (op_code_prio): Likewise.
16579 * tree-ssa-loop-im.c (stmt_cost): Likewise.
16580 * tree-ssa-operands.c (get_expr_operands): Likewise.
16581 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
16582 * fold-const-call.h (fold_fma): Delete.
16583 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
16584 CFN_FNMA and CFN_FNMS.
16585 (fold_fma): Delete.
16586 * genmatch.c (combined_fn): New enum.
16587 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
16588 (commutative_op): New function.
16589 (commutate): Use it. Handle more than 2 operands.
16590 (dt_operand::gen_gimple_expr): Use commutative_op.
16591 (parser::parse_expr): Allow :c to be used with non-binary
16592 operators if the commutative operand is known.
16593 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
16594 CFN_FMS, CFN_FNMA and CFN_FNMS.
16595 (backprop::process_assign_use): Remove FMA_EXPR handling.
16596 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
16597 (gen_hsa_fma): New function.
16598 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
16599 IFN_FNMA and IFN_FNMS.
16600 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
16601 * gimple-fold.h (follow_all_ssa_edges): Declare.
16602 * gimple-fold.c (follow_all_ssa_edges): New function.
16603 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
16604 gimple_build interface and use follow_all_ssa_edges to fold the result.
16605 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
16606 instead of checking for optabs directly.
16607 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
16608 rather than FMA_EXPRs.
16609 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
16610 call to IFN_FMA instead of an FMA_EXPR.
16611
16612 2018-05-17 Jim Wilson <jimw@sifive.com>
16613
16614 * expr.c (do_tablejump): When converting index to Pmode, if we have a
16615 sign extended promoted subreg, and the range does not have the sign bit
16616 set, then do a sign extend.
16617
16618 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
16619 test, check for sign extended subreg and/or constant operands, and
16620 do a sign extend in that case.
16621
16622 2018-05-17 Steve Ellcey <sellcey@cavium.com>
16623
16624 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
16625 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
16626 Add untyped.
16627 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
16628 Change logics_shift_reg to logics_shift_imm.
16629 (thunderx2t99_fp_loadpair_basic): Delete.
16630 (thunderx2t99_fp_storepair_basic): Delete.
16631 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
16632 (thunderx2t99_asimd_polynomial): Delete.
16633 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
16634 and neon_fp_mul_d_scalar_q.
16635 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
16636 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
16637 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
16638 (thunderx2t99_asimd_lut): Add missing tbl types.
16639 (thunderx2t99_asimd_ext): Delete.
16640 (thunderx2t99_asimd_load1_1_mult): Delete.
16641 (thunderx2t99_asimd_load1_2_mult): Delete.
16642 (thunderx2t99_asimd_load1_ldp): New.
16643 (thunderx2t99_asimd_load1): New.
16644 (thunderx2t99_asimd_load2): Add missing *load2* types.
16645 (thunderx2t99_asimd_load3): New.
16646 (thunderx2t99_asimd_load4): New.
16647 (thunderx2t99_asimd_store1_1_mult): Delete.
16648 (thunderx2t99_asimd_store1_2_mult): Delete.
16649 (thunderx2t99_asimd_store2_mult): Delete.
16650 (thunderx2t99_asimd_store2_onelane): Delete.
16651 (thunderx2t99_asimd_store_stp): New.
16652 (thunderx2t99_asimd_store1): New.
16653 (thunderx2t99_asimd_store2): New.
16654 (thunderx2t99_asimd_store3): New.
16655 (thunderx2t99_asimd_store4): New.
16656
16657 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
16658
16659 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
16660 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
16661
16662 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
16663 Segher Boessenkool <segher@kernel.crashing.org>
16664
16665 PR target/85698
16666 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
16667 operand.
16668
16669 2018-05-17 Richard Biener <rguenther@suse.de>
16670
16671 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
16672 for pruning loop and prune defs feeding only already visited PHIs.
16673
16674 2018-05-17 Richard Biener <rguenther@suse.de>
16675
16676 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
16677
16678 2018-05-17 Bin Cheng <bin.cheng@arm.com>
16679 Richard Biener <rguenther@suse.de>
16680
16681 PR tree-optimization/85793
16682 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
16683 for VMAT_ELEMENTWISE.
16684
16685 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16686
16687 * internal-fn.h (lookup_internal_fn): Declare
16688 * internal-fn.c (lookup_internal_fn): New function.
16689 * gimple.c (gimple_build_call_from_tree): Handle calls to
16690 internal functions.
16691 * gimple-pretty-print.c (dump_gimple_call): Print "." before
16692 internal function names.
16693 * tree-pretty-print.c (dump_generic_node): Likewise.
16694 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
16695
16696 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16697
16698 * gimple-fold.h (gimple_build): Make the function forms take
16699 combined_fn rather than built_in_function.
16700 (gimple_simplify): Likewise.
16701 * gimple-match-head.c (gimple_simplify): Likewise.
16702 * gimple-fold.c (gimple_build): Likewise.
16703 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
16704 rather than gimple_build_call_internal.
16705 (get_initial_defs_for_reduction): Likewise.
16706 (vect_create_epilog_for_reduction): Likewise.
16707 (vectorizable_live_operation): Likewise.
16708
16709 2018-05-17 Martin Liska <mliska@suse.cz>
16710
16711 * gimple-ssa-sprintf.c (format_directive): Do not use
16712 space in between 'G_' and '('.
16713
16714 2018-05-17 Jakub Jelinek <jakub@redhat.com>
16715
16716 PR target/85323
16717 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
16718 even if the mask is not all ones.
16719
16720 PR target/85323
16721 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
16722 vector.
16723 (ix86_gimple_fold_builtin): Likewise.
16724
16725 PR target/85323
16726 * config/i386/i386.c: Include tree-vector-builder.h.
16727 (ix86_vector_shift_count): New function.
16728 (ix86_fold_builtin): Fold shift builtins by scalar count.
16729 (ix86_gimple_fold_builtin): Likewise.
16730
16731 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
16732 _mm512_setzero): New intrinsics.
16733
16734 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
16735 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16736
16737 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
16738 code generation for cases where splatting a value is not useful.
16739 * simplify-rtx.c (simplify_ternary_operation): Simplify
16740 vec_merge across a vec_duplicate and a paradoxical subreg forming
16741 a vector mode to a vec_concat.
16742
16743 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
16744
16745 * config.gcc: Support "goldmont-plus".
16746 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16747 "goldmont-plus".
16748 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16749 PROCESSOR_GOLDMONT_PLUS.
16750 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
16751 (processor_target_table): Add "goldmont-plus".
16752 (PTA_GOLDMONT_PLUS): Define.
16753 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
16754 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
16755 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
16756 (fold_builtin_cpu): Add "goldmont-plus".
16757 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
16758 (ix86_option_override_internal): Add "goldmont-plus".
16759 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
16760 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
16761 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
16762 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
16763
16764 2018-05-17 Richard Biener <rguenther@suse.de>
16765
16766 PR tree-optimization/85757
16767 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
16768 remove defs that only feed that PHI from further processing.
16769
16770 2018-05-16 Jim Wilson <jimw@sifive.com>
16771
16772 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
16773 asterisk to name.
16774 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
16775
16776 2018-05-16 Mark Wielaard <mark@klomp.org>
16777
16778 * dwarf2out.c (count_index_strings): New function.
16779 (output_indirect_strings): Call count_index_strings and generate
16780 header for dwarf_version >= 5.
16781
16782 2018-05-16 Mark Wielaard <mark@klomp.org>
16783
16784 * dwarf2out.c (dwarf_FORM): New function.
16785 (set_indirect_string): Use dwarf_FORM.
16786 (reset_indirect_string): Likewise.
16787 (size_of_die): Likewise.
16788 (value_format): Likewise.
16789 (output_die): Likewise.
16790 (add_skeleton_AT_string): Likewise.
16791 (output_macinfo_op): Likewise.
16792 (index_string): Likewise.
16793 (output_index_string_offset): Likewise.
16794 (output_index_string): Likewise.
16795 (count_index_strings): Likewise.
16796
16797 2018-05-16 Carl Love <cel@us.ibm.com>
16798
16799 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16800 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
16801
16802 2018-05-16 Martin Jambor <mjambor@suse.cz>
16803
16804 * ipa-prop.c (ipa_free_all_edge_args): Remove.
16805 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
16806
16807 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
16808
16809 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
16810 (fnma<mode>4): Likewise.
16811 (fms<mode>4): Likewise.
16812 (fnms<mode>4): Likewise.
16813 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
16814 (aarch64_fnma<mode>4): Likewise.
16815 (aarch64_fms<mode>4): Likewise.
16816 (aarch64_fnms<mode>4): Likewise.
16817 (aarch64_fnmadd<mode>4): Likewise.
16818
16819 2018-05-16 Jason Merrill <jason@redhat.com>
16820
16821 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
16822
16823 2018-05-16 Richard Biener <rguenther@suse.de>
16824
16825 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
16826 (dump_stmt_cost): Declare.
16827 (add_stmt_cost): Dump cost we add.
16828 (add_stmt_costs): New function.
16829 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
16830 No longer exported.
16831 (vect_analyze_stmt): Adjust prototype.
16832 (vectorizable_condition): Likewise.
16833 (vectorizable_live_operation): Likewise.
16834 (vectorizable_reduction): Likewise.
16835 (vectorizable_induction): Likewise.
16836 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
16837 cost vector to pass to vectorizable_ and record afterwards.
16838 (vect_model_reduction_cost): Take cost vector argument and adjust.
16839 (vect_model_induction_cost): Likewise.
16840 (vectorizable_reduction): Likewise.
16841 (vectorizable_induction): Likewise.
16842 (vectorizable_live_operation): Likewise.
16843 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
16844 SLP_TREE_NUMBER_OF_VEC_STMTS.
16845 (vect_analyze_slp_cost_1): Remove.
16846 (vect_analyze_slp_cost): Likewise.
16847 (vect_slp_analyze_node_operations): Take visited args and
16848 a target cost vector. Avoid processing already visited stmt sets.
16849 (vect_slp_analyze_operations): Use a local cost vector to gather
16850 costs and register those of non-discarded instances.
16851 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
16852 (vect_schedule_slp_instance): Remove copying of
16853 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
16854 zero.
16855 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
16856 adding cost. Record cost entry location.
16857 (vect_prologue_cost_for_slp_op): Function to compute cost of
16858 a constant or invariant generated for SLP vect in the prologue,
16859 split out from vect_analyze_slp_cost_1.
16860 (vect_model_simple_cost): Make static. Adjust for SLP costing.
16861 (vect_model_promotion_demotion_cost): Likewise.
16862 (vect_model_store_cost): Likewise, make static.
16863 (vect_model_load_cost): Likewise.
16864 (vectorizable_bswap): Add cost vector arg and adjust.
16865 (vectorizable_call): Likewise.
16866 (vectorizable_simd_clone_call): Likewise.
16867 (vectorizable_conversion): Likewise.
16868 (vectorizable_assignment): Likewise.
16869 (vectorizable_shift): Likewise.
16870 (vectorizable_operation): Likewise.
16871 (vectorizable_store): Likewise.
16872 (vectorizable_load): Likewise.
16873 (vectorizable_condition): Likewise.
16874 (vectorizable_comparison): Likewise.
16875 (can_vectorize_live_stmts): Likewise.
16876 (vect_analyze_stmt): Likewise.
16877 (vect_transform_stmt): Adjust calls to vectorizable_*.
16878 * tree-vectorizer.c: Include gimple-pretty-print.h.
16879 (dump_stmt_cost): New function.
16880
16881 2018-05-16 Richard Biener <rguenther@suse.de>
16882
16883 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
16884 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
16885 * tree-ssa-dse.c: Include tree-ssa-loop.h.
16886 (check_name): New callback.
16887 (dse_classify_store): Track cycles via a visited bitmap of PHI
16888 defs and simplify handling of in-loop and across loop dead stores
16889 and properly fail for loop-variant refs. Handle byte-tracking with
16890 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
16891 limiting the walk.
16892
16893 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
16894
16895 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
16896 (vect_get_mask_type_for_stmt): Likewise.
16897 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
16898 split out from...
16899 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
16900 to determine the statement's vector type and the vector type that
16901 should be used for calculating nunits. Deal with cases in which
16902 the type has to be deferred.
16903 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
16904 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
16905 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
16906 (vect_determine_vf_for_stmt): New functions, split out from...
16907 (vect_determine_vectorization_factor): ...here.
16908 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
16909 (vect_get_mask_type_for_stmt): New functions, split out from
16910 vect_determine_vectorization_factor.
16911
16912 2018-05-16 Richard Biener <rguenther@suse.de>
16913
16914 * tree-cfg.c (verify_gimple_assign_ternary): Properly
16915 verify the [VEC_]COND_EXPR embedded comparison.
16916
16917 2018-05-15 Martin Sebor <msebor@redhat.com>
16918
16919 PR tree-optimization/85753
16920 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
16921 RECORD_TYPE in addition to ARRAY_TYPE.
16922
16923 2018-05-15 Martin Sebor <msebor@redhat.com>
16924
16925 PR middle-end/85643
16926 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
16927
16928 2018-05-15 Richard Biener <rguenther@suse.de>
16929
16930 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
16931 add by_clobber_p one. Change algorithm to collect all defs
16932 representing uses we need to walk and try reducing them to
16933 a single one before failing.
16934 (dse_dom_walker::dse_optimize_stmt): Adjust.
16935
16936 2018-05-13 Mark Wielaard <mark@klomp.org>
16937
16938 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
16939 (size_of_loc_descr): Likewise.
16940 (output_loc_operands): Likewise.
16941 (output_loc_operands_raw): Likewise.
16942 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
16943 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
16944 (hash_loc_operands): Likewise.
16945 (compare_loc_operands): Likewise.
16946
16947 2018-05-14 Mark Wielaard <mark@klomp.org>
16948
16949 * dwarf2out.c (count_index_addrs): New function.
16950 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
16951
16952 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16953
16954 PR tree-optimization/83648
16955 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
16956 return value as malloc candidate.
16957
16958 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16959
16960 PR ipa/85734
16961 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
16962 param as true in call to suggest_attribute.
16963
16964 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
16965
16966 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
16967 -mreadonly-in-sdata.
16968
16969 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16970
16971 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
16972 New pattern.
16973 (aarch64_crypto_aesd_fused): Likewise.
16974
16975 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
16976
16977 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
16978 (movsi_aarch64): Likewise.
16979 (load_pairsi): Likewise.
16980 (load_pairdi): Likewise.
16981 (store_pairsi): Likewise.
16982 (store_pairdi): Likewise.
16983 (load_pairsf): Likewise.
16984 (load_pairdf): Likewise.
16985 (store_pairsf): Likewise.
16986 (store_pairdf): Likewise.
16987 (zero_extend): Likewise.
16988 (trunc): Swap alternatives.
16989 (fcvt_target): Add '?' to prefer w over r.
16990
16991 2018-05-14 Jakub Jelinek <jakub@redhat.com>
16992
16993 PR target/85756
16994 * config/i386/i386.md: Disallow non-commutative arithmetics in
16995 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
16996 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
16997 in the peephole2 before it.
16998
16999 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
17000
17001 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
17002 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
17003 (ix86_handle_option): Handle -mcldemote.
17004 * config.gcc: New header.
17005 * config/i386/cldemoteintrin.h: New file.
17006 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
17007 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17008 -mcldemote.
17009 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17010 OPTION_MASK_ISA_CLDEMOTE.
17011 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
17012 (ix86_valid_target_attribute_inner_p): Ditto.
17013 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
17014 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
17015 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
17016 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
17017 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
17018 (cldemote): New.
17019 * config/i386/i386.opt: Add -mcldemote.
17020 * config/i386/x86intrin.h: New header.
17021 * doc/invoke.texi: Add -mcldemote.
17022
17023 2018-05-14 Richard Biener <rguenther@suse.de>
17024
17025 * doc/match-and-simplify.texi: Adjust :s documentation.
17026
17027 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
17028
17029 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
17030 intended memcpy size.
17031 (REORDER_45): Likewise.
17032
17033 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
17034
17035 * sort.cc: New file.
17036 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
17037 * vec.c (qsort_chk): Use gcc_qsort.
17038 * Makefile.in (OBJS-libcommon): Add sort.o.
17039 (build/sort.o): New target. Use it...
17040 (BUILD_RTL): ... here, and...
17041 (build/gencfn-macros): ... here, and...
17042 (build/genmatch): ... here.
17043
17044 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17045 Chung-Ju Wu <jasonwucj@gmail.com>
17046
17047 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
17048 * config/nds32/nds32-graywolf.md: New file.
17049 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
17050 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
17051 pipeline.
17052 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
17053 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
17054 * config/nds32/nds32.md (pipeline_model): Add graywolf.
17055 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
17056 * config/nds32/pipelines.md: Include n15 settings.
17057
17058 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17059 Chung-Ju Wu <jasonwucj@gmail.com>
17060
17061 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
17062 * config/nds32/nds32-n13.md: New file.
17063 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
17064 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
17065 pipeline.
17066 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
17067 * config/nds32/nds32.md (pipeline_model): Add n13.
17068 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
17069 * config/nds32/pipelines.md: Include n13 settings.
17070
17071 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17072 Chung-Ju Wu <jasonwucj@gmail.com>
17073
17074 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
17075 * config/nds32/nds32-n10.md: New file.
17076 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
17077 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
17078 pipeline.
17079 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
17080 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
17081 * config/nds32/nds32.md (pipeline_model): Add n10.
17082 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
17083 * config/nds32/pipelines.md: Include n10 settings.
17084
17085 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
17086 Kito Cheng <kito.cheng@gmail.com>
17087 Chung-Ju Wu <jasonwucj@gmail.com>
17088
17089 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
17090 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17091 Add enum values for DSP extension instructions.
17092 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
17093 New constraints.
17094 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
17095 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
17096 New code iterators.
17097 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
17098 * config/nds32/nds32-dspext.md: New file for DSP implementation.
17099 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
17100 * config/nds32/nds32-intrinsic.md: Likewise.
17101 * config/nds32/nds32_intrinsic.h: Likewise.
17102 * config/nds32/nds32-md-auxiliary.c: Likewise.
17103 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
17104 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
17105 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
17106 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
17107 * config/nds32/nds32-protos.h: New declarations for DSP extension.
17108 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
17109 TYPE_DMAC in switch statement.
17110 * config/nds32/nds32.c: New checking and implementation for DSP
17111 extension instructions.
17112 * config/nds32/nds32.h: Likewise.
17113 * config/nds32/nds32.md: Likewise.
17114 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
17115 * config/nds32/predicates.md: Implement new predicates for DSP
17116 extension.
17117
17118 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17119
17120 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
17121 Reformat alternatives and attributes so it is easier to identify
17122 which constraints/attributes go with which instruction.
17123 (mov<mode>_hardfloat32, FMOVE64): Likewise.
17124 (mov<mode>_softfloat32, FMOVE64): Likewise.
17125 (mov<mode>_hardfloat64, FMOVE64): Likewise.
17126 (mov<mode>_softfloat64, FMOVE64): Likewise.
17127
17128 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
17129
17130 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17131 subsection.
17132 (Basic PowerPC Built-in Functions): The new name of the
17133 subsection previously known as "PowerPC Built-in Functions".
17134 (Basic PowerPC Built-in Functions Available on all Configurations):
17135 New subsubsection.
17136 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
17137 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
17138 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
17139 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
17140
17141 2018-05-11 Martin Jambor <mjambor@suse.cz>
17142
17143 PR ipa/85655
17144 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
17145 single const.
17146
17147 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17148
17149 PR target/85733
17150 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
17151
17152 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
17153
17154 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
17155 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
17156 (ix86_handle_option): Handle -mwaitpkg.
17157 * config.gcc: New header.
17158 * config/i386/cpuid.h (bit_WAITPKG): New bit.
17159 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17160 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17161 function type.
17162 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17163 OPTION_MASK_ISA_WAITPKG.
17164 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17165 (ix86_option_override_internal): Add PTA_WAITPKG.
17166 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17167 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17168 IX86_BUILTIN_TPAUSE.
17169 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17170 __builtin_ia32_umwait and __builtin_ia32_tpause.
17171 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17172 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17173 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17174 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17175 UNSPECV_TPAUSE): New.
17176 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17177 * config/i386/i386.opt: Add -mwaitpkg.
17178 * config/i386/waitpkgintrin.h: New file.
17179 * config/i386/x86intrin.h: New header.
17180 * doc/invoke.texi: Add -mwaitpkg.
17181
17182 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17183
17184 PR target/85606
17185 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17186 equivalent.
17187 (cortex-m0): Use armv6s-m isa.
17188 (cortex-m0plus): Likewise.
17189 (cortex-m1): Likewise.
17190 (cortex-m0.small-multiply): Likewise.
17191 (cortex-m0plus.small-multiply): Likewise.
17192 (cortex-m1.small-multiply): Likewise.
17193
17194 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
17195 Jakub Jelinek <jakub@redhat.com>
17196
17197 PR tree-optimization/85692
17198 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17199 source permute as well.
17200
17201 2018-05-11 Martin Liska <mliska@suse.cz>
17202
17203 PR sanitizer/85556
17204 * doc/extend.texi: Document LLVM style format for no_sanitize
17205 attribute.
17206
17207 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17208
17209 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17210 mode_supports_vsx_dform_quad to mode_supports_dq_form.
17211 (mode_supports_vsx_dform_quad): Likewise.
17212 (mode_supports_vmx_dform): Move these functions to be next to the
17213 other mode_supports functions.
17214 (mode_supports_dq_form): Likewise.
17215 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17216 mode_supports_dq_form.
17217 (reg_offset_addressing_ok_p): Likewise.
17218 (offsettable_ok_by_alignment): Likewise.
17219 (rs6000_legitimate_offset_address_p): Likewise.
17220 (legitimate_lo_sum_address_p): Likewise.
17221 (rs6000_legitimize_address): Likewise.
17222 (rs6000_legitimize_reload_address): Likewise.
17223 (rs6000_secondary_reload_inner): Likewise.
17224 (rs6000_preferred_reload_class): Likewise.
17225 (rs6000_output_move_128bit): Likewise.
17226
17227 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17228
17229 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17230 Generate SImode target register for null target.
17231 <case IX86_BUILTIN_XGETBV>: Ditto.
17232 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17233 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17234
17235 2018-05-10 Carl Love <cel@us.ibm.com>
17236
17237 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17238 dcbtt and dcbtstt if operands[2] is 0.
17239
17240 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17241
17242 PR target/85693
17243 * config/i386/sse.md (usadv64qi): New expander.
17244
17245 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
17246
17247 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17248 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17249 -maltivec=be support.
17250 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17251 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17252 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17253 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17254 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17255 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17256 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17257 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17258 altivec_vsumsws): Adjust.
17259 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17260 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17261 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17262 support.
17263 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17264 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17265 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17266 (altivec_lve<VI_char>x): Delete expand.
17267 (*altivec_lve<VI_char>x_internal): Rename to...
17268 (altivec_lve<VI_char>x): ... this.
17269 (altivec_lvxl_<mode>): Delete expand.
17270 (*altivec_lvxl_<mode>_internal): Rename to ...
17271 (altivec_lvxl_<mode>): ... this.
17272 (altivec_stvxl_<mode>): Delete expand.
17273 (*altivec_stvxl_<mode>_internal): Rename to ...
17274 (altivec_stvxl_<mode>): ... this.
17275 (altivec_stve<VI_char>x): Delete expand.
17276 (*altivec_stve<VI_char>x_internal): Rename to ...
17277 (altivec_stve<VI_char>x): ... this.
17278 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17279 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17280 reduc_plus_scal_<mode>): Adjust.
17281 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17282 comment.
17283 (rs6000_cpu_cpp_builtins): Adjust.
17284 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17285 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17286 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17287 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17288 -maltivec=be support.
17289 (rs6000_split_vec_extract_var): Adjust.
17290 (rs6000_split_v4si_init): Adjust.
17291 (swap_selector_for_mode): Delete.
17292 (altivec_expand_lvx_be, altivec_expand_stvx_be,
17293 altivec_expand_stvex_be): Delete.
17294 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17295 -maltivec=be support.
17296 (rs6000_gimple_fold_builtin): Ditto.
17297 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17298 Adjust.
17299 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17300 (TARGET_DIRECT_MOVE_64BIT): Adjust.
17301 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17302 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17303 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17304 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17305 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17306 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17307 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17308 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17309 anonymous split): Adjust.
17310 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17311 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17312
17313 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
17314
17315 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17316 when --with-gxx-include-dir is also specified.
17317 * configure: Regenerate.
17318
17319 2018-05-09 Jim Wilson <jimw@sifive.com>
17320
17321 PR target/84797
17322 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17323 * config/riscv/t-withmultilib: New.
17324 * config/riscv/withmultilib.h: New.
17325 * doc/install.texi: Document RISC-V --with-multilib-list support.
17326
17327 2018-05-09 Richard Biener <rguenther@suse.de>
17328
17329 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17330 vector.
17331 (vect_bb_vectorization_profitable_p): Adjust. Compute
17332 actual scalar cost using the cost vector and the add_stmt_cost
17333 machinery.
17334
17335 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17336
17337 PR rtl-optimization/85645
17338 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17339 in the REG_CFA_REGISTER note for LR, don't leave it empty.
17340
17341 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17342
17343 PR rtl-optimization/85645
17344 * shrink-wrap.c (spread_components): Return a boolean saying if
17345 anything was changed.
17346 (try_shrink_wrapping_separate): Iterate spread_components until
17347 nothing changes anymore.
17348
17349 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17350
17351 PR rtl-optimization/85645
17352 * regrename.c (build_def_use): Also kill the chains that include the
17353 destination of a REG_CFA_REGISTER note.
17354
17355 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17356
17357 PR rtl-optimization/85645
17358 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17359 insn that has a REG_CFA_REGISTER note.
17360
17361 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
17362
17363 * cfgexpand.c (expand_clobber): New function.
17364 (expand_gimple_stmt_1): Use it.
17365 * tree-vect-stmts.c (vect_clobber_variable): New function,
17366 split out from...
17367 (vectorizable_simd_clone_call): ...here.
17368 (vectorizable_store): Emit a clobber either side of an
17369 IFN_STORE_LANES sequence.
17370 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17371
17372 2018-05-09 Tom de Vries <tom@codesourcery.com>
17373
17374 PR target/85626
17375 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17376 (define_insn "trap_if_false"): Add exit after trap.
17377
17378 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
17379
17380 PR rtl-optimization/85638
17381 * bb-reorder.c: Include common/common-target.h.
17382 (create_forwarder_block): New function extracted from...
17383 (fix_up_crossing_landing_pad): ...here. Rename into...
17384 (dw2_fix_up_crossing_landing_pad): ...this.
17385 (sjlj_fix_up_crossing_landing_pad): New function.
17386 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17387 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17388 from both partitions and exit the loop after one iteration.
17389
17390 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17391
17392 Revert:
17393 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17394 subsection.
17395 (Basic PowerPC Built-in Functions): The new name of the
17396 subsection previously known as "PowerPC Built-in Functions".
17397 (Basic PowerPC Built-in Functions Available on all Configurations):
17398 New subsubsection.
17399 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17400 subsubsection.
17401 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17402 subsubsection.
17403 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17404 subsubsection.
17405 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17406 subsubsection.
17407
17408 2018-05-08 Jim Wilson <jimw@sifive.com>
17409
17410 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
17411 (LD_EMUL_SUFFIX): New.
17412 (LINK_SPEC): Use it.
17413
17414 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17415
17416 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17417 subsection.
17418 (Basic PowerPC Built-in Functions): The new name of the
17419 subsection previously known as "PowerPC Built-in Functions".
17420 (Basic PowerPC Built-in Functions Available on all Configurations):
17421 New subsubsection.
17422 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17423 subsubsection.
17424 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17425 subsubsection.
17426 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17427 subsubsection.
17428 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17429 subsubsection.
17430
17431 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17432
17433 PR target/85683
17434 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
17435 after cmpelim optimization.
17436
17437 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
17438
17439 * config.gcc: Support "goldmont".
17440 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
17441 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17442 PROCESSOR_GOLDMONT.
17443 * config/i386/i386.c (m_GOLDMONT): Define.
17444 (processor_target_table): Add "goldmont".
17445 (PTA_GOLDMONT): Define.
17446 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
17447 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
17448 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
17449 (fold_builtin_cpu): Add "goldmont".
17450 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
17451 (ix86_option_override_internal): Add "goldmont".
17452 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
17453 (processor_type): Add PROCESSOR_GOLDMONT.
17454 * config/i386/i386.md: Add CPU "glm".
17455 * config/i386/glm.md: New file.
17456 * config/i386/x86-tune.def: Add m_GOLDMONT.
17457 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
17458
17459 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17460
17461 PR target/85572
17462 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
17463 E_V4DImode.
17464 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
17465 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
17466 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
17467
17468 PR target/85317
17469 * config/i386/i386.c (ix86_fold_builtin): Handle
17470 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
17471
17472 PR target/85480
17473 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
17474 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
17475
17476 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
17477
17478 PR target/85658
17479 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
17480 (check_arch): Likewise.
17481 (check_fpu): Return the result rather than printing it.
17482 (end arch): Fix operator precedence.
17483 (end cpu): Likewise.
17484 (END): Print the result from check_fpu.
17485
17486 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17487 Alan Hayward <alan.hayward@arm.com>
17488 David Sherwood <david.sherwood@arm.com>
17489
17490 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
17491 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
17492 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
17493 (*fcmuo<mode>_and): New patterns.
17494
17495 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17496
17497 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
17498 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
17499 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
17500 (cmp_op, sve_imm_con): New code attributes.
17501 (SVE_COND_INT_CMP, imm_con): Delete.
17502 (cmp_op): Remove above unspecs from int attribute.
17503 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
17504 to...
17505 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
17506 comparison-specific unspecs.
17507 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
17508 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
17509 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
17510 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
17511 (*vec_fcm<cmp_op><mode>): Rename to...
17512 (*fcm<cmp_op><mode>): ...this and adjust likewise.
17513 (*vec_fcmuo<mode>): Rename to...
17514 (*fcmuo<mode>): ...this and adjust likewise.
17515 (*pred_fcm<cmp_op><mode>): New pattern.
17516 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
17517 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
17518 functions.
17519 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
17520 and UNORDERED.
17521 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
17522 (aarch64_emit_sve_predicated_cond): New function.
17523 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
17524 (aarch64_emit_unspec_cond_or): Replace with...
17525 (aarch64_emit_sve_or_conds): ...this new function. Use
17526 aarch64_emit_sve_ptrue_op for the individual comparisons and
17527 aarch64_emit_binop to OR them together.
17528 (aarch64_emit_inverted_unspec_cond): Replace with...
17529 (aarch64_emit_sve_inverted_cond): ...this new function. Use
17530 aarch64_emit_sve_ptrue_op for the comparison and
17531 aarch64_emit_unop to invert the result.
17532 (aarch64_expand_sve_vec_cmp_float): Update after the above
17533 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
17534
17535 2018-05-07 Nathan Sidwell <nathan@acm.org>
17536
17537 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
17538 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
17539 (Backwards Compatibility): Likewise.
17540
17541 2018-05-07 Luis Machado <luis.machado@linaro.org>
17542
17543 PR bootstrap/85681
17544 Revert:
17545 2018-05-07 Luis Machado <luis.machado@linaro.org>
17546
17547 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17548 <prefetch_dynamic_strides>: New const bool field.
17549 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17550 prefetch_dynamic_strides.
17551 (exynosm1_prefetch_tune): Likewise.
17552 (thunderxt88_prefetch_tune): Likewise.
17553 (thunderx_prefetch_tune): Likewise.
17554 (thunderx2t99_prefetch_tune): Likewise.
17555 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17556 to false.
17557 (aarch64_override_options_internal): Update to set
17558 PARAM_PREFETCH_DYNAMIC_STRIDES.
17559 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17560 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17561 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17562 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17563 prefetch-dynamic-strides setting.
17564
17565 2018-05-07 Luis Machado <luis.machado@linaro.org>
17566
17567 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17568 <minimum_stride>: New const int field.
17569 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17570 minimum_stride field.
17571 (exynosm1_prefetch_tune): Likewise.
17572 (thunderxt88_prefetch_tune): Likewise.
17573 (thunderx_prefetch_tune): Likewise.
17574 (thunderx2t99_prefetch_tune): Likewise.
17575 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17576 (aarch64_override_options_internal): Update to set
17577 PARAM_PREFETCH_MINIMUM_STRIDE.
17578 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17579 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17580 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17581 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17582 stride is constant and is below the minimum stride threshold.
17583
17584 2018-05-07 Luis Machado <luis.machado@linaro.org>
17585
17586 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
17587 to 512.
17588
17589 2018-05-07 Luis Machado <luis.machado@linaro.org>
17590
17591 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17592 <prefetch_dynamic_strides>: New const bool field.
17593 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17594 prefetch_dynamic_strides.
17595 (exynosm1_prefetch_tune): Likewise.
17596 (thunderxt88_prefetch_tune): Likewise.
17597 (thunderx_prefetch_tune): Likewise.
17598 (thunderx2t99_prefetch_tune): Likewise.
17599 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17600 to false.
17601 (aarch64_override_options_internal): Update to set
17602 PARAM_PREFETCH_DYNAMIC_STRIDES.
17603 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17604 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17605 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17606 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17607 prefetch-dynamic-strides setting.
17608
17609 2018-05-07 Luis Machado <luis.machado@linaro.org>
17610
17611 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17612 <minimum_stride>: New const int field.
17613 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17614 minimum_stride field.
17615 (exynosm1_prefetch_tune): Likewise.
17616 (thunderxt88_prefetch_tune): Likewise.
17617 (thunderx_prefetch_tune): Likewise.
17618 (thunderx2t99_prefetch_tune): Likewise.
17619 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17620 (aarch64_override_options_internal): Update to set
17621 PARAM_PREFETCH_MINIMUM_STRIDE.
17622 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17623 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17624 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17625 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17626 stride is constant and is below the minimum stride threshold.
17627
17628 2018-05-06 Jakub Jelinek <jakub@redhat.com>
17629
17630 PR c++/85659
17631 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
17632 the type is addressable. Don't force op into register if it has
17633 BLKmode.
17634
17635 2018-05-05 Roland McGrath <mcgrathr@google.com>
17636
17637 PR other/77609
17638 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
17639 any section for which we don't know a specific type it should have,
17640 regardless of name. Previously this was done only for the exact
17641 names ".init_array", ".fini_array", and ".preinit_array".
17642 (default_elf_asm_named_section): Add comment about
17643 relationship with default_section_type_flags and SECTION_NOTYPE.
17644 (get_section): Don't consider it a type conflict if one side has
17645 SECTION_NOTYPE and the other doesn't, as long as neither has the
17646 SECTION_BSS et al used in the default_section_type_flags logic.
17647
17648 2018-05-05 Tom de Vries <tom@codesourcery.com>
17649
17650 PR target/85653
17651 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
17652 (workaround_barsyncs): New function.
17653 (nvptx_reorg): Use workaround_barsyncs.
17654 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17655 (define_expand "nvptx_membar_cta"): New define_expand.
17656 (define_insn "*nvptx_membar_cta"): New insn.
17657
17658 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
17659
17660 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
17661 To improve optimization opportunities.
17662 * builtin-types.def: The new needed builtin types for the above.
17663
17664 2018-05-04 Richard Biener <rguenther@suse.de>
17665
17666 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
17667 * gimple-ssa-store-merging.c
17668 (imm_store_chain_info::output_merged_store): Remove redundant create,
17669 release split_store vector contents on failure.
17670 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
17671 scalar stmt vector on cache hit.
17672
17673 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
17674
17675 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
17676 Xilinx FP support.
17677 * config.gcc (powerpc-xilinx-eabi*): Remove.
17678 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
17679 support.
17680 (fusion_addis_mem_combo_load): Ditto.
17681 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
17682 FP support.
17683 (rs6000_cpu_cpp_builtins): Ditto.
17684 * config/rs6000/rs6000-linux.c
17685 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
17686 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
17687 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
17688 support.
17689 (rs6000_setup_reg_addr_masks): Ditto.
17690 (rs6000_init_hard_regno_mode_ok): Ditto.
17691 (rs6000_option_override_internal): Ditto.
17692 (legitimate_lo_sum_address_p): Ditto.
17693 (rs6000_legitimize_address): Ditto.
17694 (rs6000_legitimize_reload_address): Ditto.
17695 (rs6000_legitimate_address_p): Ditto.
17696 (abi_v4_pass_in_fpr): Ditto.
17697 (setup_incoming_varargs): Ditto.
17698 (rs6000_gimplify_va_arg): Ditto.
17699 (rs6000_split_multireg_move): Ditto.
17700 (rs6000_savres_strategy): Ditto.
17701 (rs6000_emit_prologue_components): Ditto.
17702 (rs6000_emit_epilogue_components): Ditto.
17703 (rs6000_emit_prologue): Ditto.
17704 (rs6000_emit_epilogue): Ditto.
17705 (rs6000_elf_file_end): Ditto.
17706 (rs6000_function_value): Ditto.
17707 (rs6000_libcall_value): Ditto.
17708 * config/rs6000/rs6000.h: Ditto.
17709 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
17710 (TARGET_MINMAX): ... this. New.
17711 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
17712 * config/rs6000/rs6000.md: Remove Xilinx FP support.
17713 (*movsi_internal1_single): Delete.
17714 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
17715 mfpu=, mxilinx-fpu): Delete.
17716 * config/rs6000/singlefp.h: Delete.
17717 * config/rs6000/sysv4.h: Remove Xilinx FP support.
17718 * config/rs6000/t-rs6000: Ditto.
17719 * config/rs6000/t-xilinx: Delete.
17720 * config/rs6000/titan.md: Adjust for fp_type removal.
17721 * config/rs6000/vsx.md: Remove Xilinx FP support.
17722 (VStype_simple): Delete.
17723 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
17724 * config/rs6000/xfpu.h: Delete.
17725 * config/rs6000/xfpu.md: Delete.
17726 * config/rs6000/xilinx.h: Delete.
17727 * config/rs6000/xilinx.opt: Delete.
17728 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
17729 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
17730
17731 2018-05-04 Tom de Vries <tom@codesourcery.com>
17732
17733 PR libgomp/85639
17734 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
17735 if ignore == 0.
17736
17737 2018-05-04 Richard Biener <rguenther@suse.de>
17738
17739 PR middle-end/85627
17740 * tree-complex.c (update_complex_assignment): We are always in SSA form.
17741 (expand_complex_div_wide): Likewise.
17742 (expand_complex_operations_1): Likewise.
17743 (expand_complex_libcall): Preserve EH info of the original stmt.
17744 (tree_lower_complex): Handle removed blocks.
17745 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
17746 on complex multiplication and division libcall builtins.
17747
17748 2018-05-04 Richard Biener <rguenther@suse.de>
17749
17750 PR middle-end/85574
17751 * fold-const.c (negate_expr_p): Restrict negation of operand
17752 zero of a division to when we know that can happen without
17753 overflow.
17754 (fold_negate_expr_1): Likewise.
17755
17756 2018-05-04 Jakub Jelinek <jakub@redhat.com>
17757
17758 PR libstdc++/85466
17759 * real.h (real_nextafter): Declare.
17760 * real.c (real_nextafter): New function.
17761 * fold-const-call.c (fold_const_nextafter): New function.
17762 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
17763 CASE_CFN_NEXTTOWARD.
17764 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
17765 even when arg1_mode is different from arg0_mode.
17766
17767 2018-05-03 Nathan Sidwell <nathan@acm.org>
17768
17769 * doc/extend.texi (Deprecated Features): Remove
17770 -ffriend-injection.
17771 (Backwards Compatibility): Likewise.
17772 * doc/invoke.texi (C++ Language Options): Likewise.
17773 (C++ Dialect Options): Likewise.
17774
17775 2018-05-03 Jakub Jelinek <jakub@redhat.com>
17776
17777 PR target/85530
17778 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
17779 _mm512_mask_mullox_epi64): New intrinsics.
17780
17781 2018-05-03 Tom de Vries <tom@codesourcery.com>
17782
17783 PR testsuite/85106
17784 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17785 dump files): Add offload-tree.
17786
17787 2018-05-03 Richard Biener <rguenther@suse.de>
17788
17789 PR tree-optimization/85615
17790 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
17791 to loops not nested in BBs loop father to avoid creating multi-entry
17792 loops.
17793
17794 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17795
17796 PR tree-optimization/70291
17797 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
17798 arguments. Change return type to tree. Emit libcall as a new
17799 statement rather than replacing existing one when inplace_p is true.
17800 (expand_complex_multiplication_components): New function.
17801 (expand_complex_multiplication): Expand floating-point complex
17802 multiplication using the above.
17803 (expand_complex_division): Rename inner_type parameter to type.
17804 Update expand_complex_libcall call-site.
17805 (expand_complex_operations_1): Update expand_complex_multiplication
17806 and expand_complex_division call-sites.
17807
17808 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17809
17810 PR target/85582
17811 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17812 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17813 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
17814 the highest significant bit of the shift count mask is clear. In
17815 check whether and[sq]i3 is needed verify that all significant bits
17816 of the shift count other than the highest are set.
17817
17818 2018-05-02 Tom de Vries <tom@codesourcery.com>
17819
17820 PR libgomp/82428
17821 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
17822 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
17823 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
17824 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
17825 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
17826 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
17827 __builtin_goacc_parlevel_size.
17828
17829 2018-05-02 Richard Biener <rguenther@suse.de>
17830
17831 PR tree-optimization/85597
17832 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
17833 do not use split vect_get_vec_defs call but call vect_get_slp_defs
17834 directly.
17835
17836 2018-05-02 Tom de Vries <tom@codesourcery.com>
17837
17838 PR testsuite/85106
17839 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17840 dump files): Add ltrans-tree.
17841
17842 2018-05-02 Tom de Vries <tom@codesourcery.com>
17843
17844 PR testsuite/85106
17845 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17846 dump files): Add wpa-ipa.
17847
17848 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
17849
17850 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
17851 powerpc*-*-linux*paired* target.
17852 * config/rs6000/750cl.h: Delete.
17853 * config/rs6000/paired.h: Delete.
17854 * config/rs6000/paired.md: Delete.
17855 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
17856 float support.
17857 * config/rs6000/rs6000-builtin.def: Remove paired float support.
17858 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
17859 comment. Remove paired float support.
17860 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
17861 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
17862 VECTOR_PAIRED.
17863 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
17864 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
17865 declarations.
17866 * config/rs6000/rs6000.c: Remove paired float support.
17867 (paired_expand_vector_init, paired_expand_vector_move,
17868 paired_emit_vector_compare, paired_emit_vector_cond_expr,
17869 (paired_expand_lv_builtin, paired_expand_stv_builtin,
17870 paired_expand_builtin, paired_expand_predicate_builtin,
17871 paired_init_builtins): Delete.
17872 * config/rs6000/rs6000.h: Remove paired float support.
17873 * config/rs6000/rs6000.md: Remove paired float support.
17874 (move_from_CR_ov_bit): Delete.
17875 * config/rs6000/rs6000.opt (mpaired): Delete.
17876 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
17877 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
17878
17879 2018-05-02 Richard Biener <rguenther@suse.de>
17880
17881 PR middle-end/85567
17882 * gimplify.c (gimplify_save_expr): When in SSA form allow
17883 SAVE_EXPRs to compute to SSA vars.
17884
17885 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17886
17887 PR target/85582
17888 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17889 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17890 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
17891 clobber operands[2], instead use a new pseudo. Formatting fixes.
17892
17893 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
17894
17895 PR tree-optimization/85586
17896 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
17897 exit early for statements in the same group if the accesses are
17898 not strided.
17899
17900 2018-05-02 Tom de Vries <tom@codesourcery.com>
17901
17902 PR lto/85451
17903 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
17904 error message.
17905
17906 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
17907
17908 PR tree-optimization/85143
17909 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
17910
17911 2018-05-01 Tom de Vries <tom@codesourcery.com>
17912
17913 PR lto/85451
17914 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
17915 not found" error message.
17916
17917 2018-05-01 Tom de Vries <tom@codesourcery.com>
17918
17919 PR other/83786
17920 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
17921 * vec.c (test_ordered_remove_if): New function.
17922 (vec_c_tests): Call test_ordered_remove_if.
17923 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
17924 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
17925 * tree-vect-patterns.c (vect_pattern_recog_1): Use
17926 VEC_ORDERED_REMOVE_IF.
17927
17928 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17929
17930 PR tree-optimization/82665
17931 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
17932 pointer subtraction where arguments come from a memchr call.
17933
17934 2018-05-01 Jakub Jelinek <jakub@redhat.com>
17935
17936 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
17937 --push-state --as-needed and --pop-state instead of --as-needed and
17938 --no-as-needed if ld supports it.
17939 * configure: Regenerated.
17940
17941 PR web/85578
17942 * doc/install.texi2html: Replace _002d with - and _002a with * in
17943 generated html files using sed.
17944
17945 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17946
17947 PR c++/85523
17948 * gcc-rich-location.c (blank_line_before_p): New function.
17949 (use_new_line): New function.
17950 (gcc_rich_location::add_fixit_insert_formatted): New function.
17951 * gcc-rich-location.h
17952 (gcc_rich_location::add_fixit_insert_formatted): New function.
17953
17954 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17955
17956 * selftest.c (assert_streq): Rename "expected" and "actual" to
17957 "val1" and "val2". Extend NULL-handling to cover both inputs
17958 symmetrically, while still requiring both to be non-NULL for a pass.
17959 * selftest.h (assert_streq): Rename "expected" and "actual" to
17960 "val1" and "val2".
17961 (ASSERT_EQ): Likewise.
17962 (ASSERT_EQ_AT): Likewise.
17963 (ASSERT_KNOWN_EQ): Likewise.
17964 (ASSERT_KNOWN_EQ_AT): Likewise.
17965 (ASSERT_NE): Likewise.
17966 (ASSERT_MAYBE_NE): Likewise.
17967 (ASSERT_MAYBE_NE_AT): Likewise.
17968 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
17969 the assertion to pass.
17970 (ASSERT_STREQ_AT): Likewise.
17971
17972 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
17973
17974 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
17975 interaction with -pie.
17976
17977 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17978
17979 * selftest.h: Fix alphabetization of per-source-file selftest
17980 declarations.
17981
17982 2018-04-30 Jason Merrill <jason@redhat.com>
17983
17984 PR c++/61982 - dead stores to destroyed objects.
17985 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
17986 of clobber.
17987
17988 2018-04-30 Jason Merrill <jason@redhat.com>
17989
17990 * tree.c (build_clobber): New.
17991 * tree.h: Declare it.
17992 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
17993
17994 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17995
17996 * diagnostic-show-locus.c (layout::layout): Update for
17997 location_get_source_line returning a char_span.
17998 (struct char_span): Move to input.h.
17999 (struct correction): Update for fields in char_span becoming
18000 private.
18001 (struct source_line): Update for location_get_source_line
18002 returning a char_span.
18003 (layout::print_line): Likewise.
18004 * edit-context.c (edited_file::print_content): Likewise.
18005 (edited_file::print_diff_hunk): Likewise.
18006 (edited_file::print_run_of_changed_lines): Likewise.
18007 (edited_file::get_num_lines): Likewise.
18008 (edited_line::edited_line): Likewise.
18009 * final.c (asm_show_source): Likewise.
18010 * input.c (location_get_source_line): Convert return type
18011 from const char * to char_span, losing the final "line_len"
18012 param.
18013 (dump_location_info): Update for the above.
18014 (get_substring_ranges_for_loc): Likewise. Use a char_span
18015 when handling the literal within the line.
18016 (test_reading_source_line): Update for location_get_source_line
18017 returning a char_span.
18018 * input.h (class char_span): Move here from
18019 diagnostic-show-locus.c, converting from a struct to a class.
18020 Make data members private.
18021 (char_span::operator bool): New.
18022 (char_span::length): New.
18023 (char_span::get_buffer): New.
18024 (char_span::operator[]): New.
18025 (char_span::subspan): Make const.
18026 (char_span::xstrdup): New.
18027 (location_get_source_line): Convert return type from const char *
18028 to char_span, losing the final "line_size" param.
18029
18030 2018-04-30 Jan Hubicka <jh@suse.cz>
18031
18032 * lto-wrapper.c (ltrans_priorities): New static var.
18033 (cmp_priority): New.
18034 (run_gcc): Read priorities and if doing parallel build order
18035 the Makefile by them.
18036
18037 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18038
18039 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
18040
18041 2018-04-30 Richard Biener <rguenther@suse.de>
18042
18043 * tree-cfg.c (verify_address): Remove base argument, add
18044 flag whether to check TREE_ADDRESSABLE and do that.
18045 (verify_expr): Remove.
18046 (verify_types_in_gimple_reference): Add pieces from verify_expr.
18047 (verify_gimple_assign_single): Likewise.
18048 (verify_gimple_switch): Likewise.
18049 (verify_expr_location_1): Dereference tp once. Add (disabled)
18050 piece from verify_expr.
18051 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
18052
18053 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18054
18055 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
18056
18057 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18058
18059 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
18060 (small_data_pattern): Likewise.
18061 (arc_rewrite_small_data): Likewise.
18062 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
18063 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
18064 (get_symbol_alignment): New function.
18065 (legitimate_small_data_address_p): Likewise.
18066 (legitimate_scaled_address): Update, call
18067 legitimate_small_data_address_p.
18068 (output_sdata): New static variable.
18069 (arc_print_operand): Update how we handle small data operands.
18070 (arc_print_operand_address): Likewise.
18071 (arc_legitimate_address_p): Update, use
18072 legitimate_small_data_address_p.
18073 (arc_rewrite_small_data_p): Remove.
18074 (arc_rewrite_small_data_1): Likewise.
18075 (arc_rewrite_small_data): Likewise.
18076 (small_data_pattern): Likewise.
18077 (compact_sda_memory_operand): Update to use
18078 legitimate_small_data_address_p and get_symbol_alignment.
18079 (prepare_move_operands): Don't rewite sdata pattern.
18080 (prepare_extend_operands): Remove.
18081 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
18082 pattern.
18083 (zero_extendqisi2): Likewise.
18084 (zero_extendhisi2): Likewise.
18085 (extendqihi2): Likewise.
18086 (extendqisi2): Likewise.
18087 (extendhisi2): Likewise.
18088 (addsi3): Likewise.
18089 (subsi3): Likewise.
18090 (andsi3): Likewise.
18091 * config/arc/constraints.md (Usd): Change it to memory constraint.
18092
18093 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18094
18095 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
18096 as source of std instructions.
18097 * config/arc/arc.md (movsi_insn): Update pattern predicate to
18098 allow 6-bit constants as source for store instructions.
18099 (movdi_insn): Update instruction pattern to allow 6-bit constants
18100 as source for store instructions.
18101
18102 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18103
18104 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
18105
18106 2018-04-30 Nathan Sidwell <nathan@acm.org>
18107 Sandra Loosemore <sandra@codesourcery.com>
18108
18109 * dumpfile.c (dump_open): Allow '-' for stdout.
18110 * doc/invoke.texi (Developer Options): Document dump filename
18111 determination early. Document stdin/stdout selection.
18112
18113 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
18114
18115 Microblaze Target: PIC data text relative
18116
18117 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
18118 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
18119 Add declaration.
18120 * config/microblaze/microblaze.h (microblaze_constant_address_p):
18121 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
18122 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
18123 New addressing mode for data-text relative position indepenedent code.
18124 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
18125 'ADDRESS_SYMBOLIC_TXT_REL'.
18126 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
18127 (microblaze_legitimate_pic_operand): Exclude function calls from
18128 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
18129 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
18130 addresses cases.
18131 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18132 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18133 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
18134 for 'address + offset'.
18135 (microblaze_expand_prologue): Add new function prologue call for
18136 'r20' assignation.
18137 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
18138 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
18139 table in case of TARGET_PIC_DATA_TEXT_REL.
18140 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
18141 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
18142 Add new macros 'UNSPEC_TEXT',
18143 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
18144 + exclude function calls from 'UNSPEC_PLT' in case of data text
18145 relative mode.
18146 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18147 new target hook for generating address diff vector tables in case of
18148 flag_pic.
18149 * doc/tm.texi : Regenerate.
18150 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
18151 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
18152 of addr diff vector generation.
18153 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18154 target hook definition.
18155 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
18156 Add default function for generate_pic_addr_diff_vec -> flag_pic.
18157 * doc/invoke.texi (Add new pic option): Add new microblaze pic
18158 option for data text relative.
18159
18160 2018-04-30 Richard Biener <rguenther@suse.de>
18161
18162 * tree-chrec.h (evolution_function_is_constant_p): Remove
18163 redundant check.
18164 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18165
18166 2018-04-30 Richard Biener <rguenther@suse.de>
18167
18168 PR bootstrap/85571
18169 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18170
18171 2018-04-30 Richard Biener <rguenther@suse.de>
18172
18173 PR tree-optimization/28364
18174 PR tree-optimization/85275
18175 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18176 copying first exit test.
18177
18178 2018-04-28 Mark Wielaard <mark@klomp.org>
18179
18180 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18181 dwarf_version >= 5.
18182 (dwarf_AT): Handle DW_AT_addr_base.
18183 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18184
18185 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
18186
18187 PR target/84431
18188 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18189 (*ashl<dwi>3_doubleword_mask_1): Ditto.
18190 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18191 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18192
18193 2018-04-28 Richard Biener <rguenther@suse.de>
18194
18195 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18196 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18197 to reflect use. Only add interesting stmts.
18198
18199 2018-04-27 Martin Jambor <mjambor@suse.cz>
18200
18201 PR ipa/85549
18202 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18203 the jump function allows for passing through aggregate values.
18204
18205 2018-04-27 David Malcolm <dmalcolm@redhat.com>
18206
18207 * input.h (in_system_header_at): Convert from macro to inline
18208 function.
18209 (from_macro_expansion_at): Likewise.
18210 (from_macro_definition_at): Likewise.
18211
18212 2018-04-27 Jeff Law <law@redhat.com>
18213
18214 * config.gcc: Mark tile* targets as deprecated/obsolete.
18215
18216 2018-04-27 Richard Biener <rguenther@suse.de>
18217
18218 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18219 fix for ILP32.
18220
18221 2018-04-27 Richard Biener <rguenther@suse.de>
18222
18223 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18224
18225 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
18226
18227 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18228 with Yd constraint. Set "preferred_for_speed" attribute from
18229 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18230 with Yd constraint.
18231 (*movdi_internal): Ditto.
18232 (movti_interunit splitters): Remove
18233 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18234 (movdi_interunit splitters): Ditto.
18235 * config/i386/constraints.md (Ye): Remove.
18236 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18237
18238 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18239
18240 PR target/85512
18241 * config/aarch64/constraints.md (Usg): Limit to 31.
18242 (Usj): Limit to 63.
18243
18244 2018-04-27 Jakub Jelinek <jakub@redhat.com>
18245
18246 PR tree-optimization/85529
18247 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18248 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18249 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18250 zero extension or masking of the MSB bit.
18251 (optimize_range_tests): Add FIRST_BB argument, pass it through
18252 to optimize_range_tests_var_bound.
18253 (maybe_optimize_range_tests, reassociate_bb): Adjust
18254 optimize_range_tests callers.
18255
18256 2018-04-26 Richard Biener <rguenther@suse.de>
18257 Jakub Jelinek <jakub@redhat.com>
18258
18259 * cgraph.h (symbol_table): Just declare debug method here.
18260 * symtab.c (symbol_table::debug): Define.
18261
18262 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
18263
18264 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18265
18266 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
18267
18268 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18269 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18270 (*movdi_internal): Substitute Yi and Yj constraint with x
18271 and Ym and Yn constraint with y constraint. Update "isa"
18272 attribute and set "preferred_for_speed" attribute from
18273 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18274 (*movsi_internal): Ditto.
18275 (*movdf_internal): Ditto.
18276 (*movsf_internal): Ditto.
18277 (*zero_extendsidi2): Ditto.
18278 * config/i386/sse.md (vec_set<mode>_0): Ditto.
18279 (sse2_loadld): Ditto.
18280 (*vec_extract<ssevecmodelower>_0): Ditto.
18281 (*vec_extractv4si_0_zext_sse4): Ditto.
18282 (vec_concatv2di): Ditto.
18283 (*vec_dup<mode>): Ditto.
18284 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18285 * config/i386/constraints.md (Yi): Remove.
18286 (Yj): Remove.
18287 (Ym): Remove.
18288 (Yn): Remove.
18289
18290 2018-04-26 Nathan Sidwell <nathan@acm.org>
18291
18292 * dumpfile.c (dump_open): New.
18293 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18294 (dump_finish): Detect stdio/stderr by value not name.
18295
18296 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
18297
18298 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18299
18300 2018-04-26 Tom de Vries <tom@codesourcery.com>
18301
18302 PR target/84952
18303 * config/nvptx/nvptx.c (verify_neutering_jumps)
18304 (verify_neutering_labels): New function
18305 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18306
18307 2018-04-26 Tom de Vries <tom@codesourcery.com>
18308
18309 PR target/84025
18310 * config/nvptx/nvptx.c (needs_neutering_p): New function.
18311 (nvptx_single): Use needs_neutering_p to skip over insns that do not
18312 need neutering.
18313
18314 2018-04-26 Richard Biener <rguenther@suse.de>
18315 Tom de Vries <tom@codesourcery.com>
18316
18317 PR lto/85422
18318 * lto-streamer-out.c (output_function): Fixup loops if required to match
18319 discovery done in the reader.
18320
18321 2018-04-26 Richard Biener <rguenther@suse.de>
18322
18323 PR tree-optimization/85116
18324 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18325 have a loop exit from the single latch predecessor. Remove
18326 case of header with just condition.
18327 (ch_base::copy_headers): Exclude infinite loops from any
18328 processing.
18329 (pass_ch::execute): Record exits.
18330
18331 2018-04-26 Richard Biener <rguenther@suse.de>
18332
18333 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18334 prologue cost vector and pass it to vect_get_load_cost.
18335 (vect_get_peeling_costs_all_drs): Likewise.
18336 (vect_peeling_hash_get_lowest_cost): Likewise.
18337 (vect_enhance_data_refs_alignment): Likewise.
18338
18339 2018-04-26 Richard Biener <rguenther@suse.de>
18340
18341 PR middle-end/85450
18342 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18343 checking of integer<->pointer conversions.
18344 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18345 sign-/zero-extending pointer types.
18346 (expand_omp_for_static_chunk): Likewise.
18347
18348 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
18349 Jean Lee <xiaoyur347@gmail.com>
18350
18351 * config/mips/mips.c (mips_asan_shadow_offset): New function.
18352 (TARGET_ASAN_SHADOW_OFFSET): Define.
18353 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18354 true for -fsanitize=address.
18355
18356 2018-04-25 Mark Wielaard <mark@klomp.org>
18357
18358 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18359 shorter ones.
18360
18361 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18362
18363 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18364 than "alu", remove explicit "memory" and "imm_disp" attributes.
18365 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18366
18367 PR middle-end/85414
18368 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18369 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18370 gen_lowpart_no_emit.
18371
18372 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
18373
18374 PR target/85473
18375 * config/i386/i386.c (ix86_expand_builtin): Change memory
18376 operand to XI, extend p0 to Pmode.
18377 * config/i386/i386.md: Change unspec volatile and operand
18378 1 mode to XI, change operand 0 mode to P.
18379
18380 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18381
18382 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18383 GET_MODE_MASK before any checking.
18384 (nds32_can_use_bset_p): Likewise.
18385 (nds32_can_use_btgl_p): Likewise.
18386
18387 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18388
18389 * config/nds32/nds32-doubleword.md: New define_split pattern for
18390 illegal register number.
18391
18392 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18393
18394 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18395
18396 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18397
18398 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18399
18400 2018-04-25 Richard Biener <rguenther@suse.de>
18401
18402 * lto-streamer.h (LTO_major_version): Bump to 8.
18403
18404 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18405
18406 * BASE-VER: Set to 9.0.0.
18407
18408 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
18409
18410 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
18411 in __abskf2 and __powikf2.
18412
18413 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18414
18415 PR target/85512
18416 * config/aarch64/constraints.md (Usg, Usj): New constraints.
18417 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
18418 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
18419 Use the above on operand 2. Reindent.
18420 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
18421
18422 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18423
18424 PR target/85485
18425 * common/config/i386/i386-common.c (ix86_handle_option): Don't
18426 handle OPT_mcet.
18427 * config/i386/i386.opt (mcet): Removed.
18428 * doc/install.texi: Remove -mcet documentation.
18429 * doc/invoke.texi: Likewise.
18430
18431 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18432
18433 PR target/85485
18434 * doc/install.texi: Remove -mcet from bootstrap-cet.
18435
18436 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18437
18438 PR target/85511
18439 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
18440 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
18441 if TARGET_64BIT.
18442
18443 PR target/85503
18444 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
18445 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
18446 containing a CONST_VECTOR.
18447
18448 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
18449
18450 * doc/install.texi: Update newlib dependency for nvptx.
18451
18452 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18453
18454 PR target/85508
18455 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
18456 instead of INTVAL when shifting x left.
18457
18458 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
18459
18460 PR tree-optimization/85478
18461 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
18462 vect_grouped_store_supported for single element vectors.
18463
18464 2018-04-24 Richard Biener <rguenther@suse.de>
18465
18466 PR target/85491
18467 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
18468 load cost increase to the case of non-constant step.
18469
18470 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18471
18472 PR target/84828
18473 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
18474 destination if any_malformed_asm.
18475
18476 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
18477
18478 PR middle-end/85496
18479 * expr.c (store_field): In the bitfield case, if the value comes from
18480 a function call and is returned in registers by means of a PARALLEL,
18481 do not change the mode of the temporary unless BLKmode and VOIDmode.
18482
18483 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
18484
18485 PR rtl-optimization/85423
18486 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
18487 dependencies to debug insns when the previous insn is non-debug.
18488
18489 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18490
18491 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
18492 enums into a single definition.
18493 (fls): Fix predicates and printing.
18494 (seti): Likewise.
18495
18496 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18497
18498 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
18499 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
18500 and short u6 immediate.
18501 (check_if_valid_sleep_operand): Remove.
18502 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
18503
18504 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18505
18506 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
18507 flag_always_save_lp condition.
18508 * config/nds32/nds32.opt (malways-save-lp): New option.
18509
18510 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18511
18512 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
18513 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
18514 * config/nds32/nds32.h
18515 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
18516 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
18517
18518 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18519
18520 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
18521 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
18522
18523 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18524 Chung-Ju Wu <jasonwucj@gmail.com>
18525
18526 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
18527 Declare.
18528 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
18529 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
18530
18531 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18532
18533 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
18534
18535 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18536
18537 * config/nds32/nds32-protos.h (nds32_data_alignment,
18538 nds32_local_alignment): Declare.
18539 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
18540 nds32_local_alignment): New functions.
18541 (TARGET_CONSTANT_ALIGNMENT): Define.
18542 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
18543
18544 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18545
18546 * config/nds32/nds32.c
18547 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
18548 (TARGET_MODES_TIEABLE_P): Likewise.
18549
18550 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18551
18552 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
18553 level Ofast and Og.
18554
18555 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
18556 Chung-Ju Wu <jasonwucj@gmail.com>
18557
18558 * config/nds32/constants.md (unspec_volatile_element): Add enum values
18559 for unaligned access.
18560 * config/nds32/nds32-intrinsic.c: Implementation of expanding
18561 unaligned access.
18562 * config/nds32/nds32-intrinsic.md: Likewise.
18563 * config/nds32/nds32_intrinsic.h: Likewise.
18564 * config/nds32/nds32.h (nds32_builtins): Likewise.
18565 * config/nds32/nds32.opt (munaligned-access): New option.
18566 * config/nds32/nds32.c (nds32_asm_file_start): Display
18567 flag_unaligned_access status.
18568
18569 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18570
18571 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
18572 -mno-relax is present.
18573 * config/riscv/linux.h (LINK_SPEC): Ditto.
18574
18575 2018-04-20 Martin Sebor <msebor@redhat.com>
18576
18577 PR c/85365
18578 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
18579 for null pointers.
18580 (gimple_fold_builtin_stxcpy_chk): Same.
18581 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
18582
18583 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
18584
18585 PR target/85456
18586 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
18587 __powikf2 when long double is IEEE 128-bit.
18588
18589 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18590
18591 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
18592 step to make sure stack always aligned.
18593
18594 2018-04-20 Carl Love <cel@us.ibm.com>
18595
18596 PR target/83402
18597 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
18598 size check for arg0.
18599
18600 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
18601 Tom de Vries <tom@codesourcery.com>
18602
18603 PR target/85445
18604 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
18605 Emit insns for calls too.
18606 (nvptx_find_par): Always look for worker-level predecessor insn.
18607 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
18608 calls.
18609 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
18610 (nvptx_process_pars): Propagate frames for calls.
18611
18612 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
18613
18614 PR target/85469
18615 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
18616 Removed.
18617 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
18618 (ix86_handle_option): Don't handle OPT_mibt.
18619 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
18620 __SHSTK__.
18621 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
18622 has_ibt and ibt.
18623 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
18624 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
18625 (ix86_target_macros): Define __CET__ with flag_cf_protection
18626 for -fcf-protection.
18627 * config/i386/i386.c (isa2_opts): Remove -mibt.
18628 * config/i386/i386.h (TARGET_IBT): Removed.
18629 (TARGET_IBT_P): Likewise.
18630 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
18631 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
18632 * config/i386/i386.opt (mcet): Update help message.
18633 (mshstk): Likewise.
18634 (mibt): Removed.
18635 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
18636 -mcet as an alias for -mshstk.
18637
18638 2018-04-20 Richard Biener <rguenther@suse.de>
18639
18640 PR middle-end/85475
18641 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
18642 complexity by forcing a single use of the multiply operand.
18643
18644 2018-04-20 Martin Jambor <mjambor@suse.cz>
18645
18646 ipa/85449
18647 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
18648 recursion dependency to only apply to non-clones.
18649
18650 2018-04-20 Martin Jambor <mjambor@suse.cz>
18651
18652 ipa/85447
18653 * ipa-cp.c (create_specialized_node): Check that clones of
18654 self-recursive edges exist during IPA-CP.
18655
18656 2018-04-19 Toon Moene <toon@moene.org>
18657
18658 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
18659 by -O3.
18660
18661 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18662
18663 PR tree-optimization/85467
18664 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
18665 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
18666 VECTOR_CST element to type.
18667
18668 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18669
18670 PR target/85397
18671 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
18672 * config/i386/i386.md (builtin_setjmp_setup): Removed.
18673 (builtin_longjmp): Likewise.
18674 (save_stack_nonlocal): New pattern.
18675 (restore_stack_nonlocal): Likewise.
18676
18677 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18678
18679 PR target/85404
18680 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18681 Replace ASM_OUTPUT_LABEL with fprintf.
18682
18683 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18684
18685 PR target/85417
18686 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18687 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
18688 * config/i386/i386-c.c (ix86_target_macros_internal): Also
18689 define __IBT__ and __SHSTK__ for -fcf-protection.
18690 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
18691 TARGET_IBT.
18692 (ix86_trampoline_init): Likewise.
18693 (x86_output_mi_thunk): Likewise.
18694 (ix86_notrack_prefixed_insn_p): Likewise.
18695 (ix86_option_override_internal): Don't disallow -fcf-protection.
18696 * config/i386/i386.md (rdssp<mode>): Also enable for
18697 -fcf-protection.
18698 (incssp<mode>): Likewise.
18699 (nop_endbr): Likewise.
18700 * config/i386/i386.opt (mcet): Change help message to built-in
18701 functions only.
18702 (mibt): Likewise.
18703 (mshstk): Likewise.
18704 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
18705 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
18706 enable CET built-in functions.
18707
18708 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
18709
18710 * common/config/i386/i386-common.c
18711 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
18712 OPTION_MASK_ISA_MOVDIRI_UNSET,
18713 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
18714 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
18715 * config.gcc (movdirintrin.h): New header.
18716 * config/i386/cpuid.h (bit_MOVDIRI,
18717 bit_MOVDIR64B): New bits.
18718 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
18719 and -mmvodir64b.
18720 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
18721 (VOID, PVOID, PCVOID)): New function types.
18722 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
18723 __builtin_ia32_directstoreu_u64,
18724 __builtin_ia32_movdir64b): New builtins.
18725 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
18726 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
18727 and -mmovdiri.
18728 (ix86_valid_target_attribute_inner_p): Ditto.
18729 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
18730 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
18731 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
18732 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
18733 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
18734 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
18735 (movdiri<mode>, movdir64b_<mode>): New.
18736 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
18737 * config/i386/immintrin.h: Include movdirintrin.h.
18738 * config/i386/movdirintrin.h: New file.
18739 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
18740
18741 2018-04-19 Richard Biener <rguenther@suse.de>
18742
18743 PR middle-end/85455
18744 * cfg.c (clear_bb_flags): When loop state says we have
18745 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
18746
18747 2018-04-19 Richard Biener <rguenther@suse.de>
18748
18749 PR tree-optimization/84737
18750 * tree-vect-data-refs.c (vect_copy_ref_info): New function
18751 copying restrict info.
18752 (vect_setup_realignment): Use it.
18753 * tree-vectorizer.h (vect_copy_ref_info): Declare.
18754 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
18755 the first DR to all generated stores.
18756 (vectorizable_load): Likewise for loads.
18757
18758 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18759
18760 PR tree-optimization/85446
18761 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
18762 the integral and pointer types to have the same precision.
18763
18764 * doc/install.texi: Document --disable-cet being the default and
18765 --enable-cet=auto.
18766
18767 2018-04-18 Martin Liska <mliska@suse.cz>
18768
18769 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
18770 style.
18771
18772 2018-04-18 Martin Liska <mliska@suse.cz>
18773
18774 Revert
18775 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
18776
18777 PR ipa/83983
18778 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18779 arguments if they are comparable.
18780
18781 2018-04-18 Martin Liska <mliska@suse.cz>
18782
18783 Revert
18784 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
18785
18786 PR lto/84805
18787 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18788 incomplete types.
18789
18790 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
18791
18792 PR target/85388
18793 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
18794 ENDBR after calling __morestack.
18795
18796 2018-04-18 David Malcolm <dmalcolm@redhat.com>
18797
18798 PR jit/85384
18799 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
18800 by using gcc_base_ver to generate a gcc_driver_version, and use
18801 it when generating GCC_DRIVER_NAME.
18802 * configure: Regenerate.
18803
18804 2018-04-18 Jakub Jelinek <jakub@redhat.com>
18805
18806 PR target/81084
18807 * config.gcc: Obsolete powerpc*-*-*spe*.
18808
18809 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18810
18811 PR debug/84637
18812 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
18813 (stabstr_D): Change type of unum from unsigned int to
18814 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
18815 type.
18816
18817 2018-04-17 Jim Wilson <jimw@sifive.com>
18818
18819 PR 84856
18820 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
18821 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
18822 Set arg_pointer_offset after using pretend_args_size.
18823
18824 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18825
18826 PR rtl-optimization/85431
18827 * dse.c (record_store): Ignore zero width stores.
18828
18829 PR sanitizer/85230
18830 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
18831 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
18832 __builtin_stack_restore rather than after it.
18833 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
18834 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
18835 argument instead of virtual_dynamic_stack_rtx.
18836
18837 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
18838
18839 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
18840 New prototype.
18841 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18842 Add note to error message to explain internal mapping of overloaded
18843 built-in function name to non-overloaded built-in function name.
18844 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
18845 function.
18846
18847 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
18848
18849 PR target/85424
18850 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
18851 where the inputs overlap with the output.
18852
18853 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18854
18855 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
18856 (=v, v) alternative and explicit "memory" attribute.
18857 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
18858 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18859 attributes.
18860 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
18861 "sselog1" type instead of "sselog".
18862 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
18863 "sselog". Remove explicit "memory" attribute.
18864 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
18865 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18866 attributes.
18867 (vec_extract_hi_v32hi): Merge all alternatives into one, use
18868 "sselog1" type instead of "sselog". Remove explicit "memory"
18869 attribute.
18870 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
18871 use "sselog1" type instead of "sselog". Remove explicit "memory"
18872 attribute.
18873 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
18874 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18875 attributes.
18876 (vec_extract_hi_v64qi): Merge all alternatives into one, use
18877 "sselog1" type instead of "sselog". Remove explicit "memory"
18878 attribute.
18879 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
18880 use "sselog1" type instead of "sselog". Remove explicit "memory"
18881 attribute.
18882
18883 PR target/85430
18884 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
18885
18886 PR middle-end/85414
18887 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
18888 on a SUBREG.
18889
18890 2018-04-17 Martin Jambor <mjambor@suse.cz>
18891
18892 PR ipa/85421
18893 * ipa-cp.c (create_specialized_node): Call
18894 expand_all_artificial_thunks if necessary.
18895
18896 2018-04-17 Martin Liska <mliska@suse.cz>
18897
18898 PR lto/85405
18899 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
18900 in message, remote space in between '_G' and '('.
18901
18902 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18903
18904 PR target/85281
18905 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
18906 avx512f_vmcmp<mode>3<round_saeonly_name>,
18907 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
18908 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
18909 avx512f_rndscale<mode><round_saeonly_name>,
18910 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
18911 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
18912 Use %<iptr>2 instead of %2 for -masm=intel.
18913 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
18914 avx512f_vcvttss2usi<round_saeonly_name>,
18915 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
18916 -masm=intel.
18917 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
18918 avx512f_vcvttsd2usi<round_saeonly_name>,
18919 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
18920 Use %q1 instead of %1 for -masm=intel.
18921 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
18922 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
18923 of %3 for -masm=intel.
18924 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
18925 -masm=intel.
18926 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
18927 -masm=intel.
18928 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
18929 -masm=intel.
18930 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
18931 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
18932 %g1.
18933 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
18934 -masm=intel.
18935 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
18936 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
18937 %g1 and one with %0 and %1.
18938 (avx512er_vmrcp28<mode><round_saeonly_name>,
18939 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
18940 %1 for -masm=intel.
18941 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
18942 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
18943 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
18944 of %0 and %{%4%} for -masm=intel.
18945 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
18946 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
18947 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
18948 order of %0 and %{%5%}%{z%} for -masm=intel.
18949
18950 2018-04-17 Jan Hubicka <jh@suse.cz>
18951
18952 PR lto/85405
18953 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
18954
18955 2018-04-17 Martin Liska <mliska@suse.cz>
18956
18957 PR ipa/85329
18958 * multiple_target.c (create_dispatcher_calls): Set apostrophes
18959 for target_clone error message. Make default implementation
18960 clone to be a local declaration.
18961 (separate_attrs): Add new argument and check for an empty
18962 string.
18963 (expand_target_clones): Handle it.
18964 (ipa_target_clone): Make redirection just for target_clones
18965 functions.
18966
18967 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
18968 Tom de Vries <tom@codesourcery.com>
18969
18970 PR middle-end/84955
18971 * omp-expand.c (expand_oacc_for): Add dummy false branch for
18972 tiled basic blocks without omp continue statements.
18973
18974 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
18975
18976 PR target/83660
18977 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
18978 vec_extract expression as having side effects to make sure it gets
18979 a cleanup point.
18980
18981 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
18982
18983 PR target/85403
18984 * config/i386/i386.c (get_builtin_code_for_version): Check
18985 error_mark_node.
18986
18987 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
18988
18989 PR target/84331
18990 * config.gcc: Support "skylake".
18991 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18992 PROCESSOR_SKYLAKE.
18993 * config/i386/i386.c (m_SKYLAKE): Define.
18994 (processor_target_table): Add "skylake".
18995 (ix86_option_override_internal): Add "skylake".
18996 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
18997 PROCESSOR_CANNONLAKE.
18998 (get_builtin_code_for_version): Fix priority for
18999 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
19000 PROCESSOR_SKYLAKE-AVX512.
19001 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
19002 (processor_type): Add PROCESSOR_SKYLAKE.
19003
19004 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
19005 Jason Merrill <jason@redhat.com>
19006
19007 PR c++/85112
19008 * convert.c (convert_to_integer_1): Use direct recursion for
19009 enumeral types and types with a precision less than the number
19010 of bits in their mode.
19011
19012 2018-04-16 Julia Koval <julia.koval@intel.com>
19013
19014 PR target/84413
19015 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
19016 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
19017
19018 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
19019
19020 PR target/85293
19021 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
19022 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
19023 and -mno-direct-move.
19024
19025 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
19026
19027 PR target/83402
19028 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
19029 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
19030 Ensure negative shifts result in {0}.
19031
19032 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
19033
19034 PR rtl-optimization/79916
19035 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
19036 regs (if any) to define how to gnerate SD moves when LRA is in
19037 progress.
19038
19039 2018-04-13 Jakub Jelinek <jakub@redhat.com>
19040
19041 PR rtl-optimization/85393
19042 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
19043 * except.c (expand_dw2_landing_pad_for_region): Make static.
19044 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
19045 a label and unconditional jump to old_bb, rather than
19046 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
19047 basic block.
19048
19049 PR rtl-optimization/85376
19050 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
19051 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
19052 instead of a specific value.
19053
19054 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19055 Bin Cheng <bin.cheng@arm.com>
19056
19057 PR tree-optimization/82965
19058 PR tree-optimization/83991
19059 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
19060 by_profile_only parameter.
19061 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
19062 information if the loop was predicted to iterate too many times.
19063 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
19064
19065 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19066
19067 PR lto/71991
19068 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
19069 always inline.
19070
19071 2018-04-13 Martin Liska <mliska@suse.cz>
19072 Jakub Jelinek <jakub@redhat.com>
19073
19074 PR middle-end/81657
19075 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
19076 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
19077 * builtins.c (expand_builtin_memory_copy_args): Use
19078 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
19079 handle dest_addr == pc_rtx.
19080
19081 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
19082
19083 PR target/85291
19084 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
19085 asked to not generate direct moves.
19086 (fix_trunc<mode>si2_stfiwx): Similar.
19087 (fix_trunc<mode>si2_internal): Similar.
19088
19089 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19090
19091 PR debug/83157
19092 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
19093 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
19094 lookup if dest in some wider mode is known to be const0_rtx and
19095 if so, record permanent equivalence for it to be ZERO_EXTEND of
19096 the narrower mode destination.
19097
19098 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19099
19100 * lto-streamer-out.c (output_function): Revert 259346.
19101 * omp-expand.c (expand_oacc_for): Likewise.
19102
19103 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
19104
19105 PR rtl-optimization/85354
19106 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
19107 * sel-sched.c (sel_global_init): ... here.
19108
19109 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
19110
19111 PR target/85238
19112 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
19113 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
19114 mode for PE-COFF targets.
19115 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
19116 (i386_pe_asm_lto_end): Likewise.
19117 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
19118 (TARGET_ASM_LTO_END): Likewise.
19119 * config/i386/winnt.c (saved_debug_info_level): New static variable.
19120 (i386_pe_asm_lto_start): New function.
19121 (i386_pe_asm_lto_end): Likewise.
19122
19123 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19124 Richard Biener <rguenther@suse.de>
19125
19126 PR middle-end/84955
19127 * lto-streamer-out.c (output_function): Fix CFG loop state before
19128 streaming out.
19129 * omp-expand.c (expand_oacc_for): Handle calls to internal
19130 functions like regular functions.
19131
19132 2018-04-12 Richard Biener <rguenther@suse.de>
19133
19134 PR lto/85371
19135 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
19136 for the early LTO debug to properly generate references to it
19137 during DIE emission. Do not re-use that for the skeleton for
19138 split-dwarf.
19139 (dwarf2out_early_finish): Likewise.
19140
19141 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19142
19143 PR target/85328
19144 * config/i386/sse.md
19145 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
19146 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
19147 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
19148 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
19149 and output is a reg, avoid creating invalid lowpart subreg, but
19150 instead split into a 512-bit move. Don't split if not AVX512VL,
19151 input is xmm16+ reg and output is a mem.
19152 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
19153 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
19154 xmm16+ reg and output is a mem.
19155
19156 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19157
19158 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19159 also for flag_dwarf2_cfi_asm.
19160
19161 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19162
19163 PR rtl-optimization/85342
19164 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19165 a bool scalar var inside of the loop instead. Don't try to update
19166 recog_data.operand after failed apply_change_group.
19167
19168 2018-04-12 Tom de Vries <tom@codesourcery.com>
19169
19170 PR target/85296
19171 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19172 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
19173 array with flexible array member as array without given dimension.
19174 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19175 argument for undefined param to true.
19176
19177 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
19178
19179 PR target/85321
19180 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19181 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19182 from PowerPC section.
19183 * config/rs6000/sysv4.opt (mcall-): Improve help text.
19184 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19185 help text that is too long.
19186 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19187 help text that is too long.
19188 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19189 help text that is too long.
19190
19191 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
19192
19193 * config/alpha/alpha.md (stack_probe_internal): Rename
19194 from "probe_stack". Update all callers.
19195
19196 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19197
19198 PR rtl-optimization/84566
19199 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19200 sched_macro_fuse_insns.
19201
19202 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19203
19204 PR target/84301
19205 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19206 (compute_block_dependences): ... from here.
19207
19208 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19209
19210 PR tree-optimization/85331
19211 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19212 from int to HOST_WIDE_INT.
19213
19214 2018-04-11 Martin Jambor <mjambor@suse.cz>
19215
19216 PR ipa/84149
19217 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19218 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19219 not the same as the source val.
19220 (cgraph_edge_brings_value_p): New parameter.
19221 (gather_edges_for_value): Pass destination value to
19222 cgraph_edge_brings_value_p.
19223 (perhaps_add_new_callers): Likewise.
19224 (get_info_about_necessary_edges): Likewise and exclude values brought
19225 only by self-recursive edges.
19226 (create_specialized_node): Redirect only clones of self-calling edges.
19227 (+self_recursive_pass_through_p): New function.
19228 (find_more_scalar_values_for_callers_subset): Use it.
19229 (find_aggregate_values_for_callers_subset): Likewise.
19230 (known_aggs_to_agg_replacement_list): Removed.
19231 (decide_whether_version_node): Re-calculate known constants for all
19232 remaining context clones.
19233
19234 2018-04-11 Richard Biener <rguenther@suse.de>
19235
19236 PR lto/85339
19237 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19238 from early DWARF output.
19239 (dwarf2out_early_finish): Output line info unconditionally into
19240 early DWARF and add reference to it.
19241
19242 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19243
19244 PR target/85281
19245 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19246 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19247 other than V2DFmode using iptr mode attribute.
19248 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19249
19250 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19251
19252 PR rtl-optimization/84659
19253 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19254
19255 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19256
19257 PR debug/85302
19258 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19259 SIZEP is NULL.
19260 (output_loc_list): Pass address of a dummy size variable even in the
19261 locview handling loop.
19262 (index_location_lists): Add comment on why skip_loc_list_entry can't
19263 call size_of_locs.
19264
19265 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
19266
19267 PR target/85261
19268 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19269 into register.
19270
19271 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
19272
19273 PR target/85321
19274 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19275 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19276 and -mstring-compare-inline-limit.
19277
19278 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19279
19280 PR target/85287
19281 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19282 for stack clash protection in a register whenever we need it to be in
19283 a register.
19284
19285 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19286
19287 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19288 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19289
19290 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19291
19292 PR target/85321
19293 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19294 the help text.
19295 (mlong-double-): Ditto.
19296 * config/rs6000/sysv4.opt (msdata=): Ditto.
19297 (mtls-size=): Ditto.
19298
19299 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19300
19301 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19302 erroneous entries for
19303 "vector int vec_ldl (int, long int *)", and
19304 "vector unsigned int vec_ldl (int, unsigned long int *)".
19305 Add comments and entries for
19306 "vector bool char vec_ldl (int, bool char *)",
19307 "vector bool short vec_ldl (int, bool short *)",
19308 "vector bool int vec_ldl (int, bool int *)",
19309 "vector bool long long vec_ldl (int, bool long long *)",
19310 "vector pixel vec_ldl (int, pixel *)",
19311 "vector long long vec_ldl (int, long long *)",
19312 "vector unsigned long long vec_ldl (int, unsigned long long *)".
19313 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19314 type tree bool_long_long_type_node and correct definition of
19315 bool_V2DI_type_node to make reference to this new type tree.
19316 (rs6000_mangle_type): Replace erroneous reference to
19317 bool_long_type_node with bool_long_long_type_node.
19318 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19319 comments to emphasize sign distinctions for char and int types and
19320 replace RS6000_BTI_bool_long constant with
19321 RS6000_BTI_bool_long_long constant. Also add comment to restrict
19322 use of RS6000_BTI_pixel.
19323 (bool_long_type_node): Remove this macro definition.
19324 (bool_long_long_type_node): New macro definition
19325
19326 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19327
19328 PR rtl-optimization/85300
19329 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19330 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19331 simplify_unary_operation fails.
19332
19333 2018-04-10 Martin Liska <mliska@suse.cz>
19334
19335 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19336 cgraph_edge and ipa_ref.
19337
19338 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19339
19340 PR target/85177
19341 PR target/85255
19342 * config/i386/sse.md
19343 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19344 computation of the VEC_MERGE selector from mask.
19345 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19346 Fix decoding of the VEC_MERGE selector into mask.
19347
19348 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19349
19350 PR tree-optimization/85286
19351 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19352
19353 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19354
19355 * final.c (final_1): Set insn_last_address as well as
19356 insn_current_address.
19357
19358 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19359
19360 PR target/85173
19361 * explow.c (emit_stack_probe): Call validize_mem on memory location
19362 before passing it to gen_probe_stack. Create address operand and
19363 legitimize it for the probe_stack_address case.
19364
19365 2018-04-09 Jan Hubicka <jh@suse.cz>
19366
19367 PR lto/85078
19368 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19369 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19370 * tree.c (free_lang_data_in_type): Fix handling of binfos;
19371 walk basetypes.
19372 (free_lang_data): Rebuild type inheritance graph.
19373
19374 2018-04-09 Martin Sebor <msebor@redhat.com>
19375
19376 * invoke.texi (-finline-small-functions): Mention other optimization
19377 options.
19378 (-findirect-inlining, -fpartial-inlining): Same.
19379 (-finline-functions-called-once): Same.
19380 (-freorder-blocks-and-partition): Same.
19381
19382 2018-04-09 Jan Hubicka <jh@suse.cz>
19383
19384 PR rtl/84058
19385 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19386 jumps; choose last target that matches the criteria (i.e.
19387 no partition changes for non-crossing jumps).
19388 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19389 support for redirecting crossing jumps to non-crossing.
19390
19391 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
19392
19393 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19394 also for naked functions.
19395
19396 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
19397
19398 * config/arc/arc.md (add_shift): New pattern.
19399 (add_shift2): Likewise.
19400 (sub_shift): Likewise.
19401 (sub_shift_cmp0_noout): Likewise.
19402 (compare_si_ashiftsi): Likewise.
19403 (xbfu_cmp0_noout): New combine pattern.
19404 (xbfu_cmp0"): Likewise.
19405 (movsi_set_cc_insn): Place the predicable variant first.
19406 (commutative_binary_cmp0_noout): Remove clobber.
19407 (commutative_binary_cmp0): New pattern.
19408 (noncommutative_binary_cmp0): Likewise.
19409 (noncommutative_binary_cmp0_noout): Likewise.
19410 (noncommutative_binary_comparison_result_used): Removed.
19411 (rsub_cmp0): New pattern.
19412 (rsub_cmp0_noout): Likewise.
19413 (extzvsi): Changed, keep only meaningful variants.
19414 (SQH, SEZ): New iterators.
19415 (SQH_postfix): New mode attribute.
19416 (SEZ_prefix): New code attribute.
19417 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
19418 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
19419 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
19420 of numerical value.
19421 (noncommutative_operator): Check the availability of barrel
19422 shifter option.
19423
19424 2018-04-09 Richard Biener <rguenther@suse.de>
19425
19426 PR tree-optimization/85284
19427 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19428 Only use the niter constraining form of simple_iv when the exit
19429 is always executed.
19430
19431 2018-04-09 Tom de Vries <tom@codesourcery.com>
19432
19433 PR target/84041
19434 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19435 (define_expand "*memory_barrier"): New define_expand.
19436 (define_insn "memory_barrier"): New insn.
19437
19438 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19439
19440 PR rtl-optimization/80463
19441 PR rtl-optimization/83972
19442 PR rtl-optimization/83480
19443
19444 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
19445 correct producer for the insn.
19446 (tidy_control_flow): Fixup seqnos in case of debug insns.
19447
19448 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19449
19450 PR rtl-optimization/83913
19451
19452 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
19453 different sched-times when merging exprs.
19454
19455 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19456
19457 PR rtl-optimization/83962
19458
19459 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
19460 tidy_fallthru_edge and tidy_control_flow.
19461
19462 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19463
19464 PR rtl-optimization/83530
19465
19466 * sel-sched.c (force_next_insn): New global variable.
19467 (remove_insn_for_debug): When force_next_insn is true, also leave only
19468 next insn in the ready list.
19469 (sel_sched_region): When the region wasn't scheduled, make another pass
19470 over it with force_next_insn set to 1.
19471
19472 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19473
19474 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
19475 into tm_file.
19476 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19477 for interrupt control.
19478 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19479 functions for interrupt control.
19480 * config/nds32/nds32-intrinsic.md: Likewise.
19481 * config/nds32/nds32_intrinsic.h: Likewise.
19482 * config/nds32/nds32.h (nds32_builtins): Likewise.
19483
19484 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19485
19486 * config/nds32/nds32.c (nds32_init_machine_status,
19487 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
19488 strict_aligned_p field.
19489 (nds32_expand_to_rtl_hook): New function.
19490 (TARGET_EXPAND_TO_RTL_HOOK): Define.
19491 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
19492
19493 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19494 Chung-Ju Wu <jasonwucj@gmail.com>
19495
19496 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
19497 * config/nds32/nds32-n7.md: New file.
19498 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
19499 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
19500 pipeline.
19501 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
19502 * config/nds32/nds32.md (pipeline_model): Add n7.
19503 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
19504 * config/nds32/pipelines.md: Include n7 settings.
19505
19506 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19507 Chung-Ju Wu <jasonwucj@gmail.com>
19508
19509 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
19510 * config/nds32/nds32-e8.md: New file.
19511 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
19512 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
19513 pipeline.
19514 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
19515 * config/nds32/nds32.md (pipeline_model): Add e8.
19516 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
19517 * config/nds32/pipelines.md: Include e8 settings.
19518
19519 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19520 Chung-Ju Wu <jasonwucj@gmail.com>
19521
19522 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
19523 * config/nds32/nds32-n8.md: New file.
19524 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
19525 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
19526 pipeline.
19527 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
19528 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
19529 * config/nds32/nds32.md (pipeline_model): Add n8.
19530 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
19531 * config/nds32/pipelines.md: Include n8 settings.
19532
19533 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19534 Chung-Ju Wu <jasonwucj@gmail.com>
19535
19536 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
19537 * config/nds32/nds32-n9-2r1w.md: New file.
19538 * config/nds32/nds32-n9-3r2w.md: New file.
19539 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
19540 nds32_register_ports): New or modify for cpu n9.
19541 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
19542 pipeline.
19543 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
19544 * config/nds32/nds32-utils.c: New file.
19545 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
19546 TARGET_MUL_SLOW): Define.
19547 * config/nds32/nds32.md (pipeline_model): New attribute.
19548 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
19549 New options that support cpu n9.
19550 * config/nds32/pipelines.md: Include n9 settings.
19551 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
19552
19553 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19554
19555 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
19556 information if necessary.
19557 (output_cond_branch_compare_zero): Likewise.
19558 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
19559 (nds32_target_alignment): Refine for alignment.
19560 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
19561 (FUNCTION_BOUNDARY): Modify.
19562 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
19563 align case.
19564 * config/nds32/nds32.opt (malways-align, malign-functions): New.
19565
19566 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19567
19568 * config/nds32/constants.md (unspec_volatile_element): Add values for
19569 TLB operation and data prefetch.
19570 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19571 functions for TLB operation and data prefetch.
19572 * config/nds32/nds32-intrinsic.md: Likewise.
19573 * config/nds32/nds32_intrinsic.h: Likewise.
19574 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
19575 (nds32_print_operand): Likewise.
19576 * config/nds32/nds32.h (nds32_builtins): Likewise.
19577
19578 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
19579 Andrew Pinski <pinsika@gcc.gnu.org>
19580
19581 PR middle-end/82976
19582 * match.pd: Use constant_boolean_node of correct type instead of
19583 boolean_true_node or boolean_false_node for simplifying
19584 pointer comparisons to zero.
19585
19586 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19587
19588 PR tree-optimization/80021
19589 * tree.c (verify_type_variant): Make error call in verify_variant_match
19590 translatable and remove final full stop.
19591
19592 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19593
19594 * config/nds32/constants.md (unspec_volatile_element): Add
19595 UNSPEC_VOLATILE_EH_RETURN.
19596 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
19597 nds32_output_stack_pop): Support dwarf exception handling process.
19598 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
19599 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
19600 exception handling process.
19601 (nds32_compute_stack_frame): Likewise.
19602 (nds32_return_addr_rtx): Likewise.
19603 (nds32_initial_elimination_offset): Likewise.
19604 (nds32_expand_prologue): Likewise.
19605 (nds32_expand_epilogue): Likewise.
19606 (nds32_dynamic_chain_address): New function.
19607 * config/nds32/nds32.h (machine_function): Add fields for dwarf
19608 exception handling.
19609 (DYNAMIC_CHAIN_ADDRESS): Define.
19610 (EH_RETURN_DATA_REGNO): Define.
19611 (EH_RETURN_STACKADJ_RTX): Define.
19612 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
19613 patterns for dwarf exception handling.
19614
19615 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19616
19617 * config/nds32/nds32.h: Clean up obsolete macros.
19618
19619 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19620
19621 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19622 Add enum values for particular instructions.
19623 * config/nds32/nds32-intrinsic.c: Implementation of expanding
19624 particular intrinsic functions.
19625 * config/nds32/nds32-intrinsic.md: Likewise.
19626 * config/nds32/nds32_intrinsic.h: Likewise.
19627 * config/nds32/nds32.h (nds32_builtins): Likewise.
19628 * config/nds32/nds32.md (type): Add pbsad and pbsada.
19629 (btst, ave): New patterns for particular instructions.
19630
19631 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19632
19633 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19634 Add enum values for atomic load/store and memory sync.
19635 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
19636 and memory sync.
19637 * config/nds32/nds32-intrinsic.md: Likewise.
19638 * config/nds32/nds32_intrinsic.h: Likewise.
19639 * config/nds32/nds32.h (nds32_builtins): Likewise.
19640
19641 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19642
19643 PR tree-optimization/85257
19644 * fold-const.c (native_encode_vector): If not all elts could fit
19645 and off is -1, return 0 rather than offset.
19646 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
19647 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
19648 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
19649 adjust buffer in native_interpret_expr call.
19650
19651 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19652
19653 * config/nds32/constants.md (unspec_volatile_element): Add cache
19654 control enum values.
19655 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
19656 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
19657 * config/nds32/nds32.c (nds32_cctl_names): New.
19658 (nds32_print_operand): Handle cache control register names.
19659 * config/nds32/nds32.h (nds32_builtins): New enum values.
19660 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
19661 macros.
19662 * config/nds32/nds32.md (type): Add mmu.
19663 * config/nds32/pipelines.md (simple_insn): Add mmu.
19664
19665 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19666
19667 * config/nds32/nds32.md (type): Remove call.
19668 * config/nds32/pipelines.md (simple_insn): Likewise.
19669
19670 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19671
19672 * config/nds32/constants.md (unspec_volatile_element): Add
19673 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
19674 UNSPEC_VOLATILE_FMFCFG.
19675 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
19676 description for fmfcfg and fmfcsr.
19677 (bdesc_1arg): Add fmtcsr.
19678 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
19679 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
19680 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
19681 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
19682 unspec_fmfcfg): New patterns.
19683 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
19684 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
19685 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
19686 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
19687 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
19688 __nds32__fmfcfg): Define.
19689
19690 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19691
19692 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
19693 intrinsic register names.
19694 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
19695 intrinsic register enum values and macros.
19696
19697 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19698
19699 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
19700 for load/store addressing form.
19701 (nds32_print_operand_address): Likewise.
19702
19703 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
19704
19705 PR target/85196
19706 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
19707 based on LABEL_REF. Remove useless assertion.
19708 (pic_address_needs_scratch): Fix formatting.
19709 (sparc_legitimize_pic_address): Minor tweaks.
19710 (sparc_delegitimize_address): Adjust assertion accordingly.
19711 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
19712 into symbolic_operand.
19713 (movsi_high_pic_label_ref): Likewise.
19714 (movsi_lo_sum_pic_label_ref): Likewise.
19715 (movdi_pic_label_ref): Likewise.
19716 (movdi_high_pic_label_ref): Likewise.
19717 (movdi_lo_sum_pic_label_ref): Likewise.
19718
19719 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
19720
19721 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
19722 custom LIB_SPEC setup.
19723
19724 2018-04-06 Ruslan Bukin <br@bsdpad.com>
19725 Kito Cheng <kito.cheng@gmail.com>
19726
19727 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
19728 * config/riscv/freebsd.h: New.
19729
19730 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19731
19732 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
19733 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
19734 file.
19735
19736 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19737 Kito Cheng <kito.cheng@gmail.com>
19738
19739 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
19740 nds32_output_call, nds32_symbol_binds_local_p): New functions.
19741 * config/nds32/nds32-protos.h (nds32_output_call,
19742 nds32_output_return): Declare.
19743 * config/nds32/nds32.md: Refine all the call and return patterns.
19744
19745 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19746
19747 PR debug/85252
19748 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
19749 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
19750
19751 PR rtl-optimization/84872
19752 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
19753 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
19754 EDGE_CROSSING edge.
19755
19756 2018-04-06 Tamar Christina <tamar.christina@arm.com>
19757
19758 * expr.c (copy_blkmode_to_reg): Revert 254862.
19759 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
19760
19761 2018-04-06 Richard Biener <rguenther@suse.de>
19762
19763 PR middle-end/85244
19764 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
19765 after seeing a component reference with an adjacent field. Treat
19766 refs to arrays at struct end of external decls similar to
19767 refs to unconstrained commons.
19768
19769 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19770
19771 PR sanitizer/85213
19772 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
19773 look through SAVE_EXPRs with non-side-effects argument. Adjust
19774 recursive calls.
19775 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
19776 save_p here.
19777
19778 2018-04-06 Richard Biener <rguenther@suse.de>
19779
19780 PR middle-end/85180
19781 * alias.c (find_base_term): New wrapper around find_base_term
19782 unwinding CSELIB_VAL_PTR changes.
19783 (find_base_term): Do not restore CSELIB_VAL_PTR during the
19784 recursion.
19785
19786 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19787
19788 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
19789 instructions.
19790 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
19791 constant definitions.
19792 ("nop"): lr 0,0 -> nopr r0
19793 ("nop_lr0", "nop_lr1"): New insn definitions.
19794
19795 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19796
19797 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
19798 NDS32_V3PUSH_AVAILABLE_P macro.
19799
19800 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
19801 Chung-Ju Wu <jasonwucj@gmail.com>
19802
19803 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
19804 (nds32*-*-*): Add float and fpu_config into supported_defaults.
19805 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
19806 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
19807 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
19808 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
19809 * config/nds32/constraints.md: New constraints and checking for hard
19810 float configuration.
19811 * config/nds32/iterators.md: New mode iterator and attribute for hard
19812 float configuration.
19813 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
19814 patterns.
19815 * config/nds32/nds32-fpu.md: New file.
19816 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
19817 deal with hard float code generation.
19818 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
19819 ARCH_V3S.
19820 (abi_type, float_reg_number): New enum type.
19821 * config/nds32/nds32-predicates.c: New predicates for hard float.
19822 * config/nds32/nds32-protos.h: Declare functions for hard float.
19823 * config/nds32/nds32.c: Implementation for hard float configuration.
19824 * config/nds32/nds32.h: Definitions for hard float configuration.
19825 * config/nds32/nds32.md: Include hard float machine description and
19826 modify patterns for hard float configuration.
19827 * config/nds32/nds32.opt: New options for hard float configuration.
19828 * config/nds32/predicates.md: New predicates for hard float
19829 configuration.
19830
19831 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19832
19833 * common/config/nds32/nds32-common.c
19834 (nds32_option_optimization_table): Enable -mreleax-hint by default.
19835
19836 2018-04-05 Jakub Jelinek <jakub@redhat.com>
19837
19838 PR middle-end/85195
19839 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
19840 CONSTRUCTOR_ELT (ctor, ...)->value.
19841
19842 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
19843
19844 PR target/85193
19845 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
19846
19847 2018-04-05 Tom de Vries <tom@codesourcery.com>
19848
19849 PR target/85204
19850 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
19851 cond jump.
19852
19853 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19854 Kito Cheng <kito.cheng@gmail.com>
19855
19856 * config/nds32/constraints.md (U33): Fine-tune checking condition.
19857 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
19858 * config/nds32/nds32.h (nds32_16bit_address_type): Add
19859 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
19860
19861 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19862 Kito Cheng <kito.cheng@gmail.com>
19863
19864 * config/nds32/constraints.md (Ufe): New memory constraint.
19865 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
19866 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
19867 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
19868 operands.
19869 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
19870 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
19871
19872 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19873
19874 * config/nds32/nds32.md: Use optimize_size in the condition for
19875 alu-shift instructions.
19876
19877 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19878
19879 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
19880
19881 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19882
19883 * config/nds32/nds32.md (negsi2): Refine pattern.
19884
19885 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
19886 Chung-Ju Wu <jasonwucj@gmail.com>
19887
19888 * config/nds32/iterators.md (shift_rotate): New code iterator.
19889 (shift): New code attribute.
19890 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
19891 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
19892 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
19893 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
19894 bit-wise operations.
19895 (andsi3, *andsi3): Ditto.
19896 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
19897 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
19898 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
19899 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
19900 nds32_ior_operand, nds32_xor_operand): New predicates.
19901
19902 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19903
19904 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
19905 (addsi3, subsi3): ... this.
19906
19907 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19908
19909 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
19910
19911 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19912
19913 * config/nds32/nds32.md: Adjust indention.
19914
19915 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
19916
19917 * config/nds32/nds32.md (feature): New attribute.
19918
19919 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19920
19921 * config/nds32/nds32.md (subtype): New attribute.
19922
19923 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
19924
19925 PR target/85203
19926 * config/arm/arm-builtins.c (arm_expand_builtin): Change
19927 expansion to perform a bitwise AND of the argument followed by a
19928 boolean negation of the result.
19929
19930 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
19931
19932 PR rtl-optimization/84878
19933 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
19934 the basic block. Assert the use reference is not artificial and that
19935 it has an associated insn.
19936
19937 2018-04-04 Michael Matz <matz@suse.de>
19938
19939 * builtins.c (compute_objsize): Pass correct operand
19940 to array_at_struct_end_p.
19941
19942 2018-04-04 Richard Biener <rguenther@suse.de>
19943
19944 PR lto/85176
19945 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
19946 from contexts for DINFO_LEVEL_TERSE and below.
19947
19948 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19949
19950 * config/nds32/nds32-doubleword.md (move_<mode>): Require
19951 resiter_operand condition.
19952 * config/nds32/nds32.md (*move<mode>): Ditto.
19953
19954 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19955 Monk Chiang <sh.chiang04@gmail.com>
19956
19957 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
19958
19959 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19960
19961 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
19962
19963 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19964 Kito Cheng <kito.cheng@gmail.com>
19965
19966 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
19967 nds32_cond_code_str, output_cond_branch,
19968 output_cond_branch_compare_zero, nds32_expand_cbranch,
19969 nds32_expand_cstore, nds32_expand_movcc,
19970 nds32_output_cbranchsi4_equality_zero,
19971 nds32_output_cbranchsi4_equality_reg,
19972 nds32_output_cbranchsi4_equality_reg_or_const_int,
19973 nds32_output_cbranchsi4_greater_less_zero: New functions.
19974 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
19975 nds32_expand_cstore, nds32_expand_movcc,
19976 nds32_output_cbranchsi4_equality_zero,
19977 nds32_output_cbranchsi4_equality_reg,
19978 nds32_output_cbranchsi4_equality_reg_or_const_int,
19979 nds32_output_cbranchsi4_greater_less_zero): Declare.
19980 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
19981 nds32_rimm11s_operand): New predicates.
19982 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
19983 * config/nds32/nds32.md: Rewrite all the branch and conditional move
19984 patterns.
19985
19986 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19987
19988 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
19989 * config/nds32/nds32.md: Ditto.
19990 * config/nds32/pipelines.md: Ditto.
19991
19992 2018-04-04 Richard Biener <rguenther@suse.de>
19993
19994 PR tree-optimization/85168
19995 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
19996 propagating abnormals.
19997
19998 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19999
20000 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
20001
20002 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20003 Kito Cheng <kito.cheng@gmail.com>
20004
20005 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
20006 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
20007 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
20008 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
20009 * config/nds32/nds32.md (sibcall_internal): New.
20010 (sibcall_register): Remove.
20011 (sibcall_immediate): Remove.
20012 (sibcall_value_internal): New.
20013 (sibcall_value_register): Remove.
20014 (sibcall_value_immediate): Remove.
20015 * config/nds32/predicates.md (nds32_general_register_operand): New.
20016 (nds32_call_address_operand): New.
20017
20018 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20019
20020 PR rtl-optimization/85167
20021 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
20022 bb_defs if *split_p, instead preinitialize it to NULL.
20023
20024 PR tree-optimization/85156
20025 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
20026 evaluating the argument multiple times.
20027
20028 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
20029
20030 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
20031 than vector.
20032 (_mm_cvtpd_ps): Likewise.
20033 (_mm_cvttpd_epi32): Likewise.
20034 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
20035 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
20036 vector, pixel, and bool following altivec.h include.
20037
20038 2018-04-03 Martin Sebor <msebor@redhat.com>
20039
20040 * doc/extend.texi (Common Function Attributes): Clarify.
20041 (const attribute): Likewise.
20042 (pure attribute): Likewise.
20043
20044 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20045
20046 PR target/85169
20047 * config/i386/i386.c (ix86_expand_vector_set): Use
20048 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
20049
20050 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
20051
20052 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
20053 instructions when changing rounding bits to preserve precision bits
20054 in the x87 control word.
20055
20056 2018-04-03 Martin Liska <mliska@suse.cz>
20057
20058 PR tree-optimization/82491
20059 * rtl.h (strip_offset_and_add): Replace += suboffset with
20060 poly_uint64 () + suboffset.
20061
20062 2018-03-29 Martin Liska <mliska@suse.cz>
20063 Martin Jambor <mjambor@suse.cz>
20064
20065 PR ipa/84947
20066 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
20067 param_type is not an integral or pointer type.
20068
20069 2018-04-03 Richard Biener <rguenther@suse.de>
20070
20071 * sese.h (recompute_all_dominators): Remove.
20072
20073 2018-04-02 Martin Sebor <msebor@redhat.com>
20074
20075 * doc/invoke.texi (-Wrestrict): Fix typos.
20076
20077 2018-04-02 Jim Wilson <jimw@sifive.com>
20078
20079 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
20080 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
20081 (<optab>di3, <optab>si3_extend): Likewise.
20082 (<optab>si3_mask, <optab>si3_mask_1): New.
20083 (<optab>di3_mask, <optab>di3_mask_1): New.
20084 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
20085 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
20086 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
20087
20088 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
20089
20090 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
20091 example.
20092
20093 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
20094
20095 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
20096 (nds32_canonicalize_comparison): New function.
20097
20098 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20099 Kito Cheng <kito.cheng@gmail.com>
20100 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20101
20102 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
20103 * config/nds32/constants.md (unspec_volatile_element): Add
20104 UNSPEC_VOLATILE_RELAX_GROUP.
20105 * config/nds32/nds32-relax-opt.c: New file.
20106 * config/nds32/nds32-predicates.c
20107 (nds32_symbol_load_store_p): New function.
20108 * config/nds32/nds32-protos.h
20109 (nds32_symbol_load_store_p): Declare function.
20110 (make_pass_nds32_relax_opt): Declare new rtl pass function.
20111 * config/nds32/nds32.c
20112 (nds32_register_pass): New function to register pass.
20113 (nds32_register_passes): New function to register passes.
20114 * config/nds32/nds32.md (relax_group): New pattern.
20115 * config/nds32/nds32.opt (mrelax-hint): New option.
20116 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
20117
20118 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
20119
20120 * config/nds32/t-nds32: Modify files dependency.
20121
20122 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20123
20124 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
20125 (PROFILE_HOOK): Define its implementation.
20126
20127 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20128
20129 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
20130 type and 32-bit size.
20131
20132 2018-04-01 Jakub Jelinek <jakub@redhat.com>
20133
20134 PR middle-end/85090
20135 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
20136 (V_128_256): New mode iterator.
20137 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
20138 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
20139 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
20140 of V.
20141 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
20142 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
20143
20144 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
20145
20146 PR target/83315
20147 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
20148 NaN inputs correctly.
20149
20150 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
20151
20152 PR target/80546
20153 * config/rs6000/vsx.md (??r): New mode attribute.
20154 (*vsx_mov<mode>_64bit): Use it.
20155 (*vsx_mov<mode>_32bit): Likewise.
20156
20157 2018-03-30 Martin Sebor <msebor@redhat.com>
20158
20159 PR tree-optimization/84818
20160 * builtins.c (check_access): Use warning_n.
20161
20162 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20163
20164 PR target/83822
20165 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20166 condition.
20167 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20168 condition.
20169
20170 2018-03-30 Julia Koval <julia.koval@intel.com>
20171
20172 PR target/84413
20173 * x86-tune.def (movx, partial_reg_dependency): Enable for
20174 m_SKYLAKE_AVX512.
20175
20176 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
20177
20178 PR inline-asm/84985
20179 * lra-constraints.c (process_alt_operands): Move setting
20180 this_alternative_matches below.
20181
20182 2018-03-29 Martin Liska <mliska@suse.cz>
20183
20184 PR lto/84995.
20185 * doc/invoke.texi: Document how LTO works with debug info.
20186 Describe auto-load support of binutils. Mention 'x86-64'
20187 as valid option value of -march option.
20188
20189 2018-03-29 Jakub Jelinek <jakub@redhat.com>
20190
20191 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20192
20193 PR c/85094
20194 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20195 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20196 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20197 checking.
20198
20199 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20200
20201 PR target/84912
20202 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20203 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20204 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20205 for RS6000_BTM_POWERPC64.
20206 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20207 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20208 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20209 definition.
20210 (DIVDE): Use it.
20211 (DIVDEU): Likewise.
20212
20213 2018-03-28 Carl Love <cel@us.ibm.com>
20214
20215 Revert
20216 2017-09-27 Carl Love <cel@us.ibm.com>
20217
20218 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20219 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20220 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20221 fctiw instruction.
20222
20223 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20224
20225 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20226 instead of __vector bool.
20227 (_mm_max_pu8): Likewise.
20228 (_mm_min_pi16): Likewise.
20229
20230 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20231
20232 PR target/84912
20233 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20234 (DIVWEUO): Likewise.
20235 (DIVDEO): Likewise.
20236 (DIVDEUO): Likewise.
20237 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20238 DIVWEUO and DIVDEUO.
20239 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20240 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20241 (div_extend): Likewise.
20242 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20243 builtin function.
20244 (__builtin_divweuo): Likewise.
20245 (__builtin_divdeo): Likewise.
20246 (__builtin_divdeuo): Likewise.
20247
20248 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20249
20250 PR target/85095
20251 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20252 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20253
20254 PR tree-optimization/82004
20255 * gimple-match-head.c (optimize_pow_to_exp): New function.
20256 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20257 Don't fold to exp if optimize_pow_to_exp is false.
20258
20259 2018-03-28 Martin Liska <mliska@suse.cz>
20260
20261 PR other/84819
20262 * calls.c (initialize_argument_information): Fix trailing space.
20263 * common.opt: Fix typo and provide better explanation for
20264 -fsanitize-coverage option.
20265 * config/i386/i386.opt: Fix typo.
20266
20267 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20268 Martin Liska <mliska@suse.cz>
20269
20270 PR sanitizer/85081
20271 * gimplify.c (asan_poison_variable): Don't do the check for
20272 gimplify_omp_ctxp here.
20273 (gimplify_decl_expr): Do it here.
20274 (gimplify_target_expr): Likewise.
20275
20276 2018-03-28 Martin Liska <mliska@suse.cz>
20277
20278 PR target/84988
20279 * config/i386/i386.c (ix86_function_arg_advance): Do not call
20280 chkp_type_bounds_count if MPX is not enabled.
20281
20282 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
20283
20284 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20285
20286 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
20287
20288 PR target/84914
20289 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20290 function to create the function decl for complex long double
20291 multiply and divide for -mabi=ieeelongdouble.
20292 (init_float128_ieee): Call it.
20293
20294 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
20295
20296 PR target/85044
20297 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20298 -fcf-protection=branch -mibt.
20299 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20300
20301 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20302
20303 PR target/81863
20304 * config/arm/arm.c (arm_valid_symbolic_address): Handle
20305 arm_word_relocations.
20306
20307 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
20308
20309 PR target/85056
20310 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20311 extern array declarations.
20312
20313 2018-03-27 Richard Biener <rguenther@suse.de>
20314
20315 PR middle-end/84067
20316 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20317 explicit single_use checks.
20318
20319 2018-03-27 Richard Biener <rguenther@suse.de>
20320
20321 PR tree-optimization/85082
20322 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20323 Valueize the VUSE.
20324
20325 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20326
20327 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20328 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20329 Turn on fasynchronous-unwind-tables and funwind-tables.
20330
20331 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
20332
20333 PR target/85073
20334 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20335 (*bmi_blsr_<mode>_ccz): Ditto.
20336
20337 2018-03-26 Tom de Vries <tom@codesourcery.com>
20338
20339 PR tree-optimization/85063
20340 * omp-general.c (offloading_function_p): New function. Factor out
20341 of ...
20342 * omp-offload.c (pass_omp_target_link::gate): ... here.
20343 * omp-general.h (offloading_function_p): Declare.
20344 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20345 with attribute omp declare target for offloading functions.
20346
20347 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
20348
20349 PR tree-optimization/84005
20350 * tree-data-ref.h (get_base_for_alignment): Declare.
20351 * tree-data-ref.c (get_base_for_alignment_1): New function.
20352 (get_base_for_alignment): Likewise.
20353 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20354 get_base_for_alignment to find a suitable base object, instead
20355 of always using drb->base_address.
20356
20357 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20358
20359 PR inline-asm/85022
20360 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20361 known size by default.
20362
20363 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
20364
20365 PR inline-asm/85030
20366 * lra-constraints.c (process_alt_operands): Don't match BLKmode
20367 and non BLKmode operands.
20368
20369 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20370
20371 PR target/85026
20372 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20373 Clean up attributes.
20374
20375 2018-03-23 Richard Biener <rguenther@suse.de>
20376
20377 PR debug/85020
20378 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20379 we are going to emit early debug for LTO.
20380
20381 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20382
20383 PR inline-asm/85034
20384 * function.c (match_asm_constraints_1): Don't optimize if input
20385 doesn't satisfy general_operand predicate for output's mode.
20386
20387 PR inline-asm/85022
20388 * alias.c (write_dependence_p): Don't require for x_canonicalized
20389 non-VOIDmode if x has VOIDmode.
20390
20391 PR sanitizer/85029
20392 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20393 just don't try to optimize it rather than assert it never happens.
20394
20395 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20396
20397 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20398 macro expansions for definition of ST_INTERNAL_<mode> and
20399 LD_INTERNAL_<mode> builtins.
20400 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20401 Remove prototype.
20402 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20403 function.
20404 (altivec_expand_st_builtin): Likewise.
20405 (altivec_expand_builtin): Remove calls to deleted functions.
20406 (rs6000_address_for_altivec): Delete this function.
20407 * config/rs6000/vector.md: Remove expands for
20408 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20409
20410 2018-03-22 Sudakshina Das <sudi.das@arm.com>
20411
20412 PR target/84826
20413 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
20414 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
20415 re-computing once computed.
20416 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
20417 (arm_init_machine_status): Initialize
20418 machine->static_chain_stack_bytes.
20419
20420 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20421
20422 PR target/84760
20423 * doc/extend.texi: Add four new prototypes for vec_ld.
20424 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
20425 definitions for more logical presentation.
20426 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
20427 entries for V1TI variants of __builtin_altivec_ld builtin.
20428 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
20429 handling of V1TI variant of LVX icode pattern.
20430 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
20431 (rs6000_gimple_fold_builtin): Likewise.
20432 (altivec_init_builtins): Add code to define
20433 __builtin_altivec_lvx_v1ti function.
20434
20435 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20436
20437 PR inline-asm/84941
20438 * function.c (match_asm_constraints_1): Don't do the optimization
20439 if input isn't a REG, SUBREG, MEM or constant.
20440
20441 2018-03-22 Tom de Vries <tom@codesourcery.com>
20442
20443 PR tree-optimization/84956
20444 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
20445 bb_has_abnormal_pred.
20446
20447 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20448
20449 PR sanitizer/85018
20450 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
20451 DECL_INITIAL (decl) to decl at the end.
20452 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
20453 adjust the comment.
20454
20455 2018-03-21 Joseph Myers <joseph@codesourcery.com>
20456
20457 * doc/extend.texi (__builtin_tgmath): Document when complex
20458 integer types are treated as _Complex _Float64.
20459
20460 2018-03-21 Tom de Vries <tom@codesourcery.com>
20461
20462 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
20463
20464 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20465
20466 PR tree-optimization/84960
20467 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
20468 if it is ENTRY block, move them into single succ of ENTRY in that case.
20469
20470 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
20471
20472 PR tree-optimization/84811
20473 * poly-int.h (poly_span_traits): Remove the T3 parameter and
20474 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
20475 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
20476 (known_subrange_p): Update accordingly. Cast each value involved
20477 in the size comparison, rather than casting the result of the
20478 subtraction.
20479
20480 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20481
20482 PR tree-optimization/84982
20483 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
20484 by flipping the least significant bit rather than all bits from
20485 bitpos to bitpos + bitsize - 1.
20486
20487 2018-03-21 Nathan Sidwell <nathan@acm.org>
20488
20489 * doc/extend.texi (Deprecated Features): Remove mention of
20490 long-deleted deprecations.
20491
20492 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20493
20494 PR jit/84288
20495 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
20496 * configure: Regenerate.
20497
20498 2018-03-21 Tom de Vries <tom@codesourcery.com>
20499
20500 PR tree-optimization/83126
20501 * tree-parloops.c (num_phis): New function.
20502 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
20503
20504 2018-03-21 Nathan Sidwell <nathan@acm.org>
20505
20506 * doc/extend.texi (Deprecated Features): Update deprecated flags,
20507 mention anon-struct/union members and trailing attributes.
20508
20509 2018-03-21 Bin Cheng <bin.cheng@arm.com>
20510
20511 PR tree-optimization/84969
20512 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
20513 builtin memset partitions if they set different rhs values.
20514
20515 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20516
20517 PR rtl-optimization/84989
20518 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
20519 VEC_DUPLICATE with scalar result mode.
20520
20521 2018-03-21 Martin Liska <mliska@suse.cz>
20522
20523 PR ipa/84963
20524 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
20525 not intended return statement.
20526
20527 2018-03-21 Martin Liska <mliska@suse.cz>
20528
20529 PR target/84988
20530 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
20531 (chkp_find_bound_slots_1): Limit number of iterations.
20532
20533 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
20534
20535 PR target/84838
20536 * Minor grammar fixes for x86 options.
20537
20538 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20539
20540 PR debug/84875
20541 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
20542 holding REG_CFA_RESTORE notes, instead turn them into a USE.
20543
20544 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
20545
20546 PR target/83789
20547 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
20548 (altivec_lvx_<mode>_1op): Likewise.
20549 (altivec_stvx_<mode>_2op): Likewise.
20550 (altivec_stvx_<mode>_1op): Likewise.
20551 (altivec_lvx_<VM2:mode>): New define_expand.
20552 (altivec_stvx_<VM2:mode>): Likewise.
20553 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
20554 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20555 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
20556 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20557 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
20558 (rs6000_gen_lvx): Likewise.
20559 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
20560 (altivec_expand_stv_builtin): Likewise.
20561 (altivec_expand_builtin): Likewise.
20562 * config/rs6000/vector.md: Likewise.
20563
20564 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20565
20566 PR target/82518
20567 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
20568 BYTES_BIG_ENDIAN.
20569
20570 2018-03-20 Richard Biener <rguenther@suse.de>
20571
20572 PR target/84986
20573 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
20574 sign-conversions as zero, fall back to standard scalar_stmt
20575 cost for the rest.
20576
20577 2018-03-20 Martin Liska <mliska@suse.cz>
20578
20579 PR ipa/84825
20580 * predict.c (rebuild_frequencies): Handle case when we have
20581 PROFILE_ABSENT, but flag_guess_branch_prob is false.
20582
20583 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20584
20585 PR target/84990
20586 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
20587 flag_section_anchors.
20588 * varasm.c (use_blocks_for_decl_p): Remove hack for
20589 dw2_force_const_mem.
20590
20591 PR target/84845
20592 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
20593 to ...
20594 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
20595 be created, use lowpart_subreg of operands[0] rather than operands[0]
20596 itself.
20597 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
20598 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
20599 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
20600 and n constraint instead of aarch64_shift_imm_di and Usd.
20601 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
20602 (*aarch64_<optab>_reg_minus<mode>3): ... this.
20603
20604 2018-03-20 Sudakshina Das <sudi.das@arm.com>
20605
20606 PR target/82989
20607 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
20608 to favor GPR over NEON registers.
20609 (<shift>di3_neon): Likewise.
20610
20611 2018-03-20 Tom de Vries <tom@codesourcery.com>
20612
20613 PR target/84952
20614 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
20615 (nvptx_process_pars): Emit bar.sync asap and alap.
20616
20617 2018-03-20 Tom de Vries <tom@codesourcery.com>
20618
20619 PR target/84954
20620 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
20621 seen_label if seen_label is already set.
20622
20623 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20624
20625 PR target/84945
20626 * config/i386/i386.c (fold_builtin_cpu): For features above 31
20627 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
20628 Use 1U instead of 1. Formatting fixes.
20629
20630 PR c/84953
20631 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
20632 instead of TREE_TYPE (s1) for the return value.
20633
20634 2018-03-19 Jakub Jelinek <jakub@redhat.com>
20635
20636 PR tree-optimization/84946
20637 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
20638 bitsize + bitsize in poly_uint64 rather than poly_int64.
20639
20640 PR sanitizer/78651
20641 * dwarf2asm.c: Include fold-const.c.
20642 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
20643 of decl rather than decl itself.
20644
20645 PR rtl-optimization/84643
20646 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
20647
20648 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
20649
20650 PR sanitizer/78651
20651 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
20652 calling assemble_variable.
20653
20654 2018-03-19 Sudakshina Das <sudi.das@arm.com>
20655
20656 PR target/81647
20657 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
20658 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
20659
20660 2018-03-19 Jim Wilson <jimw@sifive.com>
20661
20662 PR bootstrap/84856
20663 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
20664 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
20665 (riscv_first_stack_step): Likewise.
20666 (riscv_option_override): Use STACK_BOUNDARY instead of
20667 MIN_STACK_BOUNDARY.
20668 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
20669 MIN_STACK_BOUNDARY.
20670 (BIGGEST_ALIGNMENT): Set to 128.
20671 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
20672 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
20673 STACK_BOUNDARY.
20674
20675 2018-03-19 Richard Biener <rguenther@suse.de>
20676
20677 PR tree-optimization/84933
20678 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
20679 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
20680
20681 2018-03-19 Richard Biener <rguenther@suse.de>
20682
20683 PR tree-optimization/84859
20684 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
20685 (cond_if_else_store_replacement): Perform sinking operation on
20686 single-store BBs regardless of MAX_STORES_TO_SINK setting.
20687 Generalize what a BB with a single eligible store is.
20688
20689 2018-03-19 Richard Biener <rguenther@suse.de>
20690
20691 PR tree-optimization/84929
20692 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
20693 chrec_is_positive against non-chrec arg.
20694
20695 2018-03-19 Tamar Christina <tamar.christina@arm.com>
20696
20697 PR target/84711
20698 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
20699
20700 2018-03-18 Martin Liska <mliska@suse.cz>
20701
20702 PR rtl-optimization/84635
20703 * regrename.c (build_def_use): Use matches_mode only when
20704 matches >= 0.
20705
20706 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
20707
20708 PR tree-optimization/84913
20709 * tree-vect-loop.c (vectorizable_reduction): Don't try to
20710 vectorize chains of COND_EXPRs.
20711
20712 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20713
20714 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
20715
20716 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20717
20718 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
20719
20720 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20721
20722 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
20723
20724 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20725 Kito Cheng <kito.cheng@gmail.com>
20726
20727 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
20728 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
20729 (nds32_adjust_reg_alloc_order): New function.
20730 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
20731
20732 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
20733
20734 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
20735 nds32_print_operand, nds32_print_operand_address): Use
20736 HOST_WIDE_INT_PRINT_DEC instead.
20737
20738 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20739
20740 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
20741
20742 2018-03-17 Jakub Jelinek <jakub@redhat.com>
20743
20744 PR target/84902
20745 * config/i386/i386.c (initial_ix86_tune_features,
20746 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
20747 unsigned long long.
20748 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
20749 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
20750 rather than 1u << ix86_tune. Formatting fix.
20751 (ix86_option_override_internal): Change ix86_arch_mask from
20752 unsigned int to unsigned HOST_WIDE_INT, initialize to
20753 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
20754 (ix86_function_specific_restore): Likewise.
20755
20756 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20757
20758 PR target/84899
20759 * postreload.c (reload_combine_recognize_pattern): Perform
20760 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
20761 truncate_int_for_mode the result for the destination's mode.
20762
20763 PR c/84909
20764 * hsa-gen.c (mem_type_for_type): Fix comment typo.
20765 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
20766 Likewise.
20767 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20768 Likewise.
20769
20770 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
20771
20772 PR target/84876
20773 * lra-assigns.c (lra_split_hard_reg_for): Don't use
20774 regno_allocno_class_array and sorted_pseudos.
20775 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
20776 insns where regno is used.
20777
20778 2018-03-16 Martin Liska <mliska@suse.cz>
20779
20780 PR ipa/84833
20781 * multiple_target.c (create_dispatcher_calls): Redirect
20782 reference in the symbol table.
20783
20784 2018-03-16 Martin Liska <mliska@suse.cz>
20785
20786 PR ipa/84722
20787 * multiple_target.c (create_dispatcher_calls): Redirect also
20788 an alias.
20789
20790 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20791
20792 PR c++/79937
20793 PR c++/82410
20794 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
20795 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
20796 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
20797
20798 2018-03-16 Julia Koval <julia.koval@intel.com>
20799
20800 * doc/invoke.texi (Skylake Server): Add CLWB.
20801 Cannonlake): Remove CLWB.
20802
20803 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20804
20805 PR tree-optimization/84841
20806 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
20807 1 << 3.
20808 (FLOAT_ONE_CONST_TYPE): Define.
20809 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
20810 (sort_by_operand_rank): Put entries with higher constant_type last
20811 rather than first to match comments.
20812
20813 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
20814
20815 * config/nios2/nios2.md (movsi_internal): Fix thinko in
20816 split predicate.
20817
20818 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20819
20820 PR c++/79085
20821 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
20822 check and use address of target always.
20823
20824 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
20825
20826 PR target/84574
20827 * config/i386/i386.c (indirect_thunk_needed): Update comments.
20828 (indirect_thunk_bnd_needed): Likewise.
20829 (indirect_thunks_used): Likewise.
20830 (indirect_thunks_bnd_used): Likewise.
20831 (indirect_return_needed): New.
20832 (indirect_return_bnd_needed): Likewise.
20833 (output_indirect_thunk_function): Add a bool argument for
20834 function return.
20835 (output_indirect_thunk_function): Don't generate alias for
20836 function return thunk.
20837 (ix86_code_end): Call output_indirect_thunk_function to generate
20838 function return thunks.
20839 (ix86_output_function_return): Set indirect_return_bnd_needed
20840 and indirect_return_needed instead of indirect_thunk_bnd_needed
20841 and indirect_thunk_needed.
20842
20843 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
20844
20845 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
20846 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
20847 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
20848
20849 2018-03-15 David Malcolm <dmalcolm@redhat.com>
20850 Paul Hua <paul.hua.gm@gmail.com>
20851
20852 PR c/84852
20853 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
20854
20855 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
20856
20857 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
20858 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
20859 resp. SFmode cases.
20860
20861 2018-03-15 Tamar Christina <tamar.christina@arm.com>
20862
20863 PR target/84711
20864 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
20865 instead of GET_MODE_SIZE when comparing Units.
20866
20867 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
20868
20869 PR target/68256
20870 * varasm.c (hash_section): Return an unchangeble hash value
20871 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
20872 Return !aarch64_can_use_per_function_literal_pools_p ().
20873
20874 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20875
20876 PR target/84860
20877 * optabs.c (emit_conditional_move): Pass address of cmode's copy
20878 rather than address of cmode as last argument to prepare_cmp_insn.
20879
20880 2018-03-15 Julia Koval <julia.koval@intel.com>
20881
20882 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
20883 F_AVX512VNNI, F_AVX512BITALG): New.
20884
20885 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
20886
20887 PR target/83451
20888 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
20889 insn for floating-point loads and stores.
20890
20891 2018-03-14 Carl Love <cel@us.ibm.com>
20892
20893 * config/rs6000/rs6000-c.c: Add macro definitions for
20894 ALTIVEC_BUILTIN_VEC_PERMXOR.
20895 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
20896 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
20897 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
20898 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
20899 UNSPEC_VPERMXOR.
20900 * config/doc/extend.texi: Add prototypes for vec_permxor.
20901
20902 2018-03-14 David Malcolm <dmalcolm@redhat.com>
20903
20904 PR c/84852
20905 * diagnostic-show-locus.c (class layout_point): Convert m_line
20906 from int to linenum_type.
20907 (line_span::comparator): Use linenum "compare" function when
20908 comparing line numbers.
20909 (test_line_span): New function.
20910 (layout_range::contains_point): Convert param "row" from int to
20911 linenum_type.
20912 (layout_range::intersects_line_p): Likewise.
20913 (layout::will_show_line_p): Likewise.
20914 (layout::print_source_line): Likewise.
20915 (layout::should_print_annotation_line_p): Likewise.
20916 (layout::print_annotation_line): Likewise.
20917 (layout::print_leading_fixits): Likewise.
20918 (layout::annotation_line_showed_range_p): Likewise.
20919 (struct line_corrections): Likewise for field m_row.
20920 (line_corrections::line_corrections): Likewise for param "row".
20921 (layout::print_trailing_fixits): Likewise.
20922 (layout::get_state_at_point): Likewise.
20923 (layout::get_x_bound_for_row): Likewise.
20924 (layout::print_line): Likewise.
20925 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
20926 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
20927 * input.c (selftest::test_linenum_comparisons): New function.
20928 (selftest::input_c_tests): Call it.
20929 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
20930 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
20931 * selftest.h (ASSERT_GT): New macro.
20932 (ASSERT_GT_AT): New macro.
20933 (ASSERT_LT): New macro.
20934 (ASSERT_LT_AT): New macro.
20935
20936 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
20937
20938 PR rtl-optimization/84780
20939 * combine.c (distribute_links): Don't make a link based on pc_rtx.
20940
20941 2018-03-14 Martin Liska <mliska@suse.cz>
20942
20943 * tree.c (record_node_allocation_statistics): Use
20944 get_stats_node_kind.
20945 (get_stats_node_kind): New function extracted from
20946 record_node_allocation_statistics.
20947 (free_node): Use get_stats_node_kind.
20948
20949 2018-03-14 Richard Biener <rguenther@suse.de>
20950
20951 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
20952 that the value-set of ANTIC_IN doesn't grow.
20953
20954 Revert
20955 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20956 member.
20957 (BB_VISITED_WITH_VISITED_SUCCS): New define.
20958 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20959
20960 2018-03-14 Julia Koval <julia.koval@intel.com>
20961
20962 * config.gcc (icelake-client, icelake-server): New.
20963 (icelake): Remove.
20964 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
20965 (initial_ix86_arch_features): Ditto.
20966 (PTA_SKYLAKE): Add SGX.
20967 (PTA_ICELAKE): Remove.
20968 (PTA_ICELAKE_CLIENT): New.
20969 (PTA_ICELAKE_SERVER): New.
20970 (ix86_option_override_internal): Split up icelake on icelake client and
20971 icelake server.
20972 (get_builtin_code_for_version): Ditto.
20973 (fold_builtin_cpu): Ditto.
20974 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
20975 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
20976 * config/i386/i386.h (processor_type): Ditto.
20977 * doc/invoke.texi: Ditto.
20978
20979 2018-03-14 Jakub Jelinek <jakub@redhat.com>
20980
20981 PR sanitizer/83392
20982 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
20983 INTEGER_CST offset, add it together with bitpos / 8 and
20984 sign extend based on POINTER_SIZE.
20985
20986 PR target/84844
20987 Revert
20988 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
20989
20990 PR target/78090
20991 * config/i386/constraints.md (Yc): New register constraint.
20992 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
20993 Use Yc constraint for alternative 2 of operand 0. Remove
20994 preferred_for_speed attribute.
20995
20996 2018-03-14 Richard Biener <rguenther@suse.de>
20997
20998 PR tree-optimization/84830
20999 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
21000 with the old one to avoid oscillations.
21001
21002 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
21003
21004 PR target/83712
21005 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
21006 pseudos.
21007 (assign_by_spills): Return a flag of reload assignment failure.
21008 Do not process the reload assignment failures. Do not spill other
21009 reload pseudos if they has the same reg class. Update n if
21010 necessary.
21011 (lra_assign): Add a return arg. Set up from the result of
21012 assign_by_spills call.
21013 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21014 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21015 usage_insns if it is not NULL.
21016 (spill_hard_reg_in_range): New function.
21017 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21018 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21019 function prototypes.
21020 (lra_assign): Change prototype.
21021 * lra.c (lra): Add code to deal with fails by splitting hard reg
21022 live ranges.
21023
21024 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
21025
21026 * config/riscv/riscv.opt (mrelax): New option.
21027 * config/riscv/riscv.c (riscv_file_start): Emit ".option
21028 "norelax" when riscv_mrelax is disabled.
21029 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
21030
21031 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21032
21033 PR target/84743
21034 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
21035 reassociation for int modes.
21036
21037 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21038
21039 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
21040 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
21041 for big-endian.
21042 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
21043 * config/aarch64/aarch64-sve.md
21044 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
21045 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
21046 (*extend<mode><Vwide>2): Rename to...
21047 (aarch64_sve_extend<mode><Vwide>2): ...this.
21048 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
21049 renaming the old pattern to...
21050 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
21051 unsigned packs.
21052 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
21053 define_expand, renaming the old pattern to...
21054 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
21055 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
21056 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
21057 account when deciding which SVE instruction the optab should use.
21058 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
21059
21060 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21061
21062 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
21063 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
21064 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
21065 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
21066 (tlsdesc_small_<mode>): Turn a define_expand and use
21067 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
21068 (tlsdesc_small_advsimd_<mode>): ...this.
21069 (tlsdesc_small_sve_<mode>): New pattern.
21070
21071 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21072
21073 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
21074 (UNSPEC_UMUL_HIGHPART): New constants.
21075 (MUL_HIGHPART): New int iteraor.
21076 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
21077 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
21078 define_expand.
21079 (*<su>mul<mode>3_highpart): New define_insn.
21080
21081 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21082
21083 PR lto/84805
21084 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21085 incomplete types.
21086
21087 2018-03-13 Martin Liska <mliska@suse.cz>
21088
21089 PR ipa/84658.
21090 * (sem_item_optimizer::sem_item_optimizer): Initialize new
21091 vector.
21092 (sem_item_optimizer::~sem_item_optimizer): Release it.
21093 (sem_item_optimizer::merge_classes): Register variable aliases.
21094 (sem_item_optimizer::fixup_pt_set): New function.
21095 (sem_item_optimizer::fixup_points_to_sets): Likewise.
21096 * ipa-icf.h: Declare new variables and functions.
21097
21098 2018-03-13 Jakub Jelinek <jakub@redhat.com>
21099
21100 PR middle-end/84834
21101 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
21102 integer_pow2p@2 and test integer_pow2p in condition.
21103 (A < 0 ? C : 0): Similarly for @1.
21104
21105 PR middle-end/84831
21106 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
21107 characters starting at p contain '\0' character, don't look beyond
21108 that.
21109
21110 PR target/84827
21111 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
21112 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
21113
21114 PR target/84828
21115 * reg-stack.c (change_stack): Change update_end var from int to
21116 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
21117 also call set_block_for_insn on the newly added insns and rescan.
21118
21119 PR target/84786
21120 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
21121 on the last operand.
21122
21123 PR c++/84704
21124 * tree.c (stabilize_reference_1): Return save_expr (e) for
21125 STATEMENT_LIST even if it doesn't have side-effects.
21126
21127 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
21128
21129 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
21130
21131 2018-03-12 Renlin Li <renlin.li@arm.com>
21132
21133 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
21134 aarch64_output_scalar_simd_mov_immediate.
21135
21136 2018-03-12 Martin Sebor <msebor@redhat.com>
21137
21138 PR tree-optimization/83456
21139 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
21140 for perfectly overlapping calls to memcpy.
21141 (gimple_fold_builtin_memory_chk): Same.
21142 (gimple_fold_builtin_strcpy): Handle no-warning.
21143 (gimple_fold_builtin_stxcpy_chk): Same.
21144 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
21145
21146 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21147
21148 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
21149 parameter. Use it for SFmode.
21150 (rs6000_function_arg_advance_1): Adjust.
21151 (rs6000_function_arg): Adjust.
21152 (rs6000_gimplify_va_arg): Pass false for that new parameter.
21153
21154 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21155
21156 PR rtl-optimization/84169
21157 PR rtl-optimization/84780
21158 * combine.c (can_combine_p): Check for a 2-insn combination whether
21159 the destination register is used between the two insns, too.
21160
21161 2018-03-12 Richard Biener <rguenther@suse.de>
21162
21163 PR tree-optimization/84803
21164 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21165 for refs DR analysis didn't process.
21166
21167 2018-03-12 Richard Biener <rguenther@suse.de>
21168
21169 PR tree-optimization/84777
21170 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21171 force-vectorize loops ignore whether we are optimizing for size.
21172
21173 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
21174
21175 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21176 (TARGET_MD_ASM_ADJUST): Define.
21177
21178 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
21179 Kito Cheng <kito.cheng@gmail.com>
21180 Chung-Ju Wu <jasonwucj@gmail.com>
21181
21182 * config/nds32/nds32.c (nds32_compute_stack_frame,
21183 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21184 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21185 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21186 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21187 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21188 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21189 * config/nds32/nds32.md (prologue, epilogue): Use macro
21190 NDS32_V3PUSH_AVAILABLE_P to do checking.
21191
21192 2018-03-11 Jakub Jelinek <jakub@redhat.com>
21193
21194 PR debug/58150
21195 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21196 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21197 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
21198 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
21199 addition of most attributes on !orig_type_die or the attribute not
21200 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21201
21202 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21203 Chung-Ju Wu <jasonwucj@gmail.com>
21204
21205 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21206 __NDS32_VH__ macro.
21207 * config/nds32/nds32.opt (mvh): New option.
21208
21209 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21210 Chung-Ju Wu <jasonwucj@gmail.com>
21211
21212 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21213 function.
21214 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21215 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21216 definition.
21217
21218 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21219 Chung-Ju Wu <jasonwucj@gmail.com>
21220
21221 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21222 function.
21223 * config/nds32/nds32-multiple.md (strlensi): New pattern.
21224 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21225
21226 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
21227 Kito Cheng <kito.cheng@gmail.com>
21228 Chung-Ju Wu <jasonwucj@gmail.com>
21229
21230 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21231 UNSPEC_FFMISM and UNSPEC_FLMISM.
21232 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21233 for ffb, ffmism and flmism.
21234 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21235 (unspec_ffmism): Ditto.
21236 (unspec_flmism): Ditto.
21237 (nds32_expand_builtin_impl): Check if string extension is available.
21238 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21239 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21240
21241 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
21242
21243 Reverting patch:
21244 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21245
21246 PR target/83712
21247 * lra-assigns.c (assign_by_spills): Return a flag of reload
21248 assignment failure. Do not process the reload assignment
21249 failures. Do not spill other reload pseudos if they has the same
21250 reg class.
21251 (lra_assign): Add a return arg. Set up from the result of
21252 assign_by_spills call.
21253 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21254 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21255 usage_insns if it is not NULL.
21256 (spill_hard_reg_in_range): New function.
21257 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21258 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21259 function prototypes.
21260 (lra_assign): Change prototype.
21261 * lra.c (lra): Add code to deal with fails by splitting hard reg
21262 live ranges.
21263
21264 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
21265
21266 PR target/84807
21267 * config/i386/i386.opt: Replace Enforcment with Enforcement.
21268
21269 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
21270
21271 PR debug/84620
21272 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21273 (dw_val_node): Add val_symbolic_view.
21274 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21275 (symview_upper_bound): New.
21276 (new_line_info_table): Initialize symviews_since_reset.
21277 (dwarf2out_source_line): Count symviews_since_reset and set
21278 symview_upper_bound.
21279 (dw_val_equal_p): Handle symview.
21280 (add_AT_symview): New.
21281 (print_dw_val): Handle symview.
21282 (attr_checksum, attr_checksum_ordered): Likewise.
21283 (same_dw_val_p, size_of_die): Likewise.
21284 (value_format, output_die): Likewise.
21285 (add_high_low_attributes): Use add_AT_symview for entry_view.
21286 (dwarf2out_finish): Reset symview_upper_bound, clear
21287 zero_view_p.
21288
21289 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
21290
21291 PR target/83969
21292 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21293 Add strict argument and use it.
21294 (rs6000_split_multireg_move): Update for new strict argument.
21295 (mem_operand_gpr): Disallow all non-offsettable addresses.
21296 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21297
21298 2018-03-09 Jakub Jelinek <jakub@redhat.com>
21299
21300 PR target/84772
21301 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21302 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21303 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21304
21305 PR c++/84767
21306 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21307 decl, use remap_type if we want to use the type.
21308
21309 2018-03-09 Martin Sebor <msebor@redhat.com>
21310
21311 PR tree-optimization/84526
21312 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21313 Remove dead code.
21314 (builtin_access::generic_overlap): Be prepared to handle non-array
21315 base objects.
21316
21317 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
21318
21319 PR rtl-optimization/84682
21320 * lra-constraints.c (process_address_1): Check is_address flag
21321 for address constraints.
21322 (process_alt_operands): Likewise.
21323 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21324 preprocess_constraints.
21325 * recog.h (preprocess_constraints): Add oploc parameter.
21326 Adjust callers.
21327 * recog.c (preprocess_constraints): Test address_operand for
21328 CT_ADDRESS constraints.
21329
21330 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21331
21332 PR target/83712
21333 * lra-assigns.c (assign_by_spills): Return a flag of reload
21334 assignment failure. Do not process the reload assignment
21335 failures. Do not spill other reload pseudos if they has the same
21336 reg class.
21337 (lra_assign): Add a return arg. Set up from the result of
21338 assign_by_spills call.
21339 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21340 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21341 usage_insns if it is not NULL.
21342 (spill_hard_reg_in_range): New function.
21343 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21344 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21345 function prototypes.
21346 (lra_assign): Change prototype.
21347 * lra.c (lra): Add code to deal with fails by splitting hard reg
21348 live ranges.
21349
21350 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21351
21352 PR target/83193
21353 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21354 Accept complain bool parameter. Only emit errors if it is true.
21355 (arm_parse_cpu_option_name): Likewise.
21356 (arm_target_thumb_only): Adjust callers of the above.
21357 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21358 prototype to take a default true bool parameter.
21359 (arm_parse_arch_option_name): Likewise.
21360
21361 2018-03-09 David Malcolm <dmalcolm@redhat.com>
21362 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
21363
21364 PR jit/64089
21365 PR jit/84288
21366 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21367 * configure: Regenerate.
21368 * configure.ac ("linker --version-script option"): New.
21369 ("linker soname option"): New.
21370
21371 2018-03-09 Richard Biener <rguenther@suse.de>
21372
21373 PR tree-optimization/84775
21374 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21375 immediate uses of predicate stmts and mark them modified.
21376
21377 Revert
21378 PR tree-optimization/84178
21379 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21380 to caller.
21381 (version_loop_for_if_conversion): Delay update_ssa call.
21382 (tree_if_conversion): Delay update_ssa until after predicate
21383 insertion.
21384
21385 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
21386
21387 PR target/84763
21388 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21389 when the function accesses prior frames.
21390
21391 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21392
21393 PR debug/84456
21394 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21395 gen_llsym, otherwise call maybe_gen_llsym.
21396
21397 PR inline-asm/84742
21398 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21399 has ',' character inside of it.
21400
21401 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21402
21403 PR target/84748
21404 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21405 as clobbering CC_REGNUM.
21406
21407 2018-03-08 Richard Biener <rguenther@suse.de>
21408
21409 PR middle-end/84552
21410 * tree-scalar-evolution.c: Include tree-into-ssa.h.
21411 (follow_copies_to_constant): Do not follow SSA names registered
21412 for update.
21413
21414 2018-03-08 Richard Biener <rguenther@suse.de>
21415
21416 PR tree-optimization/84178
21417 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21418 to caller.
21419 (version_loop_for_if_conversion): Delay update_ssa call.
21420 (tree_if_conversion): Delay update_ssa until after predicate
21421 insertion.
21422
21423 2018-03-08 David Malcolm <dmalcolm@redhat.com>
21424
21425 PR tree-optimization/84178
21426 * tree-if-conv.c (release_bb_predicate): Remove the
21427 the assertion that the stmts have NULL use_ops.
21428 Discard the statements, asserting that they haven't
21429 yet been added to a BB.
21430
21431 2018-03-08 Richard Biener <rguenther@suse.de>
21432
21433 PR tree-optimization/84746
21434 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
21435 (phi_translate): Pass in destination ANTIC_OUT set.
21436 (phi_translate_1): Likewise. For a simplified result lookup
21437 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
21438 (phi_translate_set): Adjust.
21439 (do_pre_regular_insertion): Likewise.
21440 (do_pre_partial_partial_insertion): Likewise.
21441
21442 2018-03-08 Martin Liska <mliska@suse.cz>
21443
21444 PR gcov-profile/84735
21445 * doc/gcov.texi: Document usage of profile files.
21446 * gcov-io.h: Document changes in the format.
21447
21448 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
21449
21450 PR debug/84404
21451 PR debug/84408
21452 * dwarf2out.c (struct dw_line_info_table): Update comments for
21453 view == -1.
21454 (FORCE_RESET_NEXT_VIEW): New.
21455 (FORCE_RESETTING_VIEW_P): New.
21456 (RESETTING_VIEW_P): Check for -1 too.
21457 (ZERO_VIEW_P): Likewise.
21458 (new_line_info_table): Force-reset next view.
21459 (dwarf2out_begin_function): Likewise.
21460 (dwarf2out_source_line): Simplify zero_view_p initialization.
21461 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
21462 view directly. Omit view when omitting .loc at line 0.
21463
21464 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21465
21466 PR tree-optimization/84740
21467 * tree-switch-conversion.c (process_switch): Call build_constructors
21468 only if info.phi_count is non-zero.
21469
21470 PR tree-optimization/84739
21471 * tree-tailcall.c (find_tail_calls): Check call arguments against
21472 DECL_ARGUMENTS (current_function_decl) rather than
21473 DECL_ARGUMENTS (func) when checking for tail recursion.
21474
21475 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21476
21477 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
21478 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
21479 Volker Reichelt's entry and add entries for people that perform
21480 GCC fuzzy testing and report numerous bugs.
21481
21482 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
21483
21484 PR target/82411
21485 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
21486 readonly data in sdata, if that is disabled.
21487 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
21488 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
21489 -mreadonly-in-sdata option.
21490
21491 2018-03-07 Martin Sebor <msebor@redhat.com>
21492
21493 PR tree-optimization/84468
21494 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
21495 basic block when looking for nul assignment.
21496
21497 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
21498
21499 PR target/84277
21500 * except.h (output_function_exception_table): Adjust prototype.
21501 * except.c (output_function_exception_table): Remove FNNAME parameter
21502 and add SECTION parameter. Ouput one part of the table at a time.
21503 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
21504 the first part of the exception table and emit unwind directives.
21505 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
21506 (i386_pe_seh_cold_init): Likewise.
21507 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
21508 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
21509 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
21510 (ix86_output_call_insn): Emit a nop in one more case for SEH.
21511 * config/i386/winnt.c: Include except.h.
21512 (struct seh_frame_state): Add reg_offset, after_prologue and
21513 in_cold_section fields.
21514 (i386_pe_seh_end_prologue): Set seh->after_prologue.
21515 (i386_pe_seh_cold_init): New function.
21516 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
21517 to seh->in_cold_section.
21518 (seh_emit_push): Record the offset of the push.
21519 (seh_emit_save): Record the offet of the save.
21520 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
21521 Test seh->after_prologue to disregard the epilogue.
21522 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
21523 (i386_pe_end_cold_function): New function.
21524
21525 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21526
21527 PR fortran/84565
21528 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
21529 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
21530
21531 PR c++/84704
21532 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
21533 on tmp_var.
21534 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
21535 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
21536
21537 PR middle-end/84723
21538 * multiple_target.c: Include tree-inline.h and intl.h.
21539 (expand_target_clones): Diagnose and fail if node->definition and
21540 !tree_versionable_function_p (node->decl).
21541
21542 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
21543
21544 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
21545 sprint_ul.
21546 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
21547 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
21548 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
21549
21550 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21551
21552 PR target/84710
21553 * combine.c (try_combine): Use reg_or_subregno instead of handling
21554 just paradoxical SUBREGs and REGs.
21555
21556 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
21557
21558 * config/arc/arc.c (arc_finalize_pic): Remove function.
21559 (arc_must_save_register): We use single base PIC register, remove
21560 checks to save/restore the PIC register.
21561 (arc_expand_prologue): Likewise.
21562 * config/arc/arc-protos.h (arc_set_default_type_attributes):
21563 Remove.
21564 (arc_verify_short): Likewise.
21565 (arc_attr_type): Likewise.
21566 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
21567 (walk_stores): Likewise.
21568 (arc_address_cost): Make it static.
21569 (arc_verify_short): Likewise.
21570 (branch_dest): Likewise.
21571 (arc_attr_type): Likewise.
21572 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
21573 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
21574 (arc_final_prescan_insn): Remove inserting the nops due to
21575 hardware hazards. It is done in reorg step.
21576 (insn_length_variant_t): Remove.
21577 (insn_length_parameters_t): Likewise.
21578 (arc_insn_length_parameters): Likewise.
21579 (arc_get_insn_variants): Likewise.
21580 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
21581
21582 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21583
21584 PR inline-asm/84683
21585 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
21586 assertion failure.
21587
21588 PR tree-optimization/84687
21589 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
21590 on new_node->decl.
21591 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
21592
21593 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21594
21595 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
21596 Rename to ppc_speculation_barrier.
21597 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
21598 __builtin_ppc_speculation_barrier.
21599
21600 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21601
21602 PR target/84700
21603 * combine.c (combine_simplify_rtx): Don't try to simplify if
21604 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
21605 are equal to x.
21606
21607 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
21608
21609 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
21610 to 32 bytes when compiling for POWER9.
21611
21612 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21613
21614 PR target/84564
21615 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
21616 regparm >= 3 with no arg reg available also for calls with
21617 flag_force_indirect_call. Pass decl to ix86_function_regparm.
21618
21619 PR target/84524
21620 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
21621 orig,vex.
21622 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
21623
21624 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
21625
21626 PR target/84264
21627 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
21628
21629 2018-03-05 Richard Biener <rguenther@suse.de>
21630
21631 PR tree-optimization/84486
21632 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
21633 When inserting a __builtin_assume_aligned call set the LHS
21634 SSA name alignment info accordingly.
21635
21636 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
21637
21638 PR tree-optimization/84114
21639 * config/aarch64/aarch64.c (aarch64_reassociation_width)
21640 Avoid reassociation of FLOAT_MODE addition.
21641
21642 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
21643
21644 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
21645 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
21646 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
21647 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
21648 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
21649 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
21650 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
21651 and -mwbnoinvd.
21652 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
21653 __builtin_ia32_wbinvd): New builtins.
21654 (SPECIAL_ARGS2): New.
21655 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
21656 (SPECIAL_ARGS2): New.
21657 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
21658 (ix86_valid_target_attribute_inner_p): Ditto.
21659 (ix86_init_mmx_sse_builtins): Add special_args2.
21660 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
21661 TARGET_WBNOINVD_P): New.
21662 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
21663 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
21664 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
21665 * config/i386/immintrin.h (_wbinvd): New intrinsic.
21666 * config/i386/pconfigintrin.h: New file.
21667 * config/i386/wbnoinvdintrin.h: Ditto.
21668 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
21669 wbnoinvdintrin.h.
21670 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
21671
21672 2018-03-05 Richard Biener <rguenther@suse.de>
21673
21674 PR tree-optimization/84670
21675 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21676 member.
21677 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21678 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21679 (compute_antic_aux): Only assert the number of values in ANTIC_IN
21680 doesn't grow if all successors (recursively) were visited at least
21681 once.
21682
21683 2018-03-05 Richard Biener <rguenther@suse.de>
21684
21685 PR tree-optimization/84650
21686 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
21687 if executed in the loop pipeline.
21688
21689 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
21690
21691 * doc/configfiles.texi (Configuration Files): Move info about
21692 conditionalizing $target-protos.h to...
21693 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
21694 differs from $target-protos.h.
21695
21696 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
21697 Chung-Ju Wu <jasonwucj@gmail.com>
21698
21699 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
21700 * config/nds32/nds32-multiple.md (setmemsi): Define.
21701 * config/nds32/nds32-memory-manipulation.c
21702 (nds32_gen_dup_4_byte_to_word_value): New.
21703 (emit_setmem_word_loop): New.
21704 (emit_setmem_byte_loop): New.
21705 (nds32_expand_setmem_loop): New.
21706 (nds32_expand_setmem_loop_v3m): New.
21707 (nds32_expand_setmem_unroll): New.
21708 (nds32_expand_setmem): New.
21709
21710 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21711 Chung-Ju Wu <jasonwucj@gmail.com>
21712
21713 * config/nds32/nds32-memory-manipulation.c
21714 (nds32_emit_load_store): New.
21715 (nds32_emit_post_inc_load_store): New.
21716 (nds32_emit_mem_move): New.
21717 (nds32_emit_mem_move_block): New.
21718 (nds32_expand_movmemsi_loop_unknown_size): New.
21719 (nds32_expand_movmemsi_loop_known_size): New.
21720 (nds32_expand_movmemsi_loop): New.
21721 (nds32_expand_movmemsi_unroll): New.
21722 (nds32_expand_movmemqi): Rename ...
21723 (nds32_expand_movmemsi): ... to this.
21724 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
21725 (movmemsi): ... to this.
21726 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
21727 (nds32_expand_movmemsi): ... to this.
21728
21729 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21730 Monk Chiang <sh.chiang04@gmail.com>
21731 Chung-Ju Wu <jasonwucj@gmail.com>
21732
21733 * config/nds32/nds32-protos.h
21734 (nds32_expand_load_multiple): New arguments.
21735 (nds32_expand_store_multiple): Ditto.
21736 (nds32_valid_multiple_load_store): Rename ...
21737 (nds32_valid_multiple_load_store_p): ... to this.
21738 * config/nds32/nds32-memory-manipulation.c
21739 (nds32_expand_load_multiple): Refine implementation.
21740 (nds32_expand_store_multiple): Ditto.
21741 * config/nds32/nds32-multiple.md
21742 (load_multiple): Update nds32_expand_load_multiple interface.
21743 (store_multiple): Update nds32_expand_store_multiple interface.
21744 * config/nds32/nds32-predicates.c
21745 (nds32_valid_multiple_load_store): Rename ...
21746 (nds32_valid_multiple_load_store_p): ... to this and refine
21747 implementation.
21748 * config/nds32/predicates.md
21749 (nds32_load_multiple_and_update_address_operation): New predicate.
21750 (nds32_store_multiple_and_update_address_operation): New predicate.
21751
21752 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21753 Chung-Ju Wu <jasonwucj@gmail.com>
21754
21755 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
21756 (combo): New attribute.
21757 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
21758
21759 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
21760
21761 * config/nds32/nds32.opt: Change -mcmodel= default value.
21762
21763 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
21764 Monk Chiang <sh.chiang04@gmail.com>
21765 Chung-Ju Wu <jasonwucj@gmail.com>
21766
21767 * config/nds32/constants.md (unspec_element): New enum.
21768 * config/nds32/constraints.md (Umw): New constraint.
21769 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
21770 * config/nds32/nds32-intrinsic.md: Likewise.
21771 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
21772 (nds32_valid_smw_lwm_base_p): New.
21773 (nds32_output_smw_single_word): New.
21774 (nds32_output_lmw_single_word): New.
21775 (nds32_expand_unaligned_load): New.
21776 (nds32_expand_unaligned_store): New.
21777 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
21778 (nds32_output_smw_single_word): Declare.
21779 (nds32_output_lmw_single_word): Declare.
21780 (nds32_expand_unaligned_load): Declare.
21781 (nds32_expand_unaligned_store): Declare.
21782 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
21783 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
21784 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
21785 NDS32_BUILTIN_UASTORE_DW.
21786 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
21787 predicate.
21788
21789 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
21790 Kito Cheng <kito.cheng@gmail.com>
21791 Chung-Ju Wu <jasonwucj@gmail.com>
21792
21793 * config/nds32/nds32-intrinsic.c
21794 (nds32_expand_builtin_null_ftype_reg): Delete.
21795 (nds32_expand_builtin_reg_ftype_imm): Ditto.
21796 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
21797 (nds32_read_argument): New.
21798 (nds32_legitimize_target): Ditto.
21799 (nds32_legitimize_argument): Ditto.
21800 (nds32_check_constant_argument): Ditto.
21801 (nds32_expand_unop_builtin): Ditto.
21802 (nds32_expand_unopimm_builtin): Ditto.
21803 (nds32_expand_binop_builtin): Ditto.
21804 (nds32_builtin_decl_impl): Ditto.
21805 (builtin_description): Ditto.
21806 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
21807 (nds32_init_builtins_impl): Ditto.
21808 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
21809 (nds32_builtin_decl): New.
21810 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
21811 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
21812
21813 2018-03-02 Jeff Law <law@redhat.com>
21814
21815 * reorg.c (stop_search_p): Handle DEBUG_INSN.
21816 (redundant_insn, fill_simple_delay_slots): Likewise.
21817 (fill_slots_from_thread): Likewise.
21818 * resource.c (mark_referenced_resources): Likewise.
21819 (mark_set_resources, find_dead_or_set_registers): Likewise.
21820
21821 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21822
21823 * substring-locations.h (format_warning_va): Formatting fix for
21824 ATTRIBUTE_GCC_DIAG.
21825 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
21826 argument.
21827 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
21828 * substring-locations.c: Include intl.h.
21829 (format_warning_va): Turned into small wrapper around
21830 format_warning_n_va, renamed to ...
21831 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
21832 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
21833 use ngettext.
21834 (format_warning_at_substring_n): New function.
21835 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
21836 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
21837 format_warning_at_substring with just a shorter name instead of
21838 const function pointer.
21839 (fmtwarn_n): New function.
21840 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
21841 appropriate, get rid of all the fmtstr temporaries, move conditionals
21842 with G_() wrapped string literals directly into fmtwarn arguments,
21843 cast dir.len to (int), formatting fixes.
21844
21845 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
21846
21847 * doc/invoke.texi: Remove "Cilk Plus" references.
21848
21849 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21850 Richard Biener <rguenther@suse.de>
21851
21852 PR ipa/84628
21853 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
21854 for error or warning attributes if CALL_FROM_THUNK_P is set.
21855 Formatting fixes.
21856
21857 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21858
21859 PR target/56540
21860 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
21861 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
21862
21863 PR target/56540
21864 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
21865 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
21866
21867 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
21868 instead of -1U in last predictors element's probability member.
21869
21870 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
21871
21872 PR ipa/83983
21873 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21874 arguments if they are comparable.
21875
21876 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
21877
21878 PR tree-optimization/84634
21879 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
21880 masks and masked_loop_p with a single loop_masks, making sure it's
21881 null for bb vectorization.
21882
21883 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
21884
21885 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
21886 (vect_analyze_data_ref_access): Use loop->safe_len rather than
21887 loop->force_vectorize to check whether there is no alias.
21888
21889 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21890
21891 PR target/84614
21892 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
21893 prototypes.
21894 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
21895 comments.
21896 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
21897 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
21898 instead of a loop around prev_real_insn.
21899 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
21900 prev_real_insn.
21901
21902 PR inline-asm/84625
21903 * config/i386/i386.c (ix86_print_operand): Use conditional
21904 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
21905 zero vector.
21906
21907 2018-03-02 Richard Biener <rguenther@suse.de>
21908
21909 PR tree-optimization/84427
21910 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
21911 (bitmap_set_subtract_values): Rewrite to handle multiple
21912 exprs per value.
21913 (clean): Likewise.
21914 (prune_clobbered_mems): Likewise.
21915 (phi_translate): Take edge instead of pred/phiblock.
21916 (phi_translate_1): Likewise.
21917 (phi_translate_set): Likewise. Insert all translated
21918 exprs for a value into the set, keeping possibly multiple
21919 expressions per value.
21920 (compute_antic_aux): Adjust for phi_translate changes.
21921 When intersecting union the expressions and prune those
21922 not in the final value set, keeping possibly multiple
21923 expressions per value. Do not use value-insertion
21924 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
21925 all expressions. Add verification that the value-sets
21926 only shrink during iteration.
21927 (compute_partial_antic_aux): Adjust for the phi_translate changes.
21928 (do_pre_regular_insertion): Likewise.
21929 (do_pre_partial_partial_insertion): Likewise.
21930
21931 2018-03-02 Richard Biener <rguenther@suse.de>
21932
21933 PR target/82005
21934 * config/darwin.c (saved_debug_info_level): New static global.
21935 (darwin_asm_lto_start): Disable debug info generation for LTO out.
21936 (darwin_asm_lto_end): Restore debug info generation settings.
21937
21938 2018-03-01 Martin Liska <mliska@suse.cz>
21939
21940 PR sanitizer/82484
21941 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
21942 volatile arguments.
21943
21944 2018-03-01 Richard Biener <rguenther@suse.de>
21945
21946 PR debug/84645
21947 * dwarf2out.c (gen_variable_die): Properly handle late VLA
21948 type annotation with LTO when debug was disabled at compile-time.
21949
21950 2018-03-01 Matthew Fortune <mfortune@gmail.com>
21951
21952 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
21953 XINT with INTVAL.
21954 (mips_final_postscan_insn): Likewise.
21955
21956 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
21957
21958 PR rtl-optimization/84528
21959 * alias.c (init_alias_target): Add commentary.
21960 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
21961 a unique base value if the frame pointer is not eliminated
21962 to the stack pointer.
21963
21964 2018-03-01 Tom de Vries <tom@codesourcery.com>
21965
21966 PR rtl-optimization/83327
21967 * lra-int.h (hard_regs_spilled_into): Declare.
21968 * lra.c (hard_regs_spilled_into): Define.
21969 (init_reg_info): Init hard_regs_spilled_into.
21970 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
21971 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
21972 (process_bb_lives): Handle hard_regs_spilled_into.
21973 (lra_create_live_ranges_1): Before doing liveness propagation, clear
21974 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
21975
21976 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
21977
21978 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
21979 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
21980 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
21981 * config/rs6000/aix72.h: New file.
21982
21983 2018-02-28 Jakub Jelinek <jakub@redhat.com>
21984
21985 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
21986 instead of warning_at with conditional singular and plural messages
21987 where possible.
21988
21989 PR target/52991
21990 * stor-layout.c (update_alignment_for_field): For
21991 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
21992 && !DECL_PACKED (field), do the alignment update, just use
21993 only desired_align instead of MAX (type_align, desired_align)
21994 as the alignment.
21995 (place_field): Don't do known_align < desired_align handling
21996 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
21997 is non-NULL, instead do it after rli->prev_field handling and
21998 only if not within a bitfield word. For DECL_PACKED (field)
21999 use type_align of BITS_PER_UNIT.
22000
22001 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
22002
22003 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
22004 superfluous parentheses and trailing spaces.
22005
22006 2018-02-28 Richard Biener <rguenther@suse.de>
22007
22008 PR tree-optimization/84584
22009 * graphite-scop-detection.c (scop_detection::add_scop): Discard
22010 SCoPs with fake exit edge.
22011
22012 2018-02-28 Martin Liska <mliska@suse.cz>
22013
22014 PR testsuite/84597
22015 * timevar.c (timer::print): Fix format to properly print 100%
22016 values.
22017
22018 2018-02-28 Richard Biener <rguenther@suse.de>
22019
22020 PR middle-end/84607
22021 * genmatch.c (capture_info::walk_match): Do not mark
22022 captured expressions without operands as expr_p given
22023 they act more like predicates and should be subject to
22024 "lost tail" side-effect preserving.
22025
22026 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
22027
22028 PR rtl-optimization/81611
22029 * auto-inc-dec.c (attempt_change): Move dead note from
22030 mem_insn if it's the next use of regno
22031 (find_address): Take address use of reg holding
22032 non-incremented value. Add parm to limit search to the named
22033 reg only.
22034 (merge_in_block): Attempt to use a mem insn that is the next
22035 use of the original regno.
22036
22037 2018-02-27 Martin Sebor <msebor@redhat.com>
22038
22039 PR c++/83871
22040 * doc/invoke.texi (-Wmissing-attributes): New option.
22041 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
22042
22043 2018-02-27 Martin Sebor <msebor@redhat.com>
22044
22045 PR translation/84207
22046 * diagnostic-core.h (warning_n, error_n, inform_n): Change
22047 n argument to unsigned HOST_WIDE_INT.
22048 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
22049 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
22050 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
22051 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
22052
22053 2018-02-27 Richard Biener <rguenther@suse.de>
22054
22055 PR tree-optimization/84512
22056 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
22057 Do not use the estimate returned from record_stmt_cost for
22058 the scalar iteration cost but sum properly using add_stmt_cost.
22059
22060 2018-02-27 Richard Biener <rguenther@suse.de>
22061
22062 PR tree-optimization/84466
22063 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22064 Adjust last change to less strictly validate use operands.
22065
22066 2018-02-27 Martin Liska <mliska@suse.cz>
22067
22068 PR gcov-profile/84548
22069 * gcov.c (process_file): Allow partial overlap and consider it
22070 also as group functions.
22071 (output_lines): Properly calculate range of lines for a group.
22072
22073 2018-02-27 Martin Liska <mliska@suse.cz>
22074
22075 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
22076 'ggc' suffixes. Change first column width.
22077 (timer::print): Fix formatting of the column.
22078
22079 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
22080
22081 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
22082 preserve inline entry blocks for the sake of debug inline
22083 entry point markers alone.
22084 (remove_unused_locals): Suggest in comments a better place to
22085 force the preservation of inline entry blocks that are
22086 otherwise unused, but do not preserve them.
22087
22088 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22089
22090 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
22091
22092 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22093
22094 PR target/84039
22095 * config/i386/constraints.md (Bs): Replace
22096 ix86_indirect_branch_register with
22097 TARGET_INDIRECT_BRANCH_REGISTER.
22098 (Bw): Likewise.
22099 * config/i386/i386.md (indirect_jump): Likewise.
22100 (tablejump): Likewise.
22101 (*sibcall_memory): Likewise.
22102 (*sibcall_value_memory): Likewise.
22103 Peepholes of indirect call and jump via memory: Likewise.
22104 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
22105 (*sibcall_value_GOT_32): Likewise.
22106 * config/i386/predicates.md (indirect_branch_operand): Likewise.
22107 (GOT_memory_operand): Likewise.
22108 (call_insn_operand): Likewise.
22109 (sibcall_insn_operand): Likewise.
22110 (GOT32_symbol_operand): Likewise.
22111 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
22112
22113 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22114
22115 PR rtl-optimization/83496
22116 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
22117 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
22118 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
22119 redundant insn, if any.
22120 (relax_delay_slots): Likewise.
22121 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
22122
22123 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
22124
22125 PR tree-optimization/83965
22126 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
22127 that grouped statements are part of a reduction chain. Return
22128 true if the statement is not marked as a reduction itself but
22129 is part of a group.
22130 (vect_recog_dot_prod_pattern): Don't check whether the statement
22131 is part of a group here.
22132 (vect_recog_sad_pattern): Likewise.
22133 (vect_recog_widen_sum_pattern): Likewise.
22134
22135 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22136
22137 PR debug/84545
22138 * final.c (rest_of_clean_state): Also look for calls inside sequences.
22139
22140 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22141
22142 PR target/84530
22143 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
22144 the bool argument.
22145 (ix86_output_indirect_function_return): New prototype.
22146 (ix86_split_simple_return_pop_internal): Likewise.
22147 * config/i386/i386.c (indirect_return_via_cx): New.
22148 (indirect_return_via_cx_bnd): Likewise.
22149 (indirect_thunk_name): Handle return va CX_REG.
22150 (output_indirect_thunk_function): Create alias for
22151 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
22152 (ix86_output_indirect_jmp): Remove the bool argument.
22153 (ix86_output_indirect_function_return): New function.
22154 (ix86_split_simple_return_pop_internal): Likewise.
22155 * config/i386/i386.md (*indirect_jump): Don't pass false
22156 to ix86_output_indirect_jmp.
22157 (*tablejump_1): Likewise.
22158 (simple_return_pop_internal): Change it to define_insn_and_split.
22159 Call ix86_split_simple_return_pop_internal to split it for
22160 -mfunction-return=.
22161 (simple_return_indirect_internal): Call
22162 ix86_output_indirect_function_return instead of
22163 ix86_output_indirect_jmp.
22164
22165 2018-02-26 Jakub Jelinek <jakub@redhat.com>
22166
22167 PR bootstrap/84405
22168 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22169 memset and value initialization afterwards.
22170
22171 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
22172
22173 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22174
22175 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22176
22177 PR target/84521
22178 * common/config/aarch64/aarch64-common.c
22179 (aarch_option_optimization_table[]): Switch
22180 off fomit-frame-pointer
22181
22182 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22183 Chung-Ju Wu <jasonwucj@gmail.com>
22184
22185 * config/nds32/nds32-multiple.md (load_multiple): Disallow
22186 volatile memory.
22187 (store_multiple): Ditto.
22188
22189 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22190
22191 * config.gcc: Add --with-cpu support for nds32 target.
22192 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22193 * config/nds32/nds32.opt: Add -mcpu= option.
22194
22195 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
22196
22197 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22198 isel=yes): Warn for these deprecated options.
22199
22200 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
22201
22202 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22203 ISA_2_5_MASKS_EMBEDDED.
22204
22205 2018-02-23 Jakub Jelinek <jakub@redhat.com>
22206
22207 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22208 p->max as pointers rather than using iterative_hash_expr.
22209
22210 2018-02-23 Carl Love <cel@us.ibm.com>
22211
22212 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22213 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22214 BU_P8V_OVERLOAD_2.
22215 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22216 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22217 P8V_BUILTIN_VEC_VUNSIGNED2.
22218
22219 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
22220
22221 PR target/81572
22222 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22223 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22224 LRA_UNKNOWN_ALT.
22225 * lra-constraints.c (curr_insn_transform): Set up
22226 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
22227 LRA_UNKNOWN_ALT.
22228 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22229 * lra-eliminations.c (spill_pseudos): Ditto.
22230 (process_insn_for_elimination): Ditto.
22231 * lra-lives.c (reg_early_clobber_p): Use the new macros.
22232 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22233 LRA_NON_CLOBBERED_ALT.
22234
22235 2018-02-22 Martin Sebor <msebor@redhat.com>
22236
22237 PR tree-optimization/84480
22238 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22239 to maybe_diag_stxncpy_trunc. Call it.
22240 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22241 from gimple_fold_builtin_strcpy. Print inlining stack.
22242 (handle_builtin_stxncpy): Print inlining stack.
22243 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22244
22245 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
22246
22247 PR target/84176
22248 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22249 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22250 and -fcheck-pointer-bounds are used together.
22251 (indirect_thunk_prefix): New enum.
22252 (indirect_thunk_need_prefix): New function.
22253 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
22254 "_nt" instead of "_bnd" for NOTRACK prefix.
22255 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22256 (output_indirect_thunk_function): Likewise.
22257 (): Likewise.
22258 (ix86_code_end): Update output_indirect_thunk_function calls.
22259 (ix86_output_indirect_branch_via_reg): Replace
22260 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22261 (ix86_output_indirect_branch_via_push): Likewise.
22262 (ix86_output_function_return): Likewise.
22263 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22264 incompatible with -fcf-protection=branch and
22265 -fcheck-pointer-bounds.
22266
22267 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22268
22269 PR target/83335
22270 * config/aarch64/aarch64.c (aarch64_print_address_internal):
22271 Change gcc_assert call to output_operand_lossage.
22272
22273 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22274
22275 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22276
22277 2018-02-22 DJ Delorie <dj@redhat.com>
22278 Sebastian Perta <sebastian.perta@renesas.com>
22279 Oleg Endo <olegendo@gcc.gnu.org>
22280
22281 * config/rx/rx.c (rx_rtx_costs): New function.
22282 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22283
22284 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
22285
22286 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22287
22288 2018-02-22 Martin Liska <mliska@suse.cz>
22289
22290 PR driver/83193
22291 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22292 Add "native" as a possible value.
22293
22294 2018-02-22 Martin Liska <mliska@suse.cz>
22295
22296 PR driver/83193
22297 * config/i386/i386.c (ix86_option_override_internal):
22298 Add "native" as a possible value for -march and -mtune.
22299
22300 2018-02-22 Jakub Jelinek <jakub@redhat.com>
22301
22302 PR target/84502
22303 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22304 to all type variants.
22305
22306 PR tree-optimization/84503
22307 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22308 width as info->bitpos + info->bitsize - start.
22309 (merged_store_group::merge_overlapping): Simplify width computation.
22310 (check_no_overlap): New function.
22311 (imm_store_chain_info::try_coalesce_bswap): Compute expected
22312 start + width and last_order of the group, fail if check_no_overlap
22313 fails.
22314 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22315 to group if check_no_overlap fails.
22316
22317 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22318
22319 * config/rs6000/altivec.md: Delete contraint arguments to
22320 define_expand, define_split, and define_peephole2, and in
22321 define_insn_and_split if always unused.
22322 * config/rs6000/darwin.md: Ditto.
22323 * config/rs6000/dfp.md: Ditto.
22324 * config/rs6000/rs6000.md: Ditto.
22325 * config/rs6000/sync.md: Ditto.
22326 * config/rs6000/vector.md: Ditto.
22327 * config/rs6000/vsx.md: Ditto.
22328
22329 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22330
22331 * config/rs6000/altivec.md: Write output control strings as braced
22332 blocks instead of double-quoted strings.
22333 * config/rs6000/darwin.md: Ditto.
22334 * config/rs6000/rs6000.md: Ditto.
22335 * config/rs6000/vector.md: Ditto.
22336 * config/rs6000/vsx.md: Ditto.
22337
22338 2018-02-21 Jason Merrill <jason@redhat.com>
22339
22340 PR c++/84314 - ICE with templates and fastcall attribute.
22341 * attribs.c (build_type_attribute_qual_variant): Remove assert.
22342
22343 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22344
22345 * ipa-cp.c (determine_versionability): Fix comment typos.
22346
22347 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22348
22349 PR c/84229
22350 * ipa-cp.c (determine_versionability): Do not version functions caling
22351 va_arg_pack.
22352
22353 2018-02-21 Martin Liska <mliska@suse.cz>
22354
22355 PR driver/83193
22356 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22357 Add "native" as a possible value.
22358 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
22359 the macro when native cpu detection is available.
22360
22361 2018-02-21 Martin Liska <mliska@suse.cz>
22362
22363 PR driver/83193
22364 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22365 Add "native" as a possible value.
22366 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22367 when native cpu detection is available.
22368
22369 2018-02-21 Jakub Jelinek <jakub@redhat.com>
22370 Martin Sebor <msebor@redhat.com>
22371
22372 PR tree-optimization/84478
22373 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22374 false.
22375 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22376 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22377 support which is conservatively correct, for 2 only stay conservative
22378 for maxlen. Formatting and comment capitalization fixes. Add STRICT
22379 argument to the 2 argument get_range_strlen, adjust 6 arg
22380 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22381 false.
22382 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22383 (gimple_fold_builtin_strlen): Pass true as last argument to
22384 get_range_strlen.
22385
22386 2018-02-20 Martin Sebor <msebor@redhat.com>
22387
22388 PR middle-end/84095
22389 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22390 (builtin_memref::set_base_and_offset): Same. Handle inner references.
22391 (builtin_memref::builtin_memref): Factor out parts into
22392 set_base_and_offset and call it.
22393
22394 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22395
22396 PR middle-end/84406
22397 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22398 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22399 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
22400 search at the associated MODE_INT.
22401
22402 2018-02-20 Jeff Law <law@redhat.com>
22403
22404 PR middle-end/82123
22405 PR tree-optimization/81592
22406 PR middle-end/79257
22407 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22408 for range data rather than using global data.
22409 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
22410 range data rather than using global data.
22411 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
22412 pass it to children as needed.
22413 (struct directive::fmtresult): Similarly.
22414 (struct directive::set_width): Similarly.
22415 (struct directive::set_precision): Similarly.
22416 (format_integer, format_directive, parse_directive): Similarly.
22417 (format_none): Accept unnamed vr_values parameter.
22418 (format_percent, format_floating, format_character): Similarly.
22419 (format_string, format_plain): Similarly.
22420 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
22421 the EVRP range analyzer for range data rather than using global data.
22422 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
22423 gimple-ssa-evrp-analyze.h
22424 (class sprintf_dom_walker): Add after_dom_children member function.
22425 Add evrp_range_analyzer member.
22426 (sprintf_dom_walker::before_dom_children): Call into the EVRP
22427 range analyzer as needed.
22428 (sprintf_dom_walker::after_dom_children): New member function.
22429 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
22430 if not optimizing.
22431 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
22432 (evrp_range_analyzer::pop_to_marker): Likewise.
22433
22434 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22435
22436 PR tree-optimization/84419
22437 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
22438 with the required type if its current type is compatible but
22439 different.
22440
22441 2018-02-20 Jakub Jelinek <jakub@redhat.com>
22442
22443 PR middle-end/82004
22444 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
22445 after vectorization.
22446
22447 2018-02-20 Martin Liska <mliska@suse.cz>
22448
22449 PR driver/83193
22450 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
22451 possible values if we don't have a hint.
22452
22453 2018-02-20 Martin Liska <mliska@suse.cz>
22454
22455 PR c/84310
22456 PR target/79747
22457 * final.c (shorten_branches): Build align_tab array with one
22458 more element.
22459 * opts.c (finish_options): Add alignment option limit check.
22460 (MAX_CODE_ALIGN): Likewise.
22461 (MAX_CODE_ALIGN_VALUE): Likewise.
22462 * doc/invoke.texi: Document maximum allowed option value for
22463 all -falign-* options.
22464
22465 2018-02-19 Jakub Jelinek <jakub@redhat.com>
22466
22467 PR target/84146
22468 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
22469 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
22470 * var-tracking.c (emit_note_insn_var_location): Remove all references
22471 to NOTE_INSN_CALL_ARG_LOCATION.
22472 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
22473 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
22474 Use copy_rtx_if_shared.
22475 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
22476 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
22477 (dwarf2out_var_location): Remove handling of
22478 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
22479 on call_insn.
22480 * final.c (final_scan_insn): Remove all references to
22481 NOTE_INSN_CALL_ARG_LOCATION.
22482 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
22483 before dumping final insns.
22484 * except.c (emit_note_eh_region_end): Remove all references to
22485 NOTE_INSN_CALL_ARG_LOCATION.
22486 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
22487 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
22488 * config/arc/arc.c (hwloop_optimize): Likewise.
22489 * config/arm/arm.c (create_fix_barrier): Likewise.
22490 * config/s390/s390.c (s390_chunkify_start): Likewise.
22491 * config/sh/sh.c (find_barrier): Likewise.
22492 * config/i386/i386.c (rest_of_insert_endbranch,
22493 ix86_seh_fixup_eh_fallthru): Likewise.
22494 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
22495 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
22496 * config/frv/frv.c (frv_function_prologue): Likewise.
22497 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
22498 reg note.
22499 (note_outside_basic_block_p): Remove all references to
22500 NOTE_INSN_CALL_ARG_LOCATION.
22501 * gengtype.c (adjust_field_rtx_def): Likewise.
22502 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
22503 Likewise.
22504 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
22505 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
22506
22507 PR c++/84444
22508 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
22509 is ADDR_EXPR.
22510
22511 PR tree-optimization/84452
22512 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
22513 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
22514 is NULL.
22515
22516 2018-02-19 Martin Liska <mliska@suse.cz>
22517
22518 PR sanitizer/82183
22519 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
22520
22521 2018-02-19 Martin Liska <mliska@suse.cz>
22522 Richard Sandiford <richard.sandiford@linaro.org>
22523
22524 PR tree-optimization/82491
22525 * gimple-fold.c (get_base_constructor): Make earlier bail out
22526 to prevent ubsan.
22527
22528 2018-02-19 Carl Love <cel@us.ibm.com>
22529
22530 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
22531 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
22532 BU_P8V_OVERLOAD_1.
22533 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
22534 P8V_BUILTIN_VEC_NEG.
22535
22536 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
22537
22538 * config/rl78/rl78.md (movdf): New define expand.
22539
22540 2018-02-19 Martin Liska <mliska@suse.cz>
22541
22542 PR other/80589
22543 * doc/invoke.texi: Fix typo.
22544 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
22545
22546 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
22547
22548 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
22549 handle rs6000_single_float and rs6000_double_float specially for
22550 e500 family CPUs.
22551
22552 2018-02-16 Jeff Law <law@redhat.com>
22553
22554 * config/rx/rx.c (add_pop_cfi_notes): New function.;
22555 (pop_regs): Use it.
22556
22557 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22558
22559 PR ipa/84425
22560 * ipa-inline.c (inline_small_functions): Fix a typo.
22561
22562 2018-02-16 Nathan Sidwell <nathan@acm.org>
22563
22564 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
22565
22566 2018-02-16 Carl Love <cel@us.ibm.com>
22567
22568 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
22569 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
22570 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
22571 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
22572 expansion to P8V_BUILTIN_VEC_FLOAT2.
22573
22574 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
22575
22576 PR rtl-optimization/70023
22577 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
22578 src_regno into account.
22579
22580 2018-02-16 Carl Love <cel@us.ibm.com>
22581
22582 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
22583 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
22584 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
22585 * config/rs6000/rs6000.c: Remove case statements for
22586 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
22587 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
22588 and P9V_BUILTIN_VEC_VINSERT4B.
22589 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
22590 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
22591 * config/rs6000/vsx.md:
22592 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
22593 vec_insert4b.
22594
22595 2018-02-16 Carl Love <cel@us.ibm.com>
22596
22597 * config/rs6000/altivec.h: Add builtin names vec_extract4b
22598 vec_insert4b.
22599 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
22600 definitions.
22601 * config/rs6000/rs6000-c.c: Add the definitions for
22602 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
22603 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
22604 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
22605 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
22606 definition for insert4b and define insn *insert3b_internal.
22607 * doc/extend.texi: Add documentation for vec_extract4b.
22608
22609 2018-02-16 Nathan Sidwell <nathan@acm.org>
22610
22611 * doc/extend.texi (Backwards Compatibility): Mention friend
22612 injection. Note for-scope is deprecated.
22613 * doc/invoke.texi (-ffriend-injection): Deprecate.
22614
22615 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
22616
22617 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
22618 that moved to I2, also allow destinations that are a paradoxical
22619 subreg (instead of a normal reg).
22620
22621 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
22622
22623 PR target/83831
22624 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
22625 to QImode.
22626
22627 2018-02-16 Richard Biener <rguenther@suse.de>
22628
22629 PR tree-optimization/84037
22630 PR tree-optimization/84016
22631 PR target/82862
22632 * config/i386/i386.c (ix86_builtin_vectorization_cost):
22633 Adjust vec_construct for the fact we need additional higher latency
22634 128bit inserts for AVX256 and AVX512 vector builds.
22635 (ix86_add_stmt_cost): Scale vector construction cost for
22636 elementwise loads.
22637
22638 2018-02-16 Richard Biener <rguenther@suse.de>
22639
22640 PR tree-optimization/84417
22641 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
22642 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
22643 (non_rewritable_lvalue_p): Likewise, use poly-ints.
22644
22645 2018-02-16 Martin Liska <mliska@suse.cz>
22646
22647 PR sanitizer/84307
22648 * internal-fn.def (ASAN_CHECK): Set proper flags.
22649 (ASAN_MARK): Likewise.
22650
22651 2018-02-16 Julia Koval <julia.koval@intel.com>
22652
22653 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
22654 from PTA_CANNONLAKE.
22655
22656 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22657
22658 PR target/84272
22659 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
22660 Use ++iter rather than iter++ for std::list iterators.
22661 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
22662 defer deleting them until all nodes in the forest are processed. Do
22663 free even leaf nodes. Change to_process into auto_vec.
22664
22665 PR bootstrap/84405
22666 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
22667 * vec.h (vec_default_construct): Use memset instead of placement new
22668 if BROKEN_VALUE_INITIALIZATION is defined.
22669 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
22670 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
22671 is defined.
22672
22673 PR rtl-optimization/83723
22674 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
22675 * lra.c (lra_substitute_pseudo): Likewise. If true, use
22676 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
22677 recursive calls.
22678 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
22679 callers.
22680 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
22681
22682 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
22683
22684 PR rtl-optimization/81443
22685 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
22686 from inner REGs to paradoxical SUBREGs.
22687
22688 2018-02-16 Richard Biener <rguenther@suse.de>
22689
22690 PR tree-optimization/84399
22691 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22692 For operands we can analyze at their definition make sure we can
22693 analyze them at each use as well.
22694
22695 2018-02-16 Richard Biener <rguenther@suse.de>
22696
22697 PR tree-optimization/84190
22698 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
22699 volatile accesses if the decl isn't volatile.
22700
22701 2018-02-15 Jason Merrill <jason@redhat.com>
22702
22703 PR c++/84314 - ICE with templates and fastcall attribute.
22704 * attribs.c (build_type_attribute_qual_variant): Don't clobber
22705 TYPE_CANONICAL on an existing type.
22706
22707 2018-02-15 Jakub Jelinek <jakub@redhat.com>
22708
22709 PR tree-optimization/84383
22710 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
22711 dstoff nor call operand_equal_p if dstbase is NULL.
22712
22713 PR tree-optimization/84334
22714 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
22715 also a CONSTANT_CLASS_P, punt.
22716
22717 2018-02-14 Jim Wilson <jimw@sifive.com>
22718
22719 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
22720 first SMALL_OPERAND check. New local min_second_step. Move assert
22721 to where locals are set. Add TARGET_RVC support.
22722 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
22723
22724 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
22725
22726 * doc/invoke.texi: Correct -Wformat-overflow code sample.
22727
22728 2018-02-14 Martin Sebor <msebor@redhat.com>
22729
22730 PR tree-optimization/83698
22731 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
22732 arrays constrain the offset range to their bounds.
22733 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
22734 (builtin_access::overlap): Avoid setting the size of overlap if it's
22735 already been set.
22736 (maybe_diag_overlap): Also consider arrays when deciding what values
22737 of offsets to include in diagnostics.
22738
22739 2018-02-14 Martin Sebor <msebor@redhat.com>
22740
22741 PR c/84108
22742 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
22743 that correspond to the kind of a declaration.
22744
22745 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
22746
22747 PR target/83984
22748 * config/pa/pa.md: Load address of PIC label using the linkage table
22749 if the label is nonlocal.
22750
22751 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
22752
22753 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
22754 warning message if user requests -maltivec=be.
22755 * doc/invoke.texi: Document deprecation of -maltivec=be.
22756
22757 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
22758
22759 PR target/84220
22760 * config/rs6000/rs6000-c.c: Update definitions for
22761 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
22762 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
22763
22764 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22765
22766 PR target/84239
22767 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
22768 add _get_ssp intrinsics. Remove argument from
22769 __builtin_ia32_rdssp[d|q].
22770 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
22771 * config/i386/i386-builtin.def: Remove argument from
22772 __builtin_ia32_rdssp[d|q].
22773 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
22774 ix86_expand_special_args_builtin for _rdssp[d|q].
22775 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
22776 Clear register before usage.
22777 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
22778 Add documentation for new _get_ssp and _inc_ssp intrinsics.
22779
22780 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
22781
22782 PR tree-optimization/84357
22783 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
22784 operand 1 of an ARRAY_REF too.
22785
22786 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
22787
22788 PR target/83831
22789 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
22790 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22791 declarations.
22792 (set_of_reg): New struct.
22793 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
22794 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
22795 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22796 functions.
22797 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
22798 Split into bitclr, bitset, bitinvert patterns if appropriate.
22799 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
22800 use rx_fuse_in_memory_bitop.
22801 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
22802 to named insn, correct maximum insn length.
22803
22804 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
22805
22806 PR target/79242
22807 * machmode.def: Define a complex mode for PARTIAL_INT.
22808 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
22809 MODE_PARTIAL_INT.
22810 * doc/rtl.texi: Document CSPImode.
22811 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
22812 handling.
22813 (msp430_hard_regno_nregs_with_padding): Likewise.
22814
22815 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
22816
22817 PR target/84279
22818 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
22819
22820 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
22821
22822 PR rtl-optimization/84169
22823 * combine.c (try_combine): New variable split_i2i3. Set it to true if
22824 we generated a parallel as new i3 and we split that to new i2 and i3
22825 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
22826 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
22827 those to i2, not i1. Partially rewrite this scan code.
22828
22829 2018-02-13 Jakub Jelinek <jakub@redhat.com>
22830
22831 PR c/82210
22832 * stor-layout.c (place_field): For variable length fields, adjust
22833 offset_align afterwards not just based on the field's alignment,
22834 but also on the size.
22835
22836 PR middle-end/84309
22837 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
22838 of exps and logs in the use_exp2 case.
22839
22840 2018-02-13 Jeff Law <law@redhat.com>
22841
22842 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
22843 entry for "vector".
22844
22845 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
22846 ARGS as unused.
22847
22848 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
22849
22850 PR debug/84342
22851 PR debug/84319
22852 * common.opt (gas-loc-support, gas-locview-support): New.
22853 (ginline-points, ginternal-reset-location-views): New.
22854 * doc/invoke.texi: Document them. Use @itemx where intended.
22855 (gvariable-location-views): Adjust.
22856 * target.def (reset_location_view): New.
22857 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
22858 (TARGET_RESET_LOCATION_VIEW): New.
22859 * doc/tm.texi: Rebuilt.
22860 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
22861 (dwarf2out_default_as_locview_support): New.
22862 (output_asm_line_debug_info): Use option variables.
22863 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
22864 (output_loc_list): Likewise.
22865 (add_high_low_attributes): Check option variables.
22866 Don't output entry view attribute in strict mode.
22867 (gen_inlined_subroutine_die): Check option variables.
22868 (dwarf2out_inline_entry): Likewise.
22869 (init_sections_and_labels): Likewise.
22870 (dwarf2out_early_finish): Likewise.
22871 (maybe_reset_location_view): New, from...
22872 (dwarf2out_var_location): ... here. Call it.
22873 * debug.h (dwarf2out_default_as_loc_support): Declare.
22874 (dwarf2out_default_as_locview_support): Declare.
22875 * hooks.c (hook_int_rtx_insn_0): New.
22876 * hooks.h (hook_int_rtx_insn_0): Declare.
22877 * toplev.c (process_options): Take -gas-loc-support and
22878 -gas-locview-support from dwarf2out. Enable
22879 -gvariable-location-views by default only with locview
22880 assembler support. Enable -ginternal-reset-location-views by
22881 default only if the target defines the corresponding hook.
22882 Enable -ginline-points by default if location views are
22883 enabled; force it disabled if statement frontiers are
22884 disabled.
22885 * tree-inline.c (expand_call_inline): Check option variables.
22886 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
22887
22888 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
22889
22890 PR tree-optimization/84321
22891 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
22892 handling. Also check whether the anti-range contains any values
22893 that satisfy the mask; switch to a VR_RANGE if not.
22894
22895 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
22896
22897 PR sanitizer/84340
22898 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
22899
22900 2018-02-13 Martin Jambor <mjambor@suse.cz>
22901
22902 PR c++/83990
22903 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
22904 of call statements, also set location of a load to a temporary.
22905
22906 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
22907
22908 * config/rl78/rl78.c (add_vector_labels): New function.
22909 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
22910 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
22911 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
22912 which checks that no arguments are passed.
22913 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
22914 * doc/extend.texi: Documentation for the new attribute.
22915
22916 2018-02-13 Andreas Schwab <schwab@suse.de>
22917
22918 * config/riscv/linux.h (CPP_SPEC): Define.
22919
22920 2018-02-13 Jakub Jelinek <jakub@redhat.com>
22921
22922 PR target/84335
22923 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
22924 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
22925 OPTION_MASK_ISA_AES as first argument to def_builtin_const
22926 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
22927 instead of OPTION_MASK_ISA_PCLMUL as first argument to
22928 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
22929 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
22930 temporarily for AES and PCLMUL builtins.
22931
22932 PR tree-optimization/84339
22933 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
22934 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
22935 Formatting fixes.
22936
22937 PR middle-end/84309
22938 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
22939 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
22940 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
22941 inline function.
22942 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
22943 inline function.
22944 * omp-simd-clone.h: New file.
22945 * omp-simd-clone.c: Include omp-simd-clone.h.
22946 (expand_simd_clones): No longer static.
22947 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
22948 cgraph.h and omp-simd-clone.h.
22949 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
22950 (vect_recog_widen_shift_pattern): Formatting fix.
22951 (vect_pattern_recog_1): Don't check optab for calls.
22952
22953 PR target/84336
22954 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
22955 operands[2] into a REG before using gen_lowpart on it.
22956
22957 2018-02-12 Jeff Law <law@redhat.com>
22958
22959 PR target/83760
22960 * config/sh/sh.c (find_barrier): Consider a sibling call
22961 a barrier as well.
22962
22963 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
22964 successfully back substituting a reg.
22965
22966 2018-02-12 Richard Biener <rguenther@suse.de>
22967
22968 PR tree-optimization/84037
22969 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
22970 parameter, move visited init to caller.
22971 (vect_slp_analyze_operations): Separate cost from validity
22972 check, initialize visited once for all instances.
22973 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
22974 for all instances.
22975 * tree-vect-stmts.c (vect_model_simple_cost): Make early
22976 out an assert.
22977 (vect_model_promotion_demotion_cost): Likewise.
22978 (vectorizable_bswap): Guard cost modeling with !slp_node
22979 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
22980 SLP stmts.
22981 (vectorizable_call): Likewise.
22982 (vectorizable_conversion): Likewise.
22983 (vectorizable_assignment): Likewise.
22984 (vectorizable_shift): Likewise.
22985 (vectorizable_operation): Likewise.
22986 (vectorizable_store): Likewise.
22987 (vectorizable_load): Likewise.
22988 (vectorizable_condition): Likewise.
22989 (vectorizable_comparison): Likewise.
22990
22991 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
22992
22993 PR sanitizer/84307
22994 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
22995 (ASAN_MARK): Fix fnspec to account for return value, change pointer
22996 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
22997
22998 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
22999
23000 PR middle-end/83665
23001 * params.def (inline-min-speedup): Increase from 8 to 15.
23002 (max-inline-insns-auto): Decrease from 40 to 30.
23003 * ipa-split.c (consider_split): Add some buffer for function to
23004 be considered inlining candidate.
23005 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
23006 default values.
23007
23008 2018-02-12 Richard Biener <rguenther@suse.de>
23009
23010 PR tree-optimization/84037
23011 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
23012 matched stmts if we cannot swap the non-matched ones.
23013
23014 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23015
23016 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
23017 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
23018 _mm_maskz_scalef_round_ss): New intrinsics.
23019 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
23020 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
23021 __builtin_ia32_scalefss_round): Remove.
23022 (__builtin_ia32_scalefsd_mask_round,
23023 __builtin_ia32_scalefss_mask_round): New intrinsics.
23024 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
23025 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
23026 ((match_operand:VF_128 2 "<round_nimm_predicate>"
23027 "<round_constraint>")): Changed to ...
23028 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
23029 "<round_scalar_constraint>")): ... this.
23030 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
23031 %0, %1, %2<round_op3>}"): Changed to ...
23032 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
23033 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
23034 %2<round_scalar_mask_op3>}"): ... this.
23035 * config/i386/subst.md (round_scalar_nimm_predicate): New.
23036
23037 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23038
23039 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
23040 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
23041 (_mm_maskz_sqrt_round_ss): New intrinsics.
23042 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
23043 (__builtin_ia32_sqrtsd_mask_round)
23044 (__builtin_ia32_sqrtss_mask_round): New builtins.
23045 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
23046 (__builtin_ia32_sqrtss_round): Remove.
23047 (__builtin_ia32_sqrtsd_mask_round)
23048 (__builtin_ia32_sqrtss_mask_round): New builtins.
23049 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
23050 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
23051 ((match_operand:VF_128 1 "vector_operand"
23052 "xBm,<round_constraint>")): Changed to ...
23053 ((match_operand:VF_128 1 "vector_operand"
23054 "xBm,<round_scalar_constraint>")): ... this.
23055 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
23056 %0, %2, %<iptr>1<round_op3>}): Changed to ...
23057 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
23058 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
23059 %<iptr>1<round_scalar_mask_op3>}): ... this.
23060 ((set_attr "prefix" "<round_prefix>")): Changed to ...
23061 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
23062
23063 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
23064
23065 PR target/84266
23066 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
23067 Cast vec_cmpeq result to correct type.
23068 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
23069 Cast vec_cmpgt result to correct type.
23070
23071 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
23072
23073 * final.c (final_scan_insn_1): Renamed from...
23074 (final_scan_insn): ... this. New wrapper, to recover
23075 seen from the outermost call in recursive ones.
23076 * config/sparc/sparc.c (output_return): Drop seen from call.
23077 (output_sibcall): Likewise.
23078 * config/visium/visium.c (output_branch): Likewise.
23079
23080 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
23081
23082 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
23083 function label.
23084
23085 2018-02-10 Alan Modra <amodra@gmail.com>
23086
23087 PR target/84300
23088 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
23089 Specify LR as an input.
23090
23091 2018-02-10 Jakub Jelinek <jakub@redhat.com>
23092
23093 PR sanitizer/83987
23094 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
23095 remove_member_access_dummy_vars): New functions.
23096 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
23097 lower_omp_1, execute_lower_omp): Use them.
23098
23099 PR rtl-optimization/84308
23100 * shrink-wrap.c (spread_components): Release todo vector.
23101
23102 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
23103
23104 PR rtl-optimization/57193
23105 * ira-color.c (struct allocno_color_data): Add member
23106 conflict_allocno_hard_prefs.
23107 (update_conflict_allocno_hard_prefs): New.
23108 (bucket_allocno_compare_func): Add a preference based on
23109 conflict_allocno_hard_prefs.
23110 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
23111 (color_allocnos): Remove a dead code. Initiate
23112 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
23113
23114 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23115
23116 PR target/84226
23117 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
23118 constraint from =wa to wa. Avoid a subreg on the output operand,
23119 instead use a pseudo and subreg it in a move.
23120 (p9_xxbrd_<mode>): Changed to ...
23121 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
23122 (p9_xxbrd_v2df): New expander.
23123 (p9_xxbrw_<mode>): Changed to ...
23124 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
23125 (p9_xxbrw_v4sf): New expander.
23126
23127 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23128
23129 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
23130
23131 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
23132
23133 PR target/83926
23134 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
23135 multiply in 32-bit mode.
23136 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
23137 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
23138 mode.
23139
23140 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23141
23142 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
23143 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
23144 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
23145 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
23146
23147 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
23148
23149 PR lto/84213
23150 * dwarf2out.c (is_trivial_indirect_ref): New function.
23151 (dwarf2out_late_global_decl): Do not generate a location
23152 attribute for variables that have a non-trivial DECL_VALUE_EXPR
23153 and that are not defined in the current unit.
23154
23155 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23156
23157 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
23158 instead of a libcall for UNORDERED.
23159
23160 2018-02-09 Tamar Christina <tamar.christina@arm.com>
23161
23162 PR target/82641
23163 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23164 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23165
23166 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23167
23168 PR target/PR84295
23169 * config/s390/s390.c (s390_set_current_function): Invoke
23170 s390_indirect_branch_settings also if fndecl didn't change.
23171
23172 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23173
23174 * config/rs6000/rs6000.md (blockage): Set length to zero.
23175
23176 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23177
23178 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23179
23180 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23181
23182 PR sanitizer/84285
23183 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23184 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23185 -static-lib*san.
23186
23187 PR debug/84252
23188 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23189 PARALLEL incoming that failed vt_get_decl_and_offset check.
23190
23191 PR middle-end/84237
23192 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23193 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23194 TREE_READONLY bit.
23195 (get_variable_section): For decls in named .bss* sections pass true as
23196 second argument to bss_initializer_p.
23197
23198 2018-02-09 Marek Polacek <polacek@redhat.com>
23199 Jakub Jelinek <jakub@redhat.com>
23200
23201 PR c++/83659
23202 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23203 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
23204 Sync some changes from cxx_fold_indirect_ref.
23205
23206 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23207
23208 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23209 markers.
23210 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23211 (BLOCK_INLINE_ENTRY_LABEL): New.
23212 (dwarf2out_var_location): Disregard inline entry markers.
23213 (inline_entry_data): New struct.
23214 (inline_entry_data_hasher): New hashtable type.
23215 (inline_entry_data_hasher::hash): New.
23216 (inline_entry_data_hasher::equal): New.
23217 (inline_entry_data_table): New variable.
23218 (add_high_low_attributes): Add DW_AT_entry_pc and
23219 DW_AT_GNU_entry_view attributes if a pending entry is found
23220 in inline_entry_data_table. Add old entry_pc attribute only
23221 if debug nonbinding markers are disabled.
23222 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23223 markers are enabled.
23224 (block_within_block_p, dwarf2out_inline_entry): New.
23225 (dwarf2out_finish): Check that no entries remained in
23226 inline_entry_data_table.
23227 * final.c (reemit_insn_block_notes): Handle inline entry notes.
23228 (final_scan_insn, notice_source_line): Likewise.
23229 (rest_of_clean_state): Skip inline entry markers.
23230 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23231 markers.
23232 * gimple.c (gimple_build_debug_inline_entry): New.
23233 * gimple.h (enum gimple_debug_subcode): Add
23234 GIMPLE_DEBUG_INLINE_ENTRY.
23235 (gimple_build_debug_inline_entry): Declare.
23236 (gimple_debug_inline_entry_p): New.
23237 (gimple_debug_nonbind_marker_p): Adjust.
23238 * insn-notes.def (INLINE_ENTRY): New.
23239 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23240 inline entry marker notes.
23241 (print_insn): Likewise.
23242 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23243 (INSN_DEBUG_MARKER_KIND): Likewise.
23244 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23245 * tree-inline.c (expand_call_inline): Build and insert
23246 debug_inline_entry stmt.
23247 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23248 inline entry blocks early, if nonbind markers are enabled.
23249 (dump_scope_block): Dump fragment info.
23250 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23251 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23252 (gimple_build_debug_inline_entry): New.
23253 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23254 Enable/disable inline entry points too.
23255 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23256 (DEBUG_INSN): Describe inline entry markers.
23257
23258 * common.opt (gvariable-location-views): New.
23259 (gvariable-location-views=incompat5): New.
23260 * config.in: Rebuilt.
23261 * configure: Rebuilt.
23262 * configure.ac: Test assembler for view support.
23263 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23264 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23265 * dwarf2out.c (var_loc_view): New typedef.
23266 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23267 (dwarf2out_locviews_in_attribute): New.
23268 (dwarf2out_locviews_in_loclist): New.
23269 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23270 (enum dw_line_info_opcode): Add LI_adv_address.
23271 (struct dw_line_info_table): Add view.
23272 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23273 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23274 (zero_view_p): New variable.
23275 (ZERO_VIEW_P): New macro.
23276 (output_asm_line_debug_info): New.
23277 (struct var_loc_node): Add view.
23278 (add_AT_view_list, AT_loc_list): New.
23279 (add_var_loc_to_decl): Add view param. Test it against last.
23280 (new_loc_list): Add view params. Record them.
23281 (AT_loc_list_ptr): Handle loc and view lists.
23282 (view_list_to_loc_list_val_node): New.
23283 (print_dw_val): Handle dw_val_class_view_list.
23284 (size_of_die): Likewise.
23285 (value_format): Likewise.
23286 (loc_list_has_views): New.
23287 (gen_llsym): Set vl_symbol too.
23288 (maybe_gen_llsym, skip_loc_list_entry): New.
23289 (dwarf2out_maybe_output_loclist_view_pair): New.
23290 (output_loc_list): Output view list or entries too.
23291 (output_view_list_offset): New.
23292 (output_die): Handle dw_val_class_view_list.
23293 (output_dwarf_version): New.
23294 (output_compilation_unit_header): Use it.
23295 (output_skeleton_debug_sections): Likewise.
23296 (output_rnglists, output_line_info): Likewise.
23297 (output_pubnames, output_aranges): Update version comments.
23298 (output_one_line_info_table): Output view numbers in asm comments.
23299 (dw_loc_list): Determine current endview, pass it to new_loc_list.
23300 Call maybe_gen_llsym.
23301 (loc_list_from_tree_1): Adjust.
23302 (add_AT_location_description): Create view list attribute if
23303 needed, check it's absent otherwise.
23304 (convert_cfa_to_fb_loc_list): Adjust.
23305 (maybe_emit_file): Call output_asm_line_debug_info for test.
23306 (dwarf2out_var_location): Reset views as needed. Precompute
23307 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
23308 attribute. Set view.
23309 (new_line_info_table): Reset next view.
23310 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23311 (dwarf2out_source_line): Likewise. Output view resets and labels to
23312 the assembler, or select appropriate line info opcodes.
23313 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23314 (optimize_string_length): Catch it. Adjust.
23315 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
23316 dw_val_class_view_list, and remove it if no longer needed.
23317 (hash_loc_list): Hash view numbers.
23318 (loc_list_hasher::equal): Compare them.
23319 (optimize_location_lists): Check whether a view list symbol is
23320 needed, and whether the locview attribute is present, and
23321 whether they match. Remove the locview attribute if no longer
23322 needed.
23323 (index_location_lists): Call skip_loc_list_entry for test.
23324 (dwarf2out_finish): Call output_asm_line_debug_info for test.
23325 Use output_dwarf_version.
23326 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23327 (struct dw_val_node): Add val_view_list.
23328 * final.c (SEEN_NEXT_VIEW): New.
23329 (set_next_view_needed): New.
23330 (clear_next_view_needed): New.
23331 (maybe_output_next_view): New.
23332 (final_start_function): Rename to...
23333 (final_start_function_1): ... this. Take pointer to FIRST,
23334 add SEEN parameter. Emit param bindings in the initial view.
23335 (final_start_function): Reintroduce SEEN-less interface.
23336 (final): Rename to...
23337 (final_1): ... this. Take SEEN parameter. Output final pending
23338 next view at the end.
23339 (final): Reintroduce seen-less interface.
23340 (final_scan_insn): Output pending next view before switching
23341 sections or ending a block. Mark the next view as needed when
23342 outputting variable locations. Notify debug backend of section
23343 changes, and of location view changes.
23344 (rest_of_handle_final): Adjust.
23345 * toplev.c (process_options): Autodetect value for debug variable
23346 location views option. Warn on incompat5 without -gdwarf-5.
23347 * doc/invoke.texi (gvariable-location-views): New.
23348 (gvariable-location-views=incompat5): New.
23349 (gno-variable-location-views): New.
23350
23351 2018-02-08 David Malcolm <dmalcolm@redhat.com>
23352
23353 PR tree-optimization/84136
23354 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23355 that the result of find_edge is non-NULL.
23356
23357 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23358
23359 PR target/83008
23360 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23361 storing integer register in SImode. Fix cost of 256 and 512
23362 byte aligned SSE register store.
23363
23364 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23365
23366 * config/i386/i386.c (ix86_multiplication_cost): Fix
23367 multiplication cost for TARGET_AVX512DQ.
23368
23369 2018-02-08 Marek Polacek <polacek@redhat.com>
23370
23371 PR tree-optimization/84238
23372 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23373 get_range_strlen.
23374
23375 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23376
23377 PR tree-optimization/84265
23378 * tree-vect-stmts.c (vectorizable_store): Don't treat
23379 VMAT_CONTIGUOUS accesses as grouped.
23380 (vectorizable_load): Likewise.
23381
23382 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23383
23384 PR tree-optimization/81635
23385 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23386 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23387 (test_round_for_mask): New functions.
23388 (wide_int_cc_tests): Call test_round_for_mask.
23389 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23390 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23391 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23392 range returned by get_range_info.
23393
23394 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23395
23396 PR ipa/81360
23397 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23398 * symtab.c: Include builtins.h
23399 (symtab_node::output_to_lto_symbol_table_p): Move here
23400 from lto-streamer-out.c:output_symbol_p.
23401 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23402 (output_symbol_p): Move all logic to symtab.c
23403 (produce_symtab): Update.
23404
23405 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23406
23407 * config/s390/s390-opts.h (enum indirect_branch): Define.
23408 * config/s390/s390-protos.h (s390_return_addr_from_memory)
23409 (s390_indirect_branch_via_thunk)
23410 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
23411 (enum s390_indirect_branch_type): Define.
23412 * config/s390/s390.c (struct s390_frame_layout, struct
23413 machine_function): Remove.
23414 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
23415 (indirect_branch_table_label_no, indirect_branch_table_name):
23416 Define variables.
23417 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
23418 (enum s390_indirect_branch_option): Define.
23419 (s390_return_addr_from_memory): New function.
23420 (s390_handle_string_attribute): New function.
23421 (s390_attribute_table): Add new attribute handler.
23422 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
23423 (s390_indirect_branch_via_thunk): New function.
23424 (s390_indirect_branch_via_inline_thunk): New function.
23425 (s390_function_ok_for_sibcall): When jumping via thunk disallow
23426 sibling call optimization for non z10 compiles.
23427 (s390_emit_call): Force indirect branch target to be a single
23428 register. Add r1 clobber for non-z10 compiles.
23429 (s390_emit_epilogue): Emit return jump via return_use expander.
23430 (s390_reorg): Handle JUMP_INSNs as execute targets.
23431 (s390_option_override_internal): Perform validity checks for the
23432 new command line options.
23433 (s390_indirect_branch_attrvalue): New function.
23434 (s390_indirect_branch_settings): New function.
23435 (s390_set_current_function): Invoke s390_indirect_branch_settings.
23436 (s390_output_indirect_thunk_function): New function.
23437 (s390_code_end): Implement target hook.
23438 (s390_case_values_threshold): Implement target hook.
23439 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
23440 macros.
23441 * config/s390/s390.h (struct s390_frame_layout)
23442 (struct machine_function): Move here from s390.c.
23443 (TARGET_INDIRECT_BRANCH_NOBP_RET)
23444 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
23445 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
23446 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
23447 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
23448 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
23449 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
23450 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
23451 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
23452 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
23453 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
23454 (mnemonic attribute): Add values which aren't recognized
23455 automatically.
23456 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
23457 pattern for branch conversion. Fix mnemonic attribute.
23458 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
23459 indirect branch via thunk if requested.
23460 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
23461 ("*indirect_jump"): Disable for branch conversion using out of
23462 line thunks.
23463 ("indirect_jump_via_thunk<mode>_z10")
23464 ("indirect_jump_via_thunk<mode>")
23465 ("indirect_jump_via_inlinethunk<mode>_z10")
23466 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
23467 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
23468 ("casesi_jump_via_inlinethunk<mode>_z10")
23469 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
23470 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
23471 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
23472 ("*indirect2_jump"): Disable for branch conversion.
23473 ("casesi_jump"): Turn into expander and expand patterns for branch
23474 conversion.
23475 ("return_use"): New expander.
23476 ("*return"): Emit return via thunk and rename it to ...
23477 ("*return<mode>"): ... this one.
23478 * config/s390/s390.opt: Add new options and and enum for the
23479 option values.
23480
23481 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23482
23483 * lra-constraints.c (match_reload): Unconditionally use
23484 gen_lowpart_SUBREG, rather than selecting between that
23485 and equivalent gen_rtx_SUBREG code.
23486
23487 2018-02-08 Richard Biener <rguenther@suse.de>
23488
23489 PR tree-optimization/84233
23490 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
23491 changed flag instead of boguously re-using phi_inserted.
23492
23493 2018-02-08 Martin Jambor <mjambor@suse.cz>
23494
23495 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
23496 static local variables.
23497
23498 2018-02-08 Richard Biener <rguenther@suse.de>
23499
23500 PR tree-optimization/84278
23501 * tree-vect-stmts.c (vectorizable_store): When looking for
23502 smaller vector types to perform grouped strided loads/stores
23503 make sure the mode is supported by the target.
23504 (vectorizable_load): Likewise.
23505
23506 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23507
23508 * config/aarch64/aarch64.c (aarch64_components_for_bb):
23509 Increase LDP/STP opportunities by adding adjacent callee-saves.
23510
23511 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23512
23513 PR rtl-optimization/84068
23514 PR rtl-optimization/83459
23515 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
23516
23517 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
23518
23519 PR tree-optimization/84224
23520 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
23521 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
23522 non-zero arguments.
23523
23524 2018-02-07 Iain Sandoe <iain@codesourcery.com>
23525
23526 PR target/84113
23527 * config/rs6000/altivec.md (*restore_world): Remove LR use.
23528 * config/rs6000/predicates.md (restore_world_operation): Adjust op
23529 count, remove one USE.
23530
23531 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
23532
23533 * doc/install.texi (Configuration): Document the
23534 --with-long-double-format={ibm,ieee} PowerPC configuration
23535 options.
23536
23537 PR target/84154
23538 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
23539 Convert from define_expand to be define_insn_and_split. Rework
23540 float/double/_Float128 conversions to QI/HI/SImode to work with
23541 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
23542 conversions to QI/HImode types did a store and then a load to
23543 truncate the value. For conversions to VSX registers, don't split
23544 the insn, instead emit the code directly. Use the code iterator
23545 any_fix to combine signed and unsigned conversions.
23546 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
23547 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
23548 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23549 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
23550 (fix_<mode>di2_hw): Likewise.
23551 (fixuns_<mode>di2_hw): Likewise.
23552 (fix_<mode>si2_hw): Likewise.
23553 (fixuns_<mode>si2_hw): Likewise.
23554 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
23555 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23556 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
23557 fix<uns>_trunc<SFDF:mode>si2_p8.
23558 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
23559 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
23560 (fix<uns>_<mode>_mem): Likewise.
23561 (fctiw<u>z_<mode>_mem): Likewise.
23562 (fix<uns>_<mode>_mem): Likewise.
23563 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
23564 the register allocator from doing a direct move to the GPRs to do
23565 a store, and instead use the ISA 3.0 store byte/half-word from
23566 vector register instruction. For IEEE 128-bit floating point,
23567 also optimize stores of 32-bit ints.
23568 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
23569
23570 2018-02-07 Alan Hayward <alan.hayward@arm.com>
23571
23572 * genextract.c (push_pathstr_operand): New function to support
23573 [a-zA-Z].
23574 (walk_rtx): Call push_pathstr_operand.
23575 (print_path): Support [a-zA-Z].
23576
23577 2018-02-07 Richard Biener <rguenther@suse.de>
23578
23579 PR tree-optimization/84037
23580 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
23581 (cse_and_gimplify_to_preheader): Declare.
23582 (vect_get_place_in_interleaving_chain): Likewise.
23583 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23584 ivexpr_map.
23585 (_loop_vec_info::~_loop_vec_info): Delete it.
23586 (cse_and_gimplify_to_preheader): New function.
23587 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
23588 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
23589 (vectorizable_load): Likewise. For grouped stores always base
23590 the IV on the first element.
23591 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
23592 condition before gimplifying.
23593
23594 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23595
23596 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
23597 *DIV_EXPR and *MOD_EXPR.
23598
23599 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
23600
23601 PR target/84248
23602 * config/i386/i386.c (ix86_option_override_internal): Mask out
23603 the CF_SET bit when checking -fcf-protection.
23604
23605 2018-02-07 Tom de Vries <tom@codesourcery.com>
23606
23607 PR libgomp/84217
23608 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
23609 enough.
23610
23611 2018-02-07 Richard Biener <rguenther@suse.de>
23612
23613 PR tree-optimization/84204
23614 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
23615 this place.
23616
23617 PR tree-optimization/84205
23618 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
23619 special-case isl_ast_op_zdiv_r.
23620
23621 PR tree-optimization/84223
23622 * graphite-scop-detection.c (gather_bbs::before_dom_children):
23623 Only add conditions from within the region.
23624 (gather_bbs::after_dom_children): Adjust.
23625
23626 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
23627
23628 PR target/84209
23629 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
23630 * config/avr/avr.md: Only post-reload split REG-REG moves if
23631 either register is GENERAL_REG_P.
23632
23633 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23634
23635 PR tree-optimization/84235
23636 * tree-ssa-scopedtables.c
23637 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
23638 if the subtraction is performed in floating point type where NaNs are
23639 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
23640 build 1. Formatting fix.
23641
23642 2018-02-06 Jakub Jelinek <jakub@redhat.com>
23643
23644 PR target/84146
23645 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
23646 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
23647 and skip it regardless of bb boundaries. Use CALL_P macro,
23648 don't test INSN_P (insn) together with CALL_P or JUMP_P check
23649 unnecessarily, formatting fix.
23650
23651 2018-02-06 Michael Collison <michael.collison@arm.com>
23652
23653 * config/arm/thumb2.md:
23654 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
23655 (*thumb_mov_notscc): Ditto.
23656
23657 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
23658
23659 PR target/84154
23660 * config/rs6000/rs6000.md (su code attribute): Use "u" for
23661 unsigned_fix, not "s".
23662
23663 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23664
23665 * configure.ac (gcc_fn_eh_frame_ro): New function.
23666 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
23667 correct .eh_frame permissions.
23668 * configure: Regenerate.
23669
23670 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
23671
23672 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
23673 irrelevant options.
23674
23675 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23676
23677 * config/rs6000/rs6000.c (rs6000_option_override_internal):
23678 Display warning message for -mno-speculate-indirect-jumps.
23679
23680 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
23681
23682 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
23683 Undocumented.
23684 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
23685
23686 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
23687
23688 PR tree-optimization/84225
23689 * tree-eh.c (find_trapping_overflow): Only call
23690 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
23691
23692 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23693
23694 PR target/84145
23695 * config/i386/i386.c: Reimplement the check of possible options
23696 -mibt/-mshstk conbination. Change error messages.
23697 * doc/invoke.texi: Fix a typo: remove extra '='.
23698
23699 2018-02-06 Marek Polacek <polacek@redhat.com>
23700
23701 PR tree-optimization/84228
23702 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
23703
23704 2018-02-06 Tamar Christina <tamar.christina@arm.com>
23705
23706 PR target/82641
23707 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
23708 emitted arch directives.
23709 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
23710 __ARM_FEATURE_COPROC before changing architectures.
23711
23712 2018-02-06 Richard Biener <rguenther@suse.de>
23713
23714 * config/i386/i386.c (print_reg): Fix typo.
23715 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
23716
23717 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
23718
23719 * configure: Regenerate.
23720
23721 2018-02-05 Martin Sebor <msebor@redhat.com>
23722
23723 PR tree-optimization/83369
23724 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
23725 inlining context.
23726
23727 2018-02-05 Martin Liska <mliska@suse.cz>
23728
23729 * doc/invoke.texi: Cherry-pick upstream r323995.
23730
23731 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
23732
23733 * ira.c (ira_init_register_move_cost): Adjust comment.
23734
23735 2018-02-05 Martin Liska <mliska@suse.cz>
23736
23737 PR gcov-profile/84137
23738 * doc/gcov.texi: Fix typo in documentation.
23739
23740 2018-02-05 Martin Liska <mliska@suse.cz>
23741
23742 PR gcov-profile/83879
23743 * doc/gcov.texi: Document necessity of --dynamic-list-data when
23744 using dlopen functionality.
23745
23746 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
23747
23748 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
23749 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
23750 _mm_maskz_range_ss, _mm_mask_range_round_ss,
23751 _mm_maskz_range_round_ss): New intrinsics.
23752 (__builtin_ia32_rangesd128_round)
23753 (__builtin_ia32_rangess128_round): Remove.
23754 (__builtin_ia32_rangesd128_mask_round,
23755 __builtin_ia32_rangess128_mask_round): New builtins.
23756 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
23757 __builtin_ia32_rangess128_round): Remove.
23758 (__builtin_ia32_rangesd128_mask_round,
23759 __builtin_ia32_rangess128_mask_round): New builtins.
23760 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
23761 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
23762 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
23763 "<round_saeonly_constraint>")): Changed to ...
23764 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
23765 "<round_saeonly_scalar_constraint>")): ... this.
23766 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
23767 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
23768 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
23769 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
23770 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
23771
23772 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
23773
23774 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
23775 options.
23776 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
23777 Remove all values except native, 8540 and 8548.
23778
23779 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
23780
23781 * config/i386/i386.c (ix86_output_function_return): Pass
23782 INVALID_REGNUM, instead of -1, as invalid register number to
23783 indirect_thunk_name and output_indirect_thunk.
23784
23785 2018-02-02 Julia Koval <julia.koval@intel.com>
23786
23787 * config.gcc: Add -march=icelake.
23788 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
23789 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
23790 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
23791 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
23792 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
23793 (processor_target_table): Add icelake.
23794 (ix86_option_override_internal): Handle new PTAs.
23795 (get_builtin_code_for_version): Handle icelake.
23796 (M_INTEL_COREI7_ICELAKE): New.
23797 (fold_builtin_cpu): Handle icelake.
23798 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
23799 * doc/invoke.texi: Add -march=icelake.
23800
23801 2018-02-02 Julia Koval <julia.koval@intel.com>
23802
23803 * config/i386/i386.c (ix86_option_override_internal): Change flags type
23804 to wide_int_bitmask.
23805 * wide-int-bitmask.h: New.
23806
23807 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23808
23809 PR target/84066
23810 * config/i386/i386.md: Replace Pmode with word_mode in
23811 builtin_setjmp_setup and builtin_longjmp to support x32.
23812
23813 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
23814
23815 PR target/56010
23816 PR target/83743
23817 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
23818 #include "opts.h".
23819 (rs6000_supported_cpu_names): New static variable.
23820 (linux_cpu_translation_table): Likewise.
23821 (elf_platform) <cpu>: Define new static variable and use it.
23822 Translate kernel AT_PLATFORM name to canonical name if needed.
23823 Error if platform name is unknown.
23824
23825 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
23826
23827 PR target/84089
23828 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
23829
23830 2018-02-01 Jeff Law <law@redhat.com>
23831
23832 PR target/84128
23833 * config/i386/i386.c (release_scratch_register_on_entry): Add new
23834 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
23835 the scratch if RELEASE_VIA_POP is false.
23836 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
23837 If we have to save a temporary register, decrement SIZE appropriately.
23838 Pass new arguments to release_scratch_register_on_entry.
23839 (ix86_adjust_stack_and_probe): Likewise.
23840 (ix86_emit_probe_stack_range): Pass new arguments to
23841 release_scratch_register_on_entry.
23842
23843 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
23844
23845 PR rtl-optimization/84157
23846 * combine.c (change_zero_ext): Use REG_P predicate in
23847 front of HARD_REGISTER_P predicate.
23848
23849 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
23850
23851 * config/avr/avr.c (avr_option_override): Move disabling of
23852 -fdelete-null-pointer-checks to...
23853 * common/config/avr/avr-common.c (avr_option_optimization_table):
23854 ...here.
23855
23856 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23857
23858 PR tree-optimization/81635
23859 * tree-data-ref.c (split_constant_offset_1): For types that
23860 wrap on overflow, try to use range info to prove that wrapping
23861 cannot occur.
23862
23863 2018-02-01 Renlin Li <renlin.li@arm.com>
23864
23865 PR target/83370
23866 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
23867 TAILCALL_ADDR_REGS.
23868 (aarch64_register_move_cost): Likewise.
23869 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
23870 TAILCALL_ADDR_REGS.
23871 (REG_CLASS_NAMES): Likewise.
23872 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
23873 TAILCALL_ADDR_REGS. Remove IP registers.
23874 * config/aarch64/aarch64.md (Ucs): Update register constraint.
23875
23876 2018-02-01 Richard Biener <rguenther@suse.de>
23877
23878 * domwalk.h (dom_walker::dom_walker): Add additional constructor
23879 for specifying RPO order and allow NULL for that.
23880 * domwalk.c (dom_walker::dom_walker): Likewise.
23881 (dom_walker::walk): Handle NULL RPO order.
23882 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
23883 in RPO order.
23884 (rewrite_update_dom_walker): Likewise.
23885 (mark_def_dom_walker): Likewise.
23886
23887 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23888
23889 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
23890 (aarch64_maybe_expand_sve_subreg_move): Declare.
23891 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
23892 * config/aarch64/predicates.md (aarch64_any_register_operand): New
23893 predicate.
23894 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
23895 that are semantically a reverse operation.
23896 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
23897 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
23898 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
23899 functions.
23900 (aarch64_can_change_mode_class): For big-endian, forbid changes
23901 between two SVE modes if they have different element sizes.
23902
23903 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23904
23905 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
23906 the TImode handling for big-endian targets.
23907
23908 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23909
23910 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
23911 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
23912 not just bytes.
23913 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
23914 Remove BSWAP handing for big-endian targets and use the form of
23915 LD1RQ appropariate for the mode.
23916
23917 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23918
23919 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
23920 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
23921 duplicated element.
23922
23923 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23924
23925 PR tearget/83845
23926 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
23927 check for operands that need to go through aarch64_sve_reload_be.
23928
23929 2018-02-01 Jakub Jelinek <jakub@redhat.com>
23930
23931 PR tree-optimization/81661
23932 PR tree-optimization/84117
23933 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
23934 * tree-eh.c: Include gimplify.h.
23935 (find_trapping_overflow, replace_trapping_overflow,
23936 rewrite_to_non_trapping_overflow): New functions.
23937 * tree-vect-loop.c: Include tree-eh.h.
23938 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
23939 * tree-data-ref.c: Include tree-eh.h.
23940 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
23941
23942 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
23943
23944 PR rtl-optimization/84123
23945 * combine.c (change_zero_ext): Check if hard register satisfies
23946 can_change_dest_mode before calling gen_lowpart_SUBREG.
23947
23948 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
23949
23950 PR target/82444
23951 * ira.c (ira_init_register_move_cost): Remove assert.
23952
23953 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23954
23955 PR rtl-optimization/84071
23956 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
23957 * doc/tm.texi: Regenerate.
23958
23959 2018-01-31 Richard Biener <rguenther@suse.de>
23960
23961 PR tree-optimization/84132
23962 * tree-data-ref.c (analyze_miv_subscript): Properly
23963 check whether evolution_function_is_affine_multivariate_p
23964 before calling gcd_of_steps_may_divide_p.
23965
23966 2018-01-31 Julia Koval <julia.koval@intel.com>
23967
23968 PR target/83618
23969 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
23970 * config/i386/i386.md (rdpid_rex64) New.
23971 (rdpid): Make 32bit only.
23972
23973 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
23974
23975 PR lto/84105
23976 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
23977 an IDENTIFIER_NODE for FUNCTION_TYPE's.
23978
23979 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23980
23981 Revert
23982 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23983
23984 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23985
23986 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23987
23988 PR rtl-optimization/84071
23989 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
23990 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
23991
23992 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
23993
23994 * config/arc/arc.c (arc_handle_aux_attribute): New function.
23995 (arc_attribute_table): Add 'aux' attribute.
23996 (arc_in_small_data_p): Consider aux like variables.
23997 (arc_is_aux_reg_p): New function.
23998 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
23999 (arc_get_aux_arg): New function.
24000 (prepare_move_operands): Handle aux-register access.
24001 (arc_handle_aux_attribute): New function.
24002 * doc/extend.texi (ARC Variable attributes): Add subsection.
24003
24004 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24005
24006 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
24007 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
24008 (arc_attribute_table): Add 'uncached' attribute.
24009 (arc_print_operand): Print '.di' flag for uncached memory
24010 accesses.
24011 (arc_in_small_data_p): Do not consider for small data the uncached
24012 types.
24013 (arc_is_uncached_mem_p): New function.
24014 * config/arc/predicates.md (compact_store_memory_operand): Check
24015 for uncached memory accesses.
24016 (nonvol_nonimm_operand): Likewise.
24017 * doc/extend.texi (ARC Type Attribute): New subsection.
24018
24019 2018-01-31 Jakub Jelinek <jakub@redhat.com>
24020
24021 PR c/84100
24022 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
24023 falign-loops=): Add Optimization flag.
24024
24025 2018-01-30 Jeff Law <law@redhat.com>
24026
24027 PR target/84064
24028 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
24029 INT_REGISTERS_SAVED. Check it prior to calling
24030 get_scratch_register_on_entry.
24031 (ix86_adjust_stack_and_probe): Similarly.
24032 (ix86_emit_probe_stack_range): Similarly.
24033 (ix86_expand_prologue): Corresponding changes.
24034
24035 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24036
24037 PR target/40411
24038 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
24039 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
24040
24041 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
24042
24043 PR target/84112
24044 * lra-constraints.c (curr_insn_transform): Process AND in the
24045 address.
24046
24047 2018-01-30 Jakub Jelinek <jakub@redhat.com>
24048
24049 PR rtl-optimization/83986
24050 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
24051 dependence against last_pending_memory_flush in addition to
24052 pending_jump_insns.
24053
24054 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
24055
24056 PR tree-optimization/81611
24057 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
24058 copies.
24059
24060 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24061
24062 PR target/83758
24063 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
24064 a reg rtx.
24065
24066 2018-01-30 Richard Biener <rguenther@suse.de>
24067 Jakub Jelinek <jakub@redhat.com>
24068
24069 PR tree-optimization/84111
24070 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
24071 inner loops added during recursion, as they don't have up-to-date
24072 SSA form.
24073
24074 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24075
24076 PR ipa/81360
24077 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
24078 (can_inline_edge_by_limits_p): ... here.
24079 (can_early_inline_edge_p, check_callers,
24080 update_caller_keys, update_callee_keys, recursive_inlining,
24081 add_new_edges_to_heap, speculation_useful_p,
24082 inline_small_functions,
24083 inline_small_functions, flatten_function,
24084 inline_to_all_callers_1): Update.
24085
24086 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24087
24088 * profile-count.c (profile_count::combine_with_ipa_count): Handle
24089 zeros correctly.
24090
24091 2018-01-30 Richard Biener <rguenther@suse.de>
24092
24093 PR tree-optimization/83008
24094 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
24095 invariant and constant vector uses in stmts when they need
24096 more than one stmt.
24097
24098 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24099
24100 PR bootstrap/84017
24101 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
24102 * configure: Regenerate.
24103
24104 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24105
24106 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
24107 pattern.
24108 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
24109 Use gen_rtx_REG rather than gen_lowpart.
24110
24111 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24112
24113 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
24114 rather than 0 when creating partial subregs.
24115
24116 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24117
24118 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
24119 of usage.
24120
24121 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
24122
24123 PR target/81550
24124 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
24125 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
24126 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
24127 flags. This restores the settings used before the 2017-07-24.
24128 Turning off pre increment/decrement/modify allows IVOPTS to
24129 optimize DF/SF loops where the index is an int.
24130
24131 2018-01-29 Richard Biener <rguenther@suse.de>
24132 Kelvin Nilsen <kelvin@gcc.gnu.org>
24133
24134 PR bootstrap/80867
24135 * tree-vect-stmts.c (vectorizable_call): Don't call
24136 targetm.vectorize_builtin_md_vectorized_function if callee is
24137 NULL.
24138
24139 2018-01-22 Carl Love <cel@us.ibm.com>
24140
24141 * doc/extend.tex: Fix typo in second arg in
24142 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
24143
24144 2018-01-29 Richard Biener <rguenther@suse.de>
24145
24146 PR tree-optimization/84086
24147 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
24148 (flush_ssaname_freelist): When SSA names were released reset
24149 the SCEV hash table.
24150
24151 2018-01-29 Richard Biener <rguenther@suse.de>
24152
24153 PR tree-optimization/84057
24154 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
24155 removed paths when removing edges.
24156
24157 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
24158
24159 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24160 -mfunction-return=@var{choice}.
24161
24162 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
24163
24164 PR diagnostic/84034
24165 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24166 Handle CR like TAB.
24167 (layout::print_source_line): Likewise.
24168 (test_get_line_width_without_trailing_whitespace): Add test cases.
24169
24170 2018-01-27 Jakub Jelinek <jakub@redhat.com>
24171
24172 PR middle-end/84040
24173 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24174 debug insns.
24175
24176 2018-01-26 Jim Wilson <jimw@sifive.com>
24177
24178 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24179
24180 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24181 specified.
24182
24183 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24184
24185 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24186 and CMP + SUB-immediate -> SUBS.
24187
24188 2018-01-26 Martin Sebor <msebor@redhat.com>
24189
24190 PR tree-optimization/83896
24191 * tree-ssa-strlen.c (get_string_len): Rename...
24192 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
24193 Avoid assuming length is constant.
24194 (handle_char_store): Use HOST_WIDE_INT for string length.
24195
24196 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
24197
24198 PR target/81763
24199 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24200 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24201
24202 2018-01-26 Richard Biener <rguenther@suse.de>
24203
24204 PR rtl-optimization/84003
24205 * dse.c (record_store): Only record redundant stores when
24206 the earlier store aliases at least all accesses the later one does.
24207
24208 2018-01-26 Jakub Jelinek <jakub@redhat.com>
24209
24210 PR rtl-optimization/83985
24211 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24212 REG_CFA_RESTORE insns.
24213 (delete_unmarked_insns): Don't ignore separate shrink wrapping
24214 REG_CFA_RESTORE insns here.
24215
24216 PR c/83989
24217 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24218 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24219
24220 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24221
24222 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24223 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24224 (arc_init): Likewise.
24225 (arc_override_options): Likewise.
24226 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24227 value.
24228 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24229 support.
24230 * config/arc/arc.h (TARGET_DBNZ): Define.
24231 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24232 properly set the tune attribute.
24233 (dbnz): Use TARGET_DBNZ guard.
24234 * config/arc/arc.opt (mtune): Add core3 option.
24235
24236 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24237
24238 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24239 recognize new pic like addresses.
24240 (arc_delegitimize_address): Clean up.
24241
24242 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24243
24244 * config/arc/arc-arches.def: Option mrf16 valid for all
24245 architectures.
24246 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24247 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24248 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24249 * config/arc/arc-tables.opt: Regenerate.
24250 * config/arc/arc.c (arc_conditional_register_usage): Handle
24251 reduced register file case.
24252 (arc_file_start): Set must have build attributes.
24253 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24254 mrf16 option value.
24255 * config/arc/arc.opt (mrf16): Add new option.
24256 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24257 * config/arc/genmultilib.awk: Handle new mrf16 option.
24258 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24259 * config/arc/t-multilib: Regenerate.
24260 * doc/invoke.texi (ARC Options): Document mrf16 option.
24261
24262 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24263
24264 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24265 * config/arc/arc.c (arc_handle_secure_attribute): New function.
24266 (arc_attribute_table): Add 'secure_call' attribute.
24267 (arc_print_operand): Print secure call operand.
24268 (arc_function_ok_for_sibcall): Don't optimize tail calls when
24269 secure.
24270 (arc_is_secure_call_p): New function. * config/arc/arc.md
24271 (call_i): Add support for sjli instruction.
24272 (call_value_i): Likewise.
24273 * config/arc/constraints.md (Csc): New constraint.
24274
24275 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24276 John Eric Martin <John.Martin@emmicro-us.com>
24277
24278 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24279 * config/arc/arc.c (_arc_jli_section): New struct.
24280 (arc_jli_section): New type.
24281 (rc_jli_sections): New static variable.
24282 (arc_handle_jli_attribute): New function.
24283 (arc_attribute_table): Add jli_always and jli_fixed attribute.
24284 (arc_file_end): New function.
24285 (TARGET_ASM_FILE_END): Define.
24286 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24287 (arc_add_jli_section): New function.
24288 (jli_call_scan): Likewise.
24289 (arc_reorg): Call jli_call_scan.
24290 (arc_output_addsi): Remove 'S' from printing asm operand.
24291 (arc_is_jli_call_p): New function.
24292 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24293 operand.
24294 (movhi_insn): Likewise.
24295 (movsi_insn): Likewise.
24296 (movsi_set_cc_insn): Likewise.
24297 (loadqi_update): Likewise.
24298 (load_zeroextendqisi_update): Likewise.
24299 (load_signextendqisi_update): Likewise.
24300 (loadhi_update): Likewise.
24301 (load_zeroextendhisi_update): Likewise.
24302 (load_signextendhisi_update): Likewise.
24303 (loadsi_update): Likewise.
24304 (loadsf_update): Likewise.
24305 (movsicc_insn): Likewise.
24306 (bset_insn): Likewise.
24307 (bxor_insn): Likewise.
24308 (bclr_insn): Likewise.
24309 (bmsk_insn): Likewise.
24310 (bicsi3_insn): Likewise.
24311 (cmpsi_cc_c_insn): Likewise.
24312 (movsi_ne): Likewise.
24313 (movsi_cond_exec): Likewise.
24314 (clrsbsi2): Likewise.
24315 (norm_f): Likewise.
24316 (normw): Likewise.
24317 (swap): Likewise.
24318 (divaw): Likewise.
24319 (flag): Likewise.
24320 (sr): Likewise.
24321 (kflag): Likewise.
24322 (ffs): Likewise.
24323 (ffs_f): Likewise.
24324 (fls): Likewise.
24325 (call_i): Remove 'S' asm letter, add jli instruction.
24326 (call_value_i): Likewise.
24327 * config/arc/arc.op (mjli-always): New option.
24328 * config/arc/constraints.md (Cji): New constraint.
24329 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24330 operand.
24331 (subsf3_fpx): Likewise.
24332 (mulsf3_fpx): Likewise.
24333 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24334 asm operand.
24335 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24336 function attrbutes.
24337 * doc/invoke.texi (ARC): Document mjli-always option.
24338
24339 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
24340
24341 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24342 avoid addition with 0 and use incw and decw where possible.
24343
24344 2018-01-26 Richard Biener <rguenther@suse.de>
24345
24346 PR tree-optimization/81082
24347 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24348 association if it requires casting to unsigned.
24349 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24350 from fold_plusminus_mult_expr to catch important cases late when
24351 range info is available.
24352
24353 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24354
24355 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24356 * configure.ac (hidden_linkonce): New test.
24357 * configure: Regenerate.
24358 * config.in: Regenerate.
24359
24360 2018-01-26 Julia Koval <julia.koval@intel.com>
24361
24362 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24363 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24364 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24365 _mm_mask_bitshuffle_epi64_mask): Fix type.
24366 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24367 USI_FTYPE_V4DI_V4DI_USI): Remove.
24368 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24369 __builtin_ia32_vpshufbitqmb256_mask,
24370 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24371 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24372 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24373
24374 2018-01-26 Alan Modra <amodra@gmail.com>
24375
24376 PR target/84033
24377 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24378 UNSPEC_VBPERMQ. Sort other unspecs.
24379
24380 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
24381
24382 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24383
24384 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
24385
24386 PR middle-end/83055
24387 * predict.c (drop_profile): Do not push/pop cfun; update also
24388 node->count.
24389 (handle_missing_profiles): Fix logic looking for zero profiles.
24390
24391 2018-01-25 Jakub Jelinek <jakub@redhat.com>
24392
24393 PR middle-end/83977
24394 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24395 on functions with #pragma omp declare simd or functions with simd
24396 attribute.
24397 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24398 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24399 Remove trailing \n from warning_at calls.
24400
24401 2018-01-25 Tom de Vries <tom@codesourcery.com>
24402
24403 PR target/84028
24404 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24405 for neutered workers.
24406
24407 2018-01-24 Joseph Myers <joseph@codesourcery.com>
24408
24409 PR target/68467
24410 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
24411 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
24412
24413 2018-01-24 Jeff Law <law@redhat.com>
24414
24415 PR target/83994
24416 * i386.c (get_probe_interval): Move to earlier point.
24417 (ix86_compute_frame_layout): If -fstack-clash-protection and
24418 the frame is larger than the probe interval, then use pushes
24419 to save registers rather than reg->mem moves.
24420 (ix86_expand_prologue): Remove conditional for int_registers_saved
24421 assertion.
24422
24423 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
24424
24425 PR target/84014
24426 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
24427 min/max for never referenced object.
24428
24429 2018-01-24 Jakub Jelinek <jakub@redhat.com>
24430
24431 PR middle-end/83977
24432 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
24433 here.
24434 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
24435 attributes from DECL_ATTRIBUTES (decl) without affecting
24436 DECL_ATTRIBUTES (current_function_decl).
24437 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
24438 functions with non-NULL DECL_ABSTRACT_ORIGIN.
24439
24440 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
24441
24442 PR tree-optimization/83979
24443 * fold-const.c (fold_comparison): Use constant_boolean_node
24444 instead of boolean_{true,false}_node.
24445
24446 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
24447
24448 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
24449 with zero counts.
24450
24451 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24452
24453 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24454 Simplify the clause that sets the length attribute.
24455 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24456 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
24457 clause that sets the length attribute.
24458 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24459
24460 2018-01-24 Tom de Vries <tom@codesourcery.com>
24461
24462 PR target/83589
24463 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
24464 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
24465 Add strict parameter.
24466 (prevent_branch_around_nothing): Insert dummy insn between branch to
24467 label and label with no ptx insn inbetween.
24468 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
24469
24470 2018-01-24 Tom de Vries <tom@codesourcery.com>
24471
24472 PR target/81352
24473 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24474 for neutered threads in warp.
24475 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
24476
24477 2018-01-24 Richard Biener <rguenther@suse.de>
24478
24479 PR tree-optimization/83176
24480 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
24481 operands.
24482
24483 2018-01-24 Richard Biener <rguenther@suse.de>
24484
24485 PR tree-optimization/82819
24486 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
24487 code generating pluses that are no-ops in the target precision.
24488
24489 2018-01-24 Richard Biener <rguenther@suse.de>
24490
24491 PR middle-end/84000
24492 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
24493
24494 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24495
24496 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
24497 to merge probabilities.
24498 * predict.c (probably_never_executed): Also mark as cold functions
24499 with global 0 profile and guessed local profile.
24500 * profile-count.c (profile_probability::combine_with_count): New
24501 member function.
24502 * profile-count.h (profile_probability::operator*,
24503 profile_probability::operator*=, profile_probability::operator/,
24504 profile_probability::operator/=): Reduce precision to adjusted
24505 and set value to guessed on contradictory divisions.
24506 (profile_probability::combine_with_freq): Remove.
24507 (profile_probability::combine_wiht_count): Declare.
24508 (profile_count::force_nonzero):: Set to adjusted.
24509 (profile_count::probability_in):: Set quality to adjusted.
24510 * tree-ssa-tail-merge.c (replace_block_by): Use
24511 combine_with_count.
24512
24513 2018-01-23 Andrew Waterman <andrew@sifive.com>
24514 Jim Wilson <jimw@sifive.com>
24515
24516 * config/riscv/riscv.c (riscv_stack_boundary): New.
24517 (riscv_option_override): Set riscv_stack_boundary. Handle
24518 riscv_preferred_stack_boundary_arg.
24519 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
24520 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
24521 (STACK_BOUNDARY): Set to riscv_stack_boundary.
24522 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
24523 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
24524 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
24525
24526 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
24527
24528 PR target/83905
24529 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
24530 of struct ix86_frame.
24531 (ix86_expand_epilogue): Likewise. Add a local variable for
24532 the reg_save_offset field in struct ix86_frame.
24533
24534 2018-01-23 Bin Cheng <bin.cheng@arm.com>
24535
24536 PR tree-optimization/82604
24537 * tree-loop-distribution.c (enum partition_kind): New enum item
24538 PKIND_PARTIAL_MEMSET.
24539 (partition_builtin_p): Support above new enum item.
24540 (generate_code_for_partition): Ditto.
24541 (compute_access_range): Differentiate cases that equality can be
24542 proven at all loops, the innermost loops or no loops.
24543 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
24544 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
24545 (finalize_partitions, distribute_loop): Don't fuse partition of
24546 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
24547 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
24548 parloop is enabled.
24549
24550 2018-01-23 Martin Liska <mliska@suse.cz>
24551
24552 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
24553 order to ignore the predictor.
24554 (PRED_POLYMORPHIC_CALL): Likewise.
24555 (PRED_RECURSIVE_CALL): Likewise.
24556
24557 2018-01-23 Martin Liska <mliska@suse.cz>
24558
24559 * tree-profile.c (tree_profiling): Print function header to
24560 aware reader which function we are working on.
24561 * value-prof.c (gimple_find_values_to_profile): Do not print
24562 not interesting value histograms.
24563
24564 2018-01-23 Martin Liska <mliska@suse.cz>
24565
24566 * profile-count.h (enum profile_quality): Add
24567 profile_uninitialized as the first value. Do not number values
24568 as they are zero based.
24569 (profile_count::verify): Update sanity check.
24570 (profile_probability::verify): Likewise.
24571
24572 2018-01-23 Nathan Sidwell <nathan@acm.org>
24573
24574 * doc/invoke.texi (ffor-scope): Deprecate.
24575
24576 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24577
24578 PR tree-optimization/83510
24579 * domwalk.c (set_all_edges_as_executable): New function.
24580 (dom_walker::dom_walker): Convert bool param
24581 "skip_unreachable_blocks" to enum reachability. Move setup of
24582 edge flags to set_all_edges_as_executable and only do it when
24583 reachability is REACHABLE_BLOCKS.
24584 * domwalk.h (enum dom_walker::reachability): New enum.
24585 (dom_walker::dom_walker): Convert bool param
24586 "skip_unreachable_blocks" to enum reachability.
24587 (set_all_edges_as_executable): New decl.
24588 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
24589 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
24590 "reachability".
24591 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
24592 but converting true to REACHABLE_BLOCKS.
24593 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
24594 * tree-vrp.c
24595 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
24596 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
24597 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
24598 REACHABLE_BLOCKS.
24599 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
24600 if check_all_array_refs will be called.
24601
24602 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24603
24604 * tree.c (selftest::test_location_wrappers): Add more test
24605 coverage.
24606
24607 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24608
24609 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
24610 (selftest::test_bit_in_range): Likewise.
24611
24612 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24613
24614 PR testsuite/83888
24615 * doc/sourcebuild.texi (vect_float): Say that the selector
24616 only describes the situation when -funsafe-math-optimizations is on.
24617 (vect_float_strict): Document.
24618
24619 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24620
24621 PR tree-optimization/83965
24622 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
24623 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
24624 instead of checking only for a reduction.
24625 (vect_recog_widen_sum_pattern): Likewise.
24626
24627 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24628
24629 * predict.c (probably_never_executed): Only use precise profile info.
24630 (compute_function_frequency): Skip after inlining hack since we now
24631 have quality checking.
24632
24633 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24634
24635 * profile-count.h (profile_probability::very_unlikely,
24636 profile_probability::unlikely, profile_probability::even): Set
24637 precision to guessed.
24638
24639 2018-01-23 Richard Biener <rguenther@suse.de>
24640
24641 PR tree-optimization/83963
24642 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
24643 Properly terminate dominator walk when crossing the exit edge not
24644 when visiting its source block.
24645
24646 2018-01-23 Jakub Jelinek <jakub@redhat.com>
24647
24648 PR c++/83918
24649 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
24650 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
24651
24652 2018-01-22 Jakub Jelinek <jakub@redhat.com>
24653
24654 PR tree-optimization/83957
24655 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
24656 semicolon after for body surrounded by braces.
24657
24658 PR tree-optimization/83081
24659 * profile-count.h (profile_probability::split): New method.
24660 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
24661 Use profile_probability::split.
24662 (do_compare_rtx_and_jump): Fix adjustment of probabilities
24663 when splitting a single conditional jump into 2.
24664
24665 2018-01-22 David Malcolm <dmalcolm@redhat.com>
24666
24667 PR tree-optimization/69452
24668 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
24669 decl.
24670
24671 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24672
24673 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
24674 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
24675 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
24676
24677 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24678
24679 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
24680 declaration.
24681 * config/rl78/rl78.md (movdi): New define_expand.
24682 * config/rl78/rl78.c (rl78_split_movdi): New function.
24683
24684 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
24685
24686 PR target/83862
24687 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
24688 no longer used.
24689 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
24690 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
24691 128-bit to produce an UNSPEC move to get the double word with the
24692 signbit and then a shift directly to do signbit.
24693 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
24694 implementation with a new version that just does either a direct
24695 move or a regular move. Move memory interface to separate insns.
24696 Move insns so they are next to the expander.
24697 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
24698 with signbit move. Split big and little endian case.
24699 (signbit<mode>2_dm_mem_le): Likewise.
24700 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
24701 (signbit<mode>2_dm2): Likewise.
24702
24703 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24704
24705 * config/rl78/rl78.md (anddi3): New define_expand.
24706
24707 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24708
24709 * config/rl78/rl78.md (umindi3): New define_expand.
24710
24711 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24712
24713 * config/rl78/rl78.md (smindi3): New define_expand.
24714
24715 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24716
24717 * config/rl78/rl78.md (smaxdi3): New define_expand.
24718
24719 2018-01-22 Carl Love <cel@us.ibm.com>
24720
24721 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
24722 LVX_V1TI): Add macro expansion.
24723 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
24724 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
24725 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
24726 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
24727 Change check to determine if the instruction is a byte reversing
24728 entry. Fix typo in comment.
24729 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
24730 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
24731 Add def_builtin calls for new builtins.
24732 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
24733 Add define_insn expansion.
24734
24735 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24736
24737 * config/rl78/rl78.md (umaxdi3): New define_expand.
24738
24739 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24740
24741 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
24742 for non-QImode registers.
24743
24744 2018-01-22 Richard Biener <rguenther@suse.de>
24745
24746 PR tree-optimization/83963
24747 * graphite-scop-detection.c (scop_detection::get_sese): Delay
24748 including the loop exit block.
24749 (scop_detection::merge_sese): Likewise.
24750 (scop_detection::add_scop): Do it here instead.
24751
24752 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24753
24754 * doc/sourcebuild.texi (arm_softfloat): Document.
24755
24756 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
24757
24758 PR gcc/77734
24759 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
24760 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
24761 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
24762
24763 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24764 David Edelsohn <dje.gcc@gmail.com>
24765
24766 PR target/83946
24767 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24768 Change "crset eq" to "crset 2".
24769 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24770 (*call_indirect_aix<mode>_nospec): Likewise.
24771 (*call_value_indirect_aix<mode>_nospec): Likewise.
24772 (*call_indirect_elfv2<mode>_nospec): Likewise.
24773 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
24774 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
24775 change assembly output from . to $.
24776 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24777 (indirect_jump<mode>_nospec): Change assembly output from . to $.
24778 (*tablejump<mode>_internal1_nospec): Likewise.
24779
24780 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
24781
24782 PR target/80870
24783 * config/sh/sh_optimize_sett_clrt.cc:
24784 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
24785
24786 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
24787
24788 PR tree-optimization/83940
24789 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
24790 offset_dt to vect_constant_def rather than vect_unknown_def_type.
24791 (vect_check_load_store_mask): Add a mask_dt_out parameter and
24792 use it to pass back the definition type.
24793 (vect_check_store_rhs): Likewise rhs_dt_out.
24794 (vect_build_gather_load_calls): Add a mask_dt argument and use
24795 it instead of a call to vect_is_simple_use.
24796 (vectorizable_store): Update calls to vect_check_load_store_mask
24797 and vect_check_store_rhs. Use the dt returned by the latter instead
24798 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
24799 instead of calls to vect_is_simple_use. Pass the scalar rather
24800 than the vector operand to vect_is_simple_use when handling
24801 second and subsequent copies of an rhs value.
24802 (vectorizable_load): Update calls to vect_check_load_store_mask
24803 and vect_build_gather_load_calls. Use the cached mask_dt and
24804 gs_info.offset_dt instead of calls to vect_is_simple_use.
24805
24806 2018-01-20 Jakub Jelinek <jakub@redhat.com>
24807
24808 PR middle-end/83945
24809 * tree-emutls.c: Include gimplify.h.
24810 (lower_emutls_2): New function.
24811 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
24812 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
24813 it before further processing.
24814
24815 PR target/83930
24816 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
24817 UINTVAL (trueop1) instead of INTVAL (op1).
24818
24819 2018-01-19 Jakub Jelinek <jakub@redhat.com>
24820
24821 PR debug/81570
24822 PR debug/83728
24823 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
24824 INCOMING_FRAME_SP_OFFSET if not defined.
24825 (scan_trace): Add ENTRY argument. If true and
24826 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
24827 emit a note to adjust the CFA offset.
24828 (create_cfi_notes): Adjust scan_trace callers.
24829 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
24830 INCOMING_FRAME_SP_OFFSET in the CIE.
24831 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
24832 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
24833 Likewise.
24834 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
24835 * doc/tm.texi: Regenerated.
24836
24837 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24838
24839 PR rtl-optimization/83147
24840 * lra-constraints.c (remove_inheritance_pseudos): Use
24841 lra_substitute_pseudo_within_insn.
24842
24843 2018-01-19 Tom de Vries <tom@codesourcery.com>
24844 Cesar Philippidis <cesar@codesourcery.com>
24845
24846 PR target/83920
24847 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
24848
24849 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
24850
24851 PR target/83790
24852 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
24853 spaces for function labels.
24854
24855 2018-01-19 Martin Liska <mliska@suse.cz>
24856
24857 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
24858 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
24859 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
24860 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
24861 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
24862 (PRED_CONST_RETURN): Change from 69 to 65.
24863 (PRED_NULL_RETURN): Change from 91 to 71.
24864 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
24865 (PRED_LOOP_GUARD): Change from 66 to 73.
24866
24867 2018-01-19 Martin Liska <mliska@suse.cz>
24868
24869 * predict.c (predict_insn_def): Add new assert.
24870 (struct branch_predictor): Change type to signed integer.
24871 (test_prediction_value_range): Amend test to cover
24872 PROB_UNINITIALIZED.
24873 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
24874 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
24875 (PRED_LOOP_ITERATIONS_MAX): Likewise.
24876 (PRED_LOOP_IV_COMPARE): Likewise.
24877 * predict.h (PROB_UNINITIALIZED): Define new constant.
24878
24879 2018-01-19 Martin Liska <mliska@suse.cz>
24880
24881 * predict.c (dump_prediction): Add new format for
24882 analyze_brprob.py script which is enabled with -details
24883 suboption.
24884 * profile-count.h (precise_p): New function.
24885
24886 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
24887
24888 PR tree-optimization/83922
24889 * tree-vect-loop.c (vect_verify_full_masking): Return false if
24890 there are no statements that need masking.
24891 (vect_active_double_reduction_p): New function.
24892 (vect_analyze_loop_operations): Use it when handling phis that
24893 are not in the loop header.
24894
24895 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
24896
24897 PR tree-optimization/83914
24898 * tree-vect-loop.c (vectorizable_induction): Don't convert
24899 init_expr or apply the peeling adjustment for inductions
24900 that are nested within the vectorized loop.
24901
24902 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24903
24904 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
24905 instead of NEG.
24906
24907 2018-01-18 Jakub Jelinek <jakub@redhat.com>
24908
24909 PR sanitizer/81715
24910 PR testsuite/83882
24911 * function.h (gimplify_parameters): Add gimple_seq * argument.
24912 * function.c: Include gimple.h and options.h.
24913 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
24914 for the added local temporaries if needed.
24915 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
24916 if there are any parameter cleanups, wrap whole body into a
24917 try/finally with the cleanups.
24918
24919 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
24920
24921 PR target/82964
24922 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
24923 Use GET_MODE_CLASS for scalar floating point.
24924
24925 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
24926
24927 PR ipa/82256
24928 patch by PaX Team
24929 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
24930 Fix call of call_cgraph_insertion_hooks.
24931
24932 2018-01-18 Martin Sebor <msebor@redhat.com>
24933
24934 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
24935
24936 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
24937
24938 PR ipa/83619
24939 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
24940 frequencies.
24941
24942 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
24943
24944 PR other/70268
24945 * common.opt: (-ffile-prefix-map): New option.
24946 * opts.c (common_handle_option): Defer it.
24947 * opts-global.c (handle_common_deferred_options): Handle it.
24948 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
24949 * file-prefix-map.h: New file.
24950 (remap_debug_filename, add_debug_prefix_map): ...here.
24951 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
24952 * final.c (debug_prefix_map, add_debug_prefix_map
24953 remap_debug_filename): Move to...
24954 * file-prefix-map.c: New file.
24955 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
24956 generalize, get rid of alloca(), use strrchr() instead of strchr().
24957 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
24958 Implement in terms of add_prefix_map().
24959 (remap_macro_filename, remap_debug_filename): Implement in term of
24960 remap_filename().
24961 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
24962 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
24963 * dbxout.c: Include file-prefix-map.h.
24964 * varasm.c: Likewise.
24965 * vmsdbgout.c: Likewise.
24966 * xcoffout.c: Likewise.
24967 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
24968 * doc/cppopts.texi (-fmacro-prefix-map): Document.
24969 * doc/invoke.texi (-ffile-prefix-map): Document.
24970 (-fdebug-prefix-map): Update description.
24971
24972 2018-01-18 Martin Liska <mliska@suse.cz>
24973
24974 * config/i386/i386.c (indirect_thunk_name): Document that also
24975 lfence is emitted.
24976 (output_indirect_thunk): Document why both instructions
24977 (pause and lfence) are generated.
24978
24979 2018-01-18 Richard Biener <rguenther@suse.de>
24980
24981 PR tree-optimization/83887
24982 * graphite-scop-detection.c
24983 (scop_detection::get_nearest_dom_with_single_entry): Remove.
24984 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
24985 (scop_detection::merge_sese): Re-implement with a flood-fill
24986 algorithm that properly finds a SESE region if it exists.
24987
24988 2018-01-18 Jakub Jelinek <jakub@redhat.com>
24989
24990 PR c/61240
24991 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
24992 pointer_diff optimizations use view_convert instead of convert.
24993
24994 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24995
24996 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24997 Generate different code for -mno-speculate-indirect-jumps.
24998 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24999 (*call_indirect_aix<mode>): Disable for
25000 -mno-speculate-indirect-jumps.
25001 (*call_indirect_aix<mode>_nospec): New define_insn.
25002 (*call_value_indirect_aix<mode>): Disable for
25003 -mno-speculate-indirect-jumps.
25004 (*call_value_indirect_aix<mode>_nospec): New define_insn.
25005 (*sibcall_nonlocal_sysv<mode>): Generate different code for
25006 -mno-speculate-indirect-jumps.
25007 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25008
25009 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25010
25011 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
25012 long double type, set the flags for noting the default long double
25013 type, even if we don't pass or return a long double type.
25014
25015 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
25016
25017 PR ipa/83051
25018 * ipa-inline.c (flatten_function): Do not overwrite final inlining
25019 failure.
25020
25021 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
25022
25023 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
25024 support for merge[hl].
25025 (fold_mergehl_helper): New helper function.
25026 (tree-vector-builder.h): New #include for tree_vector_builder usage.
25027 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
25028 (altivec_vmrglw_direct): Add xxmrglw insn.
25029
25030 2018-01-17 Andrew Waterman <andrew@sifive.com>
25031
25032 * config/riscv/riscv.c (riscv_conditional_register_usage): If
25033 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
25034
25035 2018-01-17 David Malcolm <dmalcolm@redhat.com>
25036
25037 PR lto/83121
25038 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
25039 call the lto_location_cache before reading the
25040 DECL_SOURCE_LOCATION of the types.
25041
25042 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
25043 Richard Sandiford <richard.sandiford@linaro.org>
25044
25045 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
25046 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
25047 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
25048 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
25049 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
25050 Add declaration.
25051 * config/aarch64/constraints.md (aarch64_movti_operand):
25052 Limit immediates.
25053 * config/aarch64/predicates.md (Uti): Add new constraint.
25054
25055 2018-01-17 Carl Love <cel@us.ibm.com>
25056
25057 * config/rs6000/vsx.md (define_expand xl_len_r,
25058 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
25059 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
25060 lxvll.
25061 (define_expand, define_insn): Move the shift left from the
25062 define_insn to the define_expand for lxvl and stxvl instructions.
25063 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
25064 and XL_LEN_R definitions to PURE.
25065
25066 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
25067
25068 * config/i386/i386.c (indirect_thunk_name): Declare regno
25069 as unsigned int. Compare regno with INVALID_REGNUM.
25070 (output_indirect_thunk): Ditto.
25071 (output_indirect_thunk_function): Ditto.
25072 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
25073 in the call to output_indirect_thunk_function.
25074
25075 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
25076
25077 PR middle-end/83884
25078 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
25079 rather than the size of inner_type to determine the stack slot size
25080 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
25081
25082 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
25083
25084 PR target/83546
25085 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
25086 to PTA_SILVERMONT.
25087
25088 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
25089
25090 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
25091 endian Linux systems to optionally enable multilibs for selecting
25092 the long double type if the user configured an explicit type.
25093 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
25094 have no long double multilibs if not defined.
25095 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
25096 warn if the user used -mabi={ieee,ibm}longdouble and we built
25097 multilibs for long double.
25098 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
25099 appropriate multilib option.
25100 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
25101 multilib options.
25102 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
25103 for building long double multilibs.
25104 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
25105
25106 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
25107
25108 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
25109 copies.
25110
25111 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
25112 64 bits.
25113 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
25114 128 bits.
25115
25116 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
25117 variables.
25118
25119 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
25120 return value.
25121
25122 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25123
25124 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
25125 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
25126
25127 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
25128
25129 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
25130 different rtl trees depending on TARGET_64BIT.
25131 (rs6000_gen_lvx): Likewise.
25132
25133 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25134
25135 * config/visium/visium.md (nop): Tweak comment.
25136 (hazard_nop): Likewise.
25137
25138 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25139
25140 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
25141 -mspeculate-indirect-jumps.
25142 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
25143 for -mno-speculate-indirect-jumps.
25144 (*call_indirect_elfv2<mode>_nospec): New define_insn.
25145 (*call_value_indirect_elfv2<mode>): Disable for
25146 -mno-speculate-indirect-jumps.
25147 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
25148 (indirect_jump): Emit different RTL for
25149 -mno-speculate-indirect-jumps.
25150 (*indirect_jump<mode>): Disable for
25151 -mno-speculate-indirect-jumps.
25152 (*indirect_jump<mode>_nospec): New define_insn.
25153 (tablejump): Emit different RTL for
25154 -mno-speculate-indirect-jumps.
25155 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
25156 (tablejumpsi_nospec): New define_expand.
25157 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
25158 (tablejumpdi_nospec): New define_expand.
25159 (*tablejump<mode>_internal1): Disable for
25160 -mno-speculate-indirect-jumps.
25161 (*tablejump<mode>_internal1_nospec): New define_insn.
25162 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25163 option.
25164
25165 2018-01-16 Artyom Skrobov tyomitch@gmail.com
25166
25167 * caller-save.c (insert_save): Drop unnecessary parameter. All
25168 callers updated.
25169
25170 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25171 Richard Biener <rguenth@suse.de>
25172
25173 PR libgomp/83590
25174 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25175 return early, inline manually is_gimple_sizepos. Make sure if we
25176 call gimplify_expr we don't end up with a gimple constant.
25177 * tree.c (variably_modified_type_p): Don't return true for
25178 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
25179 * gimplify.h (is_gimple_sizepos): Remove.
25180
25181 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25182
25183 PR tree-optimization/83857
25184 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25185 vectorizable_live_operation for pure SLP statements.
25186 (vectorizable_live_operation): Handle PHIs.
25187
25188 2018-01-16 Richard Biener <rguenther@suse.de>
25189
25190 PR tree-optimization/83867
25191 * tree-vect-stmts.c (vect_transform_stmt): Precompute
25192 nested_in_vect_loop_p since the scalar stmt may get invalidated.
25193
25194 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25195
25196 PR c/83844
25197 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25198 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25199 If off is not INTEGER_CST, issue a may not be aligned warning
25200 rather than isn't aligned. Use isn%'t rather than isn't.
25201 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25202 into MULT_EXPR.
25203 <case MULT_EXPR>: Improve the case when bottom and one of the
25204 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25205 operand, in that case check if the other operand is multiple of
25206 bottom divided by the INTEGER_CST operand.
25207
25208 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25209
25210 PR target/83858
25211 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25212 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25213 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25214 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25215 * config/pa/pa.c (pa_function_arg_advance): Likewise.
25216 (pa_function_arg, pa_arg_partial_bytes): Likewise.
25217 (pa_function_arg_size): New function.
25218
25219 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25220
25221 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25222 in a separate statement.
25223
25224 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25225
25226 PR tree-optimization/83847
25227 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25228 group gathers and scatters.
25229
25230 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25231
25232 PR rtl-optimization/86620
25233 * params.def (max-sched-ready-insns): Bump minimum value to 1.
25234
25235 PR rtl-optimization/83213
25236 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25237 to last if both are JUMP_INSNs.
25238
25239 PR tree-optimization/83843
25240 * gimple-ssa-store-merging.c
25241 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25242 store_immediate_info for bswap/nop orig_stores.
25243
25244 2018-01-15 Andrew Waterman <andrew@sifive.com>
25245
25246 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25247 !TARGET_MUL.
25248 <UDIV>: Increase cost if !TARGET_DIV.
25249
25250 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
25251
25252 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25253 (define_attr "cr_logical_3op"): New.
25254 (cceq_ior_compare): Adjust.
25255 (cceq_ior_compare_complement): Adjust.
25256 (*cceq_rev_compare): Adjust.
25257 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25258 (is_cracked_insn): Adjust.
25259 (insn_must_be_first_in_group): Adjust.
25260 * config/rs6000/40x.md: Adjust.
25261 * config/rs6000/440.md: Adjust.
25262 * config/rs6000/476.md: Adjust.
25263 * config/rs6000/601.md: Adjust.
25264 * config/rs6000/603.md: Adjust.
25265 * config/rs6000/6xx.md: Adjust.
25266 * config/rs6000/7450.md: Adjust.
25267 * config/rs6000/7xx.md: Adjust.
25268 * config/rs6000/8540.md: Adjust.
25269 * config/rs6000/cell.md: Adjust.
25270 * config/rs6000/e300c2c3.md: Adjust.
25271 * config/rs6000/e500mc.md: Adjust.
25272 * config/rs6000/e500mc64.md: Adjust.
25273 * config/rs6000/e5500.md: Adjust.
25274 * config/rs6000/e6500.md: Adjust.
25275 * config/rs6000/mpc.md: Adjust.
25276 * config/rs6000/power4.md: Adjust.
25277 * config/rs6000/power5.md: Adjust.
25278 * config/rs6000/power6.md: Adjust.
25279 * config/rs6000/power7.md: Adjust.
25280 * config/rs6000/power8.md: Adjust.
25281 * config/rs6000/power9.md: Adjust.
25282 * config/rs6000/rs64.md: Adjust.
25283 * config/rs6000/titan.md: Adjust.
25284
25285 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25286
25287 * config/i386/predicates.md (indirect_branch_operand): Rewrite
25288 ix86_indirect_branch_register logic.
25289
25290 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25291
25292 * config/i386/constraints.md (Bs): Update
25293 ix86_indirect_branch_register check. Don't check
25294 ix86_indirect_branch_register with GOT_memory_operand.
25295 (Bw): Likewise.
25296 * config/i386/predicates.md (GOT_memory_operand): Don't check
25297 ix86_indirect_branch_register here.
25298 (GOT32_symbol_operand): Likewise.
25299
25300 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25301
25302 * config/i386/predicates.md (constant_call_address_operand):
25303 Rewrite ix86_indirect_branch_register logic.
25304 (sibcall_insn_operand): Likewise.
25305
25306 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25307
25308 * config/i386/constraints.md (Bs): Replace
25309 ix86_indirect_branch_thunk_register with
25310 ix86_indirect_branch_register.
25311 (Bw): Likewise.
25312 * config/i386/i386.md (indirect_jump): Likewise.
25313 (tablejump): Likewise.
25314 (*sibcall_memory): Likewise.
25315 (*sibcall_value_memory): Likewise.
25316 Peepholes of indirect call and jump via memory: Likewise.
25317 * config/i386/i386.opt: Likewise.
25318 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25319 (GOT_memory_operand): Likewise.
25320 (call_insn_operand): Likewise.
25321 (sibcall_insn_operand): Likewise.
25322 (GOT32_symbol_operand): Likewise.
25323
25324 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25325
25326 PR middle-end/83837
25327 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25328 type rather than type addr's type points to.
25329 (expand_omp_atomic_mutex): Likewise.
25330 (expand_omp_atomic): Likewise.
25331
25332 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25333
25334 PR target/83839
25335 * config/i386/i386.c (output_indirect_thunk_function): Use
25336 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25337 for __x86_return_thunk.
25338
25339 2018-01-15 Richard Biener <rguenther@suse.de>
25340
25341 PR middle-end/83850
25342 * expmed.c (extract_bit_field_1): Fix typo.
25343
25344 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25345
25346 PR target/83687
25347 * config/arm/iterators.md (VF): New mode iterator.
25348 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25349 Remove integer-related logic from pattern.
25350 (neon_vabd<mode>_3): Likewise.
25351
25352 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25353
25354 PR middle-end/82694
25355 * common.opt (fstrict-overflow): No longer an alias.
25356 (fwrapv-pointer): New option.
25357 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25358 also for pointer types based on flag_wrapv_pointer.
25359 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25360 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25361 opts->x_flag_wrapv got set.
25362 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25363 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25364 POINTER_TYPE_OVERFLOW_UNDEFINED.
25365 * match.pd: Likewise in address comparison pattern.
25366 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25367
25368 2018-01-15 Richard Biener <rguenther@suse.de>
25369
25370 PR lto/83804
25371 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25372 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
25373 Reset type names to their identifier if their TYPE_DECL doesn't
25374 have linkage (and thus is used for ODR and devirt).
25375 (save_debug_info_for_decl): Remove.
25376 (save_debug_info_for_type): Likewise.
25377 (add_tree_to_fld_list): Adjust.
25378 * tree-pretty-print.c (dump_generic_node): Make dumping of
25379 type names more robust.
25380
25381 2018-01-15 Richard Biener <rguenther@suse.de>
25382
25383 * BASE-VER: Bump to 8.0.1.
25384
25385 2018-01-14 Martin Sebor <msebor@redhat.com>
25386
25387 PR other/83508
25388 * builtins.c (check_access): Avoid warning when the no-warning bit
25389 is set.
25390
25391 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
25392
25393 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25394 * ira-color (allocno_hard_regs_compare): Likewise.
25395
25396 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
25397
25398 PR target/83013
25399 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25400 Use .pushsection/.popsection.
25401
25402 2018-01-14 Martin Sebor <msebor@redhat.com>
25403
25404 PR c++/81327
25405 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25406
25407 2018-01-14 Jakub Jelinek <jakub@redhat.com>
25408
25409 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
25410 entry from extra_headers.
25411 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
25412 extra_headers, make the list bitwise identical to the i?86-*-* one.
25413
25414 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25415
25416 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
25417 -mcmodel=large with -mindirect-branch=thunk,
25418 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
25419 -mfunction-return=thunk-extern.
25420 * doc/invoke.texi: Document -mcmodel=large is incompatible with
25421 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
25422 -mfunction-return=thunk and -mfunction-return=thunk-extern.
25423
25424 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25425
25426 * config/i386/i386.c (print_reg): Print the name of the full
25427 integer register without '%'.
25428 (ix86_print_operand): Handle 'V'.
25429 * doc/extend.texi: Document 'V' modifier.
25430
25431 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25432
25433 * config/i386/constraints.md (Bs): Disallow memory operand for
25434 -mindirect-branch-register.
25435 (Bw): Likewise.
25436 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25437 (GOT_memory_operand): Likewise.
25438 (call_insn_operand): Likewise.
25439 (sibcall_insn_operand): Likewise.
25440 (GOT32_symbol_operand): Likewise.
25441 * config/i386/i386.md (indirect_jump): Call convert_memory_address
25442 for -mindirect-branch-register.
25443 (tablejump): Likewise.
25444 (*sibcall_memory): Likewise.
25445 (*sibcall_value_memory): Likewise.
25446 Disallow peepholes of indirect call and jump via memory for
25447 -mindirect-branch-register.
25448 (*call_pop): Replace m with Bw.
25449 (*call_value_pop): Likewise.
25450 (*sibcall_pop_memory): Replace m with Bs.
25451 * config/i386/i386.opt (mindirect-branch-register): New option.
25452 * doc/invoke.texi: Document -mindirect-branch-register option.
25453
25454 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25455
25456 * config/i386/i386-protos.h (ix86_output_function_return): New.
25457 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
25458 set function_return_type.
25459 (indirect_thunk_name): Add ret_p to indicate thunk for function
25460 return.
25461 (output_indirect_thunk_function): Pass false to
25462 indirect_thunk_name.
25463 (ix86_output_indirect_branch_via_reg): Likewise.
25464 (ix86_output_indirect_branch_via_push): Likewise.
25465 (output_indirect_thunk_function): Create alias for function
25466 return thunk if regno < 0.
25467 (ix86_output_function_return): New function.
25468 (ix86_handle_fndecl_attribute): Handle function_return.
25469 (ix86_attribute_table): Add function_return.
25470 * config/i386/i386.h (machine_function): Add
25471 function_return_type.
25472 * config/i386/i386.md (simple_return_internal): Use
25473 ix86_output_function_return.
25474 (simple_return_internal_long): Likewise.
25475 * config/i386/i386.opt (mfunction-return=): New option.
25476 (indirect_branch): Mention -mfunction-return=.
25477 * doc/extend.texi: Document function_return function attribute.
25478 * doc/invoke.texi: Document -mfunction-return= option.
25479
25480 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25481
25482 * config/i386/i386-opts.h (indirect_branch): New.
25483 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
25484 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
25485 with local indirect jump when converting indirect call and jump.
25486 (ix86_set_indirect_branch_type): New.
25487 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
25488 (indirectlabelno): New.
25489 (indirect_thunk_needed): Likewise.
25490 (indirect_thunk_bnd_needed): Likewise.
25491 (indirect_thunks_used): Likewise.
25492 (indirect_thunks_bnd_used): Likewise.
25493 (INDIRECT_LABEL): Likewise.
25494 (indirect_thunk_name): Likewise.
25495 (output_indirect_thunk): Likewise.
25496 (output_indirect_thunk_function): Likewise.
25497 (ix86_output_indirect_branch_via_reg): Likewise.
25498 (ix86_output_indirect_branch_via_push): Likewise.
25499 (ix86_output_indirect_branch): Likewise.
25500 (ix86_output_indirect_jmp): Likewise.
25501 (ix86_code_end): Call output_indirect_thunk_function if needed.
25502 (ix86_output_call_insn): Call ix86_output_indirect_branch if
25503 needed.
25504 (ix86_handle_fndecl_attribute): Handle indirect_branch.
25505 (ix86_attribute_table): Add indirect_branch.
25506 * config/i386/i386.h (machine_function): Add indirect_branch_type
25507 and has_local_indirect_jump.
25508 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
25509 to true.
25510 (tablejump): Likewise.
25511 (*indirect_jump): Use ix86_output_indirect_jmp.
25512 (*tablejump_1): Likewise.
25513 (simple_return_indirect_internal): Likewise.
25514 * config/i386/i386.opt (mindirect-branch=): New option.
25515 (indirect_branch): New.
25516 (keep): Likewise.
25517 (thunk): Likewise.
25518 (thunk-inline): Likewise.
25519 (thunk-extern): Likewise.
25520 * doc/extend.texi: Document indirect_branch function attribute.
25521 * doc/invoke.texi: Document -mindirect-branch= option.
25522
25523 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
25524
25525 PR ipa/83051
25526 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
25527
25528 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
25529
25530 * ipa-inline.c (want_inline_small_function_p): Return false if
25531 inlining has already failed with CIF_FINAL_ERROR.
25532 (update_caller_keys): Call want_inline_small_function_p before
25533 can_inline_edge_p.
25534 (update_callee_keys): Likewise.
25535
25536 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
25537
25538 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
25539 New function.
25540 (rs6000_quadword_masked_address_p): Likewise.
25541 (quad_aligned_load_p): Likewise.
25542 (quad_aligned_store_p): Likewise.
25543 (const_load_sequence_p): Add comment to describe the outer-most loop.
25544 (mimic_memory_attributes_and_flags): New function.
25545 (rs6000_gen_stvx): Likewise.
25546 (replace_swapped_aligned_store): Likewise.
25547 (rs6000_gen_lvx): Likewise.
25548 (replace_swapped_aligned_load): Likewise.
25549 (replace_swapped_load_constant): Capitalize argument name in
25550 comment describing this function.
25551 (rs6000_analyze_swaps): Add a third pass to search for vector loads
25552 and stores that access quad-word aligned addresses and replace
25553 with stvx or lvx instructions when appropriate.
25554 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
25555 New function prototype.
25556 (rs6000_quadword_masked_address_p): Likewise.
25557 (rs6000_gen_lvx): Likewise.
25558 (rs6000_gen_stvx): Likewise.
25559 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
25560 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
25561 when memory address is aligned.
25562 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
25563 this split to select lvx instruction when memory address is aligned.
25564 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
25565 instruction when memory address is aligned.
25566 (*vsx_le_perm_load_v16qi): Likewise.
25567 (four unnamed splitters): Modify to select the stvx instruction
25568 when memory is aligned.
25569
25570 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
25571
25572 * predict.c (determine_unlikely_bbs): Handle correctly BBs
25573 which appears in the queue multiple times.
25574
25575 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25576 Alan Hayward <alan.hayward@arm.com>
25577 David Sherwood <david.sherwood@arm.com>
25578
25579 * tree-vectorizer.h (vec_lower_bound): New structure.
25580 (_loop_vec_info): Add check_nonzero and lower_bounds.
25581 (LOOP_VINFO_CHECK_NONZERO): New macro.
25582 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
25583 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
25584 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
25585 fields. Make seg_len the distance travelled, not including the
25586 access size.
25587 (dr_direction_indicator): Declare.
25588 (dr_zero_step_indicator): Likewise.
25589 (dr_known_forward_stride_p): Likewise.
25590 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
25591 tree-ssanames.h.
25592 (runtime_alias_check_p): Allow runtime alias checks with
25593 variable strides.
25594 (operator ==): Compare access_size and align.
25595 (prune_runtime_alias_test_list): Rework for new distinction between
25596 the access_size and seg_len.
25597 (create_intersect_range_checks_index): Likewise. Cope with polynomial
25598 segment lengths.
25599 (get_segment_min_max): New function.
25600 (create_intersect_range_checks): Use it.
25601 (dr_step_indicator): New function.
25602 (dr_direction_indicator): Likewise.
25603 (dr_zero_step_indicator): Likewise.
25604 (dr_known_forward_stride_p): Likewise.
25605 * tree-loop-distribution.c (data_ref_segment_size): Return
25606 DR_STEP * (niters - 1).
25607 (compute_alias_check_pairs): Update call to the dr_with_seg_len
25608 constructor.
25609 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
25610 (vect_preserves_scalar_order_p): New function, split out from...
25611 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
25612 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
25613 (vect_vfa_access_size): New function.
25614 (vect_vfa_align): Likewise.
25615 (vect_compile_time_alias): Take access_size_a and access_b arguments.
25616 (dump_lower_bound): New function.
25617 (vect_check_lower_bound): Likewise.
25618 (vect_small_gap_p): Likewise.
25619 (vectorizable_with_step_bound_p): Likewise.
25620 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
25621 depencies if the vectorization factor is 1. Convert the checks
25622 for nonzero steps into checks on the bounds of DR_STEP. Try using
25623 a bunds check for variable steps if the minimum required step is
25624 relatively small. Update calls to the dr_with_seg_len
25625 constructor and to vect_compile_time_alias.
25626 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
25627 function.
25628 (vect_loop_versioning): Call it.
25629 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
25630 when retrying.
25631 (vect_estimate_min_profitable_iters): Account for any bounds checks.
25632
25633 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25634 Alan Hayward <alan.hayward@arm.com>
25635 David Sherwood <david.sherwood@arm.com>
25636
25637 * doc/sourcebuild.texi (vect_scatter_store): Document.
25638 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
25639 optabs.
25640 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
25641 Document.
25642 * genopinit.c (main): Add supports_vec_scatter_store and
25643 supports_vec_scatter_store_cached to target_optabs.
25644 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
25645 IFN_MASK_SCATTER_STORE.
25646 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
25647 functions.
25648 * internal-fn.h (internal_store_fn_p): Declare.
25649 (internal_fn_stored_value_index): Likewise.
25650 * internal-fn.c (scatter_store_direct): New macro.
25651 (expand_scatter_store_optab_fn): New function.
25652 (direct_scatter_store_optab_supported_p): New macro.
25653 (internal_store_fn_p): New function.
25654 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
25655 IFN_MASK_SCATTER_STORE.
25656 (internal_fn_mask_index): Likewise.
25657 (internal_fn_stored_value_index): New function.
25658 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
25659 for scatter stores.
25660 * optabs-query.h (supports_vec_scatter_store_p): Declare.
25661 * optabs-query.c (supports_vec_scatter_store_p): New function.
25662 * tree-vectorizer.h (vect_get_store_rhs): Declare.
25663 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
25664 true for scatter stores.
25665 (vect_gather_scatter_fn_p): Handle scatter stores too.
25666 (vect_check_gather_scatter): Consider using scatter stores if
25667 supports_vec_scatter_store_p.
25668 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
25669 scatter stores too.
25670 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25671 internal_fn_stored_value_index.
25672 (check_load_store_masking): Handle scatter stores too.
25673 (vect_get_store_rhs): Make public.
25674 (vectorizable_call): Use internal_store_fn_p.
25675 (vectorizable_store): Handle scatter store internal functions.
25676 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
25677 when deciding whether the end of the group has been reached.
25678 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
25679 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
25680 (mask_scatter_store<mode>): New insns.
25681
25682 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25683 Alan Hayward <alan.hayward@arm.com>
25684 David Sherwood <david.sherwood@arm.com>
25685
25686 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
25687 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
25688 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
25689 function.
25690 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
25691 Use vect_truncate_gather_scatter_offset if we can't treat the
25692 operation as a normal gather load or scatter store.
25693 (get_group_load_store_type): Take the gather_scatter_info
25694 as argument. Try using a gather load or scatter store for
25695 single-element groups.
25696 (get_load_store_type): Update calls to get_group_load_store_type
25697 and vect_use_strided_gather_scatters_p.
25698
25699 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25700 Alan Hayward <alan.hayward@arm.com>
25701 David Sherwood <david.sherwood@arm.com>
25702
25703 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
25704 optional tree argument.
25705 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
25706 null target hooks.
25707 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
25708 but continue to use the current value as a fallback.
25709 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
25710 to compare the updates.
25711 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
25712 (get_load_store_type): Use it when handling a strided access.
25713 (vect_get_strided_load_store_ops): New function.
25714 (vect_get_data_ptr_increment): Likewise.
25715 (vectorizable_load): Handle strided gather loads. Always pass
25716 a step to vect_create_data_ref_ptr and bump_vector_ptr.
25717
25718 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25719 Alan Hayward <alan.hayward@arm.com>
25720 David Sherwood <david.sherwood@arm.com>
25721
25722 * doc/md.texi (gather_load@var{m}): Document.
25723 (mask_gather_load@var{m}): Likewise.
25724 * genopinit.c (main): Add supports_vec_gather_load and
25725 supports_vec_gather_load_cached to target_optabs.
25726 * optabs-tree.c (init_tree_optimization_optabs): Use
25727 ggc_cleared_alloc to allocate target_optabs.
25728 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
25729 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
25730 functions.
25731 * internal-fn.h (internal_load_fn_p): Declare.
25732 (internal_gather_scatter_fn_p): Likewise.
25733 (internal_fn_mask_index): Likewise.
25734 (internal_gather_scatter_fn_supported_p): Likewise.
25735 * internal-fn.c (gather_load_direct): New macro.
25736 (expand_gather_load_optab_fn): New function.
25737 (direct_gather_load_optab_supported_p): New macro.
25738 (direct_internal_fn_optab): New function.
25739 (internal_load_fn_p): Likewise.
25740 (internal_gather_scatter_fn_p): Likewise.
25741 (internal_fn_mask_index): Likewise.
25742 (internal_gather_scatter_fn_supported_p): Likewise.
25743 * optabs-query.c (supports_at_least_one_mode_p): New function.
25744 (supports_vec_gather_load_p): Likewise.
25745 * optabs-query.h (supports_vec_gather_load_p): Declare.
25746 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
25747 and memory_type field.
25748 (NUM_PATTERNS): Bump to 15.
25749 * tree-vect-data-refs.c: Include internal-fn.h.
25750 (vect_gather_scatter_fn_p): New function.
25751 (vect_describe_gather_scatter_call): Likewise.
25752 (vect_check_gather_scatter): Try using internal functions for
25753 gather loads. Recognize existing calls to a gather load function.
25754 (vect_analyze_data_refs): Consider using gather loads if
25755 supports_vec_gather_load_p.
25756 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
25757 (vect_get_gather_scatter_offset_type): Likewise.
25758 (vect_convert_mask_for_vectype): Likewise.
25759 (vect_add_conversion_to_patterm): Likewise.
25760 (vect_try_gather_scatter_pattern): Likewise.
25761 (vect_recog_gather_scatter_pattern): New pattern recognizer.
25762 (vect_vect_recog_func_ptrs): Add it.
25763 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25764 internal_fn_mask_index and internal_gather_scatter_fn_p.
25765 (check_load_store_masking): Take the gather_scatter_info as an
25766 argument and handle gather loads.
25767 (vect_get_gather_scatter_ops): New function.
25768 (vectorizable_call): Check internal_load_fn_p.
25769 (vectorizable_load): Likewise. Handle gather load internal
25770 functions.
25771 (vectorizable_store): Update call to check_load_store_masking.
25772 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
25773 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
25774 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
25775 (aarch64_gather_scale_operand_d): New predicates.
25776 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
25777 (mask_gather_load<mode>): New insns.
25778
25779 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25780 Alan Hayward <alan.hayward@arm.com>
25781 David Sherwood <david.sherwood@arm.com>
25782
25783 * optabs.def (fold_left_plus_optab): New optab.
25784 * doc/md.texi (fold_left_plus_@var{m}): Document.
25785 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
25786 * internal-fn.c (fold_left_direct): Define.
25787 (expand_fold_left_optab_fn): Likewise.
25788 (direct_fold_left_optab_supported_p): Likewise.
25789 * fold-const-call.c (fold_const_fold_left): New function.
25790 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
25791 * tree-parloops.c (valid_reduction_p): New function.
25792 (gather_scalar_reductions): Use it.
25793 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
25794 (vect_finish_replace_stmt): Declare.
25795 * tree-vect-loop.c (fold_left_reduction_fn): New function.
25796 (needs_fold_left_reduction_p): New function, split out from...
25797 (vect_is_simple_reduction): ...here. Accept reductions that
25798 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
25799 (vect_force_simple_reduction): Also store the reduction type in
25800 the assignment's STMT_VINFO_REDUC_TYPE.
25801 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
25802 (merge_with_identity): New function.
25803 (vect_expand_fold_left): Likewise.
25804 (vectorize_fold_left_reduction): Likewise.
25805 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
25806 scalar phi in place for it. Check for target support and reject
25807 cases that would reassociate the operation. Defer the transform
25808 phase to vectorize_fold_left_reduction.
25809 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
25810 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
25811 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
25812
25813 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25814
25815 * tree-if-conv.c (predicate_mem_writes): Remove redundant
25816 call to ifc_temp_var.
25817
25818 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25819 Alan Hayward <alan.hayward@arm.com>
25820 David Sherwood <david.sherwood@arm.com>
25821
25822 * target.def (legitimize_address_displacement): Take the original
25823 offset as a poly_int.
25824 * targhooks.h (default_legitimize_address_displacement): Update
25825 accordingly.
25826 * targhooks.c (default_legitimize_address_displacement): Likewise.
25827 * doc/tm.texi: Regenerate.
25828 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
25829 as an argument, moving assert of ad->disp == ad->disp_term to...
25830 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
25831 Try calling targetm.legitimize_address_displacement before expanding
25832 the address rather than afterwards, and adjust for the new interface.
25833 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
25834 Match the new hook interface. Handle SVE addresses.
25835 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
25836 new hook interface.
25837
25838 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25839
25840 * Makefile.in (OBJS): Add early-remat.o.
25841 * target.def (select_early_remat_modes): New hook.
25842 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
25843 * doc/tm.texi: Regenerate.
25844 * targhooks.h (default_select_early_remat_modes): Declare.
25845 * targhooks.c (default_select_early_remat_modes): New function.
25846 * timevar.def (TV_EARLY_REMAT): New timevar.
25847 * passes.def (pass_early_remat): New pass.
25848 * tree-pass.h (make_pass_early_remat): Declare.
25849 * early-remat.c: New file.
25850 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
25851 function.
25852 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
25853
25854 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25855 Alan Hayward <alan.hayward@arm.com>
25856 David Sherwood <david.sherwood@arm.com>
25857
25858 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
25859 vfm1 with a bound_epilog parameter.
25860 (vect_do_peeling): Update calls accordingly, and move the prologue
25861 call earlier in the function. Treat the base bound_epilog as 0 for
25862 fully-masked loops and retain vf - 1 for other loops. Add 1 to
25863 this base when peeling for gaps.
25864 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
25865 with fully-masked loops.
25866 (vect_estimate_min_profitable_iters): Handle the single peeled
25867 iteration in that case.
25868
25869 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25870 Alan Hayward <alan.hayward@arm.com>
25871 David Sherwood <david.sherwood@arm.com>
25872
25873 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
25874 single-element interleaving even if the size is not a power of 2.
25875 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
25876 accesses for single-element interleaving if the group size is
25877 not a power of 2.
25878
25879 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25880 Alan Hayward <alan.hayward@arm.com>
25881 David Sherwood <david.sherwood@arm.com>
25882
25883 * doc/md.texi (fold_extract_last_@var{m}): Document.
25884 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
25885 * optabs.def (fold_extract_last_optab): New optab.
25886 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
25887 * internal-fn.c (fold_extract_direct): New macro.
25888 (expand_fold_extract_optab_fn): Likewise.
25889 (direct_fold_extract_optab_supported_p): Likewise.
25890 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
25891 * tree-vect-loop.c (vect_model_reduction_cost): Handle
25892 EXTRACT_LAST_REDUCTION.
25893 (get_initial_def_for_reduction): Do not create an initial vector
25894 for EXTRACT_LAST_REDUCTION reductions.
25895 (vectorizable_reduction): Leave the scalar phi in place for
25896 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
25897 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
25898 epilogue code for EXTRACT_LAST_REDUCTION and defer the
25899 transform phase to vectorizable_condition.
25900 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
25901 split out from...
25902 (vect_finish_stmt_generation): ...here.
25903 (vect_finish_replace_stmt): New function.
25904 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
25905 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
25906 pattern.
25907 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
25908
25909 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25910 Alan Hayward <alan.hayward@arm.com>
25911 David Sherwood <david.sherwood@arm.com>
25912
25913 * doc/md.texi (extract_last_@var{m}): Document.
25914 * optabs.def (extract_last_optab): New optab.
25915 * internal-fn.def (EXTRACT_LAST): New internal function.
25916 * internal-fn.c (cond_unary_direct): New macro.
25917 (expand_cond_unary_optab_fn): Likewise.
25918 (direct_cond_unary_optab_supported_p): Likewise.
25919 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
25920 loops using EXTRACT_LAST.
25921 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
25922 (extract_last_<mode>): ...this optab.
25923 (vec_extract<mode><Vel>): Update accordingly.
25924
25925 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25926 Alan Hayward <alan.hayward@arm.com>
25927 David Sherwood <david.sherwood@arm.com>
25928
25929 * target.def (empty_mask_is_expensive): New hook.
25930 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
25931 * doc/tm.texi: Regenerate.
25932 * targhooks.h (default_empty_mask_is_expensive): Declare.
25933 * targhooks.c (default_empty_mask_is_expensive): New function.
25934 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
25935 if the target says that empty masks are expensive.
25936 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
25937 New function.
25938 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
25939
25940 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25941 Alan Hayward <alan.hayward@arm.com>
25942 David Sherwood <david.sherwood@arm.com>
25943
25944 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
25945 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
25946 (vect_use_loop_mask_for_alignment_p): New function.
25947 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
25948 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
25949 niters_skip argument. Make sure that the first niters_skip elements
25950 of the first iteration are inactive.
25951 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
25952 Update call to vect_set_loop_masks_directly.
25953 (get_misalign_in_elems): New function, split out from...
25954 (vect_gen_prolog_loop_niters): ...here.
25955 (vect_update_init_of_dr): Take a code argument that specifies whether
25956 the adjustment should be added or subtracted.
25957 (vect_update_init_of_drs): Likewise.
25958 (vect_prepare_for_masked_peels): New function.
25959 (vect_do_peeling): Skip prologue peeling if we're using a mask
25960 instead. Update call to vect_update_inits_of_drs.
25961 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25962 mask_skip_niters.
25963 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
25964 alignment. Do not include the number of peeled iterations in
25965 the minimum threshold in that case.
25966 (vectorizable_induction): Adjust the start value down by
25967 LOOP_VINFO_MASK_SKIP_NITERS iterations.
25968 (vect_transform_loop): Call vect_prepare_for_masked_peels.
25969 Take the number of skipped iterations into account when calculating
25970 the loop bounds.
25971 * tree-vect-stmts.c (vect_gen_while_not): New function.
25972
25973 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25974 Alan Hayward <alan.hayward@arm.com>
25975 David Sherwood <david.sherwood@arm.com>
25976
25977 * doc/sourcebuild.texi (vect_fully_masked): Document.
25978 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
25979 default value to 0.
25980 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
25981 split out from...
25982 (vect_analyze_loop_2): ...here. Don't check the vectorization
25983 factor against the number of loop iterations if the loop is
25984 fully-masked.
25985
25986 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25987 Alan Hayward <alan.hayward@arm.com>
25988 David Sherwood <david.sherwood@arm.com>
25989
25990 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
25991 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
25992 (dump_groups): Update accordingly.
25993 (iv_use::mem_type): New member variable.
25994 (address_p): New function.
25995 (record_use): Add a mem_type argument and initialize the new
25996 mem_type field.
25997 (record_group_use): Add a mem_type argument. Use address_p.
25998 Remove obsolete null checks of base_object. Update call to record_use.
25999 (find_interesting_uses_op): Update call to record_group_use.
26000 (find_interesting_uses_cond): Likewise.
26001 (find_interesting_uses_address): Likewise.
26002 (get_mem_type_for_internal_fn): New function.
26003 (find_address_like_use): Likewise.
26004 (find_interesting_uses_stmt): Try find_address_like_use before
26005 calling find_interesting_uses_op.
26006 (addr_offset_valid_p): Use the iv mem_type field as the type
26007 of the addressed memory.
26008 (add_autoinc_candidates): Likewise.
26009 (get_address_cost): Likewise.
26010 (split_small_address_groups_p): Use address_p.
26011 (split_address_groups): Likewise.
26012 (add_iv_candidate_for_use): Likewise.
26013 (autoinc_possible_for_pair): Likewise.
26014 (rewrite_groups): Likewise.
26015 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
26016 (determine_group_iv_cost): Update after split of USE_ADDRESS.
26017 (get_alias_ptr_type_for_ptr_address): New function.
26018 (rewrite_use_address): Rewrite address uses in calls that were
26019 identified by find_address_like_use.
26020
26021 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26022 Alan Hayward <alan.hayward@arm.com>
26023 David Sherwood <david.sherwood@arm.com>
26024
26025 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
26026 TARGET_MEM_REFs.
26027 * gimple-expr.h (is_gimple_addressable: Likewise.
26028 * gimple-expr.c (is_gimple_address): Likewise.
26029 * internal-fn.c (expand_call_mem_ref): New function.
26030 (expand_mask_load_optab_fn): Use it.
26031 (expand_mask_store_optab_fn): Likewise.
26032
26033 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26034 Alan Hayward <alan.hayward@arm.com>
26035 David Sherwood <david.sherwood@arm.com>
26036
26037 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
26038 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
26039 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
26040 (cond_umax@var{mode}): Document.
26041 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
26042 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
26043 (cond_umin_optab, cond_umax_optab): New optabs.
26044 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
26045 (COND_IOR, COND_XOR): New internal functions.
26046 * internal-fn.h (get_conditional_internal_fn): Declare.
26047 * internal-fn.c (cond_binary_direct): New macro.
26048 (expand_cond_binary_optab_fn): Likewise.
26049 (direct_cond_binary_optab_supported_p): Likewise.
26050 (get_conditional_internal_fn): New function.
26051 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
26052 Cope with reduction statements that are vectorized as calls rather
26053 than assignments.
26054 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
26055 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
26056 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
26057 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
26058 (UNSPEC_COND_EOR): New unspecs.
26059 (optab): Add mappings for them.
26060 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
26061 (sve_int_op, sve_fp_op): New int attributes.
26062
26063 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26064 Alan Hayward <alan.hayward@arm.com>
26065 David Sherwood <david.sherwood@arm.com>
26066
26067 * optabs.def (while_ult_optab): New optab.
26068 * doc/md.texi (while_ult@var{m}@var{n}): Document.
26069 * internal-fn.def (WHILE_ULT): New internal function.
26070 * internal-fn.h (direct_internal_fn_supported_p): New override
26071 that takes two types as argument.
26072 * internal-fn.c (while_direct): New macro.
26073 (expand_while_optab_fn): New function.
26074 (convert_optab_supported_p): Likewise.
26075 (direct_while_optab_supported_p): New macro.
26076 * wide-int.h (wi::udiv_ceil): New function.
26077 * tree-vectorizer.h (rgroup_masks): New structure.
26078 (vec_loop_masks): New typedef.
26079 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
26080 and fully_masked_p.
26081 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
26082 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
26083 (vect_max_vf): New function.
26084 (slpeel_make_loop_iterate_ntimes): Delete.
26085 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
26086 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
26087 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
26088 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
26089 internal-fn.h, stor-layout.h and optabs-query.h.
26090 (vect_set_loop_mask): New function.
26091 (add_preheader_seq): Likewise.
26092 (add_header_seq): Likewise.
26093 (interleave_supported_p): Likewise.
26094 (vect_maybe_permute_loop_masks): Likewise.
26095 (vect_set_loop_masks_directly): Likewise.
26096 (vect_set_loop_condition_masked): Likewise.
26097 (vect_set_loop_condition_unmasked): New function, split out from
26098 slpeel_make_loop_iterate_ntimes.
26099 (slpeel_make_loop_iterate_ntimes): Rename to..
26100 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
26101 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
26102 (vect_do_peeling): Update call accordingly.
26103 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
26104 loops.
26105 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26106 mask_compare_type, can_fully_mask_p and fully_masked_p.
26107 (release_vec_loop_masks): New function.
26108 (_loop_vec_info): Use it to free the loop masks.
26109 (can_produce_all_loop_masks_p): New function.
26110 (vect_get_max_nscalars_per_iter): Likewise.
26111 (vect_verify_full_masking): Likewise.
26112 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
26113 retries, and free the mask rgroups before retrying. Check loop-wide
26114 reasons for disallowing fully-masked loops. Make the final decision
26115 about whether use a fully-masked loop or not.
26116 (vect_estimate_min_profitable_iters): Do not assume that peeling
26117 for the number of iterations will be needed for fully-masked loops.
26118 (vectorizable_reduction): Disable fully-masked loops.
26119 (vectorizable_live_operation): Likewise.
26120 (vect_halve_mask_nunits): New function.
26121 (vect_double_mask_nunits): Likewise.
26122 (vect_record_loop_mask): Likewise.
26123 (vect_get_loop_mask): Likewise.
26124 (vect_transform_loop): Handle the case in which the final loop
26125 iteration might handle a partial vector. Call vect_set_loop_condition
26126 instead of slpeel_make_loop_iterate_ntimes.
26127 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
26128 (check_load_store_masking): New function.
26129 (prepare_load_store_mask): Likewise.
26130 (vectorizable_store): Handle fully-masked loops.
26131 (vectorizable_load): Likewise.
26132 (supportable_widening_operation): Use vect_halve_mask_nunits for
26133 booleans.
26134 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
26135 (vect_gen_while): New function.
26136 * config/aarch64/aarch64.md (umax<mode>3): New expander.
26137 (aarch64_uqdec<mode>): New insn.
26138
26139 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26140 Alan Hayward <alan.hayward@arm.com>
26141 David Sherwood <david.sherwood@arm.com>
26142
26143 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
26144 (reduc_xor_scal_optab): New optabs.
26145 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
26146 (reduc_xor_scal_@var{m}): Document.
26147 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
26148 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
26149 internal functions.
26150 * fold-const-call.c (fold_const_call): Handle them.
26151 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
26152 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
26153 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
26154 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
26155 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
26156 (UNSPEC_XORV): New unspecs.
26157 (optab): Add entries for them.
26158 (BITWISEV): New int iterator.
26159 (bit_reduc_op): New int attributes.
26160
26161 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26162 Alan Hayward <alan.hayward@arm.com>
26163 David Sherwood <david.sherwood@arm.com>
26164
26165 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26166 * internal-fn.def (VEC_SHL_INSERT): New internal function.
26167 * optabs.def (vec_shl_insert_optab): New optab.
26168 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26169 (duplicate_and_interleave): Likewise.
26170 * tree-vect-loop.c: Include internal-fn.h.
26171 (neutral_op_for_slp_reduction): New function, split out from
26172 get_initial_defs_for_reduction.
26173 (get_initial_def_for_reduction): Handle option 2 for variable-length
26174 vectors by loading the neutral value into a vector and then shifting
26175 the initial value into element 0.
26176 (get_initial_defs_for_reduction): Replace the code argument with
26177 the neutral value calculated by neutral_op_for_slp_reduction.
26178 Use gimple_build_vector for constant-length vectors.
26179 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26180 but the first group_size elements have a neutral value.
26181 Use duplicate_and_interleave otherwise.
26182 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26183 Update call to get_initial_defs_for_reduction. Handle SLP
26184 reductions for variable-length vectors by creating one vector
26185 result for each scalar result, with the elements associated
26186 with other scalar results stubbed out with the neutral value.
26187 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26188 Require IFN_VEC_SHL_INSERT for double reductions on
26189 variable-length vectors, or SLP reductions that have
26190 a neutral value. Require can_duplicate_and_interleave_p
26191 support for variable-length unchained SLP reductions if there
26192 is no neutral value, such as for MIN/MAX reductions. Also require
26193 the number of vector elements to be a multiple of the number of
26194 SLP statements when doing variable-length unchained SLP reductions.
26195 Update call to vect_create_epilog_for_reduction.
26196 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26197 and remove initial values.
26198 (duplicate_and_interleave): Make public.
26199 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26200 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26201
26202 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26203 Alan Hayward <alan.hayward@arm.com>
26204 David Sherwood <david.sherwood@arm.com>
26205
26206 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26207 (can_duplicate_and_interleave_p): New function.
26208 (vect_get_and_check_slp_defs): Take the vector of statements
26209 rather than just the current one. Remove excess parentheses.
26210 Restriction rejectinon of vect_constant_def and vect_external_def
26211 for variable-length vectors to boolean types, or types for which
26212 can_duplicate_and_interleave_p is false.
26213 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26214 (duplicate_and_interleave): New function.
26215 (vect_get_constant_vectors): Use gimple_build_vector for
26216 constant-length vectors and suitable variable-length constant
26217 vectors. Use duplicate_and_interleave for other variable-length
26218 vectors. Don't defer the update when inserting new statements.
26219
26220 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26221 Alan Hayward <alan.hayward@arm.com>
26222 David Sherwood <david.sherwood@arm.com>
26223
26224 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26225 min_profitable_iters doesn't go negative.
26226
26227 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26228 Alan Hayward <alan.hayward@arm.com>
26229 David Sherwood <david.sherwood@arm.com>
26230
26231 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26232 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26233 * optabs.def (vec_mask_load_lanes_optab): New optab.
26234 (vec_mask_store_lanes_optab): Likewise.
26235 * internal-fn.def (MASK_LOAD_LANES): New internal function.
26236 (MASK_STORE_LANES): Likewise.
26237 * internal-fn.c (mask_load_lanes_direct): New macro.
26238 (mask_store_lanes_direct): Likewise.
26239 (expand_mask_load_optab_fn): Handle masked operations.
26240 (expand_mask_load_lanes_optab_fn): New macro.
26241 (expand_mask_store_optab_fn): Handle masked operations.
26242 (expand_mask_store_lanes_optab_fn): New macro.
26243 (direct_mask_load_lanes_optab_supported_p): Likewise.
26244 (direct_mask_store_lanes_optab_supported_p): Likewise.
26245 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26246 parameter.
26247 (vect_load_lanes_supported): Likewise.
26248 * tree-vect-data-refs.c (strip_conversion): New function.
26249 (can_group_stmts_p): Likewise.
26250 (vect_analyze_data_ref_accesses): Use it instead of checking
26251 for a pair of assignments.
26252 (vect_store_lanes_supported): Take a masked_p parameter.
26253 (vect_load_lanes_supported): Likewise.
26254 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26255 vect_store_lanes_supported and vect_load_lanes_supported.
26256 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26257 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26258 parameter. Don't allow gaps for masked accesses.
26259 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
26260 and vect_load_lanes_supported.
26261 (get_load_store_type): Take a masked_p parameter and update
26262 call to get_group_load_store_type.
26263 (vectorizable_store): Update call to get_load_store_type.
26264 Handle IFN_MASK_STORE_LANES.
26265 (vectorizable_load): Update call to get_load_store_type.
26266 Handle IFN_MASK_LOAD_LANES.
26267
26268 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26269 Alan Hayward <alan.hayward@arm.com>
26270 David Sherwood <david.sherwood@arm.com>
26271
26272 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26273 modes for SVE.
26274 * config/aarch64/aarch64-protos.h
26275 (aarch64_sve_struct_memory_operand_p): Declare.
26276 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26277 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26278 (VPRED, vpred): Handle SVE structure modes.
26279 * config/aarch64/constraints.md (Utx): New constraint.
26280 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26281 (aarch64_sve_struct_nonimmediate_operand): New predicates.
26282 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26283 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26284 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26285 structure modes. Split into pieces after RA.
26286 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26287 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26288 New patterns.
26289 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26290 SVE structure modes.
26291 (aarch64_classify_address): Likewise.
26292 (sizetochar): Move earlier in file.
26293 (aarch64_print_operand): Handle SVE register lists.
26294 (aarch64_array_mode): New function.
26295 (aarch64_sve_struct_memory_operand_p): Likewise.
26296 (TARGET_ARRAY_MODE): Redefine.
26297
26298 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26299 Alan Hayward <alan.hayward@arm.com>
26300 David Sherwood <david.sherwood@arm.com>
26301
26302 * target.def (array_mode): New target hook.
26303 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26304 * doc/tm.texi: Regenerate.
26305 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26306 * hooks.c (hook_optmode_mode_uhwi_none): New function.
26307 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26308 targetm.array_mode.
26309 * stor-layout.c (mode_for_array): Likewise. Support polynomial
26310 type sizes.
26311
26312 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26313 Alan Hayward <alan.hayward@arm.com>
26314 David Sherwood <david.sherwood@arm.com>
26315
26316 * fold-const.c (fold_binary_loc): Check the argument types
26317 rather than the result type when testing for a vector operation.
26318
26319 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26320
26321 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26322 * doc/tm.texi: Regenerate.
26323
26324 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26325 Alan Hayward <alan.hayward@arm.com>
26326 David Sherwood <david.sherwood@arm.com>
26327
26328 * doc/invoke.texi (-msve-vector-bits=): Document new option.
26329 (sve): Document new AArch64 extension.
26330 * doc/md.texi (w): Extend the description of the AArch64
26331 constraint to include SVE vectors.
26332 (Upl, Upa): Document new AArch64 predicate constraints.
26333 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26334 enum.
26335 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26336 (msve-vector-bits=): New option.
26337 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26338 SVE when these are disabled.
26339 (sve): New extension.
26340 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26341 modes. Adjust their number of units based on aarch64_sve_vg.
26342 (MAX_BITSIZE_MODE_ANY_MODE): Define.
26343 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26344 aarch64_addr_query_type.
26345 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26346 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26347 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26348 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26349 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26350 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26351 (aarch64_simd_imm_zero_p): Delete.
26352 (aarch64_check_zero_based_sve_index_immediate): Declare.
26353 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26354 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26355 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26356 (aarch64_sve_float_mul_immediate_p): Likewise.
26357 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26358 rather than an rtx.
26359 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26360 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26361 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26362 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26363 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26364 (aarch64_regmode_natural_size): Likewise.
26365 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26366 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26367 left one place.
26368 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26369 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26370 for VG and the SVE predicate registers.
26371 (V_ALIASES): Add a "z"-prefixed alias.
26372 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26373 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26374 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26375 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26376 (REG_CLASS_NAMES): Add entries for them.
26377 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
26378 and the predicate registers.
26379 (aarch64_sve_vg): Declare.
26380 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26381 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26382 (REGMODE_NATURAL_SIZE): Define.
26383 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26384 SVE macros.
26385 * config/aarch64/aarch64.c: Include cfgrtl.h.
26386 (simd_immediate_info): Add a constructor for series vectors,
26387 and an associated step field.
26388 (aarch64_sve_vg): New variable.
26389 (aarch64_dbx_register_number): Handle VG and the predicate registers.
26390 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26391 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26392 (VEC_ANY_DATA, VEC_STRUCT): New constants.
26393 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26394 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26395 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26396 (aarch64_get_mask_mode): New functions.
26397 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26398 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26399 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
26400 predicate modes and predicate registers. Explicitly restrict
26401 GPRs to modes of 16 bytes or smaller. Only allow FP registers
26402 to store a vector mode if it is recognized by
26403 aarch64_classify_vector_mode.
26404 (aarch64_regmode_natural_size): New function.
26405 (aarch64_hard_regno_caller_save_mode): Return the original mode
26406 for predicates.
26407 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26408 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26409 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
26410 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
26411 functions.
26412 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
26413 does not overlap dest if the function is frame-related. Handle
26414 SVE constants.
26415 (aarch64_split_add_offset): New function.
26416 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
26417 them aarch64_add_offset.
26418 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
26419 and update call to aarch64_sub_sp.
26420 (aarch64_add_cfa_expression): New function.
26421 (aarch64_expand_prologue): Pass extra temporary registers to the
26422 functions above. Handle the case in which we need to emit new
26423 DW_CFA_expressions for registers that were originally saved
26424 relative to the stack pointer, but now have to be expressed
26425 relative to the frame pointer.
26426 (aarch64_output_mi_thunk): Pass extra temporary registers to the
26427 functions above.
26428 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
26429 IP0 and IP1 values for SVE frames.
26430 (aarch64_expand_vec_series): New function.
26431 (aarch64_expand_sve_widened_duplicate): Likewise.
26432 (aarch64_expand_sve_const_vector): Likewise.
26433 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
26434 Handle SVE constants. Use emit_move_insn to move a force_const_mem
26435 into the register, rather than emitting a SET directly.
26436 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
26437 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
26438 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
26439 (offset_9bit_signed_scaled_p): New functions.
26440 (aarch64_replicate_bitmask_imm): New function.
26441 (aarch64_bitmask_imm): Use it.
26442 (aarch64_cannot_force_const_mem): Reject expressions involving
26443 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
26444 (aarch64_classify_index): Handle SVE indices, by requiring
26445 a plain register index with a scale that matches the element size.
26446 (aarch64_classify_address): Handle SVE addresses. Assert that
26447 the mode of the address is VOIDmode or an integer mode.
26448 Update call to aarch64_classify_symbol.
26449 (aarch64_classify_symbolic_expression): Update call to
26450 aarch64_classify_symbol.
26451 (aarch64_const_vec_all_in_range_p): New function.
26452 (aarch64_print_vector_float_operand): Likewise.
26453 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
26454 "vN" for FP registers with SVE modes. Handle (const ...) vectors
26455 and the FP immediates 1.0 and 0.5.
26456 (aarch64_print_address_internal): Handle SVE addresses.
26457 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
26458 (aarch64_regno_regclass): Handle predicate registers.
26459 (aarch64_secondary_reload): Handle big-endian reloads of SVE
26460 data modes.
26461 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
26462 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
26463 (aarch64_convert_sve_vector_bits): New function.
26464 (aarch64_override_options): Use it to handle -msve-vector-bits=.
26465 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26466 rather than an rtx.
26467 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
26468 Handle SVE vector and predicate modes. Accept VL-based constants
26469 that need only one temporary register, and VL offsets that require
26470 no temporary registers.
26471 (aarch64_conditional_register_usage): Mark the predicate registers
26472 as fixed if SVE isn't available.
26473 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
26474 Return true for SVE vector and predicate modes.
26475 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
26476 rather than an unsigned int. Handle SVE modes.
26477 (aarch64_preferred_simd_mode): Update call accordingly. Handle
26478 SVE modes.
26479 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
26480 if SVE is enabled.
26481 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26482 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26483 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26484 (aarch64_sve_float_mul_immediate_p): New functions.
26485 (aarch64_sve_valid_immediate): New function.
26486 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
26487 Explicitly reject structure modes. Check for INDEX constants.
26488 Handle PTRUE and PFALSE constants.
26489 (aarch64_check_zero_based_sve_index_immediate): New function.
26490 (aarch64_simd_imm_zero_p): Delete.
26491 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
26492 vector modes. Accept constants in the range of CNT[BHWD].
26493 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
26494 ask for an Advanced SIMD mode.
26495 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
26496 (aarch64_simd_vector_alignment): Handle SVE predicates.
26497 (aarch64_vectorize_preferred_vector_alignment): New function.
26498 (aarch64_simd_vector_alignment_reachable): Use it instead of
26499 the vector size.
26500 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
26501 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
26502 functions.
26503 (MAX_VECT_LEN): Delete.
26504 (expand_vec_perm_d): Add a vec_flags field.
26505 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
26506 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
26507 (aarch64_evpc_ext): Don't apply a big-endian lane correction
26508 for SVE modes.
26509 (aarch64_evpc_rev): Rename to...
26510 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
26511 (aarch64_evpc_rev_global): New function.
26512 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
26513 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
26514 MAX_VECT_LEN.
26515 (aarch64_evpc_sve_tbl): New function.
26516 (aarch64_expand_vec_perm_const_1): Update after rename of
26517 aarch64_evpc_rev. Handle SVE permutes too, trying
26518 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
26519 than aarch64_evpc_tbl.
26520 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
26521 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
26522 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
26523 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
26524 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
26525 (aarch64_expand_sve_vcond): New functions.
26526 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
26527 of aarch64_vector_mode_p.
26528 (aarch64_dwarf_poly_indeterminate_value): New function.
26529 (aarch64_compute_pressure_classes): Likewise.
26530 (aarch64_can_change_mode_class): Likewise.
26531 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
26532 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
26533 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
26534 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
26535 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
26536 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
26537 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
26538 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
26539 constraints.
26540 (Dn, Dl, Dr): Accept const as well as const_vector.
26541 (Dz): Likewise. Compare against CONST0_RTX.
26542 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
26543 of "vector" where appropriate.
26544 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
26545 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
26546 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
26547 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
26548 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
26549 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
26550 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
26551 (v_int_equiv): Extend to SVE modes.
26552 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
26553 mode attributes.
26554 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
26555 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
26556 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
26557 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
26558 (SVE_COND_FP_CMP): New int iterators.
26559 (perm_hilo): Handle the new unpack unspecs.
26560 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
26561 attributes.
26562 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
26563 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
26564 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
26565 (aarch64_equality_operator, aarch64_constant_vector_operand)
26566 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
26567 (aarch64_sve_nonimmediate_operand): Likewise.
26568 (aarch64_sve_general_operand): Likewise.
26569 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
26570 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
26571 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
26572 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
26573 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
26574 (aarch64_sve_float_arith_immediate): Likewise.
26575 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
26576 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
26577 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
26578 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
26579 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
26580 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
26581 (aarch64_sve_float_arith_operand): Likewise.
26582 (aarch64_sve_float_arith_with_sub_operand): Likewise.
26583 (aarch64_sve_float_mul_operand): Likewise.
26584 (aarch64_sve_vec_perm_operand): Likewise.
26585 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
26586 (aarch64_mov_operand): Accept const_poly_int and const_vector.
26587 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
26588 as well as const_vector.
26589 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
26590 in file. Use CONST0_RTX and CONSTM1_RTX.
26591 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
26592 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
26593 Use aarch64_simd_imm_zero.
26594 * config/aarch64/aarch64-sve.md: New file.
26595 * config/aarch64/aarch64.md: Include it.
26596 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
26597 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
26598 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
26599 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
26600 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
26601 (sve): New attribute.
26602 (enabled): Disable instructions with the sve attribute unless
26603 TARGET_SVE.
26604 (movqi, movhi): Pass CONST_POLY_INT operaneds through
26605 aarch64_expand_mov_immediate.
26606 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
26607 CNT[BHSD] immediates.
26608 (movti): Split CONST_POLY_INT moves into two halves.
26609 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
26610 Split additions that need a temporary here if the destination
26611 is the stack pointer.
26612 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
26613 (*add<mode>3_poly_1): New instruction.
26614 (set_clobber_cc): New expander.
26615
26616 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26617
26618 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
26619 parameter and use it instead of GET_MODE_SIZE (innermode). Use
26620 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
26621 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
26622 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
26623 Change innermode from fixed_mode_size to machine_mode.
26624 (simplify_subreg): Update call accordingly. Handle a constant-sized
26625 subreg of a variable-length CONST_VECTOR.
26626
26627 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26628 Alan Hayward <alan.hayward@arm.com>
26629 David Sherwood <david.sherwood@arm.com>
26630
26631 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
26632 (add_offset_to_base): New function, split out from...
26633 (create_mem_ref): ...here. When handling a scale other than 1,
26634 check first whether the address is valid without the offset.
26635 Add it into the base if so, leaving the index and scale as-is.
26636
26637 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26638
26639 PR c++/83778
26640 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
26641 fold_for_warn before checking if arg2 is INTEGER_CST.
26642
26643 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
26644
26645 * config/rs6000/predicates.md (load_multiple_operation): Delete.
26646 (store_multiple_operation): Delete.
26647 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
26648 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
26649 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
26650 guarded by TARGET_STRING.
26651 (rs6000_output_load_multiple): Delete.
26652 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
26653 OPTION_MASK_STRING / TARGET_STRING handling.
26654 (print_operand) <'N', 'O'>: Add comment that these are unused now.
26655 (const rs6000_opt_masks) <"string">: Change mask to 0.
26656 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
26657 (MASK_STRING): Delete.
26658 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
26659 parts. Simplify.
26660 (load_multiple): Delete.
26661 (*ldmsi8): Delete.
26662 (*ldmsi7): Delete.
26663 (*ldmsi6): Delete.
26664 (*ldmsi5): Delete.
26665 (*ldmsi4): Delete.
26666 (*ldmsi3): Delete.
26667 (store_multiple): Delete.
26668 (*stmsi8): Delete.
26669 (*stmsi7): Delete.
26670 (*stmsi6): Delete.
26671 (*stmsi5): Delete.
26672 (*stmsi4): Delete.
26673 (*stmsi3): Delete.
26674 (movmemsi_8reg): Delete.
26675 (corresponding unnamed define_insn): Delete.
26676 (movmemsi_6reg): Delete.
26677 (corresponding unnamed define_insn): Delete.
26678 (movmemsi_4reg): Delete.
26679 (corresponding unnamed define_insn): Delete.
26680 (movmemsi_2reg): Delete.
26681 (corresponding unnamed define_insn): Delete.
26682 (movmemsi_1reg): Delete.
26683 (corresponding unnamed define_insn): Delete.
26684 * config/rs6000/rs6000.opt (mno-string): New.
26685 (mstring): Replace by deprecation warning stub.
26686 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
26687
26688 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26689
26690 * regrename.c (regrename_do_replace): If replacing the same
26691 reg multiple times, try to reuse last created gen_raw_REG.
26692
26693 PR debug/81155
26694 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
26695 main to workaround a bug in GDB.
26696
26697 2018-01-12 Tom de Vries <tom@codesourcery.com>
26698
26699 PR target/83737
26700 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
26701
26702 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
26703
26704 PR rtl-optimization/80481
26705 * ira-color.c (get_cap_member): New function.
26706 (allocnos_conflict_by_live_ranges_p): Use it.
26707 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
26708 (setup_slot_coalesced_allocno_live_ranges): Ditto.
26709
26710 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
26711
26712 PR target/83628
26713 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
26714 (*saddl_se_1): Ditto.
26715 (*ssubsi_1): Ditto.
26716 (*ssubl_se_1): Ditto.
26717
26718 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26719
26720 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
26721 rather than wi::to_widest for DR_INITs.
26722 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
26723 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
26724 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
26725 INTEGER_CSTs.
26726 (vect_analyze_group_access_1): Note that here.
26727
26728 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26729
26730 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
26731 polynomial type sizes.
26732
26733 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26734
26735 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
26736 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
26737 (gimple_add_tmp_var): Likewise.
26738
26739 2018-01-12 Martin Liska <mliska@suse.cz>
26740
26741 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
26742 (gimple_alloc_sizes): Likewise.
26743 (dump_gimple_statistics): Use PRIu64 in printf format.
26744 * gimple.h: Change uint64_t to int.
26745
26746 2018-01-12 Martin Liska <mliska@suse.cz>
26747
26748 * tree-core.h: Use uint64_t instead of int.
26749 * tree.c (tree_node_counts): Likewise.
26750 (tree_node_sizes): Likewise.
26751 (dump_tree_statistics): Use PRIu64 in printf format.
26752
26753 2018-01-12 Martin Liska <mliska@suse.cz>
26754
26755 * Makefile.in: As qsort_chk is implemented in vec.c, add
26756 vec.o to linkage of gencfn-macros.
26757 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
26758 passing the info to record_node_allocation_statistics.
26759 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
26760 and pass the info.
26761 * ggc-common.c (struct ggc_usage): Add operator== and use
26762 it in operator< and compare function.
26763 * mem-stats.h (struct mem_usage): Likewise.
26764 * vec.c (struct vec_usage): Remove operator< and compare
26765 function. Can be simply inherited.
26766
26767 2018-01-12 Martin Jambor <mjambor@suse.cz>
26768
26769 PR target/81616
26770 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
26771 * tree-ssa-math-opts.c: Include domwalk.h.
26772 (convert_mult_to_fma_1): New function.
26773 (fma_transformation_info): New type.
26774 (fma_deferring_state): Likewise.
26775 (cancel_fma_deferring): New function.
26776 (result_of_phi): Likewise.
26777 (last_fma_candidate_feeds_initial_phi): Likewise.
26778 (convert_mult_to_fma): Added deferring logic, split actual
26779 transformation to convert_mult_to_fma_1.
26780 (math_opts_dom_walker): New type.
26781 (math_opts_dom_walker::after_dom_children): New method, body moved
26782 here from pass_optimize_widening_mul::execute, added deferring logic
26783 bits.
26784 (pass_optimize_widening_mul::execute): Moved most of code to
26785 math_opts_dom_walker::after_dom_children.
26786 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
26787 * config/i386/i386.c (ix86_option_override_internal): Added
26788 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
26789
26790 2018-01-12 Richard Biener <rguenther@suse.de>
26791
26792 PR debug/83157
26793 * dwarf2out.c (gen_variable_die): Do not reset old_die for
26794 inline instance vars.
26795
26796 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
26797
26798 PR target/81819
26799 * config/rx/rx.c (rx_is_restricted_memory_address):
26800 Handle SUBREG case.
26801
26802 2018-01-12 Richard Biener <rguenther@suse.de>
26803
26804 PR tree-optimization/80846
26805 * target.def (split_reduction): New target hook.
26806 * targhooks.c (default_split_reduction): New function.
26807 * targhooks.h (default_split_reduction): Declare.
26808 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
26809 target requests first reduce vectors by combining low and high
26810 parts.
26811 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
26812 (get_vectype_for_scalar_type_and_size): Export.
26813 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
26814 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
26815 * doc/tm.texi: Regenerate.
26816 * config/i386/i386.c (ix86_split_reduction): Implement
26817 TARGET_VECTORIZE_SPLIT_REDUCTION.
26818
26819 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26820
26821 PR target/83368
26822 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
26823 in PIC mode except for TARGET_VXWORKS_RTP.
26824 * config/sparc/sparc.c: Include cfgrtl.h.
26825 (TARGET_INIT_PIC_REG): Define.
26826 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
26827 (sparc_pic_register_p): New predicate.
26828 (sparc_legitimate_address_p): Use it.
26829 (sparc_legitimize_pic_address): Likewise.
26830 (sparc_delegitimize_address): Likewise.
26831 (sparc_mode_dependent_address_p): Likewise.
26832 (gen_load_pcrel_sym): Remove 4th parameter.
26833 (load_got_register): Adjust call to above. Remove obsolete stuff.
26834 (sparc_expand_prologue): Do not call load_got_register here.
26835 (sparc_flat_expand_prologue): Likewise.
26836 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
26837 (sparc_use_pseudo_pic_reg): New function.
26838 (sparc_init_pic_reg): Likewise.
26839 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26840 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
26841
26842 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
26843
26844 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
26845 Add item for branch_cost.
26846
26847 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26848
26849 PR rtl-optimization/83565
26850 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
26851 not extend the result to a larger mode for rotate operations.
26852 (num_sign_bit_copies1): Likewise.
26853
26854 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26855
26856 PR target/40411
26857 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
26858 -symbolic.
26859 Use values-Xc.o for -pedantic.
26860 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
26861
26862 2018-01-12 Martin Liska <mliska@suse.cz>
26863
26864 PR ipa/83054
26865 * ipa-devirt.c (final_warning_record::grow_type_warnings):
26866 New function.
26867 (possible_polymorphic_call_targets): Use it.
26868 (ipa_devirt): Likewise.
26869
26870 2018-01-12 Martin Liska <mliska@suse.cz>
26871
26872 * profile-count.h (enum profile_quality): Use 0 as invalid
26873 enum value of profile_quality.
26874
26875 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
26876
26877 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
26878 -mext-string options.
26879
26880 2018-01-12 Richard Biener <rguenther@suse.de>
26881
26882 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
26883 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
26884 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
26885 Likewise.
26886 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
26887
26888 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
26889
26890 * configure.ac (--with-long-double-format): Add support for the
26891 configuration option to change the default long double format on
26892 PowerPC systems.
26893 * config.gcc (powerpc*-linux*-*): Likewise.
26894 * configure: Regenerate.
26895 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
26896 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
26897 used without modification.
26898
26899 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26900
26901 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
26902 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
26903 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
26904 MISC_BUILTIN_SPEC_BARRIER.
26905 (rs6000_init_builtins): Likewise.
26906 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
26907 enum value.
26908 (speculation_barrier): New define_insn.
26909 * doc/extend.texi: Document __builtin_speculation_barrier.
26910
26911 2018-01-11 Jakub Jelinek <jakub@redhat.com>
26912
26913 PR target/83203
26914 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
26915 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
26916 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
26917 iterators.
26918 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
26919 integral modes instead of "ss" and "sd".
26920 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
26921 vectors with 32-bit and 64-bit elements.
26922 (vecdupssescalarmodesuffix): New mode attribute.
26923 (vec_dup<mode>): Use it.
26924
26925 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
26926
26927 PR target/83330
26928 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
26929 frame if argument is passed on stack.
26930
26931 2018-01-11 Jakub Jelinek <jakub@redhat.com>
26932
26933 PR target/82682
26934 * ree.c (combine_reaching_defs): Optimize also
26935 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
26936 reg2=any_extend(exp); reg1=reg2;, formatting fix.
26937
26938 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
26939
26940 PR middle-end/83189
26941 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
26942
26943 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
26944
26945 PR middle-end/83718
26946 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
26947 after they are computed.
26948
26949 2018-01-11 Bin Cheng <bin.cheng@arm.com>
26950
26951 PR tree-optimization/83695
26952 * gimple-loop-linterchange.cc
26953 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
26954 reset cached scev information after interchange.
26955 (pass_linterchange::execute): Remove call to scev_reset_htab.
26956
26957 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26958
26959 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
26960 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
26961 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
26962 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
26963 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
26964 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
26965 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
26966 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
26967 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
26968 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
26969 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
26970 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
26971 (V_lane_reg): Likewise.
26972 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
26973 New define_expand.
26974 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
26975 (vfmal_lane_low<mode>_intrinsic,
26976 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
26977 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
26978 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
26979 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
26980 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
26981 vfmsl_lane_high<mode>_intrinsic): New define_insns.
26982
26983 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26984
26985 * config/arm/arm-cpus.in (fp16fml): New feature.
26986 (ALL_SIMD): Add fp16fml.
26987 (armv8.2-a): Add fp16fml as an option.
26988 (armv8.3-a): Likewise.
26989 (armv8.4-a): Add fp16fml as part of fp16.
26990 * config/arm/arm.h (TARGET_FP16FML): Define.
26991 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
26992 when appropriate.
26993 * config/arm/arm-modes.def (V2HF): Define.
26994 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
26995 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
26996 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
26997 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
26998 vfmsl_low, vfmsl_high): New set of builtins.
26999 * config/arm/iterators.md (PLUSMINUS): New code iterator.
27000 (vfml_op): New code attribute.
27001 (VFMLHALVES): New int iterator.
27002 (VFML, VFMLSEL): New mode attributes.
27003 (V_reg): Define mapping for V2HF.
27004 (V_hi, V_lo): New mode attributes.
27005 (VF_constraint): Likewise.
27006 (vfml_half, vfml_half_selector): New int attributes.
27007 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
27008 define_expand.
27009 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
27010 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
27011 New define_insn.
27012 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
27013 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
27014 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
27015 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
27016 documentation.
27017 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
27018 Document new effective target and option set.
27019
27020 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27021
27022 * config/arm/arm-cpus.in (armv8_4): New feature.
27023 (ARMv8_4a): New fgroup.
27024 (armv8.4-a): New arch.
27025 * config/arm/arm-tables.opt: Regenerate.
27026 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
27027 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
27028 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
27029 Add matching rules for -march=armv8.4-a and extensions.
27030 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
27031
27032 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
27033
27034 PR target/81821
27035 * config/rx/rx.md (BW): New mode attribute.
27036 (sync_lock_test_and_setsi): Add mode suffix to insn output.
27037
27038 2018-01-11 Richard Biener <rguenther@suse.de>
27039
27040 PR tree-optimization/83435
27041 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
27042 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
27043 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
27044
27045 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27046 Alan Hayward <alan.hayward@arm.com>
27047 David Sherwood <david.sherwood@arm.com>
27048
27049 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
27050 field.
27051 (aarch64_classify_address): Initialize it. Track polynomial offsets.
27052 (aarch64_print_address_internal): Use it to check for a zero offset.
27053
27054 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27055 Alan Hayward <alan.hayward@arm.com>
27056 David Sherwood <david.sherwood@arm.com>
27057
27058 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
27059 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
27060 Return a poly_int64 rather than a HOST_WIDE_INT.
27061 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
27062 rather than a HOST_WIDE_INT.
27063 * config/aarch64/aarch64.h (aarch64_frame): Protect with
27064 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
27065 hard_fp_offset, frame_size, initial_adjust, callee_offset and
27066 final_offset from HOST_WIDE_INT to poly_int64.
27067 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
27068 to_constant when getting the number of units in an Advanced SIMD
27069 mode.
27070 (aarch64_builtin_vectorized_function): Check for a constant number
27071 of units.
27072 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
27073 GET_MODE_SIZE.
27074 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
27075 attribute instead of GET_MODE_NUNITS.
27076 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
27077 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
27078 GET_MODE_SIZE for fixed-size registers.
27079 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
27080 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
27081 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
27082 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
27083 (aarch64_print_operand, aarch64_print_address_internal)
27084 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
27085 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
27086 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
27087 Handle polynomial GET_MODE_SIZE.
27088 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
27089 wider than SImode without modification.
27090 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
27091 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
27092 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
27093 passing and returning SVE modes.
27094 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
27095 rather than GEN_INT.
27096 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
27097 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
27098 (aarch64_allocate_and_probe_stack_space): Likewise.
27099 (aarch64_layout_frame): Cope with polynomial offsets.
27100 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
27101 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
27102 polynomial offsets.
27103 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
27104 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
27105 poly_int64 rather than a HOST_WIDE_INT.
27106 (aarch64_get_separate_components, aarch64_process_components)
27107 (aarch64_expand_prologue, aarch64_expand_epilogue)
27108 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
27109 (aarch64_anchor_offset): New function, split out from...
27110 (aarch64_legitimize_address): ...here.
27111 (aarch64_builtin_vectorization_cost): Handle polynomial
27112 TYPE_VECTOR_SUBPARTS.
27113 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
27114 GET_MODE_NUNITS.
27115 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
27116 number of elements from the PARALLEL rather than the mode.
27117 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
27118 rather than GET_MODE_BITSIZE.
27119 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
27120 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
27121 (aarch64_expand_vec_perm_const_1): Handle polynomial
27122 d->perm.length () and d->perm elements.
27123 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
27124 Apply to_constant to d->perm elements.
27125 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
27126 polynomial CONST_VECTOR_NUNITS.
27127 (aarch64_move_pointer): Take amount as a poly_int64 rather
27128 than an int.
27129 (aarch64_progress_pointer): Avoid temporary variable.
27130 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
27131 the mode attribute instead of GET_MODE.
27132
27133 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27134 Alan Hayward <alan.hayward@arm.com>
27135 David Sherwood <david.sherwood@arm.com>
27136
27137 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
27138 x exists before using it.
27139 (aarch64_add_constant_internal): Rename to...
27140 (aarch64_add_offset_1): ...this. Replace regnum with separate
27141 src and dest rtxes. Handle the case in which they're different,
27142 including when the offset is zero. Replace scratchreg with an rtx.
27143 Use 2 additions if there is no spare register into which we can
27144 move a 16-bit constant.
27145 (aarch64_add_constant): Delete.
27146 (aarch64_add_offset): Replace reg with separate src and dest
27147 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
27148 Use aarch64_add_offset_1.
27149 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
27150 an rtx rather than an int. Take the delta as a poly_int64
27151 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
27152 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
27153 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
27154 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
27155 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
27156 and aarch64_add_sp.
27157 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
27158 aarch64_add_constant.
27159
27160 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27161
27162 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27163 Use scalar_float_mode.
27164
27165 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27166
27167 * config/aarch64/aarch64-simd.md
27168 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27169 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27170 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27171 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27172 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27173 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27174 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27175 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27176 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27177 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27178
27179 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27180
27181 PR target/83514
27182 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27183 targ_options->x_arm_arch_string is non NULL.
27184
27185 2018-01-11 Tamar Christina <tamar.christina@arm.com>
27186
27187 * config/aarch64/aarch64.h
27188 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
27189
27190 2018-01-11 Sudakshina Das <sudi.das@arm.com>
27191
27192 PR target/82096
27193 * expmed.c (emit_store_flag_force): Swap if const op0
27194 and change VOIDmode to mode of op0.
27195
27196 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27197
27198 PR rtl-optimization/83761
27199 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27200 than bytes to mode_for_size.
27201
27202 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27203
27204 PR middle-end/83189
27205 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27206 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27207 profile.
27208
27209 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27210
27211 PR middle-end/83575
27212 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27213 when in layout mode.
27214 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27215 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27216 partition fixup.
27217
27218 2018-01-10 Michael Collison <michael.collison@arm.com>
27219
27220 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27221 * config/aarch64/aarch64-option-extension.def: Add
27222 AARCH64_OPT_EXTENSION of 'fp16fml'.
27223 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27224 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27225 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27226 * config/aarch64/constraints.md (Ui7): New constraint.
27227 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27228 (VFMLA_SEL_W): Ditto.
27229 (f16quad): Ditto.
27230 (f16mac1): Ditto.
27231 (VFMLA16_LOW): New int iterator.
27232 (VFMLA16_HIGH): Ditto.
27233 (UNSPEC_FMLAL): New unspec.
27234 (UNSPEC_FMLSL): Ditto.
27235 (UNSPEC_FMLAL2): Ditto.
27236 (UNSPEC_FMLSL2): Ditto.
27237 (f16mac): New code attribute.
27238 * config/aarch64/aarch64-simd-builtins.def
27239 (aarch64_fmlal_lowv2sf): Ditto.
27240 (aarch64_fmlsl_lowv2sf): Ditto.
27241 (aarch64_fmlalq_lowv4sf): Ditto.
27242 (aarch64_fmlslq_lowv4sf): Ditto.
27243 (aarch64_fmlal_highv2sf): Ditto.
27244 (aarch64_fmlsl_highv2sf): Ditto.
27245 (aarch64_fmlalq_highv4sf): Ditto.
27246 (aarch64_fmlslq_highv4sf): Ditto.
27247 (aarch64_fmlal_lane_lowv2sf): Ditto.
27248 (aarch64_fmlsl_lane_lowv2sf): Ditto.
27249 (aarch64_fmlal_laneq_lowv2sf): Ditto.
27250 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27251 (aarch64_fmlalq_lane_lowv4sf): Ditto.
27252 (aarch64_fmlsl_lane_lowv4sf): Ditto.
27253 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27254 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27255 (aarch64_fmlal_lane_highv2sf): Ditto.
27256 (aarch64_fmlsl_lane_highv2sf): Ditto.
27257 (aarch64_fmlal_laneq_highv2sf): Ditto.
27258 (aarch64_fmlsl_laneq_highv2sf): Ditto.
27259 (aarch64_fmlalq_lane_highv4sf): Ditto.
27260 (aarch64_fmlsl_lane_highv4sf): Ditto.
27261 (aarch64_fmlalq_laneq_highv4sf): Ditto.
27262 (aarch64_fmlsl_laneq_highv4sf): Ditto.
27263 * config/aarch64/aarch64-simd.md:
27264 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27265 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27266 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27267 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27268 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27269 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27270 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27271 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27272 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27273 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27274 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27275 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27276 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27277 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27278 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27279 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27280 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27281 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27282 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27283 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27284 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27285 (vfmlsl_low_u32): Ditto.
27286 (vfmlalq_low_u32): Ditto.
27287 (vfmlslq_low_u32): Ditto.
27288 (vfmlal_high_u32): Ditto.
27289 (vfmlsl_high_u32): Ditto.
27290 (vfmlalq_high_u32): Ditto.
27291 (vfmlslq_high_u32): Ditto.
27292 (vfmlal_lane_low_u32): Ditto.
27293 (vfmlsl_lane_low_u32): Ditto.
27294 (vfmlal_laneq_low_u32): Ditto.
27295 (vfmlsl_laneq_low_u32): Ditto.
27296 (vfmlalq_lane_low_u32): Ditto.
27297 (vfmlslq_lane_low_u32): Ditto.
27298 (vfmlalq_laneq_low_u32): Ditto.
27299 (vfmlslq_laneq_low_u32): Ditto.
27300 (vfmlal_lane_high_u32): Ditto.
27301 (vfmlsl_lane_high_u32): Ditto.
27302 (vfmlal_laneq_high_u32): Ditto.
27303 (vfmlsl_laneq_high_u32): Ditto.
27304 (vfmlalq_lane_high_u32): Ditto.
27305 (vfmlslq_lane_high_u32): Ditto.
27306 (vfmlalq_laneq_high_u32): Ditto.
27307 (vfmlslq_laneq_high_u32): Ditto.
27308 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27309 (AARCH64_FL_FOR_ARCH8_4): New.
27310 (AARCH64_ISA_F16FML): New ISA flag.
27311 (TARGET_F16FML): New feature flag for fp16fml.
27312 (doc/invoke.texi): Document new fp16fml option.
27313
27314 2018-01-10 Michael Collison <michael.collison@arm.com>
27315
27316 * config/aarch64/aarch64-builtins.c:
27317 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27318 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27319 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27320 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27321 (AARCH64_ISA_SHA3): New ISA flag.
27322 (TARGET_SHA3): New feature flag for sha3.
27323 * config/aarch64/iterators.md (sha512_op): New int attribute.
27324 (CRYPTO_SHA512): New int iterator.
27325 (UNSPEC_SHA512H): New unspec.
27326 (UNSPEC_SHA512H2): Ditto.
27327 (UNSPEC_SHA512SU0): Ditto.
27328 (UNSPEC_SHA512SU1): Ditto.
27329 * config/aarch64/aarch64-simd-builtins.def
27330 (aarch64_crypto_sha512hqv2di): New builtin.
27331 (aarch64_crypto_sha512h2qv2di): Ditto.
27332 (aarch64_crypto_sha512su0qv2di): Ditto.
27333 (aarch64_crypto_sha512su1qv2di): Ditto.
27334 (aarch64_eor3qv8hi): Ditto.
27335 (aarch64_rax1qv2di): Ditto.
27336 (aarch64_xarqv2di): Ditto.
27337 (aarch64_bcaxqv8hi): Ditto.
27338 * config/aarch64/aarch64-simd.md:
27339 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27340 (aarch64_crypto_sha512su0qv2di): Ditto.
27341 (aarch64_crypto_sha512su1qv2di): Ditto.
27342 (aarch64_eor3qv8hi): Ditto.
27343 (aarch64_rax1qv2di): Ditto.
27344 (aarch64_xarqv2di): Ditto.
27345 (aarch64_bcaxqv8hi): Ditto.
27346 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27347 (vsha512h2q_u64): Ditto.
27348 (vsha512su0q_u64): Ditto.
27349 (vsha512su1q_u64): Ditto.
27350 (veor3q_u16): Ditto.
27351 (vrax1q_u64): Ditto.
27352 (vxarq_u64): Ditto.
27353 (vbcaxq_u16): Ditto.
27354 * config/arm/types.md (crypto_sha512): New type attribute.
27355 (crypto_sha3): Ditto.
27356 (doc/invoke.texi): Document new sha3 option.
27357
27358 2018-01-10 Michael Collison <michael.collison@arm.com>
27359
27360 * config/aarch64/aarch64-builtins.c:
27361 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27362 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27363 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27364 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27365 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27366 (AARCH64_ISA_SM4): New ISA flag.
27367 (TARGET_SM4): New feature flag for sm4.
27368 * config/aarch64/aarch64-simd-builtins.def
27369 (aarch64_sm3ss1qv4si): Ditto.
27370 (aarch64_sm3tt1aq4si): Ditto.
27371 (aarch64_sm3tt1bq4si): Ditto.
27372 (aarch64_sm3tt2aq4si): Ditto.
27373 (aarch64_sm3tt2bq4si): Ditto.
27374 (aarch64_sm3partw1qv4si): Ditto.
27375 (aarch64_sm3partw2qv4si): Ditto.
27376 (aarch64_sm4eqv4si): Ditto.
27377 (aarch64_sm4ekeyqv4si): Ditto.
27378 * config/aarch64/aarch64-simd.md:
27379 (aarch64_sm3ss1qv4si): Ditto.
27380 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27381 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27382 (aarch64_sm4eqv4si): Ditto.
27383 (aarch64_sm4ekeyqv4si): Ditto.
27384 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27385 (sm3part_op): Ditto.
27386 (CRYPTO_SM3TT): Ditto.
27387 (CRYPTO_SM3PART): Ditto.
27388 (UNSPEC_SM3SS1): New unspec.
27389 (UNSPEC_SM3TT1A): Ditto.
27390 (UNSPEC_SM3TT1B): Ditto.
27391 (UNSPEC_SM3TT2A): Ditto.
27392 (UNSPEC_SM3TT2B): Ditto.
27393 (UNSPEC_SM3PARTW1): Ditto.
27394 (UNSPEC_SM3PARTW2): Ditto.
27395 (UNSPEC_SM4E): Ditto.
27396 (UNSPEC_SM4EKEY): Ditto.
27397 * config/aarch64/constraints.md (Ui2): New constraint.
27398 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27399 * config/arm/types.md (crypto_sm3): New type attribute.
27400 (crypto_sm4): Ditto.
27401 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27402 (vsm3tt1aq_u32): Ditto.
27403 (vsm3tt1bq_u32): Ditto.
27404 (vsm3tt2aq_u32): Ditto.
27405 (vsm3tt2bq_u32): Ditto.
27406 (vsm3partw1q_u32): Ditto.
27407 (vsm3partw2q_u32): Ditto.
27408 (vsm4eq_u32): Ditto.
27409 (vsm4ekeyq_u32): Ditto.
27410 (doc/invoke.texi): Document new sm4 option.
27411
27412 2018-01-10 Michael Collison <michael.collison@arm.com>
27413
27414 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
27415 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
27416 (AARCH64_FL_FOR_ARCH8_4): New.
27417 (AARCH64_FL_V8_4): New flag.
27418 (doc/invoke.texi): Document new armv8.4-a option.
27419
27420 2018-01-10 Michael Collison <michael.collison@arm.com>
27421
27422 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27423 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
27424 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
27425 * config/aarch64/aarch64-option-extension.def: Add
27426 AARCH64_OPT_EXTENSION of 'sha2'.
27427 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
27428 (crypto): Disable sha2 and aes if crypto disabled.
27429 (crypto): Enable aes and sha2 if enabled.
27430 (simd): Disable sha2 and aes if simd disabled.
27431 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
27432 New flags.
27433 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
27434 (TARGET_SHA2): New feature flag for sha2.
27435 (TARGET_AES): New feature flag for aes.
27436 * config/aarch64/aarch64-simd.md:
27437 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
27438 conditional on TARGET_AES.
27439 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
27440 (aarch64_crypto_sha1hsi): Make pattern conditional
27441 on TARGET_SHA2.
27442 (aarch64_crypto_sha1hv4si): Ditto.
27443 (aarch64_be_crypto_sha1hv4si): Ditto.
27444 (aarch64_crypto_sha1su1v4si): Ditto.
27445 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
27446 (aarch64_crypto_sha1su0v4si): Ditto.
27447 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
27448 (aarch64_crypto_sha256su0v4si): Ditto.
27449 (aarch64_crypto_sha256su1v4si): Ditto.
27450 (doc/invoke.texi): Document new aes and sha2 options.
27451
27452 2018-01-10 Martin Sebor <msebor@redhat.com>
27453
27454 PR tree-optimization/83781
27455 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
27456 as string arrays.
27457
27458 2018-01-11 Martin Sebor <msebor@gmail.com>
27459 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27460
27461 PR tree-optimization/83501
27462 PR tree-optimization/81703
27463
27464 * tree-ssa-strlen.c (get_string_cst): Rename...
27465 (get_string_len): ...to this. Handle global constants.
27466 (handle_char_store): Adjust.
27467
27468 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
27469 Jim Wilson <jimw@sifive.com>
27470
27471 * config/riscv/riscv-protos.h (riscv_output_return): New.
27472 * config/riscv/riscv.c (struct machine_function): New naked_p field.
27473 (riscv_attribute_table, riscv_output_return),
27474 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
27475 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
27476 (riscv_compute_frame_info): Only compute frame->mask if not a naked
27477 function.
27478 (riscv_expand_prologue): Add early return for naked function.
27479 (riscv_expand_epilogue): Likewise.
27480 (riscv_function_ok_for_sibcall): Return false for naked function.
27481 (riscv_set_current_function): New.
27482 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
27483 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
27484 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
27485 * doc/extend.texi (RISC-V Function Attributes): New.
27486
27487 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
27488
27489 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
27490 check for 128-bit long double before checking TCmode.
27491 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
27492 128-bit long doubles before checking TFmode or TCmode.
27493 (FLOAT128_IBM_P): Likewise.
27494
27495 2018-01-10 Martin Sebor <msebor@redhat.com>
27496
27497 PR tree-optimization/83671
27498 * builtins.c (c_strlen): Unconditionally return zero for the empty
27499 string.
27500 Use -Warray-bounds for warnings.
27501 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
27502 for non-constant array indices with COMPONENT_REF, arrays of
27503 arrays, and pointers to arrays.
27504 (gimple_fold_builtin_strlen): Determine and set length range for
27505 non-constant character arrays.
27506
27507 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
27508
27509 PR middle-end/81897
27510 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
27511 empty blocks.
27512
27513 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
27514
27515 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
27516
27517 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27518
27519 PR target/83399
27520 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
27521 VECTOR_MEM_ALTIVEC_OR_VSX_P.
27522 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
27523 indexed_or_indirect_operand predicate.
27524 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
27525 (*vsx_le_perm_load_v8hi): Likewise.
27526 (*vsx_le_perm_load_v16qi): Likewise.
27527 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
27528 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
27529 (*vsx_le_perm_store_v8hi): Likewise.
27530 (*vsx_le_perm_store_v16qi): Likewise.
27531 (eight unnamed splitters): Likewise.
27532
27533 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27534
27535 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
27536 * config/rs6000/emmintrin.h: Likewise.
27537 * config/rs6000/mmintrin.h: Likewise.
27538 * config/rs6000/xmmintrin.h: Likewise.
27539
27540 2018-01-10 David Malcolm <dmalcolm@redhat.com>
27541
27542 PR c++/43486
27543 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
27544 "public_flag".
27545 * tree.c (tree_nop_conversion): Return true for location wrapper
27546 nodes.
27547 (maybe_wrap_with_location): New function.
27548 (selftest::check_strip_nops): New function.
27549 (selftest::test_location_wrappers): New function.
27550 (selftest::tree_c_tests): Call it.
27551 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
27552 (maybe_wrap_with_location): New decl.
27553 (EXPR_LOCATION_WRAPPER_P): New macro.
27554 (location_wrapper_p): New inline function.
27555 (tree_strip_any_location_wrapper): New inline function.
27556
27557 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
27558
27559 PR target/83735
27560 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
27561 stack_realign_offset for the largest alignment of stack slot
27562 actually used.
27563 (ix86_find_max_used_stack_alignment): New function.
27564 (ix86_finalize_stack_frame_flags): Use it. Set
27565 max_used_stack_alignment if we don't realign stack.
27566 * config/i386/i386.h (machine_function): Add
27567 max_used_stack_alignment.
27568
27569 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
27570
27571 * config/arm/arm.opt (-mbranch-cost): New option.
27572 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
27573 account.
27574
27575 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
27576
27577 PR target/83629
27578 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
27579 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
27580
27581 2018-01-10 Richard Biener <rguenther@suse.de>
27582
27583 PR debug/83765
27584 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
27585 early out so it also covers the case where we have a non-NULL
27586 origin.
27587
27588 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27589
27590 PR tree-optimization/83753
27591 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
27592 for non-strided grouped accesses if the number of elements is 1.
27593
27594 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27595
27596 PR target/81616
27597 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
27598 * i386.h (TARGET_USE_GATHER): Define.
27599 * x86-tune.def (X86_TUNE_USE_GATHER): New.
27600
27601 2018-01-10 Martin Liska <mliska@suse.cz>
27602
27603 PR bootstrap/82831
27604 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
27605 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
27606 partitioning.
27607 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
27608 CLEANUP_NO_PARTITIONING is not set.
27609
27610 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27611
27612 * doc/rtl.texi: Remove documentation of (const ...) wrappers
27613 for vectors, as a partial revert of r254296.
27614 * rtl.h (const_vec_p): Delete.
27615 (const_vec_duplicate_p): Don't test for vector CONSTs.
27616 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
27617 * expmed.c (make_tree): Likewise.
27618
27619 Revert:
27620 * common.md (E, F): Use CONSTANT_P instead of checking for
27621 CONST_VECTOR.
27622 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
27623 checking for CONST_VECTOR.
27624
27625 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27626
27627 PR middle-end/83575
27628 * predict.c (force_edge_cold): Handle in more sane way edges
27629 with no prediction.
27630
27631 2018-01-09 Carl Love <cel@us.ibm.com>
27632
27633 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
27634 V4SI, V4SF types.
27635 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
27636 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
27637 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
27638 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
27639 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
27640 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
27641 * config/rs6000/rs6000-protos.h: Add extern defition for
27642 rs6000_generate_float2_double_code.
27643 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
27644 function.
27645 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
27646 (float2_v2df): Add define_expand.
27647
27648 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
27649
27650 PR target/83628
27651 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
27652 op_mode in the force_to_mode call.
27653
27654 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27655
27656 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
27657 instead of checking each element individually.
27658 (aarch64_evpc_uzp): Likewise.
27659 (aarch64_evpc_zip): Likewise.
27660 (aarch64_evpc_ext): Likewise.
27661 (aarch64_evpc_rev): Likewise.
27662 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
27663 instead of checking each element individually. Return true without
27664 generating rtl if
27665 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
27666 whether all selected elements come from the same input, instead of
27667 checking each element individually. Remove calls to gen_rtx_REG,
27668 start_sequence and end_sequence and instead assert that no rtl is
27669 generated.
27670
27671 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27672
27673 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
27674 order of HIGH and CONST checks.
27675
27676 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27677
27678 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
27679 if the destination isn't an SSA_NAME.
27680
27681 2018-01-09 Richard Biener <rguenther@suse.de>
27682
27683 PR tree-optimization/83668
27684 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
27685 move prologue...
27686 (canonicalize_loop_form): ... here, renamed from ...
27687 (canonicalize_loop_closed_ssa_form): ... this and amended to
27688 swap successor edges for loop exit blocks to make us use
27689 the RPO order we need for initial schedule generation.
27690
27691 2018-01-09 Joseph Myers <joseph@codesourcery.com>
27692
27693 PR tree-optimization/64811
27694 * match.pd: When optimizing comparisons with Inf, avoid
27695 introducing or losing exceptions from comparisons with NaN.
27696
27697 2018-01-09 Martin Liska <mliska@suse.cz>
27698
27699 PR sanitizer/82517
27700 * asan.c (shadow_mem_size): Add gcc_assert.
27701
27702 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
27703
27704 Don't save registers in main().
27705
27706 PR target/83738
27707 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
27708 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
27709 * config/avr/avr.c (avr_set_current_function): Don't error if
27710 naked, OS_task or OS_main are specified at the same time.
27711 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
27712 OS_main.
27713 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
27714 attribute.
27715 * common/config/avr/avr-common.c (avr_option_optimization_table):
27716 Switch on -mmain-is-OS_task for optimizing compilations.
27717
27718 2018-01-09 Richard Biener <rguenther@suse.de>
27719
27720 PR tree-optimization/83572
27721 * graphite.c: Include cfganal.h.
27722 (graphite_transform_loops): Connect infinite loops to exit
27723 and remove fake edges at the end.
27724
27725 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27726
27727 * ipa-inline.c (edge_badness): Revert accidental checkin.
27728
27729 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27730
27731 PR ipa/80763
27732 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
27733 symbols; not inline clones.
27734
27735 2018-01-09 Jakub Jelinek <jakub@redhat.com>
27736
27737 PR target/83507
27738 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
27739 hard registers. Formatting fixes.
27740
27741 PR preprocessor/83722
27742 * gcc.c (try_generate_repro): Pass
27743 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
27744 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
27745 do_report_bug.
27746
27747 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
27748 Kito Cheng <kito.cheng@gmail.com>
27749
27750 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
27751 (riscv_leaf_function_p): Delete.
27752 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
27753
27754 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27755
27756 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
27757 function.
27758 (do_ifelse): New function.
27759 (do_isel): New function.
27760 (do_sub3): New function.
27761 (do_add3): New function.
27762 (do_load_mask_compare): New function.
27763 (do_overlap_load_compare): New function.
27764 (expand_compare_loop): New function.
27765 (expand_block_compare): Call expand_compare_loop() when appropriate.
27766 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
27767 option description.
27768 (-mblock-compare-inline-loop-limit): New option.
27769
27770 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27771
27772 PR target/83677
27773 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
27774 Reverse order of second and third operands in first alternative.
27775 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
27776 of first and second elements in UNSPEC_VPERMR vector.
27777 (altivec_expand_vec_perm_le): Likewise.
27778
27779 2018-01-08 Jeff Law <law@redhat.com>
27780
27781 PR rtl-optimizatin/81308
27782 * tree-switch-conversion.c (cfg_altered): New file scoped static.
27783 (process_switch): If group_case_labels makes a change, then set
27784 cfg_altered.
27785 (pass_convert_switch::execute): If a switch is converted, then
27786 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
27787
27788 PR rtl-optimization/81308
27789 * recog.c (split_all_insns): Conditionally cleanup the CFG after
27790 splitting insns.
27791
27792 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
27793
27794 PR target/83663 - Revert r255946
27795 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
27796 generation for cases where splatting a value is not useful.
27797 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
27798 across a vec_duplicate and a paradoxical subreg forming a vector
27799 mode to a vec_concat.
27800
27801 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27802
27803 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
27804 -march=armv8.3-a variants.
27805 * config/arm/t-multilib: Likewise.
27806 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
27807
27808 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27809
27810 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
27811 to generate rtl.
27812 (cceq_ior_compare_complement): Give it a name so I can use it, and
27813 change boolean_or_operator predicate to boolean_operator so it can
27814 be used to generate a crand.
27815 (eqne): New code iterator.
27816 (bd/bd_neg): New code_attrs.
27817 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
27818 a single define_insn.
27819 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
27820 decrement (bdnzt/bdnzf/bdzt/bdzf).
27821 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
27822 with the new names of the branch decrement patterns, and added the
27823 names of the branch decrement conditional patterns.
27824
27825 2018-01-08 Richard Biener <rguenther@suse.de>
27826
27827 PR tree-optimization/83563
27828 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
27829 cache.
27830
27831 2018-01-08 Richard Biener <rguenther@suse.de>
27832
27833 PR middle-end/83713
27834 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
27835
27836 2018-01-08 Richard Biener <rguenther@suse.de>
27837
27838 PR tree-optimization/83685
27839 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
27840 references to abnormals.
27841
27842 2018-01-08 Richard Biener <rguenther@suse.de>
27843
27844 PR lto/83719
27845 * dwarf2out.c (output_indirect_strings): Handle empty
27846 skeleton_debug_str_hash.
27847 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
27848
27849 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27850
27851 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
27852 (emit_store_direct): Likewise.
27853 (arc_trampoline_adjust_address): Likewise.
27854 (arc_asm_trampoline_template): New function.
27855 (arc_initialize_trampoline): Use asm_trampoline_template.
27856 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
27857 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
27858 * config/arc/arc.md (flush_icache): Delete pattern.
27859
27860 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27861
27862 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
27863 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
27864 munaligned-access.
27865
27866 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
27867
27868 PR target/83681
27869 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
27870 by not USED_FOR_TARGET.
27871 (make_pass_resolve_sw_modes): Likewise.
27872
27873 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
27874
27875 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
27876 USED_FOR_TARGET.
27877
27878 2018-01-08 Richard Biener <rguenther@suse.de>
27879
27880 PR middle-end/83580
27881 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
27882
27883 2018-01-08 Richard Biener <rguenther@suse.de>
27884
27885 PR middle-end/83517
27886 * match.pd ((t * 2) / 2) -> t): Add missing :c.
27887
27888 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
27889
27890 PR middle-end/81897
27891 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
27892 basic blocks with a small number of successors.
27893 (convert_control_dep_chain_into_preds): Improve handling of
27894 forwarder blocks.
27895 (dump_predicates): Split apart into...
27896 (dump_pred_chain): ...here...
27897 (dump_pred_info): ...and here.
27898 (can_one_predicate_be_invalidated_p): Add debugging printfs.
27899 (can_chain_union_be_invalidated_p): Improve check for invalidation
27900 of paths.
27901 (uninit_uses_cannot_happen): Avoid unnecessary if
27902 convert_control_dep_chain_into_preds yielded nothing.
27903
27904 2018-01-06 Martin Sebor <msebor@redhat.com>
27905
27906 PR tree-optimization/83640
27907 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
27908 subtracting negative offset from size.
27909 (builtin_access::overlap): Adjust offset bounds of the access to fall
27910 within the size of the object if possible.
27911
27912 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
27913
27914 PR rtl-optimization/83699
27915 * expmed.c (extract_bit_field_1): Restrict the vector usage of
27916 extract_bit_field_as_subreg to cases in which the extracted
27917 value is also a vector.
27918
27919 * lra-constraints.c (process_alt_operands): Test for the equivalence
27920 substitutions when detecting a possible reload cycle.
27921
27922 2018-01-06 Jakub Jelinek <jakub@redhat.com>
27923
27924 PR debug/83480
27925 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
27926 by default if flag_selective_schedling{,2}. Formatting fixes.
27927
27928 PR rtl-optimization/83682
27929 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
27930 if it has non-VECTOR_MODE element mode.
27931 (vec_duplicate_p): Likewise.
27932
27933 PR middle-end/83694
27934 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
27935 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
27936
27937 2018-01-05 Jakub Jelinek <jakub@redhat.com>
27938
27939 PR target/83604
27940 * config/i386/i386-builtin.def
27941 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
27942 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
27943 Require also OPTION_MASK_ISA_AVX512F in addition to
27944 OPTION_MASK_ISA_GFNI.
27945 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
27946 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
27947 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
27948 to OPTION_MASK_ISA_GFNI.
27949 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
27950 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
27951 OPTION_MASK_ISA_AVX512BW.
27952 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
27953 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
27954 addition to OPTION_MASK_ISA_GFNI.
27955 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
27956 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
27957 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
27958 to OPTION_MASK_ISA_GFNI.
27959 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
27960 a requirement for all ISAs rather than any of them with a few
27961 exceptions.
27962 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
27963 processing.
27964 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
27965 bitmasks to be enabled with 3 exceptions, instead of requiring any
27966 enabled ISA with lots of exceptions.
27967 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
27968 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
27969 Change avx512bw in isa attribute to avx512f.
27970 * config/i386/sgxintrin.h: Add license boilerplate.
27971 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
27972 to __AVX512F__ and __AVX512VL to __AVX512VL__.
27973 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
27974 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
27975 defined.
27976 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
27977 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
27978 temporarily sse2 rather than sse if not enabled already.
27979
27980 PR target/83604
27981 * config/i386/sse.md (VI248_VLBW): Rename to ...
27982 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
27983 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
27984 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
27985 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
27986 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
27987 mode iterator instead of VI248_VLBW.
27988
27989 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
27990
27991 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
27992 (record_modified): Skip clobbers; add debug output.
27993 (param_change_prob): Use sreal frequencies.
27994
27995 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
27996
27997 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
27998 punt for user-aligned variables.
27999
28000 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28001
28002 * tree-chrec.c (chrec_contains_symbols): Return true for
28003 POLY_INT_CST.
28004
28005 2018-01-05 Sudakshina Das <sudi.das@arm.com>
28006
28007 PR target/82439
28008 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
28009 of (x|y) == x for BICS pattern.
28010
28011 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28012
28013 PR tree-optimization/83605
28014 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
28015 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
28016 can throw.
28017
28018 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
28019
28020 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
28021 * config/epiphany/rtems.h: New file.
28022
28023 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28024 Uros Bizjak <ubizjak@gmail.com>
28025
28026 PR target/83554
28027 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
28028 QIreg_operand instead of register_operand predicate.
28029 * config/i386/i386.c (ix86_rop_should_change_byte_p,
28030 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
28031 comments instead of -fmitigate[-_]rop.
28032
28033 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28034
28035 PR bootstrap/81926
28036 * cgraphunit.c (symbol_table::compile): Switch to text_section
28037 before calling assembly_start debug hook.
28038 * run-rtl-passes.c (run_rtl_passes): Likewise.
28039 Include output.h.
28040
28041 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28042
28043 * tree-vrp.c (extract_range_from_binary_expr_1): Check
28044 range_int_cst_p rather than !symbolic_range_p before calling
28045 extract_range_from_multiplicative_op_1.
28046
28047 2018-01-04 Jeff Law <law@redhat.com>
28048
28049 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
28050 redundant test in assertion.
28051
28052 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28053
28054 * doc/rtl.texi: Document machine_mode wrapper classes.
28055
28056 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28057
28058 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
28059 using tree_to_uhwi.
28060
28061 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28062
28063 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
28064 the VEC_PERM_EXPR fold to fail.
28065
28066 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28067
28068 PR debug/83585
28069 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
28070 to switched_sections.
28071
28072 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28073
28074 PR target/83680
28075 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
28076 test for d.testing.
28077
28078 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
28079
28080 PR target/83387
28081 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
28082 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
28083
28084 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28085
28086 PR debug/83666
28087 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
28088 is BLKmode and bitpos not zero or mode change is needed.
28089
28090 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28091
28092 PR target/83675
28093 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
28094 TARGET_VIS2.
28095
28096 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
28097
28098 PR target/83628
28099 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
28100 instead of MULT rtx. Update all corresponding splitters.
28101 (*saddl_se): Ditto.
28102 (*ssub<modesuffix>): Ditto.
28103 (*ssubl_se): Ditto.
28104 (*cmp_sadd_di): Update split patterns.
28105 (*cmp_sadd_si): Ditto.
28106 (*cmp_sadd_sidi): Ditto.
28107 (*cmp_ssub_di): Ditto.
28108 (*cmp_ssub_si): Ditto.
28109 (*cmp_ssub_sidi): Ditto.
28110 * config/alpha/predicates.md (const23_operand): New predicate.
28111 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
28112 Look for ASHIFT, not MULT inner operand.
28113 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
28114
28115 2018-01-04 Martin Liska <mliska@suse.cz>
28116
28117 PR gcov-profile/83669
28118 * gcov.c (output_intermediate_file): Add version to intermediate
28119 gcov file.
28120 * doc/gcov.texi: Document new field 'version' in intermediate
28121 file format. Fix location of '-k' option of gcov command.
28122
28123 2018-01-04 Martin Liska <mliska@suse.cz>
28124
28125 PR ipa/82352
28126 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
28127
28128 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28129
28130 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
28131
28132 2018-01-03 Martin Sebor <msebor@redhat.com>
28133
28134 PR tree-optimization/83655
28135 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
28136 checking calls with invalid arguments.
28137
28138 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28139
28140 * tree-vect-stmts.c (vect_get_store_rhs): New function.
28141 (vectorizable_mask_load_store): Delete.
28142 (vectorizable_call): Return false for masked loads and stores.
28143 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
28144 instead of gimple_assign_rhs1.
28145 (vectorizable_load): Handle IFN_MASK_LOAD.
28146 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
28147
28148 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28149
28150 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
28151 split out from..,
28152 (vectorizable_mask_load_store): ...here.
28153 (vectorizable_load): ...and here.
28154
28155 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28156
28157 * tree-vect-stmts.c (vect_build_all_ones_mask)
28158 (vect_build_zero_merge_argument): New functions, split out from...
28159 (vectorizable_load): ...here.
28160
28161 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28162
28163 * tree-vect-stmts.c (vect_check_store_rhs): New function,
28164 split out from...
28165 (vectorizable_mask_load_store): ...here.
28166 (vectorizable_store): ...and here.
28167
28168 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28169
28170 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28171 split out from...
28172 (vectorizable_mask_load_store): ...here.
28173
28174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28175
28176 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28177 (vect_model_store_cost): Take a vec_load_store_type instead of a
28178 vect_def_type.
28179 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28180 (vect_model_store_cost): Take a vec_load_store_type instead of a
28181 vect_def_type.
28182 (vectorizable_mask_load_store): Update accordingly.
28183 (vectorizable_store): Likewise.
28184 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28185
28186 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28187
28188 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28189 IFN_MASK_LOAD calls here rather than...
28190 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28191
28192 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28193 Alan Hayward <alan.hayward@arm.com>
28194 David Sherwood <david.sherwood@arm.com>
28195
28196 * expmed.c (extract_bit_field_1): For vector extracts,
28197 fall back to extract_bit_field_as_subreg if vec_extract
28198 isn't available.
28199
28200 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28201 Alan Hayward <alan.hayward@arm.com>
28202 David Sherwood <david.sherwood@arm.com>
28203
28204 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28205 they are variable or constant sized.
28206 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28207 slots for constant-sized data.
28208
28209 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28210 Alan Hayward <alan.hayward@arm.com>
28211 David Sherwood <david.sherwood@arm.com>
28212
28213 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28214 handling COND_EXPRs with boolean comparisons, try to find a better
28215 basis for the mask type than the boolean itself.
28216
28217 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28218
28219 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28220 is calculated and how it can be overridden.
28221 * genmodes.c (max_bitsize_mode_any_mode): New variable.
28222 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28223 if defined.
28224 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28225 if nonzero.
28226
28227 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28228 Alan Hayward <alan.hayward@arm.com>
28229 David Sherwood <david.sherwood@arm.com>
28230
28231 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28232 Remove the mode argument.
28233 (aarch64_simd_valid_immediate): Remove the mode and inverse
28234 arguments.
28235 * config/aarch64/iterators.md (bitsize): New iterator.
28236 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28237 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28238 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28239 aarch64_simd_valid_immediate.
28240 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28241 (aarch64_reg_or_bic_imm): Likewise.
28242 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28243 with an insn_type enum and msl with a modifier_type enum.
28244 Replace element_width with a scalar_mode. Change the shift
28245 to unsigned int. Add constructors for scalar_float_mode and
28246 scalar_int_mode elements.
28247 (aarch64_vect_float_const_representable_p): Delete.
28248 (aarch64_can_const_movi_rtx_p)
28249 (aarch64_simd_scalar_immediate_valid_for_move)
28250 (aarch64_simd_make_constant): Update call to
28251 aarch64_simd_valid_immediate.
28252 (aarch64_advsimd_valid_immediate_hs): New function.
28253 (aarch64_advsimd_valid_immediate): Likewise.
28254 (aarch64_simd_valid_immediate): Remove mode and inverse
28255 arguments. Rewrite to use the above. Use const_vec_duplicate_p
28256 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28257 and aarch64_float_const_representable_p on the result.
28258 (aarch64_output_simd_mov_immediate): Remove mode argument.
28259 Update call to aarch64_simd_valid_immediate and use of
28260 simd_immediate_info.
28261 (aarch64_output_scalar_simd_mov_immediate): Update call
28262 accordingly.
28263
28264 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28265 Alan Hayward <alan.hayward@arm.com>
28266 David Sherwood <david.sherwood@arm.com>
28267
28268 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28269 (mode_nunits): Likewise CONST_MODE_NUNITS.
28270 * machmode.def (ADJUST_NUNITS): Document.
28271 * genmodes.c (mode_data::need_nunits_adj): New field.
28272 (blank_mode): Update accordingly.
28273 (adj_nunits): New variable.
28274 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28275 parameter.
28276 (emit_mode_size_inline): Set need_bytesize_adj for all modes
28277 listed in adj_nunits.
28278 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28279 listed in adj_nunits. Don't emit case statements for such modes.
28280 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28281 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
28282 nothing if adj_nunits is nonnull.
28283 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28284 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28285 (emit_mode_fbit): Update use of print_maybe_const_decl.
28286 (emit_move_size): Likewise. Treat the array as non-const
28287 if adj_nunits.
28288 (emit_mode_adjustments): Handle adj_nunits.
28289
28290 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28291
28292 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28293 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28294 (VECTOR_MODES): Use it.
28295 (make_vector_modes): Take the prefix as an argument.
28296
28297 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28298 Alan Hayward <alan.hayward@arm.com>
28299 David Sherwood <david.sherwood@arm.com>
28300
28301 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28302 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28303 for MODE_VECTOR_BOOL.
28304 * machmode.def (VECTOR_BOOL_MODE): Document.
28305 * genmodes.c (VECTOR_BOOL_MODE): New macro.
28306 (make_vector_bool_mode): New function.
28307 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28308 MODE_VECTOR_BOOL.
28309 * lto-streamer-in.c (lto_input_mode_table): Likewise.
28310 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28311 Likewise.
28312 * stor-layout.c (int_mode_for_mode): Likewise.
28313 * tree.c (build_vector_type_for_mode): Likewise.
28314 * varasm.c (output_constant_pool_2): Likewise.
28315 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28316 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
28317 for MODE_VECTOR_BOOL.
28318 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28319 of mode class checks.
28320 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28321 instead of a list of mode class checks.
28322 (expand_vector_scalar_condition): Likewise.
28323 (type_for_widest_vector_mode): Handle BImode as an inner mode.
28324
28325 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28326 Alan Hayward <alan.hayward@arm.com>
28327 David Sherwood <david.sherwood@arm.com>
28328
28329 * machmode.h (mode_size): Change from unsigned short to
28330 poly_uint16_pod.
28331 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28332 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28333 or if measurement_type is not polynomial.
28334 (fixed_size_mode::includes_p): Check for constant-sized modes.
28335 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28336 return a poly_uint16 rather than an unsigned short.
28337 (emit_mode_size): Change the type of mode_size from unsigned short
28338 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
28339 (emit_mode_adjustments): Cope with polynomial vector sizes.
28340 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28341 for GET_MODE_SIZE.
28342 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28343 for GET_MODE_SIZE.
28344 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28345 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28346 * caller-save.c (setup_save_areas): Likewise.
28347 (replace_reg_with_saved_mem): Likewise.
28348 * calls.c (emit_library_call_value_1): Likewise.
28349 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28350 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28351 (gen_lowpart_for_combine): Likewise.
28352 * convert.c (convert_to_integer_1): Likewise.
28353 * cse.c (equiv_constant, cse_insn): Likewise.
28354 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28355 (cselib_subst_to_values): Likewise.
28356 * dce.c (word_dce_process_block): Likewise.
28357 * df-problems.c (df_word_lr_mark_ref): Likewise.
28358 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28359 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28360 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28361 (rtl_for_decl_location): Likewise.
28362 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28363 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28364 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28365 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28366 (expand_expr_real_1): Likewise.
28367 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28368 (pad_below): Likewise.
28369 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28370 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28371 * ira.c (get_subreg_tracking_sizes): Likewise.
28372 * ira-build.c (ira_create_allocno_objects): Likewise.
28373 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28374 (ira_sort_regnos_for_alter_reg): Likewise.
28375 * ira-costs.c (record_operand_costs): Likewise.
28376 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28377 (resolve_simple_move): Likewise.
28378 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28379 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28380 (lra_constraints): Likewise.
28381 (CONST_POOL_OK_P): Reject variable-sized modes.
28382 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28383 (add_pseudo_to_slot, lra_spill): Likewise.
28384 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28385 * optabs-query.c (get_best_extraction_insn): Likewise.
28386 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28387 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28388 (expand_mult_highpart, valid_multiword_target_p): Likewise.
28389 * recog.c (offsettable_address_addr_space_p): Likewise.
28390 * regcprop.c (maybe_mode_change): Likewise.
28391 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28392 * regrename.c (build_def_use): Likewise.
28393 * regstat.c (dump_reg_info): Likewise.
28394 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28395 (find_reloads, find_reloads_subreg_address): Likewise.
28396 * reload1.c (eliminate_regs_1): Likewise.
28397 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28398 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28399 (simplify_binary_operation_1, simplify_subreg): Likewise.
28400 * targhooks.c (default_function_arg_padding): Likewise.
28401 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28402 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28403 (verify_gimple_assign_ternary): Likewise.
28404 * tree-inline.c (estimate_move_cost): Likewise.
28405 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28406 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28407 (get_address_cost_ainc): Likewise.
28408 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28409 (vect_supportable_dr_alignment): Likewise.
28410 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28411 (vectorizable_reduction): Likewise.
28412 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
28413 (vectorizable_operation, vectorizable_load): Likewise.
28414 * tree.c (build_same_sized_truth_vector_type): Likewise.
28415 * valtrack.c (cleanup_auto_inc_dec): Likewise.
28416 * var-tracking.c (emit_note_insn_var_location): Likewise.
28417 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
28418 (ADDR_VEC_ALIGN): Likewise.
28419
28420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28421 Alan Hayward <alan.hayward@arm.com>
28422 David Sherwood <david.sherwood@arm.com>
28423
28424 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
28425 unsigned short.
28426 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28427 or if measurement_type is polynomial.
28428 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
28429 * combine.c (make_extraction): Likewise.
28430 * dse.c (find_shift_sequence): Likewise.
28431 * dwarf2out.c (mem_loc_descriptor): Likewise.
28432 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
28433 (extract_bit_field, extract_low_bits): Likewise.
28434 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
28435 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
28436 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
28437 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
28438 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28439 * reload.c (find_reloads): Likewise.
28440 * reload1.c (alter_reg): Likewise.
28441 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
28442 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
28443 * tree-if-conv.c (predicate_mem_writes): Likewise.
28444 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
28445 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
28446 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
28447 * valtrack.c (dead_debug_insert_temp): Likewise.
28448 * varasm.c (mergeable_constant_section): Likewise.
28449 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
28450
28451 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28452 Alan Hayward <alan.hayward@arm.com>
28453 David Sherwood <david.sherwood@arm.com>
28454
28455 * expr.c (expand_assignment): Cope with polynomial mode sizes
28456 when assigning to a CONCAT.
28457
28458 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28459 Alan Hayward <alan.hayward@arm.com>
28460 David Sherwood <david.sherwood@arm.com>
28461
28462 * machmode.h (mode_precision): Change from unsigned short to
28463 poly_uint16_pod.
28464 (mode_to_precision): Return a poly_uint16 rather than an unsigned
28465 short.
28466 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
28467 or if measurement_type is not polynomial.
28468 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
28469 in which the mode is already known to be a scalar_int_mode.
28470 * genmodes.c (emit_mode_precision): Change the type of mode_precision
28471 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
28472 initializer.
28473 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28474 for GET_MODE_PRECISION.
28475 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28476 for GET_MODE_PRECISION.
28477 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
28478 as polynomial.
28479 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
28480 (expand_field_assignment, make_extraction): Likewise.
28481 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
28482 (get_last_value): Likewise.
28483 * convert.c (convert_to_integer_1): Likewise.
28484 * cse.c (cse_insn): Likewise.
28485 * expr.c (expand_expr_real_1): Likewise.
28486 * lra-constraints.c (simplify_operand_subreg): Likewise.
28487 * optabs-query.c (can_atomic_load_p): Likewise.
28488 * optabs.c (expand_atomic_load): Likewise.
28489 (expand_atomic_store): Likewise.
28490 * ree.c (combine_reaching_defs): Likewise.
28491 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
28492 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
28493 * tree.h (type_has_mode_precision_p): Likewise.
28494 * ubsan.c (instrument_si_overflow): Likewise.
28495
28496 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28497 Alan Hayward <alan.hayward@arm.com>
28498 David Sherwood <david.sherwood@arm.com>
28499
28500 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
28501 polynomial numbers of units.
28502 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
28503 (valid_vector_subparts_p): New function.
28504 (build_vector_type): Remove temporary shim and take the number
28505 of units as a poly_uint64 rather than an int.
28506 (build_opaque_vector_type): Take the number of units as a
28507 poly_uint64 rather than an int.
28508 * tree.c (build_vector_from_ctor): Handle polynomial
28509 TYPE_VECTOR_SUBPARTS.
28510 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
28511 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
28512 (build_vector_from_val): If the number of units is variable,
28513 use build_vec_duplicate_cst for constant operands and
28514 VEC_DUPLICATE_EXPR otherwise.
28515 (make_vector_type): Remove temporary is_constant ().
28516 (build_vector_type, build_opaque_vector_type): Take the number of
28517 units as a poly_uint64 rather than an int.
28518 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
28519 VECTOR_CST_NELTS.
28520 * cfgexpand.c (expand_debug_expr): Likewise.
28521 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
28522 (store_constructor, expand_expr_real_1): Likewise.
28523 (const_scalar_mask_from_tree): Likewise.
28524 * fold-const-call.c (fold_const_reduction): Likewise.
28525 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
28526 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
28527 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
28528 (fold_relational_const): Likewise.
28529 (native_interpret_vector): Likewise. Change the size from an
28530 int to an unsigned int.
28531 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
28532 TYPE_VECTOR_SUBPARTS.
28533 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
28534 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
28535 duplicating a non-constant operand into a variable-length vector.
28536 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
28537 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
28538 * ipa-icf.c (sem_variable::equals): Likewise.
28539 * match.pd: Likewise.
28540 * omp-simd-clone.c (simd_clone_subparts): Likewise.
28541 * print-tree.c (print_node): Likewise.
28542 * stor-layout.c (layout_type): Likewise.
28543 * targhooks.c (default_builtin_vectorization_cost): Likewise.
28544 * tree-cfg.c (verify_gimple_comparison): Likewise.
28545 (verify_gimple_assign_binary): Likewise.
28546 (verify_gimple_assign_ternary): Likewise.
28547 (verify_gimple_assign_single): Likewise.
28548 * tree-pretty-print.c (dump_generic_node): Likewise.
28549 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28550 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
28551 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
28552 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
28553 (vect_shift_permute_load_chain): Likewise.
28554 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
28555 (expand_vector_condition, optimize_vector_constructor): Likewise.
28556 (lower_vec_perm, get_compute_type): Likewise.
28557 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28558 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
28559 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
28560 (vect_recog_mask_conversion_pattern): Likewise.
28561 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
28562 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
28563 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28564 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
28565 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
28566 (vectorizable_shift, vectorizable_operation, vectorizable_store)
28567 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
28568 (supportable_widening_operation): Likewise.
28569 (supportable_narrowing_operation): Likewise.
28570 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
28571 Likewise.
28572 * varasm.c (output_constant): Likewise.
28573
28574 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28575 Alan Hayward <alan.hayward@arm.com>
28576 David Sherwood <david.sherwood@arm.com>
28577
28578 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
28579 so that both the length == 3 and length != 3 cases set up their
28580 own permute vectors. Add comments explaining why we know the
28581 number of elements is constant.
28582 (vect_permute_load_chain): Likewise.
28583
28584 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28585 Alan Hayward <alan.hayward@arm.com>
28586 David Sherwood <david.sherwood@arm.com>
28587
28588 * machmode.h (mode_nunits): Change from unsigned char to
28589 poly_uint16_pod.
28590 (ONLY_FIXED_SIZE_MODES): New macro.
28591 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
28592 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
28593 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
28594 New typedefs.
28595 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
28596 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
28597 or if measurement_type is not polynomial.
28598 * genmodes.c (ZERO_COEFFS): New macro.
28599 (emit_mode_nunits_inline): Make mode_nunits_inline return a
28600 poly_uint16.
28601 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
28602 Use ZERO_COEFFS when emitting initializers.
28603 * data-streamer.h (bp_pack_poly_value): New function.
28604 (bp_unpack_poly_value): Likewise.
28605 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28606 for GET_MODE_NUNITS.
28607 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28608 for GET_MODE_NUNITS.
28609 * tree.c (make_vector_type): Remove temporary shim and make
28610 the real function take the number of units as a poly_uint64
28611 rather than an int.
28612 (build_vector_type_for_mode): Handle polynomial nunits.
28613 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
28614 * emit-rtl.c (const_vec_series_p_1): Likewise.
28615 (gen_rtx_CONST_VECTOR): Likewise.
28616 * fold-const.c (test_vec_duplicate_folding): Likewise.
28617 * genrecog.c (validate_pattern): Likewise.
28618 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
28619 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28620 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
28621 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
28622 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
28623 * rtlanal.c (subreg_get_info): Likewise.
28624 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28625 (vect_grouped_load_supported): Likewise.
28626 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
28627 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
28628 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
28629 (simplify_const_unary_operation, simplify_binary_operation_1)
28630 (simplify_const_binary_operation, simplify_ternary_operation)
28631 (test_vector_ops_duplicate, test_vector_ops): Likewise.
28632 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
28633 instead of CONST_VECTOR_NUNITS.
28634 * varasm.c (output_constant_pool_2): Likewise.
28635 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
28636 explicit-encoded elements in the XVEC for variable-length vectors.
28637
28638 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28639
28640 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
28641
28642 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28643 Alan Hayward <alan.hayward@arm.com>
28644 David Sherwood <david.sherwood@arm.com>
28645
28646 * coretypes.h (fixed_size_mode): Declare.
28647 (fixed_size_mode_pod): New typedef.
28648 * builtins.h (target_builtins::x_apply_args_mode)
28649 (target_builtins::x_apply_result_mode): Change type to
28650 fixed_size_mode_pod.
28651 * builtins.c (apply_args_size, apply_result_size, result_vector)
28652 (expand_builtin_apply_args_1, expand_builtin_apply)
28653 (expand_builtin_return): Update accordingly.
28654
28655 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28656
28657 * cse.c (hash_rtx_cb): Hash only the encoded elements.
28658 * cselib.c (cselib_hash_rtx): Likewise.
28659 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
28660 CONST_VECTOR encoding.
28661
28662 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28663 Jeff Law <law@redhat.com>
28664
28665 PR target/83641
28666 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
28667 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
28668 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
28669 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
28670
28671 PR target/83641
28672 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
28673 explicitly probe *sp in a noreturn function if there were any callee
28674 register saves or frame pointer is needed.
28675
28676 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28677
28678 PR debug/83621
28679 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
28680 BLKmode for ternary, binary or unary expressions.
28681
28682 PR debug/83645
28683 * var-tracking.c (delete_vta_debug_insn): New inline function.
28684 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
28685 insns from get_insns () to NULL instead of each bb separately.
28686 Use delete_vta_debug_insn. No longer static.
28687 (vt_debug_insns_local, variable_tracking_main_1): Adjust
28688 delete_vta_debug_insns callers.
28689 * rtl.h (delete_vta_debug_insns): Declare.
28690 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
28691 instead of variable_tracking_main.
28692
28693 2018-01-03 Martin Sebor <msebor@redhat.com>
28694
28695 PR tree-optimization/83603
28696 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
28697 arguments past the endof the argument list in functions declared
28698 without a prototype.
28699 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
28700 Avoid checking when arguments are null.
28701
28702 2018-01-03 Martin Sebor <msebor@redhat.com>
28703
28704 PR c/83559
28705 * doc/extend.texi (attribute const): Fix a typo.
28706 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
28707 issuing -Wsuggest-attribute for void functions.
28708
28709 2018-01-03 Martin Sebor <msebor@redhat.com>
28710
28711 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
28712 offset_int::from instead of wide_int::to_shwi.
28713 (maybe_diag_overlap): Remove assertion.
28714 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
28715 * gimple-ssa-sprintf.c (format_directive): Same.
28716 (parse_directive): Same.
28717 (sprintf_dom_walker::compute_format_length): Same.
28718 (try_substitute_return_value): Same.
28719
28720 2018-01-03 Jeff Law <law@redhat.com>
28721
28722 PR middle-end/83654
28723 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
28724 non-constant residual for zero at runtime and avoid probing in
28725 that case. Reorganize code for trailing problem to mirror handling
28726 of the residual.
28727
28728 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28729
28730 PR tree-optimization/83501
28731 * tree-ssa-strlen.c (get_string_cst): New.
28732 (handle_char_store): Call get_string_cst.
28733
28734 2018-01-03 Martin Liska <mliska@suse.cz>
28735
28736 PR tree-optimization/83593
28737 * tree-ssa-strlen.c: Include tree-cfg.h.
28738 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
28739 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
28740 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
28741 to false.
28742 (strlen_dom_walker::before_dom_children): Call
28743 gimple_purge_dead_eh_edges. Dump tranformation with details
28744 dump flags.
28745 (strlen_dom_walker::before_dom_children): Update call by adding
28746 new argument cleanup_eh.
28747 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
28748
28749 2018-01-03 Martin Liska <mliska@suse.cz>
28750
28751 PR ipa/83549
28752 * cif-code.def (VARIADIC_THUNK): New enum value.
28753 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
28754 thunks.
28755
28756 2018-01-03 Jan Beulich <jbeulich@suse.com>
28757
28758 * sse.md (mov<mode>_internal): Tighten condition for when to use
28759 vmovdqu<ssescalarsize> for TI and OI modes.
28760
28761 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28762
28763 Update copyright years.
28764
28765 2018-01-03 Martin Liska <mliska@suse.cz>
28766
28767 PR ipa/83594
28768 * ipa-visibility.c (function_and_variable_visibility): Skip
28769 functions with noipa attribure.
28770
28771 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28772
28773 * gcc.c (process_command): Update copyright notice dates.
28774 * gcov-dump.c (print_version): Ditto.
28775 * gcov.c (print_version): Ditto.
28776 * gcov-tool.c (print_version): Ditto.
28777 * gengtype.c (create_file): Ditto.
28778 * doc/cpp.texi: Bump @copying's copyright year.
28779 * doc/cppinternals.texi: Ditto.
28780 * doc/gcc.texi: Ditto.
28781 * doc/gccint.texi: Ditto.
28782 * doc/gcov.texi: Ditto.
28783 * doc/install.texi: Ditto.
28784 * doc/invoke.texi: Ditto.
28785
28786 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28787
28788 * vector-builder.h (vector_builder::m_full_nelts): Change from
28789 unsigned int to poly_uint64.
28790 (vector_builder::full_nelts): Update prototype accordingly.
28791 (vector_builder::new_vector): Likewise.
28792 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
28793 (vector_builder::operator ==): Likewise.
28794 (vector_builder::finalize): Likewise.
28795 * int-vector-builder.h (int_vector_builder::int_vector_builder):
28796 Take the number of elements as a poly_uint64 rather than an
28797 unsigned int.
28798 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
28799 from unsigned int to poly_uint64.
28800 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
28801 (vec_perm_indices::new_vector): Likewise.
28802 (vec_perm_indices::length): Likewise.
28803 (vec_perm_indices::nelts_per_input): Likewise.
28804 (vec_perm_indices::input_nelts): Likewise.
28805 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
28806 number of elements per input as a poly_uint64 rather than an
28807 unsigned int. Use the original encoding for variable-length
28808 vectors, rather than clamping each individual element.
28809 For the second and subsequent elements in each pattern,
28810 clamp the step and base before clamping their sum.
28811 (vec_perm_indices::series_p): Handle polynomial element counts.
28812 (vec_perm_indices::all_in_range_p): Likewise.
28813 (vec_perm_indices_to_tree): Likewise.
28814 (vec_perm_indices_to_rtx): Likewise.
28815 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
28816 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
28817 (tree_vector_builder::new_binary_operation): Handle polynomial
28818 element counts. Return false if we need to know the number
28819 of elements at compile time.
28820 * fold-const.c (fold_vec_perm): Punt if the number of elements
28821 isn't known at compile time.
28822
28823 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28824
28825 * vec-perm-indices.h (vec_perm_builder): Change element type
28826 from HOST_WIDE_INT to poly_int64.
28827 (vec_perm_indices::element_type): Update accordingly.
28828 (vec_perm_indices::clamp): Handle polynomial element_types.
28829 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28830 (vec_perm_indices::all_in_range_p): Likewise.
28831 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
28832 than shwi trees.
28833 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
28834 polynomial vec_perm_indices element types.
28835 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
28836 * fold-const.c (fold_vec_perm): Likewise.
28837 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
28838 * tree-vect-generic.c (lower_vec_perm): Likewise.
28839 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28840 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
28841 element type to HOST_WIDE_INT.
28842
28843 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28844 Alan Hayward <alan.hayward@arm.com>
28845 David Sherwood <david.sherwood@arm.com>
28846
28847 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
28848 rather than an int. Use plus_constant.
28849 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
28850 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
28851
28852 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28853 Alan Hayward <alan.hayward@arm.com>
28854 David Sherwood <david.sherwood@arm.com>
28855
28856 * calls.c (emit_call_1, expand_call): Change struct_value_size from
28857 a HOST_WIDE_INT to a poly_int64.
28858
28859 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28860 Alan Hayward <alan.hayward@arm.com>
28861 David Sherwood <david.sherwood@arm.com>
28862
28863 * calls.c (load_register_parameters): Cope with polynomial
28864 mode sizes. Require a constant size for BLKmode parameters
28865 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
28866 forces a parameter to be padded at the lsb end in order to
28867 fill a complete number of words, require the parameter size
28868 to be ordered wrt UNITS_PER_WORD.
28869
28870 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28871 Alan Hayward <alan.hayward@arm.com>
28872 David Sherwood <david.sherwood@arm.com>
28873
28874 * reload1.c (spill_stack_slot_width): Change element type
28875 from unsigned int to poly_uint64_pod.
28876 (alter_reg): Treat mode sizes as polynomial.
28877
28878 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28879 Alan Hayward <alan.hayward@arm.com>
28880 David Sherwood <david.sherwood@arm.com>
28881
28882 * reload.c (complex_word_subreg_p): New function.
28883 (reload_inner_reg_of_subreg, push_reload): Use it.
28884
28885 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28886 Alan Hayward <alan.hayward@arm.com>
28887 David Sherwood <david.sherwood@arm.com>
28888
28889 * lra-constraints.c (process_alt_operands): Reject matched
28890 operands whose sizes aren't ordered.
28891 (match_reload): Refer to this check here.
28892
28893 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28894 Alan Hayward <alan.hayward@arm.com>
28895 David Sherwood <david.sherwood@arm.com>
28896
28897 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
28898 that the mode size is in the set {1, 2, 4, 8, 16}.
28899
28900 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28901 Alan Hayward <alan.hayward@arm.com>
28902 David Sherwood <david.sherwood@arm.com>
28903
28904 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
28905 Use plus_constant instead of gen_rtx_PLUS.
28906
28907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28908 Alan Hayward <alan.hayward@arm.com>
28909 David Sherwood <david.sherwood@arm.com>
28910
28911 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
28912 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
28913 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
28914 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
28915 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
28916 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
28917 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
28918 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
28919 * config/i386/i386.c (ix86_push_rounding): ...this new function.
28920 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
28921 a poly_int64.
28922 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
28923 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
28924 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
28925 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
28926 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
28927 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
28928 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
28929 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
28930 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
28931 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
28932 function.
28933 * expr.c (emit_move_resolve_push): Treat the input and result
28934 of PUSH_ROUNDING as a poly_int64.
28935 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
28936 (emit_push_insn): Likewise.
28937 * lra-eliminations.c (mark_not_eliminable): Likewise.
28938 * recog.c (push_operand): Likewise.
28939 * reload1.c (elimination_effects): Likewise.
28940 * rtlanal.c (nonzero_bits1): Likewise.
28941 * calls.c (store_one_arg): Likewise. Require the padding to be
28942 known at compile time.
28943
28944 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28945 Alan Hayward <alan.hayward@arm.com>
28946 David Sherwood <david.sherwood@arm.com>
28947
28948 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
28949 Use plus_constant instead of gen_rtx_PLUS.
28950
28951 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28952 Alan Hayward <alan.hayward@arm.com>
28953 David Sherwood <david.sherwood@arm.com>
28954
28955 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
28956 rather than an int.
28957
28958 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28959 Alan Hayward <alan.hayward@arm.com>
28960 David Sherwood <david.sherwood@arm.com>
28961
28962 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
28963 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
28964 via stack temporaries. Treat the mode size as polynomial too.
28965
28966 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28967 Alan Hayward <alan.hayward@arm.com>
28968 David Sherwood <david.sherwood@arm.com>
28969
28970 * expr.c (expand_expr_real_2): When handling conversions involving
28971 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
28972 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
28973 as a poly_uint64 too.
28974
28975 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28976 Alan Hayward <alan.hayward@arm.com>
28977 David Sherwood <david.sherwood@arm.com>
28978
28979 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
28980
28981 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28982 Alan Hayward <alan.hayward@arm.com>
28983 David Sherwood <david.sherwood@arm.com>
28984
28985 * combine.c (can_change_dest_mode): Handle polynomial
28986 REGMODE_NATURAL_SIZE.
28987 * expmed.c (store_bit_field_1): Likewise.
28988 * expr.c (store_constructor): Likewise.
28989 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
28990 and polynomial REGMODE_NATURAL_SIZE.
28991 (gen_lowpart_common): Likewise.
28992 * reginfo.c (record_subregs_of_mode): Likewise.
28993 * rtlanal.c (read_modify_subreg_p): Likewise.
28994
28995 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28996 Alan Hayward <alan.hayward@arm.com>
28997 David Sherwood <david.sherwood@arm.com>
28998
28999 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
29000 numbers of elements.
29001
29002 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29003 Alan Hayward <alan.hayward@arm.com>
29004 David Sherwood <david.sherwood@arm.com>
29005
29006 * match.pd: Cope with polynomial numbers of vector elements.
29007
29008 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29009 Alan Hayward <alan.hayward@arm.com>
29010 David Sherwood <david.sherwood@arm.com>
29011
29012 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
29013 in a POINTER_PLUS_EXPR.
29014
29015 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29016 Alan Hayward <alan.hayward@arm.com>
29017 David Sherwood <david.sherwood@arm.com>
29018
29019 * omp-simd-clone.c (simd_clone_subparts): New function.
29020 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
29021 (ipa_simd_modify_function_body): Likewise.
29022
29023 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29024 Alan Hayward <alan.hayward@arm.com>
29025 David Sherwood <david.sherwood@arm.com>
29026
29027 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
29028 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
29029 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
29030 (expand_vector_condition, vector_element): Likewise.
29031 (subparts_gt): New function.
29032 (get_compute_type): Use subparts_gt.
29033 (count_type_subparts): Delete.
29034 (expand_vector_operations_1): Use subparts_gt instead of
29035 count_type_subparts.
29036
29037 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29038 Alan Hayward <alan.hayward@arm.com>
29039 David Sherwood <david.sherwood@arm.com>
29040
29041 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
29042 (vect_compile_time_alias): ...this new function. Do the calculation
29043 on poly_ints rather than trees.
29044 (vect_prune_runtime_alias_test_list): Update call accordingly.
29045
29046 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29047 Alan Hayward <alan.hayward@arm.com>
29048 David Sherwood <david.sherwood@arm.com>
29049
29050 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
29051 numbers of units.
29052 (vect_schedule_slp_instance): Likewise.
29053
29054 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29055 Alan Hayward <alan.hayward@arm.com>
29056 David Sherwood <david.sherwood@arm.com>
29057
29058 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
29059 constant and extern definitions for variable-length vectors.
29060 (vect_get_constant_vectors): Note that the number of units
29061 is known to be constant.
29062
29063 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29064 Alan Hayward <alan.hayward@arm.com>
29065 David Sherwood <david.sherwood@arm.com>
29066
29067 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
29068 of units as polynomial. Choose between WIDE and NARROW based
29069 on multiple_p.
29070
29071 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29072 Alan Hayward <alan.hayward@arm.com>
29073 David Sherwood <david.sherwood@arm.com>
29074
29075 * tree-vect-stmts.c (simd_clone_subparts): New function.
29076 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
29077
29078 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29079 Alan Hayward <alan.hayward@arm.com>
29080 David Sherwood <david.sherwood@arm.com>
29081
29082 * tree-vect-stmts.c (vectorizable_call): Treat the number of
29083 vectors as polynomial. Use build_index_vector for
29084 IFN_GOMP_SIMD_LANE.
29085
29086 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29087 Alan Hayward <alan.hayward@arm.com>
29088 David Sherwood <david.sherwood@arm.com>
29089
29090 * tree-vect-stmts.c (get_load_store_type): Treat the number of
29091 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
29092 for variable-length vectors.
29093 (vectorizable_mask_load_store): Treat the number of units as
29094 polynomial, asserting that it is constant if the condition has
29095 already been enforced.
29096 (vectorizable_store, vectorizable_load): Likewise.
29097
29098 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29099 Alan Hayward <alan.hayward@arm.com>
29100 David Sherwood <david.sherwood@arm.com>
29101
29102 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
29103 of units as polynomial. Punt if we can't tell at compile time
29104 which vector contains the final result.
29105
29106 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29107 Alan Hayward <alan.hayward@arm.com>
29108 David Sherwood <david.sherwood@arm.com>
29109
29110 * tree-vect-loop.c (vectorizable_induction): Treat the number
29111 of units as polynomial. Punt on SLP inductions. Use an integer
29112 VEC_SERIES_EXPR for variable-length integer reductions. Use a
29113 cast of such a series for variable-length floating-point
29114 reductions.
29115
29116 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29117 Alan Hayward <alan.hayward@arm.com>
29118 David Sherwood <david.sherwood@arm.com>
29119
29120 * tree.h (build_index_vector): Declare.
29121 * tree.c (build_index_vector): New function.
29122 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
29123 of units as polynomial, forcibly converting it to a constant if
29124 vectorizable_reduction has already enforced the condition.
29125 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
29126 to create a {1,2,3,...} vector.
29127 (vectorizable_reduction): Treat the number of units as polynomial.
29128 Choose vectype_in based on the largest scalar element size rather
29129 than the smallest number of units. Enforce the restrictions
29130 relied on above.
29131
29132 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29133 Alan Hayward <alan.hayward@arm.com>
29134 David Sherwood <david.sherwood@arm.com>
29135
29136 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
29137 number of units as polynomial.
29138
29139 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29140 Alan Hayward <alan.hayward@arm.com>
29141 David Sherwood <david.sherwood@arm.com>
29142
29143 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
29144 * target.def (autovectorize_vector_sizes): Return the vector sizes
29145 by pointer, using vector_sizes rather than a bitmask.
29146 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
29147 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
29148 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
29149 Likewise.
29150 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
29151 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
29152 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
29153 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
29154 * omp-general.c (omp_max_vf): Likewise.
29155 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29156 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
29157 * tree-vect-loop.c (vect_analyze_loop): Likewise.
29158 * tree-vect-slp.c (vect_slp_bb): Likewise.
29159 * doc/tm.texi: Regenerate.
29160 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29161 to a poly_uint64.
29162 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29163 the vector size as a poly_uint64 rather than an unsigned int.
29164 (current_vector_size): Change from an unsigned int to a poly_uint64.
29165 (get_vectype_for_scalar_type): Update accordingly.
29166 * tree.h (build_truth_vector_type): Take the size and number of
29167 units as a poly_uint64 rather than an unsigned int.
29168 (build_vector_type): Add a temporary overload that takes
29169 the number of units as a poly_uint64 rather than an unsigned int.
29170 * tree.c (make_vector_type): Likewise.
29171 (build_truth_vector_type): Take the number of units as a poly_uint64
29172 rather than an unsigned int.
29173
29174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29175 Alan Hayward <alan.hayward@arm.com>
29176 David Sherwood <david.sherwood@arm.com>
29177
29178 * target.def (get_mask_mode): Take the number of units and length
29179 as poly_uint64s rather than unsigned ints.
29180 * targhooks.h (default_get_mask_mode): Update accordingly.
29181 * targhooks.c (default_get_mask_mode): Likewise.
29182 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29183 * doc/tm.texi: Regenerate.
29184
29185 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29186 Alan Hayward <alan.hayward@arm.com>
29187 David Sherwood <david.sherwood@arm.com>
29188
29189 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29190 * omp-general.c (omp_max_vf): Likewise.
29191 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29192 (expand_omp_simd): Handle polynomial safelen.
29193 * omp-low.c (omplow_simd_context): Add a default constructor.
29194 (omplow_simd_context::max_vf): Change from int to poly_uint64.
29195 (lower_rec_simd_input_clauses): Update accordingly.
29196 (lower_rec_input_clauses): Likewise.
29197
29198 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29199 Alan Hayward <alan.hayward@arm.com>
29200 David Sherwood <david.sherwood@arm.com>
29201
29202 * tree-vectorizer.h (vect_nunits_for_cost): New function.
29203 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29204 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29205 (vect_analyze_slp_cost): Likewise.
29206 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29207 (vect_model_load_cost): Likewise.
29208
29209 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29210 Alan Hayward <alan.hayward@arm.com>
29211 David Sherwood <david.sherwood@arm.com>
29212
29213 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29214 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29215 from an unsigned int * to a poly_uint64_pod *.
29216 (calculate_unrolling_factor): New function.
29217 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
29218
29219 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29220 Alan Hayward <alan.hayward@arm.com>
29221 David Sherwood <david.sherwood@arm.com>
29222
29223 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29224 from an unsigned int to a poly_uint64.
29225 (_loop_vec_info::slp_unrolling_factor): Likewise.
29226 (_loop_vec_info::vectorization_factor): Change from an int
29227 to a poly_uint64.
29228 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29229 (vect_get_num_vectors): New function.
29230 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29231 (vect_get_num_copies): Use vect_get_num_vectors.
29232 (vect_analyze_data_ref_dependences): Change max_vf from an int *
29233 to an unsigned int *.
29234 (vect_analyze_data_refs): Change min_vf from an int * to a
29235 poly_uint64 *.
29236 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29237 than an unsigned HOST_WIDE_INT.
29238 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29239 (vect_analyze_data_ref_dependence): Change max_vf from an int *
29240 to an unsigned int *.
29241 (vect_analyze_data_ref_dependences): Likewise.
29242 (vect_compute_data_ref_alignment): Handle polynomial vf.
29243 (vect_enhance_data_refs_alignment): Likewise.
29244 (vect_prune_runtime_alias_test_list): Likewise.
29245 (vect_shift_permute_load_chain): Likewise.
29246 (vect_supportable_dr_alignment): Likewise.
29247 (dependence_distance_ge_vf): Take the vectorization factor as a
29248 poly_uint64 rather than an unsigned HOST_WIDE_INT.
29249 (vect_analyze_data_refs): Change min_vf from an int * to a
29250 poly_uint64 *.
29251 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29252 vfm1 as a poly_uint64 rather than an int. Make the same change
29253 for the returned bound_scalar.
29254 (vect_gen_vector_loop_niters): Handle polynomial vf.
29255 (vect_do_peeling): Likewise. Update call to
29256 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29257 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29258 be constant.
29259 * tree-vect-loop.c (vect_determine_vectorization_factor)
29260 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29261 (vect_get_known_peeling_cost): Likewise.
29262 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29263 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29264 (vect_transform_loop): Likewise. Use the lowest possible VF when
29265 updating the upper bounds of the loop.
29266 (vect_min_worthwhile_factor): Make static. Return an unsigned int
29267 rather than an int.
29268 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29269 polynomial unroll factors.
29270 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29271 (vect_make_slp_decision): Likewise.
29272 (vect_supported_load_permutation_p): Likewise, and polynomial
29273 vf too.
29274 (vect_analyze_slp_cost): Handle polynomial vf.
29275 (vect_slp_analyze_node_operations): Likewise.
29276 (vect_slp_analyze_bb_1): Likewise.
29277 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29278 than an unsigned HOST_WIDE_INT.
29279 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29280 (vectorizable_load): Handle polynomial vf.
29281 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29282 a poly_uint64.
29283 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29284
29285 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29286 Alan Hayward <alan.hayward@arm.com>
29287 David Sherwood <david.sherwood@arm.com>
29288
29289 * match.pd: Handle bit operations involving three constants
29290 and try to fold one pair.
29291
29292 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29293
29294 * tree-vect-loop-manip.c: Include gimple-fold.h.
29295 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29296 niters_maybe_zero parameters. Handle other cases besides a step of 1.
29297 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29298 Add a path that uses a step of VF instead of 1, but disable it
29299 for now.
29300 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29301 and niters_no_overflow parameters. Update calls to
29302 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29303 Create a new SSA name if the latter choses to use a ste other
29304 than zero, and return it via niters_vector_mult_vf_var.
29305 * tree-vect-loop.c (vect_transform_loop): Update calls to
29306 vect_do_peeling, vect_gen_vector_loop_niters and
29307 slpeel_make_loop_iterate_ntimes.
29308 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29309 (vect_gen_vector_loop_niters): Update declarations after above changes.
29310
29311 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
29312
29313 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29314 128-bit round to integer instructions.
29315 (ceil<mode>2): Likewise.
29316 (btrunc<mode>2): Likewise.
29317 (round<mode>2): Likewise.
29318
29319 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29320
29321 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29322 unaligned VSX load/store on P8/P9.
29323 (expand_block_clear): Allow the use of unaligned VSX
29324 load/store on P8/P9.
29325
29326 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29327
29328 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29329 New function.
29330 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29331 swap associated with both a load and a store.
29332
29333 2018-01-02 Andrew Waterman <andrew@sifive.com>
29334
29335 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29336 * config/riscv/riscv.md (clear_cache): Use it.
29337
29338 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
29339
29340 * web.c: Remove out-of-date comment.
29341
29342 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29343
29344 * expr.c (fixup_args_size_notes): Check that any existing
29345 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29346 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29347 (emit_single_push_insn): ...here.
29348
29349 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29350
29351 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29352 (const_vector_encoded_nelts): New function.
29353 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29354 (const_vector_int_elt, const_vector_elt): Declare.
29355 * emit-rtl.c (const_vector_int_elt_1): New function.
29356 (const_vector_elt): Likewise.
29357 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29358 of CONST_VECTOR_ELT.
29359
29360 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29361
29362 * expr.c: Include rtx-vector-builder.h.
29363 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29364 directly on the tree encoding.
29365 (const_vector_from_tree): Likewise.
29366 * optabs.c: Include rtx-vector-builder.h.
29367 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29368 sequence of "u" values.
29369 * vec-perm-indices.c: Include rtx-vector-builder.h.
29370 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29371 directly on the vec_perm_indices encoding.
29372
29373 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29374
29375 * doc/rtl.texi (const_vector): Describe new encoding scheme.
29376 * Makefile.in (OBJS): Add rtx-vector-builder.o.
29377 * rtx-vector-builder.h: New file.
29378 * rtx-vector-builder.c: Likewise.
29379 * rtl.h (rtx_def::u2): Add a const_vector field.
29380 (CONST_VECTOR_NPATTERNS): New macro.
29381 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29382 (CONST_VECTOR_DUPLICATE_P): Likewise.
29383 (CONST_VECTOR_STEPPED_P): Likewise.
29384 (CONST_VECTOR_ENCODED_ELT): Likewise.
29385 (const_vec_duplicate_p): Check for a duplicated vector encoding.
29386 (unwrap_const_vec_duplicate): Likewise.
29387 (const_vec_series_p): Check for a non-duplicated vector encoding.
29388 Say that the function only returns true for integer vectors.
29389 * emit-rtl.c: Include rtx-vector-builder.h.
29390 (gen_const_vec_duplicate_1): Delete.
29391 (gen_const_vector): Call gen_const_vec_duplicate instead of
29392 gen_const_vec_duplicate_1.
29393 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29394 (gen_const_vec_duplicate): Use rtx_vector_builder.
29395 (gen_const_vec_series): Likewise.
29396 (gen_rtx_CONST_VECTOR): Likewise.
29397 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29398 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29399 Build a new vector rather than modifying a CONST_VECTOR in-place.
29400 (handle_special_swappables): Update call accordingly.
29401 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29402 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29403 Build a new vector rather than modifying a CONST_VECTOR in-place.
29404 (handle_special_swappables): Update call accordingly.
29405
29406 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29407
29408 * simplify-rtx.c (simplify_const_binary_operation): Use
29409 CONST_VECTOR_ELT instead of XVECEXP.
29410
29411 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29412
29413 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
29414 the selector elements to be different from the data elements
29415 if the selector is a VECTOR_CST.
29416 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
29417 ssizetype for the selector.
29418
29419 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29420
29421 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
29422 before testing each element individually.
29423 * tree-vect-generic.c (lower_vec_perm): Likewise.
29424
29425 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29426
29427 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
29428 * selftest-run-tests.c (selftest::run_tests): Call it.
29429 * vector-builder.h (vector_builder::operator ==): New function.
29430 (vector_builder::operator !=): Likewise.
29431 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
29432 (vec_perm_indices::all_from_input_p): New function.
29433 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29434 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
29435 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
29436 instead of reading the VECTOR_CST directly. Detect whether both
29437 vector inputs are the same before constructing the vec_perm_indices,
29438 and update the number of inputs argument accordingly. Use the
29439 utility functions added above. Only construct sel2 if we need to.
29440
29441 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29442
29443 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
29444 the broadcast of the low byte.
29445 (expand_mult_highpart): Use an explicit encoding for the permutes.
29446 * optabs-query.c (can_mult_highpart_p): Likewise.
29447 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
29448 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29449 (vectorizable_bswap): Likewise.
29450 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
29451 explicit encoding for the power-of-2 permutes.
29452 (vect_permute_store_chain): Likewise.
29453 (vect_grouped_load_supported): Likewise.
29454 (vect_permute_load_chain): Likewise.
29455
29456 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29457
29458 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
29459 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
29460 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
29461 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29462 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
29463 (vect_gen_perm_mask_any): Likewise.
29464
29465 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29466
29467 * int-vector-builder.h: New file.
29468 * vec-perm-indices.h: Include int-vector-builder.h.
29469 (vec_perm_indices): Redefine as an int_vector_builder.
29470 (auto_vec_perm_indices): Delete.
29471 (vec_perm_builder): Redefine as a stand-alone class.
29472 (vec_perm_indices::vec_perm_indices): New function.
29473 (vec_perm_indices::clamp): Likewise.
29474 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
29475 (vec_perm_indices::new_vector): New function.
29476 (vec_perm_indices::new_expanded_vector): Update for new
29477 vec_perm_indices class.
29478 (vec_perm_indices::rotate_inputs): New function.
29479 (vec_perm_indices::all_in_range_p): Operate directly on the
29480 encoded form, without computing elided elements.
29481 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
29482 encoding. Update for new vec_perm_indices class.
29483 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
29484 the given vec_perm_builder.
29485 (expand_vec_perm_var): Update vec_perm_builder constructor.
29486 (expand_mult_highpart): Use vec_perm_builder instead of
29487 auto_vec_perm_indices.
29488 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
29489 vec_perm_indices instead of auto_vec_perm_indices. Use a single
29490 or double series encoding as appropriate.
29491 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
29492 vec_perm_indices instead of auto_vec_perm_indices.
29493 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29494 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29495 (vect_permute_store_chain): Likewise.
29496 (vect_grouped_load_supported): Likewise.
29497 (vect_permute_load_chain): Likewise.
29498 (vect_shift_permute_load_chain): Likewise.
29499 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29500 (vect_transform_slp_perm_load): Likewise.
29501 (vect_schedule_slp_instance): Likewise.
29502 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29503 (vectorizable_mask_load_store): Likewise.
29504 (vectorizable_bswap): Likewise.
29505 (vectorizable_store): Likewise.
29506 (vectorizable_load): Likewise.
29507 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
29508 vec_perm_indices instead of auto_vec_perm_indices. Use
29509 tree_to_vec_perm_builder to read the vector from a tree.
29510 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
29511 vec_perm_builder instead of a vec_perm_indices.
29512 (have_whole_vector_shift): Use vec_perm_builder and
29513 vec_perm_indices instead of auto_vec_perm_indices. Leave the
29514 truncation to calc_vec_perm_mask_for_shift.
29515 (vect_create_epilog_for_reduction): Likewise.
29516 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
29517 from auto_vec_perm_indices to vec_perm_indices.
29518 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29519 instead of changing individual elements.
29520 (aarch64_vectorize_vec_perm_const): Use new_vector to install
29521 the vector in d.perm.
29522 * config/arm/arm.c (expand_vec_perm_d::perm): Change
29523 from auto_vec_perm_indices to vec_perm_indices.
29524 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29525 instead of changing individual elements.
29526 (arm_vectorize_vec_perm_const): Use new_vector to install
29527 the vector in d.perm.
29528 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
29529 Update vec_perm_builder constructor.
29530 (rs6000_expand_interleave): Likewise.
29531 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
29532 (rs6000_expand_interleave): Likewise.
29533
29534 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29535
29536 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
29537 to qimode could truncate the indices.
29538 * optabs.c (expand_vec_perm_var): Likewise.
29539
29540 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29541
29542 * Makefile.in (OBJS): Add vec-perm-indices.o.
29543 * vec-perm-indices.h: New file.
29544 * vec-perm-indices.c: Likewise.
29545 * target.h (vec_perm_indices): Replace with a forward class
29546 declaration.
29547 (auto_vec_perm_indices): Move to vec-perm-indices.h.
29548 * optabs.h: Include vec-perm-indices.h.
29549 (expand_vec_perm): Delete.
29550 (selector_fits_mode_p, expand_vec_perm_var): Declare.
29551 (expand_vec_perm_const): Declare.
29552 * target.def (vec_perm_const_ok): Replace with...
29553 (vec_perm_const): ...this new hook.
29554 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
29555 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
29556 * doc/tm.texi: Regenerate.
29557 * optabs.def (vec_perm_const): Delete.
29558 * doc/md.texi (vec_perm_const): Likewise.
29559 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
29560 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
29561 expand_vec_perm for constant permutation vectors. Assert that
29562 the mode of variable permutation vectors is the integer equivalent
29563 of the mode that is being permuted.
29564 * optabs-query.h (selector_fits_mode_p): Declare.
29565 * optabs-query.c: Include vec-perm-indices.h.
29566 (selector_fits_mode_p): New function.
29567 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
29568 is defined, instead of checking whether the vec_perm_const_optab
29569 exists. Use targetm.vectorize.vec_perm_const instead of
29570 targetm.vectorize.vec_perm_const_ok. Check whether the indices
29571 fit in the vector mode before using a variable permute.
29572 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
29573 vec_perm_indices instead of an rtx.
29574 (expand_vec_perm): Replace with...
29575 (expand_vec_perm_const): ...this new function. Take the selector
29576 as a vec_perm_indices rather than an rtx. Also take the mode of
29577 the selector. Update call to shift_amt_for_vec_perm_mask.
29578 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
29579 Use vec_perm_indices::new_expanded_vector to expand the original
29580 selector into bytes. Check whether the indices fit in the vector
29581 mode before using a variable permute.
29582 (expand_vec_perm_var): Make global.
29583 (expand_mult_highpart): Use expand_vec_perm_const.
29584 * fold-const.c: Includes vec-perm-indices.h.
29585 * tree-ssa-forwprop.c: Likewise.
29586 * tree-vect-data-refs.c: Likewise.
29587 * tree-vect-generic.c: Likewise.
29588 * tree-vect-loop.c: Likewise.
29589 * tree-vect-slp.c: Likewise.
29590 * tree-vect-stmts.c: Likewise.
29591 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
29592 Delete.
29593 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
29594 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
29595 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
29596 (aarch64_vectorize_vec_perm_const): ...this new function.
29597 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29598 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29599 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
29600 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
29601 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29602 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29603 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
29604 into...
29605 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
29606 check for NEON modes.
29607 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
29608 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
29609 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
29610 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
29611 into...
29612 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
29613 the old VEC_PERM_CONST conditions.
29614 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
29615 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
29616 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
29617 (ia64_vectorize_vec_perm_const_ok): Merge into...
29618 (ia64_vectorize_vec_perm_const): ...this new function.
29619 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
29620 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
29621 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
29622 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
29623 * config/mips/mips.c (mips_expand_vec_perm_const)
29624 (mips_vectorize_vec_perm_const_ok): Merge into...
29625 (mips_vectorize_vec_perm_const): ...this new function.
29626 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
29627 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
29628 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
29629 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
29630 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
29631 (rs6000_expand_vec_perm_const): Delete.
29632 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
29633 Delete.
29634 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29635 (altivec_expand_vec_perm_const_le): Take each operand individually.
29636 Operate on constant selectors rather than rtxes.
29637 (altivec_expand_vec_perm_const): Likewise. Update call to
29638 altivec_expand_vec_perm_const_le.
29639 (rs6000_expand_vec_perm_const): Delete.
29640 (rs6000_vectorize_vec_perm_const_ok): Delete.
29641 (rs6000_vectorize_vec_perm_const): New function.
29642 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29643 an element count and rtx array.
29644 (rs6000_expand_extract_even): Update call accordingly.
29645 (rs6000_expand_interleave): Likewise.
29646 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
29647 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
29648 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
29649 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
29650 (rs6000_expand_vec_perm_const): Delete.
29651 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29652 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29653 (altivec_expand_vec_perm_const_le): Take each operand individually.
29654 Operate on constant selectors rather than rtxes.
29655 (altivec_expand_vec_perm_const): Likewise. Update call to
29656 altivec_expand_vec_perm_const_le.
29657 (rs6000_expand_vec_perm_const): Delete.
29658 (rs6000_vectorize_vec_perm_const_ok): Delete.
29659 (rs6000_vectorize_vec_perm_const): New function. Remove stray
29660 reference to the SPE evmerge intructions.
29661 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29662 an element count and rtx array.
29663 (rs6000_expand_extract_even): Update call accordingly.
29664 (rs6000_expand_interleave): Likewise.
29665 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
29666 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
29667 new function.
29668 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29669
29670 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29671
29672 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
29673 vector mode and that that mode matches the mode of the data
29674 being permuted.
29675 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
29676 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
29677 directly using expand_vec_perm_1 when forcing selectors into
29678 registers.
29679 (expand_vec_perm_var): New function, split out from expand_vec_perm.
29680
29681 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29682
29683 * optabs-query.h (can_vec_perm_p): Delete.
29684 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
29685 * optabs-query.c (can_vec_perm_p): Split into...
29686 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
29687 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
29688 particular selector is valid.
29689 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29690 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29691 (vect_grouped_load_supported): Likewise.
29692 (vect_shift_permute_load_chain): Likewise.
29693 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29694 (vect_transform_slp_perm_load): Likewise.
29695 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29696 (vectorizable_bswap): Likewise.
29697 (vect_gen_perm_mask_checked): Likewise.
29698 * fold-const.c (fold_ternary_loc): Likewise. Don't take
29699 implementations of variable permutation vectors into account
29700 when deciding which selector to use.
29701 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
29702 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
29703 with a false third argument.
29704 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
29705 to test whether the constant selector is valid and can_vec_perm_var_p
29706 to test whether a variable selector is valid.
29707
29708 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29709
29710 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
29711 * optabs-query.c (can_vec_perm_p): Likewise.
29712 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
29713 instead of vec_perm_indices.
29714 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
29715 (vect_gen_perm_mask_checked): Likewise,
29716 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
29717 (vect_gen_perm_mask_checked): Likewise,
29718
29719 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29720
29721 * optabs-query.h (qimode_for_vec_perm): Declare.
29722 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
29723 (qimode_for_vec_perm): ...this new function.
29724 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
29725
29726 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29727
29728 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
29729 does not have a conditional at the top.
29730
29731 2018-01-02 Richard Biener <rguenther@suse.de>
29732
29733 * ipa-inline.c (big_speedup_p): Fix expression.
29734
29735 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29736
29737 PR target/81616
29738 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
29739 for generic 4->6.
29740
29741 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29742
29743 PR target/81616
29744 Generic tuning.
29745 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
29746 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
29747 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
29748 cond_taken_branch_cost 3->4.
29749
29750 2018-01-01 Jakub Jelinek <jakub@redhat.com>
29751
29752 PR tree-optimization/83581
29753 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
29754 TODO_cleanup_cfg if any changes have been made.
29755
29756 PR middle-end/83608
29757 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
29758 convert_modes if target mode has the right side, but different mode
29759 class.
29760
29761 PR middle-end/83609
29762 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
29763 last argument when extracting from CONCAT. If either from_real or
29764 from_imag is NULL, use expansion through memory. If result is not
29765 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
29766 the parts directly to inner mode, if even that fails, use expansion
29767 through memory.
29768
29769 PR middle-end/83623
29770 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
29771 check for bswap in mode rather than HImode and use that in expand_unop
29772 too.
29773 \f
29774 Copyright (C) 2018 Free Software Foundation, Inc.
29775
29776 Copying and distribution of this file, with or without modification,
29777 are permitted in any medium without royalty provided the copyright
29778 notice and this notice are preserved.