1 2018-07-14 Jim Wilson <jimw@sifive.com>
3 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5 2018-07-14 Paul Koning <ni1d@arrl.net>
7 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
9 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
11 * lto-streamer-out.c (copy_function_or_variable): Dump info about
14 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
15 Steve Munroe <munroesj52@gmail.com>
17 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
18 (_mm_andnot_si128): Likewise.
19 (_mm_or_si128): Likewise.
20 (_mm_xor_si128): Likewise.
22 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
25 * builtins.c (expand_builtin_memcmp): Inline the calls first
26 when result_eq is false.
27 (expand_builtin_strcmp): Inline the calls first.
28 (expand_builtin_strncmp): Likewise.
29 (inline_string_cmp): New routine. Expand a string compare
30 call by using a sequence of char comparison.
31 (inline_expand_builtin_string_cmp): New routine. Inline expansion
32 a call to str(n)cmp/memcmp.
33 * doc/invoke.texi (--param builtin-string-cmp-inline-length): New option.
34 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
36 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
38 * config/arm/driver-arm.c: Include arm-native.h.
39 (host_detect_local_cpu): Use auto-generated data tables.
40 (vendors, arm_cpu_table): Delete. Move part information to ...
41 * config/arm/arm-cpus.in: ... here.
42 * config/arm/parsecpu.awk (gen_native): New function.
43 (vendor, part): New CPU fields.
44 (END): Add support for building the native CPU detection tables.
45 * config/arm/t-arm (arm-native.h): Add build rule.
46 (driver-arm.o): Add dependency on arm-native.h.
48 2018-07-13 Richard Biener <rguenther@suse.de>
51 * match.pd (addr1 - addr2): Allow either of the operand to
54 2018-07-13 Tom de Vries <tdevries@suse.de>
56 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
59 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
61 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
62 arrays instead of numbered variables.
64 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
66 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
67 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
69 2018-07-13 Richard Biener <rguenther@suse.de>
72 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
73 instead of get_context_die.
75 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
76 Richard Biener <rguenther@suse.de>
79 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
80 that the loop latch destination where phi is defined.
82 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
84 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
85 (riscv_expand_epilogue): Add assertion to check interrupt mode.
86 (riscv_set_current_function): Extract getting interrupt type to new
88 (riscv_get_interrupt_type): New function.
89 (riscv_merge_decl_attributes): New function, checking interrupt type is
91 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
93 2018-07-12 Paul Koning <ni1d@arrl.net>
95 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
98 2018-07-12 Paul Koning <ni1d@arrl.net>
100 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
101 zero reference, add doloop_end instead.
102 * doc/md.texi (decrement_and_branch_until_zero): Remove.
103 (Looping patterns): Remove decrement_and_branch_until_zero. Add
104 detail for doloop_end.
106 2018-07-12 Martin Sebor <msebor@redhat.com>
109 * attribs.c (decl_attributes): Reject conflicting attributes before
110 calling attribute handlers.
112 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
114 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
116 (gcc::dump_manager::get_dump_file_name): likewise.
117 (dump_begin): Likewise.
118 * dumpfile.h (dump_begin): Update prototype.
119 (gcc::dump_manager::get_dump_file_name,
120 gcc::dump_manager::get_dump_file_name): Update prototype.
122 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
124 * internal-fn.h (vectorizable_internal_fn_p): New function.
125 * tree-vect-slp.c (compatible_calls_p): Likewise.
126 (vect_build_slp_tree_1): Remove nops argument. Handle calls
127 to internal functions.
128 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
130 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
132 * fold-const.h (inverse_conditions_p): Declare.
133 * fold-const.c (inverse_conditions_p): New function.
134 * match.pd: Use inverse_conditions_p. Add folds of view_converts
135 that test the inverse condition of a conditional internal function.
136 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
137 * internal-fn.c (internal_fn_mask_index): Handle conditional
139 (vectorized_internal_fn_supported_p): New function.
140 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
141 (any_pred_load_store): Replace with...
142 (need_to_predicate): ...this new variable.
143 (redundant_ssa_names): New variable.
144 (ifcvt_can_use_mask_load_store): Move initial checks to...
145 (ifcvt_can_predicate): ...this new function. Handle tree codes
146 for which a conditional internal function exists.
147 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
148 instead of ifcvt_can_use_mask_load_store. Update after variable
150 (predicate_load_or_store): New function, split out from
151 predicate_mem_writes.
152 (check_redundant_cond_expr): New function.
153 (value_available_p): Likewise.
154 (predicate_rhs_code): Likewise.
155 (predicate_mem_writes): Rename to...
156 (predicate_statements): ...this. Use predicate_load_or_store
157 and predicate_rhs_code.
158 (combine_blocks, tree_if_conversion): Update after above name changes.
159 (ifcvt_local_dce): Handle redundant_ssa_names.
160 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
161 general conditional functions.
162 * tree-vect-stmts.c (vectorizable_call): Likewise.
164 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
165 Alan Hayward <alan.hayward@arm.com>
166 David Sherwood <david.sherwood@arm.com>
168 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
169 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
170 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
171 plus and minus and convert them into IFN_COND_FMA-based sequences.
172 (convert_mult_to_fma): Handle conditional plus and minus.
174 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
176 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
177 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
178 (cond_fnms_optab): New optabs.
179 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
181 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
182 * internal-fn.h (get_conditional_internal_fn): Declare.
183 (get_unconditional_internal_fn): Likewise.
184 * internal-fn.c (cond_ternary_direct): New macro.
185 (expand_cond_ternary_optab_fn): Likewise.
186 (direct_cond_ternary_optab_supported_p): Likewise.
187 (FOR_EACH_COND_FN_PAIR): Likewise.
188 (get_conditional_internal_fn): New function.
189 (get_unconditional_internal_fn): Likewise.
190 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
191 (gimple_match_op::gimple_match_op): Add a new overload for 5
193 (gimple_match_op::set_op): Likewise.
194 (gimple_resimplify5): Declare.
195 * genmatch.c (decision_tree::gen): Generate simplifications for
197 * gimple-match-head.c (gimple_simplify): Define an overload for
198 5 operands. Handle calls with 5 arguments in the top-level overload.
199 (convert_conditional_op): Handle conversions from unconditional
200 internal functions to conditional ones.
201 (gimple_resimplify5): New function.
202 (build_call_internal): Pass a fifth operand.
203 (maybe_push_res_to_seq): Likewise.
204 (try_conditional_simplification): Try converting conditional
205 internal functions to unconditional internal functions.
206 Handle 3-operand unconditional forms.
207 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
208 Define ternary equivalents of the current rules for binary conditional
210 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
212 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
213 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
214 (optab): Handle them.
215 (SVE_COND_FP_TERNARY): New int iterator.
216 (sve_fmla_op, sve_fmad_op): New int attributes.
217 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
218 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
219 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
221 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
223 * target.def (preferred_else_value): New target hook.
224 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
225 * doc/tm.texi: Regenerate.
226 * targhooks.h (default_preferred_else_value): Declare.
227 * targhooks.c (default_preferred_else_value): New function.
228 * internal-fn.h (conditional_internal_fn_code): Declare.
229 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
230 (get_conditional_internal_fn): Use it.
231 (conditional_internal_fn_code): New function.
232 * gimple-match.h (gimple_match_cond): New struct.
233 (gimple_match_op): Add a cond member function.
234 (gimple_match_op::gimple_match_op): Update all forms to take a
236 * genmatch.c (expr::gen_transform): Use the same condition as res_op
237 for the suboperation, but don't specify a particular else_value.
238 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
239 (visit_nary_op, visit_reference_op_load): Pass
240 gimple_match_cond::UNCOND to the gimple_match_op constructor.
241 * gimple-match-head.c: Include tree-eh.h
242 (convert_conditional_op): New function.
243 (maybe_resimplify_conditional_op): Likewise.
244 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
245 (gimple_resimplify2): Likewise.
246 (gimple_resimplify3): Likewise.
247 (gimple_resimplify4): Likewise.
248 (maybe_push_res_to_seq): Return null for conditional operations.
249 (try_conditional_simplification): New function.
250 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
252 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
254 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
256 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
258 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
260 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
262 (hash_tree): Do not hash DECL_FCONTEXT
263 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
264 Do not stream DECL_FCONTEXT.
265 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
266 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
268 2018-07-12 Richard Biener <rguenther@suse.de>
271 * dwarf2out.c (gen_block_die): Only output blocks when they have
272 at least one !DECL_IGNORED_P variable.
274 2018-07-12 Richard Biener <rguenther@suse.de>
277 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
278 Remove -mieee-fp handling.
280 2018-07-12 Richard Biener <rguenther@suse.de>
282 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
283 left-over from last patch.
285 2018-07-12 Jakub Jelinek <jakub@redhat.com>
287 PR tree-optimization/86492
288 * gimple-ssa-store-merging.c
289 (imm_store_chain_info::coalesce_immediate_stores): Call
290 check_no_overlap even for the merge_overlapping case. Formatting fix.
292 2018-07-12 Richard Biener <rguenther@suse.de>
295 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
296 move possibly trapping operations into the conditional.
298 2018-07-12 Richard Biener <rguenther@suse.de>
300 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
301 (vn_lookup_simplify_result): Remove recursion limit applied
303 (vn_nary_build_or_lookup_1): Adjust.
304 (try_to_simplify): Likewise.
305 * gimple-match-head.c (gimple_resimplify1): Instead apply one
307 (gimple_resimplify2): Likewise.
308 (gimple_resimplify3): Likewise.
309 (gimple_resimplify4): Likewise.
311 2018-07-11 Jakub Jelinek <jakub@redhat.com>
313 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
314 Use __mmask64 type instead of __mmask8 for __M argument.
315 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
316 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
318 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
319 __mmask16 for __M argument.
320 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
321 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
322 to __mmask16 instead of __mmask8.
323 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
324 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
325 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
326 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
327 instead of __mmask16 for __U argument.
328 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
329 __mmask16 instead of __mmask8 for __U argument.
330 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
332 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
334 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
336 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
338 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
340 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
342 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
344 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
346 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
348 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
350 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
351 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
352 return type as well as __M argument type and all casts from __mmask8
354 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
355 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
356 return type as well as __M argument type and all casts from __mmask8
358 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
359 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
360 return type as well as __M argument type and all casts from __mmask8
362 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
363 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
364 return type as well as __M argument type and all casts from __mmask8
366 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
367 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
370 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
372 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
373 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
376 2018-07-11 Paul Koning <ni1d@arrl.net>
378 * doc/md.texi (define_subst): Document how multiple occurrences of
379 the same argument in the replacement pattern are handled.
381 2018-07-11 Paul Koning <ni1d@arrl.net>
383 * doc/extend.texi (Common Variable Attributes): Move "mode" into
385 (Common Type Attributes): Add "mode" attribute.
387 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
389 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
390 stream DECL_ORIGINAL_TYPE.
391 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
392 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
393 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
394 Do not walk original type.
395 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
397 (write_ts_decl_non_common_tree_pointers): Do not stream
399 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
400 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
402 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
404 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
405 thread twice from the same starting edge.
407 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
409 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
410 * gimple.c (gimple_call_nonnull_result_p): ...here...
411 (gimple_call_nonnull_arg): ...and here.
412 * gimple.h (gimple_call_nonnull_result_p): New.
413 (gimple_call_nonnull_arg): New.
415 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
417 * config/arm/arm-cpus.in: Move information from fpu field of each
418 cpu definition to the isa field.
419 * config/arm/parsecpu.awk (fpu): Delete match rule.
420 (gen_comm_data): Don't add bits from the CPU's FPU entry.
422 2018-07-11 Richard Biener <rguenther@suse.de>
425 * dwarf2out.c (init_sections_and_labels): Use
426 output_asm_line_debug_info consistently.
427 (dwarf2out_early_finish): Likewise.
428 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
431 2018-07-11 Richard Biener <rguenther@suse.de>
433 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
434 Rework father_bb setting in a way to avoid propagating constants
435 multiple times on a loop body.
437 2018-07-10 Mark Wielaard <mark@klomp.org>
440 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
442 2018-07-10 Richard Biener <rguenther@suse.de>
444 * hash-map.h (hash_map::iterator::operator*): Return
445 references to key and value.
447 2018-07-10 Jakub Jelinek <jakub@redhat.com>
450 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
451 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
452 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
453 (gimplify_omp_for): For composite loops, move outer
454 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
455 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
456 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
457 TREE_LIST for both the original class iterator and the "last" helper
458 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
459 loop, remember has_decl_expr from outer composite loops for the
460 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
462 2018-07-09 Martin Sebor <msebor@redhat.com>
466 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
467 accessing implicitly initialized array elements.
468 * expr.c (string_constant): Handle string initializers of
469 character arrays within aggregates.
470 * gimple-fold.c (fold_array_ctor_reference): Add argument.
471 Store element offset. As a special case, handle zero size.
472 (fold_nonarray_ctor_reference): Same.
473 (fold_ctor_reference): Add argument. Store subobject offset.
474 * gimple-fold.h (fold_ctor_reference): Add argument.
476 2018-07-09 Paul Koning <ni1d@arrl.net>
478 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
479 (pdp11_insn_cost): New function.
480 (pdp11_md_asm_adjust): New function.
481 (TARGET_INVALID_WITHIN_DOLOOP): Define.
482 (pdp11_rtx_costs): Update to match machine better.
483 (output_addr_const_pdp11): Correct format mismatch warnings.
484 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
485 * config/pdp11/pdp11.md: General change to add base_cost and/or
486 length attributes for use by new pdp11_insn_cost function.
487 (MIN_BRANCH): Correct definition.
489 (doloop_end): Use standard pattern name for looping pattern.
490 (doloop_end_nocc): New.
491 (movsf): Add another constraint alternative.
492 (zero_extendqihi2): Add constraint alternatives for not in place
494 (zero_extendhisi2): Remove.
495 (shift patterns): Add CC handling variants.
499 (define_peephole2): New peephole to recognize mov that sets CC for
502 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
504 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
505 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
508 2018-07-09 Jakub Jelinek <jakub@redhat.com>
511 * real.c (real_nextafter): Return true if result is denormal.
513 2018-07-09 Martin Liska <mliska@suse.cz>
515 * common.opt: Add back wrongly removed attribute.
517 2018-07-09 Richard Biener <rguenther@suse.de>
520 * dwarf2out.c (gen_block_die): For an early generated DIE
521 always output high/low PC attributes.
523 2018-07-09 Tom de Vries <tdevries@suse.de>
525 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
526 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
527 onto VAR_DECL with abstract origin.
529 2018-07-07 Jim Wilson <jimw@sifive.com>
531 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
533 2018-07-07 Tom de Vries <tdevries@suse.de>
535 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
537 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
539 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
541 (combine_bound): Use wide-int overflow calculation instead of
543 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
545 * fold-const.c (int_const_binop_2): Same.
546 (extract_muldiv_1): Same.
547 (fold_div_compare): Same.
548 (fold_abs_const): Same.
550 * poly-int.h (add): Same.
554 * predict.c (predict_iv_comparison): Same.
555 * profile-count.c (slow_safe_scale_64bit): Same.
556 * simplify-rtx.c (simplify_const_binary_operation): Same.
557 * tree-chrec.c (tree_fold_binomial): Same.
558 * tree-data-ref.c (split_constant_offset_1): Same.
559 * tree-if-conv.c (idx_within_array_bound): Same.
560 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
561 * tree-ssa-phiopt.c (minmax_replacement): Same.
562 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
563 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
564 * vr-values.c (vr_values::adjust_range_with_scev): Same.
565 * wide-int.cc (wi::add_large): Same.
566 (wi::mul_internal): Same.
567 (wi::sub_large): Same.
568 (wi::divmod_internal): Same.
569 * wide-int.h: Change overflow type to overflow_type for neg, add,
570 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
571 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
572 mul_internal, divmod_internal.
573 (overflow_type): New enum.
574 (accumulate_overflow): New.
576 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
578 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
579 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
581 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
583 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
584 argument is checked for zero before entering loop, avoid checking again.
586 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
588 * gimplify.h (generic_expr_could_trap_p): Set as global function.
589 * gimplify.h (generic_expr_could_trap_p): Likwise.
590 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
592 2018-07-06 Jakub Jelinek <jakub@redhat.com>
594 PR tree-optimization/86401
595 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
596 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
597 (fold_bit_and_mask): ... here. New helper function for match.pd.
598 * fold-const.h (fold_bit_and_mask): Declare.
599 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
601 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
604 * target.def (translate_mode_attribute): New hook.
605 * targhooks.h (default_translate_mode_attribute): Declare.
606 * targhooks.c (default_translate_mode_attribute): New function.
607 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
608 * doc/tm.texi: Regenerate.
609 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
610 (rs6000_translate_mode_attribute): New function.
612 2018-07-06 Paul Koning <ni1d@arrl.net>
614 * doc/md.texi (define_split): Document DONE and FAIL.
615 (define_peephole2): Ditto.
617 2018-07-05 Jeff Law <law@redhat.com>
619 PR tree-optimization/86010
620 * tree-ssa-dse.c (compute_trims): More aggressively trim at
621 both the head and tail of mem* and str* calls.
623 2018-07-05 Jim Wilson <jimw@sifive.com>
625 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
627 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
629 * config/aarch64/aarch64-simd.md: correct flags text for
630 MIN_EXPR replacement.
632 2018-07-05 James Clarke <jrtc27@jrtc27.com>
634 * configure: Regenerated.
636 2018-07-05 Carl Love <cel@us.ibm.com>
638 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
639 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
640 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
641 VSX_BUILTIN_DOUBLEL_V4SF.
643 2018-07-05 Martin Sebor <msebor@redhat.com>
646 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
647 than its domain to compute its the upper bound of a char array.
649 2018-07-05 Nathan Sidwell <nathan@acm.org>
651 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
652 * doc/cpp.texi: Update comment.
653 * doc/tm.texi: Rebuilt.
654 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
655 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
656 * doc/extend.texi (Backwards Compatibility): Clarify it is system
657 headers affected by extern "C".
658 * system.h: Poison NO_IMPLICIT_EXTERN_C.
659 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
660 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
661 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
662 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
663 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
664 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
665 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
666 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
667 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
668 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
669 config/sparc/sp64-elf.h, config/spu/spu.h,
670 config/stormy16/stormy16.h, config/v850/v850.h,
671 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
672 define NO_IMPLICIT_EXTERN_C.
673 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
675 2018-07-05 Tamar Christina <tamar.christina@arm.com>
678 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
679 instead of GET_MODE_SIZE when comparing Units.
681 2018-07-05 Tamar Christina <tamar.christina@arm.com>
684 * rtlanal.c (set_noop_p): Constrain on mode change,
685 include hard-reg-set.h
687 2018-07-05 Tamar Christina <tamar.christina@arm.com>
689 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
691 2018-07-05 Jakub Jelinek <jakub@redhat.com>
694 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
697 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
699 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
701 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
704 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
706 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
708 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
711 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
713 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
715 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
718 2018-07-04 Martin Liska <mliska@suse.cz>
720 * tree-switch-conversion.c: Define
721 max_ratio_for_speed and max_ratio_for_size constants.
723 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
724 Martin Liska <mliska@suse.cz>
729 * common.opt: Rename align options with 'str_' prefix.
730 * common/config/i386/i386-common.c (set_malign_value): New
732 (ix86_handle_option): Use it to set -falign-* options/
733 * config/aarch64/aarch64-protos.h (struct tune_params): Change
734 type from int to string.
735 * config/aarch64/aarch64.c: Update default values from int
737 * config/alpha/alpha.c (alpha_override_options_after_change):
739 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
740 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
741 max skip conditionally.
742 * config/i386/freebsd.h (SUBALIGN_LOG): New.
743 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
744 max skip conditionally.
745 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
746 max skip conditionally.
747 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
748 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
749 max skip conditionally.
750 * config/i386/i386.c (struct ptt): Change type from int to
752 (ix86_default_align): Set default values.
753 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
754 max skip conditionally.
755 * config/i386/iamcu.h (SUBALIGN_LOG): New.
756 (ASM_OUTPUT_MAX_SKIP_ALIGN):
757 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
758 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
759 max skip conditionally.
760 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
761 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
762 * config/i386/x86-64.h (SUBALIGN_LOG): New.
763 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
764 max skip conditionally.
765 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
766 * config/ia64/ia64.c (ia64_option_override): Set default values
767 for alignment options.
768 * config/m68k/m68k.c: Handle new str_align_* options.
769 * config/mips/mips.c (mips_set_compression_mode): Change
771 (mips_option_override): Set default values for options.
772 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
774 * config/rs6000/rs6000.c (rs6000_option_override_internal):
776 * config/rx/rx.c (rx_option_override): Likewise.
777 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
778 (LABEL_ALIGN): Use align_labels_log.
779 (LOOP_ALIGN): Use align_loops_align.
780 * config/s390/s390.c (s390_asm_output_function_label): Use new
782 * config/sh/sh.c (sh_override_options_after_change):
783 Change type of constants.
784 * config/spu/spu.c (spu_sched_init): Likewise.
785 * config/sparc/sparc.c (sparc_option_override): Set default
787 * config/visium/visium.c (visium_option_override): Likewise.
788 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
789 emit p2align format with last argument if it's not needed.
790 * doc/invoke.texi: Document extended format of -falign-*.
791 * final.c: Use align_labels alignment.
792 * flags.h (struct target_flag_state): Change type to use
794 (struct align_flags_tuple): New.
795 (struct align_flags): Likewise.
796 (align_loops_log): Redefine macro to use new types.
797 (align_loops_max_skip): Redefine macro to use new types.
798 (align_jumps_log): Redefine macro to use new types.
799 (align_jumps_max_skip): Redefine macro to use new types.
800 (align_labels_log): Redefine macro to use new types.
801 (align_labels_max_skip): Redefine macro to use new types.
802 (align_functions_log): Redefine macro to use new types.
803 (align_loops): Redefine macro to use new types.
804 (align_jumps): Redefine macro to use new types.
805 (align_labels): Redefine macro to use new types.
806 (align_functions): Redefine macro to use new types.
807 (align_functions_max_skip): Redefine macro to use new types.
808 (align_loops_value): New macro.
809 (align_jumps_value): New macro.
810 (align_labels_value): New macro.
811 (align_functions_value): New macro.
812 * function.c (invoke_set_current_function_hook): Propagate
813 alignment values from flags to global variables default in
815 * ipa-icf.c (sem_function::equals_wpa): Use
816 cl_optimization_option_eq instead of memcmp.
817 * lto-streamer.h (cl_optimization_stream_out): Support streaming
819 (cl_optimization_stream_in): Likewise.
820 * optc-save-gen.awk: Support strings in cl_optimization.
821 * opth-gen.awk: Likewise.
822 * opts.c (finish_options): Remove error checking of invalid
824 (MAX_CODE_ALIGN): Remove.
825 (MAX_CODE_ALIGN_VALUE): Likewise.
826 (parse_and_check_align_values): New function.
827 (check_alignment_argument): Likewise.
828 (common_handle_option): Use check_alignment_argument.
829 * opts.h (parse_and_check_align_values): Declare.
830 * toplev.c (init_alignments): Remove.
831 (read_log_maxskip): New.
832 (parse_N_M): Likewise.
833 (parse_alignment_opts): Likewise.
834 (backend_init_target): Remove usage of init_alignments.
835 * toplev.h (parse_alignment_opts): Declare.
836 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
838 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
839 * tree.c (cl_option_hasher::equal): New.
840 * varasm.c: Use new global macros.
842 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
844 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
845 Use a simpler align directive also if MAXSKIP = ALIGN-1.
846 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
847 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
848 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
849 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
850 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
851 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
852 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
853 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
854 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
855 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
856 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
858 2018-07-04 Martin Liska <mliska@suse.cz>
859 Jonathan Wakely <jwakely@redhat.com>
861 * coverage.c: Use correct type.
862 * doc/invoke.texi: Language correction.
864 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
867 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
868 ENDBRANCH for non-tail call which may return via indirect branch.
869 * doc/extend.texi: Document indirect_return attribute.
871 2018-07-03 Martin Sebor <msebor@redhat.com>
873 PR tree-optimization/86274
874 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
876 (format_floating): Correct handling of infinities and NaNs.
878 2018-07-03 Martin Sebor <msebor@redhat.com>
880 * print-tree.c (print_real_cst): New function.
881 (print_node_brief): Call it.
884 2018-07-03 Jeff Law <law@redhat.com>
886 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
887 into a single pattern.
889 * config/h8300/h8300.md (ors code_iterator): New.
890 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
891 a single pattern and single splitter.
892 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
893 (iorqi3_1, xorqi3_1): Likewise.
894 (iorqi3, xorqi3 expanders): Similarly.
896 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
897 (movmd_internal) into a single pattern using the P mode iterator.
898 (movmd splitters): Similarly.
899 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
900 (movsd splitters): Similarly.
902 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
903 ADDB, ADDW and ADDL into a single ADD attribute which selects the
904 right table based on the size of the operand.
905 * config/h8300/h8300.md (length_table): Corresponding changes. All
906 references to "addb", "addw" and "addl" changed to "add".
907 (btst patterns): Merge two variants into a single pattern.
908 (tstqi, tsthi): Likewise.
909 (addhi3_incdec, addsi3_incdec): Likewise.
910 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
911 (mulhi3, mulsi3): Likewise.
912 (udivhi3, udivsi3): Likewise.
913 (divhi3, divsi3): Likewise.
914 (andorqi3, andorhi3, andorsi3): Likewise.
916 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
919 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
920 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
922 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
924 PR tree-optimization/85694
925 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
926 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
928 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
929 (<u>avg<mode>3_ceil): New patterns.
931 2018-07-03 David Malcolm <dmalcolm@redhat.com>
933 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
934 scan-tree-dump directive.
935 * gcc.dg/vect/slp-perm-2.c: Likewise.
936 * gcc.dg/vect/slp-perm-3.c: Likewise.
937 * gcc.dg/vect/slp-perm-5.c: Likewise.
938 * gcc.dg/vect/slp-perm-6.c: Likewise.
939 * gcc.dg/vect/slp-perm-7.c: Likewise.
940 * gcc.dg/vect/slp-perm-8.c: Likewise.
942 2018-07-03 Marek Polacek <polacek@redhat.com>
945 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
947 2018-07-03 Richard Biener <rguenther@suse.de>
950 * tree-ssa-structalias.c (find_func_clobbers): Properly
951 handle indirect calls.
953 2018-07-03 Jeff Law <law@redhat.com>
955 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
956 (shifts): New code iterator.
957 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
958 expander. Fix HImode handling on H8/SX.
959 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
960 (subqi3, subhi3, subsi3 expanders): Likewise.
961 (andqi3, andhi3, andsi3 expanders): Likewise.
962 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
963 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
964 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
965 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
966 (zero_extendqihi2, zero_extendqisi2): Likewise.
967 (extendqihi2, extendqisi2): Likewise.
968 (rotlqi3, rotlhi3, rotlsi3): Likewise.
969 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
970 (rotlqi3_1, rotlhi3_1): Likewise.
971 (logicalhi3_sn, logicalsi3_sn): Likewise.
972 (logicalhi3, logicalsi3): Likewise.
974 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
976 * tree-vect-patterns.c (vect_recog_rotate_pattern)
977 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
978 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
979 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
980 type to append_pattern_def_seq instead of creating a stmt_vec_info
982 (build_mask_conversion): Likewise. Remove vinfo argument.
983 (vect_add_conversion_to_patterm): Likewise, renaming to...
984 (vect_add_conversion_to_pattern): ...this.
985 (vect_recog_mask_conversion_pattern): Update call to
986 build_mask_conversion. Pass the vector type to
987 append_pattern_def_seq here too.
988 (vect_recog_gather_scatter_pattern): Update call to
989 vect_add_conversion_to_pattern.
991 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
993 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
994 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
995 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
996 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
997 STMT_VINFO_PATTERN_DEF_SEQ to null here.
998 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
999 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
1000 append_pattern_def_seq instead of new_pattern_def_seq.
1001 (vect_recog_divmod_pattern): Do both of the above.
1002 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
1005 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1007 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
1008 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
1009 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
1010 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
1011 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
1012 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1013 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
1014 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1015 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1016 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
1017 parameter with a single stmt_vec_info.
1018 (vect_recog_func_ptr): Likewise.
1019 (vect_recog_gather_scatter_pattern): Likewise, folding in...
1020 (vect_try_gather_scatter_pattern): ...this.
1021 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
1022 the stmt_vec_info of the statement to be matched. Don't clear
1023 STMT_VINFO_RELATED_STMT.
1024 (vect_pattern_recog): Update call accordingly.
1026 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1028 PR tree-optimization/85694
1029 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
1030 (uavgM3_ceil): Document new optabs.
1031 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
1032 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
1034 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
1035 (savg_ceil_optab): New optabs.
1036 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
1037 (vect_vect_recog_func_ptrs): Add it.
1038 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
1039 constant directly from the associated lhs.
1041 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1043 * tree-vect-patterns.c (vect_split_statement): New function.
1044 (vect_convert_input): Use it to try to split an existing cast.
1046 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1048 * poly-int.h (print_hex): New function.
1049 * dumpfile.h (dump_dec, dump_hex): Declare.
1050 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
1051 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
1052 min_input_precision, operation_precision and operation_sign.
1053 * tree-vect-patterns.c (vect_get_range_info): New function.
1054 (vect_same_loop_or_bb_p, vect_single_imm_use)
1055 (vect_operation_fits_smaller_type): Delete.
1056 (vect_look_through_possible_promotion): Add an optional
1057 single_use_p parameter.
1058 (vect_recog_over_widening_pattern): Rewrite to use new
1059 stmt_vec_info infomration. Handle one operation at a time.
1060 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
1061 (vect_truncatable_operation_p, vect_set_operation_type)
1062 (vect_set_min_input_precision): New functions.
1063 (vect_determine_min_output_precision_1): Likewise.
1064 (vect_determine_min_output_precision): Likewise.
1065 (vect_determine_precisions_from_range): Likewise.
1066 (vect_determine_precisions_from_users): Likewise.
1067 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
1068 (vect_vect_recog_func_ptrs): Put over_widening first.
1070 (vect_pattern_recog): Call vect_determine_precisions.
1072 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1074 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
1075 statements that have been replaced by further pattern statements.
1076 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
1078 2018-07-03 Richard Biener <rguenther@suse.de>
1080 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
1081 always set *dt. Dump vectype in vectype overload.
1082 * dumpfile.h (dump_gimple_expr): New function.
1083 (dump_gimple_expr_loc): Likewise.
1084 * dumpfile.c (dump_gimple_expr): New function.
1085 (dump_gimple_expr_loc): Likewise.
1087 2018-07-02 Jeff Law <law@redhat.com>
1089 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
1090 the H8/300, H8/300H and H8/S variants into a single pattern.
1091 (movhi_h8300, movqi_h8300hs): Similarly.
1092 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
1093 (QHI mode iterator): New.
1095 * config/h8300/h8300.md: Remove trailing whitespace.
1097 2018-07-02 Jim Wilson <jimw@sifive.com>
1099 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
1100 instead of emit_insn for interrupt returns.
1101 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
1102 (riscv_sret, riscv_uret): Likewise.
1104 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1106 * pretty-print.c (selftest::test_pp_format): Move save and restore
1107 of quotes to class auto_fix_quotes, and add an instance.
1108 * selftest.c: Include "intl.h".
1109 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
1110 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
1111 * selftest.h (selftest::auto_fix_quotes): New class.
1113 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
1115 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
1116 (aarch64_sve_prepare_conditional_op): Remove.
1117 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
1118 Allow aarch64_simd_reg_or_zero as select operand; remove
1119 the aarch64_sve_prepare_conditional_op call.
1120 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
1121 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1122 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
1123 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
1124 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
1125 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
1126 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
1127 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
1128 and a splitters to match all of the *_any patterns.
1129 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
1131 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
1132 (SVE_COND_FP_BINARY_REV): Remove.
1133 (sve_int_op_rev, sve_fp_op_rev): New.
1134 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
1135 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
1136 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
1137 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
1138 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
1139 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
1140 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
1141 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
1142 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
1144 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
1145 Remove match_dup 1 from the inner unspec.
1146 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1148 * config/aarch64/aarch64.md (movprfx): New attr.
1149 (length): Default movprfx to 8.
1150 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
1151 (*madd<SVE_I>, *msub<SVE_I): Likewise.
1152 (*<su>mul<SVE_I>3_highpart): Likewise.
1153 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
1154 (*v<ASHIFT><SVE_I>3): Likewise.
1155 (*<su><MAXMIN><SVE_I>3): Likewise.
1156 (*<su><MAXMIN><SVE_F>3): Likewise.
1157 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
1158 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
1159 (*div<SVE_F>4): Likewise.
1161 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
1163 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
1166 2018-07-02 Richard Biener <rguenther@suse.de>
1168 PR tree-optimization/86363
1169 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
1170 memset argument refers to a non-variable address.
1172 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
1174 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
1175 {PLUS,MINUS}_EXPR code to...
1176 (adjust_symbolic_bound): ...here,
1177 (combine_bound): ...here,
1178 (set_value_range_with_overflow): ...and here.
1180 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
1182 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
1184 (extract_range_from_abs_expr): ...here.
1186 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
1188 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
1189 -fno-omit-frame-pointer when not optimizing.
1191 2018-07-02 Martin Liska <mliska@suse.cz>
1194 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
1195 (propagate_nothrow): Likewise.
1197 2018-07-02 Martin Liska <mliska@suse.cz>
1200 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
1202 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1204 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
1205 function in r262149, changing "loc" param from source_location to
1206 const dump_location_t &.
1207 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
1208 declaration, as above.
1210 2018-07-01 Paul Koning <ni1d@arrl.net>
1212 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1213 -munit-asm, -mgnu-asm, -mdec-asm.
1214 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
1215 (pdp11_output_labelref): New.
1216 (pdp11_output_def): New.
1217 (pdp11_output_addr_vec_elt): New.
1218 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
1219 %# and %@ format codes.
1220 (pdp11_option_override): New.
1221 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
1222 (pdp11_output_ident): New.
1223 (pdp11_asm_named_section): New.
1224 (pdp11_asm_init_sections): New.
1225 (pdp11_file_start): New.
1226 (pdp11_file_end): New.
1227 (output_ascii): Use .ascii/.asciz for -mdec-asm.
1228 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
1229 %o, like %c but octal.
1230 (pdp11_option_override): New.
1231 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
1233 (DATA_SECTION_ASM_OP): Ditto.
1234 (READONLY_DATA_SECTION_ASM_OP): New.
1235 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
1236 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
1237 (ASM_OUTPUT_LABELREF): Ditto.
1238 (ASM_OUTPUT_DEF): Ditto.
1239 (ASM_OUTPUT_EXTERNAL): New.
1240 (ASM_OUTPUT_SOURCE_FILENAME): New.
1241 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
1242 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
1243 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
1244 %# and %@ format codes.
1245 * config/pdp11/pdp11.opt (mgnu-asm): New.
1246 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
1247 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
1248 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
1250 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
1252 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
1253 dereferencing path[] beyond its length.
1255 (debug_all_paths): New.
1256 (rewire_first_differing_edge): New.
1257 (adjust_paths_after_duplication): New.
1258 (duplicate_thread_path): Call adjust_paths_after_duplication.
1260 (thread_through_all_blocks): Add new argument to
1261 duplicate_thread_path.
1263 2018-06-30 Jim Wilson <jimw@sifive.com>
1265 * config/riscv/predicates.md (p2m1_shift_operand): New.
1266 (high_mask_shift_operand): New.
1267 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
1268 pattern using p2m1_shift_operand.
1269 (lshsi3_zero_extend_3+2): New combiner pattern using
1270 high_mask_shift_operand.
1272 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1274 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
1276 (vect_recog_rotate_pattern): ...here.
1277 (vect_convert_input): Try to insert casts of invariants in the
1279 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
1280 preheader to be empty.
1282 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1284 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
1285 vector type. If given, install it in the new statement's
1287 (vect_element_precision): New function.
1288 (vect_unpromoted_value): New struct.
1289 (vect_unpromoted_value::vect_unpromoted_value): New function.
1290 (vect_unpromoted_value::set_op): Likewise.
1291 (vect_look_through_possible_promotion): Likewise.
1292 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
1293 (vect_widened_op_tree, vect_convert_input): Likewise.
1294 (vect_convert_inputs, vect_convert_output): Likewise.
1295 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
1296 to handle the optional cast of the multiplication result and
1297 vect_widened_op_tree to detect the widened multiplication itself.
1298 Do not require the input and output of promotion casts to have
1299 the same sign, but base the signedness of the operation on the
1300 input rather than the result. If the pattern includes two
1301 promotions, check that those promotions have the same sign.
1302 Do not restrict the MULT_EXPR handling to a double-width result;
1303 handle quadruple-width results and wider. Use vect_convert_inputs
1304 to convert the inputs to the common type.
1305 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
1306 to handle the optional cast of the ABS result. Also allow a sign
1307 change or a sign extension between the ABS and MINUS.
1308 Use vect_widened_op_tree to detect the widened subtraction and use
1309 vect_convert_inputs to convert the inputs to the common type.
1310 (vect_handle_widen_op_by_const): Delete.
1311 (vect_recog_widen_op_pattern): New function.
1312 (vect_recog_widen_mult_pattern): Use it.
1313 (vect_recog_widen_shift_pattern): Likewise.
1314 (vect_recog_widen_sum_pattern): Use
1315 vect_look_through_possible_promotion to handle the promoted
1318 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1320 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
1321 the containing gimple_seq *.
1322 * gimple-iterator.h (gsi_for_stmt): Declare it.
1323 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
1324 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
1325 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1326 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1327 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
1329 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
1331 (vect_mark_pattern_stmts): ...here. Handle cases in which the
1332 statement being replaced is part of an existing pattern
1333 definition sequence, inserting the new pattern statements before
1335 (vect_pattern_recog_1): Don't return a bool. If the statement
1336 is already part of a pattern, instead apply pattern matching
1337 to the pattern definition statements. Don't clear the
1338 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
1339 (vect_pattern_recog): Don't break after the first match;
1340 continue processing the pattern definition statements instead.
1341 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
1343 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1345 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
1346 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1347 (vect_recog_widen_sum_pattern): Use it.
1349 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1351 * tree-vect-loop.c (vectorizable_reduction): Assert that the
1352 phi is not a pattern statement and has not been replaced by
1353 a pattern statement.
1354 * tree-vect-patterns.c (type_conversion_p): Don't check
1355 STMT_VINFO_IN_PATTERN_P.
1356 (vect_recog_vector_vector_shift_pattern): Likewise.
1357 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
1358 the pattern statement rather than the original statement; check
1359 directly for a WIDEN_MULT_EXPR here.
1360 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
1361 vect_is_simple_use to return the pattern statement rather
1362 than the original statement; use is_pattern_stmt_p to check
1363 for such a pattern statement.
1364 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
1365 to return the pattern statement rather than the original statement;
1366 don't do the same transformation here.
1367 (vect_is_simple_use): If the defining statement has been replaced
1368 by a pattern statement, return the pattern statement instead.
1369 Remove the corresponding (local) transformation from the vectype
1372 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1374 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
1375 end and default to null.
1376 * tree-vect-loop.c (vect_create_epilog_for_reduction)
1377 (vectorizable_reduction): Update calls accordingly, dropping the
1378 gimple ** argument if the passed-back statement isn't needed.
1379 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
1380 (vect_recog_rotate_pattern): Likewise.
1381 (vect_recog_mask_conversion_pattern): Likewise.
1382 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1383 (vect_mask_constant_operand_p): Likewise.
1384 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
1385 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
1386 (get_group_load_store_type, get_load_store_type): Likewise.
1387 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
1388 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
1389 (vectorizable_conversion, vectorizable_assignment): Likewise.
1390 (vectorizable_shift, vectorizable_operation): Likewise.
1391 (vectorizable_store, vect_is_simple_cond): Likewise.
1392 (vectorizable_condition, vectorizable_comparison): Likewise.
1393 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
1394 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
1395 and move it to the end. Cope with null def_stmt_outs.
1397 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
1399 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
1401 2018-06-29 Jeff Law <law@redhat.com>
1403 * config/v850/v850.c (v850_legitimate_address_p): Handle large
1404 displacements for TARGET_V850E2V3 and newer.
1405 (TARGET_LRA_P): Remove. Defaults to LRA now.
1406 * config/v850/v850.md (sign23byte_load): Remove.
1407 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
1408 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
1410 2018-06-29 Martin Liska <mliska@suse.cz>
1413 * coverage.c (coverage_init): Mangle full path name.
1414 * doc/invoke.texi: Document the change.
1415 * gcov-io.c (mangle_path): New.
1416 * gcov-io.h (mangle_path): Likewise.
1417 * gcov.c (mangle_name): Use mangle_path for path mangling.
1419 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1421 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
1422 if starting source register is not even.
1424 2018-06-29 Martin Liska <mliska@suse.cz>
1426 PR tree-optimization/86263
1427 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
1428 Make edge redirection.
1430 2018-06-29 David Malcolm <dmalcolm@redhat.com>
1432 * dumpfile.c (dump_loc): Add indentation based on scope depth.
1433 (dump_scope_depth): New variable.
1434 (get_dump_scope_depth): New function.
1435 (dump_begin_scope): New function.
1436 (dump_end_scope): New function.
1437 * dumpfile.h (get_dump_scope_depth): New declaration.
1438 (dump_begin_scope): New declaration.
1439 (dump_end_scope): New declaration.
1440 (class auto_dump_scope): New class.
1441 (AUTO_DUMP_SCOPE): New macro.
1442 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
1445 2018-06-29 Richard Biener <rguenther@suse.de>
1447 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
1448 compute_all_dependences succeeds.
1449 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
1450 exceed --param loop-max-datarefs-for-datadeps.
1452 2018-06-29 Jakub Jelinek <jakub@redhat.com>
1454 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
1456 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
1459 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
1460 alternative 0 in preferred_for_speed attribute.
1462 2018-06-28 Paul Koning <ni1d@arrl.net>
1464 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
1465 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
1466 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
1467 * config/pdp11/pdp11.md: Correct "length" attribute calculation
1468 for shift insn patterns.
1470 2018-06-28 David Malcolm <dmalcolm@redhat.com>
1472 * cgraph.c (cgraph_node::get_body): Replace assignments to
1473 "dump_file" with calls to set_dump_file.
1474 * dumpfile.c (alt_dump_file): Make static, and group with...
1475 (alt_flags): ...this definition.
1476 (dumps_are_enabled): New variable.
1477 (refresh_dumps_are_enabled): New function.
1478 (set_dump_file): New function.
1479 (set_alt_dump_file): New function.
1480 (gcc::dump_manager::dump_start): Replace assignments to
1481 "dump_file" and "alt_dump_file" with calls to set_dump_file and
1483 (gcc::dump_manager::dump_finish): Likewise.
1484 * dumpfile.h (alt_dump_file): Delete decl.
1485 (dumps_are_enabled): New variable decl.
1486 (set_dump_file): New function decl.
1487 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
1489 * tree-nested.c (lower_nested_functions): Replace assignments to
1490 "dump_file" with calls to set_dump_file.
1492 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
1494 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
1495 goto_locus of each outgoing edge of each basic block.
1497 2018-06-28 Richard Biener <rguenther@suse.de>
1499 * dwarf2out.c (decl_scope_table): Remove.
1500 (push_decl_scope): Likewise.
1501 (pop_decl_scope): Likewise.
1502 (gen_type_die_for_member): Do not call push/pop_decl_scope.
1503 (gen_struct_or_union_type_die): Likewise.
1504 (gen_tagged_type_die): Likewise.
1505 (dwarf2out_init): Do not initialize decl_scope_table.
1506 (dwarf2out_c_finalize): Do not free it.
1508 2018-06-28 Richard Biener <rguenther@suse.de>
1510 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
1511 deciding whether to not re-use a DIE.
1513 2018-06-28 Richard Biener <rguenther@suse.de>
1515 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
1516 DW_AT_abstract_origin attribute.
1518 2018-06-28 Martin Liska <mliska@suse.cz>
1520 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1521 Use newly introduced constants.
1522 * tree-switch-conversion.h (struct jump_table_cluster):
1523 Define max_ratio_for_size and max_ratio_for_speed.
1525 2018-06-28 Martin Liska <mliska@suse.cz>
1527 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1528 Add new checking assert to catch invalid state.
1529 (jump_table_cluster::can_be_handled): Handle single case
1531 (jump_table_cluster::is_beneficial): Bail out for such case.
1532 (bit_test_cluster::find_bit_tests):
1533 Add new checking assert to catch invalid state.
1534 (bit_test_cluster::can_be_handled): Handle single case
1536 (bit_test_cluster::is_beneficial): Bail out for such case.
1537 (switch_decision_tree::analyze_switch_statement):
1540 2018-06-28 Martin Liska <mliska@suse.cz>
1542 * common.opt: Introduce -completion option.
1543 * gcc.c (driver_handle_option): Handle it.
1544 (driver::main): Print completions if completion
1546 * opt-suggestions.c (option_proposer::get_completions):
1548 (option_proposer::suggest_completion): Likewise.
1549 (option_proposer::find_param_completions): Likewise.
1550 (verify_autocompletions): Likewise.
1551 (test_completion_valid_options): Likewise.
1552 (test_completion_valid_params): Likewise.
1553 (in_completion_p): Likewise.
1554 (empty_completion_p): Likewise.
1555 (test_completion_partial_match): Likewise.
1556 (test_completion_garbage): Likewise.
1557 (opt_proposer_c_tests): Likewise.
1558 * opt-suggestions.h: Declare new functions.
1559 * opts.c (common_handle_option): Handle OPT__completion_.
1560 * selftest-run-tests.c (selftest::run_tests): Add
1561 opt_proposer_c_tests.
1562 * selftest.c (assert_str_startswith): New.
1563 * selftest.h (assert_str_startswith): Likewise.
1564 (opt_proposer_c_tests): New.
1565 (ASSERT_STR_STARTSWITH): Likewise.
1567 2018-06-28 Martin Liska <mliska@suse.cz>
1569 * Makefile.in: Add opt-suggestions.o.
1570 * gcc-main.c: Include opt-suggestions.h.
1571 * gcc.c (driver::driver): Likewise.
1572 (driver::~driver): Remove m_option_suggestions.
1573 (driver::build_option_suggestions): Moved to option_proposer.
1574 (driver::suggest_option): Likewise.
1575 (driver::handle_unrecognized_options): Use option_proposer.
1576 * gcc.h (class driver): Add new memver m_option_proposer.
1577 * opt-suggestions.c: New file.
1578 * opt-suggestions.h: New file.
1580 2018-06-28 Martin Liska <mliska@suse.cz>
1582 * vec.h (class auto_string_vec): New (moved from auto_argvec).
1583 (auto_string_vec::~auto_string_vec): Likewise.
1585 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
1587 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
1588 prevent_decl_creation_for_types fields up and add reset_location field.
1589 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
1590 statement if id->reset_location is true.
1591 (copy_edges_for_bb): Do not set goto_locus on the new edges if
1592 id->reset_location is true.
1593 (copy_phis_for_bb): Force input_location on the arguments if
1594 id->reset_location is true.
1595 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
1596 is set on the function to be inlined.
1598 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
1600 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
1602 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
1604 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
1605 registers for Pmode.
1606 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
1607 hard registers for the clobbered pseudo.
1609 2018-06-27 Paul Koning <ni1d@arrl.net>
1611 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1612 mutually exclusive options.
1613 * config/pdp11/constraints.md (h): New constraint.
1614 (O): Update definition to match shift code generation.
1615 (D): New constraint.
1616 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
1618 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
1620 (output_jump): Change arguments.
1621 (pdp11_fixed_cc_regs): New function.
1622 (pdp11_cc_mode): Ditto.
1623 (pdp11_expand_shift): Ditto.
1624 (pdp11_assemble_shift): Ditto.
1625 (pdp11_small_shift): Ditto.
1626 (pdp11_branch_cost): Remove.
1627 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
1629 (pdp11_register_move_cost): Update for CC registers.
1630 (pdp11_rtx_costs): Add case for LSHIFTRT.
1631 (pdp11_output_jump): Add CCNZ mode conditional branches.
1632 (notice_update_cc_on_set): Remove.
1633 (pdp11_cc_mode): New function.
1634 (simple_memory_operand): Correct pre/post decrement case.
1635 (no_side_effect_operand): New function.
1636 (pdp11_regno_reg_class): Add CC_REGS class.
1637 (pdp11_fixed_cc_regs): New function.
1638 (pdp11_small_shift): New function.
1639 (pdp11_expand_shift): New function to expand shift insns.
1640 (pdp11_assemble_shift): New function to output shifts.
1641 (pdp11_branch_cost): Remove.
1642 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
1643 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
1644 (WCHAR_TYPE): Ditto.
1645 (PTRDIFF_TYPE): Ditto.
1646 (ADJUST_INSN_LENGTH): New macro.
1647 (FIXED_REGISTERS): Add CC registers.
1648 (CALL_USED_REGISTERS): Ditto.
1650 (REG_CLASS_NAMES): Ditto.
1651 (REG_CLASS_CONTENTS): Ditto.
1652 (SELECT_CC_MODE): Use new function.
1653 (TARGET_FLAGS_REGNUM): New macro.
1654 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
1655 (cc0_reg_rtx): Remove.
1656 (CC_STATUS_MDEP): Remove.
1657 (CC_STATUS_MDEFP_INIT): Remove.
1658 (CC_IN_FPU): Remove.
1659 (NOTICE_UPDATE_CC): Remove.
1660 (REGISTER_NAMES): Add CC registers.
1661 (BRANCH_COST): Change to constant 1.
1662 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
1664 * config/pdp11/pdp11.opt (mbcopy): Remove.
1665 (mbcopy-builtin): Remove.
1666 (mbranch-cheap): Remove.
1667 (mbranch-expensive): Remove.
1668 * config/pdp11/predicates.md (expand_shift_operand): Update to
1669 match shift code generation.
1670 (ccnz_operator): New predicate.
1671 * doc/invoke.texi (PDP-11 Options): Remove deleted options
1672 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
1673 Remove non-existent option -mabshi, -mno-abshi. Document mutually
1675 * doc/md.texi (PDP-11): Document new D and h constraints. Update
1676 description of O constraint.
1678 2018-06-27 Jeff Law <law@redhat.com>
1679 Austin Law <austinklaw@gmail.com>
1681 * config/v850/v850.md (addsi3_set_flags): New pattern.
1682 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
1683 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
1684 (zero_extendhisi2_v850_set_flags): Likewise.
1685 (zero_extendqisi2_v850_set_flags): Likewise.
1686 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
1687 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
1688 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
1690 * config/v850/v850-protos.h (notice_update_cc): Remove.
1691 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
1692 (v850_print_operand): Handle 'D' and "d".
1693 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
1694 Add handling of arithmetic/logical operations compared against zero.
1695 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
1696 Do not look at v850_compare_op, instead get mode from last argument.
1697 (v850_gen_compare): Remove
1698 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
1699 after reload for prologue insns.
1700 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
1702 (construct_save_jarl): Likewise.
1703 (TARGET_FLAGS_REGNUM): Define.
1704 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
1705 (NOTICE_UPDATE_CC): Remove.
1706 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
1707 than cc0. Conditionalize on reload_completed.
1708 (cmpsi_insn, setfcc_insn): Likewise.
1709 (tst1 splitter): Turn into define_and_split which sets the flags
1711 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
1712 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
1713 (cstoresf4, cstoredf4): Clobber the flags.
1714 (cmpsi, cmpsf, cmpdf): Remove expanders.
1715 (setf_insn): Remove pattern.
1716 (addsi3): Turn into define_and_split which clobbers the flags after
1717 reload and a suitable pattern (addsi3_clobber_flags) for use after
1719 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
1720 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
1721 (ashrsi3, ashrsi3_v850e2): Likewise.
1722 (bins): Clobber the flags.
1723 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
1724 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
1725 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
1726 (call_value_internal_short, call_value_internal_long): Likewise.
1727 (callt_save_interrupt, callt_return_interrupt): Likewise.
1728 (save_interrupt, return_interrupt): Likewise.
1729 (callt_save_all_interrupt, save_all_interrupt): Likewise.
1730 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
1731 (restore_all_interrupt, _restore_all_interrupt): Likewise.
1732 (All FP comparisons): Only allow after reload has completed.
1734 (divh, divhu): Tweak output template.
1735 (branch_z_normal, branch_z_invert): Remove
1736 (branch_nz_normal, branch_nz_invert): Likewise.
1737 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
1739 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
1740 * config/v850/v850.c (notice_update_cc): Remove.
1741 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
1742 (CC_NO_CARRY): Likewise.
1743 (NOTICE_UPDATE_CC): Define to nothing.
1744 * config/v850/v850.md: Remove block comment on cc0 handling
1745 Remove "cc" attribute from all patterns. Remove cc_status handling
1746 from all patterns. Minor formatting fixes.
1748 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1750 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
1751 (cortex-a76.cortex-a55): Likewise.
1752 * config/aarch64/aarch64-tune.md: Regenerate.
1753 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
1754 cortex-a76.cortex-a55.
1756 2018-06-27 Jeff Law <law@redhat.com>
1758 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
1759 (MULTILIB_DIRNAMES): Similarly.
1761 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
1763 * gimple.h (gimple_return_retbnd): Delete.
1764 (gimple_return_set_retbnd): Likewise.
1765 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
1766 gimple_return_set_retbnd.
1767 * gimple-pretty-print.c (dump_gimple_return): Remove call to
1768 gimple_return_retbnd and adjust.
1769 * tree-inline.h (struct copy_body_data): Remove retbnd field.
1770 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
1771 Explicitly return NULL in a couple more cases. Move assertion
1772 on debug statements and remove unreachable code.
1773 (reset_debug_binding): Do not test id->retbnd.
1774 (expand_call_inline): Do not set it.
1776 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1778 * configure.ac: Add --disable-gcov option.
1779 * configure: Regenerate.
1780 * Makefile.in: Honour @enable_gcov@.
1781 * doc/install.texi: Document --disable-gcov.
1783 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1785 * config/arm/arm-cpus.in (cortex-a76): New entry.
1786 (cortex-a76.cortex-a55): Likewise.
1787 * config/arm/arm-tables.opt: Regenerate.
1788 * config/arm/arm-tune.md: Likewise.
1789 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
1790 * doc/invoke.texi (ARM Options): Document cortex-a76 and
1791 cortex-a76.cortex-a55.
1793 2018-06-27 Tamar Christina <tamar.christina@arm.com>
1796 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
1798 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
1800 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
1802 (EPILOGUE_USES): Likewise.
1804 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
1806 * tree-inline.c (remap_location): New function extracted from...
1807 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
1808 (copy_phis_for_bb): ...here. Call remap_location.
1809 (copy_cfg_body): Adjust call to copy_edges_for_bb.
1811 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
1813 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
1814 unaligned vsx for 16B memset.
1816 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
1819 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
1820 ieee128_float_type_node to long_double_type_node unless
1821 TARGET_LONG_DOUBLE_128 is set.
1823 2018-06-26 David Malcolm <dmalcolm@redhat.com>
1825 * cfgloop.c (get_loop_location): Convert return type from
1826 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
1827 by implicit construction from rtx_insn *, and using
1828 dump_user_location_t::from_function_decl for the fallback case.
1829 * cfgloop.h (get_loop_location): Convert return type from
1830 location_t to dump_user_location_t.
1831 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
1832 dump_printf_loc to pass in a dump_location_t rather than a
1833 location_t, via the gimple stmt.
1834 * coverage.c (get_coverage_counts): Update calls to
1835 dump_printf_loc to pass in dump_location_t rather than a
1837 * doc/optinfo.texi (Dump types): Convert example of
1838 dump_printf_loc from taking "locus" to taking "insn". Update
1839 description of the "_loc" calls to cover dump_location_t.
1840 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
1842 (dump_user_location_t::dump_user_location_t): New constructors,
1843 from gimple *stmt and rtx_insn *.
1844 (dump_user_location_t::from_function_decl): New function.
1845 (dump_loc): Make static.
1846 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
1847 const dump_location_t &.
1848 (dump_generic_expr_loc): Delete.
1849 (dump_printf_loc): Convert param "loc" from location_t to
1850 const dump_location_t &.
1851 (selftest::test_impl_location): New function.
1852 (selftest::dumpfile_c_tests): New function.
1853 * dumpfile.h: Include "profile-count.h".
1854 (class dump_user_location_t): New class.
1855 (struct dump_impl_location_t): New struct.
1856 (class dump_location_t): New class.
1857 (dump_printf_loc): Convert 2nd param from source_location to
1858 const dump_location_t &.
1859 (dump_generic_expr_loc): Delete.
1860 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
1861 const dump_location_t &.
1862 * gimple-fold.c (fold_gimple_assign): Update call to
1863 dump_printf_loc to pass in a dump_location_t rather than a
1864 location_t, via the gimple stmt.
1865 (gimple_fold_call): Likewise.
1866 * gimple-loop-interchange.cc
1867 (loop_cand::analyze_iloop_reduction_var): Update for change to
1868 check_reduction_path.
1869 (tree_loop_interchange::interchange): Update for change to
1871 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
1872 change in return-type of find_loop_location.
1873 (graphite_regenerate_ast_isl): Likewise.
1874 * graphite-optimize-isl.c (optimize_isl): Likewise.
1875 * graphite.c (graphite_transform_loops): Likewise.
1876 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
1877 pass in a dump_location_t rather than a location_t, via the
1879 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1880 * ipa.c (walk_polymorphic_call_targets): Likewise.
1881 * loop-unroll.c (report_unroll): Convert "locus" param from
1882 location_t to dump_location_t.
1883 (decide_unrolling): Update for change to get_loop_location's
1885 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
1886 location_t to dump_user_location_t.
1887 (grid_find_single_omp_among_assignments_1): Updates calls to
1888 dump_printf_loc to pass in a dump_location_t rather than a
1889 location_t, via the gimple stmt.
1890 (grid_parallel_clauses_gridifiable): Convert "tloc" from
1891 location_t to dump_location_t. Updates calls to dump_printf_loc
1892 to pass in a dump_location_t rather than a location_t, via the
1894 (grid_inner_loop_gridifiable_p): Likewise.
1895 (grid_dist_follows_simple_pattern): Likewise.
1896 (grid_gfor_follows_tiling_pattern): Likewise.
1897 (grid_target_follows_gridifiable_pattern): Likewise.
1898 (grid_attempt_target_gridification): Convert initialization
1899 of local "grid" from memset to zero-initialization; FIXME: does
1900 this require C++11? Update call to dump_printf_loc to pass in a
1901 optinfo_location rather than a location_t, via the gimple stmt.
1902 * profile.c (read_profile_edge_counts): Updates call to
1903 dump_printf_loc to pass in a dump_location_t rather than a
1905 (compute_branch_probabilities): Likewise.
1906 * selftest-run-tests.c (selftest::run_tests): Call
1908 * selftest.h (dumpfile_c_tests): New decl.
1909 * tree-loop-distribution.c (pass_loop_distribution::execute):
1910 Update for change in return type of find_loop_location.
1911 * tree-parloops.c (parallelize_loops): Likewise.
1912 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
1913 "locus" from location_t to dump_user_location_t.
1914 (canonicalize_loop_induction_variables): Likewise.
1915 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
1916 for change in return type of find_loop_location.
1917 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
1918 to dump_printf_loc to pass in a dump_location_t rather than a
1919 location_t, via the stmt.
1920 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
1922 * tree-vect-loop-manip.c (find_loop_location): Convert return
1923 type from source_location to dump_user_location_t.
1924 (vect_do_peeling): Update for above change.
1925 (vect_loop_versioning): Update for change in type of
1927 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
1928 from location_t to dump_user_location_t.
1929 (vect_estimate_min_profitable_iters): Update for change in type
1931 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
1932 location_t to dump_location_t.
1933 (vect_slp_bb): Update for change in type of vect_location.
1934 * tree-vectorizer.c (vect_location): Convert from source_location
1935 to dump_user_location_t.
1936 (try_vectorize_loop_1): Update for change in vect_location's type.
1937 (vectorize_loops): Likewise.
1938 (increase_alignment): Likewise.
1939 * tree-vectorizer.h (vect_location): Convert from source_location
1940 to dump_user_location_t.
1941 (find_loop_location): Convert return type from source_location to
1942 dump_user_location_t.
1943 (check_reduction_path): Convert 1st param from location_t to
1944 dump_user_location_t.
1945 * value-prof.c (check_counter): Update call to dump_printf_loc to
1946 pass in a dump_user_location_t rather than a location_t; update
1947 call to error_at for change in type of "locus".
1948 (check_ic_target): Update call to dump_printf_loc to
1949 pass in a dump_user_location_t rather than a location_t, via the
1952 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
1954 * config/s390/s390.h (enum processor_flags): Do not use
1955 default tune parameter when -march was specified.
1957 2018-06-26 Jakub Jelinek <jakub@redhat.com>
1960 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
1961 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
1964 2018-06-26 Richard Biener <rguenther@suse.de>
1966 PR tree-optimization/86287
1968 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
1969 (vect_analyze_loop): Initialize n_stmts.
1971 2018-06-26 Richard Biener <rguenther@suse.de>
1974 * fold-const.c (fold_convertible_p): Pointer extension
1977 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
1980 * dwarf2out.c (loc_list_has_views): Adjust comments.
1981 (dw_loc_list): Split single cross-partition range with
1984 2018-06-25 Jeff Law <law@redhat.com>
1986 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
1987 on -mbig-switch by default.
1989 * config/v850/predicates.md (const_float_1_operand): Fix match_code
1991 (const_float_0_operand): Remove unused predicate.
1992 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
1993 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
1994 (recipsf2): New expander. Original pattern now called
1996 (recipdf2, recipdf2_insn): Similarly.
1997 (rsqrtsf2, rsqrtsf2_insn): Similarly
1998 (rsqrtdf2, rsqrtdf2_insn): Similarly
2000 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
2002 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
2003 Simplify logic for FreeBSD (twice).
2005 2018-06-25 Martin Sebor <msebor@redhat.com>
2007 PR tree-optimization/86204
2008 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
2009 a strnlen result if it's less than the length of the string.
2011 2018-06-25 Martin Sebor <msebor@redhat.com>
2013 PR tree-optimization/85700
2014 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
2015 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
2016 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
2018 2018-06-25 Martin Sebor <msebor@redhat.com>
2020 * doc/extend.texi (Zero-length arrays): Update and clarify.
2022 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
2024 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
2025 added IEEE/IBM long double multilib support on PowerPC little
2026 endian Linux systems.
2027 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
2028 (MULTILIB_DEFAULTS): Likewise.
2029 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2031 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
2032 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
2033 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
2035 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
2038 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
2039 (REORDER_45): Likewise.
2041 2018-06-25 Jeff Law <law@redhat.com>
2043 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
2044 dividend to 32 bits. Adjust length.
2045 (udivmodhi4): Cleanup output template. Fix length.
2047 2018-06-25 Carl Love <cel@us.ibm.com>
2049 * config/rs6000/vsx.md: Change word selector to prefered location.
2051 2018-06-25 Richard Biener <rguenther@suse.de>
2053 PR tree-optimization/86304
2054 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
2055 epilogue-if-converted loops as well.
2057 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
2059 * lto-section-out.c (lto_begin_section): Do not print section
2060 name for noaddr and unnumbered dumps.
2062 2018-06-25 Richard Biener <rguenther@suse.de>
2064 * tree-vectorizer.h (struct vec_info_shared): New structure
2065 with parts split out from struct vec_info and loop_nest from
2066 struct _loop_vec_info.
2067 (struct vec_info): Adjust accordingly.
2068 (struct _loop_vec_info): Likewise.
2069 (LOOP_VINFO_LOOP_NEST): Adjust.
2070 (LOOP_VINFO_DATAREFS): Likewise.
2071 (LOOP_VINFO_DDRS): Likewise.
2072 (struct _bb_vec_info): Likewise.
2073 (BB_VINFO_DATAREFS): Likewise.
2074 (BB_VINFO_DDRS): Likewise.
2075 (struct _stmt_vec_info): Add dr_aux member.
2076 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
2077 (DR_MISALIGNMENT_UNINITIALIZED): New.
2078 (set_dr_misalignment): Adjust.
2079 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
2080 (vect_analyze_loop): Adjust prototype.
2081 (vect_analyze_loop_form): Likewise.
2082 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2083 Compute dependences lazily.
2084 (vect_record_base_alignments): Use shared datarefs/ddrs.
2085 (vect_verify_datarefs_alignment): Likewise.
2086 (vect_analyze_data_refs_alignment): Likewise.
2087 (vect_analyze_data_ref_accesses): Likewise.
2088 (vect_analyze_data_refs): Likewise.
2089 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
2090 constructor parameter for shared part.
2091 (vect_analyze_loop_form): Pass in shared part and adjust.
2092 (vect_analyze_loop_2): Pass in storage for the number of
2093 stmts. Move loop nest finding to the caller. Compute
2095 (vect_analyze_loop): Pass in shared part.
2096 (vect_transform_loop): Verify shared datarefs are unchanged.
2097 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
2098 constructor parameter for shared part.
2099 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
2100 (vect_slp_bb): Verify shared datarefs are unchanged before
2102 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
2104 (new_stmt_vec_info): Initialize DR_AUX misalignment to
2105 DR_MISALIGNMENT_UNINITIALIZED.
2106 * tree-vectorizer.c (vec_info::vec_info): Add constructor
2107 parameter for shared part.
2108 (vec_info::~vec_info): Adjust.
2109 (vec_info_shared::vec_info_shared): New.
2110 (vec_info_shared::~vec_info_shared): Likewise.
2111 (vec_info_shared::save_datarefs): Likewise.
2112 (vec_info_shared::check_datarefs): Likewise.
2113 (try_vectorize_loop_1): Construct shared part live for analyses
2114 of a single loop for multiple vector sizes.
2115 * tree-parloops.c (gather_scalar_reductions): Adjust.
2117 2018-06-25 Richard Biener <rguenther@suse.de>
2119 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
2120 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
2121 (vect_analyze_data_refs): Remove similar code from here and
2122 simplify accordingly.
2124 2018-06-25 Richard Biener <rguenther@suse.de>
2126 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
2127 for reverse storage order accesses rather than asserting
2128 they cannot happen here.
2130 2018-06-25 Tom de Vries <tdevries@suse.de>
2133 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
2134 Use data16 instead of .byte for insn prefix.
2136 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
2139 * parser.c (make_char_string_pack): Pass this literal chars
2140 through cpp_interpret_string.
2141 (cp_parser_userdef_numeric_literal): Check the result of
2142 make_char_string_pack.
2144 2018-06-24 Maya Rashish <coypu@sdf.org>
2146 * ginclude/stddef.h: Simplify conditions around avoiding
2147 re-definition of __size_t.
2149 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2151 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
2152 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
2154 2018-06-22 Maya Rashish <coypu@sdf.org>
2156 * doc/invoke.texi (mno-fancy-math-387): Update for changes
2157 made to OpenBSD and NetBSD through the years.
2159 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
2161 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2162 behavior of vec_pack (vector double, vector double) to match
2163 behavior of vec_float2 (vector double, vector double).
2165 2018-06-22 Olivier Hainque <hainque@adacore.com>
2167 * gimplify.c (gimplify_function_tree): Prevent creation
2168 of a trampoline for the address of the current function
2169 passed to entry/exit instrumentation hooks.
2171 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
2174 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
2177 2018-06-22 Martin Liska <mliska@suse.cz>
2179 PR tree-optimization/86263
2180 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2181 Bail out if is_enabled is false.
2182 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
2184 (jump_table_cluster::is_enabled): New function.
2186 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2188 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2189 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
2190 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
2191 (lto_input_ts_binfo_tree_pointers): Likewise.
2192 * tree-streamer-out.c (streamer_write_tree_bitfields,
2193 write_ts_binfo_tree_pointers): Likewise.
2194 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
2196 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2198 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
2200 2018-06-22 Martin Liska <mliska@suse.cz>
2202 * symbol-summary.h (get): Make it pure and inline move
2203 functionality from ::get function.
2204 (get): Remove and inline into ::get and ::get_create.
2205 (get_create): Move code from ::get function.
2207 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2210 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
2211 -x assembler-with-cpp.
2213 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2215 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
2216 _FILE_OFFSET_BITS=64 for C++.
2218 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
2220 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
2221 conversion insn that shows up when pr85657-3.c is compiled using
2222 IEEE 128-bit long double.
2223 (neg<mode>2_internal): Use the correct mode to check whether the
2224 mode is IBM extended.
2225 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
2226 multiply and divide external functions from being created more
2229 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2231 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
2233 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
2234 the edge can be forwarded.
2235 (cfg_layout_merge_blocks): Likewise.
2237 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2239 * except.c (finish_eh_generation): Commit edge insertions only after
2240 the EH edges have been redirected from post-landing to landing pads.
2242 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2244 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
2245 create_tmp_var_for to create the FRAME decl.
2246 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
2248 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2250 * tree-inline.c (copy_edges_for_bb): Minor tweak.
2251 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
2252 debug statement when resetting its value.
2253 (expand_call_inline): Copy the locus of the call onto the assignment
2254 of the return value, if any. Use local variable in more cases.
2256 2018-06-21 Martin Liska <mliska@suse.cz>
2258 * ipa-pure-const.c (propagate_nothrow): Use
2259 funct_state_summaries->get.
2260 (dump_malloc_lattice): Likewise.
2261 (propagate_malloc): Likewise.
2263 2018-06-21 Richard Biener <rguenther@suse.de>
2265 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
2266 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
2267 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
2269 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
2270 BLOCK_ABSTRACT_ORIGIN unconditionally.
2272 2018-06-21 David Malcolm <dmalcolm@redhat.com>
2274 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
2276 * ipa-reference.c (ipa_reference_c_finalize): Delete
2277 ipa_ref_opt_sum_summaries and set it to NULL.
2279 2018-06-21 Tom de Vries <tdevries@suse.de>
2281 PR tree-optimization/85859
2282 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
2283 test with comment from bb_no_side_effects_p.
2285 2018-06-21 Richard Biener <rguenther@suse.de>
2287 PR tree-optimization/86232
2288 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
2289 max for constant niter.
2291 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
2293 * config/aarch64/aarch64-simd.md
2294 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
2296 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
2298 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
2299 Make opernads of the unspec commutative.
2301 2018-06-21 Richard Biener <rguenther@suse.de>
2303 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
2304 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
2305 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
2306 (vect_analyze_data_ref_dependence): Re-order checks to deal with
2308 (vect_record_base_alignments): Do not record base alignment
2309 for gathers or scatters.
2310 (vect_compute_data_ref_alignment): Drop return value that is always
2311 true. Bail out early for gathers or scatters.
2312 (vect_enhance_data_refs_alignment): Bail out early for gathers
2314 (vect_find_same_alignment_drs): Likewise.
2315 (vect_analyze_data_refs_alignment): Remove dead code.
2316 (vect_slp_analyze_and_verify_node_alignment): Likewise.
2317 (vect_analyze_data_refs): For possible gathers or scatters do
2318 not create an alternate DR, just check their possible validity
2319 and mark them. Adjust DECL_NONALIASED handling to not rely
2321 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
2322 update inits of gathers or scatters.
2323 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
2324 Also copy gather/scatter flag to pattern vinfo.
2326 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
2328 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2329 behavior of vec_packsu (vector unsigned long long, vector unsigned
2330 long long) to match behavior of vec_packs with same signature.
2332 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2333 Thomas Schwinge <thomas@codesourcery.com>
2334 Cesar Philippidis <cesar@codesourcery.com>
2336 * gimplify.c (gimplify_scan_omp_clauses): Add support for
2337 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2338 (gimplify_adjust_omp_clauses): Likewise.
2339 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
2340 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
2341 (gimplify_omp_target_update): Update handling of acc update and
2343 * omp-low.c (install_var_field): Remove unused parameter
2344 base_pointers_restrict.
2345 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
2346 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
2348 (omp_target_base_pointers_restrict_p): Delete.
2349 (scan_omp_target): Update call to scan_sharing_clauses.
2350 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
2352 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
2353 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2354 (convert_local_omp_clauses): Likewise.
2355 * tree-pretty-print.c (dump_omp_clause): Likewise.
2356 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
2358 (omp_clause_code_name): Likewise.
2360 2018-06-20 Jakub Jelinek <jakub@redhat.com>
2363 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
2366 PR tree-optimization/86231
2367 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
2368 anti-range don't overwrite *vr0min before using it to compute *vr0max.
2370 2018-06-20 Tom de Vries <tdevries@suse.de>
2372 PR tree-optimization/86097
2373 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
2374 iv type if signedness of iv type is not the same as that of *nit.
2376 2018-06-20 Jakub Jelinek <jakub@redhat.com>
2378 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
2379 EDGE_EH edges, verify they are all EDGE_EH.
2381 2018-06-20 Maya Rashish <coypu@sdf.org>
2383 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
2385 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2387 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
2388 * config/aarch64/aarch64.c (xgene1_tunings): Add
2389 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
2390 (aarch64_mode_valid_for_sched_fusion_p):
2391 Allow 16-byte modes.
2392 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
2393 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
2395 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
2397 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
2398 * config/aarch64/iterators.md (VQ2): New mode iterator.
2400 2018-06-20 Martin Liska <mliska@suse.cz>
2402 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2403 Change default ratio from 10 to 8.
2405 2018-06-20 Martin Liska <mliska@suse.cz>
2407 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2409 (bit_test_cluster::find_bit_tests): Likewise.
2410 (switch_decision_tree::analyze_switch_statement): Find clusters.
2411 * tree-switch-conversion.h (struct jump_table_cluster): Document
2414 2018-06-20 Martin Liska <mliska@suse.cz>
2416 * tree-switch-conversion.c (switch_conversion::collect):
2417 Record m_uniq property.
2418 (switch_conversion::expand): Bail out for special conditions.
2419 (group_cluster::~group_cluster): New.
2420 (group_cluster::group_cluster): Likewise.
2421 (group_cluster::dump): Likewise.
2422 (jump_table_cluster::emit): New.
2423 (switch_decision_tree::fix_phi_operands_for_edges): New.
2424 (struct case_node): Remove struct.
2425 (jump_table_cluster::can_be_handled): New.
2426 (case_values_threshold): Moved to header.
2427 (reset_out_edges_aux): Likewise.
2428 (jump_table_cluster::is_beneficial): New.
2429 (bit_test_cluster::can_be_handled): Likewise.
2430 (add_case_node): Remove.
2431 (bit_test_cluster::is_beneficial): New.
2432 (case_bit_test::cmp): New.
2433 (bit_test_cluster::emit): New.
2434 (expand_switch_as_decision_tree_p): Remove.
2435 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
2436 (fix_phi_operands_for_edge): Likewise.
2437 (switch_decision_tree::analyze_switch_statement): New.
2438 (compute_cases_per_edge): Move ...
2439 (switch_decision_tree::compute_cases_per_edge): ... here.
2440 (try_switch_expansion): Likewise.
2441 (switch_decision_tree::try_switch_expansion): Likewise.
2442 (record_phi_operand_mapping): Likewise.
2443 (switch_decision_tree::record_phi_operand_mapping): Likewise.
2444 (emit_case_decision_tree): Likewise.
2445 (switch_decision_tree::emit): Likewise.
2446 (balance_case_nodes): Likewise.
2447 (switch_decision_tree::balance_case_nodes): Likewise.
2448 (dump_case_nodes): Likewise.
2449 (switch_decision_tree::dump_case_nodes): Likewise.
2450 (emit_jump): Likewise.
2451 (switch_decision_tree::emit_jump): Likewise.
2452 (emit_cmp_and_jump_insns): Likewise.
2453 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
2454 (emit_case_nodes): Likewise.
2455 (switch_decision_tree::emit_case_nodes): Likewise.
2456 (conditional_probability): Remove.
2457 * tree-switch-conversion.h (enum cluster_type): New.
2459 (struct cluster): Likewise.
2460 (cluster::cluster): Likewise.
2461 (struct simple_cluster): Likewise.
2462 (simple_cluster::simple_cluster): Likewise.
2463 (struct group_cluster): Likewise.
2464 (struct jump_table_cluster): Likewise.
2465 (struct bit_test_cluster): Likewise.
2466 (struct min_cluster_item): Likewise.
2467 (struct case_tree_node): Likewise.
2468 (case_tree_node::case_tree_node): Likewise.
2469 (jump_table_cluster::case_values_threshold): Likewise.
2470 (struct case_bit_test): Likewise.
2471 (struct switch_decision_tree): Likewise.
2472 (struct switch_conversion): Likewise.
2473 (switch_decision_tree::reset_out_edges_aux): Likewise.
2475 2018-06-20 Martin Liska <mliska@suse.cz>
2477 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
2478 (hoist_edge_and_branch_if_true): Likewise.
2479 (expand_switch_using_bit_tests_p): Likewise.
2480 (struct case_bit_test): Likewise.
2481 (case_bit_test_cmp): Likewise.
2482 (emit_case_bit_tests): Likewise.
2483 (switch_conversion::switch_conversion): New class.
2484 (struct switch_conv_info): Remove old struct.
2485 (collect_switch_conv_info): More to ...
2486 (switch_conversion::collect): ... this.
2487 (check_range): Likewise.
2488 (switch_conversion::check_range): Likewise.
2489 (check_all_empty_except_final): Likewise.
2490 (switch_conversion::check_all_empty_except_final): Likewise.
2491 (check_final_bb): Likewise.
2492 (switch_conversion::check_final_bb): Likewise.
2493 (create_temp_arrays): Likewise.
2494 (switch_conversion::create_temp_arrays): Likewise.
2495 (free_temp_arrays): Likewise.
2496 (gather_default_values): Likewise.
2497 (switch_conversion::gather_default_values): Likewise.
2498 (build_constructors): Likewise.
2499 (switch_conversion::build_constructors): Likewise.
2500 (constructor_contains_same_values_p): Likewise.
2501 (switch_conversion::contains_same_values_p): Likewise.
2502 (array_value_type): Likewise.
2503 (switch_conversion::array_value_type): Likewise.
2504 (build_one_array): Likewise.
2505 (switch_conversion::build_one_array): Likewise.
2506 (build_arrays): Likewise.
2507 (switch_conversion::build_arrays): Likewise.
2508 (gen_def_assigns): Likewise.
2509 (switch_conversion::gen_def_assigns): Likewise.
2510 (prune_bbs): Likewise.
2511 (switch_conversion::prune_bbs): Likewise.
2512 (fix_phi_nodes): Likewise.
2513 (switch_conversion::fix_phi_nodes): Likewise.
2514 (gen_inbound_check): Likewise.
2515 (switch_conversion::gen_inbound_check): Likewise.
2516 (process_switch): Use the newly created class.
2517 (switch_conversion::expand): New.
2518 (switch_conversion::~switch_conversion): New.
2519 * tree-switch-conversion.h: New file.
2521 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2523 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
2524 tree-vect-patterns.c.
2525 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
2526 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
2527 (vect_recog_sad_pattern): Likewise.
2528 (vect_recog_widen_sum_pattern): Likewise.
2529 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
2530 (vect_recog_widen_shift_pattern): Remove the type_in argument.
2531 (vect_recog_rotate_pattern): Likewise.
2532 (vect_recog_mult_pattern): Likewise.
2533 (vect_recog_vector_vector_shift_pattern): Likewise.
2534 (vect_recog_divmod_pattern): Likewise.
2535 (vect_recog_mixed_size_cond_pattern): Likewise.
2536 (vect_recog_bool_pattern): Likewise.
2537 (vect_recog_mask_conversion_pattern): Likewise.
2538 (vect_try_gather_scatter_pattern): Likewise.
2539 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
2540 (vect_recog_over_widening_pattern): Likewise.
2541 (vect_recog_gather_scatter_pattern): Likewise.
2542 (vect_recog_func_ptr): Move from tree-vectorizer.h
2543 (vect_vect_recog_func_ptrs): Move further down the file.
2544 (vect_recog_func): Likewise. Remove the third argument.
2545 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
2546 (vect_pattern_recog_1): Expect the pattern function to do any
2547 necessary target tests. Also expect it to provide a vector type.
2548 Remove the type_in handling.
2550 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2552 * tree-vect-patterns.c (vect_pattern_detected): New function.
2553 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
2554 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
2555 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
2556 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
2557 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2558 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2559 (vect_recog_mask_conversion_pattern)
2560 (vect_try_gather_scatter_pattern): Likewise.
2562 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2564 * tree-vect-patterns.c (vect_get_internal_def): New function.
2565 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2566 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
2567 (search_type_for_mask_1): Use it.
2569 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2571 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2572 redundant WIDEN_SUM_EXPR handling.
2573 (vect_recog_sad_pattern): Likewise.
2575 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2577 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2578 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
2579 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
2580 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
2581 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
2583 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2585 * tree-vect-stmts.c (vectorizable_call): Make sure that we
2586 use the stmt_vec_info of the original bb statement for the
2587 new zero assignment, even if the call is part of a pattern.
2589 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2591 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
2592 that the sequence is attached to the original statement rather
2593 than the pattern statement.
2594 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
2595 PATTERN_DEF_SEQ from the original statement rather than
2596 the main pattern statement.
2597 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
2598 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
2599 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
2601 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2603 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
2604 definition statements before the early exit for statements that aren't
2606 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
2608 (vect_transform_loop): ...here. Process pattern definition
2609 statements without first checking whether the main pattern
2610 statement is live or relevant.
2612 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
2614 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
2615 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
2617 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
2619 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
2620 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
2621 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
2622 (expand_block_compare): Change select_block_compare_mode call.
2623 (expand_strncmp_align_check): Use new functions, fix comment.
2624 (emit_final_str_compare_gpr): New function.
2625 (expand_strn_compare): Refactor and clean up code.
2626 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
2628 2018-06-19 Tony Reix <tony.reix@atos.com>
2629 Damien Bergamini <damien.bergamini@atos.com>
2630 David Edelsohn <dje.gcc@gmail.com>
2632 * collect2.c (static_obj): New variable.
2633 (static_libs): New variable.
2634 (is_in_list): Uncomment declaration.
2635 (main): Track AIX libraries linked statically.
2636 (is_in_list): Uncomment definition.
2637 (scan_prog_file): Don't add AIX shared libraries initializer
2638 to constructor list if linking statically.
2640 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
2642 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
2644 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
2646 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
2648 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
2651 2018-06-19 Martin Liska <mliska@suse.cz>
2653 * config/i386/i386.c (ix86_can_inline_p): Do not use
2654 ipa_fn_summaries::get_create.
2655 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
2657 (devirtualization_time_bonus): Likewise.
2658 (ipcp_propagate_stage): Likewise.
2659 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2660 (edge_set_predicate): Likewise.
2661 (evaluate_conditions_for_known_args): Likewise.
2662 (evaluate_properties_for_edge): Likewise.
2663 (ipa_call_summary::reset): Tranform to ...
2664 (ipa_call_summary::~ipa_call_summary): ... this.
2665 (ipa_fn_summary::reset): Transform to ...
2666 (ipa_fn_summary::~ipa_fn_summary): ... this.
2667 (ipa_fn_summary_t::remove): Rename to ...
2668 (ipa_fn_summary_t::remove_callees): ... this.
2669 (ipa_fn_summary_t::duplicate): Use placement new
2670 instead of memory copy.
2671 (ipa_call_summary_t::duplicate): Likewise.
2672 (ipa_call_summary_t::remove): Remove.
2673 (dump_ipa_call_summary): Change get_create to get.
2674 (ipa_dump_fn_summary): Dump only when summary exists.
2675 (analyze_function_body): Use symbol_summary::get instead
2677 (compute_fn_summary): Likewise.
2678 (estimate_edge_devirt_benefit): Likewise.
2679 (estimate_edge_size_and_time): Likewise.
2680 (inline_update_callee_summaries): Likewise.
2681 (remap_edge_change_prob): Likewise.
2682 (remap_edge_summaries): Likewise.
2683 (ipa_merge_fn_summary_after_inlining): Likewise.
2684 (write_ipa_call_summary): Likewise.
2685 (ipa_fn_summary_write): Likewise.
2686 (ipa_free_fn_summary): Likewise.
2687 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
2688 (struct ipa_call_summary): Likewise.
2689 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
2691 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
2692 (estimate_size_after_inlining): Likewise.
2693 (estimate_growth): Likewise.
2694 (growth_likely_positive): Likewise.
2695 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
2696 (inline_call): Likewise.
2697 * ipa-inline.c (caller_growth_limits): Likewise.
2698 (can_inline_edge_p): Likewise.
2699 (can_inline_edge_by_limits_p): Likewise.
2700 (compute_uninlined_call_time): Likewise.
2701 (compute_inlined_call_time): Likewise.
2702 (want_inline_small_function_p): Likewise.
2703 (edge_badness): Likewise.
2704 (update_caller_keys): Likewise.
2705 (update_callee_keys): Likewise.
2706 (inline_small_functions): Likewise.
2707 (inline_to_all_callers_1): Likewise.
2708 (dump_overall_stats): Likewise.
2709 (early_inline_small_functions): Likewise.
2710 (early_inliner): Likewise.
2711 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
2712 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2713 * ipa-pure-const.c (malloc_candidate_p): Likewise.
2714 * ipa-split.c (execute_split_functions): Likewise.
2715 * symbol-summary.h: Likewise.
2716 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2718 2018-06-19 Richard Biener <rguenther@suse.de>
2720 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
2721 (vectorize_loops): ... here. Fix dbgcnt handling.
2722 (try_vectorize_loop): Wrap try_vectorize_loop_1.
2724 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
2727 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
2728 ieee128 argument takes up only one (vector) register, not two (floating
2731 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
2733 * gimplify.c (gimplify_init_constructor): Really never clear for an
2734 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
2736 2018-06-19 Richard Biener <rguenther@suse.de>
2738 PR tree-optimization/86179
2739 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
2740 after failed recognition.
2742 2018-06-18 Martin Sebor <msebor@redhat.com>
2745 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
2746 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
2747 Handle integer subtraction.
2748 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
2749 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
2751 2018-06-18 David Malcolm <dmalcolm@redhat.com>
2753 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
2754 param from rtx to rtx_insn *.
2755 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
2757 (frv_ifcvt_modify_insn): Likwise.
2758 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
2759 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
2760 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
2761 as_a <rtx_insn *> cast to local "unprotected_region" once
2762 it's been established that it's not NULL or pc_rtx.
2763 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
2764 param "sethi" from rtx to rtx_insn *.
2765 (nds32_group_float_insns): Likewise for param "insn".
2766 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
2768 (vax_output_int_subtract): Likewise.
2769 * config/vax/vax.c (vax_output_int_add): Likewise for param
2771 (vax_output_int_subtract): Likewise.
2772 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
2773 (emit_pattern_after): Likewise for param "after".
2774 (emit_insn_after): Likewise.
2775 (emit_jump_insn_after): Likewise.
2776 (emit_call_insn_after): Likewise.
2777 (emit_debug_insn_after): Likewise.
2778 (emit_pattern_before): Likewise for param "before".
2779 (emit_insn_before): Likewise.
2780 (emit_jump_insn_before): Likewise.
2781 * final.c (get_insn_template): Likewise for param "insn", removing
2783 * output.h (get_insn_template): Likewise for 2nd param.
2784 * rtl.h (emit_insn_before): Likewise.
2785 (emit_jump_insn_before): Likewise.
2786 (emit_debug_insn_before_noloc): Likewise.
2787 (emit_insn_after): Likewise.
2788 (emit_jump_insn_after): Likewise.
2789 (emit_call_insn_after): Likewise.
2790 (emit_debug_insn_after): Likewise.
2791 (set_insn_deleted): Likewise for param.
2793 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
2796 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
2797 floating point modes, so that IFmode is numerically greater than
2798 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
2799 to declare the ordering. This prevents IFmode from being
2800 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
2801 machine. Include rs6000-modes.h to share the fractional values
2802 between genmodes* and the rest of the compiler.
2806 * config/rs6000/rs6000-modes.h: New file.
2807 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
2808 meaning of rs6000_long_double_size so that 126..128 selects an
2809 appropriate 128-bit floating point type.
2810 (rs6000_option_override_internal): Likewise.
2811 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
2812 (TARGET_LONG_DOUBLE_128): Change the meaning of
2813 rs6000_long_double_size so that 126..128 selects an appropriate
2814 128-bit floating point type.
2815 (LONG_DOUBLE_TYPE_SIZE): Update comment.
2816 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
2817 source and destination to match the standard usage.
2818 (truncifkf2): Likewise.
2819 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
2820 ISA 2.07 to use an explicit clobber, instead of passing in a
2822 (copysign<mode>3_soft): Likewise.
2824 2018-06-18 David Malcolm <dmalcolm@redhat.com>
2826 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2827 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
2828 (vect_slp_analyze_instance_dependence): Likewise.
2829 (vect_enhance_data_refs_alignment): Likewise.
2830 (vect_analyze_data_refs_alignment): Likewise.
2831 (vect_slp_analyze_and_verify_instance_alignment
2832 (vect_analyze_data_ref_accesses): Likewise.
2833 (vect_prune_runtime_alias_test_list): Likewise.
2834 (vect_analyze_data_refs): Likewise.
2835 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
2836 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
2837 (vect_analyze_scalar_cycles_1): Likewise.
2838 (vect_get_loop_niters): Likewise.
2839 (vect_analyze_loop_form_1): Likewise.
2840 (vect_update_vf_for_slp): Likewise.
2841 (vect_analyze_loop_operations): Likewise.
2842 (vect_analyze_loop): Likewise.
2843 (vectorizable_induction): Likewise.
2844 (vect_transform_loop): Likewise.
2845 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
2846 * tree-vect-slp.c (vect_analyze_slp): Likewise.
2847 (vect_make_slp_decision): Likewise.
2848 (vect_detect_hybrid_slp): Likewise.
2849 (vect_slp_analyze_operations): Likewise.
2850 (vect_slp_bb): Likewise.
2851 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
2852 (vectorizable_bswap): Likewise.
2853 (vectorizable_call): Likewise.
2854 (vectorizable_simd_clone_call): Likewise.
2855 (vectorizable_conversion): Likewise.
2856 (vectorizable_assignment): Likewise.
2857 (vectorizable_shift): Likewise.
2858 (vectorizable_operation): Likewise.
2859 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
2861 2018-06-18 Martin Sebor <msebor@redhat.com>
2863 PR tree-optimization/81384
2864 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
2865 * builtins.c (expand_builtin_strnlen): New function.
2866 (expand_builtin): Call it.
2867 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
2868 * builtins.def (BUILT_IN_STRNLEN): New.
2869 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
2870 Warn for bounds in excess of maximum object size.
2871 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
2872 single-value ranges. Handle strnlen.
2873 (handle_builtin_strlen): Handle strnlen.
2874 (strlen_check_and_optimize_stmt): Same.
2875 * doc/extend.texi (Other Builtins): Document strnlen.
2877 2018-06-18 Maya Rashish <coypu@sdf.org>
2879 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
2880 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
2881 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
2883 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
2885 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
2887 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2889 * tree.c (escaped_string::escape): Replace cast to char * by
2890 const_cast<char *> (unescaped).
2892 2018-06-18 Nick Clifton <nickc@redhat.com>
2895 * tree.c (escaped_string): New class. Converts an unescaped
2896 string into its escaped equivalent.
2897 (warn_deprecated_use): Use the new class to convert the
2898 deprecation message, if present.
2899 (test_escaped_strings): New self test.
2900 (test_c_tests): Add test_escaped_strings.
2901 * doc/extend.texi (deprecated): Add a note that the
2902 deprecation message is affected by the -fmessage-length
2903 option, and that control characters will be escaped.
2904 (#pragma GCC error): Document this pragma.
2905 (#pragma GCC warning): Likewise.
2906 * doc/invoke.texi (-fmessage-length): Document this option's
2907 effect on the #warning and #error preprocessor directives and
2908 the deprecated attribute.
2910 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
2912 * tree.c (decl_value_expr_lookup): Revert latest change.
2913 (decl_value_expr_insert): Likewise.
2915 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
2917 * gimplify.c (nonlocal_vlas): Delete.
2918 (nonlocal_vla_vars): Likewise.
2919 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
2921 (gimplify_body): Do not create and destroy nonlocal_vlas.
2922 * tree-nested.c: Include diagnostic.h.
2923 (use_pointer_in_frame): Tweak.
2924 (lookup_field_for_decl): Add assertion and declare the transformation.
2925 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
2926 internal error when the reference is in a wrong context. Do not
2927 create a debug decl by default.
2928 (note_nonlocal_block_vlas): Delete.
2929 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
2930 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
2931 create a debug decl by default.
2932 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
2933 call is in a wrong context.
2934 (fixup_vla_decls): New function.
2935 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
2936 debug variables were created.
2937 * tree.c (decl_value_expr_lookup): Add checking assertion.
2938 (decl_value_expr_insert): Likewise.
2940 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2943 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
2944 * tree-scalar-evolution.c (interpret_expr): Likewise.
2945 (expression_expensive_p): Likewise.
2946 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
2947 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
2948 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
2949 (ssa_defined_by_minus_one_stmt_p): New.
2951 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2954 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
2955 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
2956 * dojump.c (do_jump): Likewise.
2957 * expr.c (expand_expr_real_2): Check operand type's sign.
2958 * fold-const.c (const_unop): Handle ABSU_EXPR.
2959 (fold_abs_const): Likewise.
2960 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
2961 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
2962 (strip_sign_op_1): Likesise.
2963 * match.pd: Add new pattern to generate ABSU_EXPR.
2964 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
2965 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
2966 * tree-eh.c (operation_could_trap_helper_p): Likewise.
2967 * tree-inline.c (estimate_operator_cost): Likewise.
2968 * tree-pretty-print.c (dump_generic_node): Likewise.
2969 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
2970 * tree.def (ABSU_EXPR): New.
2972 2018-06-16 Jakub Jelinek <jakub@redhat.com>
2975 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
2976 documented as preserved for backward compatibility only.
2977 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
2979 PR rtl-optimization/86108
2980 * bb-reorder.c (create_forwarder_block): Renamed to ...
2981 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
2982 jump from new landing pad to the second part.
2983 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
2986 2018-06-15 Jakub Jelinek <jakub@redhat.com>
2989 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
2990 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
2991 Only call store_expr for halves if the mode is the same.
2994 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
2995 Fix up comment formatting.
2997 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2999 * typed-splay-tree.h (typed_splay_tree::remove): New function.
3000 (typed_splay_tree::closure,
3001 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
3002 (typed_splay_tree::typed_splay_tree,
3003 typed_splay_tree::operator =): Declared private.
3004 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
3005 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
3006 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
3007 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
3008 typed_splay_tree::splay_tree_splay,
3009 typed_splay_tree::splay_tree_foreach_helper,
3010 typed_splay_tree::splay_tree_insert,
3011 typed_splay_tree::splay_tree_remove,
3012 typed_splay_tree::splay_tree_lookup,
3013 typed_splay_tree::splay_tree_predecessor,
3014 typed_splay_tree::splay_tree_successor,
3015 typed_splay_tree::splay_tree_min,
3016 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
3017 (typed_splay_tree::root, typed_splay_tree::comp,
3018 typed_splay_tree::delete_key,
3019 typed_splay_tree::delete_value): New data members.
3020 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
3021 typed_splay_tree::remove.
3023 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
3025 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
3026 -mginv and -mno-ginv to the assembler.
3027 * config/mips/mips.opt (-mcrc): New option.
3029 * doc/invoke.text (-mcrc): Document.
3032 2018-06-15 Nick Clifton <nickc@redhat.com>
3035 * tree.c (escaped_string): New class. Converts an unescaped
3036 string into its escaped equivalent.
3037 (warn_deprecated_use): Use the new class to convert the
3038 deprecation message, if present.
3039 (test_escaped_strings): New self test.
3040 (test_c_tests): Add test_escaped_strings.
3041 * doc/extend.texi (deprecated): Add a note that the
3042 deprecation message is affected by the -fmessage-length
3043 option, and that control characters will be escaped.
3044 (#pragma GCC error): Document this pragma.
3045 (#pragma GCC warning): Likewise.
3046 * doc/invoke.texi (-fmessage-length): Document this option's
3047 effect on the #warning and #error preprocessor directives and
3048 the deprecated attribute.
3050 2018-06-15 Richard Biener <rguenther@suse.de>
3052 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
3053 here, also noting vector size used.
3054 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
3055 size used in MSG_OPTIMIZED_LOCATIONS dump.
3056 (pass_slp_vectorize::execute): Adjust.
3058 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
3061 * config/arc/arc.c (arc_return_address_register): Fix
3064 2018-06-15 Richard Biener <rguenther@suse.de>
3067 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
3068 leave useless conversion stripping to force_gimple_operand_gsi.
3069 (gimplify_build2): Likewise.
3070 (gimplify_build1): Likewise.
3072 2018-06-15 Richard Biener <rguenther@suse.de>
3075 * tree-cfg.c (move_stmt_op): unshare invariant addresses
3076 before adjusting their block.
3078 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
3080 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
3081 multilibs for *-*-rtems*.
3082 * config/riscv/t-rtems: New file.
3084 2018-06-14 Jakub Jelinek <jakub@redhat.com>
3087 * match.pd ((A +- CST1) +- CST2): Punt if last resort
3088 unsigned_type_for returns NULL.
3091 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
3092 subregs of multi-word pseudos unless the float mode has word size.
3094 2018-06-14 Richard Biener <rguenther@suse.de>
3097 * tree-vect-generic.c (build_word_mode_vector_type): Remove
3098 duplicate and harmful type_hash_canon.
3099 * tree.c (type_hash_canon): Assert we didn't find ourselves.
3101 2018-06-14 Richard Biener <rguenther@suse.de>
3104 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
3107 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3109 * config/rtems.h (STDINT_LONG32): Define.
3111 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
3112 Prachi Godbole <prachi.godbole@imgtec.com>
3114 * config/mips/mips-cpus.def: Define P6600.
3115 * config/mips/mips-tables.opt: Regenerate.
3116 * config/mips/mips.c (mips_ucbranch_type): New enum.
3117 (mips_rtx_cost_data): Add support for P6600.
3118 (mips_issue_rate): Likewise.
3119 (mips_multipass_dfa_lookahead): Likewise.
3120 (mips_avoid_hazard): Likewise.
3121 (mips_reorg_process_insns): Likewise.
3122 (mips_classify_branch_p6600): New function.
3123 * config/mips/mips.h (TUNE_P6600): New define.
3124 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
3125 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
3126 * config/mips/mips.md: Include p6600.md.
3127 (processor): Add p6600.
3128 * config/mips/p6600.md: New file.
3129 * doc/invoke.texi: Add p6600 to supported architectures.
3131 2018-06-13 Martin Sebor <msebor@redhat.com>
3133 PR tree-optimization/86114
3134 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
3136 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
3138 2018-06-13 Richard Biener <rguenther@suse.de>
3140 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
3141 Properly set vector type of the intermediate stmt.
3142 * tree-vect-stmts.c (vectorizable_operation): The destination
3143 var always has vectype_out type.
3145 2018-06-13 Jeff Law <law@redhat.com>
3147 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
3148 integer 0 for argument to print_rtl_with_bb.
3149 (rl78_reorg): Likewise.
3151 2018-06-13 David Malcolm <dmalcolm@redhat.com>
3153 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
3154 from rtx to rtx_insn *.
3155 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
3157 (add_sched_insns_for_speculation): Likewise for local "target",
3158 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3159 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
3160 from rtx_insn ** to rtx_code_label **.
3161 (reorg_emit_nops): Likewise.
3162 (c6x_reorg): Likewise for local "call_labels".
3163 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
3165 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
3166 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
3167 the loops over LABEL_REFS.
3168 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
3170 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3171 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
3172 (split_branches): Strengthen local "olabel" from rtx to
3173 rtx_insn *, adding a safe_as_a cast.
3174 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
3176 (add_insn_after): Likewise for first two params.
3177 (add_insn_before): Likewise.
3178 (remove_insn): Likewise for param.
3179 (emit_pattern_before_noloc): Likewise for second and third params.
3180 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
3181 (emit_call_insn_before_noloc): Likewise.
3182 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
3184 (emit_barrier_before): Likewise.
3185 (emit_label_before): Strengthen "label" param from "rtx" to
3186 "rtx_code_label *". Strengthen "before" param from "rtx" to
3188 (emit_insn_after_1): Strengthen "after" param from "rtx" to
3190 (emit_pattern_after_noloc): Likewise.
3191 (emit_insn_after_noloc): Likewise.
3192 (emit_jump_insn_after_noloc): Likewise.
3193 (emit_call_insn_after_noloc): Likewise.
3194 (emit_debug_insn_after_noloc): Likewise.
3195 (emit_barrier_after): Likewise.
3196 (emit_label_after): Likewise for both params.
3197 (emit_pattern_after_setloc): Likewise for "after" param. Convert
3198 "loc" param from "int" to "location_t".
3199 (emit_insn_after_setloc): Likewise.
3200 (emit_jump_insn_after_setloc): Likewise.
3201 (emit_call_insn_after_setloc): Likewise.
3202 (emit_debug_insn_after_setloc): Likewise.
3203 (emit_pattern_before_setloc): Likewise for "before" param. Convert
3204 "loc" param from "int" to "location_t".
3205 (emit_pattern_before): Convert NULL_RTX to NULL.
3206 (emit_insn_before_setloc): Convert "loc" param from "int" to
3208 (emit_jump_insn_before_setloc): Likewise.
3209 (emit_call_insn_before_setloc): Likewise.
3210 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
3211 rtx_insn *. Convert "loc" param from "int" to "location_t".
3212 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
3213 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
3214 Convert 3rd param from "int" to "location_t".
3215 (emit_barrier_before, emit_barrier_after, next_real_insn):
3216 Strengthen param from rtx to rtx_insn *.
3217 (emit_label_before): Strengthen 1st param from "rtx" to
3218 "rtx_code_label *". Strengthen 2nd param from "rtx" to
3220 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
3221 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
3222 Strengthen 2nd param from "rtx" to "rtx_insn *".
3223 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
3224 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
3225 Likewise. Convert 3rd param from "int" to "location_t".
3226 (emit_label_after): Strengthen 1st param from "rtx" to
3228 (next_real_insn, remove_insn): Strengthen param from "rtx" to
3230 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
3231 from "rtx" to "rtx_insn *".
3233 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
3235 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
3236 bodies streamed in with -Q.
3237 * dumpfile.c (dump_files): Add lto-stream-out dump file.
3238 * dumpfile.h (tree_dump_index): Add lto_stream_out.
3239 * gimple-streamer-out.c: Include gimple-pretty-print.h
3240 (output_bb): Dump stmts streamed.
3241 * lto-section-out.c: Include print-tree.h
3242 (lto_begin_section): Dump sections created.
3243 (lto_output_decl_index): Dump decl encoded.
3244 * lto-streamer-out.c: Include print-tree.h
3245 (create_output_block): Dump output block created.
3246 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
3247 (output_function): Dump function output.
3248 (output_constructor): Dump constructor streamed.
3249 (write_global_stream): Output indexes encoded.
3250 (produce_asm_for_decls): Dump streams encoded.
3251 * lto-streamer.c (streamer_dump_file): New global var.
3252 * lto-streamer.h (streamer_dump_file): Declare.
3253 * passes.c (ipa_write_summaries): Initialize streamer dump.
3254 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
3257 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
3260 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
3261 offsets for register save directives. Emit a second batch of save
3262 directives, if need be, when the function accesses prior frames.
3264 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3266 * config/arc/fpu.md (fmasf4): Force operand to register.
3267 (fnmasf4): Likewise.
3269 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3271 * config/arc/arc-protos.h (arc_pad_return): Remove.
3272 * config/arc/arc.c (machine_function): Remove force_short_suffix
3274 (arc_print_operand): Adjust printing of '&'.
3275 (arc_verify_short): Remove conditional printing of short suffix.
3276 (arc_final_prescan_insn): Remove reference to size_reason.
3277 (pad_return): New function.
3278 (arc_reorg): Call pad_return.
3279 (arc_pad_return): Remove.
3280 (arc_init_machine_status): Remove reference to force_short_suffix.
3281 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
3282 (attr length): When attribute iscompact is true force to 2
3283 regardless; in the case of maybe check if we want to force the
3284 instruction to have 4 bytes length.
3285 (nopv): Change it to generate 4 byte long nop as well.
3286 (blockage): New pattern.
3287 (simple_return): Remove call to arc_pad_return.
3288 (p_return_i): Likewise.
3290 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3292 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
3294 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3296 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
3299 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3301 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
3302 for ARC700 and ARCv2.
3304 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
3307 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
3308 operands[2] instead of operands[1].
3311 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
3313 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
3314 case, check whether the outer register overlaps an unallocatable
3315 register, not just whether it fits the required class.
3317 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
3319 * poly-int.h (can_div_trunc_p): Add new overload in which all values
3321 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
3322 (memrefs_conflict_p): Likewise.
3323 (init_alias_analysis): Likewise.
3324 * cfgexpand.c (expand_debug_expr): Likewise.
3325 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
3326 * cse.c (fold_rtx): Likewise.
3327 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
3328 * expr.c (emit_block_move_hints): Likewise.
3329 (clear_storage_hints, push_block, emit_push_insn): Likewise.
3330 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
3331 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
3332 (emit_group_store): Likewise.
3333 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
3334 to read the PRE/POST_MODIFY increment.
3335 * calls.c (store_one_arg): Use strip_offset.
3336 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
3338 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
3340 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
3341 (simplify_binary_operation_1): Extend CONST_INT handling to
3343 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
3344 than a HOST_WIDE_INT.
3345 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
3347 (adjust_mems, add_stores): Update accodingly.
3348 (vt_canonicalize_addr): Track polynomial offsets.
3349 (emit_note_insn_var_location): Likewise.
3350 (vt_add_function_parameter): Likewise.
3351 (vt_initialize): Likewise.
3353 2018-06-12 Jeff Law <law@redhat.com>
3355 * config.gcc (alpha*-*-freebsd*): Remove.
3356 * config/alpha/freebsd.h: Remove.
3358 2018-06-12 David Malcolm <dmalcolm@redhat.com>
3361 * spellcheck-tree.c (levenshtein_distance): Rename to...
3362 (get_edit_distance): ...this, and update for underlying renaming.
3363 * spellcheck-tree.h (levenshtein_distance): Rename to...
3364 (get_edit_distance): ...this.
3365 * spellcheck.c (levenshtein_distance): Rename to...
3366 (get_edit_distance): ...this. Convert from Levenshtein distance
3367 to Damerau-Levenshtein distance by supporting transpositions of
3368 adjacent characters. Rename "v1" to "v_next" and "v0" to
3370 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
3371 (selftest::test_edit_distance_unit_test_oneway): ...this, and
3372 update for underlying renaming.
3373 (selftest::levenshtein_distance_unit_test): Rename to...
3374 (selftest::test_get_edit_distance_unit): ...this, and update for
3375 underlying renaming.
3376 (selftest::test_find_closest_string): Add example from PR 69968
3377 where transposition helps
3378 (selftest::test_metric_conditions): Update for renaming.
3379 (selftest::test_metric_conditions): Likewise.
3380 (selftest::spellcheck_c_tests): Likewise.
3381 * spellcheck.h (levenshtein_distance): Rename both overloads to...
3382 (get_edit_distance): ...this.
3383 (best_match::consider): Update for renaming.
3385 2018-06-12 Martin Sebor <msebor@redhat.com>
3387 PR tree-optimization/85259
3388 * builtins.c (compute_objsize): Handle constant offsets.
3389 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
3390 true iff a warning has been issued.
3391 * gimple.h (gimple_nonartificial_location): New function.
3392 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
3393 gimple_nonartificial_location and handle -Wno-system-headers.
3394 (handle_builtin_stxncpy): Same.
3396 2018-06-12 Martin Sebor <msebor@redhat.com>
3399 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
3401 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
3403 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
3404 BUILTIN_VEC_XST entries for pointer to double and long long.
3406 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
3409 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
3411 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
3414 2018-06-12 Martin Liska <mliska@suse.cz>
3416 * doc/options.texi: Document IntegerRange.
3418 2018-06-12 Martin Liska <mliska@suse.cz>
3420 * config/i386/i386.opt: Make MPX-related options as Deprecated.
3421 * opt-functions.awk: Handle Deprecated flag.
3422 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
3424 (read_cmdline_option): Report warning for a deprecated option.
3425 * opts.h (struct cl_option): Add new field cl_deprecated.
3426 (CL_ERR_DEPRECATED): New.
3428 2018-06-12 Martin Liska <mliska@suse.cz>
3430 * doc/options.texi: Document Deprecated option flag.
3432 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3434 * config/arc/arc-arch.h (arc_extras): New enum.
3435 (arc_cpu_t):Add field extra.
3436 (arc_cpu_types): Consider the extras.
3437 * config/arc/arc-cpus.def: Add extras info.
3438 * config/arc/arc-opts.h (processor_type): Consider extra field.
3439 * config/arc/arc.c (arc_override_options): Handle extra field.
3441 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3443 * config/arc/arc-arch.h: Update ARC_OPTX macro.
3444 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
3446 * config/arc/arc.c (arc_init): Update pic warning.
3447 (irq_range): Update irq range parsing warnings.
3448 (arc_override_options): Update various warning messages.
3449 (arc_handle_aux_attribute): Likewise.
3451 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
3453 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
3455 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3457 * doc/sourcebuild.texi: Document usage of line number 0 in verify
3458 compiler messages directives.
3460 2018-06-12 Matthew Fortune <mfortune@gmail.com>
3462 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
3463 * config/mips/mips-tables.opt: Regenerate.
3464 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
3466 * doc/invoke.texi: Document -march=i6500.
3468 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
3470 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
3471 (i6400_gpmul): Add cpu_unit.
3472 (i6400_gpdiv): Likewise.
3473 (i6400_msa_add_d): Update reservations.
3474 (i6400_msa_int_add) Likewise.
3475 (i6400_msa_short_logic3) Likewise.
3476 (i6400_msa_short_logic2) Likewise.
3477 (i6400_msa_short_logic) Likewise.
3478 (i6400_msa_move) Likewise.
3479 (i6400_msa_cmp) Likewise.
3480 (i6400_msa_short_float2) Likewise.
3481 (i6400_msa_div_d) Likewise.
3482 (i6400_msa_long_logic1) Likewise.
3483 (i6400_msa_long_logic2) Likewise.
3484 (i6400_msa_mult) Likewise.
3485 (i6400_msa_long_float2) Likewise.
3486 (i6400_msa_long_float4) Likewise.
3487 (i6400_msa_long_float5) Likewise.
3488 (i6400_msa_long_float8) Likewise.
3489 (i6400_fpu_fadd): Include frint type.
3490 (i6400_fpu_store): New define_insn_reservation.
3491 (i6400_fpu_load): Likewise.
3492 (i6400_fpu_move): Likewise.
3493 (i6400_fpu_fcmp): Likewise.
3494 (i6400_fpu_fmadd): Likewise.
3495 (i6400_int_mult): Include imul3nc type and update reservation.
3496 (i6400_int_div): Include idiv3 type and update reservation.
3497 (i6400_int_load): Update to check type not move_type.
3498 (i6400_int_store): Likewise.
3499 (i6400_int_prefetch): Set zero latency.
3501 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
3503 * gcc.c: Document new %@{...} sequence.
3504 (LINK_COMMAND_SPEC): Use it for the -L switches.
3505 (cpp_unique_options): Use it for the -I switches.
3506 (at_file_argbuf): New global variable.
3507 (in_at_file): Likewise.
3508 (alloc_args): Create at_file_argbuf.
3509 (clear_args): Truncate at_file_argbuf.
3510 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
3511 (open_at_file): New function.
3512 (close_at_file): Likewise.
3513 (create_at_file): Delete.
3514 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
3517 (validate_switches_from_spec): Deal with %@{...} sequence.
3518 (validate_switches): Likewise.
3519 (driver::finalize): Call clear_args.
3521 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
3523 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
3525 2018-06-11 Martin Sebor <msebor@redhat.com>
3527 * doc/invoke.texi (-Wall): List -Wc++17-compat.
3528 (Wno-class-memaccess): Add @opindex.
3529 (Wno-templates, Wno-multiple-inheritance): Same.
3530 (Wno-virtual-inheritance, Wno-namespaces): Same.
3531 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
3532 (Wno-format-overflow, Wno-format-truncation): Same.
3533 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
3534 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
3535 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
3536 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
3537 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
3538 (Wno-misspelled-isr): Same.
3540 2018-06-11 Martin Sebor <msebor@redhat.com>
3542 * PR tree-optimization/86083
3543 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
3545 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
3547 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
3549 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
3552 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
3553 on the correct operand.
3554 (*movdi_internal64): Ditto.
3556 2018-06-11 Martin Liska <mliska@suse.cz>
3558 PR tree-optimization/86089
3559 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
3561 2018-06-11 Julia Koval <julia.koval@intel.com>
3563 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
3564 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
3565 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
3567 2018-06-11 Olivier Hainque <hainque@adacore.com>
3569 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
3570 for Ada with strict dwarf2.
3572 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
3575 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
3578 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
3580 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
3582 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
3584 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
3587 2018-06-08 Martin Liska <mliska@suse.cz>
3589 * tree-cfg.h (debug_function): Fix argument type to match
3592 2018-06-08 Martin Liska <mliska@suse.cz>
3594 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
3595 Remove usage of MPX-related (and removed) fields.
3596 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
3598 2018-06-08 David Malcolm <dmalcolm@redhat.com>
3600 * cfg.c (debug): Use TDF_NONE rather than 0.
3601 * cfghooks.c (debug): Likewise.
3602 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
3603 (struct dump_option_value_info): Convert to...
3604 (struct kv_pair): ...this template type.
3605 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
3607 (optinfo_verbosity_options): Likewise.
3608 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
3610 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
3611 than int for "optgroup_flags" param.
3612 (dump_generic_expr_loc): Use dump_flags_t rather than int for
3614 (dump_dec): Likewise.
3615 (dump_finish): Use TDF_NONE rather than 0.
3616 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
3617 rather than int for "optgroup_flags" param. Use TDF_NONE rather
3618 than 0. Update for change to option_ptr.
3619 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
3620 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
3621 0. Update for changes to optinfo_verbosity_options and
3623 (opt_info_switch_p): Convert optgroup_flags from int to
3625 (dump_basic_block): Use dump_flags_t rather than int
3626 for "dump_kind" param.
3627 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
3628 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
3629 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
3630 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
3631 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
3632 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
3633 TDF_NONE): Convert from macros to...
3634 (enum dump_flag): ...this new enum.
3635 (dump_flags_t): Update to use enum.
3636 (operator|, operator&, operator~, operator|=, operator&=):
3637 Implement for dump_flags_t.
3638 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
3639 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
3640 Convert from macros to...
3641 (enum optgroup_flag): ...this new enum.
3642 (optgroup_flags_t): New typedef.
3643 (operator|, operator|=): Implement for optgroup_flags_t.
3644 (struct dump_file_info): Convert field "alt_flags" to
3645 dump_flags_t. Convert field "optgroup_flags" to
3647 (dump_basic_block): Use dump_flags_t rather than int for param.
3648 (dump_generic_expr_loc): Likewise.
3649 (dump_dec): Likewise.
3650 (dump_register): Convert param "optgroup_flags" to
3652 (opt_info_enable_passes): Likewise.
3653 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
3655 * gimple-pretty-print.c (debug): Likewise.
3656 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
3657 (merged_store_group::apply_stores): Likewise.
3658 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
3659 * gimple.c (verify_gimple_pp): Likewise.
3660 * graphite-poly.c (print_pbb_body): Likewise.
3661 * passes.c (pass_manager::register_one_dump_file): Convert
3662 local "optgroup_flags" to optgroup_flags_t.
3663 * print-tree.c (print_node): Use TDF_NONE rather than 0.
3665 (debug_body): Likewise.
3666 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
3667 to optgroup_flags_t.
3668 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
3670 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
3671 (convert_mult_to_fma): Likewise.
3672 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
3673 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
3674 * tree-vect-data-refs.c (dump_lower_bound): Convert param
3675 "dump_kind" to dump_flags_t.
3677 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
3679 * config/rs6000/rs6000.c (min, max): Delete.
3681 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
3683 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
3684 -mabi=spe and -mabi=no-spe.
3686 2018-06-08 Martin Liska <mliska@suse.cz>
3688 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
3689 where we expect an existing summary.
3691 2018-06-08 Martin Liska <mliska@suse.cz>
3693 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
3694 * ipa-inline.h (estimate_edge_growth): Likewise.
3696 2018-06-08 Martin Liska <mliska@suse.cz>
3698 * cgraph.c (function_version_hasher::hash): Use
3699 cgraph_node::get_uid ().
3700 (function_version_hasher::equal):
3701 * cgraph.h (cgraph_node::get_uid): New method.
3702 * ipa-inline.c (update_caller_keys): Use
3703 cgraph_node::get_uid ().
3704 (update_callee_keys): Likewise.
3705 * ipa-utils.c (searchc): Likewise.
3706 (ipa_reduced_postorder): Likewise.
3707 * lto-cgraph.c (input_node): Likewise.
3708 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
3709 * symbol-summary.h (symtab_insertion): Likewise.
3710 (symtab_removal): Likewise.
3711 (symtab_duplication): Likewise.
3712 * tree-pretty-print.c (dump_function_header): Likewise.
3713 * tree-sra.c (convert_callers_for_node): Likewise.
3715 2018-06-08 Martin Liska <mliska@suse.cz>
3717 * cgraph.c (symbol_table::create_edge): Always assign a new
3719 (symbol_table::free_edge): Do not recycle numbers.
3720 * cgraph.h (cgraph_edge::get): New method.
3721 * symbol-summary.h (symtab_removal): Use it.
3722 (symtab_duplication): Likewise.
3723 (call_summary::hashable_uid): Remove.
3725 2018-06-08 Martin Liska <mliska@suse.cz>
3727 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
3728 (initialize_growth_caches): Remove.
3729 (free_growth_caches): Likewise.
3730 (do_estimate_edge_time): Use edge_growth_cache.
3731 (do_estimate_edge_size): Likewise.
3732 (do_estimate_edge_hints): Likewise.
3733 * ipa-inline.c (reset_edge_caches): Likewise.
3734 (recursive_inlining): Likewise.
3735 (inline_small_functions): Likewise.
3736 * ipa-inline.h (initialize_growth_caches): Remove.
3737 (estimate_edge_size): Likewise.
3738 (estimate_edge_time): Likewise.
3739 (estimate_edge_hints): Likewise.
3740 (reset_edge_growth_cache): Likewise.
3741 * symbol-summary.h (call_summary::remove): New method.
3743 2018-06-08 Martin Liska <mliska@suse.cz>
3745 * ipa-cp.c (class edge_clone_summary): New summary.
3746 (grow_edge_clone_vectors): Remove.
3747 (ipcp_edge_duplication_hook): Remove.
3748 (class edge_clone_summary_t): New call_summary class.
3749 (ipcp_edge_removal_hook): Remove.
3750 (edge_clone_summary_t::duplicate): New function.
3751 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
3752 (create_specialized_node): Likewise.
3753 (ipcp_driver): Initialize edge_clone_summaries and do not
3756 2018-06-08 Martin Liska <mliska@suse.cz>
3758 * symbol-summary.h (get): New function.
3759 (call_summary::m_initialize_when_cloning): New class member.
3761 2018-06-08 Martin Liska <mliska@suse.cz>
3763 * cgraph.c (cgraph_node::remove): Do not recycle uid.
3764 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
3765 (symbol_table::allocate_cgraph_symbol): Do not set uid.
3766 * passes.c (uid_hash_t): Record removed_nodes by their uids.
3767 (remove_cgraph_node_from_order): Use the removed_nodes set.
3768 (do_per_function_toporder): Likwise.
3769 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
3770 instead of summary_uid.
3771 (symtab_removal): Likewise.
3772 (symtab_duplication): Likewise.
3774 2018-06-08 Martin Liska <mliska@suse.cz>
3776 * ipa-cp.c (ipcp_store_bits_results): Use
3777 ipcp_transformation_sum.
3778 (ipcp_store_vr_results): Likewise.
3779 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
3781 (ipcp_transformation_initialize): ... this.
3782 (ipa_set_node_agg_value_chain):
3783 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
3784 (write_ipcp_transformation_info): Likewise.
3785 (read_ipcp_transformation_info): Likewise.
3786 (ipcp_update_bits): Likewise.
3787 (ipcp_update_vr): Likewise.
3788 (ipcp_transform_function): Likewise.
3789 * ipa-prop.h: Rename ipcp_transformation_summary to
3790 ipcp_transformation.
3791 (class ipcp_transformation_t): New function summary.
3792 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
3793 (ipa_get_agg_replacements_for_node): Likewise.
3795 2018-06-08 Martin Liska <mliska@suse.cz>
3797 * ipa-pure-const.c (struct funct_state_d): Do it class instead
3799 (class funct_state_summary_t): New function_summary class.
3800 (has_function_state): Remove.
3801 (get_function_state): Likewise.
3802 (set_function_state): Likewise.
3803 (add_new_function): Likewise.
3804 (funct_state_summary_t::insert): New function.
3805 (duplicate_node_data): Remove.
3806 (remove_node_data): Remove.
3807 (funct_state_summary_t::duplicate): New function.
3808 (register_hooks): Create new funct_state_summaries.
3809 (pure_const_generate_summary): Use it.
3810 (pure_const_write_summary): Likewise.
3811 (pure_const_read_summary): Likewise.
3812 (propagate_pure_const): Likewise.
3813 (propagate_nothrow): Likewise.
3814 (dump_malloc_lattice): Likewise.
3815 (propagate_malloc): Likewise.
3816 (execute): Do not register hooks, just remove summary
3818 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
3821 2018-06-08 Martin Liska <mliska@suse.cz>
3823 * ipa-reference.c (remove_node_data): Remove.
3824 (duplicate_node_data): Likewise.
3825 (class ipa_ref_var_info_summary_t): New class.
3826 (class ipa_ref_opt_summary_t): Likewise.
3827 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
3828 (get_reference_optimization_summary): Use
3829 ipa_ref_opt_sum_summaries.
3830 (set_reference_vars_info): Remove.
3831 (set_reference_optimization_summary): Likewise.
3832 (ipa_init): Create summaries.
3833 (init_function_info): Use function summary.
3834 (ipa_ref_opt_summary_t::duplicate): New function.
3835 (ipa_ref_opt_summary_t::remove): New function.
3836 (get_read_write_all_from_node): Fix GNU coding style.
3837 (propagate): Use function summary.
3838 (write_node_summary_p): Fix GNU coding style.
3839 (stream_out_bitmap): Likewise.
3840 (ipa_reference_read_optimization_summary): Use function summary.
3841 (ipa_reference_c_finalize): Do not release hooks.
3843 2018-06-08 Martin Liska <mliska@suse.cz>
3845 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
3846 (analyze_function_body): Extract multiple calls of get_create.
3847 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3848 * ipa-inline.c (recursive_inlining): Use ::get method.
3849 * ipa-inline.h (estimate_edge_growth): Likewise.
3851 2018-06-08 Martin Liska <mliska@suse.cz>
3853 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
3855 (hsa_function_summary::hsa_function_summary): Use the new enum
3857 (hsa_gpu_implementation_p): Use hsa_summaries::get.
3858 * hsa-gen.c (hsa_get_host_function): Likewise.
3859 (get_brig_function_name): Likewise.
3860 * ipa-hsa.c (process_hsa_functions): Likewise.
3861 (ipa_hsa_write_summary): Likewise.
3862 * symbol-summary.h (symtab_duplication): Use ::get function/
3863 (get): New function.
3865 2018-06-08 Martin Liska <mliska@suse.cz>
3867 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
3869 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
3870 (hsa_register_kernel): Likewise.
3871 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
3872 * hsa-gen.c (hsa_get_host_function): Likewise.
3873 (get_brig_function_name): Likewise.
3874 (generate_hsa): Likewise.
3875 (pass_gen_hsail::execute): Likewise.
3876 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
3877 (devirtualization_time_bonus): Likewise.
3878 (ipcp_propagate_stage): Likewise.
3879 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3880 (edge_set_predicate): Likewise.
3881 (evaluate_conditions_for_known_args): Likewise.
3882 (evaluate_properties_for_edge): Likewise.
3883 (ipa_fn_summary::reset): Likewise.
3884 (ipa_fn_summary_t::duplicate): Likewise.
3885 (dump_ipa_call_summary): Likewise.
3886 (ipa_dump_fn_summary): Likewise.
3887 (analyze_function_body): Likewise.
3888 (compute_fn_summary): Likewise.
3889 (estimate_edge_devirt_benefit): Likewise.
3890 (estimate_edge_size_and_time): Likewise.
3891 (estimate_calls_size_and_time): Likewise.
3892 (estimate_node_size_and_time): Likewise.
3893 (inline_update_callee_summaries): Likewise.
3894 (remap_edge_change_prob): Likewise.
3895 (remap_edge_summaries): Likewise.
3896 (ipa_merge_fn_summary_after_inlining): Likewise.
3897 (ipa_update_overall_fn_summary): Likewise.
3898 (read_ipa_call_summary): Likewise.
3899 (inline_read_section): Likewise.
3900 (write_ipa_call_summary): Likewise.
3901 (ipa_fn_summary_write): Likewise.
3902 (ipa_free_fn_summary): Likewise.
3903 * ipa-hsa.c (process_hsa_functions): Likewise.
3904 (ipa_hsa_write_summary): Likewise.
3905 (ipa_hsa_read_section): Likewise.
3906 * ipa-icf.c (sem_function::merge): Likewise.
3907 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3908 (do_estimate_edge_time): Likewise.
3909 (estimate_size_after_inlining): Likewise.
3910 (estimate_growth): Likewise.
3911 (growth_likely_positive): Likewise.
3912 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3913 (inline_call): Likewise.
3914 * ipa-inline.c (caller_growth_limits): Likewise.
3915 (can_inline_edge_p): Likewise.
3916 (can_inline_edge_by_limits_p): Likewise.
3917 (compute_uninlined_call_time): Likewise.
3918 (compute_inlined_call_time): Likewise.
3919 (want_inline_small_function_p): Likewise.
3920 (edge_badness): Likewise.
3921 (update_caller_keys): Likewise.
3922 (update_callee_keys): Likewise.
3923 (recursive_inlining): Likewise.
3924 (inline_small_functions): Likewise.
3925 (inline_to_all_callers_1): Likewise.
3926 (dump_overall_stats): Likewise.
3927 (early_inline_small_functions): Likewise.
3928 (early_inliner): Likewise.
3929 * ipa-inline.h (estimate_edge_growth): Likewise.
3930 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3931 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3932 * ipa-prop.h (IPA_NODE_REF): Likewise.
3933 (IPA_EDGE_REF): Likewise.
3934 * ipa-pure-const.c (malloc_candidate_p): Likewise.
3935 (propagate_malloc): Likewise.
3936 * ipa-split.c (execute_split_functions): Likewise.
3937 * symbol-summary.h: Rename get to get_create.
3939 (get_create): Likewise.
3940 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3942 2018-06-08 Martin Liska <mliska@suse.cz>
3944 * symbol-summary.h (release): Move definition out of class
3946 (symtab_removal): Likewise.
3947 (symtab_duplication): Likewise.
3949 2018-06-08 Martin Liska <mliska@suse.cz>
3951 * symbol-summary.h (function_summary): Move constructor
3952 implementation out of class declaration.
3953 (release): Likewise.
3954 (symtab_insertion): Likewise.
3955 (symtab_removal): Likewise.
3956 (symtab_duplication): Likewise.
3959 2018-06-08 Martin Liska <mliska@suse.cz>
3961 * Makefile.in: Remove support for MPX (macros, related functions,
3962 fields in cgraph_node, ...).
3963 * builtin-types.def (BT_BND): Likewise.
3964 (BT_FN_BND_CONST_PTR): Likewise.
3965 (BT_FN_CONST_PTR_BND): Likewise.
3966 (BT_FN_VOID_PTR_BND): Likewise.
3967 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
3968 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
3969 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
3970 (expand_builtin_mempcpy_with_bounds): Likewise.
3971 (expand_builtin_memset_with_bounds): Likewise.
3972 (expand_builtin_memset_args): Likewise.
3973 (std_expand_builtin_va_start): Likewise.
3974 (expand_builtin): Likewise.
3975 (expand_builtin_with_bounds): Likewise.
3976 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
3977 (DEF_LIB_BUILTIN_CHKP): Likewise.
3978 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
3979 (DEF_CHKP_BUILTIN): Likewise.
3980 (BUILT_IN_MEMCPY): Likewise.
3981 (BUILT_IN_MEMMOVE): Likewise.
3982 (BUILT_IN_MEMPCPY): Likewise.
3983 (BUILT_IN_MEMSET): Likewise.
3984 (BUILT_IN_STPCPY): Likewise.
3985 (BUILT_IN_STRCAT): Likewise.
3986 (BUILT_IN_STRCHR): Likewise.
3987 (BUILT_IN_STRCPY): Likewise.
3988 (BUILT_IN_STRLEN): Likewise.
3989 (BUILT_IN_MEMCPY_CHK): Likewise.
3990 (BUILT_IN_MEMMOVE_CHK): Likewise.
3991 (BUILT_IN_MEMPCPY_CHK): Likewise.
3992 (BUILT_IN_MEMSET_CHK): Likewise.
3993 (BUILT_IN_STPCPY_CHK): Likewise.
3994 (BUILT_IN_STRCAT_CHK): Likewise.
3995 (BUILT_IN_STRCPY_CHK): Likewise.
3996 * calls.c (store_bounds): Likewise.
3997 (emit_call_1): Likewise.
3998 (special_function_p): Likewise.
3999 (maybe_warn_nonstring_arg): Likewise.
4000 (initialize_argument_information): Likewise.
4001 (finalize_must_preallocate): Likewise.
4002 (compute_argument_addresses): Likewise.
4003 (expand_call): Likewise.
4004 * cfgexpand.c (expand_call_stmt): Likewise.
4005 (expand_return): Likewise.
4006 (expand_gimple_stmt_1): Likewise.
4007 (pass_expand::execute): Likewise.
4008 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
4009 (cgraph_node::remove): Likewise.
4010 (cgraph_node::dump): Likewise.
4011 (cgraph_node::verify_node): Likewise.
4012 * cgraph.h (chkp_function_instrumented_p): Likewise.
4013 (symtab_node::get_alias_target): Likewise.
4014 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
4015 (cgraph_local_p): Likewise.
4016 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
4017 (cgraph_edge::rebuild_references): Likewise.
4018 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
4019 (walk_polymorphic_call_targets): Likewise.
4020 (cgraph_node::expand_thunk): Likewise.
4021 (symbol_table::output_weakrefs): Likewise.
4022 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
4023 (ix86_handle_option): Likewise.
4024 * config/i386/constraints.md: Likewise.
4025 * config/i386/i386-builtin-types.def (BND): Likewise.
4029 * config/i386/i386-builtin.def (BDESC_END): Likewise.
4030 (BDESC_FIRST): Likewise.
4032 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
4033 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
4034 * config/i386/i386.c (enum reg_class): Likewise.
4035 (ix86_target_string): Likewise.
4036 (ix86_option_override_internal): Likewise.
4037 (ix86_conditional_register_usage): Likewise.
4038 (ix86_valid_target_attribute_inner_p): Likewise.
4039 (ix86_set_indirect_branch_type): Likewise.
4040 (ix86_set_current_function): Likewise.
4041 (ix86_function_arg_regno_p): Likewise.
4042 (init_cumulative_args): Likewise.
4043 (ix86_function_arg_advance): Likewise.
4044 (ix86_function_arg): Likewise.
4045 (ix86_pass_by_reference): Likewise.
4046 (ix86_function_value_regno_p): Likewise.
4047 (ix86_function_value_1): Likewise.
4048 (ix86_function_value_bounds): Likewise.
4049 (ix86_return_in_memory): Likewise.
4050 (ix86_setup_incoming_vararg_bounds): Likewise.
4051 (ix86_va_start): Likewise.
4052 (indirect_thunk_need_prefix): Likewise.
4053 (print_reg): Likewise.
4054 (ix86_print_operand): Likewise.
4055 (ix86_expand_call): Likewise.
4056 (ix86_output_function_return): Likewise.
4057 (reg_encoded_number): Likewise.
4058 (BDESC_VERIFYS): Likewise.
4059 (ix86_init_mpx_builtins): Likewise.
4060 (ix86_init_builtins): Likewise.
4061 (ix86_emit_cmove): Likewise.
4062 (ix86_emit_move_max): Likewise.
4063 (ix86_expand_builtin): Likewise.
4064 (ix86_builtin_mpx_function): Likewise.
4065 (ix86_get_arg_address_for_bt): Likewise.
4066 (ix86_load_bounds): Likewise.
4067 (ix86_store_bounds): Likewise.
4068 (ix86_load_returned_bounds): Likewise.
4069 (ix86_store_returned_bounds): Likewise.
4070 (ix86_class_likely_spilled_p): Likewise.
4071 (ix86_hard_regno_mode_ok): Likewise.
4072 (x86_order_regs_for_local_alloc): Likewise.
4073 (ix86_mitigate_rop): Likewise.
4074 (ix86_bnd_prefixed_insn_p): Likewise.
4075 (ix86_mpx_bound_mode): Likewise.
4076 (ix86_make_bounds_constant): Likewise.
4077 (ix86_initialize_bounds): Likewise.
4078 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
4079 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
4080 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
4081 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
4082 (TARGET_CHKP_BOUND_MODE): Likewise.
4083 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
4084 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
4085 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
4086 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
4087 * config/i386/i386.h (TARGET_MPX): Likewise.
4088 (TARGET_MPX_P): Likewise.
4089 (VALID_BND_REG_MODE): Likewise.
4090 (FIRST_BND_REG): Likewise.
4091 (LAST_BND_REG): Likewise.
4092 (enum reg_class): Likewise.
4093 (BND_REG_P): Likewise.
4094 (BND_REGNO_P): Likewise.
4095 (BNDmode): Likewise.
4096 (ADJUST_INSN_LENGTH): Likewise.
4097 * config/i386/i386.md: Likewise.
4098 * config/i386/i386.opt: Likewise.
4099 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
4100 (defined): Likewise.
4101 (LINK_MPX): Likewise.
4102 (MPX_SPEC): Likewise.
4103 (LIBMPX_SPEC): Likewise.
4104 (LIBMPXWRAPPERS_SPEC): Likewise.
4105 (CHKP_SPEC): Likewise.
4106 * config/i386/predicates.md: Likewise.
4107 * dbxout.c (dbxout_type): Likewise.
4108 * doc/extend.texi: Likewise.
4109 * doc/invoke.texi: Likewise.
4110 * doc/md.texi: Likewise.
4111 * doc/tm.texi: Likewise.
4112 * doc/tm.texi.in: Likewise.
4113 * dwarf2out.c (is_base_type): Likewise.
4114 (gen_formal_types_die): Likewise.
4115 (gen_subprogram_die): Likewise.
4116 (gen_type_die_with_usage): Likewise.
4117 (gen_decl_die): Likewise.
4118 (dwarf2out_late_global_decl): Likewise.
4119 * expr.c (expand_assignment): Likewise.
4120 (emit_storent_insn): Likewise.
4121 (store_expr_with_bounds): Likewise.
4122 (store_expr): Likewise.
4123 (expand_expr_real_1): Likewise.
4124 * expr.h (store_expr_with_bounds): Likewise.
4125 * function.c (use_register_for_decl): Likewise.
4126 (struct bounds_parm_data): Likewise.
4127 (assign_parms_augmented_arg_list): Likewise.
4128 (assign_parm_find_entry_rtl): Likewise.
4129 (assign_parm_is_stack_parm): Likewise.
4130 (assign_parm_load_bounds): Likewise.
4131 (assign_bounds): Likewise.
4132 (assign_parms): Likewise.
4133 (expand_function_start): Likewise.
4134 * gcc.c (CHKP_SPEC): Likewise.
4135 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
4136 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
4137 (wrestrict_dom_walker::check_call): Likewise.
4138 * gimple.c (gimple_build_call_from_tree): Likewise.
4139 * gimple.h (enum gf_mask): Likewise.
4140 (gimple_call_with_bounds_p): Likewise.
4141 (gimple_call_set_with_bounds): Likewise.
4142 * gimplify.c (gimplify_init_constructor): Likewise.
4143 * ipa-cp.c (initialize_node_lattices): Likewise.
4144 (propagate_constants_across_call): Likewise.
4145 (find_more_scalar_values_for_callers_subset): Likewise.
4146 * ipa-hsa.c (process_hsa_functions): Likewise.
4147 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
4148 * ipa-icf.c (sem_function::merge): Likewise.
4149 * ipa-inline.c (early_inliner): Likewise.
4150 * ipa-pure-const.c (warn_function_noreturn): Likewise.
4151 (warn_function_cold): Likewise.
4152 (propagate_pure_const): Likewise.
4153 * ipa-ref.h (enum GTY): Likewise.
4154 * ipa-split.c (find_retbnd): Likewise.
4155 (consider_split): Likewise.
4156 (split_function): Likewise.
4157 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4158 * ipa.c (walk_polymorphic_call_targets): Likewise.
4159 (symbol_table::remove_unreachable_nodes): Likewise.
4160 (process_references): Likewise.
4161 (cgraph_build_static_cdtor_1): Likewise.
4162 * lto-cgraph.c (lto_output_node): Likewise.
4163 (output_refs): Likewise.
4164 (compute_ltrans_boundary): Likewise.
4165 (input_overwrite_node): Likewise.
4166 (input_node): Likewise.
4167 (input_cgraph_1): Likewise.
4168 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
4169 * passes.c (pass_manager::execute_early_local_passes): Likewise.
4170 (class pass_chkp_instrumentation_passes): Likewise.
4171 (make_pass_chkp_instrumentation_passes): Likewise.
4172 * passes.def: Likewise.
4173 * rtl.h (struct GTY): Likewise.
4174 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
4175 * stor-layout.c (layout_type): Likewise.
4176 * symtab.c: Likewise.
4177 * target.def: Likewise.
4178 * targhooks.c (default_chkp_bound_type): Likewise.
4179 (default_chkp_bound_mode): Likewise.
4180 (default_builtin_chkp_function): Likewise.
4181 (default_chkp_function_value_bounds): Likewise.
4182 (default_chkp_make_bounds_constant): Likewise.
4183 (default_chkp_initialize_bounds): Likewise.
4184 * targhooks.h (default_chkp_bound_type): Likewise.
4185 (default_chkp_bound_mode): Likewise.
4186 (default_builtin_chkp_function): Likewise.
4187 (default_chkp_function_value_bounds): Likewise.
4188 (default_chkp_make_bounds_constant): Likewise.
4189 (default_chkp_initialize_bounds): Likewise.
4190 * toplev.c (compile_file): Likewise.
4191 (process_options): Likewise.
4192 * tree-core.h (DEF_BUILTIN): Likewise.
4193 (DEF_BUILTIN_CHKP): Likewise.
4194 * tree-inline.c (declare_return_variable): Likewise.
4195 (remap_gimple_stmt): Likewise.
4196 (copy_bb): Likewise.
4197 (initialize_inlined_parameters): Likewise.
4198 (expand_call_inline): Likewise.
4199 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
4200 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
4201 (make_pass_ipa_chkp_produce_thunks): Likewise.
4202 (make_pass_chkp): Likewise.
4203 (make_pass_chkp_opt): Likewise.
4204 (make_pass_chkp_instrumentation_passes): Likewise.
4205 * tree-pretty-print.c (dump_generic_node): Likewise.
4206 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
4207 * tree-ssa-dce.c (propagate_necessity): Likewise.
4208 (eliminate_unnecessary_stmts): Likewise.
4209 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
4210 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
4211 * tree-ssa-sccvn.h: Likewise.
4212 * tree-ssa-strlen.c (get_string_length): Likewise.
4213 (valid_builtin_call): Likewise.
4214 (adjust_last_stmt): Likewise.
4215 (handle_builtin_strchr): Likewise.
4216 (handle_builtin_strcpy): Likewise.
4217 (handle_builtin_stxncpy): Likewise.
4218 (handle_builtin_memcpy): Likewise.
4219 (handle_builtin_strcat): Likewise.
4220 (strlen_check_and_optimize_stmt): Likewise.
4221 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
4222 * tree-streamer-in.c: Likewise.
4223 * tree-streamer.c (record_common_node): Likewise.
4224 * tree.c (tree_code_size): Likewise.
4225 (wide_int_to_tree_1): Likewise.
4226 (type_contains_placeholder_1): Likewise.
4227 (build_common_tree_nodes): Likewise.
4228 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
4229 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
4230 (POINTER_BOUNDS_P): Likewise.
4231 (BOUNDED_TYPE_P): Likewise.
4232 (BOUNDED_P): Likewise.
4233 (CALL_WITH_BOUNDS_P): Likewise.
4234 (pointer_bounds_type_node): Likewise.
4235 * value-prof.c (gimple_ic): Likewise.
4236 * var-tracking.c (vt_add_function_parameters): Likewise.
4237 * varasm.c (make_decl_rtl): Likewise.
4238 (assemble_start_function): Likewise.
4239 (output_constant): Likewise.
4240 (maybe_assemble_visibility): Likewise.
4241 * varpool.c (ctor_for_folding): Likewise.
4242 * chkp-builtins.def: Remove.
4243 * ipa-chkp.c: Remove.
4244 * ipa-chkp.h: Remove.
4245 * rtl-chkp.c: Remove.
4246 * rtl-chkp.h: Remove.
4247 * tree-chkp-opt.c: Remove.
4248 * tree-chkp.c: Remove.
4249 * tree-chkp.h: Remove.
4251 2018-06-07 Carl Love <cel@us.ibm.com>
4253 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
4254 vextract_fp_from_shortl): Add BE support.
4256 2018-06-07 Paul Koning <ni1d@arrl.net>
4258 * compare-elim.c (try_merge_compare): Don't merge compare if
4259 address contains a side effect.
4260 (try_eliminate_compare): Likewise.
4262 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
4264 * config.gcc: Support "tremont".
4265 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
4266 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4268 * config/i386/i386.c (m_TREMONT): Define.
4269 (processor_target_table): Add "tremont".
4270 (PTA_TREMONT): Define.
4271 (ix86_lea_outperforms): Add TARGET_TREMONT.
4272 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
4273 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
4274 and M_INTEL_GOLDMONT_PLUS.
4275 (fold_builtin_cpu): Add "tremont".
4276 (ix86_add_stmt_cost): Add TARGET_TREMONT.
4277 (ix86_option_override_internal): Add "tremont".
4278 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
4279 (processor_type): Add PROCESSOR_TREMONT.
4280 * config/i386/x86-tune.def: Add m_TREMONT.
4281 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
4283 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4285 * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
4286 symbol defined for msp430i* devices to be lower case.
4288 gcc/testsuite/gcc.target/msp430/
4289 * msp430i-device-symbol.c: New test.
4290 * msp430f-device-symbol.c: New test.
4291 * msp430.h: New test header file.
4293 2018-06-07 Richard Biener <rguenther@suse.de>
4295 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
4296 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
4297 Properly wrap signed arithmetic if overflow wraps.
4299 2018-06-07 Jakub Jelinek <jakub@redhat.com>
4301 PR tree-optimization/69615
4302 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
4303 of a cast from a same precision integral SSA_NAME in a bb dominated
4304 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
4305 cast to utype if rhs2 has already a compatible type.
4307 2018-06-07 Richard Biener <rguenther@suse.de>
4309 PR tree-optimization/85935
4310 * graphite-scop-detection.c (find_params_in_bb): Analyze
4311 condition operands with respect to the correct loop. Assert
4312 the analysis doesn't fail.
4314 2018-06-04 Carl Love <cel@us.ibm.com>
4316 * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
4317 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
4318 as it is slightly cheaper.
4319 (first_match_or_eos_index_<mode>):
4320 Calculate index using natural element order.
4321 (first_match_index_<mode>):
4322 Calculate index using natural element order.
4323 (first_match_or_eos_index_<mode>):
4324 Calculate index using natural order.
4325 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
4326 for BE and LE modes.
4327 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
4328 P9V_BUILTIN_VCLZLSBB_V16QI.
4329 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
4332 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
4334 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
4335 indentation and line wrap for many prototypes. Add missing
4336 @smallexample directives around block of prototypes for vec_xl and
4339 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
4341 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
4342 track if we pass or return IEEE 128-bit floating point.
4343 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
4344 C++ mangling that is compatible with GCC 8.1.
4345 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
4346 (init_cumulative_args): Note if we pass or return IEEE 128-bit
4347 floating point types.
4348 (rs6000_function_arg_advance_1): Likewise.
4349 (rs6000_mangle_type): Optionally generate mangled names that match
4350 what GCC 8.1 generated for IEEE 128-bit floating point types.
4351 (rs6000_globalize_decl_name): If we have an external function that
4352 passes or returns IEEE 128-bit types, generate a weak reference
4353 from the mangled name used in GCC 8.1 to the current mangled
4355 (rs6000_init_builtins): Make __ibm128 use the long double type if
4356 long double is IBM extended double. Make __float128 use the long
4357 double type if long double is IEEE 128-bit.
4360 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
4361 macro for __ibm128 built-in functions.
4362 (PACK_IF): Add __ibm128 pack/unpack functions.
4363 (UNPACK_IF): Likewise.
4364 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
4365 enable long double built-in functions if long double is IEEE
4366 128-bit floating point.
4367 (rs6000_invalid_builtin): Update long double built-in function
4369 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
4370 functions, adjust the built-in function to use the long double
4371 built-in function if __ibm128 and long double are the same type.
4372 * doc/extend.texi (PowerPC builtins): Update documention for
4373 __builtin_{,un}pack_longdouble. Add documentation for
4374 __builtin_{,un}pack_ibm128.
4376 2018-06-06 Jim Wilson <jimw@sifive.com>
4378 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
4379 (struct machine_function): New field interrupt_mode.
4380 (riscv_handle_type_attribute): New function. Add forward declaration.
4381 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
4382 (riscv_expand_epilogue): Check interrupt_mode field.
4383 (riscv_set_current_function): Check interrupt attribute args and
4384 set interrupt_mode field.
4385 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
4386 (riscv_sret, riscv_uret): New.
4387 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
4388 new arguments to interrupt attribute.
4390 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
4393 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
4394 Don't handle -mcpu=power8 if -mpower9-vector is also used.
4396 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
4398 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
4399 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
4400 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
4401 several redundant entries.
4403 2018-06-06 David Malcolm <dmalcolm@redhat.com>
4405 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
4406 type from "rtx" to "rtx_insn *".
4407 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
4408 for local "call_insn", removing cast.
4409 (ix86_expand_call): Likewise, introducing a "call_insn" local.
4411 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
4413 PR tree-optimization/86066
4414 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
4415 for BIT_INSERT_EXPR stores.
4417 2018-06-06 Richard Biener <rguenther@suse.de>
4419 PR tree-optimization/86062
4420 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
4421 component refs ontop
4422 of to be offsetted base.
4424 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4426 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
4427 to be static and remove check on interrupt attribute name.
4429 gcc/testsuite/gcc.target/msp430/
4430 * function-attributes-4.c: New test.
4431 * static-interrupts.c: New test.
4433 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
4435 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
4436 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
4438 2018-06-05 Steve Ellcey <sellcey@cavium.com>
4441 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
4443 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
4444 Remove second argument, change how error is called.
4445 (aarch64_layout_arg): Remove second argument from
4446 aarch64_err_no_fpadvsimd call.
4447 (aarch64_init_cumulative_args): Ditto.
4448 (aarch64_gimplify_va_arg_expr): Ditto.
4449 * config/aarch64/aarch64.md (mov<mode>): Ditto.
4451 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
4453 * config/i386/i386.md (simple_return_indirect_internal): New expander.
4454 (*simple_return_indirect_internal<mode>): Rename from
4455 simple_return_indirect_internal. Use W mode iterator.
4456 (rstorssp): New expander.
4457 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
4458 (clrssbsy): New expander.
4459 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
4461 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
4463 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
4465 (cmse_check_pointed_object): Likewise.
4467 2018-06-05 Martin Liska <mliska@suse.cz>
4469 PR gcov-profile/47618
4470 * doc/invoke.texi: Document how -fprofile-dir format
4473 2018-06-05 Richard Biener <rguenther@suse.de>
4475 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
4476 removal pretend DOM info isn't available so we do not update
4477 it and only remove edges, not dominated blocks. Actually free
4478 DOM info in case we removed something. Remove unreachable blocks.
4479 (mfb_keep_latches): Work with either DOM info or marked backedges.
4480 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
4481 first. Mark backedges if DOM info isn't available.
4482 (Re-)compute DOM info after cleanup_control_flow_pre.
4484 2018-06-05 Richard Biener <rguenther@suse.de>
4486 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
4487 (locus_discrim_hasher::hash): Adjust.
4488 (locus_discrim_hasher::equal): Likewise.
4489 (next_discriminator_for_locus): Work on line directly.
4490 (same_line_p): Pass in expanded locus1 as well.
4491 (assign_discriminators): Avoid redundant location expansions.
4493 2018-06-05 Richard Biener <rguenther@suse.de>
4495 PR tree-optimization/86046
4496 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
4497 if required after clearing TREE_ADDRESSABLE.
4499 2018-06-05 Richard Biener <rguenther@suse.de>
4501 PR tree-optimization/86047
4502 * tree-ssa-loop.c (for_each_index): Glob handling of all
4503 decls and constants and really handle all of them.
4505 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4508 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
4509 qualifier_void_pointer and qualifier_const_void_pointer.
4510 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
4511 (arm_init_builtins): Handle the above.
4512 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
4513 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
4514 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
4517 2018-06-05 Martin Liska <mliska@suse.cz>
4519 * auto-profile.c (read_autofdo_file): Do not use
4520 gcov_ctr_summary struct.
4521 (afdo_callsite_hot_enough_for_early_inline): Likewise.
4522 * coverage.c (struct counts_entry): Likewise.
4523 (read_counts_file): Read just single summary entry.
4524 (get_coverage_counts): Use gcov_summary struct.
4525 * coverage.h (get_coverage_counts): Likewise.
4526 * gcov-dump.c (dump_working_sets): Likewise.
4527 (tag_summary): Dump just single summary.
4528 * gcov-io.c (gcov_write_summary): Write just histogram
4530 (gcov_read_summary): Read just single summary.
4531 (compute_working_sets): Use gcov_summary struct.
4532 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
4533 of GCOV_COUNTERS_SUMMABLE.
4534 (GCOV_COUNTERS_SUMMABLE): Remove.
4535 (GCOV_FIRST_VALUE_COUNTER): Replace with
4536 GCOV_COUNTER_V_INTERVAL.
4537 (struct gcov_ctr_summary): Remove.
4538 (struct gcov_summary): Directly use fields of former
4540 (compute_working_sets): Use gcov_summary struct.
4541 * gcov.c (read_count_file): Do not use ctrs fields.
4542 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
4544 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
4546 * profile.c: Likewise.
4547 * profile.h: Likewise.
4549 2018-06-05 Martin Liska <mliska@suse.cz>
4551 PR gcov-profile/84846
4552 * gcov.c (output_lines): Print working directory only
4553 in intermediate format.
4555 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
4557 * config/s390/s390-builtin-types.def: Add void function type.
4558 * config/s390/s390-builtins.def: Use the function type for the
4561 2018-06-04 Jim Wilson <jimw@sifive.com>
4563 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
4565 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
4566 and maybe_eh_return. Change regno to unsigned int. Use new args to
4567 handle EH_RETURN_DATA_REGNO registers properly.
4568 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
4569 (riscv_expand_epilogue): Update comment. Change argument name and
4570 type. Update code to use new name and type. Pass new args to
4571 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
4573 * config/riscv/riscv.md (NORMAL_RETURN): New.
4574 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
4575 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
4576 (eh_return): Call gen_eh_return_internal and emit barrier.
4577 (eh_return_internal): Call riscv_expand_epilogue.
4579 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
4581 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
4582 bit_insertion field and declare can_be_merged_into method.
4583 (merged_store_group::can_be_merged_into): New method.
4584 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
4585 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
4586 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
4588 2018-06-04 Richard Biener <rguenther@suse.de>
4590 PR tree-optimization/85955
4591 * builtins.c (fold_builtin_sincos): Convert pointers to
4592 destination to appropriate type before dereferencing.
4594 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
4596 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
4598 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
4600 * expr.c (expand_expr_real_1): Force the operand into memory if
4601 its TYPE_MODE is BLKmode and if there is no integer mode for
4602 the number of bits being extracted.
4604 2018-06-04 Jakub Jelinek <jakub@redhat.com>
4608 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
4609 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
4611 2018-06-04 Richard Biener <rguenther@suse.de>
4613 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
4614 (cleanup_tree_cfg_noloop): ... single caller. Do
4615 start_recording_case_labels later.
4617 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
4619 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
4620 to _IMMINTRIN_H_INCLUDED.
4621 * config/i386/pconfigintrin.h: Ditto.
4622 * config/i386/waitpkgintrin.h: Ditto.
4623 * config/i386/immintrin.h: Add includes for sgxintrin.h,
4624 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
4625 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
4626 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
4627 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
4628 waitpkgintrin.h and cldemoteintrin.h.
4630 2018-06-04 Richard Biener <rguenther@suse.de>
4632 PR tree-optimization/86038
4633 * tracer.c (find_best_successor): Check probability for
4634 being initialized, bail out if not.
4636 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
4639 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
4640 of bits to ignore when comparing architectures.
4642 2018-06-04 Jakub Jelinek <jakub@redhat.com>
4644 PR tree-optimization/69615
4645 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
4646 maximum or minimum of the type, try to merge it also as if
4647 range1 is + [-, x - 1] or + [x + 1, -].
4650 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
4652 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
4654 PR tree-optimization/86034
4655 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
4656 the unsigned bitfield type in a bit insertion sequence if it does not
4657 have a larger precision than the bitfield size.
4658 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
4660 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
4662 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
4664 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
4666 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
4667 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
4668 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
4669 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
4671 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
4673 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
4674 Disable -fdelete-null-pointer-checks for ELF toolchain.
4676 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
4677 Kito Cheng <kito.cheng@gmail.com>
4679 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
4680 (nds32le-*-*, nds32be-*-*): Integrate checking process.
4681 (nds32*-*-*): Add glibc and uclibc conditions.
4682 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
4683 (TARGET_EXCEPT_UNWIND_INFO): Define.
4684 * config/nds32/elf.h: New file.
4685 * config/nds32/linux.h: New file.
4686 * config/nds32/nds32-elf.opt: New file.
4687 * config/nds32/nds32-linux.opt: New file.
4688 * config/nds32/nds32-fp-as-gp.c
4689 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
4690 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
4692 (nds32_asm_file_end): Ditto.
4693 (nds32_print_operand): Ditto.
4694 (nds32_insert_attributes): Ditto.
4695 (nds32_init_libfuncs): New function.
4696 (TARGET_HAVE_TLS): Define.
4697 (TARGET_INIT_LIBFUNCS): Define.
4698 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
4700 (TARGET_ELF): Apply different mcmodel setting.
4701 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
4702 been migrated into elf.h and linux.h files.
4703 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
4704 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
4705 (mcmodel): The content has been migrated into nds32-elf.opt and
4706 nds32-linux.opt files.
4707 * config/nds32/t-elf: New file.
4708 * config/nds32/t-linux: New file.
4710 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
4711 Shiva Chen <shiva0217@gmail.com>
4713 * config/nds32/constants.md (unspec_volatile_element): Add
4714 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
4715 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
4717 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
4718 (make_pass_nds32_fp_as_gp): Declare.
4719 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
4721 (nds32_asm_function_end_prologue): Remove unused asm output.
4722 (nds32_asm_function_begin_epilogue): Remove unused asm output.
4723 (nds32_asm_file_start): Output necessary fp_as_gp information.
4724 (nds32_option_override): Adjust register usage.
4725 (nds32_expand_prologue): Consider fp_as_gp situation.
4726 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
4727 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
4730 (simple_return): Ditto.
4731 (omit_fp_begin): Output special directive for fp_as_gp.
4732 (omit_fp_end): Output special directive for fp_as_gp.
4733 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
4734 mforbid-fp-as-gp): New options.
4736 2018-06-01 Mark Wielaard <mark@klomp.org>
4738 * dwarf2out.c (dwarf2out_finish): Remove generation of
4739 DW_AT_loclists_base.
4741 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4743 * gimple-ssa-store-merging.c: Include gimple-fold.h.
4744 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
4745 (struct merged_store_group): Add bit_insertion field.
4746 (dump_char_array): Use standard hexadecimal format.
4747 (merged_store_group::merged_store_group): Set bit_insertion to false.
4748 (merged_store_group::apply_stores): Use optimal buffer size. Deal
4749 with BIT_INSERT_EXPR stores. Move up code updating the mask and
4750 also print the mask in the dump file.
4751 (pass_store_merging::gate): Minor tweak.
4752 (imm_store_chain_info::coalesce_immediate): Fix wrong association
4753 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
4754 stores with INTEGER_CST stores.
4755 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
4756 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
4757 and use it throughout. Generate bit insertion sequences if need be.
4758 (pass_store_merging::process_store): Remove redundant condition.
4759 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
4761 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
4763 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
4764 the 128-bit floating point types. Fix function comment.
4766 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4768 * config/aarch64/aarch64-simd.md
4769 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
4771 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
4774 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
4776 PR tree-optimization/85989
4777 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
4779 (backprop::intersect_uses): Check it when deciding whether this
4780 is a backedge reference.
4781 (backprop::process_block): Add each phi to m_visited_phis
4782 after visiting it, then clear it at the end.
4784 2018-06-01 Richard Biener <rguenther@suse.de>
4786 * tree-vectorizer.h (vect_dr_stmt): New function.
4787 (vect_get_load_cost): Adjust.
4788 (vect_get_store_cost): Likewise.
4789 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
4790 Use vect_dr_stmt instead of DR_SMTT.
4791 (vect_record_base_alignments): Likewise.
4792 (vect_calculate_target_alignment): Likewise.
4793 (vect_compute_data_ref_alignment): Likewise and make static.
4794 (vect_update_misalignment_for_peel): Likewise.
4795 (vect_verify_datarefs_alignment): Likewise.
4796 (vector_alignment_reachable_p): Likewise.
4797 (vect_get_data_access_cost): Likewise. Pass down
4798 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
4799 (vect_get_peeling_costs_all_drs): Likewise.
4800 (vect_peeling_hash_get_lowest_cost): Likewise.
4801 (vect_enhance_data_refs_alignment): Likewise.
4802 (vect_find_same_alignment_drs): Likewise.
4803 (vect_analyze_data_refs_alignment): Likewise.
4804 (vect_analyze_group_access_1): Likewise.
4805 (vect_analyze_group_access): Likewise.
4806 (vect_analyze_data_ref_access): Likewise.
4807 (vect_analyze_data_ref_accesses): Likewise.
4808 (vect_vfa_segment_size): Likewise.
4809 (vect_small_gap_p): Likewise.
4810 (vectorizable_with_step_bound_p): Likewise.
4811 (vect_prune_runtime_alias_test_list): Likewise.
4812 (vect_analyze_data_refs): Likewise.
4813 (vect_supportable_dr_alignment): Likewise.
4814 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4815 (vect_gen_prolog_loop_niters): Likewise.
4816 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4817 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
4819 (vect_recog_mask_conversion_pattern): Likewise.
4820 (vect_try_gather_scatter_pattern): Likewise.
4821 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
4822 to vect_get_store_cost.
4823 (vect_get_store_cost): Get stmt_info instead of DR.
4824 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
4825 (vect_get_load_cost): Get stmt_info instead of DR.
4827 2018-06-01 Richard Biener <rguenther@suse.de>
4830 * gimple-fold.c (var_decl_component_p): Also allow offsetted
4831 vars wrapped in MEM_REFs.
4833 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
4835 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4836 Fix subreg tests so that we only return a choice between
4837 GENERAL_REGS and FP_REGS if the original classes included both.
4839 2018-06-01 Richard Biener <rguenther@suse.de>
4842 * tree-ssa-structalias.c (get_function_part_constraint):
4843 Handle NULL fi->decl.
4844 (find_func_aliases_for_call): Properly handle indirect
4845 fi from direct call.
4846 (find_func_clobbers): Likewise.
4847 (ipa_pta_execute): Likewise.
4848 (create_variable_info_for): For functions that are ifunc_resolver
4849 resolve to a varinfo that contains the result of the resolver call.
4850 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
4853 2018-05-31 Michael Collison <michael.collison@arm.com>
4855 * config/aarch64/aarch64.md:
4856 (*fix_to_zero_extenddfdi2): New pattern.
4857 * gcc.target/aarch64/fix_extend1.c: New testcase.
4859 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
4863 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
4864 and BUILT_IN_STRNCMP_EQ.
4865 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
4866 BUILT_IN_STRNCMP_EQ.
4867 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
4868 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4869 (gimple_fold_builtin): Likewise.
4870 * tree-ssa-strlen.c (compute_string_length): New function.
4871 (determine_min_obsize): New function.
4872 (handle_builtin_string_cmp): New function to handle calls to
4873 string compare functions.
4874 (strlen_optimize_stmt): Add handling to builtin string compare
4876 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
4877 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4878 * tree.c (build_common_builtin_nodes): Add new defines of
4879 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
4881 2018-05-31 Jakub Jelinek <jakub@redhat.com>
4884 * bb-reorder.c (pass_partition_blocks::gate): Return false for
4885 functions with naked attribute.
4887 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4889 * config/i386/sse.md (avx_vec_concat<mode>):
4890 Substitute concat_tg_mode mode attribute with xtg_mode.
4891 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
4892 (concat_tg_mode): Remove mode attribute.
4894 2018-05-31 Martin Sebor <msebor@redhat.com>
4897 * calls.c (alloc_max_size): Correct a logic error/typo.
4898 Treat excessive arguments as infinite. Warn for invalid arguments.
4899 * doc/invoke.texi (-Walloc-size-larger-than): Update.
4901 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
4904 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
4905 and movx for Haswell.
4907 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
4908 Cesar Philippidis <cesar@codesourcery.com>
4911 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
4912 when emitting error on private/firstprivate reductions.
4913 * omp-low.c (lower_omp_target): Avoid reference-type processing
4914 on pointers for firstprivate clause.
4916 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4918 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
4921 * config/aarch64/aarch64-simd.md
4922 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
4923 (aarch64_ld1_x3_<mode>): Likewise
4924 (aarch64_st1x2<VALLDIF:mode>): Likewise
4925 (aarch64_st1_x2_<mode>): Likewise
4926 (aarch64_st1x3<VALLDIF:mode>): Likewise
4927 (aarch64_st1_x3_<mode>): Likewise
4928 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
4929 (vld1_s8_x3): Likewise.
4930 (vld1_u16_x3): Likewise.
4931 (vld1_s16_x3): Likewise.
4932 (vld1_u32_x3): Likewise.
4933 (vld1_s32_x3): Likewise.
4934 (vld1_u64_x3): Likewise.
4935 (vld1_s64_x3): Likewise.
4936 (vld1_f16_x3): Likewise.
4937 (vld1_f32_x3): Likewise.
4938 (vld1_f64_x3): Likewise.
4939 (vld1_p8_x3): Likewise.
4940 (vld1_p16_x3): Likewise.
4941 (vld1_p64_x3): Likewise.
4942 (vld1q_u8_x3): Likewise.
4943 (vld1q_s8_x3): Likewise.
4944 (vld1q_u16_x3): Likewise.
4945 (vld1q_s16_x3): Likewise.
4946 (vld1q_u32_x3): Likewise.
4947 (vld1q_s32_x3): Likewise.
4948 (vld1q_u64_x3): Likewise.
4949 (vld1q_s64_x3): Likewise.
4950 (vld1q_f16_x3): Likewise.
4951 (vld1q_f32_x3): Likewise.
4952 (vld1q_f64_x3): Likewise.
4953 (vld1q_p8_x3): Likewise.
4954 (vld1q_p16_x3): Likewise.
4955 (vld1q_p64_x3): Likewise.
4956 (vst1_s64_x2): Likewise.
4957 (vst1_u64_x2): Likewise.
4958 (vst1_f64_x2): Likewise.
4959 (vst1_s8_x2): Likewise.
4960 (vst1_p8_x2): Likewise.
4961 (vst1_s16_x2): Likewise.
4962 (vst1_p16_x2): Likewise.
4963 (vst1_s32_x2): Likewise.
4964 (vst1_u8_x2): Likewise.
4965 (vst1_u16_x2): Likewise.
4966 (vst1_u32_x2): Likewise.
4967 (vst1_f16_x2): Likewise.
4968 (vst1_f32_x2): Likewise.
4969 (vst1_p64_x2): Likewise.
4970 (vst1q_s8_x2): Likewise.
4971 (vst1q_p8_x2): Likewise.
4972 (vst1q_s16_x2): Likewise.
4973 (vst1q_p16_x2): Likewise.
4974 (vst1q_s32_x2): Likewise.
4975 (vst1q_s64_x2): Likewise.
4976 (vst1q_u8_x2): Likewise.
4977 (vst1q_u16_x2): Likewise.
4978 (vst1q_u32_x2): Likewise.
4979 (vst1q_u64_x2): Likewise.
4980 (vst1q_f16_x2): Likewise.
4981 (vst1q_f32_x2): Likewise.
4982 (vst1q_f64_x2): Likewise.
4983 (vst1q_p64_x2): Likewise.
4984 (vst1_s64_x3): Likewise.
4985 (vst1_u64_x3): Likewise.
4986 (vst1_f64_x3): Likewise.
4987 (vst1_s8_x3): Likewise.
4988 (vst1_p8_x3): Likewise.
4989 (vst1_s16_x3): Likewise.
4990 (vst1_p16_x3): Likewise.
4991 (vst1_s32_x3): Likewise.
4992 (vst1_u8_x3): Likewise.
4993 (vst1_u16_x3): Likewise.
4994 (vst1_u32_x3): Likewise.
4995 (vst1_f16_x3): Likewise.
4996 (vst1_f32_x3): Likewise.
4997 (vst1_p64_x3): Likewise.
4998 (vst1q_s8_x3): Likewise.
4999 (vst1q_p8_x3): Likewise.
5000 (vst1q_s16_x3): Likewise.
5001 (vst1q_p16_x3): Likewise.
5002 (vst1q_s32_x3): Likewise.
5003 (vst1q_s64_x3): Likewise.
5004 (vst1q_u8_x3): Likewise.
5005 (vst1q_u16_x3): Likewise.
5006 (vst1q_u32_x3): Likewise.
5007 (vst1q_u64_x3): Likewise.
5008 (vst1q_f16_x3): Likewise.
5009 (vst1q_f32_x3): Likewise.
5010 (vst1q_f64_x3): Likewise.
5011 (vst1q_p64_x3): Likewise.
5013 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5015 * config/msp430/msp430.c (msp430_output_labelref): Prepend
5016 user_label_prefix to name.
5018 * tree-core.h: Update comment about the format of NAME string
5019 passed to handler in attribute_spec.
5021 * config/msp430/msp430.md: Remove erroneous subreg expression from
5022 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
5023 zero_extend{q,h}isi2.
5025 2018-05-30 Borislav Petkov <bp@suse.de>
5027 * doc/extend.texi: Document some architecture specific
5028 constraints and sort entries.
5030 2018-05-30 Martin Sebor <msebor@redhat.com>
5033 * builtins.c (expand_builtin_stpcpy_1): New function.
5034 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
5035 only if the former succeeds.
5037 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5039 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
5042 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5044 * doc/invoke.texi (-flinker-output): Document
5046 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5048 * passes.c (ipa_write_summaries): Only modify statements if body
5050 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
5051 incrementally linking.
5052 (ipa_passes): Likewise.
5053 * lto-cgraph.c (lto_output_node): When incrementally linking do not
5054 pass down resolution info.
5055 * common.opt (flag_incremental_link): Update info.
5056 * gcc.c (plugin specs): Turn flinker-output=* to
5057 -plugin-opt=-linker-output-known
5058 * toplev.c (compile_file): Also cut compilation when doing incremental
5060 * flag-types. (enum lto_partition_model): Add
5061 LTO_LINKER_OUTPUT_NOLTOREL.
5062 (invoke.texi): Add -flinker-output docs.
5063 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
5064 link same way as WPA; do not stream in dead initializers.
5066 * dwarf2out.c (dwarf2out_die_ref_for_decl,
5067 darf2out_register_external_decl): Support incremental link.
5069 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5071 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
5073 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5075 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
5076 it down to simple_object_copy_lto_debug_sections.
5077 (run_gcc): Determine incremental LTO link time and configure
5078 lto1 into non-wpa mode, disable renaming of debug sections.
5080 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
5082 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5083 descriptions of various incorrectly documented functions.
5085 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
5088 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5089 address check not strict.
5091 2018-05-30 Richard Biener <rguenther@suse.de>
5093 PR tree-optimization/85964
5094 * tracer.c (better_p): Drop initialized count check, we only
5095 call the function with initialized counts now.
5096 (find_best_successor): Do find a best edge if one
5097 has uninitialized count.
5098 (find_best_predecessor): Likewise. Do BB frequency check only
5099 if count is initialized.
5101 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
5103 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
5104 (aarch64_ldrstr_offset_compare): New.
5105 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
5106 load/store orderings.
5107 (aarch64_gen_adjusted_ldpstp): Likewise.
5109 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
5111 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5112 Check for subset of GENERAL_REGS and FP_REGS.
5113 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
5116 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
5118 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
5119 and wi::to_poly_offset. Add the current offset and then check
5120 whether the sum fits, rather than using an unchecked addition of
5121 a checked term. Check for a shwi rather than a uhwi.
5122 * expr.c (get_bit_range): Use tree_to_poly_uint64.
5123 (store_constructor): Use poly_int_tree_p.
5124 (expand_expr_real_1): Likewise.
5125 * function.c (assign_temp): Likewise.
5126 * fold-const.c (const_binop): Use poly_int_tree_p and
5128 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
5130 * ipa-icf-gimple.c (func_checker::compare_operand): Use
5131 to_poly_offset for MEM offsets.
5132 * ipa-icf.c (sem_variable::equals): Likewise.
5133 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
5134 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
5135 wi::to_poly_offset for BIT_FIELD_REF offsets.
5136 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
5138 * var-tracking.c (emit_note_insn_var_location): Use
5139 tree_to_poly_uint64.
5141 2018-05-29 Jim Wilson <jimw@sifive.com>
5143 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
5145 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
5148 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
5149 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
5151 (sse4_1_round<mode>2): Use nonimmediate_operand
5152 for operand 1 predicate.
5154 2018-05-29 Martin Sebor <msebor@redhat.com>
5155 Richard Biener <rguenther@suse.de>
5158 * calls.c (get_size_range): Call determine_value_range instead
5159 of get_value_range..
5160 * tree-vrp.h (determine_value_range): Declared new function.
5161 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
5163 2018-05-29 Richard Biener <rguenther@suse.de>
5165 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
5166 sure to use non-pattern stmts for get_earlier_stmt arguments.
5167 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
5168 called on pattern stmts.
5169 (get_later_stmt): Likewise.
5171 2018-05-29 Martin Liska <mliska@suse.cz>
5173 PR gcov-profile/85759
5174 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
5177 2018-05-29 Jakub Jelinek <jakub@redhat.com>
5179 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
5181 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
5185 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5186 VEC_PACK_FLOAT_EXPR): New tree codes.
5187 * tree-pretty-print.c (op_code_prio): Handle
5188 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5189 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5190 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5191 * tree-inline.c (estimate_operator_cost): Likewise.
5192 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
5193 * fold-const.c (const_binop): Likewise.
5194 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
5195 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5196 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5197 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
5198 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5199 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5200 * expr.c (expand_expr_real_2): Likewise.
5201 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
5202 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
5203 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
5205 * optabs.c (expand_widen_pattern_expr): For
5206 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
5207 sign from result type rather than operand's type.
5208 (expand_binop_directly): For vec_packu_float_optab and
5209 vec_packs_float_optab allow result type to be different from operand's
5211 * optabs-tree.c (optab_for_tree_code): Handle
5212 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5213 VEC_PACK_FLOAT_EXPR. Formatting fixes.
5214 * tree-vect-generic.c (expand_vector_operations_1): Handle
5215 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5216 VEC_PACK_FLOAT_EXPR.
5217 * tree-vect-stmts.c (supportable_widening_operation): Handle
5219 (supportable_narrowing_operation): Handle FLOAT_EXPR.
5220 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
5221 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
5222 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
5223 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
5225 (vec_pack<floatprefix>_float_<mode>): New expander.
5226 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
5228 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
5229 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
5230 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
5231 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
5232 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
5234 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
5235 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
5236 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5237 VEC_PACK_FLOAT_EXPR): Document.
5239 2018-05-29 Richard Biener <rguenther@suse.de>
5241 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
5243 (stmt_vec_info_vec): Make pointer.
5244 (init_stmt_vec_info_vec): Remove.
5245 (free_stmt_vec_info_vec): Likewise.
5246 (set_stmt_vec_info_vec): New function.
5247 (free_stmt_vec_infos): Likewise.
5248 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
5249 (set_vinfo_for_stmt): Likewise.
5250 (get_earlier_stmt): Likewise.
5251 (get_later_stmt): Likewise.
5252 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
5253 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
5254 (vec_info::~vec_info): Free stmt_vec_infos.
5255 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
5256 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
5257 (pass_slp_vectorize::execute): Likewise.
5258 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
5259 (free_stmt_vec_info_vec): Likewise.
5260 (set_stmt_vec_info_vec): New function.
5261 (free_stmt_vec_infos): Likewise.
5262 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
5263 the global stmt_vec_info_vec.
5264 * tree-parloops.c (gather_scalar_reductions): Use
5265 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
5268 2018-05-29 Richard Biener <rguenther@suse.de>
5270 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
5272 2018-05-29 Martin Liska <mliska@suse.cz>
5273 David Malcolm <dmalcolm@redhat.com>
5275 * vec.c (test_reverse): New.
5276 (vec_c_tests): Add new test.
5277 * vec.h (vl_ptr>::reverse): New function.
5279 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
5281 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
5283 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
5286 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5288 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
5290 2018-05-28 Richard Biener <rguenther@suse.de>
5292 PR tree-optimization/85933
5293 * tree-vect-data-refs.c (vect_record_base_alignments): Only
5294 look at stmts marked as vectorizable.
5296 2018-05-28 Richard Biener <rguenther@suse.de>
5298 PR tree-optimization/85934
5299 * tree-vect-generic.c (expand_vector_operations_1): Hoist
5300 vector boolean check before scalar optimization.
5302 2018-05-28 Jakub Jelinek <jakub@redhat.com>
5304 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
5307 2018-05-28 Mark Wielaard <mark@klomp.org>
5309 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
5310 if it is an expression containing a minus sign.
5312 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
5314 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
5316 2018-05-27 Paul Koning <ni1d@arrl.net>
5318 * config/pdp11/pdp11.md (truncsihi2): Remove.
5320 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
5321 Chung-Ju Wu <jasonwucj@gmail.com>
5323 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
5325 (unaligned_store_dw): Ditto.
5326 * config/nds32/nds32-memory-manipulation.c
5327 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
5328 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
5329 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
5330 (emit_setmem_word_loop): Rename to ...
5331 (emit_setmem_doubleword_loop): ... this.
5332 (nds32_gen_dup_4_byte_to_word_value): New function.
5333 (nds32_gen_dup_8_byte_to_double_word_value): New function.
5334 (nds32_expand_setmem_loop): Refine implementation.
5335 (nds32_expand_setmem_loop_v3m): Ditto.
5336 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
5339 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
5341 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
5343 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
5345 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
5346 (nds32_init_machine_status): Initialize machine->attr_naked_p and
5347 machine->attr_no_prologue_p.
5348 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
5349 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
5350 (nds32_expand_epilogue): Consider attr_naked_p.
5351 (nds32_expand_epilogue_v3pop): Likewise.
5352 (nds32_can_use_return_insn): Likewise.
5353 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
5354 attr_no_prologue_p fields.
5355 * config/nds32/nds32.opt (mret-in-naked-func): New option.
5357 2018-05-27 Jakub Jelinek <jakub@redhat.com>
5360 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
5362 * config/i386/sse.md
5363 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
5365 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
5367 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
5369 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
5371 (*<floatsuffix>floatv2div2sf2): Rename to ...
5372 (*float<floatunssuffix>v2div2sf2): ... this.
5373 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
5374 (float<floatunssuffix>v2div2sf2_mask): ... this.
5375 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
5376 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
5377 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
5379 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
5381 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5383 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5385 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5387 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5389 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
5390 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
5391 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
5392 gen_ufix_truncv8dfv8si2.
5393 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
5394 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
5395 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
5396 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
5397 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
5398 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
5399 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
5400 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
5402 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
5406 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
5408 2018-05-25 Jim Wilson <jimw@sifive.com>
5410 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
5411 * config/riscv/riscv.c (struct machine_function): Add
5412 interrupt_handler_p and attribute_checked_p fields.
5413 (riscv_attribute_table): Add interrupt.
5414 (riscv_interrupt_type_p): New.
5415 (riscv_save_reg_p): Save extra regs for interrupt handler.
5416 (riscv_use_save_libcall): Return false for interrupt handler.
5417 (riscv_first_stack_step): Add forward declaration.
5418 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
5419 for interrupt handler with large frame. Use it for saved reg list.
5420 (riscv_expand_prologue): Move flag_stack_usage_info support to
5421 eliminate duplication.
5422 (riscv_expand_epilogue): Generate mret for interrupt handler.
5423 (riscv_epilogue_uses): New.
5424 (riscv_can_use_return_insn): Return false for interrupt handler.
5425 (riscv_function_ok_for_sibcall): Likewise.
5426 (riscv_set_current_function): Add interrupt handler support.
5427 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
5428 * config/riscv/riscv.md (UNSPECV_MRET): New.
5430 (riscv_frflags, riscv_fsflags): Use tab after opcode.
5432 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
5434 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
5436 PR tree-optimization/85712
5437 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
5438 this candidate has already been replaced in-situ by a copy.
5440 2018-05-25 Jason Merrill <jason@redhat.com>
5442 PR c++/80485 - inline function non-zero address.
5443 * symtab.c (nonzero_address): Check DECL_COMDAT.
5445 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
5448 * config/alpha/alpha.md (ashlsi3): New insn pattern.
5449 (*ashlsi_se): Rename from *ashldi_se. Define as sign
5450 extension of SImode operation. Use const123_operand predicate.
5451 (*saddsi_1): Remove.
5452 (*saddl_se_1): Ditto.
5454 (*ssubl_se_1): Ditto.
5455 * config/alpha/predicates.md (const123_operand): New predicate.
5456 * config/alpha/constraints.md (P): Use IN_RANGE.
5458 2018-05-25 Richard Biener <rguenther@suse.de>
5460 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
5462 (ref_maybe_used_by_stmt_p): Likewise.
5463 (stmt_may_clobber_ref_p): Likewise.
5464 (stmt_may_clobber_ref_p_1): Likewise.
5465 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
5467 (ref_maybe_used_by_stmt_p): Likewise.
5468 (stmt_may_clobber_ref_p): Likewise.
5469 (stmt_may_clobber_ref_p_1): Likewise.
5470 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
5471 the alias oracle to disambiguate DRs with stmts DR analysis
5473 (vect_analyze_data_refs): Do not give up on not analyzable
5474 DRs for BB vectorization. Remove code truncating the dataref
5477 2018-05-25 Jakub Jelinek <jakub@redhat.com>
5480 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5481 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
5482 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
5484 2018-05-25 Richard Biener <rguenther@suse.de>
5486 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
5487 function, combining stmt data ref gathering and fatal analysis
5489 (vect_analyze_data_refs): Remove now redudnant code and simplify.
5490 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
5491 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
5492 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
5493 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
5495 2018-05-25 Bin Cheng <bin.cheng@arm.com>
5497 PR tree-optimization/85720
5498 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
5499 SCC if all partitions are builtins.
5500 (version_loop_by_alias_check): New parameter. Generate cancelable
5501 runtime alias check if all partitions are builtins.
5502 (distribute_loop): Update call to above function.
5504 2018-05-25 Bin Cheng <bin.cheng@arm.com>
5506 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
5507 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
5508 (parm_default_def_partition_arg): Ditto.
5509 (set_parm_default_def_partition): Ditto.
5510 (get_parm_default_def_partitions): Ditto and make it static.
5511 (get_undefined_value_partitions): Ditto and make it static.
5512 (remove_ssa_form): Refactor call to init_var_map here.
5513 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
5514 computation for loop region.
5515 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
5516 (register_default_def): Delete.
5517 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
5518 (parm_default_def_partition_arg): Ditto.
5519 (set_parm_default_def_partition): Ditto.
5520 (get_parm_default_def_partitions): Ditto and make it static.
5521 (get_undefined_value_partitions): Ditto and make it static.
5522 (coalesce_with_default, coalesce_with_default): Update comment.
5523 (create_coalesce_list_for_region): New func factored out from
5524 create_outofssa_var_map.
5525 (populate_coalesce_list_for_outofssa): New func factored out from
5526 create_outofssa_var_map and coalesce_ssa_name.
5527 (create_outofssa_var_map): Delete.
5528 (coalesce_ssa_name): Refactor to support live range computation.
5529 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
5530 (get_parm_default_def_partitions): Delete.
5531 (get_undefined_value_partitions): Ditto.
5532 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
5533 computation for loop region.
5534 (new_tree_live_info, loe_visit_block): Ditto.
5535 (live_worklist, set_var_live_on_entry): Ditto.
5536 (calculate_live_on_exit, verify_live_on_entry): Ditto.
5537 * tree-ssa-live.h (struct _var_map): New fields.
5538 (init_var_map): Change decl.
5539 (region_contains_p): New.
5541 2018-05-25 Bin Cheng <bin.cheng@arm.com>
5543 * tree-ssa-live.h (live_merge_and_clear): Delete.
5545 2018-05-25 Richard Biener <rguenther@suse.de>
5548 * tree-dump.c (dequeue_and_dump): Remove access to removed
5549 operand 2 of a SWITCH_EXPR.
5551 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5553 * doc/sourcebuild.texi (vect_double_cond_arith): Include
5554 multiplication and division.
5555 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
5556 (cond_udiv@var{m}, cond_umod@var{m}): Document.
5557 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
5558 (cond_udiv_optab, cond_umod_optab): New optabs.
5559 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
5560 (IFN_COND_RDIV): New internal functions.
5561 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
5562 TRUNC_MOD_EXPR and RDIV_EXPR.
5563 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
5564 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
5566 (SVE_INT_BINARY): Include mult.
5567 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
5568 (optab, sve_int_op): Handle mult.
5569 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
5571 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
5572 for SVE_INT_BINARY_SD.
5574 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5576 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
5577 (optab, sve_int_op): Handle div and udiv.
5578 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
5579 for SVE_INT_BINARY_SD.
5580 (*<optab><mode>3): New insn for the same.
5582 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5584 * tree-vect-patterns.c: Include predict.h.
5585 (vect_recog_divmod_pattern): Restrict check for division support
5586 to when optimizing for size.
5588 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5590 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
5591 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
5592 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
5593 (gimple_match_op::set_op): Likewise.
5594 (gimple_resimplify4): Declare.
5595 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
5596 (expr::gen_transform): Likewise.
5597 (decision_tree::gen): Generate a simplification routine for 4 operands.
5598 * gimple-match-head.c (gimple_simplify): Add an overload for
5599 4 operands. In the top-level function, handle up to 4 call
5600 arguments and call gimple_resimplify4.
5601 (gimple_resimplify4): New function.
5602 (build_call_internal): Pass a fourth operand.
5603 (maybe_push_to_seq): Likewise.
5604 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
5605 Fold VEC_COND_EXPRs of an operation and a default value into
5606 an IFN_COND_* function if possible.
5607 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
5609 (SVE_COND_FP_BINARY): Include them.
5610 (optab, sve_fp_op): Handle them.
5611 (SVE_INT_BINARY_REV): New code iterator.
5612 (SVE_COND_FP_BINARY_REV): New int iterator.
5613 (commutative): New int attribute.
5614 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
5616 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
5618 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
5619 (*cond_<optab><mode>): New patterns for reversed operands.
5621 2018-05-25 Richard Biener <rguenther@suse.de>
5623 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
5624 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
5625 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
5626 (STMT_VINFO_GROUPED_ACCESS): Adjust.
5627 * tree-vect-data-refs.c (everywhere): Adjust users.
5628 * tree-vect-loop.c (everywhere): Likewise.
5629 * tree-vect-slp.c (everywhere): Likewise.
5630 * tree-vect-stmts.c (everywhere): Likewise.
5631 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5633 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5635 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
5637 (gcc_cv_as_section_exclude): ... this.
5638 Try Solaris as #exclude syntax.
5639 * configure: Regenerate.
5640 * config.in: Regenerate.
5641 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
5643 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
5644 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
5646 * varasm.c (default_elf_asm_named_section): Don't check if
5647 HAVE_GAS_SECTION_EXCLUDE is defined.
5649 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5651 * doc/md.texi: Update the documentation of the cond_* optabs
5652 to mention the new final operand. Fix GET_MODE_NUNITS call.
5653 Describe the scalar case too.
5654 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
5655 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
5657 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
5658 (get_conditional_internal_fn): Update comment.
5659 * tree-vect-loop.c (vectorizable_reduction): Pass the original
5660 accumulator value as a final argument to conditional functions.
5661 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
5662 a define_expand and add an "else" operand. Assert for now that
5663 the else operand is equal to operand 2. Use SVE_INT_BINARY and
5664 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
5665 (*cond_<optab><mode>): New patterns.
5666 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
5667 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
5668 (UNSPEC_COND_EOR): Delete.
5669 (optab): Remove associated mappings.
5670 (SVE_INT_BINARY): New code iterator.
5671 (sve_int_op): Remove int attribute and add "minus" to the code
5673 (SVE_COND_INT_OP): Delete.
5674 (SVE_COND_FP_OP): Rename to...
5675 (SVE_COND_FP_BINARY): ...this.
5677 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5679 * optabs.c (can_reuse_operands_p): New function.
5680 (maybe_legitimize_operands): Try to reuse the results for
5683 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
5685 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
5686 Add {q} suffix to insn mnemonic.
5688 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5690 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
5691 (msp430_warn_func_return): New.
5693 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
5695 * fold-const.c (tree_nonzero_bits): New function.
5696 * fold-const.h (tree_nonzero_bits): Likewise.
5697 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
5698 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
5700 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
5704 * varasm.c (assemble_alias): Check ifunc_resolver only on
5707 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
5710 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
5711 when memory input operand is handled.
5713 2018-05-24 Luis Machado <luis.machado@linaro.org>
5715 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
5717 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
5719 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
5721 * match.pd: Delay FMA folds until after vectorization.
5723 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
5726 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5727 address check not strict.
5729 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
5731 * gimple-match.h (gimple_match_op): New class.
5732 (mprts_hook): Replace parameters with a gimple_match_op *.
5733 (maybe_build_generic_op): Likewise.
5734 (gimple_simplified_result_is_gimple_val): Replace parameters with
5735 a const gimple_match_op *.
5736 (gimple_simplify): Replace code_helper * and tree * parameters with
5737 a gimple_match_op * parameter.
5738 (gimple_resimplify1): Replace code_helper *, tree and tree *
5739 parameters with a gimple_match_op * parameter.
5740 (gimple_resimplify2): Likewise.
5741 (gimple_resimplify3): Likewise.
5742 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
5743 parameters with a gimple_match_op * parameter.
5744 * gimple-match-head.c (gimple_simplify): Change prototypes of
5745 auto-generated functions to take a gimple_match_op * instead of
5746 separate code_helper * and tree * parameters. Make the same
5747 change in the top-level overload and update calls to the
5748 gimple_resimplify routines. Update calls to the auto-generated
5749 functions and to maybe_push_res_to_seq in the publicly-facing
5750 operation-specific gimple_simplify overloads.
5751 (gimple_match_op::MAX_NUM_OPS): Define.
5752 (gimple_resimplify1): Replace rcode and ops with a single res_op
5753 parameter. Update call to gimple_simplify.
5754 (gimple_resimplify2): Likewise.
5755 (gimple_resimplify3): Likewise.
5756 (mprts_hook): Replace parameters with a gimple_match_op *.
5757 (maybe_build_generic_op): Likewise.
5758 (build_call_internal): Replace type, nargs and ops with
5759 a gimple_match_op *.
5760 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
5761 with a single gimple_match_op *. Update calls to mprts_hook,
5762 build_call_internal and gimple_simplified_result_is_gimple_val.
5763 Factor out code that is common to the tree_code and combined_fn cases.
5764 * genmatch.c (expr::gen_transform): Replace tem_code and
5765 tem_ops with a gimple_match_op called tem_op. Update calls
5766 to the gimple_resimplify functions and maybe_push_res_to_seq.
5767 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
5768 res_ops. Update call to the gimple_resimplify functions.
5769 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
5770 (decision_tree::gen): Make the functions take a gimple_match_op *
5771 called res_op instead of separate res_code and res_ops parameters.
5772 Update call accordingly.
5773 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
5774 and ops with a single res_op parameter. Update calls to
5775 maybe_build_generic_op and maybe_push_res_to_seq.
5776 (fold_stmt_1): Update calls to gimple_simplify and
5777 replace_stmt_with_simplification.
5778 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
5779 and gimple_simplified_result_is_gimple_val.
5780 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
5782 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
5783 with a gimple_match_op *.
5784 (vn_nary_build_or_lookup): Likewise. Update call to
5785 vn_nary_build_or_lookup_1.
5786 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
5787 gimple_match_op *. Update calls to the gimple_resimplify routines
5788 and to gimple_simplified_result_is_gimple_val.
5789 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
5790 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
5791 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
5792 (visit_nary_op): Likewise.
5793 (visit_reference_op_load): Likewise.
5795 2018-05-23 Luis Machado <luis.machado@linaro.org>
5797 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
5798 modifier for printing the step amount.
5800 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
5803 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
5806 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
5808 * doc/sourcebuild.texi (Endianness): New subsubsection.
5810 2018-05-23 Luis Machado <luis.machado@linaro.org>
5812 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5813 <prefetch_dynamic_strides>: New const bool field.
5814 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5815 prefetch_dynamic_strides.
5816 (exynosm1_prefetch_tune): Likewise.
5817 (thunderxt88_prefetch_tune): Likewise.
5818 (thunderx_prefetch_tune): Likewise.
5819 (thunderx2t99_prefetch_tune): Likewise.
5820 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
5822 (aarch64_override_options_internal): Update to set
5823 PARAM_PREFETCH_DYNAMIC_STRIDES.
5824 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5825 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5826 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5827 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5828 prefetch-dynamic-strides setting.
5830 2018-05-23 Luis Machado <luis.machado@linaro.org>
5832 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5833 <minimum_stride>: New const int field.
5834 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5835 minimum_stride field defaulting to -1.
5836 (exynosm1_prefetch_tune): Likewise.
5837 (thunderxt88_prefetch_tune): Likewise.
5838 (thunderx_prefetch_tune): Likewise.
5839 (thunderx2t99_prefetch_tune): Likewise.
5840 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
5841 <default_opt_level>: Set to 3.
5842 (aarch64_override_options_internal): Update to set
5843 PARAM_PREFETCH_MINIMUM_STRIDE.
5844 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5845 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5846 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5847 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5848 stride is constant and is below the minimum stride threshold.
5850 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5852 * config/arm/arm-cpus.in (mode26): Delete.
5853 (armv4): Delete mode26 reference.
5854 * config/arm/arm.c (arm_configure_build_target): Delete use of
5857 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
5859 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
5861 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
5862 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
5864 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
5865 (floatunsdidf2): Ditto.
5867 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
5869 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
5870 (fixuns_trunc<mode>si2_avx512f): Ditto.
5871 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
5872 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
5873 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
5875 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
5877 PR rtl-optimization/79985
5878 * df-scan.c (df_insn_refs_collect): Remove special case for
5879 global registers and asm statements.
5881 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
5883 * extend.texi (Global Register Variables): Rewrite the bullet list.
5884 Note that the register is available for allocation. Note that access
5885 via inline asm must use constraints. Add note about async-signal
5886 handlers. Remove paragraph about automagic register selection.
5888 2018-05-23 Richard Biener <rguenther@suse.de>
5890 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
5891 of fixed offset from memset VN.
5893 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
5895 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
5897 (alloc_cand_and_find_basis): Initialize first_interp field.
5898 (slsr_process_mul): Modify first_interp field.
5899 (slsr_process_add): Likewise.
5900 (slsr_process_cast): Modify first_interp field for each new
5902 (slsr_process_copy): Likewise.
5903 (dump_candidate): Dump first_interp field.
5904 (replace_mult_candidate): Process all interpretations, not just
5906 (replace_rhs_if_not_dup): Likewise.
5907 (replace_one_candidate): Likewise.
5909 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
5911 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
5913 (aarch64_needs_frame_chain): New function.
5914 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
5916 2018-05-23 Sudakshina Das <sudi.das@arm.com>
5919 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
5920 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
5921 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
5922 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
5923 as true for strict-align.
5924 (aarch64_can_inline_p): Perform checks even when callee has no
5925 attributes to check for strict alignment.
5926 * doc/extend.texi (AArch64 Function Attributes): Document
5928 * doc/invoke.texi: (AArch64 Options): Likewise.
5930 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
5932 PR tree-optimization/85853
5933 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
5934 the handling of the root of the node to...
5935 (vect_slp_analyze_node_operations_1): ...this new function,
5936 and run the whole thing with the child nodes' def types
5937 set according to their SLP node's def type.
5939 2018-05-23 Richard Biener <rguenther@suse.de>
5942 * tree-data-ref.c (create_runtime_alias_checks): Defer
5943 and ignore overflow warnings.
5945 2018-05-23 Yury Gribov <tetra2005@gmail.com>
5947 PR tree-optimization/85822
5948 * tree-vrp.c (is_masked_range_test): Fix handling of negative
5951 2018-05-23 Richard Biener <rguenther@suse.de>
5953 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5954 memset constants via native_interpret_expr.
5956 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
5959 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
5961 (cgraph_node::create_alias): Likewise.
5962 (cgraph_node::get_availability): Check ifunc_resolver instead
5963 of looking up ifunc attribute.
5964 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
5965 * varasm.c (do_assemble_alias): Likewise.
5966 (assemble_alias): Likewise.
5967 (default_binds_local_p_3): Likewise.
5968 * cgraph.h (cgraph_node): Add ifunc_resolver.
5969 (cgraph_node::only_called_directly_or_aliased_p): Return false
5971 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
5973 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
5974 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
5975 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
5976 instead of looking up ifunc attribute.
5978 2018-05-22 Luis Machado <luis.machado@linaro.org>
5980 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
5982 2018-05-22 Martin Sebor <msebor@redhat.com>
5985 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
5986 only when expasion succeeds.
5987 (expand_builtin_strcmp): Same.
5988 (expand_builtin_strncmp): Same.
5990 2018-05-22 Martin Sebor <msebor@redhat.com>
5992 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
5994 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
5995 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5997 * config/aarch64/aarch64-ldpstp.md: Replace uses of
5998 aarch64_mem_pair_operand with memory_operand and delete operand swapping
6000 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6001 Add check for legitimate_address.
6002 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
6003 (aarch64_swap_ldrstr_operands): New.
6004 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
6007 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6008 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6010 * config/aarch64/aarch64.md: New patterns to generate stp
6012 (store_pair_sw, store_pair_dw): New patterns to generate stp for
6013 single words and double words.
6014 (load_pair_sw, load_pair_dw): Likewise.
6015 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
6017 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
6019 * config/aarch64/aarch64-ldpstp.md: Modify peephole
6020 for different mode ldpstp and add peephole for merged zero stores.
6022 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6024 (aarch64_gen_store_pair): Rename calls to match new patterns.
6025 (aarch64_gen_load_pair): Rename calls to match new patterns.
6026 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
6027 (load_pair<DREG:mode><DREG2:mode>): ... This.
6028 (store_pair<mode>): Rename to...
6029 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
6030 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
6032 (V_INT_EQUIV): Handle SImode.
6033 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
6036 2018-05-22 Martin Sebor <msebor@redhat.com>
6039 * calls.c (maybe_warn_nonstring_arg): Use string length to set
6040 or ajust the presumed bound on an operation to avoid unnecessary
6043 2018-05-22 Martin Sebor <msebor@redhat.com>
6045 PR tree-optimization/85826
6046 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
6047 assuming that a DECL necesarily has a constant size.
6049 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
6052 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
6054 2018-05-22 Richard Biener <rguenther@suse.de>
6056 PR tree-optimization/85834
6057 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
6058 non-constant and non-zero memset arguments.
6060 2018-05-22 Martin Liska <mliska@suse.cz>
6063 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
6065 2018-05-22 Richard Biener <rguenther@suse.de>
6067 PR tree-optimization/85863
6068 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
6069 comparisons when vectype is specified.
6070 (vectorizable_condition): Do not specify vectype for
6071 vect_is_simple_cond when SLP vectorizing.
6073 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
6076 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
6077 define __ibm128 as long double.
6078 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
6079 as a distinct type when IEEE 128-bit support is enabled.
6080 (init_float128_ieee): Fix up conversions between IFmode and IEEE
6081 128-bit types to use the correct functions.
6082 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
6083 convert between 128-bit floating point types that have different
6084 modes but the same representation, instead of using gen_lowpart to
6086 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
6088 (IFKF_reg): New attributes to give the register constraints for
6090 (extend<mode>tf2_internal): New insns to mark an explicit
6091 conversion between 128-bit floating point types that have a
6092 different mode but share the same representation.
6094 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
6096 PR tree-optimization/85814
6097 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
6098 a null return from get_strinfo when unsharing the next
6099 strinfo in the chain.
6101 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6104 * varasm.c (weak_finish): Clean up weak_decls.
6106 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6108 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
6109 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
6110 UNSPEC_UADALP values.
6111 * config/aarch64/iterators.md (ABAL): New int iterator.
6114 (sur): Add mappings for the above.
6115 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
6117 (aarch64_<sur>abal<mode>_4): Likewise.
6118 (aarch64_<sur>adalp<mode>_3): Likewise.
6119 (<sur>sadv16qi): New define_expand.
6121 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
6123 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
6124 (*movdf_internal): Ditto.
6125 (*rcpsf2_sse): Ditto.
6126 (*rsqrtsf2_sse): Ditto.
6127 (*sqrt<mode>2_sse): Ditto.
6129 2018-05-21 Tamar Christina <tamar.christina@arm.com>
6131 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
6133 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
6134 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
6135 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
6136 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
6138 * config/aarch64/arm_neon.h: Likewise.
6139 * config/aarch64/iterators.md (VQ_I): New.
6141 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
6143 * config.gcc: Add arc/t-multilib-linux to tmake_file for
6145 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
6148 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
6150 * config/nds32/constraints.md (S): New constraint.
6151 * config/nds32/nds32.md (call_internal): Use constraint S.
6152 (call_value_internal): Likewise.
6153 (sibcall_internal): Likewise.
6154 (sibcall_value_internal): Likewise.
6156 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
6157 Chung-Ju Wu <jasonwucj@gmail.com>
6159 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
6162 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
6163 Chung-Ju Wu <jasonwucj@gmail.com>
6165 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
6166 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
6167 (nds32_rtx_costs_impl): Simplify.
6168 (nds32_address_cost_impl): Simplify.
6169 (nds32_init_rtx_costs): New function.
6170 (nds32_rtx_costs_speed_prefer): Likewise.
6171 (nds32_rtx_costs_size_prefer): Likewise.
6172 (nds32_address_cost_speed_prefer): Likewise.
6173 (nds32_address_cost_speed_fwprop): Likewise.
6174 (nds32_address_cost_size_prefer): Likewise.
6175 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
6176 * config/nds32/nds32.c (nds32_option_override): Use
6177 nds32_init_rtx_costs function.
6179 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
6181 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
6182 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
6183 (TARGET_PIPELINE_N8): Likewise.
6184 (TARGET_PIPELINE_N10): Likewise.
6185 (TARGET_PIPELINE_N13): Likewise.
6186 (TARGET_PIPELINE_GRAYWOLF): Likewise.
6188 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
6190 * config/nds32/nds32-fpu.md: Update copyright year.
6192 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6194 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
6196 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6198 * config/nds32/nds32.c
6199 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
6200 * config/nds32/nds32.opt (minline-asm-r15): New option.
6202 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6204 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
6206 * config/nds32/nds32.md (abssi2): New pattern.
6208 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
6210 * config/i386/i386.md (rex64namesuffix): New mode attribute.
6211 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
6212 Merge insn pattern from sse_cvtsi2ss<round_name> and
6213 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
6214 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
6215 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
6216 using SWI48 mode iterator.
6217 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
6218 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
6219 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
6220 pattern from sse_cvttss2si<round_saeonly_name>
6221 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
6222 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
6223 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
6224 using SWI48 mode iterator.
6225 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
6226 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
6227 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
6228 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
6229 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
6230 using SWI48 mode iterator.
6231 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
6232 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
6233 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
6234 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
6235 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
6236 SWI48 mode iterator.
6237 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
6238 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
6239 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
6240 pattern from sse_cvttsd2si<round_saeonly_name>
6241 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
6243 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6245 * config/nds32/nds32-md-auxiliary.c
6246 (nds32_valid_smw_lwm_base_p): Refine.
6247 (nds32_output_smw_single_word): Refine.
6248 (nds32_output_smw_double_word): New.
6249 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
6251 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6253 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
6254 (nds32_output_stack_pop): Refine.
6255 (nds32_expand_unaligned_load): Refine.
6256 (nds32_expand_unaligned_store): Refine.
6258 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6259 Chung-Ju Wu <jasonwucj@gmail.com>
6261 * config/nds32/constants.md: Add TP_REGNUM constant.
6262 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
6263 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
6265 * config/nds32/nds32-doubleword.md: Consider flag_pic.
6266 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
6267 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
6268 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
6269 and PIC code generation.
6270 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
6272 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
6274 * config/nds32/nds32.md: Support TLS and PIC.
6275 * config/nds32/nds32.c: Support TLS and PIC.
6276 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
6277 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
6280 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6282 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
6283 mode with E_ prefix.
6285 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6286 Chung-Ju Wu <jasonwucj@gmail.com>
6288 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
6289 * config/nds32/nds32-md-auxiliary.c
6290 (symbolic_reference_mentioned_p): New.
6291 (nds32_legitimize_ict_address): New.
6292 (nds32_expand_ict_move): New.
6293 (nds32_indirect_call_referenced_p): New.
6294 (nds32_symbol_binds_local_p): Delete.
6295 (nds32_long_call_p): Modify.
6296 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
6297 * config/nds32/nds32-protos.h
6298 (symbolic_reference_mentioned_p): Declare.
6299 (nds32_legitimize_ict_address): Declare.
6300 (nds32_expand_ict_move): Declare.
6301 (nds32_indirect_call_referenced_p): Declare.
6302 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
6303 (nds32_relax_group): Use nds32_ict_const_p as condition.
6304 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
6305 (nds32_asm_file_start): Output ict_model directive in asm code.
6306 (nds32_legitimate_address_p): Consider indirect call.
6307 (nds32_print_operand): Consider indirect call.
6308 (nds32_print_operand_address): Consider indirect call.
6309 (nds32_insert_attributes): Handle "indirect_call" attribute.
6310 (TARGET_LEGITIMATE_ADDRESS_P): Define.
6311 (TARGET_LEGITIMATE_CONSTANT_P): Define.
6312 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
6313 (TARGET_DELEGITIMIZE_ADDRESS): Define.
6314 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
6315 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
6316 (TARGET_ICT_MODEL_SMALL): Define.
6317 (TARGET_ICT_MODEL_LARGE): Define.
6318 * config/nds32/nds32.md (movsi): Consider ict model.
6319 (call, call_value): Consider ict model.
6320 (sibcall, sibcall_value): Consider ict model.
6321 * config/nds32/nds32.opt (mict-model): New option.
6322 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
6325 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
6326 Monk Chiang <sh.chiang04@gmail.com>
6327 Jim Wilson <jimw@sifive.com>
6329 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
6330 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
6331 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
6332 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
6333 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
6334 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
6335 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
6336 compute save_libcall_adjustment properly.
6337 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
6338 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
6339 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
6340 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
6341 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
6342 (ABI_SPEC): Handle mabi=ilp32e.
6343 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
6344 (RVE): Add RVE mask.
6345 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
6346 <-march>: Add rv32e as an example.
6348 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
6351 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
6352 (intra_create_variable_infos): Handle C++ constructors.
6354 2018-05-18 Martin Liska <mliska@suse.cz>
6356 * passes.def: Remove a redundant pass.
6358 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
6361 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
6363 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6365 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
6367 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
6369 (armv2, armv2a, armv3, armv3m): Delete architectures.
6370 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
6371 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
6372 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
6374 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
6375 (*mulsidi3adddi): Likewise.
6376 (mulsidi3): Likewise.
6377 (*mulsidi3_nov6): Likewise.
6378 (umulsidi3): Likewise.
6379 (umulsidi3_nov6): Likewise.
6380 (umaddsidi4): Likewise.
6381 (*umulsidi3adddi): Likewise.
6382 (smulsi3_highpart): Likewise.
6383 (*smulsi3_highpart_nov6): Likewise.
6384 (umulsi3_highpart): Likewise.
6385 (*umulsi3_highpart_nov6): Likewise.
6386 * config/arm/arm.h (arm_arch3m): Delete.
6387 * config/arm/arm.c (arm_arch3m): Delete.
6388 (arm_option_override_internal): Update armv3-related comment.
6389 (arm_configure_build_target): Delete use of isa_bit_mode32.
6390 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
6391 (arm_rtx_costs_internal): Delete check of arm_arch3m.
6392 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
6394 (mulusa3): Likewise.
6395 * config/arm/arm-protos.h (arm_arch3m): Delete.
6396 * config/arm/arm-tables.opt: Regenerate.
6397 * config/arm/arm-tune.md: Likewise.
6398 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
6399 deleted architectures.
6401 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6403 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
6404 (armv5t, armv5te): New features.
6405 (ARMv5, ARMv5e): Delete fgroups.
6406 (ARMv5t, ARMv5te): Adjust for above changes.
6408 (armv5, armv5e): Delete arches.
6409 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
6411 (*call_reg_arm): Likewise.
6412 (*call_value_reg_armv5): Likewise.
6413 (*call_value_reg_arm): Likewise.
6414 (*call_symbol): Likewise.
6415 (*call_value_symbol): Likewise.
6416 (*sibcall_insn): Likewise.
6417 (*sibcall_value_insn): Likewise.
6419 (prefetch): Likewise.
6420 (define_split and define_peephole2 dependent on arm_arch5):
6422 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
6424 (TARGET_ARM_QBIT): Likewise.
6425 (TARGET_DSP_MULTIPLY): Likewise.
6426 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
6427 (arm_arch5, arm_arch5e): Delete.
6428 (arm_arch5t, arm_arch5te): Declare.
6429 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
6430 (arm_arch5t): Declare.
6431 (arm_option_reconfigure_globals): Update for the above.
6432 (arm_options_perform_arch_sanity_checks): Update comment, replace
6433 use of arm_arch5 with arm_arch5t.
6434 (use_return_insn): Likewise.
6435 (arm_emit_call_insn): Likewise.
6436 (output_return_instruction): Likewise.
6437 (arm_final_prescan_insn): Likewise.
6438 (arm_coproc_builtin_available): Likewise.
6439 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
6440 arm_arch5e with arm_arch5t and arm_arch5te.
6441 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
6442 (arm_arch5t, arm_arch5te): Declare.
6443 * config/arm/arm-tables.opt: Regenerate.
6444 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
6445 * config/arm/t-multilib: Likewise.
6446 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
6447 instead of arm_arch5.
6448 (*call_reg_thumb1): Likewise.
6449 (*call_value_reg_thumb1_v5): Likewise.
6450 (*call_value_reg_thumb1): Likewise.
6451 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
6453 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
6455 2018-05-18 Martin Liska <mliska@suse.cz>
6457 PR gcov-profile/84846
6458 * doc/gcov.texi: Document -t option of gcov tool.
6460 2018-05-18 Martin Liska <mliska@suse.cz>
6462 PR gcov-profile/84846
6463 * gcov.c (print_usage): Add new -t option.
6464 (process_args): Handle the option.
6465 (generate_results): Use stdout as output when requested by
6468 2018-05-18 Martin Liska <mliska@suse.cz>
6470 PR gcov-profile/84846
6471 * coverage.c (coverage_init): Write PWD to .gcno file.
6472 * doc/gcov.texi: Document how working directory is printed.
6473 * gcov-dump.c (dump_gcov_file): Print PWD.
6474 * gcov.c (output_intermediate_file): Likewise.
6475 (read_graph_file): Read PWD string.
6476 (output_lines): Print PWD.
6478 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6481 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
6482 for retval and return false if all args to phi are zero.
6484 2018-05-18 Richard Biener <rguenther@suse.de>
6486 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
6488 (evrp_dom_walker::before_dom_children): Call it.
6490 2018-05-18 Richard Biener <rguenther@suse.de>
6492 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
6493 results when processing array refs with variable index.
6495 2018-05-18 Toon Moene <toon@moene.org>
6497 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
6498 directly after that of -floop-interchange. Indicate that both
6499 options are enabled by default when specifying -O3.
6501 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6503 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
6504 iterator. Delete separate integer-mode vec_set<mode> expander.
6505 (aarch64_simd_vec_setv2di): Delete.
6506 (vec_setv2di): Delete.
6507 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
6508 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
6509 the "w, r" alternative.
6511 2018-05-18 Martin Liska <mliska@suse.cz>
6513 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
6514 * tree-pass.h (make_pass_lower_switch_O0): New function.
6515 * tree-switch-conversion.c (node_has_low_bound): Remove.
6516 (node_has_high_bound): Likewise.
6517 (node_is_bounded): Likewise.
6518 (class pass_lower_switch): Make it a template type and create
6520 (pass_lower_switch::execute): Add template argument.
6521 (make_pass_lower_switch): New function.
6522 (make_pass_lower_switch_O0): New function.
6523 (do_jump_if_equal): Remove.
6524 (emit_case_nodes): Simplify to just handle all 3 cases and leave
6525 all the hard work to tree optimization passes.
6527 2018-05-18 Martin Liska <mliska@suse.cz>
6529 * dbgcnt.c (limit_low): Renamed from limit.
6530 (limit_high): New variable.
6531 (dbg_cnt_is_enabled): Check for upper limit.
6532 (dbg_cnt): Adjust dumping.
6533 (dbg_cnt_set_limit_by_index): Add new argument for high
6535 (dbg_cnt_set_limit_by_name): Likewise.
6536 (dbg_cnt_process_single_pair): Parse new format.
6537 (dbg_cnt_process_opt): Use strtok.
6538 (dbg_cnt_list_all_counters): Remove 'value' and add
6540 * doc/invoke.texi: Document changes.
6542 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
6544 * doc/sourcebuild.texi (scalar_all_fma): Document.
6545 * tree.def (FMA_EXPR): Delete.
6546 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
6547 * internal-fn.c (ternary_direct): New macro.
6548 (expand_ternary_optab_fn): Likewise.
6549 (direct_ternary_optab_supported_p): Likewise.
6550 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
6551 * builtins.c (fold_builtin_fma): Delete.
6552 (fold_builtin_3): Don't call it.
6553 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
6554 * expr.c (expand_expr_real_2): Likewise.
6555 * fold-const.c (operand_equal_p): Likewise.
6556 (fold_ternary_loc): Likewise.
6557 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
6558 * gimple.c (DEFTREECODE): Likewise.
6559 * gimplify.c (gimplify_expr): Likewise.
6560 * optabs-tree.c (optab_for_tree_code): Likewise.
6561 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
6562 * tree-eh.c (operation_could_trap_p): Likewise.
6563 (stmt_could_throw_1_p): Likewise.
6564 * tree-inline.c (estimate_operator_cost): Likewise.
6565 * tree-pretty-print.c (dump_generic_node): Likewise.
6566 (op_code_prio): Likewise.
6567 * tree-ssa-loop-im.c (stmt_cost): Likewise.
6568 * tree-ssa-operands.c (get_expr_operands): Likewise.
6569 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
6570 * fold-const-call.h (fold_fma): Delete.
6571 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
6572 CFN_FNMA and CFN_FNMS.
6574 * genmatch.c (combined_fn): New enum.
6575 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
6576 (commutative_op): New function.
6577 (commutate): Use it. Handle more than 2 operands.
6578 (dt_operand::gen_gimple_expr): Use commutative_op.
6579 (parser::parse_expr): Allow :c to be used with non-binary
6580 operators if the commutative operand is known.
6581 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
6582 CFN_FMS, CFN_FNMA and CFN_FNMS.
6583 (backprop::process_assign_use): Remove FMA_EXPR handling.
6584 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
6585 (gen_hsa_fma): New function.
6586 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
6587 IFN_FNMA and IFN_FNMS.
6588 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
6589 * gimple-fold.h (follow_all_ssa_edges): Declare.
6590 * gimple-fold.c (follow_all_ssa_edges): New function.
6591 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
6592 gimple_build interface and use follow_all_ssa_edges to fold the result.
6593 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
6594 instead of checking for optabs directly.
6595 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
6596 rather than FMA_EXPRs.
6597 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
6598 call to IFN_FMA instead of an FMA_EXPR.
6600 2018-05-17 Jim Wilson <jimw@sifive.com>
6602 * expr.c (do_tablejump): When converting index to Pmode, if we have a
6603 sign extended promoted subreg, and the range does not have the sign bit
6604 set, then do a sign extend.
6606 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
6607 test, check for sign extended subreg and/or constant operands, and
6608 do a sign extend in that case.
6610 2018-05-17 Steve Ellcey <sellcey@cavium.com>
6612 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
6613 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
6615 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
6616 Change logics_shift_reg to logics_shift_imm.
6617 (thunderx2t99_fp_loadpair_basic): Delete.
6618 (thunderx2t99_fp_storepair_basic): Delete.
6619 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
6620 (thunderx2t99_asimd_polynomial): Delete.
6621 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
6622 and neon_fp_mul_d_scalar_q.
6623 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
6624 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
6625 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
6626 (thunderx2t99_asimd_lut): Add missing tbl types.
6627 (thunderx2t99_asimd_ext): Delete.
6628 (thunderx2t99_asimd_load1_1_mult): Delete.
6629 (thunderx2t99_asimd_load1_2_mult): Delete.
6630 (thunderx2t99_asimd_load1_ldp): New.
6631 (thunderx2t99_asimd_load1): New.
6632 (thunderx2t99_asimd_load2): Add missing *load2* types.
6633 (thunderx2t99_asimd_load3): New.
6634 (thunderx2t99_asimd_load4): New.
6635 (thunderx2t99_asimd_store1_1_mult): Delete.
6636 (thunderx2t99_asimd_store1_2_mult): Delete.
6637 (thunderx2t99_asimd_store2_mult): Delete.
6638 (thunderx2t99_asimd_store2_onelane): Delete.
6639 (thunderx2t99_asimd_store_stp): New.
6640 (thunderx2t99_asimd_store1): New.
6641 (thunderx2t99_asimd_store2): New.
6642 (thunderx2t99_asimd_store3): New.
6643 (thunderx2t99_asimd_store4): New.
6645 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
6647 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
6648 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
6650 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
6651 Segher Boessenkool <segher@kernel.crashing.org>
6654 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
6657 2018-05-17 Richard Biener <rguenther@suse.de>
6659 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
6660 for pruning loop and prune defs feeding only already visited PHIs.
6662 2018-05-17 Richard Biener <rguenther@suse.de>
6664 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
6666 2018-05-17 Bin Cheng <bin.cheng@arm.com>
6667 Richard Biener <rguenther@suse.de>
6669 PR tree-optimization/85793
6670 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
6671 for VMAT_ELEMENTWISE.
6673 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
6675 * internal-fn.h (lookup_internal_fn): Declare
6676 * internal-fn.c (lookup_internal_fn): New function.
6677 * gimple.c (gimple_build_call_from_tree): Handle calls to
6679 * gimple-pretty-print.c (dump_gimple_call): Print "." before
6680 internal function names.
6681 * tree-pretty-print.c (dump_generic_node): Likewise.
6682 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
6684 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
6686 * gimple-fold.h (gimple_build): Make the function forms take
6687 combined_fn rather than built_in_function.
6688 (gimple_simplify): Likewise.
6689 * gimple-match-head.c (gimple_simplify): Likewise.
6690 * gimple-fold.c (gimple_build): Likewise.
6691 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
6692 rather than gimple_build_call_internal.
6693 (get_initial_defs_for_reduction): Likewise.
6694 (vect_create_epilog_for_reduction): Likewise.
6695 (vectorizable_live_operation): Likewise.
6697 2018-05-17 Martin Liska <mliska@suse.cz>
6699 * gimple-ssa-sprintf.c (format_directive): Do not use
6700 space in between 'G_' and '('.
6702 2018-05-17 Jakub Jelinek <jakub@redhat.com>
6705 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
6706 even if the mask is not all ones.
6709 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
6711 (ix86_gimple_fold_builtin): Likewise.
6714 * config/i386/i386.c: Include tree-vector-builder.h.
6715 (ix86_vector_shift_count): New function.
6716 (ix86_fold_builtin): Fold shift builtins by scalar count.
6717 (ix86_gimple_fold_builtin): Likewise.
6719 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
6720 _mm512_setzero): New intrinsics.
6722 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
6723 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6725 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
6726 code generation for cases where splatting a value is not useful.
6727 * simplify-rtx.c (simplify_ternary_operation): Simplify
6728 vec_merge across a vec_duplicate and a paradoxical subreg forming
6729 a vector mode to a vec_concat.
6731 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
6733 * config.gcc: Support "goldmont-plus".
6734 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6736 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6737 PROCESSOR_GOLDMONT_PLUS.
6738 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
6739 (processor_target_table): Add "goldmont-plus".
6740 (PTA_GOLDMONT_PLUS): Define.
6741 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
6742 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
6743 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
6744 (fold_builtin_cpu): Add "goldmont-plus".
6745 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
6746 (ix86_option_override_internal): Add "goldmont-plus".
6747 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
6748 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
6749 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
6750 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
6752 2018-05-17 Richard Biener <rguenther@suse.de>
6754 PR tree-optimization/85757
6755 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
6756 remove defs that only feed that PHI from further processing.
6758 2018-05-16 Jim Wilson <jimw@sifive.com>
6760 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
6762 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
6764 2018-05-16 Mark Wielaard <mark@klomp.org>
6766 * dwarf2out.c (count_index_strings): New function.
6767 (output_indirect_strings): Call count_index_strings and generate
6768 header for dwarf_version >= 5.
6770 2018-05-16 Mark Wielaard <mark@klomp.org>
6772 * dwarf2out.c (dwarf_FORM): New function.
6773 (set_indirect_string): Use dwarf_FORM.
6774 (reset_indirect_string): Likewise.
6775 (size_of_die): Likewise.
6776 (value_format): Likewise.
6777 (output_die): Likewise.
6778 (add_skeleton_AT_string): Likewise.
6779 (output_macinfo_op): Likewise.
6780 (index_string): Likewise.
6781 (output_index_string_offset): Likewise.
6782 (output_index_string): Likewise.
6783 (count_index_strings): Likewise.
6785 2018-05-16 Carl Love <cel@us.ibm.com>
6787 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
6788 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
6790 2018-05-16 Martin Jambor <mjambor@suse.cz>
6792 * ipa-prop.c (ipa_free_all_edge_args): Remove.
6793 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
6795 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
6797 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
6798 (fnma<mode>4): Likewise.
6799 (fms<mode>4): Likewise.
6800 (fnms<mode>4): Likewise.
6801 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
6802 (aarch64_fnma<mode>4): Likewise.
6803 (aarch64_fms<mode>4): Likewise.
6804 (aarch64_fnms<mode>4): Likewise.
6805 (aarch64_fnmadd<mode>4): Likewise.
6807 2018-05-16 Jason Merrill <jason@redhat.com>
6809 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
6811 2018-05-16 Richard Biener <rguenther@suse.de>
6813 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
6814 (dump_stmt_cost): Declare.
6815 (add_stmt_cost): Dump cost we add.
6816 (add_stmt_costs): New function.
6817 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
6819 (vect_analyze_stmt): Adjust prototype.
6820 (vectorizable_condition): Likewise.
6821 (vectorizable_live_operation): Likewise.
6822 (vectorizable_reduction): Likewise.
6823 (vectorizable_induction): Likewise.
6824 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
6825 cost vector to pass to vectorizable_ and record afterwards.
6826 (vect_model_reduction_cost): Take cost vector argument and adjust.
6827 (vect_model_induction_cost): Likewise.
6828 (vectorizable_reduction): Likewise.
6829 (vectorizable_induction): Likewise.
6830 (vectorizable_live_operation): Likewise.
6831 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
6832 SLP_TREE_NUMBER_OF_VEC_STMTS.
6833 (vect_analyze_slp_cost_1): Remove.
6834 (vect_analyze_slp_cost): Likewise.
6835 (vect_slp_analyze_node_operations): Take visited args and
6836 a target cost vector. Avoid processing already visited stmt sets.
6837 (vect_slp_analyze_operations): Use a local cost vector to gather
6838 costs and register those of non-discarded instances.
6839 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
6840 (vect_schedule_slp_instance): Remove copying of
6841 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
6843 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
6844 adding cost. Record cost entry location.
6845 (vect_prologue_cost_for_slp_op): Function to compute cost of
6846 a constant or invariant generated for SLP vect in the prologue,
6847 split out from vect_analyze_slp_cost_1.
6848 (vect_model_simple_cost): Make static. Adjust for SLP costing.
6849 (vect_model_promotion_demotion_cost): Likewise.
6850 (vect_model_store_cost): Likewise, make static.
6851 (vect_model_load_cost): Likewise.
6852 (vectorizable_bswap): Add cost vector arg and adjust.
6853 (vectorizable_call): Likewise.
6854 (vectorizable_simd_clone_call): Likewise.
6855 (vectorizable_conversion): Likewise.
6856 (vectorizable_assignment): Likewise.
6857 (vectorizable_shift): Likewise.
6858 (vectorizable_operation): Likewise.
6859 (vectorizable_store): Likewise.
6860 (vectorizable_load): Likewise.
6861 (vectorizable_condition): Likewise.
6862 (vectorizable_comparison): Likewise.
6863 (can_vectorize_live_stmts): Likewise.
6864 (vect_analyze_stmt): Likewise.
6865 (vect_transform_stmt): Adjust calls to vectorizable_*.
6866 * tree-vectorizer.c: Include gimple-pretty-print.h.
6867 (dump_stmt_cost): New function.
6869 2018-05-16 Richard Biener <rguenther@suse.de>
6871 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
6872 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
6873 * tree-ssa-dse.c: Include tree-ssa-loop.h.
6874 (check_name): New callback.
6875 (dse_classify_store): Track cycles via a visited bitmap of PHI
6876 defs and simplify handling of in-loop and across loop dead stores
6877 and properly fail for loop-variant refs. Handle byte-tracking with
6878 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
6881 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
6883 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
6884 (vect_get_mask_type_for_stmt): Likewise.
6885 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
6887 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
6888 to determine the statement's vector type and the vector type that
6889 should be used for calculating nunits. Deal with cases in which
6890 the type has to be deferred.
6891 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
6892 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
6893 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
6894 (vect_determine_vf_for_stmt): New functions, split out from...
6895 (vect_determine_vectorization_factor): ...here.
6896 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
6897 (vect_get_mask_type_for_stmt): New functions, split out from
6898 vect_determine_vectorization_factor.
6900 2018-05-16 Richard Biener <rguenther@suse.de>
6902 * tree-cfg.c (verify_gimple_assign_ternary): Properly
6903 verify the [VEC_]COND_EXPR embedded comparison.
6905 2018-05-15 Martin Sebor <msebor@redhat.com>
6907 PR tree-optimization/85753
6908 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
6909 RECORD_TYPE in addition to ARRAY_TYPE.
6911 2018-05-15 Martin Sebor <msebor@redhat.com>
6914 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
6916 2018-05-15 Richard Biener <rguenther@suse.de>
6918 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
6919 add by_clobber_p one. Change algorithm to collect all defs
6920 representing uses we need to walk and try reducing them to
6921 a single one before failing.
6922 (dse_dom_walker::dse_optimize_stmt): Adjust.
6924 2018-05-13 Mark Wielaard <mark@klomp.org>
6926 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
6927 (size_of_loc_descr): Likewise.
6928 (output_loc_operands): Likewise.
6929 (output_loc_operands_raw): Likewise.
6930 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
6931 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
6932 (hash_loc_operands): Likewise.
6933 (compare_loc_operands): Likewise.
6935 2018-05-14 Mark Wielaard <mark@klomp.org>
6937 * dwarf2out.c (count_index_addrs): New function.
6938 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
6940 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6942 PR tree-optimization/83648
6943 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
6944 return value as malloc candidate.
6946 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6949 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
6950 param as true in call to suggest_attribute.
6952 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
6954 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
6955 -mreadonly-in-sdata.
6957 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6959 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
6961 (aarch64_crypto_aesd_fused): Likewise.
6963 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
6965 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
6966 (movsi_aarch64): Likewise.
6967 (load_pairsi): Likewise.
6968 (load_pairdi): Likewise.
6969 (store_pairsi): Likewise.
6970 (store_pairdi): Likewise.
6971 (load_pairsf): Likewise.
6972 (load_pairdf): Likewise.
6973 (store_pairsf): Likewise.
6974 (store_pairdf): Likewise.
6975 (zero_extend): Likewise.
6976 (trunc): Swap alternatives.
6977 (fcvt_target): Add '?' to prefer w over r.
6979 2018-05-14 Jakub Jelinek <jakub@redhat.com>
6982 * config/i386/i386.md: Disallow non-commutative arithmetics in
6983 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
6984 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
6985 in the peephole2 before it.
6987 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
6989 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
6990 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
6991 (ix86_handle_option): Handle -mcldemote.
6992 * config.gcc: New header.
6993 * config/i386/cldemoteintrin.h: New file.
6994 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
6995 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6997 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6998 OPTION_MASK_ISA_CLDEMOTE.
6999 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
7000 (ix86_valid_target_attribute_inner_p): Ditto.
7001 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
7002 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
7003 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
7004 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
7005 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
7007 * config/i386/i386.opt: Add -mcldemote.
7008 * config/i386/x86intrin.h: New header.
7009 * doc/invoke.texi: Add -mcldemote.
7011 2018-05-14 Richard Biener <rguenther@suse.de>
7013 * doc/match-and-simplify.texi: Adjust :s documentation.
7015 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
7017 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
7018 intended memcpy size.
7019 (REORDER_45): Likewise.
7021 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
7023 * sort.cc: New file.
7024 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
7025 * vec.c (qsort_chk): Use gcc_qsort.
7026 * Makefile.in (OBJS-libcommon): Add sort.o.
7027 (build/sort.o): New target. Use it...
7028 (BUILD_RTL): ... here, and...
7029 (build/gencfn-macros): ... here, and...
7030 (build/genmatch): ... here.
7032 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7033 Chung-Ju Wu <jasonwucj@gmail.com>
7035 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
7036 * config/nds32/nds32-graywolf.md: New file.
7037 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
7038 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
7040 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
7041 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
7042 * config/nds32/nds32.md (pipeline_model): Add graywolf.
7043 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
7044 * config/nds32/pipelines.md: Include n15 settings.
7046 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7047 Chung-Ju Wu <jasonwucj@gmail.com>
7049 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
7050 * config/nds32/nds32-n13.md: New file.
7051 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
7052 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
7054 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
7055 * config/nds32/nds32.md (pipeline_model): Add n13.
7056 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
7057 * config/nds32/pipelines.md: Include n13 settings.
7059 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7060 Chung-Ju Wu <jasonwucj@gmail.com>
7062 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
7063 * config/nds32/nds32-n10.md: New file.
7064 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
7065 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
7067 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
7068 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
7069 * config/nds32/nds32.md (pipeline_model): Add n10.
7070 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
7071 * config/nds32/pipelines.md: Include n10 settings.
7073 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
7074 Kito Cheng <kito.cheng@gmail.com>
7075 Chung-Ju Wu <jasonwucj@gmail.com>
7077 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
7078 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7079 Add enum values for DSP extension instructions.
7080 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
7082 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
7083 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
7085 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
7086 * config/nds32/nds32-dspext.md: New file for DSP implementation.
7087 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
7088 * config/nds32/nds32-intrinsic.md: Likewise.
7089 * config/nds32/nds32_intrinsic.h: Likewise.
7090 * config/nds32/nds32-md-auxiliary.c: Likewise.
7091 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
7092 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
7093 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
7094 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
7095 * config/nds32/nds32-protos.h: New declarations for DSP extension.
7096 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
7097 TYPE_DMAC in switch statement.
7098 * config/nds32/nds32.c: New checking and implementation for DSP
7099 extension instructions.
7100 * config/nds32/nds32.h: Likewise.
7101 * config/nds32/nds32.md: Likewise.
7102 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
7103 * config/nds32/predicates.md: Implement new predicates for DSP
7106 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7108 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
7109 Reformat alternatives and attributes so it is easier to identify
7110 which constraints/attributes go with which instruction.
7111 (mov<mode>_hardfloat32, FMOVE64): Likewise.
7112 (mov<mode>_softfloat32, FMOVE64): Likewise.
7113 (mov<mode>_hardfloat64, FMOVE64): Likewise.
7114 (mov<mode>_softfloat64, FMOVE64): Likewise.
7116 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
7118 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7120 (Basic PowerPC Built-in Functions): The new name of the
7121 subsection previously known as "PowerPC Built-in Functions".
7122 (Basic PowerPC Built-in Functions Available on all Configurations):
7124 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
7125 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
7126 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
7127 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
7129 2018-05-11 Martin Jambor <mjambor@suse.cz>
7132 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
7135 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
7138 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
7140 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
7142 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
7143 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
7144 (ix86_handle_option): Handle -mwaitpkg.
7145 * config.gcc: New header.
7146 * config/i386/cpuid.h (bit_WAITPKG): New bit.
7147 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
7148 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
7150 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7151 OPTION_MASK_ISA_WAITPKG.
7152 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
7153 (ix86_option_override_internal): Add PTA_WAITPKG.
7154 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
7155 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
7156 IX86_BUILTIN_TPAUSE.
7157 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
7158 __builtin_ia32_umwait and __builtin_ia32_tpause.
7159 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
7160 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
7161 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
7162 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
7163 UNSPECV_TPAUSE): New.
7164 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
7165 * config/i386/i386.opt: Add -mwaitpkg.
7166 * config/i386/waitpkgintrin.h: New file.
7167 * config/i386/x86intrin.h: New header.
7168 * doc/invoke.texi: Add -mwaitpkg.
7170 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
7173 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
7175 (cortex-m0): Use armv6s-m isa.
7176 (cortex-m0plus): Likewise.
7177 (cortex-m1): Likewise.
7178 (cortex-m0.small-multiply): Likewise.
7179 (cortex-m0plus.small-multiply): Likewise.
7180 (cortex-m1.small-multiply): Likewise.
7182 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
7183 Jakub Jelinek <jakub@redhat.com>
7185 PR tree-optimization/85692
7186 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
7187 source permute as well.
7189 2018-05-11 Martin Liska <mliska@suse.cz>
7192 * doc/extend.texi: Document LLVM style format for no_sanitize
7195 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
7197 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
7198 mode_supports_vsx_dform_quad to mode_supports_dq_form.
7199 (mode_supports_vsx_dform_quad): Likewise.
7200 (mode_supports_vmx_dform): Move these functions to be next to the
7201 other mode_supports functions.
7202 (mode_supports_dq_form): Likewise.
7203 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
7204 mode_supports_dq_form.
7205 (reg_offset_addressing_ok_p): Likewise.
7206 (offsettable_ok_by_alignment): Likewise.
7207 (rs6000_legitimate_offset_address_p): Likewise.
7208 (legitimate_lo_sum_address_p): Likewise.
7209 (rs6000_legitimize_address): Likewise.
7210 (rs6000_legitimize_reload_address): Likewise.
7211 (rs6000_secondary_reload_inner): Likewise.
7212 (rs6000_preferred_reload_class): Likewise.
7213 (rs6000_output_move_128bit): Likewise.
7215 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
7217 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
7218 Generate SImode target register for null target.
7219 <case IX86_BUILTIN_XGETBV>: Ditto.
7220 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
7221 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
7223 2018-05-10 Carl Love <cel@us.ibm.com>
7225 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7226 dcbtt and dcbtstt if operands[2] is 0.
7228 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
7231 * config/i386/sse.md (usadv64qi): New expander.
7233 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
7235 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
7236 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
7237 -maltivec=be support.
7238 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
7239 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
7240 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
7241 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
7242 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
7243 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
7244 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
7245 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
7246 altivec_vsumsws): Adjust.
7247 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
7248 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
7249 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
7251 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
7252 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
7253 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
7254 (altivec_lve<VI_char>x): Delete expand.
7255 (*altivec_lve<VI_char>x_internal): Rename to...
7256 (altivec_lve<VI_char>x): ... this.
7257 (altivec_lvxl_<mode>): Delete expand.
7258 (*altivec_lvxl_<mode>_internal): Rename to ...
7259 (altivec_lvxl_<mode>): ... this.
7260 (altivec_stvxl_<mode>): Delete expand.
7261 (*altivec_stvxl_<mode>_internal): Rename to ...
7262 (altivec_stvxl_<mode>): ... this.
7263 (altivec_stve<VI_char>x): Delete expand.
7264 (*altivec_stve<VI_char>x_internal): Rename to ...
7265 (altivec_stve<VI_char>x): ... this.
7266 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
7267 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
7268 reduc_plus_scal_<mode>): Adjust.
7269 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
7271 (rs6000_cpu_cpp_builtins): Adjust.
7272 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
7273 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
7274 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
7275 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
7276 -maltivec=be support.
7277 (rs6000_split_vec_extract_var): Adjust.
7278 (rs6000_split_v4si_init): Adjust.
7279 (swap_selector_for_mode): Delete.
7280 (altivec_expand_lvx_be, altivec_expand_stvx_be,
7281 altivec_expand_stvex_be): Delete.
7282 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
7283 -maltivec=be support.
7284 (rs6000_gimple_fold_builtin): Ditto.
7285 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
7287 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
7288 (TARGET_DIRECT_MOVE_64BIT): Adjust.
7289 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
7290 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
7291 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
7292 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
7293 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
7294 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
7295 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
7296 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
7297 anonymous split): Adjust.
7298 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
7299 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
7301 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
7303 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
7304 when --with-gxx-include-dir is also specified.
7305 * configure: Regenerate.
7307 2018-05-09 Jim Wilson <jimw@sifive.com>
7310 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
7311 * config/riscv/t-withmultilib: New.
7312 * config/riscv/withmultilib.h: New.
7313 * doc/install.texi: Document RISC-V --with-multilib-list support.
7315 2018-05-09 Richard Biener <rguenther@suse.de>
7317 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
7319 (vect_bb_vectorization_profitable_p): Adjust. Compute
7320 actual scalar cost using the cost vector and the add_stmt_cost
7323 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7325 PR rtl-optimization/85645
7326 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
7327 in the REG_CFA_REGISTER note for LR, don't leave it empty.
7329 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7331 PR rtl-optimization/85645
7332 * shrink-wrap.c (spread_components): Return a boolean saying if
7333 anything was changed.
7334 (try_shrink_wrapping_separate): Iterate spread_components until
7335 nothing changes anymore.
7337 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7339 PR rtl-optimization/85645
7340 * regrename.c (build_def_use): Also kill the chains that include the
7341 destination of a REG_CFA_REGISTER note.
7343 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7345 PR rtl-optimization/85645
7346 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
7347 insn that has a REG_CFA_REGISTER note.
7349 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
7351 * cfgexpand.c (expand_clobber): New function.
7352 (expand_gimple_stmt_1): Use it.
7353 * tree-vect-stmts.c (vect_clobber_variable): New function,
7355 (vectorizable_simd_clone_call): ...here.
7356 (vectorizable_store): Emit a clobber either side of an
7357 IFN_STORE_LANES sequence.
7358 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
7360 2018-05-09 Tom de Vries <tom@codesourcery.com>
7363 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
7364 (define_insn "trap_if_false"): Add exit after trap.
7366 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
7368 PR rtl-optimization/85638
7369 * bb-reorder.c: Include common/common-target.h.
7370 (create_forwarder_block): New function extracted from...
7371 (fix_up_crossing_landing_pad): ...here. Rename into...
7372 (dw2_fix_up_crossing_landing_pad): ...this.
7373 (sjlj_fix_up_crossing_landing_pad): New function.
7374 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
7375 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
7376 from both partitions and exit the loop after one iteration.
7378 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
7381 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7383 (Basic PowerPC Built-in Functions): The new name of the
7384 subsection previously known as "PowerPC Built-in Functions".
7385 (Basic PowerPC Built-in Functions Available on all Configurations):
7387 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
7389 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
7391 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
7393 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
7396 2018-05-08 Jim Wilson <jimw@sifive.com>
7398 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
7399 (LD_EMUL_SUFFIX): New.
7400 (LINK_SPEC): Use it.
7402 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
7404 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7406 (Basic PowerPC Built-in Functions): The new name of the
7407 subsection previously known as "PowerPC Built-in Functions".
7408 (Basic PowerPC Built-in Functions Available on all Configurations):
7410 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
7412 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
7414 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
7416 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
7419 2018-05-08 Jakub Jelinek <jakub@redhat.com>
7422 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
7423 after cmpelim optimization.
7425 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
7427 * config.gcc: Support "goldmont".
7428 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
7429 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7431 * config/i386/i386.c (m_GOLDMONT): Define.
7432 (processor_target_table): Add "goldmont".
7433 (PTA_GOLDMONT): Define.
7434 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
7435 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
7436 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
7437 (fold_builtin_cpu): Add "goldmont".
7438 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
7439 (ix86_option_override_internal): Add "goldmont".
7440 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
7441 (processor_type): Add PROCESSOR_GOLDMONT.
7442 * config/i386/i386.md: Add CPU "glm".
7443 * config/i386/glm.md: New file.
7444 * config/i386/x86-tune.def: Add m_GOLDMONT.
7445 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
7447 2018-05-08 Jakub Jelinek <jakub@redhat.com>
7450 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
7452 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
7453 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
7454 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
7457 * config/i386/i386.c (ix86_fold_builtin): Handle
7458 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
7461 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
7462 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
7464 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
7467 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
7468 (check_arch): Likewise.
7469 (check_fpu): Return the result rather than printing it.
7470 (end arch): Fix operator precedence.
7471 (end cpu): Likewise.
7472 (END): Print the result from check_fpu.
7474 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
7475 Alan Hayward <alan.hayward@arm.com>
7476 David Sherwood <david.sherwood@arm.com>
7478 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
7479 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
7480 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
7481 (*fcmuo<mode>_and): New patterns.
7483 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
7485 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
7486 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
7487 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
7488 (cmp_op, sve_imm_con): New code attributes.
7489 (SVE_COND_INT_CMP, imm_con): Delete.
7490 (cmp_op): Remove above unspecs from int attribute.
7491 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
7493 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
7494 comparison-specific unspecs.
7495 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
7496 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
7497 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
7498 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
7499 (*vec_fcm<cmp_op><mode>): Rename to...
7500 (*fcm<cmp_op><mode>): ...this and adjust likewise.
7501 (*vec_fcmuo<mode>): Rename to...
7502 (*fcmuo<mode>): ...this and adjust likewise.
7503 (*pred_fcm<cmp_op><mode>): New pattern.
7504 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
7505 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
7507 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
7509 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
7510 (aarch64_emit_sve_predicated_cond): New function.
7511 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
7512 (aarch64_emit_unspec_cond_or): Replace with...
7513 (aarch64_emit_sve_or_conds): ...this new function. Use
7514 aarch64_emit_sve_ptrue_op for the individual comparisons and
7515 aarch64_emit_binop to OR them together.
7516 (aarch64_emit_inverted_unspec_cond): Replace with...
7517 (aarch64_emit_sve_inverted_cond): ...this new function. Use
7518 aarch64_emit_sve_ptrue_op for the comparison and
7519 aarch64_emit_unop to invert the result.
7520 (aarch64_expand_sve_vec_cmp_float): Update after the above
7521 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
7523 2018-05-07 Nathan Sidwell <nathan@acm.org>
7525 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
7526 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
7527 (Backwards Compatibility): Likewise.
7529 2018-05-07 Luis Machado <luis.machado@linaro.org>
7533 2018-05-07 Luis Machado <luis.machado@linaro.org>
7535 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7536 <prefetch_dynamic_strides>: New const bool field.
7537 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7538 prefetch_dynamic_strides.
7539 (exynosm1_prefetch_tune): Likewise.
7540 (thunderxt88_prefetch_tune): Likewise.
7541 (thunderx_prefetch_tune): Likewise.
7542 (thunderx2t99_prefetch_tune): Likewise.
7543 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7545 (aarch64_override_options_internal): Update to set
7546 PARAM_PREFETCH_DYNAMIC_STRIDES.
7547 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7548 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7549 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7550 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7551 prefetch-dynamic-strides setting.
7553 2018-05-07 Luis Machado <luis.machado@linaro.org>
7555 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7556 <minimum_stride>: New const int field.
7557 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7558 minimum_stride field.
7559 (exynosm1_prefetch_tune): Likewise.
7560 (thunderxt88_prefetch_tune): Likewise.
7561 (thunderx_prefetch_tune): Likewise.
7562 (thunderx2t99_prefetch_tune): Likewise.
7563 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7564 (aarch64_override_options_internal): Update to set
7565 PARAM_PREFETCH_MINIMUM_STRIDE.
7566 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7567 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7568 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7569 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7570 stride is constant and is below the minimum stride threshold.
7572 2018-05-07 Luis Machado <luis.machado@linaro.org>
7574 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
7577 2018-05-07 Luis Machado <luis.machado@linaro.org>
7579 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7580 <prefetch_dynamic_strides>: New const bool field.
7581 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7582 prefetch_dynamic_strides.
7583 (exynosm1_prefetch_tune): Likewise.
7584 (thunderxt88_prefetch_tune): Likewise.
7585 (thunderx_prefetch_tune): Likewise.
7586 (thunderx2t99_prefetch_tune): Likewise.
7587 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7589 (aarch64_override_options_internal): Update to set
7590 PARAM_PREFETCH_DYNAMIC_STRIDES.
7591 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7592 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7593 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7594 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7595 prefetch-dynamic-strides setting.
7597 2018-05-07 Luis Machado <luis.machado@linaro.org>
7599 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7600 <minimum_stride>: New const int field.
7601 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7602 minimum_stride field.
7603 (exynosm1_prefetch_tune): Likewise.
7604 (thunderxt88_prefetch_tune): Likewise.
7605 (thunderx_prefetch_tune): Likewise.
7606 (thunderx2t99_prefetch_tune): Likewise.
7607 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7608 (aarch64_override_options_internal): Update to set
7609 PARAM_PREFETCH_MINIMUM_STRIDE.
7610 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7611 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7612 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7613 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7614 stride is constant and is below the minimum stride threshold.
7616 2018-05-06 Jakub Jelinek <jakub@redhat.com>
7619 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
7620 the type is addressable. Don't force op into register if it has
7623 2018-05-05 Roland McGrath <mcgrathr@google.com>
7626 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
7627 any section for which we don't know a specific type it should have,
7628 regardless of name. Previously this was done only for the exact
7629 names ".init_array", ".fini_array", and ".preinit_array".
7630 (default_elf_asm_named_section): Add comment about
7631 relationship with default_section_type_flags and SECTION_NOTYPE.
7632 (get_section): Don't consider it a type conflict if one side has
7633 SECTION_NOTYPE and the other doesn't, as long as neither has the
7634 SECTION_BSS et al used in the default_section_type_flags logic.
7636 2018-05-05 Tom de Vries <tom@codesourcery.com>
7639 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
7640 (workaround_barsyncs): New function.
7641 (nvptx_reorg): Use workaround_barsyncs.
7642 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7643 (define_expand "nvptx_membar_cta"): New define_expand.
7644 (define_insn "*nvptx_membar_cta"): New insn.
7646 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
7648 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
7649 To improve optimization opportunities.
7650 * builtin-types.def: The new needed builtin types for the above.
7652 2018-05-04 Richard Biener <rguenther@suse.de>
7654 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
7655 * gimple-ssa-store-merging.c
7656 (imm_store_chain_info::output_merged_store): Remove redundant create,
7657 release split_store vector contents on failure.
7658 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
7659 scalar stmt vector on cache hit.
7661 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
7663 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
7665 * config.gcc (powerpc-xilinx-eabi*): Remove.
7666 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
7668 (fusion_addis_mem_combo_load): Ditto.
7669 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
7671 (rs6000_cpu_cpp_builtins): Ditto.
7672 * config/rs6000/rs6000-linux.c
7673 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
7674 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
7675 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
7677 (rs6000_setup_reg_addr_masks): Ditto.
7678 (rs6000_init_hard_regno_mode_ok): Ditto.
7679 (rs6000_option_override_internal): Ditto.
7680 (legitimate_lo_sum_address_p): Ditto.
7681 (rs6000_legitimize_address): Ditto.
7682 (rs6000_legitimize_reload_address): Ditto.
7683 (rs6000_legitimate_address_p): Ditto.
7684 (abi_v4_pass_in_fpr): Ditto.
7685 (setup_incoming_varargs): Ditto.
7686 (rs6000_gimplify_va_arg): Ditto.
7687 (rs6000_split_multireg_move): Ditto.
7688 (rs6000_savres_strategy): Ditto.
7689 (rs6000_emit_prologue_components): Ditto.
7690 (rs6000_emit_epilogue_components): Ditto.
7691 (rs6000_emit_prologue): Ditto.
7692 (rs6000_emit_epilogue): Ditto.
7693 (rs6000_elf_file_end): Ditto.
7694 (rs6000_function_value): Ditto.
7695 (rs6000_libcall_value): Ditto.
7696 * config/rs6000/rs6000.h: Ditto.
7697 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
7698 (TARGET_MINMAX): ... this. New.
7699 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
7700 * config/rs6000/rs6000.md: Remove Xilinx FP support.
7701 (*movsi_internal1_single): Delete.
7702 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
7703 mfpu=, mxilinx-fpu): Delete.
7704 * config/rs6000/singlefp.h: Delete.
7705 * config/rs6000/sysv4.h: Remove Xilinx FP support.
7706 * config/rs6000/t-rs6000: Ditto.
7707 * config/rs6000/t-xilinx: Delete.
7708 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
7709 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
7710 (VStype_simple): Delete.
7711 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
7712 * config/rs6000/xfpu.h: Delete.
7713 * config/rs6000/xfpu.md: Delete.
7714 * config/rs6000/xilinx.h: Delete.
7715 * config/rs6000/xilinx.opt: Delete.
7716 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
7717 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
7719 2018-05-04 Tom de Vries <tom@codesourcery.com>
7722 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
7725 2018-05-04 Richard Biener <rguenther@suse.de>
7728 * tree-complex.c (update_complex_assignment): We are always in SSA form.
7729 (expand_complex_div_wide): Likewise.
7730 (expand_complex_operations_1): Likewise.
7731 (expand_complex_libcall): Preserve EH info of the original stmt.
7732 (tree_lower_complex): Handle removed blocks.
7733 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
7734 on complex multiplication and division libcall builtins.
7736 2018-05-04 Richard Biener <rguenther@suse.de>
7739 * fold-const.c (negate_expr_p): Restrict negation of operand
7740 zero of a division to when we know that can happen without
7742 (fold_negate_expr_1): Likewise.
7744 2018-05-04 Jakub Jelinek <jakub@redhat.com>
7747 * real.h (real_nextafter): Declare.
7748 * real.c (real_nextafter): New function.
7749 * fold-const-call.c (fold_const_nextafter): New function.
7750 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
7751 CASE_CFN_NEXTTOWARD.
7752 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
7753 even when arg1_mode is different from arg0_mode.
7755 2018-05-03 Nathan Sidwell <nathan@acm.org>
7757 * doc/extend.texi (Deprecated Features): Remove
7759 (Backwards Compatibility): Likewise.
7760 * doc/invoke.texi (C++ Language Options): Likewise.
7761 (C++ Dialect Options): Likewise.
7763 2018-05-03 Jakub Jelinek <jakub@redhat.com>
7766 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
7767 _mm512_mask_mullox_epi64): New intrinsics.
7769 2018-05-03 Tom de Vries <tom@codesourcery.com>
7772 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7773 dump files): Add offload-tree.
7775 2018-05-03 Richard Biener <rguenther@suse.de>
7777 PR tree-optimization/85615
7778 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
7779 to loops not nested in BBs loop father to avoid creating multi-entry
7782 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7784 PR tree-optimization/70291
7785 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
7786 arguments. Change return type to tree. Emit libcall as a new
7787 statement rather than replacing existing one when inplace_p is true.
7788 (expand_complex_multiplication_components): New function.
7789 (expand_complex_multiplication): Expand floating-point complex
7790 multiplication using the above.
7791 (expand_complex_division): Rename inner_type parameter to type.
7792 Update expand_complex_libcall call-site.
7793 (expand_complex_operations_1): Update expand_complex_multiplication
7794 and expand_complex_division call-sites.
7796 2018-05-02 Jakub Jelinek <jakub@redhat.com>
7799 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7800 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7801 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
7802 the highest significant bit of the shift count mask is clear. In
7803 check whether and[sq]i3 is needed verify that all significant bits
7804 of the shift count other than the highest are set.
7806 2018-05-02 Tom de Vries <tom@codesourcery.com>
7809 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
7810 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
7811 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
7812 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
7813 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
7814 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
7815 __builtin_goacc_parlevel_size.
7817 2018-05-02 Richard Biener <rguenther@suse.de>
7819 PR tree-optimization/85597
7820 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
7821 do not use split vect_get_vec_defs call but call vect_get_slp_defs
7824 2018-05-02 Tom de Vries <tom@codesourcery.com>
7827 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7828 dump files): Add ltrans-tree.
7830 2018-05-02 Tom de Vries <tom@codesourcery.com>
7833 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7834 dump files): Add wpa-ipa.
7836 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
7838 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
7839 powerpc*-*-linux*paired* target.
7840 * config/rs6000/750cl.h: Delete.
7841 * config/rs6000/paired.h: Delete.
7842 * config/rs6000/paired.md: Delete.
7843 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
7845 * config/rs6000/rs6000-builtin.def: Remove paired float support.
7846 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
7847 comment. Remove paired float support.
7848 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
7849 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
7851 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
7852 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
7854 * config/rs6000/rs6000.c: Remove paired float support.
7855 (paired_expand_vector_init, paired_expand_vector_move,
7856 paired_emit_vector_compare, paired_emit_vector_cond_expr,
7857 (paired_expand_lv_builtin, paired_expand_stv_builtin,
7858 paired_expand_builtin, paired_expand_predicate_builtin,
7859 paired_init_builtins): Delete.
7860 * config/rs6000/rs6000.h: Remove paired float support.
7861 * config/rs6000/rs6000.md: Remove paired float support.
7862 (move_from_CR_ov_bit): Delete.
7863 * config/rs6000/rs6000.opt (mpaired): Delete.
7864 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
7865 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
7867 2018-05-02 Richard Biener <rguenther@suse.de>
7870 * gimplify.c (gimplify_save_expr): When in SSA form allow
7871 SAVE_EXPRs to compute to SSA vars.
7873 2018-05-02 Jakub Jelinek <jakub@redhat.com>
7876 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7877 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7878 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
7879 clobber operands[2], instead use a new pseudo. Formatting fixes.
7881 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
7883 PR tree-optimization/85586
7884 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
7885 exit early for statements in the same group if the accesses are
7888 2018-05-02 Tom de Vries <tom@codesourcery.com>
7891 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
7894 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
7896 PR tree-optimization/85143
7897 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
7899 2018-05-01 Tom de Vries <tom@codesourcery.com>
7902 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
7903 not found" error message.
7905 2018-05-01 Tom de Vries <tom@codesourcery.com>
7908 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
7909 * vec.c (test_ordered_remove_if): New function.
7910 (vec_c_tests): Call test_ordered_remove_if.
7911 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
7912 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
7913 * tree-vect-patterns.c (vect_pattern_recog_1): Use
7914 VEC_ORDERED_REMOVE_IF.
7916 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7918 PR tree-optimization/82665
7919 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
7920 pointer subtraction where arguments come from a memchr call.
7922 2018-05-01 Jakub Jelinek <jakub@redhat.com>
7924 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
7925 --push-state --as-needed and --pop-state instead of --as-needed and
7926 --no-as-needed if ld supports it.
7927 * configure: Regenerated.
7930 * doc/install.texi2html: Replace _002d with - and _002a with * in
7931 generated html files using sed.
7933 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7936 * gcc-rich-location.c (blank_line_before_p): New function.
7937 (use_new_line): New function.
7938 (gcc_rich_location::add_fixit_insert_formatted): New function.
7939 * gcc-rich-location.h
7940 (gcc_rich_location::add_fixit_insert_formatted): New function.
7942 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7944 * selftest.c (assert_streq): Rename "expected" and "actual" to
7945 "val1" and "val2". Extend NULL-handling to cover both inputs
7946 symmetrically, while still requiring both to be non-NULL for a pass.
7947 * selftest.h (assert_streq): Rename "expected" and "actual" to
7949 (ASSERT_EQ): Likewise.
7950 (ASSERT_EQ_AT): Likewise.
7951 (ASSERT_KNOWN_EQ): Likewise.
7952 (ASSERT_KNOWN_EQ_AT): Likewise.
7953 (ASSERT_NE): Likewise.
7954 (ASSERT_MAYBE_NE): Likewise.
7955 (ASSERT_MAYBE_NE_AT): Likewise.
7956 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
7957 the assertion to pass.
7958 (ASSERT_STREQ_AT): Likewise.
7960 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
7962 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
7963 interaction with -pie.
7965 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7967 * selftest.h: Fix alphabetization of per-source-file selftest
7970 2018-04-30 Jason Merrill <jason@redhat.com>
7972 PR c++/61982 - dead stores to destroyed objects.
7973 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
7976 2018-04-30 Jason Merrill <jason@redhat.com>
7978 * tree.c (build_clobber): New.
7979 * tree.h: Declare it.
7980 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
7982 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7984 * diagnostic-show-locus.c (layout::layout): Update for
7985 location_get_source_line returning a char_span.
7986 (struct char_span): Move to input.h.
7987 (struct correction): Update for fields in char_span becoming
7989 (struct source_line): Update for location_get_source_line
7990 returning a char_span.
7991 (layout::print_line): Likewise.
7992 * edit-context.c (edited_file::print_content): Likewise.
7993 (edited_file::print_diff_hunk): Likewise.
7994 (edited_file::print_run_of_changed_lines): Likewise.
7995 (edited_file::get_num_lines): Likewise.
7996 (edited_line::edited_line): Likewise.
7997 * final.c (asm_show_source): Likewise.
7998 * input.c (location_get_source_line): Convert return type
7999 from const char * to char_span, losing the final "line_len"
8001 (dump_location_info): Update for the above.
8002 (get_substring_ranges_for_loc): Likewise. Use a char_span
8003 when handling the literal within the line.
8004 (test_reading_source_line): Update for location_get_source_line
8005 returning a char_span.
8006 * input.h (class char_span): Move here from
8007 diagnostic-show-locus.c, converting from a struct to a class.
8008 Make data members private.
8009 (char_span::operator bool): New.
8010 (char_span::length): New.
8011 (char_span::get_buffer): New.
8012 (char_span::operator[]): New.
8013 (char_span::subspan): Make const.
8014 (char_span::xstrdup): New.
8015 (location_get_source_line): Convert return type from const char *
8016 to char_span, losing the final "line_size" param.
8018 2018-04-30 Jan Hubicka <jh@suse.cz>
8020 * lto-wrapper.c (ltrans_priorities): New static var.
8021 (cmp_priority): New.
8022 (run_gcc): Read priorities and if doing parallel build order
8023 the Makefile by them.
8025 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8027 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
8029 2018-04-30 Richard Biener <rguenther@suse.de>
8031 * tree-cfg.c (verify_address): Remove base argument, add
8032 flag whether to check TREE_ADDRESSABLE and do that.
8033 (verify_expr): Remove.
8034 (verify_types_in_gimple_reference): Add pieces from verify_expr.
8035 (verify_gimple_assign_single): Likewise.
8036 (verify_gimple_switch): Likewise.
8037 (verify_expr_location_1): Dereference tp once. Add (disabled)
8038 piece from verify_expr.
8039 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
8041 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8043 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
8045 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8047 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
8048 (small_data_pattern): Likewise.
8049 (arc_rewrite_small_data): Likewise.
8050 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
8051 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
8052 (get_symbol_alignment): New function.
8053 (legitimate_small_data_address_p): Likewise.
8054 (legitimate_scaled_address): Update, call
8055 legitimate_small_data_address_p.
8056 (output_sdata): New static variable.
8057 (arc_print_operand): Update how we handle small data operands.
8058 (arc_print_operand_address): Likewise.
8059 (arc_legitimate_address_p): Update, use
8060 legitimate_small_data_address_p.
8061 (arc_rewrite_small_data_p): Remove.
8062 (arc_rewrite_small_data_1): Likewise.
8063 (arc_rewrite_small_data): Likewise.
8064 (small_data_pattern): Likewise.
8065 (compact_sda_memory_operand): Update to use
8066 legitimate_small_data_address_p and get_symbol_alignment.
8067 (prepare_move_operands): Don't rewite sdata pattern.
8068 (prepare_extend_operands): Remove.
8069 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
8071 (zero_extendqisi2): Likewise.
8072 (zero_extendhisi2): Likewise.
8073 (extendqihi2): Likewise.
8074 (extendqisi2): Likewise.
8075 (extendhisi2): Likewise.
8079 * config/arc/constraints.md (Usd): Change it to memory constraint.
8081 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8083 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
8084 as source of std instructions.
8085 * config/arc/arc.md (movsi_insn): Update pattern predicate to
8086 allow 6-bit constants as source for store instructions.
8087 (movdi_insn): Update instruction pattern to allow 6-bit constants
8088 as source for store instructions.
8090 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8092 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
8094 2018-04-30 Nathan Sidwell <nathan@acm.org>
8095 Sandra Loosemore <sandra@codesourcery.com>
8097 * dumpfile.c (dump_open): Allow '-' for stdout.
8098 * doc/invoke.texi (Developer Options): Document dump filename
8099 determination early. Document stdin/stdout selection.
8101 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
8103 Microblaze Target: PIC data text relative
8105 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
8106 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
8108 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
8109 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
8110 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
8111 New addressing mode for data-text relative position indepenedent code.
8112 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
8113 'ADDRESS_SYMBOLIC_TXT_REL'.
8114 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
8115 (microblaze_legitimate_pic_operand): Exclude function calls from
8116 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
8117 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
8119 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8120 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8121 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
8122 for 'address + offset'.
8123 (microblaze_expand_prologue): Add new function prologue call for
8125 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
8126 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
8127 table in case of TARGET_PIC_DATA_TEXT_REL.
8128 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
8129 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
8130 Add new macros 'UNSPEC_TEXT',
8131 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
8132 + exclude function calls from 'UNSPEC_PLT' in case of data text
8134 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8135 new target hook for generating address diff vector tables in case of
8137 * doc/tm.texi : Regenerate.
8138 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
8139 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
8140 of addr diff vector generation.
8141 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8142 target hook definition.
8143 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
8144 Add default function for generate_pic_addr_diff_vec -> flag_pic.
8145 * doc/invoke.texi (Add new pic option): Add new microblaze pic
8146 option for data text relative.
8148 2018-04-30 Richard Biener <rguenther@suse.de>
8150 * tree-chrec.h (evolution_function_is_constant_p): Remove
8152 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
8154 2018-04-30 Richard Biener <rguenther@suse.de>
8157 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
8159 2018-04-30 Richard Biener <rguenther@suse.de>
8161 PR tree-optimization/28364
8162 PR tree-optimization/85275
8163 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
8164 copying first exit test.
8166 2018-04-28 Mark Wielaard <mark@klomp.org>
8168 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
8170 (dwarf_AT): Handle DW_AT_addr_base.
8171 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
8173 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
8176 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
8177 (*ashl<dwi>3_doubleword_mask_1): Ditto.
8178 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
8179 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
8181 2018-04-28 Richard Biener <rguenther@suse.de>
8183 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
8184 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
8185 to reflect use. Only add interesting stmts.
8187 2018-04-27 Martin Jambor <mjambor@suse.cz>
8190 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
8191 the jump function allows for passing through aggregate values.
8193 2018-04-27 David Malcolm <dmalcolm@redhat.com>
8195 * input.h (in_system_header_at): Convert from macro to inline
8197 (from_macro_expansion_at): Likewise.
8198 (from_macro_definition_at): Likewise.
8200 2018-04-27 Jeff Law <law@redhat.com>
8202 * config.gcc: Mark tile* targets as deprecated/obsolete.
8204 2018-04-27 Richard Biener <rguenther@suse.de>
8206 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
8209 2018-04-27 Richard Biener <rguenther@suse.de>
8211 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
8213 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
8215 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
8216 with Yd constraint. Set "preferred_for_speed" attribute from
8217 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
8219 (*movdi_internal): Ditto.
8220 (movti_interunit splitters): Remove
8221 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
8222 (movdi_interunit splitters): Ditto.
8223 * config/i386/constraints.md (Ye): Remove.
8224 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
8226 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8229 * config/aarch64/constraints.md (Usg): Limit to 31.
8232 2018-04-27 Jakub Jelinek <jakub@redhat.com>
8234 PR tree-optimization/85529
8235 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
8236 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
8237 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
8238 zero extension or masking of the MSB bit.
8239 (optimize_range_tests): Add FIRST_BB argument, pass it through
8240 to optimize_range_tests_var_bound.
8241 (maybe_optimize_range_tests, reassociate_bb): Adjust
8242 optimize_range_tests callers.
8244 2018-04-26 Richard Biener <rguenther@suse.de>
8245 Jakub Jelinek <jakub@redhat.com>
8247 * cgraph.h (symbol_table): Just declare debug method here.
8248 * symtab.c (symbol_table::debug): Define.
8250 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
8252 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
8254 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
8256 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
8257 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
8258 (*movdi_internal): Substitute Yi and Yj constraint with x
8259 and Ym and Yn constraint with y constraint. Update "isa"
8260 attribute and set "preferred_for_speed" attribute from
8261 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
8262 (*movsi_internal): Ditto.
8263 (*movdf_internal): Ditto.
8264 (*movsf_internal): Ditto.
8265 (*zero_extendsidi2): Ditto.
8266 * config/i386/sse.md (vec_set<mode>_0): Ditto.
8267 (sse2_loadld): Ditto.
8268 (*vec_extract<ssevecmodelower>_0): Ditto.
8269 (*vec_extractv4si_0_zext_sse4): Ditto.
8270 (vec_concatv2di): Ditto.
8271 (*vec_dup<mode>): Ditto.
8272 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
8273 * config/i386/constraints.md (Yi): Remove.
8278 2018-04-26 Nathan Sidwell <nathan@acm.org>
8280 * dumpfile.c (dump_open): New.
8281 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
8282 (dump_finish): Detect stdio/stderr by value not name.
8284 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
8286 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
8288 2018-04-26 Tom de Vries <tom@codesourcery.com>
8291 * config/nvptx/nvptx.c (verify_neutering_jumps)
8292 (verify_neutering_labels): New function
8293 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
8295 2018-04-26 Tom de Vries <tom@codesourcery.com>
8298 * config/nvptx/nvptx.c (needs_neutering_p): New function.
8299 (nvptx_single): Use needs_neutering_p to skip over insns that do not
8302 2018-04-26 Richard Biener <rguenther@suse.de>
8303 Tom de Vries <tom@codesourcery.com>
8306 * lto-streamer-out.c (output_function): Fixup loops if required to match
8307 discovery done in the reader.
8309 2018-04-26 Richard Biener <rguenther@suse.de>
8311 PR tree-optimization/85116
8312 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
8313 have a loop exit from the single latch predecessor. Remove
8314 case of header with just condition.
8315 (ch_base::copy_headers): Exclude infinite loops from any
8317 (pass_ch::execute): Record exits.
8319 2018-04-26 Richard Biener <rguenther@suse.de>
8321 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
8322 prologue cost vector and pass it to vect_get_load_cost.
8323 (vect_get_peeling_costs_all_drs): Likewise.
8324 (vect_peeling_hash_get_lowest_cost): Likewise.
8325 (vect_enhance_data_refs_alignment): Likewise.
8327 2018-04-26 Richard Biener <rguenther@suse.de>
8330 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
8331 checking of integer<->pointer conversions.
8332 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
8333 sign-/zero-extending pointer types.
8334 (expand_omp_for_static_chunk): Likewise.
8336 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
8337 Jean Lee <xiaoyur347@gmail.com>
8339 * config/mips/mips.c (mips_asan_shadow_offset): New function.
8340 (TARGET_ASAN_SHADOW_OFFSET): Define.
8341 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
8342 true for -fsanitize=address.
8344 2018-04-25 Mark Wielaard <mark@klomp.org>
8346 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
8349 2018-04-25 Jakub Jelinek <jakub@redhat.com>
8351 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
8352 than "alu", remove explicit "memory" and "imm_disp" attributes.
8353 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
8356 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
8357 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
8358 gen_lowpart_no_emit.
8360 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
8363 * config/i386/i386.c (ix86_expand_builtin): Change memory
8364 operand to XI, extend p0 to Pmode.
8365 * config/i386/i386.md: Change unspec volatile and operand
8366 1 mode to XI, change operand 0 mode to P.
8368 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8370 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
8371 GET_MODE_MASK before any checking.
8372 (nds32_can_use_bset_p): Likewise.
8373 (nds32_can_use_btgl_p): Likewise.
8375 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8377 * config/nds32/nds32-doubleword.md: New define_split pattern for
8378 illegal register number.
8380 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8382 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
8384 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8386 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
8388 2018-04-25 Richard Biener <rguenther@suse.de>
8390 * lto-streamer.h (LTO_major_version): Bump to 8.
8392 2018-04-25 Jakub Jelinek <jakub@redhat.com>
8394 * BASE-VER: Set to 9.0.0.
8396 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
8398 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
8399 in __abskf2 and __powikf2.
8401 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8404 * config/aarch64/constraints.md (Usg, Usj): New constraints.
8405 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
8406 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
8407 Use the above on operand 2. Reindent.
8408 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
8410 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
8413 * common/config/i386/i386-common.c (ix86_handle_option): Don't
8415 * config/i386/i386.opt (mcet): Removed.
8416 * doc/install.texi: Remove -mcet documentation.
8417 * doc/invoke.texi: Likewise.
8419 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
8422 * doc/install.texi: Remove -mcet from bootstrap-cet.
8424 2018-04-24 Jakub Jelinek <jakub@redhat.com>
8427 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
8428 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
8432 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
8433 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
8434 containing a CONST_VECTOR.
8436 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
8438 * doc/install.texi: Update newlib dependency for nvptx.
8440 2018-04-24 Jakub Jelinek <jakub@redhat.com>
8443 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
8444 instead of INTVAL when shifting x left.
8446 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
8448 PR tree-optimization/85478
8449 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
8450 vect_grouped_store_supported for single element vectors.
8452 2018-04-24 Richard Biener <rguenther@suse.de>
8455 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
8456 load cost increase to the case of non-constant step.
8458 2018-04-24 Jakub Jelinek <jakub@redhat.com>
8461 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
8462 destination if any_malformed_asm.
8464 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
8467 * expr.c (store_field): In the bitfield case, if the value comes from
8468 a function call and is returned in registers by means of a PARALLEL,
8469 do not change the mode of the temporary unless BLKmode and VOIDmode.
8471 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
8473 PR rtl-optimization/85423
8474 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
8475 dependencies to debug insns when the previous insn is non-debug.
8477 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
8479 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
8480 enums into a single definition.
8481 (fls): Fix predicates and printing.
8484 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
8486 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
8487 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
8488 and short u6 immediate.
8489 (check_if_valid_sleep_operand): Remove.
8490 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
8492 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8494 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
8495 flag_always_save_lp condition.
8496 * config/nds32/nds32.opt (malways-save-lp): New option.
8498 2018-04-22 Shiva Chen <shiva0217@gmail.com>
8500 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
8501 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
8502 * config/nds32/nds32.h
8503 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
8504 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
8506 2018-04-22 Shiva Chen <shiva0217@gmail.com>
8508 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
8509 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
8511 2018-04-22 Shiva Chen <shiva0217@gmail.com>
8512 Chung-Ju Wu <jasonwucj@gmail.com>
8514 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
8516 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
8517 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
8519 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8521 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
8523 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8525 * config/nds32/nds32-protos.h (nds32_data_alignment,
8526 nds32_local_alignment): Declare.
8527 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
8528 nds32_local_alignment): New functions.
8529 (TARGET_CONSTANT_ALIGNMENT): Define.
8530 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
8532 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8534 * config/nds32/nds32.c
8535 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
8536 (TARGET_MODES_TIEABLE_P): Likewise.
8538 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8540 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
8543 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
8544 Chung-Ju Wu <jasonwucj@gmail.com>
8546 * config/nds32/constants.md (unspec_volatile_element): Add enum values
8547 for unaligned access.
8548 * config/nds32/nds32-intrinsic.c: Implementation of expanding
8550 * config/nds32/nds32-intrinsic.md: Likewise.
8551 * config/nds32/nds32_intrinsic.h: Likewise.
8552 * config/nds32/nds32.h (nds32_builtins): Likewise.
8553 * config/nds32/nds32.opt (munaligned-access): New option.
8554 * config/nds32/nds32.c (nds32_asm_file_start): Display
8555 flag_unaligned_access status.
8557 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
8559 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
8560 -mno-relax is present.
8561 * config/riscv/linux.h (LINK_SPEC): Ditto.
8563 2018-04-20 Martin Sebor <msebor@redhat.com>
8566 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
8568 (gimple_fold_builtin_stxcpy_chk): Same.
8569 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
8571 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
8574 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
8575 __powikf2 when long double is IEEE 128-bit.
8577 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
8579 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
8580 step to make sure stack always aligned.
8582 2018-04-20 Carl Love <cel@us.ibm.com>
8585 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
8586 size check for arg0.
8588 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
8589 Tom de Vries <tom@codesourcery.com>
8592 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
8593 Emit insns for calls too.
8594 (nvptx_find_par): Always look for worker-level predecessor insn.
8595 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
8597 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
8598 (nvptx_process_pars): Propagate frames for calls.
8600 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
8603 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
8605 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
8606 (ix86_handle_option): Don't handle OPT_mibt.
8607 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
8609 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
8611 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
8612 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
8613 (ix86_target_macros): Define __CET__ with flag_cf_protection
8614 for -fcf-protection.
8615 * config/i386/i386.c (isa2_opts): Remove -mibt.
8616 * config/i386/i386.h (TARGET_IBT): Removed.
8617 (TARGET_IBT_P): Likewise.
8618 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
8619 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
8620 * config/i386/i386.opt (mcet): Update help message.
8623 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
8624 -mcet as an alias for -mshstk.
8626 2018-04-20 Richard Biener <rguenther@suse.de>
8629 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
8630 complexity by forcing a single use of the multiply operand.
8632 2018-04-20 Martin Jambor <mjambor@suse.cz>
8635 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
8636 recursion dependency to only apply to non-clones.
8638 2018-04-20 Martin Jambor <mjambor@suse.cz>
8641 * ipa-cp.c (create_specialized_node): Check that clones of
8642 self-recursive edges exist during IPA-CP.
8644 2018-04-19 Toon Moene <toon@moene.org>
8646 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
8649 2018-04-19 Jakub Jelinek <jakub@redhat.com>
8651 PR tree-optimization/85467
8652 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
8653 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
8654 VECTOR_CST element to type.
8656 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
8659 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
8660 * config/i386/i386.md (builtin_setjmp_setup): Removed.
8661 (builtin_longjmp): Likewise.
8662 (save_stack_nonlocal): New pattern.
8663 (restore_stack_nonlocal): Likewise.
8665 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
8668 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8669 Replace ASM_OUTPUT_LABEL with fprintf.
8671 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
8674 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8675 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
8676 * config/i386/i386-c.c (ix86_target_macros_internal): Also
8677 define __IBT__ and __SHSTK__ for -fcf-protection.
8678 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
8680 (ix86_trampoline_init): Likewise.
8681 (x86_output_mi_thunk): Likewise.
8682 (ix86_notrack_prefixed_insn_p): Likewise.
8683 (ix86_option_override_internal): Don't disallow -fcf-protection.
8684 * config/i386/i386.md (rdssp<mode>): Also enable for
8686 (incssp<mode>): Likewise.
8687 (nop_endbr): Likewise.
8688 * config/i386/i386.opt (mcet): Change help message to built-in
8692 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
8693 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
8694 enable CET built-in functions.
8696 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
8698 * common/config/i386/i386-common.c
8699 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
8700 OPTION_MASK_ISA_MOVDIRI_UNSET,
8701 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
8702 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
8703 * config.gcc (movdirintrin.h): New header.
8704 * config/i386/cpuid.h (bit_MOVDIRI,
8705 bit_MOVDIR64B): New bits.
8706 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
8708 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
8709 (VOID, PVOID, PCVOID)): New function types.
8710 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
8711 __builtin_ia32_directstoreu_u64,
8712 __builtin_ia32_movdir64b): New builtins.
8713 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
8714 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
8716 (ix86_valid_target_attribute_inner_p): Ditto.
8717 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
8718 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
8719 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
8720 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
8721 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
8722 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
8723 (movdiri<mode>, movdir64b_<mode>): New.
8724 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
8725 * config/i386/immintrin.h: Include movdirintrin.h.
8726 * config/i386/movdirintrin.h: New file.
8727 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
8729 2018-04-19 Richard Biener <rguenther@suse.de>
8732 * cfg.c (clear_bb_flags): When loop state says we have
8733 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
8735 2018-04-19 Richard Biener <rguenther@suse.de>
8737 PR tree-optimization/84737
8738 * tree-vect-data-refs.c (vect_copy_ref_info): New function
8739 copying restrict info.
8740 (vect_setup_realignment): Use it.
8741 * tree-vectorizer.h (vect_copy_ref_info): Declare.
8742 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
8743 the first DR to all generated stores.
8744 (vectorizable_load): Likewise for loads.
8746 2018-04-19 Jakub Jelinek <jakub@redhat.com>
8748 PR tree-optimization/85446
8749 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
8750 the integral and pointer types to have the same precision.
8752 * doc/install.texi: Document --disable-cet being the default and
8755 2018-04-18 Martin Liska <mliska@suse.cz>
8757 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
8760 2018-04-18 Martin Liska <mliska@suse.cz>
8763 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
8766 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
8767 arguments if they are comparable.
8769 2018-04-18 Martin Liska <mliska@suse.cz>
8772 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
8775 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
8778 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
8781 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
8782 ENDBR after calling __morestack.
8784 2018-04-18 David Malcolm <dmalcolm@redhat.com>
8787 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
8788 by using gcc_base_ver to generate a gcc_driver_version, and use
8789 it when generating GCC_DRIVER_NAME.
8790 * configure: Regenerate.
8792 2018-04-18 Jakub Jelinek <jakub@redhat.com>
8795 * config.gcc: Obsolete powerpc*-*-*spe*.
8797 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8800 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
8801 (stabstr_D): Change type of unum from unsigned int to
8802 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
8805 2018-04-17 Jim Wilson <jimw@sifive.com>
8808 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
8809 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
8810 Set arg_pointer_offset after using pretend_args_size.
8812 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8814 PR rtl-optimization/85431
8815 * dse.c (record_store): Ignore zero width stores.
8818 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
8819 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
8820 __builtin_stack_restore rather than after it.
8821 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
8822 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
8823 argument instead of virtual_dynamic_stack_rtx.
8825 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
8827 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
8829 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8830 Add note to error message to explain internal mapping of overloaded
8831 built-in function name to non-overloaded built-in function name.
8832 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
8835 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
8838 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
8839 where the inputs overlap with the output.
8841 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8843 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
8844 (=v, v) alternative and explicit "memory" attribute.
8845 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
8846 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8848 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
8849 "sselog1" type instead of "sselog".
8850 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
8851 "sselog". Remove explicit "memory" attribute.
8852 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
8853 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8855 (vec_extract_hi_v32hi): Merge all alternatives into one, use
8856 "sselog1" type instead of "sselog". Remove explicit "memory"
8858 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
8859 use "sselog1" type instead of "sselog". Remove explicit "memory"
8861 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
8862 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8864 (vec_extract_hi_v64qi): Merge all alternatives into one, use
8865 "sselog1" type instead of "sselog". Remove explicit "memory"
8867 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
8868 use "sselog1" type instead of "sselog". Remove explicit "memory"
8872 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
8875 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
8878 2018-04-17 Martin Jambor <mjambor@suse.cz>
8881 * ipa-cp.c (create_specialized_node): Call
8882 expand_all_artificial_thunks if necessary.
8884 2018-04-17 Martin Liska <mliska@suse.cz>
8887 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
8888 in message, remote space in between '_G' and '('.
8890 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8893 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
8894 avx512f_vmcmp<mode>3<round_saeonly_name>,
8895 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
8896 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
8897 avx512f_rndscale<mode><round_saeonly_name>,
8898 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
8899 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
8900 Use %<iptr>2 instead of %2 for -masm=intel.
8901 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
8902 avx512f_vcvttss2usi<round_saeonly_name>,
8903 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
8905 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
8906 avx512f_vcvttsd2usi<round_saeonly_name>,
8907 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
8908 Use %q1 instead of %1 for -masm=intel.
8909 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
8910 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
8911 of %3 for -masm=intel.
8912 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
8914 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
8916 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
8918 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
8919 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
8921 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
8923 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
8924 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
8925 %g1 and one with %0 and %1.
8926 (avx512er_vmrcp28<mode><round_saeonly_name>,
8927 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
8929 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
8930 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
8931 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
8932 of %0 and %{%4%} for -masm=intel.
8933 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
8934 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
8935 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
8936 order of %0 and %{%5%}%{z%} for -masm=intel.
8938 2018-04-17 Jan Hubicka <jh@suse.cz>
8941 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
8943 2018-04-17 Martin Liska <mliska@suse.cz>
8946 * multiple_target.c (create_dispatcher_calls): Set apostrophes
8947 for target_clone error message. Make default implementation
8948 clone to be a local declaration.
8949 (separate_attrs): Add new argument and check for an empty
8951 (expand_target_clones): Handle it.
8952 (ipa_target_clone): Make redirection just for target_clones
8955 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
8956 Tom de Vries <tom@codesourcery.com>
8959 * omp-expand.c (expand_oacc_for): Add dummy false branch for
8960 tiled basic blocks without omp continue statements.
8962 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
8965 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
8966 vec_extract expression as having side effects to make sure it gets
8969 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
8972 * config/i386/i386.c (get_builtin_code_for_version): Check
8975 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
8978 * gcc/config.gcc: Support "skylake".
8979 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
8981 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
8982 (processor_target_table): Add "skylake".
8983 (ix86_option_override_internal): Add "skylake".
8984 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
8985 PROCESSOR_CANNONLAKE.
8986 (get_builtin_code_for_version): Fix priority for
8987 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
8988 PROCESSOR_SKYLAKE-AVX512.
8989 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
8990 (processor_type): Add PROCESSOR_SKYLAKE.
8992 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
8993 Jason Merrill <jason@redhat.com>
8996 * convert.c (convert_to_integer_1): Use direct recursion for
8997 enumeral types and types with a precision less than the number
8998 of bits in their mode.
9000 2018-04-16 Julia Koval <julia.koval@intel.com>
9003 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
9004 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
9006 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
9009 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
9010 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
9011 and -mno-direct-move.
9013 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
9016 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
9017 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
9018 Ensure negative shifts result in {0}.
9020 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
9022 PR rtl-optimization/79916
9023 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
9024 regs (if any) to define how to gnerate SD moves when LRA is in
9027 2018-04-13 Jakub Jelinek <jakub@redhat.com>
9029 PR rtl-optimization/85393
9030 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
9031 * except.c (expand_dw2_landing_pad_for_region): Make static.
9032 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
9033 a label and unconditional jump to old_bb, rather than
9034 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
9037 PR rtl-optimization/85376
9038 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
9039 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
9040 instead of a specific value.
9042 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9043 Bin Cheng <bin.cheng@arm.com>
9045 PR tree-optimization/82965
9046 PR tree-optimization/83991
9047 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
9048 by_profile_only parameter.
9049 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
9050 information if the loop was predicted to iterate too many times.
9051 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
9053 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9056 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
9059 2018-04-13 Martin Liska <mliska@suse.cz>
9060 Jakub Jelinek <jakub@redhat.com>
9063 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
9064 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
9065 * builtins.c (expand_builtin_memory_copy_args): Use
9066 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
9067 handle dest_addr == pc_rtx.
9069 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
9072 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
9073 asked to not generate direct moves.
9074 (fix_trunc<mode>si2_stfiwx): Similar.
9075 (fix_trunc<mode>si2_internal): Similar.
9077 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9080 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
9081 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
9082 lookup if dest in some wider mode is known to be const0_rtx and
9083 if so, record permanent equivalence for it to be ZERO_EXTEND of
9084 the narrower mode destination.
9086 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9088 * lto-streamer-out.c (output_function): Revert 259346.
9089 * omp-expand.c (expand_oacc_for): Likewise.
9091 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
9093 PR rtl-optimization/85354
9094 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
9095 * sel-sched.c (sel_global_init): ... here.
9097 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
9100 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
9101 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9102 mode for PE-COFF targets.
9103 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
9104 (i386_pe_asm_lto_end): Likewise.
9105 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
9106 (TARGET_ASM_LTO_END): Likewise.
9107 * config/i386/winnt.c (saved_debug_info_level): New static variable.
9108 (i386_pe_asm_lto_start): New function.
9109 (i386_pe_asm_lto_end): Likewise.
9111 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9112 Richard Biener <rguenther@suse.de>
9115 * lto-streamer-out.c (output_function): Fix CFG loop state before
9117 * omp-expand.c (expand_oacc_for): Handle calls to internal
9118 functions like regular functions.
9120 2018-04-12 Richard Biener <rguenther@suse.de>
9123 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
9124 for the early LTO debug to properly generate references to it
9125 during DIE emission. Do not re-use that for the skeleton for
9127 (dwarf2out_early_finish): Likewise.
9129 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9132 * config/i386/sse.md
9133 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
9134 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
9135 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
9136 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
9137 and output is a reg, avoid creating invalid lowpart subreg, but
9138 instead split into a 512-bit move. Don't split if not AVX512VL,
9139 input is xmm16+ reg and output is a mem.
9140 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
9141 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
9142 xmm16+ reg and output is a mem.
9144 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9146 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
9147 also for flag_dwarf2_cfi_asm.
9149 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9151 PR rtl-optimization/85342
9152 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
9153 a bool scalar var inside of the loop instead. Don't try to update
9154 recog_data.operand after failed apply_change_group.
9156 2018-04-12 Tom de Vries <tom@codesourcery.com>
9159 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
9160 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
9161 array with flexible array member as array without given dimension.
9162 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
9163 argument for undefined param to true.
9165 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
9168 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9169 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
9170 from PowerPC section.
9171 * config/rs6000/sysv4.opt (mcall-): Improve help text.
9172 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
9173 help text that is too long.
9174 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
9175 help text that is too long.
9176 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
9177 help text that is too long.
9179 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
9181 * config/alpha/alpha.md (stack_probe_internal): Rename
9182 from "probe_stack". Update all callers.
9184 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9186 PR rtl-optimization/84566
9187 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
9188 sched_macro_fuse_insns.
9190 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9193 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
9194 (compute_block_dependences): ... from here.
9196 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9198 PR tree-optimization/85331
9199 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
9200 from int to HOST_WIDE_INT.
9202 2018-04-11 Martin Jambor <mjambor@suse.cz>
9205 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
9206 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
9207 not the same as the source val.
9208 (cgraph_edge_brings_value_p): New parameter.
9209 (gather_edges_for_value): Pass destination value to
9210 cgraph_edge_brings_value_p.
9211 (perhaps_add_new_callers): Likewise.
9212 (get_info_about_necessary_edges): Likewise and exclude values brought
9213 only by self-recursive edges.
9214 (create_specialized_node): Redirect only clones of self-calling edges.
9215 (+self_recursive_pass_through_p): New function.
9216 (find_more_scalar_values_for_callers_subset): Use it.
9217 (find_aggregate_values_for_callers_subset): Likewise.
9218 (known_aggs_to_agg_replacement_list): Removed.
9219 (decide_whether_version_node): Re-calculate known constants for all
9220 remaining context clones.
9222 2018-04-11 Richard Biener <rguenther@suse.de>
9225 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
9226 from early DWARF output.
9227 (dwarf2out_early_finish): Output line info unconditionally into
9228 early DWARF and add reference to it.
9230 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9233 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
9234 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
9235 other than V2DFmode using iptr mode attribute.
9236 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
9238 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9240 PR rtl-optimization/84659
9241 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
9243 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9246 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
9248 (output_loc_list): Pass address of a dummy size variable even in the
9249 locview handling loop.
9250 (index_location_lists): Add comment on why skip_loc_list_entry can't
9253 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
9256 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
9259 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
9262 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9263 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
9264 and -mstring-compare-inline-limit.
9266 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
9269 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
9270 for stack clash protection in a register whenever we need it to be in
9273 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
9275 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
9276 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
9278 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
9281 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
9283 (mlong-double-): Ditto.
9284 * config/rs6000/sysv4.opt (msdata=): Ditto.
9285 (mtls-size=): Ditto.
9287 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
9289 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9290 erroneous entries for
9291 "vector int vec_ldl (int, long int *)", and
9292 "vector unsigned int vec_ldl (int, unsigned long int *)".
9293 Add comments and entries for
9294 "vector bool char vec_ldl (int, bool char *)",
9295 "vector bool short vec_ldl (int, bool short *)",
9296 "vector bool int vec_ldl (int, bool int *)",
9297 "vector bool long long vec_ldl (int, bool long long *)",
9298 "vector pixel vec_ldl (int, pixel *)",
9299 "vector long long vec_ldl (int, long long *)",
9300 "vector unsigned long long vec_ldl (int, unsigned long long *)".
9301 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
9302 type tree bool_long_long_type_node and correct definition of
9303 bool_V2DI_type_node to make reference to this new type tree.
9304 (rs6000_mangle_type): Replace erroneous reference to
9305 bool_long_type_node with bool_long_long_type_node.
9306 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
9307 comments to emphasize sign distinctions for char and int types and
9308 replace RS6000_BTI_bool_long constant with
9309 RS6000_BTI_bool_long_long constant. Also add comment to restrict
9310 use of RS6000_BTI_pixel.
9311 (bool_long_type_node): Remove this macro definition.
9312 (bool_long_long_type_node): New macro definition
9314 2018-04-10 Jakub Jelinek <jakub@redhat.com>
9316 PR rtl-optimization/85300
9317 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
9318 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
9319 simplify_unary_operation fails.
9321 2018-04-10 Martin Liska <mliska@suse.cz>
9323 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
9324 cgraph_edge and ipa_ref.
9326 2018-04-10 Jakub Jelinek <jakub@redhat.com>
9330 * config/i386/sse.md
9331 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
9332 computation of the VEC_MERGE selector from mask.
9333 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
9334 Fix decoding of the VEC_MERGE selector into mask.
9336 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
9338 PR tree-optimization/85286
9339 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
9341 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
9343 * final.c (final_1): Set insn_last_address as well as
9344 insn_current_address.
9346 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9349 * explow.c (emit_stack_probe): Call validize_mem on memory location
9350 before passing it to gen_probe_stack. Create address operand and
9351 legitimize it for the probe_stack_address case.
9353 2018-04-09 Jan Hubicka <jh@suse.cz>
9356 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
9357 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
9358 * tree.c (free_lang_data_in_type): Fix handling of binfos;
9360 (free_lang_data): Rebuild type inheritance graph.
9362 2018-04-09 Martin Sebor <msebor@redhat.com>
9364 * invoke.texi (-finline-small-functions): Mention other optimization
9366 (-findirect-inlining, -fpartial-inlining): Same.
9367 (-finline-functions-called-once): Same.
9368 (-freorder-blocks-and-partition): Same.
9370 2018-04-09 Jan Hubicka <jh@suse.cz>
9373 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
9374 jumps; choose last target that matches the criteria (i.e.
9375 no partition changes for non-crossing jumps).
9376 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
9377 support for redirecting crossing jumps to non-crossing.
9379 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
9381 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
9382 also for naked functions.
9384 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
9386 * config/arc/arc.md (add_shift): New pattern.
9387 (add_shift2): Likewise.
9388 (sub_shift): Likewise.
9389 (sub_shift_cmp0_noout): Likewise.
9390 (compare_si_ashiftsi): Likewise.
9391 (xbfu_cmp0_noout): New combine pattern.
9392 (xbfu_cmp0"): Likewise.
9393 (movsi_set_cc_insn): Place the predicable variant first.
9394 (commutative_binary_cmp0_noout): Remove clobber.
9395 (commutative_binary_cmp0): New pattern.
9396 (noncommutative_binary_cmp0): Likewise.
9397 (noncommutative_binary_cmp0_noout): Likewise.
9398 (noncommutative_binary_comparison_result_used): Removed.
9399 (rsub_cmp0): New pattern.
9400 (rsub_cmp0_noout): Likewise.
9401 (extzvsi): Changed, keep only meaningful variants.
9402 (SQH, SEZ): New iterators.
9403 (SQH_postfix): New mode attribute.
9404 (SEZ_prefix): New code attribute.
9405 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
9406 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
9407 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
9409 (noncommutative_operator): Check the availability of barrel
9412 2018-04-09 Richard Biener <rguenther@suse.de>
9414 PR tree-optimization/85284
9415 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
9416 Only use the niter constraining form of simple_iv when the exit
9419 2018-04-09 Tom de Vries <tom@codesourcery.com>
9422 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9423 (define_expand "*memory_barrier"): New define_expand.
9424 (define_insn "memory_barrier"): New insn.
9426 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9428 PR rtl-optimization/80463
9429 PR rtl-optimization/83972
9430 PR rtl-optimization/83480
9432 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
9433 correct producer for the insn.
9434 (tidy_control_flow): Fixup seqnos in case of debug insns.
9436 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9438 PR rtl-optimization/83913
9440 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
9441 different sched-times when merging exprs.
9443 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9445 PR rtl-optimization/83962
9447 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
9448 tidy_fallthru_edge and tidy_control_flow.
9450 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9452 PR rtl-optimization/83530
9454 * sel-sched.c (force_next_insn): New global variable.
9455 (remove_insn_for_debug): When force_next_insn is true, also leave only
9456 next insn in the ready list.
9457 (sel_sched_region): When the region wasn't scheduled, make another pass
9458 over it with force_next_insn set to 1.
9460 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
9462 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
9464 * config/nds32/constants.md (unspec_volatile_element): Add enum values
9465 for interrupt control.
9466 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9467 functions for interrupt control.
9468 * config/nds32/nds32-intrinsic.md: Likewise.
9469 * config/nds32/nds32_intrinsic.h: Likewise.
9470 * config/nds32/nds32.h (nds32_builtins): Likewise.
9472 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
9474 * config/nds32/nds32.c (nds32_init_machine_status,
9475 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
9476 strict_aligned_p field.
9477 (nds32_expand_to_rtl_hook): New function.
9478 (TARGET_EXPAND_TO_RTL_HOOK): Define.
9479 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
9481 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9482 Chung-Ju Wu <jasonwucj@gmail.com>
9484 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
9485 * config/nds32/nds32-n7.md: New file.
9486 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
9487 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
9489 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
9490 * config/nds32/nds32.md (pipeline_model): Add n7.
9491 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
9492 * config/nds32/pipelines.md: Include n7 settings.
9494 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9495 Chung-Ju Wu <jasonwucj@gmail.com>
9497 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
9498 * config/nds32/nds32-e8.md: New file.
9499 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
9500 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
9502 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
9503 * config/nds32/nds32.md (pipeline_model): Add e8.
9504 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
9505 * config/nds32/pipelines.md: Include e8 settings.
9507 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9508 Chung-Ju Wu <jasonwucj@gmail.com>
9510 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
9511 * config/nds32/nds32-n8.md: New file.
9512 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
9513 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
9515 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
9516 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
9517 * config/nds32/nds32.md (pipeline_model): Add n8.
9518 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
9519 * config/nds32/pipelines.md: Include n8 settings.
9521 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9522 Chung-Ju Wu <jasonwucj@gmail.com>
9524 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
9525 * config/nds32/nds32-n9-2r1w.md: New file.
9526 * config/nds32/nds32-n9-3r2w.md: New file.
9527 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
9528 nds32_register_ports): New or modify for cpu n9.
9529 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
9531 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
9532 * config/nds32/nds32-utils.c: New file.
9533 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
9534 TARGET_MUL_SLOW): Define.
9535 * config/nds32/nds32.md (pipeline_model): New attribute.
9536 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
9537 New options that support cpu n9.
9538 * config/nds32/pipelines.md: Include n9 settings.
9539 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
9541 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
9543 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
9544 information if necessary.
9545 (output_cond_branch_compare_zero): Likewise.
9546 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
9547 (nds32_target_alignment): Refine for alignment.
9548 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
9549 (FUNCTION_BOUNDARY): Modify.
9550 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
9552 * config/nds32/nds32.opt (malways-align, malign-functions): New.
9554 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
9556 * config/nds32/constants.md (unspec_volatile_element): Add values for
9557 TLB operation and data prefetch.
9558 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9559 functions for TLB operation and data prefetch.
9560 * config/nds32/nds32-intrinsic.md: Likewise.
9561 * config/nds32/nds32_intrinsic.h: Likewise.
9562 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
9563 (nds32_print_operand): Likewise.
9564 * config/nds32/nds32.h (nds32_builtins): Likewise.
9566 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
9567 Andrew Pinski <pinsika@gcc.gnu.org>
9570 * match.pd: Use constant_boolean_node of correct type instead of
9571 boolean_true_node or boolean_false_node for simplifying
9572 pointer comparisons to zero.
9574 2018-04-07 Jakub Jelinek <jakub@redhat.com>
9576 PR tree-optimization/80021
9577 * tree.c (verify_type_variant): Make error call in verify_variant_match
9578 translatable and remove final full stop.
9580 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9582 * config/nds32/constants.md (unspec_volatile_element): Add
9583 UNSPEC_VOLATILE_EH_RETURN.
9584 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
9585 nds32_output_stack_pop): Support dwarf exception handling process.
9586 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
9587 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
9588 exception handling process.
9589 (nds32_compute_stack_frame): Likewise.
9590 (nds32_return_addr_rtx): Likewise.
9591 (nds32_initial_elimination_offset): Likewise.
9592 (nds32_expand_prologue): Likewise.
9593 (nds32_expand_epilogue): Likewise.
9594 (nds32_dynamic_chain_address): New function.
9595 * config/nds32/nds32.h (machine_function): Add fields for dwarf
9597 (DYNAMIC_CHAIN_ADDRESS): Define.
9598 (EH_RETURN_DATA_REGNO): Define.
9599 (EH_RETURN_STACKADJ_RTX): Define.
9600 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
9601 patterns for dwarf exception handling.
9603 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9605 * config/nds32/nds32.h: Clean up obsolete macros.
9607 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9609 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9610 Add enum values for particular instructions.
9611 * config/nds32/nds32-intrinsic.c: Implementation of expanding
9612 particular intrinsic functions.
9613 * config/nds32/nds32-intrinsic.md: Likewise.
9614 * config/nds32/nds32_intrinsic.h: Likewise.
9615 * config/nds32/nds32.h (nds32_builtins): Likewise.
9616 * config/nds32/nds32.md (type): Add pbsad and pbsada.
9617 (btst, ave): New patterns for particular instructions.
9619 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9621 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9622 Add enum values for atomic load/store and memory sync.
9623 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
9625 * config/nds32/nds32-intrinsic.md: Likewise.
9626 * config/nds32/nds32_intrinsic.h: Likewise.
9627 * config/nds32/nds32.h (nds32_builtins): Likewise.
9629 2018-04-07 Jakub Jelinek <jakub@redhat.com>
9631 PR tree-optimization/85257
9632 * fold-const.c (native_encode_vector): If not all elts could fit
9633 and off is -1, return 0 rather than offset.
9634 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
9635 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
9636 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
9637 adjust buffer in native_interpret_expr call.
9639 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9641 * config/nds32/constants.md (unspec_volatile_element): Add cache
9642 control enum values.
9643 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
9644 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
9645 * config/nds32/nds32.c (nds32_cctl_names): New.
9646 (nds32_print_operand): Handle cache control register names.
9647 * config/nds32/nds32.h (nds32_builtins): New enum values.
9648 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
9650 * config/nds32/nds32.md (type): Add mmu.
9651 * config/nds32/pipelines.md (simple_insn): Add mmu.
9653 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9655 * config/nds32/nds32.md (type): Remove call.
9656 * config/nds32/pipelines.md (simple_insn): Likewise.
9658 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9660 * config/nds32/constants.md (unspec_volatile_element): Add
9661 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
9662 UNSPEC_VOLATILE_FMFCFG.
9663 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
9664 description for fmfcfg and fmfcsr.
9665 (bdesc_1arg): Add fmtcsr.
9666 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
9667 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
9668 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
9669 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
9670 unspec_fmfcfg): New patterns.
9671 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
9672 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
9673 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
9674 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
9675 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
9676 __nds32__fmfcfg): Define.
9678 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9680 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
9681 intrinsic register names.
9682 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
9683 intrinsic register enum values and macros.
9685 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9687 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
9688 for load/store addressing form.
9689 (nds32_print_operand_address): Likewise.
9691 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
9694 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
9695 based on LABEL_REF. Remove useless assertion.
9696 (pic_address_needs_scratch): Fix formatting.
9697 (sparc_legitimize_pic_address): Minor tweaks.
9698 (sparc_delegitimize_address): Adjust assertion accordingly.
9699 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
9700 into symbolic_operand.
9701 (movsi_high_pic_label_ref): Likewise.
9702 (movsi_lo_sum_pic_label_ref): Likewise.
9703 (movdi_pic_label_ref): Likewise.
9704 (movdi_high_pic_label_ref): Likewise.
9705 (movdi_lo_sum_pic_label_ref): Likewise.
9707 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
9709 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
9710 custom LIB_SPEC setup.
9712 2018-04-06 Ruslan Bukin <br@bsdpad.com>
9713 Kito Cheng <kito.cheng@gmail.com>
9715 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
9716 * config/riscv/freebsd.h: New.
9718 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
9720 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
9721 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
9724 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
9725 Kito Cheng <kito.cheng@gmail.com>
9727 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
9728 nds32_output_call, nds32_symbol_binds_local_p): New functions.
9729 * config/nds32/nds32-protos.h (nds32_output_call,
9730 nds32_output_return): Declare.
9731 * config/nds32/nds32.md: Refine all the call and return patterns.
9733 2018-04-06 Jakub Jelinek <jakub@redhat.com>
9736 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
9737 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
9739 PR rtl-optimization/84872
9740 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
9741 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
9744 2018-04-06 Tamar Christina <tamar.christina@arm.com>
9746 * expr.c (copy_blkmode_to_reg): Revert 254862.
9747 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
9749 2018-04-06 Richard Biener <rguenther@suse.de>
9752 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
9753 after seeing a component reference with an adjacent field. Treat
9754 refs to arrays at struct end of external decls similar to
9755 refs to unconstrained commons.
9757 2018-04-06 Jakub Jelinek <jakub@redhat.com>
9760 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
9761 look through SAVE_EXPRs with non-side-effects argument. Adjust
9763 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
9766 2018-04-06 Richard Biener <rguenther@suse.de>
9769 * alias.c (find_base_term): New wrapper around find_base_term
9770 unwinding CSELIB_VAL_PTR changes.
9771 (find_base_term): Do not restore CSELIB_VAL_PTR during the
9774 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9776 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
9778 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
9779 constant definitions.
9780 ("nop"): lr 0,0 -> nopr r0
9781 ("nop_lr0", "nop_lr1"): New insn definitions.
9783 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
9785 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
9786 NDS32_V3PUSH_AVAILABLE_P macro.
9788 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
9789 Chung-Ju Wu <jasonwucj@gmail.com>
9791 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
9792 (nds32*-*-*): Add float and fpu_config into supported_defaults.
9793 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
9794 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
9795 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
9796 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
9797 * config/nds32/constraints.md: New constraints and checking for hard
9798 float configuration.
9799 * config/nds32/iterators.md: New mode iterator and attribute for hard
9800 float configuration.
9801 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
9803 * config/nds32/nds32-fpu.md: New file.
9804 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
9805 deal with hard float code generation.
9806 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
9808 (abi_type, float_reg_number): New enum type.
9809 * config/nds32/nds32-predicates.c: New predicates for hard float.
9810 * config/nds32/nds32-protos.h: Declare functions for hard float.
9811 * config/nds32/nds32.c: Implementation for hard float configuration.
9812 * config/nds32/nds32.h: Definitions for hard float configuration.
9813 * config/nds32/nds32.md: Include hard float machine description and
9814 modify patterns for hard float configuration.
9815 * config/nds32/nds32.opt: New options for hard float configuration.
9816 * config/nds32/predicates.md: New predicates for hard float
9819 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
9821 * common/config/nds32/nds32-common.c
9822 (nds32_option_optimization_table): Enable -mreleax-hint by default.
9824 2018-04-05 Jakub Jelinek <jakub@redhat.com>
9827 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
9828 CONSTRUCTOR_ELT (ctor, ...)->value.
9830 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
9833 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
9835 2018-04-05 Tom de Vries <tom@codesourcery.com>
9838 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
9841 2018-04-05 Shiva Chen <shiva0217@gmail.com>
9842 Kito Cheng <kito.cheng@gmail.com>
9844 * config/nds32/constraints.md (U33): Fine-tune checking condition.
9845 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
9846 * config/nds32/nds32.h (nds32_16bit_address_type): Add
9847 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
9849 2018-04-05 Shiva Chen <shiva0217@gmail.com>
9850 Kito Cheng <kito.cheng@gmail.com>
9852 * config/nds32/constraints.md (Ufe): New memory constraint.
9853 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
9854 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
9855 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
9857 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
9858 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
9860 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9862 * config/nds32/nds32.md: Use optimize_size in the condition for
9863 alu-shift instructions.
9865 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9867 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
9869 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9871 * config/nds32/nds32.md (negsi2): Refine pattern.
9873 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
9874 Chung-Ju Wu <jasonwucj@gmail.com>
9876 * config/nds32/iterators.md (shift_rotate): New code iterator.
9877 (shift): New code attribute.
9878 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
9879 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
9880 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
9881 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
9882 bit-wise operations.
9883 (andsi3, *andsi3): Ditto.
9884 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
9885 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
9886 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
9887 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
9888 nds32_ior_operand, nds32_xor_operand): New predicates.
9890 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9892 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
9893 (addsi3, subsi3): ... this.
9895 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9897 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
9899 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9901 * config/nds32/nds32.md: Adjust indention.
9903 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
9905 * config/nds32/nds32.md (feature): New attribute.
9907 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9909 * config/nds32/nds32.md (subtype): New attribute.
9911 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
9914 * config/arm/arm-builtins.c (arm_expand_builtin): Change
9915 expansion to perform a bitwise AND of the argument followed by a
9916 boolean negation of the result.
9918 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
9920 PR rtl-optimization/84878
9921 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
9922 the basic block. Assert the use reference is not artificial and that
9923 it has an associated insn.
9925 2018-04-04 Michael Matz <matz@suse.de>
9927 * builtins.c (compute_objsize): Pass correct operand
9928 to array_at_struct_end_p.
9930 2018-04-04 Richard Biener <rguenther@suse.de>
9933 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
9934 from contexts for DINFO_LEVEL_TERSE and below.
9936 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
9938 * config/nds32/nds32-doubleword.md (move_<mode>): Require
9939 resiter_operand condition.
9940 * config/nds32/nds32.md (*move<mode>): Ditto.
9942 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
9943 Monk Chiang <sh.chiang04@gmail.com>
9945 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
9947 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
9949 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
9951 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
9952 Kito Cheng <kito.cheng@gmail.com>
9954 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
9955 nds32_cond_code_str, output_cond_branch,
9956 output_cond_branch_compare_zero, nds32_expand_cbranch,
9957 nds32_expand_cstore, nds32_expand_movcc,
9958 nds32_output_cbranchsi4_equality_zero,
9959 nds32_output_cbranchsi4_equality_reg,
9960 nds32_output_cbranchsi4_equality_reg_or_const_int,
9961 nds32_output_cbranchsi4_greater_less_zero: New functions.
9962 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
9963 nds32_expand_cstore, nds32_expand_movcc,
9964 nds32_output_cbranchsi4_equality_zero,
9965 nds32_output_cbranchsi4_equality_reg,
9966 nds32_output_cbranchsi4_equality_reg_or_const_int,
9967 nds32_output_cbranchsi4_greater_less_zero): Declare.
9968 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
9969 nds32_rimm11s_operand): New predicates.
9970 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
9971 * config/nds32/nds32.md: Rewrite all the branch and conditional move
9974 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
9976 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
9977 * config/nds32/nds32.md: Ditto.
9978 * config/nds32/pipelines.md: Ditto.
9980 2018-04-04 Richard Biener <rguenther@suse.de>
9982 PR tree-optimization/85168
9983 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
9984 propagating abnormals.
9986 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
9988 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
9990 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
9991 Kito Cheng <kito.cheng@gmail.com>
9993 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
9994 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
9995 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
9996 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
9997 * config/nds32/nds32.md (sibcall_internal): New.
9998 (sibcall_register): Remove.
9999 (sibcall_immediate): Remove.
10000 (sibcall_value_internal): New.
10001 (sibcall_value_register): Remove.
10002 (sibcall_value_immediate): Remove.
10003 * config/nds32/predicates.md (nds32_general_register_operand): New.
10004 (nds32_call_address_operand): New.
10006 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10008 PR rtl-optimization/85167
10009 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
10010 bb_defs if *split_p, instead preinitialize it to NULL.
10012 PR tree-optimization/85156
10013 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
10014 evaluating the argument multiple times.
10016 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
10018 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
10020 (_mm_cvtpd_ps): Likewise.
10021 (_mm_cvttpd_epi32): Likewise.
10022 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
10023 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
10024 vector, pixel, and bool following altivec.h include.
10026 2018-04-03 Martin Sebor <msebor@redhat.com>
10028 * doc/extend.texi (Common Function Attributes): Clarify.
10029 (const attribute): Likewise.
10030 (pure attribute): Likewise.
10032 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10035 * config/i386/i386.c (ix86_expand_vector_set): Use
10036 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
10038 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
10040 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
10041 instructions when changing rounding bits to preserve precision bits
10042 in the x87 control word.
10044 2018-04-03 Martin Liska <mliska@suse.cz>
10046 PR tree-optimization/82491
10047 * rtl.h (strip_offset_and_add): Replace += suboffset with
10048 poly_uint64 () + suboffset.
10050 2018-03-29 Martin Liska <mliska@suse.cz>
10051 Martin Jambor <mjambor@suse.cz>
10054 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
10055 param_type is not an integral or pointer type.
10057 2018-04-03 Richard Biener <rguenther@suse.de>
10059 * sese.h (recompute_all_dominators): Remove.
10061 2018-04-02 Martin Sebor <msebor@redhat.com>
10063 * doc/invoke.texi (-Wrestrict): Fix typos.
10065 2018-04-02 Jim Wilson <jimw@sifive.com>
10067 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
10068 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
10069 (<optab>di3, <optab>si3_extend): Likewise.
10070 (<optab>si3_mask, <optab>si3_mask_1): New.
10071 (<optab>di3_mask, <optab>di3_mask_1): New.
10072 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
10073 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
10074 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
10076 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
10078 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
10081 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
10083 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
10084 (nds32_canonicalize_comparison): New function.
10086 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10087 Kito Cheng <kito.cheng@gmail.com>
10088 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10090 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
10091 * config/nds32/constants.md (unspec_volatile_element): Add
10092 UNSPEC_VOLATILE_RELAX_GROUP.
10093 * config/nds32/nds32-relax-opt.c: New file.
10094 * config/nds32/nds32-predicates.c
10095 (nds32_symbol_load_store_p): New function.
10096 * config/nds32/nds32-protos.h
10097 (nds32_symbol_load_store_p): Declare function.
10098 (make_pass_nds32_relax_opt): Declare new rtl pass function.
10099 * config/nds32/nds32.c
10100 (nds32_register_pass): New function to register pass.
10101 (nds32_register_passes): New function to register passes.
10102 * config/nds32/nds32.md (relax_group): New pattern.
10103 * config/nds32/nds32.opt (mrelax-hint): New option.
10104 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
10106 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
10108 * config/nds32/t-nds32: Modify files dependency.
10110 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10112 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
10113 (PROFILE_HOOK): Define its implementation.
10115 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10117 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
10118 type and 32-bit size.
10120 2018-04-01 Jakub Jelinek <jakub@redhat.com>
10122 PR middle-end/85090
10123 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
10124 (V_128_256): New mode iterator.
10125 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
10126 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
10127 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
10129 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
10130 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
10132 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
10135 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
10136 NaN inputs correctly.
10138 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
10141 * config/rs6000/vsx.md (??r): New mode attribute.
10142 (*vsx_mov<mode>_64bit): Use it.
10143 (*vsx_mov<mode>_32bit): Likewise.
10145 2018-03-30 Martin Sebor <msebor@redhat.com>
10147 PR tree-optimization/84818
10148 * builtins.c (check_access): Use warning_n.
10150 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10153 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
10155 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
10158 2018-03-30 Julia Koval <julia.koval@intel.com>
10161 * x86-tune.def (movx, partial_reg_dependency): Enable for
10164 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
10166 PR inline-asm/84985
10167 * lra-constraints.c (process_alt_operands): Move setting
10168 this_alternative_matches below.
10170 2018-03-29 Martin Liska <mliska@suse.cz>
10173 * doc/invoke.texi: Document how LTO works with debug info.
10174 Describe auto-load support of binutils. Mention 'x86-64'
10175 as valid option value of -march option.
10177 2018-03-29 Jakub Jelinek <jakub@redhat.com>
10179 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
10182 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
10183 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
10184 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
10187 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
10190 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
10191 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
10192 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
10193 for RS6000_BTM_POWERPC64.
10194 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
10195 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
10196 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
10199 (DIVDEU): Likewise.
10201 2018-03-28 Carl Love <cel@us.ibm.com>
10204 2017-09-27 Carl Love <cel@us.ibm.com>
10206 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
10207 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
10208 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
10211 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10213 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
10214 instead of __vector bool.
10215 (_mm_max_pu8): Likewise.
10216 (_mm_min_pi16): Likewise.
10218 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
10221 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
10222 (DIVWEUO): Likewise.
10223 (DIVDEO): Likewise.
10224 (DIVDEUO): Likewise.
10225 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
10226 DIVWEUO and DIVDEUO.
10227 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
10228 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
10229 (div_extend): Likewise.
10230 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
10232 (__builtin_divweuo): Likewise.
10233 (__builtin_divdeo): Likewise.
10234 (__builtin_divdeuo): Likewise.
10236 2018-03-28 Jakub Jelinek <jakub@redhat.com>
10239 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
10240 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
10242 PR tree-optimization/82004
10243 * gimple-match-head.c (optimize_pow_to_exp): New function.
10244 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
10245 Don't fold to exp if optimize_pow_to_exp is false.
10247 2018-03-28 Martin Liska <mliska@suse.cz>
10250 * calls.c (initialize_argument_information): Fix trailing space.
10251 * common.opt: Fix typo and provide better explanation for
10252 -fsanitize-coverage option.
10253 * config/i386/i386.opt: Fix typo.
10255 2018-03-28 Jakub Jelinek <jakub@redhat.com>
10256 Martin Liska <mliska@suse.cz>
10259 * gimplify.c (asan_poison_variable): Don't do the check for
10260 gimplify_omp_ctxp here.
10261 (gimplify_decl_expr): Do it here.
10262 (gimplify_target_expr): Likewise.
10264 2018-03-28 Martin Liska <mliska@suse.cz>
10267 * config/i386/i386.c (ix86_function_arg_advance): Do not call
10268 chkp_type_bounds_count if MPX is not enabled.
10270 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
10272 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
10274 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
10277 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
10278 function to create the function decl for complex long double
10279 multiply and divide for -mabi=ieeelongdouble.
10280 (init_float128_ieee): Call it.
10282 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
10285 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
10286 -fcf-protection=branch -mibt.
10287 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
10289 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10292 * config/arm/arm.c (arm_valid_symbolic_address): Handle
10293 arm_word_relocations.
10295 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
10298 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
10299 extern array declarations.
10301 2018-03-27 Richard Biener <rguenther@suse.de>
10303 PR middle-end/84067
10304 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
10305 explicit single_use checks.
10307 2018-03-27 Richard Biener <rguenther@suse.de>
10309 PR tree-optimization/85082
10310 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
10313 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10315 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
10316 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
10317 Turn on fasynchronous-unwind-tables and funwind-tables.
10319 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
10322 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
10323 (*bmi_blsr_<mode>_ccz): Ditto.
10325 2018-03-26 Tom de Vries <tom@codesourcery.com>
10327 PR tree-optimization/85063
10328 * omp-general.c (offloading_function_p): New function. Factor out
10330 * omp-offload.c (pass_omp_target_link::gate): ... here.
10331 * omp-general.h (offloading_function_p): Declare.
10332 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
10333 with attribute omp declare target for offloading functions.
10335 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
10337 PR tree-optimization/84005
10338 * tree-data-ref.h (get_base_for_alignment): Declare.
10339 * tree-data-ref.c (get_base_for_alignment_1): New function.
10340 (get_base_for_alignment): Likewise.
10341 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
10342 get_base_for_alignment to find a suitable base object, instead
10343 of always using drb->base_address.
10345 2018-03-23 Jakub Jelinek <jakub@redhat.com>
10347 PR inline-asm/85022
10348 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
10349 known size by default.
10351 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
10353 PR inline-asm/85030
10354 * lra-constraints.c (process_alt_operands): Don't match BLKmode
10355 and non BLKmode operands.
10357 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10360 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
10361 Clean up attributes.
10363 2018-03-23 Richard Biener <rguenther@suse.de>
10366 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
10367 we are going to emit early debug for LTO.
10369 2018-03-23 Jakub Jelinek <jakub@redhat.com>
10371 PR inline-asm/85034
10372 * function.c (match_asm_constraints_1): Don't optimize if input
10373 doesn't satisfy general_operand predicate for output's mode.
10375 PR inline-asm/85022
10376 * alias.c (write_dependence_p): Don't require for x_canonicalized
10377 non-VOIDmode if x has VOIDmode.
10380 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
10381 just don't try to optimize it rather than assert it never happens.
10383 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
10385 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
10386 macro expansions for definition of ST_INTERNAL_<mode> and
10387 LD_INTERNAL_<mode> builtins.
10388 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
10390 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
10392 (altivec_expand_st_builtin): Likewise.
10393 (altivec_expand_builtin): Remove calls to deleted functions.
10394 (rs6000_address_for_altivec): Delete this function.
10395 * config/rs6000/vector.md: Remove expands for
10396 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
10398 2018-03-22 Sudakshina Das <sudi.das@arm.com>
10401 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
10402 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
10403 re-computing once computed.
10404 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
10405 (arm_init_machine_status): Initialize
10406 machine->static_chain_stack_bytes.
10408 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
10411 * doc/extend.texi: Add four new prototypes for vec_ld.
10412 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
10413 definitions for more logical presentation.
10414 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
10415 entries for V1TI variants of __builtin_altivec_ld builtin.
10416 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
10417 handling of V1TI variant of LVX icode pattern.
10418 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
10419 (rs6000_gimple_fold_builtin): Likewise.
10420 (altivec_init_builtins): Add code to define
10421 __builtin_altivec_lvx_v1ti function.
10423 2018-03-22 Jakub Jelinek <jakub@redhat.com>
10425 PR inline-asm/84941
10426 * function.c (match_asm_constraints_1): Don't do the optimization
10427 if input isn't a REG, SUBREG, MEM or constant.
10429 2018-03-22 Tom de Vries <tom@codesourcery.com>
10431 PR tree-optimization/84956
10432 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
10433 bb_has_abnormal_pred.
10435 2018-03-22 Jakub Jelinek <jakub@redhat.com>
10438 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
10439 DECL_INITIAL (decl) to decl at the end.
10440 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
10441 adjust the comment.
10443 2018-03-21 Joseph Myers <joseph@codesourcery.com>
10445 * doc/extend.texi (__builtin_tgmath): Document when complex
10446 integer types are treated as _Complex _Float64.
10448 2018-03-21 Tom de Vries <tom@codesourcery.com>
10450 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
10452 2018-03-21 Jakub Jelinek <jakub@redhat.com>
10454 PR tree-optimization/84960
10455 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
10456 if it is ENTRY block, move them into single succ of ENTRY in that case.
10458 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
10460 PR tree-optimization/84811
10461 * poly-int.h (poly_span_traits): Remove the T3 parameter and
10462 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
10463 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
10464 (known_subrange_p): Update accordingly. Cast each value involved
10465 in the size comparison, rather than casting the result of the
10468 2018-03-21 Jakub Jelinek <jakub@redhat.com>
10470 PR tree-optimization/84982
10471 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
10472 by flipping the least significant bit rather than all bits from
10473 bitpos to bitpos + bitsize - 1.
10475 2018-03-21 Nathan Sidwell <nathan@acm.org>
10477 * doc/extend.texi (Deprecated Features): Remove mention of
10478 long-deleted deprecations.
10480 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10483 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
10484 * configure: Regenerate.
10486 2018-03-21 Tom de Vries <tom@codesourcery.com>
10488 PR tree-optimization/83126
10489 * tree-parloops.c (num_phis): New function.
10490 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
10492 2018-03-21 Nathan Sidwell <nathan@acm.org>
10494 * doc/extend.texi (Deprecated Features): Update deprecated flags,
10495 mention anon-struct/union members and trailing attributes.
10497 2018-03-21 Bin Cheng <bin.cheng@arm.com>
10499 PR tree-optimization/84969
10500 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
10501 builtin memset partitions if they set different rhs values.
10503 2018-03-21 Jakub Jelinek <jakub@redhat.com>
10505 PR rtl-optimization/84989
10506 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
10507 VEC_DUPLICATE with scalar result mode.
10509 2018-03-21 Martin Liska <mliska@suse.cz>
10512 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
10513 not intended return statement.
10515 2018-03-21 Martin Liska <mliska@suse.cz>
10518 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
10519 (chkp_find_bound_slots_1): Limit number of iterations.
10521 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
10524 * Minor grammar fixes for x86 options.
10526 2018-03-20 Jakub Jelinek <jakub@redhat.com>
10529 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
10530 holding REG_CFA_RESTORE notes, instead turn them into a USE.
10532 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
10535 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
10536 (altivec_lvx_<mode>_1op): Likewise.
10537 (altivec_stvx_<mode>_2op): Likewise.
10538 (altivec_stvx_<mode>_1op): Likewise.
10539 (altivec_lvx_<VM2:mode>): New define_expand.
10540 (altivec_stvx_<VM2:mode>): Likewise.
10541 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
10542 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10543 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
10544 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10545 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
10546 (rs6000_gen_lvx): Likewise.
10547 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
10548 (altivec_expand_stv_builtin): Likewise.
10549 (altivec_expand_builtin): Likewise.
10550 * config/rs6000/vector.md: Likewise.
10552 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10555 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
10558 2018-03-20 Richard Biener <rguenther@suse.de>
10561 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
10562 sign-conversions as zero, fall back to standard scalar_stmt
10565 2018-03-20 Martin Liska <mliska@suse.cz>
10568 * predict.c (rebuild_frequencies): Handle case when we have
10569 PROFILE_ABSENT, but flag_guess_branch_prob is false.
10571 2018-03-20 Jakub Jelinek <jakub@redhat.com>
10574 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
10575 flag_section_anchors.
10576 * varasm.c (use_blocks_for_decl_p): Remove hack for
10577 dw2_force_const_mem.
10580 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
10582 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
10583 be created, use lowpart_subreg of operands[0] rather than operands[0]
10585 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
10586 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
10587 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
10588 and n constraint instead of aarch64_shift_imm_di and Usd.
10589 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
10590 (*aarch64_<optab>_reg_minus<mode>3): ... this.
10592 2018-03-20 Sudakshina Das <sudi.das@arm.com>
10595 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
10596 to favor GPR over NEON registers.
10597 (<shift>di3_neon): Likewise.
10599 2018-03-20 Tom de Vries <tom@codesourcery.com>
10602 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
10603 (nvptx_process_pars): Emit bar.sync asap and alap.
10605 2018-03-20 Tom de Vries <tom@codesourcery.com>
10608 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
10609 seen_label if seen_label is already set.
10611 2018-03-20 Jakub Jelinek <jakub@redhat.com>
10614 * config/i386/i386.c (fold_builtin_cpu): For features above 31
10615 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
10616 Use 1U instead of 1. Formatting fixes.
10619 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
10620 instead of TREE_TYPE (s1) for the return value.
10622 2018-03-19 Jakub Jelinek <jakub@redhat.com>
10624 PR tree-optimization/84946
10625 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
10626 bitsize + bitsize in poly_uint64 rather than poly_int64.
10629 * dwarf2asm.c: Include fold-const.c.
10630 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
10631 of decl rather than decl itself.
10633 PR rtl-optimization/84643
10634 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
10636 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
10639 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
10640 calling assemble_variable.
10642 2018-03-19 Sudakshina Das <sudi.das@arm.com>
10645 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
10646 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
10648 2018-03-19 Jim Wilson <jimw@sifive.com>
10651 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
10652 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
10653 (riscv_first_stack_step): Likewise.
10654 (riscv_option_override): Use STACK_BOUNDARY instead of
10655 MIN_STACK_BOUNDARY.
10656 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
10657 MIN_STACK_BOUNDARY.
10658 (BIGGEST_ALIGNMENT): Set to 128.
10659 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
10660 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
10663 2018-03-19 Richard Biener <rguenther@suse.de>
10665 PR tree-optimization/84933
10666 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
10667 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
10669 2018-03-19 Richard Biener <rguenther@suse.de>
10671 PR tree-optimization/84859
10672 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
10673 (cond_if_else_store_replacement): Perform sinking operation on
10674 single-store BBs regardless of MAX_STORES_TO_SINK setting.
10675 Generalize what a BB with a single eligible store is.
10677 2018-03-19 Richard Biener <rguenther@suse.de>
10679 PR tree-optimization/84929
10680 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
10681 chrec_is_positive against non-chrec arg.
10683 2018-03-19 Tamar Christina <tamar.christina@arm.com>
10686 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
10688 2018-03-18 Martin Liska <mliska@suse.cz>
10690 PR rtl-optimization/84635
10691 * regrename.c (build_def_use): Use matches_mode only when
10694 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
10696 PR tree-optimization/84913
10697 * tree-vect-loop.c (vectorizable_reduction): Don't try to
10698 vectorize chains of COND_EXPRs.
10700 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
10702 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
10704 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
10706 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
10708 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
10710 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
10712 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
10713 Kito Cheng <kito.cheng@gmail.com>
10715 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
10716 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
10717 (nds32_adjust_reg_alloc_order): New function.
10718 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
10720 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
10722 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
10723 nds32_print_operand, nds32_print_operand_address): Use
10724 HOST_WIDE_INT_PRINT_DEC instead.
10726 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
10728 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
10730 2018-03-17 Jakub Jelinek <jakub@redhat.com>
10733 * config/i386/i386.c (initial_ix86_tune_features,
10734 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
10735 unsigned long long.
10736 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
10737 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
10738 rather than 1u << ix86_tune. Formatting fix.
10739 (ix86_option_override_internal): Change ix86_arch_mask from
10740 unsigned int to unsigned HOST_WIDE_INT, initialize to
10741 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
10742 (ix86_function_specific_restore): Likewise.
10744 2018-03-16 Jakub Jelinek <jakub@redhat.com>
10747 * postreload.c (reload_combine_recognize_pattern): Perform
10748 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
10749 truncate_int_for_mode the result for the destination's mode.
10752 * hsa-gen.c (mem_type_for_type): Fix comment typo.
10753 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
10755 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
10758 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
10761 * lra-assigns.c (lra_split_hard_reg_for): Don't use
10762 regno_allocno_class_array and sorted_pseudos.
10763 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
10764 insns where regno is used.
10766 2018-03-16 Martin Liska <mliska@suse.cz>
10769 * multiple_target.c (create_dispatcher_calls): Redirect
10770 reference in the symbol table.
10772 2018-03-16 Martin Liska <mliska@suse.cz>
10775 * multiple_target.c (create_dispatcher_calls): Redirect also
10778 2018-03-16 Jakub Jelinek <jakub@redhat.com>
10782 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
10783 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
10784 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
10786 2018-03-16 Julia Koval <julia.koval@intel.com>
10788 * doc/invoke.texi (Skylake Server): Add CLWB.
10789 Cannonlake): Remove CLWB.
10791 2018-03-16 Jakub Jelinek <jakub@redhat.com>
10793 PR tree-optimization/84841
10794 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
10796 (FLOAT_ONE_CONST_TYPE): Define.
10797 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
10798 (sort_by_operand_rank): Put entries with higher constant_type last
10799 rather than first to match comments.
10801 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
10803 * config/nios2/nios2.md (movsi_internal): Fix thinko in
10806 2018-03-15 Jakub Jelinek <jakub@redhat.com>
10809 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
10810 check and use address of target always.
10812 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
10815 * config/i386/i386.c (indirect_thunk_needed): Update comments.
10816 (indirect_thunk_bnd_needed): Likewise.
10817 (indirect_thunks_used): Likewise.
10818 (indirect_thunks_bnd_used): Likewise.
10819 (indirect_return_needed): New.
10820 (indirect_return_bnd_needed): Likewise.
10821 (output_indirect_thunk_function): Add a bool argument for
10823 (output_indirect_thunk_function): Don't generate alias for
10824 function return thunk.
10825 (ix86_code_end): Call output_indirect_thunk_function to generate
10826 function return thunks.
10827 (ix86_output_function_return): Set indirect_return_bnd_needed
10828 and indirect_return_needed instead of indirect_thunk_bnd_needed
10829 and indirect_thunk_needed.
10831 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
10833 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
10834 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
10835 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
10837 2018-03-15 David Malcolm <dmalcolm@redhat.com>
10838 Paul Hua <paul.hua.gm@gmail.com>
10841 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
10843 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
10845 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
10846 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
10847 resp. SFmode cases.
10849 2018-03-15 Tamar Christina <tamar.christina@arm.com>
10852 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10853 instead of GET_MODE_SIZE when comparing Units.
10855 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10858 * varasm.c (hash_section): Return an unchangeble hash value
10859 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
10860 Return !aarch64_can_use_per_function_literal_pools_p ().
10862 2018-03-15 Jakub Jelinek <jakub@redhat.com>
10865 * optabs.c (emit_conditional_move): Pass address of cmode's copy
10866 rather than address of cmode as last argument to prepare_cmp_insn.
10868 2018-03-15 Julia Koval <julia.koval@intel.com>
10870 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
10871 F_AVX512VNNI, F_AVX512BITALG): New.
10873 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
10876 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
10877 insn for floating-point loads and stores.
10879 2018-03-14 Carl Love <cel@us.ibm.com>
10881 * config/rs6000/rs6000-c.c: Add macro definitions for
10882 ALTIVEC_BUILTIN_VEC_PERMXOR.
10883 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
10884 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
10885 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
10886 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
10888 * config/doc/extend.texi: Add prototypes for vec_permxor.
10890 2018-03-14 David Malcolm <dmalcolm@redhat.com>
10893 * diagnostic-show-locus.c (class layout_point): Convert m_line
10894 from int to linenum_type.
10895 (line_span::comparator): Use linenum "compare" function when
10896 comparing line numbers.
10897 (test_line_span): New function.
10898 (layout_range::contains_point): Convert param "row" from int to
10900 (layout_range::intersects_line_p): Likewise.
10901 (layout::will_show_line_p): Likewise.
10902 (layout::print_source_line): Likewise.
10903 (layout::should_print_annotation_line_p): Likewise.
10904 (layout::print_annotation_line): Likewise.
10905 (layout::print_leading_fixits): Likewise.
10906 (layout::annotation_line_showed_range_p): Likewise.
10907 (struct line_corrections): Likewise for field m_row.
10908 (line_corrections::line_corrections): Likewise for param "row".
10909 (layout::print_trailing_fixits): Likewise.
10910 (layout::get_state_at_point): Likewise.
10911 (layout::get_x_bound_for_row): Likewise.
10912 (layout::print_line): Likewise.
10913 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
10914 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
10915 * input.c (selftest::test_linenum_comparisons): New function.
10916 (selftest::input_c_tests): Call it.
10917 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
10918 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
10919 * selftest.h (ASSERT_GT): New macro.
10920 (ASSERT_GT_AT): New macro.
10921 (ASSERT_LT): New macro.
10922 (ASSERT_LT_AT): New macro.
10924 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
10926 PR rtl-optimization/84780
10927 * combine.c (distribute_links): Don't make a link based on pc_rtx.
10929 2018-03-14 Martin Liska <mliska@suse.cz>
10931 * tree.c (record_node_allocation_statistics): Use
10932 get_stats_node_kind.
10933 (get_stats_node_kind): New function extracted from
10934 record_node_allocation_statistics.
10935 (free_node): Use get_stats_node_kind.
10937 2018-03-14 Richard Biener <rguenther@suse.de>
10939 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
10940 that the value-set of ANTIC_IN doesn't grow.
10943 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
10945 (BB_VISITED_WITH_VISITED_SUCCS): New define.
10946 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
10948 2018-03-14 Julia Koval <julia.koval@intel.com>
10950 * config.gcc (icelake-client, icelake-server): New.
10952 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
10953 (initial_ix86_arch_features): Ditto.
10954 (PTA_SKYLAKE): Add SGX.
10955 (PTA_ICELAKE): Remove.
10956 (PTA_ICELAKE_CLIENT): New.
10957 (PTA_ICELAKE_SERVER): New.
10958 (ix86_option_override_internal): Split up icelake on icelake client and
10960 (get_builtin_code_for_version): Ditto.
10961 (fold_builtin_cpu): Ditto.
10962 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
10963 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
10964 * config/i386/i386.h (processor_type): Ditto.
10965 * doc/invoke.texi: Ditto.
10967 2018-03-14 Jakub Jelinek <jakub@redhat.com>
10970 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
10971 INTEGER_CST offset, add it together with bitpos / 8 and
10972 sign extend based on POINTER_SIZE.
10976 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
10979 * config/i386/constraints.md (Yc): New register constraint.
10980 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
10981 Use Yc constraint for alternative 2 of operand 0. Remove
10982 preferred_for_speed attribute.
10984 2018-03-14 Richard Biener <rguenther@suse.de>
10986 PR tree-optimization/84830
10987 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
10988 with the old one to avoid oscillations.
10990 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
10993 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
10995 (assign_by_spills): Return a flag of reload assignment failure.
10996 Do not process the reload assignment failures. Do not spill other
10997 reload pseudos if they has the same reg class. Update n if
10999 (lra_assign): Add a return arg. Set up from the result of
11000 assign_by_spills call.
11001 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11002 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11003 usage_insns if it is not NULL.
11004 (spill_hard_reg_in_range): New function.
11005 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11006 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11007 function prototypes.
11008 (lra_assign): Change prototype.
11009 * lra.c (lra): Add code to deal with fails by splitting hard reg
11012 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
11014 * config/riscv/riscv.opt (mrelax): New option.
11015 * config/riscv/riscv.c (riscv_file_start): Emit ".option
11016 "norelax" when riscv_mrelax is disabled.
11017 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
11019 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11022 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
11023 reassociation for int modes.
11025 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11027 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
11028 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
11030 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
11031 * config/aarch64/aarch64-sve.md
11032 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
11033 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
11034 (*extend<mode><Vwide>2): Rename to...
11035 (aarch64_sve_extend<mode><Vwide>2): ...this.
11036 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
11037 renaming the old pattern to...
11038 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
11040 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
11041 define_expand, renaming the old pattern to...
11042 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
11043 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
11044 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
11045 account when deciding which SVE instruction the optab should use.
11046 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
11048 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11050 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
11051 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
11052 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
11053 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
11054 (tlsdesc_small_<mode>): Turn a define_expand and use
11055 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
11056 (tlsdesc_small_advsimd_<mode>): ...this.
11057 (tlsdesc_small_sve_<mode>): New pattern.
11059 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11061 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
11062 (UNSPEC_UMUL_HIGHPART): New constants.
11063 (MUL_HIGHPART): New int iteraor.
11064 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
11065 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
11067 (*<su>mul<mode>3_highpart): New define_insn.
11069 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11072 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11075 2018-03-13 Martin Liska <mliska@suse.cz>
11078 * (sem_item_optimizer::sem_item_optimizer): Initialize new
11080 (sem_item_optimizer::~sem_item_optimizer): Release it.
11081 (sem_item_optimizer::merge_classes): Register variable aliases.
11082 (sem_item_optimizer::fixup_pt_set): New function.
11083 (sem_item_optimizer::fixup_points_to_sets): Likewise.
11084 * ipa-icf.h: Declare new variables and functions.
11086 2018-03-13 Jakub Jelinek <jakub@redhat.com>
11088 PR middle-end/84834
11089 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
11090 integer_pow2p@2 and test integer_pow2p in condition.
11091 (A < 0 ? C : 0): Similarly for @1.
11093 PR middle-end/84831
11094 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
11095 characters starting at p contain '\0' character, don't look beyond
11099 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
11100 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
11103 * reg-stack.c (change_stack): Change update_end var from int to
11104 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
11105 also call set_block_for_insn on the newly added insns and rescan.
11108 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
11109 on the last operand.
11112 * tree.c (stabilize_reference_1): Return save_expr (e) for
11113 STATEMENT_LIST even if it doesn't have side-effects.
11115 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
11117 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
11119 2018-03-12 Renlin Li <renlin.li@arm.com>
11121 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
11122 aarch64_output_scalar_simd_mov_immediate.
11124 2018-03-12 Martin Sebor <msebor@redhat.com>
11126 PR tree-optimization/83456
11127 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
11128 for perfectly overlapping calls to memcpy.
11129 (gimple_fold_builtin_memory_chk): Same.
11130 (gimple_fold_builtin_strcpy): Handle no-warning.
11131 (gimple_fold_builtin_stxcpy_chk): Same.
11132 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
11134 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11136 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
11137 parameter. Use it for SFmode.
11138 (rs6000_function_arg_advance_1): Adjust.
11139 (rs6000_function_arg): Adjust.
11140 (rs6000_gimplify_va_arg): Pass false for that new parameter.
11142 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11144 PR rtl-optimization/84169
11145 PR rtl-optimization/84780
11146 * combine.c (can_combine_p): Check for a 2-insn combination whether
11147 the destination register is used between the two insns, too.
11149 2018-03-12 Richard Biener <rguenther@suse.de>
11151 PR tree-optimization/84803
11152 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
11153 for refs DR analysis didn't process.
11155 2018-03-12 Richard Biener <rguenther@suse.de>
11157 PR tree-optimization/84777
11158 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
11159 force-vectorize loops ignore whether we are optimizing for size.
11161 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
11163 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
11164 (TARGET_MD_ASM_ADJUST): Define.
11166 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
11167 Kito Cheng <kito.cheng@gmail.com>
11168 Chung-Ju Wu <jasonwucj@gmail.com>
11170 * config/nds32/nds32.c (nds32_compute_stack_frame,
11171 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
11172 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
11173 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
11174 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
11175 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
11176 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
11177 * config/nds32/nds32.md (prologue, epilogue): Use macro
11178 NDS32_V3PUSH_AVAILABLE_P to do checking.
11180 2018-03-11 Jakub Jelinek <jakub@redhat.com>
11183 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
11184 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
11185 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
11186 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
11187 addition of most attributes on !orig_type_die or the attribute not
11188 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
11190 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11191 Chung-Ju Wu <jasonwucj@gmail.com>
11193 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
11194 __NDS32_VH__ macro.
11195 * config/nds32/nds32.opt (mvh): New option.
11197 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11198 Chung-Ju Wu <jasonwucj@gmail.com>
11200 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
11202 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
11203 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
11206 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11207 Chung-Ju Wu <jasonwucj@gmail.com>
11209 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
11211 * config/nds32/nds32-multiple.md (strlensi): New pattern.
11212 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
11214 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
11215 Kito Cheng <kito.cheng@gmail.com>
11216 Chung-Ju Wu <jasonwucj@gmail.com>
11218 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
11219 UNSPEC_FFMISM and UNSPEC_FLMISM.
11220 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
11221 for ffb, ffmism and flmism.
11222 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
11223 (unspec_ffmism): Ditto.
11224 (unspec_flmism): Ditto.
11225 (nds32_expand_builtin_impl): Check if string extension is available.
11226 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
11227 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
11229 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
11232 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
11235 * lra-assigns.c (assign_by_spills): Return a flag of reload
11236 assignment failure. Do not process the reload assignment
11237 failures. Do not spill other reload pseudos if they has the same
11239 (lra_assign): Add a return arg. Set up from the result of
11240 assign_by_spills call.
11241 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11242 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11243 usage_insns if it is not NULL.
11244 (spill_hard_reg_in_range): New function.
11245 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11246 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11247 function prototypes.
11248 (lra_assign): Change prototype.
11249 * lra.c (lra): Add code to deal with fails by splitting hard reg
11252 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
11255 * config/i386/i386.opt: Replace Enforcment with Enforcement.
11257 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
11260 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
11261 (dw_val_node): Add val_symbolic_view.
11262 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
11263 (symview_upper_bound): New.
11264 (new_line_info_table): Initialize symviews_since_reset.
11265 (dwarf2out_source_line): Count symviews_since_reset and set
11266 symview_upper_bound.
11267 (dw_val_equal_p): Handle symview.
11268 (add_AT_symview): New.
11269 (print_dw_val): Handle symview.
11270 (attr_checksum, attr_checksum_ordered): Likewise.
11271 (same_dw_val_p, size_of_die): Likewise.
11272 (value_format, output_die): Likewise.
11273 (add_high_low_attributes): Use add_AT_symview for entry_view.
11274 (dwarf2out_finish): Reset symview_upper_bound, clear
11277 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
11280 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
11281 Add strict argument and use it.
11282 (rs6000_split_multireg_move): Update for new strict argument.
11283 (mem_operand_gpr): Disallow all non-offsettable addresses.
11284 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
11286 2018-03-09 Jakub Jelinek <jakub@redhat.com>
11289 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
11290 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
11291 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
11294 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
11295 decl, use remap_type if we want to use the type.
11297 2018-03-09 Martin Sebor <msebor@redhat.com>
11299 PR tree-optimization/84526
11300 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11302 (builtin_access::generic_overlap): Be prepared to handle non-array
11305 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
11307 PR rtl-optimization/84682
11308 * lra-constraints.c (process_address_1): Check is_address flag
11309 for address constraints.
11310 (process_alt_operands): Likewise.
11311 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
11312 preprocess_constraints.
11313 * recog.h (preprocess_constraints): Add oploc parameter.
11315 * recog.c (preprocess_constraints): Test address_operand for
11316 CT_ADDRESS constraints.
11318 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
11321 * lra-assigns.c (assign_by_spills): Return a flag of reload
11322 assignment failure. Do not process the reload assignment
11323 failures. Do not spill other reload pseudos if they has the same
11325 (lra_assign): Add a return arg. Set up from the result of
11326 assign_by_spills call.
11327 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11328 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11329 usage_insns if it is not NULL.
11330 (spill_hard_reg_in_range): New function.
11331 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11332 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11333 function prototypes.
11334 (lra_assign): Change prototype.
11335 * lra.c (lra): Add code to deal with fails by splitting hard reg
11338 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11341 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
11342 Accept complain bool parameter. Only emit errors if it is true.
11343 (arm_parse_cpu_option_name): Likewise.
11344 (arm_target_thumb_only): Adjust callers of the above.
11345 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
11346 prototype to take a default true bool parameter.
11347 (arm_parse_arch_option_name): Likewise.
11349 2018-03-09 David Malcolm <dmalcolm@redhat.com>
11350 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
11354 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
11355 * configure: Regenerate.
11356 * configure.ac ("linker --version-script option"): New.
11357 ("linker soname option"): New.
11359 2018-03-09 Richard Biener <rguenther@suse.de>
11361 PR tree-optimization/84775
11362 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
11363 immediate uses of predicate stmts and mark them modified.
11366 PR tree-optimization/84178
11367 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
11369 (version_loop_for_if_conversion): Delay update_ssa call.
11370 (tree_if_conversion): Delay update_ssa until after predicate
11373 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
11376 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
11377 when the function accesses prior frames.
11379 2018-03-08 Jakub Jelinek <jakub@redhat.com>
11382 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
11383 gen_llsym, otherwise call maybe_gen_llsym.
11385 PR inline-asm/84742
11386 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
11387 has ',' character inside of it.
11389 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11392 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
11393 as clobbering CC_REGNUM.
11395 2018-03-08 Richard Biener <rguenther@suse.de>
11397 PR middle-end/84552
11398 * tree-scalar-evolution.c: Include tree-into-ssa.h.
11399 (follow_copies_to_constant): Do not follow SSA names registered
11402 2018-03-08 Richard Biener <rguenther@suse.de>
11404 PR tree-optimization/84178
11405 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
11407 (version_loop_for_if_conversion): Delay update_ssa call.
11408 (tree_if_conversion): Delay update_ssa until after predicate
11411 2018-03-08 David Malcolm <dmalcolm@redhat.com>
11413 PR tree-optimization/84178
11414 * tree-if-conv.c (release_bb_predicate): Remove the
11415 the assertion that the stmts have NULL use_ops.
11416 Discard the statements, asserting that they haven't
11417 yet been added to a BB.
11419 2018-03-08 Richard Biener <rguenther@suse.de>
11421 PR tree-optimization/84746
11422 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
11423 (phi_translate): Pass in destination ANTIC_OUT set.
11424 (phi_translate_1): Likewise. For a simplified result lookup
11425 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
11426 (phi_translate_set): Adjust.
11427 (do_pre_regular_insertion): Likewise.
11428 (do_pre_partial_partial_insertion): Likewise.
11430 2018-03-08 Martin Liska <mliska@suse.cz>
11432 PR gcov-profile/84735
11433 * doc/gcov.texi: Document usage of profile files.
11434 * gcov-io.h: Document changes in the format.
11436 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
11440 * dwarf2out.c (struct dw_line_info_table): Update comments for
11442 (FORCE_RESET_NEXT_VIEW): New.
11443 (FORCE_RESETTING_VIEW_P): New.
11444 (RESETTING_VIEW_P): Check for -1 too.
11445 (ZERO_VIEW_P): Likewise.
11446 (new_line_info_table): Force-reset next view.
11447 (dwarf2out_begin_function): Likewise.
11448 (dwarf2out_source_line): Simplify zero_view_p initialization.
11449 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
11450 view directly. Omit view when omitting .loc at line 0.
11452 2018-03-08 Jakub Jelinek <jakub@redhat.com>
11454 PR tree-optimization/84740
11455 * tree-switch-conversion.c (process_switch): Call build_constructors
11456 only if info.phi_count is non-zero.
11458 PR tree-optimization/84739
11459 * tree-tailcall.c (find_tail_calls): Check call arguments against
11460 DECL_ARGUMENTS (current_function_decl) rather than
11461 DECL_ARGUMENTS (func) when checking for tail recursion.
11463 2018-03-07 Jakub Jelinek <jakub@redhat.com>
11465 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
11466 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
11467 Volker Reichelt's entry and add entries for people that perform
11468 GCC fuzzy testing and report numerous bugs.
11470 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
11473 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
11474 readonly data in sdata, if that is disabled.
11475 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
11476 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
11477 -mreadonly-in-sdata option.
11479 2018-03-07 Martin Sebor <msebor@redhat.com>
11481 PR tree-optimization/84468
11482 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
11483 basic block when looking for nul assignment.
11485 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
11488 * except.h (output_function_exception_table): Adjust prototype.
11489 * except.c (output_function_exception_table): Remove FNNAME parameter
11490 and add SECTION parameter. Ouput one part of the table at a time.
11491 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
11492 the first part of the exception table and emit unwind directives.
11493 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
11494 (i386_pe_seh_cold_init): Likewise.
11495 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
11496 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
11497 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
11498 (ix86_output_call_insn): Emit a nop in one more case for SEH.
11499 * config/i386/winnt.c: Include except.h.
11500 (struct seh_frame_state): Add reg_offset, after_prologue and
11501 in_cold_section fields.
11502 (i386_pe_seh_end_prologue): Set seh->after_prologue.
11503 (i386_pe_seh_cold_init): New function.
11504 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
11505 to seh->in_cold_section.
11506 (seh_emit_push): Record the offset of the push.
11507 (seh_emit_save): Record the offet of the save.
11508 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
11509 Test seh->after_prologue to disregard the epilogue.
11510 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
11511 (i386_pe_end_cold_function): New function.
11513 2018-03-07 Jakub Jelinek <jakub@redhat.com>
11516 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
11517 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
11520 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
11522 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
11523 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
11525 PR middle-end/84723
11526 * multiple_target.c: Include tree-inline.h and intl.h.
11527 (expand_target_clones): Diagnose and fail if node->definition and
11528 !tree_versionable_function_p (node->decl).
11530 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
11532 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
11534 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
11535 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
11536 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
11538 2018-03-06 Jakub Jelinek <jakub@redhat.com>
11541 * combine.c (try_combine): Use reg_or_subregno instead of handling
11542 just paradoxical SUBREGs and REGs.
11544 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
11546 * config/arc/arc.c (arc_finalize_pic): Remove function.
11547 (arc_must_save_register): We use single base PIC register, remove
11548 checks to save/restore the PIC register.
11549 (arc_expand_prologue): Likewise.
11550 * config/arc/arc-protos.h (arc_set_default_type_attributes):
11552 (arc_verify_short): Likewise.
11553 (arc_attr_type): Likewise.
11554 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
11555 (walk_stores): Likewise.
11556 (arc_address_cost): Make it static.
11557 (arc_verify_short): Likewise.
11558 (branch_dest): Likewise.
11559 (arc_attr_type): Likewise.
11560 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
11561 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
11562 (arc_final_prescan_insn): Remove inserting the nops due to
11563 hardware hazards. It is done in reorg step.
11564 (insn_length_variant_t): Remove.
11565 (insn_length_parameters_t): Likewise.
11566 (arc_insn_length_parameters): Likewise.
11567 (arc_get_insn_variants): Likewise.
11568 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
11570 2018-03-06 Jakub Jelinek <jakub@redhat.com>
11572 PR inline-asm/84683
11573 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
11576 PR tree-optimization/84687
11577 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
11579 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
11581 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11583 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
11584 Rename to ppc_speculation_barrier.
11585 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
11586 __builtin_ppc_speculation_barrier.
11588 2018-03-05 Jakub Jelinek <jakub@redhat.com>
11591 * combine.c (combine_simplify_rtx): Don't try to simplify if
11592 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
11595 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
11597 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
11598 to 32 bytes when compiling for POWER9.
11600 2018-03-05 Jakub Jelinek <jakub@redhat.com>
11603 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
11604 regparm >= 3 with no arg reg available also for calls with
11605 flag_force_indirect_call. Pass decl to ix86_function_regparm.
11608 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
11610 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
11612 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
11615 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
11617 2018-03-05 Richard Biener <rguenther@suse.de>
11619 PR tree-optimization/84486
11620 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
11621 When inserting a __builtin_assume_aligned call set the LHS
11622 SSA name alignment info accordingly.
11624 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
11626 PR tree-optimization/84114
11627 * config/aarch64/aarch64.c (aarch64_reassociation_width)
11628 Avoid reassociation of FLOAT_MODE addition.
11630 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
11632 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
11633 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
11634 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
11635 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
11636 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
11637 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
11638 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
11640 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
11641 __builtin_ia32_wbinvd): New builtins.
11642 (SPECIAL_ARGS2): New.
11643 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
11644 (SPECIAL_ARGS2): New.
11645 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
11646 (ix86_valid_target_attribute_inner_p): Ditto.
11647 (ix86_init_mmx_sse_builtins): Add special_args2.
11648 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
11649 TARGET_WBNOINVD_P): New.
11650 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
11651 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
11652 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
11653 * config/i386/immintrin.h (_wbinvd): New intrinsic.
11654 * config/i386/pconfigintrin.h: New file.
11655 * config/i386/wbnoinvdintrin.h: Ditto.
11656 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
11658 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
11660 2018-03-05 Richard Biener <rguenther@suse.de>
11662 PR tree-optimization/84670
11663 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11665 (BB_VISITED_WITH_VISITED_SUCCS): New define.
11666 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11667 (compute_antic_aux): Only assert the number of values in ANTIC_IN
11668 doesn't grow if all successors (recursively) were visited at least
11671 2018-03-05 Richard Biener <rguenther@suse.de>
11673 PR tree-optimization/84650
11674 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
11675 if executed in the loop pipeline.
11677 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
11679 * doc/configfiles.texi (Configuration Files): Move info about
11680 conditionalizing $target-protos.h to...
11681 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
11682 differs from $target-protos.h.
11684 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
11685 Chung-Ju Wu <jasonwucj@gmail.com>
11687 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
11688 * config/nds32/nds32-multiple.md (setmemsi): Define.
11689 * config/nds32/nds32-memory-manipulation.c
11690 (nds32_gen_dup_4_byte_to_word_value): New.
11691 (emit_setmem_word_loop): New.
11692 (emit_setmem_byte_loop): New.
11693 (nds32_expand_setmem_loop): New.
11694 (nds32_expand_setmem_loop_v3m): New.
11695 (nds32_expand_setmem_unroll): New.
11696 (nds32_expand_setmem): New.
11698 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
11699 Chung-Ju Wu <jasonwucj@gmail.com>
11701 * config/nds32/nds32-memory-manipulation.c
11702 (nds32_emit_load_store): New.
11703 (nds32_emit_post_inc_load_store): New.
11704 (nds32_emit_mem_move): New.
11705 (nds32_emit_mem_move_block): New.
11706 (nds32_expand_movmemsi_loop_unknown_size): New.
11707 (nds32_expand_movmemsi_loop_known_size): New.
11708 (nds32_expand_movmemsi_loop): New.
11709 (nds32_expand_movmemsi_unroll): New.
11710 (nds32_expand_movmemqi): Rename ...
11711 (nds32_expand_movmemsi): ... to this.
11712 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
11713 (movmemsi): ... to this.
11714 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
11715 (nds32_expand_movmemsi): ... to this.
11717 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
11718 Monk Chiang <sh.chiang04@gmail.com>
11719 Chung-Ju Wu <jasonwucj@gmail.com>
11721 * config/nds32/nds32-protos.h
11722 (nds32_expand_load_multiple): New arguments.
11723 (nds32_expand_store_multiple): Ditto.
11724 (nds32_valid_multiple_load_store): Rename ...
11725 (nds32_valid_multiple_load_store_p): ... to this.
11726 * config/nds32/nds32-memory-manipulation.c
11727 (nds32_expand_load_multiple): Refine implementation.
11728 (nds32_expand_store_multiple): Ditto.
11729 * config/nds32/nds32-multiple.md
11730 (load_multiple): Update nds32_expand_load_multiple interface.
11731 (store_multiple): Update nds32_expand_store_multiple interface.
11732 * config/nds32/nds32-predicates.c
11733 (nds32_valid_multiple_load_store): Rename ...
11734 (nds32_valid_multiple_load_store_p): ... to this and refine
11736 * config/nds32/predicates.md
11737 (nds32_load_multiple_and_update_address_operation): New predicate.
11738 (nds32_store_multiple_and_update_address_operation): New predicate.
11740 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
11741 Chung-Ju Wu <jasonwucj@gmail.com>
11743 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
11744 (combo): New attribute.
11745 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
11747 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
11749 * config/nds32/nds32.opt: Change -mcmodel= default value.
11751 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
11752 Monk Chiang <sh.chiang04@gmail.com>
11753 Chung-Ju Wu <jasonwucj@gmail.com>
11755 * config/nds32/constants.md (unspec_element): New enum.
11756 * config/nds32/constraints.md (Umw): New constraint.
11757 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
11758 * config/nds32/nds32-intrinsic.md: Likewise.
11759 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
11760 (nds32_valid_smw_lwm_base_p): New.
11761 (nds32_output_smw_single_word): New.
11762 (nds32_output_lmw_single_word): New.
11763 (nds32_expand_unaligned_load): New.
11764 (nds32_expand_unaligned_store): New.
11765 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
11766 (nds32_output_smw_single_word): Declare.
11767 (nds32_output_lmw_single_word): Declare.
11768 (nds32_expand_unaligned_load): Declare.
11769 (nds32_expand_unaligned_store): Declare.
11770 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
11771 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
11772 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
11773 NDS32_BUILTIN_UASTORE_DW.
11774 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
11777 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
11778 Kito Cheng <kito.cheng@gmail.com>
11779 Chung-Ju Wu <jasonwucj@gmail.com>
11781 * config/nds32/nds32-intrinsic.c
11782 (nds32_expand_builtin_null_ftype_reg): Delete.
11783 (nds32_expand_builtin_reg_ftype_imm): Ditto.
11784 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
11785 (nds32_read_argument): New.
11786 (nds32_legitimize_target): Ditto.
11787 (nds32_legitimize_argument): Ditto.
11788 (nds32_check_constant_argument): Ditto.
11789 (nds32_expand_unop_builtin): Ditto.
11790 (nds32_expand_unopimm_builtin): Ditto.
11791 (nds32_expand_binop_builtin): Ditto.
11792 (nds32_builtin_decl_impl): Ditto.
11793 (builtin_description): Ditto.
11794 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
11795 (nds32_init_builtins_impl): Ditto.
11796 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
11797 (nds32_builtin_decl): New.
11798 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
11799 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
11801 2018-03-02 Jeff Law <law@redhat.com>
11803 * reorg.c (stop_search_p): Handle DEBUG_INSN.
11804 (redundant_insn, fill_simple_delay_slots): Likewise.
11805 (fill_slots_from_thread): Likewise.
11806 * resource.c (mark_referenced_resources): Likewise.
11807 (mark_set_resources, find_dead_or_set_registers): Likewise.
11809 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11811 * substring-locations.h (format_warning_va): Formatting fix for
11812 ATTRIBUTE_GCC_DIAG.
11813 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
11815 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
11816 * substring-locations.c: Include intl.h.
11817 (format_warning_va): Turned into small wrapper around
11818 format_warning_n_va, renamed to ...
11819 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
11820 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
11822 (format_warning_at_substring_n): New function.
11823 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
11824 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
11825 format_warning_at_substring with just a shorter name instead of
11826 const function pointer.
11827 (fmtwarn_n): New function.
11828 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
11829 appropriate, get rid of all the fmtstr temporaries, move conditionals
11830 with G_() wrapped string literals directly into fmtwarn arguments,
11831 cast dir.len to (int), formatting fixes.
11833 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
11835 * doc/invoke.texi: Remove "Cilk Plus" references.
11837 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11838 Richard Biener <rguenther@suse.de>
11841 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
11842 for error or warning attributes if CALL_FROM_THUNK_P is set.
11845 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11848 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
11849 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
11852 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
11853 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
11855 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
11856 instead of -1U in last predictors element's probability member.
11858 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
11861 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11862 arguments if they are comparable.
11864 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
11866 PR tree-optimization/84634
11867 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
11868 masks and masked_loop_p with a single loop_masks, making sure it's
11869 null for bb vectorization.
11871 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
11873 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11874 (vect_analyze_data_ref_access): Use loop->safe_len rather than
11875 loop->force_vectorize to check whether there is no alias.
11877 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11880 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
11882 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
11884 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
11885 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
11886 instead of a loop around prev_real_insn.
11887 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
11890 PR inline-asm/84625
11891 * config/i386/i386.c (ix86_print_operand): Use conditional
11892 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
11895 2018-03-02 Richard Biener <rguenther@suse.de>
11897 PR tree-optimization/84427
11898 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
11899 (bitmap_set_subtract_values): Rewrite to handle multiple
11902 (prune_clobbered_mems): Likewise.
11903 (phi_translate): Take edge instead of pred/phiblock.
11904 (phi_translate_1): Likewise.
11905 (phi_translate_set): Likewise. Insert all translated
11906 exprs for a value into the set, keeping possibly multiple
11907 expressions per value.
11908 (compute_antic_aux): Adjust for phi_translate changes.
11909 When intersecting union the expressions and prune those
11910 not in the final value set, keeping possibly multiple
11911 expressions per value. Do not use value-insertion
11912 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
11913 all expressions. Add verification that the value-sets
11914 only shrink during iteration.
11915 (compute_partial_antic_aux): Adjust for the phi_translate changes.
11916 (do_pre_regular_insertion): Likewise.
11917 (do_pre_partial_partial_insertion): Likewise.
11919 2018-03-02 Richard Biener <rguenther@suse.de>
11922 * config/darwin.c (saved_debug_info_level): New static global.
11923 (darwin_asm_lto_start): Disable debug info generation for LTO out.
11924 (darwin_asm_lto_end): Restore debug info generation settings.
11926 2018-03-01 Martin Liska <mliska@suse.cz>
11929 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
11930 volatile arguments.
11932 2018-03-01 Richard Biener <rguenther@suse.de>
11935 * dwarf2out.c (gen_variable_die): Properly handle late VLA
11936 type annotation with LTO when debug was disabled at compile-time.
11938 2018-03-01 Matthew Fortune <mfortune@gmail.com>
11940 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
11942 (mips_final_postscan_insn): Likewise.
11944 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
11946 PR rtl-optimization/84528
11947 * alias.c (init_alias_target): Add commentary.
11948 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
11949 a unique base value if the frame pointer is not eliminated
11950 to the stack pointer.
11952 2018-03-01 Tom de Vries <tom@codesourcery.com>
11954 PR rtl-optimization/83327
11955 * lra-int.h (hard_regs_spilled_into): Declare.
11956 * lra.c (hard_regs_spilled_into): Define.
11957 (init_reg_info): Init hard_regs_spilled_into.
11958 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
11959 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
11960 (process_bb_lives): Handle hard_regs_spilled_into.
11961 (lra_create_live_ranges_1): Before doing liveness propagation, clear
11962 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
11964 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
11966 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
11967 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
11968 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
11969 * config/rs6000/aix72.h: New file.
11971 2018-02-28 Jakub Jelinek <jakub@redhat.com>
11973 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
11974 instead of warning_at with conditional singular and plural messages
11978 * stor-layout.c (update_alignment_for_field): For
11979 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
11980 && !DECL_PACKED (field), do the alignment update, just use
11981 only desired_align instead of MAX (type_align, desired_align)
11983 (place_field): Don't do known_align < desired_align handling
11984 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
11985 is non-NULL, instead do it after rli->prev_field handling and
11986 only if not within a bitfield word. For DECL_PACKED (field)
11987 use type_align of BITS_PER_UNIT.
11989 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
11991 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
11992 superfluous parentheses and trailing spaces.
11994 2018-02-28 Richard Biener <rguenther@suse.de>
11996 PR tree-optimization/84584
11997 * graphite-scop-detection.c (scop_detection::add_scop): Discard
11998 SCoPs with fake exit edge.
12000 2018-02-28 Martin Liska <mliska@suse.cz>
12003 * timevar.c (timer::print): Fix format to properly print 100%
12006 2018-02-28 Richard Biener <rguenther@suse.de>
12008 PR middle-end/84607
12009 * genmatch.c (capture_info::walk_match): Do not mark
12010 captured expressions without operands as expr_p given
12011 they act more like predicates and should be subject to
12012 "lost tail" side-effect preserving.
12014 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
12016 PR rtl-optimization/81611
12017 * auto-inc-dec.c (attempt_change): Move dead note from
12018 mem_insn if it's the next use of regno
12019 (find_address): Take address use of reg holding
12020 non-incremented value. Add parm to limit search to the named
12022 (merge_in_block): Attempt to use a mem insn that is the next
12023 use of the original regno.
12025 2018-02-27 Martin Sebor <msebor@redhat.com>
12028 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
12029 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
12031 2018-02-27 Martin Sebor <msebor@redhat.com>
12033 PR translation/84207
12034 * diagnostic-core.h (warning_n, error_n, inform_n): Change
12035 n argument to unsigned HOST_WIDE_INT.
12036 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
12037 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
12038 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
12039 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
12041 2018-02-27 Richard Biener <rguenther@suse.de>
12043 PR tree-optimization/84512
12044 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
12045 Do not use the estimate returned from record_stmt_cost for
12046 the scalar iteration cost but sum properly using add_stmt_cost.
12048 2018-02-27 Richard Biener <rguenther@suse.de>
12050 PR tree-optimization/84466
12051 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12052 Adjust last change to less strictly validate use operands.
12054 2018-02-27 Martin Liska <mliska@suse.cz>
12056 PR gcov-profile/84548
12057 * gcov.c (process_file): Allow partial overlap and consider it
12058 also as group functions.
12059 (output_lines): Properly calculate range of lines for a group.
12061 2018-02-27 Martin Liska <mliska@suse.cz>
12063 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
12064 'ggc' suffixes. Change first column width.
12065 (timer::print): Fix formatting of the column.
12067 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
12069 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
12070 preserve inline entry blocks for the sake of debug inline
12071 entry point markers alone.
12072 (remove_unused_locals): Suggest in comments a better place to
12073 force the preservation of inline entry blocks that are
12074 otherwise unused, but do not preserve them.
12076 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12078 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
12080 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12083 * config/i386/constraints.md (Bs): Replace
12084 ix86_indirect_branch_register with
12085 TARGET_INDIRECT_BRANCH_REGISTER.
12087 * config/i386/i386.md (indirect_jump): Likewise.
12088 (tablejump): Likewise.
12089 (*sibcall_memory): Likewise.
12090 (*sibcall_value_memory): Likewise.
12091 Peepholes of indirect call and jump via memory: Likewise.
12092 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
12093 (*sibcall_value_GOT_32): Likewise.
12094 * config/i386/predicates.md (indirect_branch_operand): Likewise.
12095 (GOT_memory_operand): Likewise.
12096 (call_insn_operand): Likewise.
12097 (sibcall_insn_operand): Likewise.
12098 (GOT32_symbol_operand): Likewise.
12099 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
12101 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12103 PR rtl-optimization/83496
12104 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
12105 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
12106 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
12107 redundant insn, if any.
12108 (relax_delay_slots): Likewise.
12109 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
12111 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
12113 PR tree-optimization/83965
12114 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
12115 that grouped statements are part of a reduction chain. Return
12116 true if the statement is not marked as a reduction itself but
12117 is part of a group.
12118 (vect_recog_dot_prod_pattern): Don't check whether the statement
12119 is part of a group here.
12120 (vect_recog_sad_pattern): Likewise.
12121 (vect_recog_widen_sum_pattern): Likewise.
12123 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12126 * final.c (rest_of_clean_state): Also look for calls inside sequences.
12128 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12131 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
12133 (ix86_output_indirect_function_return): New prototype.
12134 (ix86_split_simple_return_pop_internal): Likewise.
12135 * config/i386/i386.c (indirect_return_via_cx): New.
12136 (indirect_return_via_cx_bnd): Likewise.
12137 (indirect_thunk_name): Handle return va CX_REG.
12138 (output_indirect_thunk_function): Create alias for
12139 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
12140 (ix86_output_indirect_jmp): Remove the bool argument.
12141 (ix86_output_indirect_function_return): New function.
12142 (ix86_split_simple_return_pop_internal): Likewise.
12143 * config/i386/i386.md (*indirect_jump): Don't pass false
12144 to ix86_output_indirect_jmp.
12145 (*tablejump_1): Likewise.
12146 (simple_return_pop_internal): Change it to define_insn_and_split.
12147 Call ix86_split_simple_return_pop_internal to split it for
12148 -mfunction-return=.
12149 (simple_return_indirect_internal): Call
12150 ix86_output_indirect_function_return instead of
12151 ix86_output_indirect_jmp.
12153 2018-02-26 Jakub Jelinek <jakub@redhat.com>
12156 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
12157 memset and value initialization afterwards.
12159 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
12161 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
12163 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12166 * common/config/aarch64/aarch64-common.c
12167 (aarch_option_optimization_table[]): Switch
12168 off fomit-frame-pointer
12170 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
12171 Chung-Ju Wu <jasonwucj@gmail.com>
12173 * config/nds32/nds32-multiple.md (load_multiple): Disallow
12175 (store_multiple): Ditto.
12177 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
12179 * config.gcc: Add --with-cpu support for nds32 target.
12180 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
12181 * config/nds32/nds32.opt: Add -mcpu= option.
12183 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
12185 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
12186 isel=yes): Warn for these deprecated options.
12188 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
12190 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
12191 ISA_2_5_MASKS_EMBEDDED.
12193 2018-02-23 Jakub Jelinek <jakub@redhat.com>
12195 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
12196 p->max as pointers rather than using iterative_hash_expr.
12198 2018-02-23 Carl Love <cel@us.ibm.com>
12200 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
12201 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
12203 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
12204 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
12205 P8V_BUILTIN_VEC_VUNSIGNED2.
12207 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
12210 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
12211 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
12213 * lra-constraints.c (curr_insn_transform): Set up
12214 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
12216 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
12217 * lra-eliminations.c (spill_pseudos): Ditto.
12218 (process_insn_for_elimination): Ditto.
12219 * lra-lives.c (reg_early_clobber_p): Use the new macros.
12220 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
12221 LRA_NON_CLOBBERED_ALT.
12223 2018-02-22 Martin Sebor <msebor@redhat.com>
12225 PR tree-optimization/84480
12226 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
12227 to maybe_diag_stxncpy_trunc. Call it.
12228 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
12229 from gimple_fold_builtin_strcpy. Print inlining stack.
12230 (handle_builtin_stxncpy): Print inlining stack.
12231 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
12233 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
12236 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
12237 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
12238 and -fcheck-pointer-bounds are used together.
12239 (indirect_thunk_prefix): New enum.
12240 (indirect_thunk_need_prefix): New function.
12241 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
12242 "_nt" instead of "_bnd" for NOTRACK prefix.
12243 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
12244 (output_indirect_thunk_function): Likewise.
12246 (ix86_code_end): Update output_indirect_thunk_function calls.
12247 (ix86_output_indirect_branch_via_reg): Replace
12248 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
12249 (ix86_output_indirect_branch_via_push): Likewise.
12250 (ix86_output_function_return): Likewise.
12251 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
12252 incompatible with -fcf-protection=branch and
12253 -fcheck-pointer-bounds.
12255 2018-02-22 Steve Ellcey <sellcey@cavium.com>
12258 * config/aarch64/aarch64.c (aarch64_print_address_internal):
12259 Change gcc_assert call to output_operand_lossage.
12261 2018-02-22 Steve Ellcey <sellcey@cavium.com>
12263 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
12265 2018-02-22 DJ Delorie <dj@redhat.com>
12266 Sebastian Perta <sebastian.perta@renesas.com>
12267 Oleg Endo <olegendo@gcc.gnu.org>
12269 * config/rx/rx.c (rx_rtx_costs): New function.
12270 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
12272 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
12274 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
12276 2018-02-22 Martin Liska <mliska@suse.cz>
12279 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
12280 Add "native" as a possible value.
12282 2018-02-22 Martin Liska <mliska@suse.cz>
12285 * config/i386/i386.c (ix86_option_override_internal):
12286 Add "native" as a possible value for -march and -mtune.
12288 2018-02-22 Jakub Jelinek <jakub@redhat.com>
12291 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
12292 to all type variants.
12294 PR tree-optimization/84503
12295 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
12296 width as info->bitpos + info->bitsize - start.
12297 (merged_store_group::merge_overlapping): Simplify width computation.
12298 (check_no_overlap): New function.
12299 (imm_store_chain_info::try_coalesce_bswap): Compute expected
12300 start + width and last_order of the group, fail if check_no_overlap
12302 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
12303 to group if check_no_overlap fails.
12305 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
12307 * config/rs6000/altivec.md: Delete contraint arguments to
12308 define_expand, define_split, and define_peephole2, and in
12309 define_insn_and_split if always unused.
12310 * config/rs6000/darwin.md: Ditto.
12311 * config/rs6000/dfp.md: Ditto.
12312 * config/rs6000/rs6000.md: Ditto.
12313 * config/rs6000/sync.md: Ditto.
12314 * config/rs6000/vector.md: Ditto.
12315 * config/rs6000/vsx.md: Ditto.
12317 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
12319 * config/rs6000/altivec.md: Write output control strings as braced
12320 blocks instead of double-quoted strings.
12321 * config/rs6000/darwin.md: Ditto.
12322 * config/rs6000/rs6000.md: Ditto.
12323 * config/rs6000/vector.md: Ditto.
12324 * config/rs6000/vsx.md: Ditto.
12326 2018-02-21 Jason Merrill <jason@redhat.com>
12328 PR c++/84314 - ICE with templates and fastcall attribute.
12329 * attribs.c (build_type_attribute_qual_variant): Remove assert.
12331 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
12333 * ipa-cp.c (determine_versionability): Fix comment typos.
12335 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
12338 * ipa-cp.c (determine_versionability): Do not version functions caling
12341 2018-02-21 Martin Liska <mliska@suse.cz>
12344 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
12345 Add "native" as a possible value.
12346 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
12347 the macro when native cpu detection is available.
12349 2018-02-21 Martin Liska <mliska@suse.cz>
12352 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
12353 Add "native" as a possible value.
12354 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
12355 when native cpu detection is available.
12357 2018-02-21 Jakub Jelinek <jakub@redhat.com>
12358 Martin Sebor <msebor@redhat.com>
12360 PR tree-optimization/84478
12361 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
12363 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
12364 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
12365 support which is conservatively correct, for 2 only stay conservative
12366 for maxlen. Formatting and comment capitalization fixes. Add STRICT
12367 argument to the 2 argument get_range_strlen, adjust 6 arg
12368 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
12370 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
12371 (gimple_fold_builtin_strlen): Pass true as last argument to
12374 2018-02-20 Martin Sebor <msebor@redhat.com>
12376 PR middle-end/84095
12377 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
12378 (builtin_memref::set_base_and_offset): Same. Handle inner references.
12379 (builtin_memref::builtin_memref): Factor out parts into
12380 set_base_and_offset and call it.
12382 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
12384 PR middle-end/84406
12385 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
12386 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
12387 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
12388 search at the associated MODE_INT.
12390 2018-02-20 Jeff Law <law@redhat.com>
12392 PR middle-end/82123
12393 PR tree-optimization/81592
12394 PR middle-end/79257
12395 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
12396 for range data rather than using global data.
12397 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
12398 range data rather than using global data.
12399 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
12400 pass it to children as needed.
12401 (struct directive::fmtresult): Similarly.
12402 (struct directive::set_width): Similarly.
12403 (struct directive::set_precision): Similarly.
12404 (format_integer, format_directive, parse_directive): Similarly.
12405 (format_none): Accept unnamed vr_values parameter.
12406 (format_percent, format_floating, format_character): Similarly.
12407 (format_string, format_plain): Similarly.
12408 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
12409 the EVRP range analyzer for range data rather than using global data.
12410 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
12411 gimple-ssa-evrp-analyze.h
12412 (class sprintf_dom_walker): Add after_dom_children member function.
12413 Add evrp_range_analyzer member.
12414 (sprintf_dom_walker::before_dom_children): Call into the EVRP
12415 range analyzer as needed.
12416 (sprintf_dom_walker::after_dom_children): New member function.
12417 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
12419 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
12420 (evrp_range_analyzer::pop_to_marker): Likewise.
12422 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
12424 PR tree-optimization/84419
12425 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
12426 with the required type if its current type is compatible but
12429 2018-02-20 Jakub Jelinek <jakub@redhat.com>
12431 PR middle-end/82004
12432 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
12433 after vectorization.
12435 2018-02-20 Martin Liska <mliska@suse.cz>
12438 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
12439 possible values if we don't have a hint.
12441 2018-02-20 Martin Liska <mliska@suse.cz>
12445 * final.c (shorten_branches): Build align_tab array with one
12447 * opts.c (finish_options): Add alignment option limit check.
12448 (MAX_CODE_ALIGN): Likewise.
12449 (MAX_CODE_ALIGN_VALUE): Likewise.
12450 * doc/invoke.texi: Document maximum allowed option value for
12451 all -falign-* options.
12453 2018-02-19 Jakub Jelinek <jakub@redhat.com>
12456 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
12457 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
12458 * var-tracking.c (emit_note_insn_var_location): Remove all references
12459 to NOTE_INSN_CALL_ARG_LOCATION.
12460 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
12461 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
12462 Use copy_rtx_if_shared.
12463 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
12464 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
12465 (dwarf2out_var_location): Remove handling of
12466 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
12468 * final.c (final_scan_insn): Remove all references to
12469 NOTE_INSN_CALL_ARG_LOCATION.
12470 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
12471 before dumping final insns.
12472 * except.c (emit_note_eh_region_end): Remove all references to
12473 NOTE_INSN_CALL_ARG_LOCATION.
12474 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
12475 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
12476 * config/arc/arc.c (hwloop_optimize): Likewise.
12477 * config/arm/arm.c (create_fix_barrier): Likewise.
12478 * config/s390/s390.c (s390_chunkify_start): Likewise.
12479 * config/sh/sh.c (find_barrier): Likewise.
12480 * config/i386/i386.c (rest_of_insert_endbranch,
12481 ix86_seh_fixup_eh_fallthru): Likewise.
12482 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
12483 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
12484 * config/frv/frv.c (frv_function_prologue): Likewise.
12485 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
12487 (note_outside_basic_block_p): Remove all references to
12488 NOTE_INSN_CALL_ARG_LOCATION.
12489 * gengtype.c (adjust_field_rtx_def): Likewise.
12490 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
12492 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
12493 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
12496 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
12499 PR tree-optimization/84452
12500 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
12501 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
12504 2018-02-19 Martin Liska <mliska@suse.cz>
12507 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
12509 2018-02-19 Martin Liska <mliska@suse.cz>
12510 Richard Sandiford <richard.sandiford@linaro.org>
12512 PR tree-optimization/82491
12513 * gimple-fold.c (get_base_constructor): Make earlier bail out
12516 2018-02-19 Carl Love <cel@us.ibm.com>
12518 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
12519 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
12521 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
12522 P8V_BUILTIN_VEC_NEG.
12524 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
12526 * config/rl78/rl78.md (movdf): New define expand.
12528 2018-02-19 Martin Liska <mliska@suse.cz>
12531 * doc/invoke.texi: Fix typo.
12532 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
12534 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
12536 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
12537 handle rs6000_single_float and rs6000_double_float specially for
12540 2018-02-16 Jeff Law <law@redhat.com>
12542 * config/rx/rx.c (add_pop_cfi_notes): New function.;
12543 (pop_regs): Use it.
12545 2018-02-16 Jakub Jelinek <jakub@redhat.com>
12548 * ipa-inline.c (inline_small_functions): Fix a typo.
12550 2018-02-16 Nathan Sidwell <nathan@acm.org>
12552 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
12554 2018-02-16 Carl Love <cel@us.ibm.com>
12556 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
12557 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
12558 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
12559 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
12560 expansion to P8V_BUILTIN_VEC_FLOAT2.
12562 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
12564 PR rtl-optimization/70023
12565 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
12566 src_regno into account.
12568 2018-02-16 Carl Love <cel@us.ibm.com>
12570 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
12571 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
12572 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
12573 * config/rs6000/rs6000.c: Remove case statements for
12574 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
12575 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
12576 and P9V_BUILTIN_VEC_VINSERT4B.
12577 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
12578 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
12579 * config/rs6000/vsx.md:
12580 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
12583 2018-02-16 Carl Love <cel@us.ibm.com>
12585 * config/rs6000/altivec.h: Add builtin names vec_extract4b
12587 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
12589 * config/rs6000/rs6000-c.c: Add the definitions for
12590 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
12591 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
12592 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
12593 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
12594 definition for insert4b and define insn *insert3b_internal.
12595 * doc/extend.texi: Add documentation for vec_extract4b.
12597 2018-02-16 Nathan Sidwell <nathan@acm.org>
12599 * doc/extend.texi (Backwards Compatibility): Mention friend
12600 injection. Note for-scope is deprecated.
12601 * doc/invoke.texi (-ffriend-injection): Deprecate.
12603 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
12605 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
12606 that moved to I2, also allow destinations that are a paradoxical
12607 subreg (instead of a normal reg).
12609 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
12612 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
12615 2018-02-16 Richard Biener <rguenther@suse.de>
12617 PR tree-optimization/84037
12618 PR tree-optimization/84016
12620 * config/i386/i386.c (ix86_builtin_vectorization_cost):
12621 Adjust vec_construct for the fact we need additional higher latency
12622 128bit inserts for AVX256 and AVX512 vector builds.
12623 (ix86_add_stmt_cost): Scale vector construction cost for
12626 2018-02-16 Richard Biener <rguenther@suse.de>
12628 PR tree-optimization/84417
12629 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
12630 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
12631 (non_rewritable_lvalue_p): Likewise, use poly-ints.
12633 2018-02-16 Martin Liska <mliska@suse.cz>
12636 * internal-fn.def (ASAN_CHECK): Set proper flags.
12637 (ASAN_MARK): Likewise.
12639 2018-02-16 Julia Koval <julia.koval@intel.com>
12641 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
12642 from PTA_CANNONLAKE.
12644 2018-02-16 Jakub Jelinek <jakub@redhat.com>
12647 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
12648 Use ++iter rather than iter++ for std::list iterators.
12649 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
12650 defer deleting them until all nodes in the forest are processed. Do
12651 free even leaf nodes. Change to_process into auto_vec.
12654 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
12655 * vec.h (vec_default_construct): Use memset instead of placement new
12656 if BROKEN_VALUE_INITIALIZATION is defined.
12657 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
12658 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
12661 PR rtl-optimization/83723
12662 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
12663 * lra.c (lra_substitute_pseudo): Likewise. If true, use
12664 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
12666 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
12668 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
12670 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
12672 PR rtl-optimization/81443
12673 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
12674 from inner REGs to paradoxical SUBREGs.
12676 2018-02-16 Richard Biener <rguenther@suse.de>
12678 PR tree-optimization/84399
12679 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12680 For operands we can analyze at their definition make sure we can
12681 analyze them at each use as well.
12683 2018-02-16 Richard Biener <rguenther@suse.de>
12685 PR tree-optimization/84190
12686 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
12687 volatile accesses if the decl isn't volatile.
12689 2018-02-15 Jason Merrill <jason@redhat.com>
12691 PR c++/84314 - ICE with templates and fastcall attribute.
12692 * attribs.c (build_type_attribute_qual_variant): Don't clobber
12693 TYPE_CANONICAL on an existing type.
12695 2018-02-15 Jakub Jelinek <jakub@redhat.com>
12697 PR tree-optimization/84383
12698 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
12699 dstoff nor call operand_equal_p if dstbase is NULL.
12701 PR tree-optimization/84334
12702 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
12703 also a CONSTANT_CLASS_P, punt.
12705 2018-02-14 Jim Wilson <jimw@sifive.com>
12707 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
12708 first SMALL_OPERAND check. New local min_second_step. Move assert
12709 to where locals are set. Add TARGET_RVC support.
12710 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
12712 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
12714 * doc/invoke.texi: Correct -Wformat-overflow code sample.
12716 2018-02-14 Martin Sebor <msebor@redhat.com>
12718 PR tree-optimization/83698
12719 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
12720 arrays constrain the offset range to their bounds.
12721 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
12722 (builtin_access::overlap): Avoid setting the size of overlap if it's
12724 (maybe_diag_overlap): Also consider arrays when deciding what values
12725 of offsets to include in diagnostics.
12727 2018-02-14 Martin Sebor <msebor@redhat.com>
12730 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
12731 that correspond to the kind of a declaration.
12733 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
12736 * config/pa/pa.md: Load address of PIC label using the linkage table
12737 if the label is nonlocal.
12739 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
12741 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
12742 warning message if user requests -maltivec=be.
12743 * doc/invoke.texi: Document deprecation of -maltivec=be.
12745 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
12748 * config/rs6000/rs6000-c.c: Update definitions for
12749 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
12750 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
12752 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
12755 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
12756 add _get_ssp intrinsics. Remove argument from
12757 __builtin_ia32_rdssp[d|q].
12758 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
12759 * config/i386/i386-builtin.def: Remove argument from
12760 __builtin_ia32_rdssp[d|q].
12761 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
12762 ix86_expand_special_args_builtin for _rdssp[d|q].
12763 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
12764 Clear register before usage.
12765 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
12766 Add documentation for new _get_ssp and _inc_ssp intrinsics.
12768 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
12770 PR tree-optimization/84357
12771 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
12772 operand 1 of an ARRAY_REF too.
12774 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
12777 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
12778 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12780 (set_of_reg): New struct.
12781 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
12782 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
12783 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12785 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
12786 Split into bitclr, bitset, bitinvert patterns if appropriate.
12787 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
12788 use rx_fuse_in_memory_bitop.
12789 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
12790 to named insn, correct maximum insn length.
12792 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
12795 * machmode.def: Define a complex mode for PARTIAL_INT.
12796 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
12798 * doc/rtl.texi: Document CSPImode.
12799 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
12801 (msp430_hard_regno_nregs_with_padding): Likewise.
12803 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
12806 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
12808 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
12810 PR rtl-optimization/84169
12811 * combine.c (try_combine): New variable split_i2i3. Set it to true if
12812 we generated a parallel as new i3 and we split that to new i2 and i3
12813 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
12814 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
12815 those to i2, not i1. Partially rewrite this scan code.
12817 2018-02-13 Jakub Jelinek <jakub@redhat.com>
12820 * stor-layout.c (place_field): For variable length fields, adjust
12821 offset_align afterwards not just based on the field's alignment,
12822 but also on the size.
12824 PR middle-end/84309
12825 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
12826 of exps and logs in the use_exp2 case.
12828 2018-02-13 Jeff Law <law@redhat.com>
12830 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
12831 entry for "vector".
12833 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
12836 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
12840 * common.opt (gas-loc-support, gas-locview-support): New.
12841 (ginline-points, ginternal-reset-location-views): New.
12842 * doc/invoke.texi: Document them. Use @itemx where intended.
12843 (gvariable-location-views): Adjust.
12844 * target.def (reset_location_view): New.
12845 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
12846 (TARGET_RESET_LOCATION_VIEW): New.
12847 * doc/tm.texi: Rebuilt.
12848 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
12849 (dwarf2out_default_as_locview_support): New.
12850 (output_asm_line_debug_info): Use option variables.
12851 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
12852 (output_loc_list): Likewise.
12853 (add_high_low_attributes): Check option variables.
12854 Don't output entry view attribute in strict mode.
12855 (gen_inlined_subroutine_die): Check option variables.
12856 (dwarf2out_inline_entry): Likewise.
12857 (init_sections_and_labels): Likewise.
12858 (dwarf2out_early_finish): Likewise.
12859 (maybe_reset_location_view): New, from...
12860 (dwarf2out_var_location): ... here. Call it.
12861 * debug.h (dwarf2out_default_as_loc_support): Declare.
12862 (dwarf2out_default_as_locview_support): Declare.
12863 * hooks.c (hook_int_rtx_insn_0): New.
12864 * hooks.h (hook_int_rtx_insn_0): Declare.
12865 * toplev.c (process_options): Take -gas-loc-support and
12866 -gas-locview-support from dwarf2out. Enable
12867 -gvariable-location-views by default only with locview
12868 assembler support. Enable -ginternal-reset-location-views by
12869 default only if the target defines the corresponding hook.
12870 Enable -ginline-points by default if location views are
12871 enabled; force it disabled if statement frontiers are
12873 * tree-inline.c (expand_call_inline): Check option variables.
12874 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
12876 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
12878 PR tree-optimization/84321
12879 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
12880 handling. Also check whether the anti-range contains any values
12881 that satisfy the mask; switch to a VR_RANGE if not.
12883 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
12886 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
12888 2018-02-13 Martin Jambor <mjambor@suse.cz>
12891 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
12892 of call statements, also set location of a load to a temporary.
12894 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
12896 * config/rl78/rl78.c (add_vector_labels): New function.
12897 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
12898 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
12899 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
12900 which checks that no arguments are passed.
12901 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
12902 * doc/extend.texi: Documentation for the new attribute.
12904 2018-02-13 Andreas Schwab <schwab@suse.de>
12906 * config/riscv/linux.h (CPP_SPEC): Define.
12908 2018-02-13 Jakub Jelinek <jakub@redhat.com>
12911 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
12912 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
12913 OPTION_MASK_ISA_AES as first argument to def_builtin_const
12914 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
12915 instead of OPTION_MASK_ISA_PCLMUL as first argument to
12916 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
12917 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
12918 temporarily for AES and PCLMUL builtins.
12920 PR tree-optimization/84339
12921 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
12922 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
12925 PR middle-end/84309
12926 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
12927 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
12928 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
12930 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
12932 * omp-simd-clone.h: New file.
12933 * omp-simd-clone.c: Include omp-simd-clone.h.
12934 (expand_simd_clones): No longer static.
12935 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
12936 cgraph.h and omp-simd-clone.h.
12937 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
12938 (vect_recog_widen_shift_pattern): Formatting fix.
12939 (vect_pattern_recog_1): Don't check optab for calls.
12942 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
12943 operands[2] into a REG before using gen_lowpart on it.
12945 2018-02-12 Jeff Law <law@redhat.com>
12948 * config/sh/sh.c (find_barrier): Consider a sibling call
12951 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
12952 successfully back substituting a reg.
12954 2018-02-12 Richard Biener <rguenther@suse.de>
12956 PR tree-optimization/84037
12957 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
12958 parameter, move visited init to caller.
12959 (vect_slp_analyze_operations): Separate cost from validity
12960 check, initialize visited once for all instances.
12961 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
12963 * tree-vect-stmts.c (vect_model_simple_cost): Make early
12965 (vect_model_promotion_demotion_cost): Likewise.
12966 (vectorizable_bswap): Guard cost modeling with !slp_node
12967 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
12969 (vectorizable_call): Likewise.
12970 (vectorizable_conversion): Likewise.
12971 (vectorizable_assignment): Likewise.
12972 (vectorizable_shift): Likewise.
12973 (vectorizable_operation): Likewise.
12974 (vectorizable_store): Likewise.
12975 (vectorizable_load): Likewise.
12976 (vectorizable_condition): Likewise.
12977 (vectorizable_comparison): Likewise.
12979 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
12982 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
12983 (ASAN_MARK): Fix fnspec to account for return value, change pointer
12984 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
12986 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
12988 PR middle-end/83665
12989 * params.def (inline-min-speedup): Increase from 8 to 15.
12990 (max-inline-insns-auto): Decrease from 40 to 30.
12991 * ipa-split.c (consider_split): Add some buffer for function to
12992 be considered inlining candidate.
12993 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
12996 2018-02-12 Richard Biener <rguenther@suse.de>
12998 PR tree-optimization/84037
12999 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
13000 matched stmts if we cannot swap the non-matched ones.
13002 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13004 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
13005 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
13006 _mm_maskz_scalef_round_ss): New intrinsics.
13007 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
13008 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
13009 __builtin_ia32_scalefss_round): Remove.
13010 (__builtin_ia32_scalefsd_mask_round,
13011 __builtin_ia32_scalefss_mask_round): New intrinsics.
13012 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
13013 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
13014 ((match_operand:VF_128 2 "<round_nimm_predicate>"
13015 "<round_constraint>")): Changed to ...
13016 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
13017 "<round_scalar_constraint>")): ... this.
13018 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
13019 %0, %1, %2<round_op3>}"): Changed to ...
13020 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
13021 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
13022 %2<round_scalar_mask_op3>}"): ... this.
13023 * config/i386/subst.md (round_scalar_nimm_predicate): New.
13025 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13027 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
13028 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
13029 (_mm_maskz_sqrt_round_ss): New intrinsics.
13030 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
13031 (__builtin_ia32_sqrtsd_mask_round)
13032 (__builtin_ia32_sqrtss_mask_round): New builtins.
13033 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
13034 (__builtin_ia32_sqrtss_round): Remove.
13035 (__builtin_ia32_sqrtsd_mask_round)
13036 (__builtin_ia32_sqrtss_mask_round): New builtins.
13037 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
13038 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
13039 ((match_operand:VF_128 1 "vector_operand"
13040 "xBm,<round_constraint>")): Changed to ...
13041 ((match_operand:VF_128 1 "vector_operand"
13042 "xBm,<round_scalar_constraint>")): ... this.
13043 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
13044 %0, %2, %<iptr>1<round_op3>}): Changed to ...
13045 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
13046 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
13047 %<iptr>1<round_scalar_mask_op3>}): ... this.
13048 ((set_attr "prefix" "<round_prefix>")): Changed to ...
13049 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
13051 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
13054 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
13055 Cast vec_cmpeq result to correct type.
13056 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
13057 Cast vec_cmpgt result to correct type.
13059 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
13061 * final.c (final_scan_insn_1): Renamed from...
13062 (final_scan_insn): ... this. New wrapper, to recover
13063 seen from the outermost call in recursive ones.
13064 * config/sparc/sparc.c (output_return): Drop seen from call.
13065 (output_sibcall): Likewise.
13066 * config/visium/visium.c (output_branch): Likewise.
13068 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
13070 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
13073 2018-02-10 Alan Modra <amodra@gmail.com>
13076 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
13077 Specify LR as an input.
13079 2018-02-10 Jakub Jelinek <jakub@redhat.com>
13082 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
13083 remove_member_access_dummy_vars): New functions.
13084 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
13085 lower_omp_1, execute_lower_omp): Use them.
13087 PR rtl-optimization/84308
13088 * shrink-wrap.c (spread_components): Release todo vector.
13090 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
13092 PR rtl-optimization/57193
13093 * ira-color.c (struct allocno_color_data): Add member
13094 conflict_allocno_hard_prefs.
13095 (update_conflict_allocno_hard_prefs): New.
13096 (bucket_allocno_compare_func): Add a preference based on
13097 conflict_allocno_hard_prefs.
13098 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
13099 (color_allocnos): Remove a dead code. Initiate
13100 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
13102 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13105 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
13106 constraint from =wa to wa. Avoid a subreg on the output operand,
13107 instead use a pseudo and subreg it in a move.
13108 (p9_xxbrd_<mode>): Changed to ...
13109 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
13110 (p9_xxbrd_v2df): New expander.
13111 (p9_xxbrw_<mode>): Changed to ...
13112 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
13113 (p9_xxbrw_v4sf): New expander.
13115 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13117 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
13119 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
13122 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
13123 multiply in 32-bit mode.
13124 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
13125 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
13128 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13130 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
13131 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
13132 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
13133 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
13135 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
13138 * dwarf2out.c (is_trivial_indirect_ref): New function.
13139 (dwarf2out_late_global_decl): Do not generate a location
13140 attribute for variables that have a non-trivial DECL_VALUE_EXPR
13141 and that are not defined in the current unit.
13143 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
13145 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
13146 instead of a libcall for UNORDERED.
13148 2018-02-09 Tamar Christina <tamar.christina@arm.com>
13151 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
13152 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
13154 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13157 * config/s390/s390.c (s390_set_current_function): Invoke
13158 s390_indirect_branch_settings also if fndecl didn't change.
13160 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
13162 * config/rs6000/rs6000.md (blockage): Set length to zero.
13164 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
13166 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
13168 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13171 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
13172 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
13176 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
13177 PARALLEL incoming that failed vt_get_decl_and_offset check.
13179 PR middle-end/84237
13180 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
13181 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
13183 (get_variable_section): For decls in named .bss* sections pass true as
13184 second argument to bss_initializer_p.
13186 2018-02-09 Marek Polacek <polacek@redhat.com>
13187 Jakub Jelinek <jakub@redhat.com>
13190 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
13191 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
13192 Sync some changes from cxx_fold_indirect_ref.
13194 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
13196 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
13198 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
13199 (BLOCK_INLINE_ENTRY_LABEL): New.
13200 (dwarf2out_var_location): Disregard inline entry markers.
13201 (inline_entry_data): New struct.
13202 (inline_entry_data_hasher): New hashtable type.
13203 (inline_entry_data_hasher::hash): New.
13204 (inline_entry_data_hasher::equal): New.
13205 (inline_entry_data_table): New variable.
13206 (add_high_low_attributes): Add DW_AT_entry_pc and
13207 DW_AT_GNU_entry_view attributes if a pending entry is found
13208 in inline_entry_data_table. Add old entry_pc attribute only
13209 if debug nonbinding markers are disabled.
13210 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
13211 markers are enabled.
13212 (block_within_block_p, dwarf2out_inline_entry): New.
13213 (dwarf2out_finish): Check that no entries remained in
13214 inline_entry_data_table.
13215 * final.c (reemit_insn_block_notes): Handle inline entry notes.
13216 (final_scan_insn, notice_source_line): Likewise.
13217 (rest_of_clean_state): Skip inline entry markers.
13218 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
13220 * gimple.c (gimple_build_debug_inline_entry): New.
13221 * gimple.h (enum gimple_debug_subcode): Add
13222 GIMPLE_DEBUG_INLINE_ENTRY.
13223 (gimple_build_debug_inline_entry): Declare.
13224 (gimple_debug_inline_entry_p): New.
13225 (gimple_debug_nonbind_marker_p): Adjust.
13226 * insn-notes.def (INLINE_ENTRY): New.
13227 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
13228 inline entry marker notes.
13229 (print_insn): Likewise.
13230 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
13231 (INSN_DEBUG_MARKER_KIND): Likewise.
13232 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
13233 * tree-inline.c (expand_call_inline): Build and insert
13234 debug_inline_entry stmt.
13235 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
13236 inline entry blocks early, if nonbind markers are enabled.
13237 (dump_scope_block): Dump fragment info.
13238 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
13239 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
13240 (gimple_build_debug_inline_entry): New.
13241 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
13242 Enable/disable inline entry points too.
13243 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
13244 (DEBUG_INSN): Describe inline entry markers.
13246 * common.opt (gvariable-location-views): New.
13247 (gvariable-location-views=incompat5): New.
13248 * config.in: Rebuilt.
13249 * configure: Rebuilt.
13250 * configure.ac: Test assembler for view support.
13251 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
13252 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
13253 * dwarf2out.c (var_loc_view): New typedef.
13254 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
13255 (dwarf2out_locviews_in_attribute): New.
13256 (dwarf2out_locviews_in_loclist): New.
13257 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
13258 (enum dw_line_info_opcode): Add LI_adv_address.
13259 (struct dw_line_info_table): Add view.
13260 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
13261 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
13262 (zero_view_p): New variable.
13263 (ZERO_VIEW_P): New macro.
13264 (output_asm_line_debug_info): New.
13265 (struct var_loc_node): Add view.
13266 (add_AT_view_list, AT_loc_list): New.
13267 (add_var_loc_to_decl): Add view param. Test it against last.
13268 (new_loc_list): Add view params. Record them.
13269 (AT_loc_list_ptr): Handle loc and view lists.
13270 (view_list_to_loc_list_val_node): New.
13271 (print_dw_val): Handle dw_val_class_view_list.
13272 (size_of_die): Likewise.
13273 (value_format): Likewise.
13274 (loc_list_has_views): New.
13275 (gen_llsym): Set vl_symbol too.
13276 (maybe_gen_llsym, skip_loc_list_entry): New.
13277 (dwarf2out_maybe_output_loclist_view_pair): New.
13278 (output_loc_list): Output view list or entries too.
13279 (output_view_list_offset): New.
13280 (output_die): Handle dw_val_class_view_list.
13281 (output_dwarf_version): New.
13282 (output_compilation_unit_header): Use it.
13283 (output_skeleton_debug_sections): Likewise.
13284 (output_rnglists, output_line_info): Likewise.
13285 (output_pubnames, output_aranges): Update version comments.
13286 (output_one_line_info_table): Output view numbers in asm comments.
13287 (dw_loc_list): Determine current endview, pass it to new_loc_list.
13288 Call maybe_gen_llsym.
13289 (loc_list_from_tree_1): Adjust.
13290 (add_AT_location_description): Create view list attribute if
13291 needed, check it's absent otherwise.
13292 (convert_cfa_to_fb_loc_list): Adjust.
13293 (maybe_emit_file): Call output_asm_line_debug_info for test.
13294 (dwarf2out_var_location): Reset views as needed. Precompute
13295 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
13296 attribute. Set view.
13297 (new_line_info_table): Reset next view.
13298 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
13299 (dwarf2out_source_line): Likewise. Output view resets and labels to
13300 the assembler, or select appropriate line info opcodes.
13301 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
13302 (optimize_string_length): Catch it. Adjust.
13303 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
13304 dw_val_class_view_list, and remove it if no longer needed.
13305 (hash_loc_list): Hash view numbers.
13306 (loc_list_hasher::equal): Compare them.
13307 (optimize_location_lists): Check whether a view list symbol is
13308 needed, and whether the locview attribute is present, and
13309 whether they match. Remove the locview attribute if no longer
13311 (index_location_lists): Call skip_loc_list_entry for test.
13312 (dwarf2out_finish): Call output_asm_line_debug_info for test.
13313 Use output_dwarf_version.
13314 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
13315 (struct dw_val_node): Add val_view_list.
13316 * final.c (SEEN_NEXT_VIEW): New.
13317 (set_next_view_needed): New.
13318 (clear_next_view_needed): New.
13319 (maybe_output_next_view): New.
13320 (final_start_function): Rename to...
13321 (final_start_function_1): ... this. Take pointer to FIRST,
13322 add SEEN parameter. Emit param bindings in the initial view.
13323 (final_start_function): Reintroduce SEEN-less interface.
13324 (final): Rename to...
13325 (final_1): ... this. Take SEEN parameter. Output final pending
13326 next view at the end.
13327 (final): Reintroduce seen-less interface.
13328 (final_scan_insn): Output pending next view before switching
13329 sections or ending a block. Mark the next view as needed when
13330 outputting variable locations. Notify debug backend of section
13331 changes, and of location view changes.
13332 (rest_of_handle_final): Adjust.
13333 * toplev.c (process_options): Autodetect value for debug variable
13334 location views option. Warn on incompat5 without -gdwarf-5.
13335 * doc/invoke.texi (gvariable-location-views): New.
13336 (gvariable-location-views=incompat5): New.
13337 (gno-variable-location-views): New.
13339 2018-02-08 David Malcolm <dmalcolm@redhat.com>
13341 PR tree-optimization/84136
13342 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
13343 that the result of find_edge is non-NULL.
13345 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
13348 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
13349 storing integer register in SImode. Fix cost of 256 and 512
13350 byte aligned SSE register store.
13352 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
13354 * config/i386/i386.c (ix86_multiplication_cost): Fix
13355 multiplication cost for TARGET_AVX512DQ.
13357 2018-02-08 Marek Polacek <polacek@redhat.com>
13359 PR tree-optimization/84238
13360 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
13363 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
13365 PR tree-optimization/84265
13366 * tree-vect-stmts.c (vectorizable_store): Don't treat
13367 VMAT_CONTIGUOUS accesses as grouped.
13368 (vectorizable_load): Likewise.
13370 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
13372 PR tree-optimization/81635
13373 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
13374 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
13375 (test_round_for_mask): New functions.
13376 (wide_int_cc_tests): Call test_round_for_mask.
13377 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
13378 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
13379 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
13380 range returned by get_range_info.
13382 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
13385 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
13386 * symtab.c: Include builtins.h
13387 (symtab_node::output_to_lto_symbol_table_p): Move here
13388 from lto-streamer-out.c:output_symbol_p.
13389 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
13390 (output_symbol_p): Move all logic to symtab.c
13391 (produce_symtab): Update.
13393 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13395 * config/s390/s390-opts.h (enum indirect_branch): Define.
13396 * config/s390/s390-protos.h (s390_return_addr_from_memory)
13397 (s390_indirect_branch_via_thunk)
13398 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
13399 (enum s390_indirect_branch_type): Define.
13400 * config/s390/s390.c (struct s390_frame_layout, struct
13401 machine_function): Remove.
13402 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
13403 (indirect_branch_table_label_no, indirect_branch_table_name):
13405 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
13406 (enum s390_indirect_branch_option): Define.
13407 (s390_return_addr_from_memory): New function.
13408 (s390_handle_string_attribute): New function.
13409 (s390_attribute_table): Add new attribute handler.
13410 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
13411 (s390_indirect_branch_via_thunk): New function.
13412 (s390_indirect_branch_via_inline_thunk): New function.
13413 (s390_function_ok_for_sibcall): When jumping via thunk disallow
13414 sibling call optimization for non z10 compiles.
13415 (s390_emit_call): Force indirect branch target to be a single
13416 register. Add r1 clobber for non-z10 compiles.
13417 (s390_emit_epilogue): Emit return jump via return_use expander.
13418 (s390_reorg): Handle JUMP_INSNs as execute targets.
13419 (s390_option_override_internal): Perform validity checks for the
13420 new command line options.
13421 (s390_indirect_branch_attrvalue): New function.
13422 (s390_indirect_branch_settings): New function.
13423 (s390_set_current_function): Invoke s390_indirect_branch_settings.
13424 (s390_output_indirect_thunk_function): New function.
13425 (s390_code_end): Implement target hook.
13426 (s390_case_values_threshold): Implement target hook.
13427 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
13429 * config/s390/s390.h (struct s390_frame_layout)
13430 (struct machine_function): Move here from s390.c.
13431 (TARGET_INDIRECT_BRANCH_NOBP_RET)
13432 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
13433 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
13434 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
13435 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
13436 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
13437 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
13438 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
13439 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
13440 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
13441 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
13442 (mnemonic attribute): Add values which aren't recognized
13444 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
13445 pattern for branch conversion. Fix mnemonic attribute.
13446 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
13447 indirect branch via thunk if requested.
13448 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
13449 ("*indirect_jump"): Disable for branch conversion using out of
13451 ("indirect_jump_via_thunk<mode>_z10")
13452 ("indirect_jump_via_thunk<mode>")
13453 ("indirect_jump_via_inlinethunk<mode>_z10")
13454 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
13455 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
13456 ("casesi_jump_via_inlinethunk<mode>_z10")
13457 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
13458 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
13459 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
13460 ("*indirect2_jump"): Disable for branch conversion.
13461 ("casesi_jump"): Turn into expander and expand patterns for branch
13463 ("return_use"): New expander.
13464 ("*return"): Emit return via thunk and rename it to ...
13465 ("*return<mode>"): ... this one.
13466 * config/s390/s390.opt: Add new options and and enum for the
13469 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
13471 * lra-constraints.c (match_reload): Unconditionally use
13472 gen_lowpart_SUBREG, rather than selecting between that
13473 and equivalent gen_rtx_SUBREG code.
13475 2018-02-08 Richard Biener <rguenther@suse.de>
13477 PR tree-optimization/84233
13478 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
13479 changed flag instead of boguously re-using phi_inserted.
13481 2018-02-08 Martin Jambor <mjambor@suse.cz>
13483 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
13484 static local variables.
13486 2018-02-08 Richard Biener <rguenther@suse.de>
13488 PR tree-optimization/84278
13489 * tree-vect-stmts.c (vectorizable_store): When looking for
13490 smaller vector types to perform grouped strided loads/stores
13491 make sure the mode is supported by the target.
13492 (vectorizable_load): Likewise.
13494 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
13496 * config/aarch64/aarch64.c (aarch64_components_for_bb):
13497 Increase LDP/STP opportunities by adding adjacent callee-saves.
13499 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
13501 PR rtl-optimization/84068
13502 PR rtl-optimization/83459
13503 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
13505 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
13507 PR tree-optimization/84224
13508 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
13509 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
13510 non-zero arguments.
13512 2018-02-07 Iain Sandoe <iain@codesourcery.com>
13515 * config/rs6000/altivec.md (*restore_world): Remove LR use.
13516 * config/rs6000/predicates.md (restore_world_operation): Adjust op
13517 count, remove one USE.
13519 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
13521 * doc/install.texi (Configuration): Document the
13522 --with-long-double-format={ibm,ieee} PowerPC configuration
13526 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
13527 Convert from define_expand to be define_insn_and_split. Rework
13528 float/double/_Float128 conversions to QI/HI/SImode to work with
13529 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
13530 conversions to QI/HImode types did a store and then a load to
13531 truncate the value. For conversions to VSX registers, don't split
13532 the insn, instead emit the code directly. Use the code iterator
13533 any_fix to combine signed and unsigned conversions.
13534 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
13535 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
13536 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13537 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
13538 (fix_<mode>di2_hw): Likewise.
13539 (fixuns_<mode>di2_hw): Likewise.
13540 (fix_<mode>si2_hw): Likewise.
13541 (fixuns_<mode>si2_hw): Likewise.
13542 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
13543 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13544 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
13545 fix<uns>_trunc<SFDF:mode>si2_p8.
13546 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
13547 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
13548 (fix<uns>_<mode>_mem): Likewise.
13549 (fctiw<u>z_<mode>_mem): Likewise.
13550 (fix<uns>_<mode>_mem): Likewise.
13551 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
13552 the register allocator from doing a direct move to the GPRs to do
13553 a store, and instead use the ISA 3.0 store byte/half-word from
13554 vector register instruction. For IEEE 128-bit floating point,
13555 also optimize stores of 32-bit ints.
13556 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
13558 2018-02-07 Alan Hayward <alan.hayward@arm.com>
13560 * genextract.c (push_pathstr_operand): New function to support
13562 (walk_rtx): Call push_pathstr_operand.
13563 (print_path): Support [a-zA-Z].
13565 2018-02-07 Richard Biener <rguenther@suse.de>
13567 PR tree-optimization/84037
13568 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
13569 (cse_and_gimplify_to_preheader): Declare.
13570 (vect_get_place_in_interleaving_chain): Likewise.
13571 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13573 (_loop_vec_info::~_loop_vec_info): Delete it.
13574 (cse_and_gimplify_to_preheader): New function.
13575 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
13576 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
13577 (vectorizable_load): Likewise. For grouped stores always base
13578 the IV on the first element.
13579 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
13580 condition before gimplifying.
13582 2018-02-07 Jakub Jelinek <jakub@redhat.com>
13584 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
13585 *DIV_EXPR and *MOD_EXPR.
13587 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
13590 * config/i386/i386.c (ix86_option_override_internal): Mask out
13591 the CF_SET bit when checking -fcf-protection.
13593 2018-02-07 Tom de Vries <tom@codesourcery.com>
13596 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
13599 2018-02-07 Richard Biener <rguenther@suse.de>
13601 PR tree-optimization/84204
13602 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
13605 PR tree-optimization/84205
13606 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
13607 special-case isl_ast_op_zdiv_r.
13609 PR tree-optimization/84223
13610 * graphite-scop-detection.c (gather_bbs::before_dom_children):
13611 Only add conditions from within the region.
13612 (gather_bbs::after_dom_children): Adjust.
13614 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
13617 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
13618 * config/avr/avr.md: Only post-reload split REG-REG moves if
13619 either register is GENERAL_REG_P.
13621 2018-02-07 Jakub Jelinek <jakub@redhat.com>
13623 PR tree-optimization/84235
13624 * tree-ssa-scopedtables.c
13625 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
13626 if the subtraction is performed in floating point type where NaNs are
13627 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
13628 build 1. Formatting fix.
13630 2018-02-06 Jakub Jelinek <jakub@redhat.com>
13633 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
13634 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
13635 and skip it regardless of bb boundaries. Use CALL_P macro,
13636 don't test INSN_P (insn) together with CALL_P or JUMP_P check
13637 unnecessarily, formatting fix.
13639 2018-02-06 Michael Collison <michael.collison@arm.com>
13641 * config/arm/thumb2.md:
13642 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
13643 (*thumb_mov_notscc): Ditto.
13645 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
13648 * config/rs6000/rs6000.md (su code attribute): Use "u" for
13649 unsigned_fix, not "s".
13651 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13653 * configure.ac (gcc_fn_eh_frame_ro): New function.
13654 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
13655 correct .eh_frame permissions.
13656 * configure: Regenerate.
13658 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
13660 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
13661 irrelevant options.
13663 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13665 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13666 Display warning message for -mno-speculate-indirect-jumps.
13668 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
13670 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
13672 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
13674 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
13676 PR tree-optimization/84225
13677 * tree-eh.c (find_trapping_overflow): Only call
13678 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
13680 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13683 * config/i386/i386.c: Reimplement the check of possible options
13684 -mibt/-mshstk conbination. Change error messages.
13685 * doc/invoke.texi: Fix a typo: remove extra '='.
13687 2018-02-06 Marek Polacek <polacek@redhat.com>
13689 PR tree-optimization/84228
13690 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
13692 2018-02-06 Tamar Christina <tamar.christina@arm.com>
13695 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
13696 emitted arch directives.
13697 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
13698 __ARM_FEATURE_COPROC before changing architectures.
13700 2018-02-06 Richard Biener <rguenther@suse.de>
13702 * config/i386/i386.c (print_reg): Fix typo.
13703 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
13705 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
13707 * configure: Regenerate.
13709 2018-02-05 Martin Sebor <msebor@redhat.com>
13711 PR tree-optimization/83369
13712 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
13715 2018-02-05 Martin Liska <mliska@suse.cz>
13717 * doc/invoke.texi: Cherry-pick upstream r323995.
13719 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
13721 * ira.c (ira_init_register_move_cost): Adjust comment.
13723 2018-02-05 Martin Liska <mliska@suse.cz>
13725 PR gcov-profile/84137
13726 * doc/gcov.texi: Fix typo in documentation.
13728 2018-02-05 Martin Liska <mliska@suse.cz>
13730 PR gcov-profile/83879
13731 * doc/gcov.texi: Document necessity of --dynamic-list-data when
13732 using dlopen functionality.
13734 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
13736 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
13737 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
13738 _mm_maskz_range_ss, _mm_mask_range_round_ss,
13739 _mm_maskz_range_round_ss): New intrinsics.
13740 (__builtin_ia32_rangesd128_round)
13741 (__builtin_ia32_rangess128_round): Remove.
13742 (__builtin_ia32_rangesd128_mask_round,
13743 __builtin_ia32_rangess128_mask_round): New builtins.
13744 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
13745 __builtin_ia32_rangess128_round): Remove.
13746 (__builtin_ia32_rangesd128_mask_round,
13747 __builtin_ia32_rangess128_mask_round): New builtins.
13748 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
13749 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
13750 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
13751 "<round_saeonly_constraint>")): Changed to ...
13752 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
13753 "<round_saeonly_scalar_constraint>")): ... this.
13754 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
13755 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
13756 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
13757 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
13758 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
13760 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
13762 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
13764 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
13765 Remove all values except native, 8540 and 8548.
13767 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
13769 * config/i386/i386.c (ix86_output_function_return): Pass
13770 INVALID_REGNUM, instead of -1, as invalid register number to
13771 indirect_thunk_name and output_indirect_thunk.
13773 2018-02-02 Julia Koval <julia.koval@intel.com>
13775 * config.gcc: Add -march=icelake.
13776 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
13777 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
13778 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
13779 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
13780 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
13781 (processor_target_table): Add icelake.
13782 (ix86_option_override_internal): Handle new PTAs.
13783 (get_builtin_code_for_version): Handle icelake.
13784 (M_INTEL_COREI7_ICELAKE): New.
13785 (fold_builtin_cpu): Handle icelake.
13786 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
13787 * doc/invoke.texi: Add -march=icelake.
13789 2018-02-02 Julia Koval <julia.koval@intel.com>
13791 * config/i386/i386.c (ix86_option_override_internal): Change flags type
13792 to wide_int_bitmask.
13793 * wide-int-bitmask.h: New.
13795 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13798 * config/i386/i386.md: Replace Pmode with word_mode in
13799 builtin_setjmp_setup and builtin_longjmp to support x32.
13801 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
13805 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
13807 (rs6000_supported_cpu_names): New static variable.
13808 (linux_cpu_translation_table): Likewise.
13809 (elf_platform) <cpu>: Define new static variable and use it.
13810 Translate kernel AT_PLATFORM name to canonical name if needed.
13811 Error if platform name is unknown.
13813 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
13816 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
13818 2018-02-01 Jeff Law <law@redhat.com>
13821 * config/i386/i386.c (release_scratch_register_on_entry): Add new
13822 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
13823 the scratch if RELEASE_VIA_POP is false.
13824 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
13825 If we have to save a temporary register, decrement SIZE appropriately.
13826 Pass new arguments to release_scratch_register_on_entry.
13827 (ix86_adjust_stack_and_probe): Likewise.
13828 (ix86_emit_probe_stack_range): Pass new arguments to
13829 release_scratch_register_on_entry.
13831 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
13833 PR rtl-optimization/84157
13834 * combine.c (change_zero_ext): Use REG_P predicate in
13835 front of HARD_REGISTER_P predicate.
13837 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
13839 * config/avr/avr.c (avr_option_override): Move disabling of
13840 -fdelete-null-pointer-checks to...
13841 * common/config/avr/avr-common.c (avr_option_optimization_table):
13844 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13846 PR tree-optimization/81635
13847 * tree-data-ref.c (split_constant_offset_1): For types that
13848 wrap on overflow, try to use range info to prove that wrapping
13851 2018-02-01 Renlin Li <renlin.li@arm.com>
13854 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
13855 TAILCALL_ADDR_REGS.
13856 (aarch64_register_move_cost): Likewise.
13857 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
13858 TAILCALL_ADDR_REGS.
13859 (REG_CLASS_NAMES): Likewise.
13860 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
13861 TAILCALL_ADDR_REGS. Remove IP registers.
13862 * config/aarch64/aarch64.md (Ucs): Update register constraint.
13864 2018-02-01 Richard Biener <rguenther@suse.de>
13866 * domwalk.h (dom_walker::dom_walker): Add additional constructor
13867 for specifying RPO order and allow NULL for that.
13868 * domwalk.c (dom_walker::dom_walker): Likewise.
13869 (dom_walker::walk): Handle NULL RPO order.
13870 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
13872 (rewrite_update_dom_walker): Likewise.
13873 (mark_def_dom_walker): Likewise.
13875 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13877 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
13878 (aarch64_maybe_expand_sve_subreg_move): Declare.
13879 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
13880 * config/aarch64/predicates.md (aarch64_any_register_operand): New
13882 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
13883 that are semantically a reverse operation.
13884 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
13885 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
13886 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
13888 (aarch64_can_change_mode_class): For big-endian, forbid changes
13889 between two SVE modes if they have different element sizes.
13891 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13893 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
13894 the TImode handling for big-endian targets.
13896 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13898 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
13899 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
13901 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
13902 Remove BSWAP handing for big-endian targets and use the form of
13903 LD1RQ appropariate for the mode.
13905 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13907 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
13908 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
13909 duplicated element.
13911 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13914 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
13915 check for operands that need to go through aarch64_sve_reload_be.
13917 2018-02-01 Jakub Jelinek <jakub@redhat.com>
13919 PR tree-optimization/81661
13920 PR tree-optimization/84117
13921 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
13922 * tree-eh.c: Include gimplify.h.
13923 (find_trapping_overflow, replace_trapping_overflow,
13924 rewrite_to_non_trapping_overflow): New functions.
13925 * tree-vect-loop.c: Include tree-eh.h.
13926 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
13927 * tree-data-ref.c: Include tree-eh.h.
13928 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
13930 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
13932 PR rtl-optimization/84123
13933 * combine.c (change_zero_ext): Check if hard register satisfies
13934 can_change_dest_mode before calling gen_lowpart_SUBREG.
13936 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
13939 * ira.c (ira_init_register_move_cost): Remove assert.
13941 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
13943 PR rtl-optimization/84071
13944 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
13945 * doc/tm.texi: Regenerate.
13947 2018-01-31 Richard Biener <rguenther@suse.de>
13949 PR tree-optimization/84132
13950 * tree-data-ref.c (analyze_miv_subscript): Properly
13951 check whether evolution_function_is_affine_multivariate_p
13952 before calling gcd_of_steps_may_divide_p.
13954 2018-01-31 Julia Koval <julia.koval@intel.com>
13957 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
13958 * config/i386/i386.md (rdpid_rex64) New.
13959 (rdpid): Make 32bit only.
13961 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
13964 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
13965 an IDENTIFIER_NODE for FUNCTION_TYPE's.
13967 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
13970 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
13972 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
13974 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
13976 PR rtl-optimization/84071
13977 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
13978 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
13980 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
13982 * config/arc/arc.c (arc_handle_aux_attribute): New function.
13983 (arc_attribute_table): Add 'aux' attribute.
13984 (arc_in_small_data_p): Consider aux like variables.
13985 (arc_is_aux_reg_p): New function.
13986 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
13987 (arc_get_aux_arg): New function.
13988 (prepare_move_operands): Handle aux-register access.
13989 (arc_handle_aux_attribute): New function.
13990 * doc/extend.texi (ARC Variable attributes): Add subsection.
13992 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
13994 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
13995 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
13996 (arc_attribute_table): Add 'uncached' attribute.
13997 (arc_print_operand): Print '.di' flag for uncached memory
13999 (arc_in_small_data_p): Do not consider for small data the uncached
14001 (arc_is_uncached_mem_p): New function.
14002 * config/arc/predicates.md (compact_store_memory_operand): Check
14003 for uncached memory accesses.
14004 (nonvol_nonimm_operand): Likewise.
14005 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
14007 2018-01-31 Jakub Jelinek <jakub@redhat.com>
14010 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
14011 falign-loops=): Add Optimization flag.
14013 2018-01-30 Jeff Law <law@redhat.com>
14016 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
14017 INT_REGISTERS_SAVED. Check it prior to calling
14018 get_scratch_register_on_entry.
14019 (ix86_adjust_stack_and_probe): Similarly.
14020 (ix86_emit_probe_stack_range): Similarly.
14021 (ix86_expand_prologue): Corresponding changes.
14023 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14026 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
14027 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
14029 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
14032 * lra-constraints.c (curr_insn_transform): Process AND in the
14035 2018-01-30 Jakub Jelinek <jakub@redhat.com>
14037 PR rtl-optimization/83986
14038 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
14039 dependence against last_pending_memory_flush in addition to
14040 pending_jump_insns.
14042 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
14044 PR tree-optimization/81611
14045 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
14048 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14051 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
14054 2018-01-30 Richard Biener <rguenther@suse.de>
14055 Jakub Jelinek <jakub@redhat.com>
14057 PR tree-optimization/84111
14058 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
14059 inner loops added during recursion, as they don't have up-to-date
14062 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14065 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
14066 (can_inline_edge_by_limits_p): ... here.
14067 (can_early_inline_edge_p, check_callers,
14068 update_caller_keys, update_callee_keys, recursive_inlining,
14069 add_new_edges_to_heap, speculation_useful_p,
14070 inline_small_functions,
14071 inline_small_functions, flatten_function,
14072 inline_to_all_callers_1): Update.
14074 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14076 * profile-count.c (profile_count::combine_with_ipa_count): Handle
14079 2018-01-30 Richard Biener <rguenther@suse.de>
14081 PR tree-optimization/83008
14082 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
14083 invariant and constant vector uses in stmts when they need
14084 more than one stmt.
14086 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14089 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
14090 * configure: Regenerate.
14092 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14094 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
14096 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
14097 Use gen_rtx_REG rather than gen_lowpart.
14099 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14101 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
14102 rather than 0 when creating partial subregs.
14104 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14106 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
14109 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
14112 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
14113 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
14114 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
14115 flags. This restores the settings used before the 2017-07-24.
14116 Turning off pre increment/decrement/modify allows IVOPTS to
14117 optimize DF/SF loops where the index is an int.
14119 2018-01-29 Richard Biener <rguenther@suse.de>
14120 Kelvin Nilsen <kelvin@gcc.gnu.org>
14123 * tree-vect-stmts.c (vectorizable_call): Don't call
14124 targetm.vectorize_builtin_md_vectorized_function if callee is
14127 2018-01-22 Carl Love <cel@us.ibm.com>
14129 * doc/extend.tex: Fix typo in second arg in
14130 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
14132 2018-01-29 Richard Biener <rguenther@suse.de>
14134 PR tree-optimization/84086
14135 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
14136 (flush_ssaname_freelist): When SSA names were released reset
14137 the SCEV hash table.
14139 2018-01-29 Richard Biener <rguenther@suse.de>
14141 PR tree-optimization/84057
14142 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
14143 removed paths when removing edges.
14145 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
14147 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
14148 -mfunction-return=@var{choice}.
14150 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
14152 PR diagnostic/84034
14153 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
14154 Handle CR like TAB.
14155 (layout::print_source_line): Likewise.
14156 (test_get_line_width_without_trailing_whitespace): Add test cases.
14158 2018-01-27 Jakub Jelinek <jakub@redhat.com>
14160 PR middle-end/84040
14161 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
14164 2018-01-26 Jim Wilson <jimw@sifive.com>
14166 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
14168 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
14171 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14173 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
14174 and CMP + SUB-immediate -> SUBS.
14176 2018-01-26 Martin Sebor <msebor@redhat.com>
14178 PR tree-optimization/83896
14179 * tree-ssa-strlen.c (get_string_len): Rename...
14180 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
14181 Avoid assuming length is constant.
14182 (handle_char_store): Use HOST_WIDE_INT for string length.
14184 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
14187 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
14188 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
14190 2018-01-26 Richard Biener <rguenther@suse.de>
14192 PR rtl-optimization/84003
14193 * dse.c (record_store): Only record redundant stores when
14194 the earlier store aliases at least all accesses the later one does.
14196 2018-01-26 Jakub Jelinek <jakub@redhat.com>
14198 PR rtl-optimization/83985
14199 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
14200 REG_CFA_RESTORE insns.
14201 (delete_unmarked_insns): Don't ignore separate shrink wrapping
14202 REG_CFA_RESTORE insns here.
14205 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
14206 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
14208 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14210 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
14211 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
14212 (arc_init): Likewise.
14213 (arc_override_options): Likewise.
14214 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
14216 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
14218 * config/arc/arc.h (TARGET_DBNZ): Define.
14219 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
14220 properly set the tune attribute.
14221 (dbnz): Use TARGET_DBNZ guard.
14222 * config/arc/arc.opt (mtune): Add core3 option.
14224 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14226 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
14227 recognize new pic like addresses.
14228 (arc_delegitimize_address): Clean up.
14230 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14232 * config/arc/arc-arches.def: Option mrf16 valid for all
14234 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
14235 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
14236 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
14237 * config/arc/arc-tables.opt: Regenerate.
14238 * config/arc/arc.c (arc_conditional_register_usage): Handle
14239 reduced register file case.
14240 (arc_file_start): Set must have build attributes.
14241 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
14242 mrf16 option value.
14243 * config/arc/arc.opt (mrf16): Add new option.
14244 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
14245 * config/arc/genmultilib.awk: Handle new mrf16 option.
14246 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
14247 * config/arc/t-multilib: Regenerate.
14248 * doc/invoke.texi (ARC Options): Document mrf16 option.
14250 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14252 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
14253 * config/arc/arc.c (arc_handle_secure_attribute): New function.
14254 (arc_attribute_table): Add 'secure_call' attribute.
14255 (arc_print_operand): Print secure call operand.
14256 (arc_function_ok_for_sibcall): Don't optimize tail calls when
14258 (arc_is_secure_call_p): New function. * config/arc/arc.md
14259 (call_i): Add support for sjli instruction.
14260 (call_value_i): Likewise.
14261 * config/arc/constraints.md (Csc): New constraint.
14263 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14264 John Eric Martin <John.Martin@emmicro-us.com>
14266 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
14267 * config/arc/arc.c (_arc_jli_section): New struct.
14268 (arc_jli_section): New type.
14269 (rc_jli_sections): New static variable.
14270 (arc_handle_jli_attribute): New function.
14271 (arc_attribute_table): Add jli_always and jli_fixed attribute.
14272 (arc_file_end): New function.
14273 (TARGET_ASM_FILE_END): Define.
14274 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
14275 (arc_add_jli_section): New function.
14276 (jli_call_scan): Likewise.
14277 (arc_reorg): Call jli_call_scan.
14278 (arc_output_addsi): Remove 'S' from printing asm operand.
14279 (arc_is_jli_call_p): New function.
14280 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
14282 (movhi_insn): Likewise.
14283 (movsi_insn): Likewise.
14284 (movsi_set_cc_insn): Likewise.
14285 (loadqi_update): Likewise.
14286 (load_zeroextendqisi_update): Likewise.
14287 (load_signextendqisi_update): Likewise.
14288 (loadhi_update): Likewise.
14289 (load_zeroextendhisi_update): Likewise.
14290 (load_signextendhisi_update): Likewise.
14291 (loadsi_update): Likewise.
14292 (loadsf_update): Likewise.
14293 (movsicc_insn): Likewise.
14294 (bset_insn): Likewise.
14295 (bxor_insn): Likewise.
14296 (bclr_insn): Likewise.
14297 (bmsk_insn): Likewise.
14298 (bicsi3_insn): Likewise.
14299 (cmpsi_cc_c_insn): Likewise.
14300 (movsi_ne): Likewise.
14301 (movsi_cond_exec): Likewise.
14302 (clrsbsi2): Likewise.
14303 (norm_f): Likewise.
14313 (call_i): Remove 'S' asm letter, add jli instruction.
14314 (call_value_i): Likewise.
14315 * config/arc/arc.op (mjli-always): New option.
14316 * config/arc/constraints.md (Cji): New constraint.
14317 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
14319 (subsf3_fpx): Likewise.
14320 (mulsf3_fpx): Likewise.
14321 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
14323 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
14324 function attrbutes.
14325 * doc/invoke.texi (ARC): Document mjli-always option.
14327 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
14329 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
14330 avoid addition with 0 and use incw and decw where possible.
14332 2018-01-26 Richard Biener <rguenther@suse.de>
14334 PR tree-optimization/81082
14335 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
14336 association if it requires casting to unsigned.
14337 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
14338 from fold_plusminus_mult_expr to catch important cases late when
14339 range info is available.
14341 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14343 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
14344 * configure.ac (hidden_linkonce): New test.
14345 * configure: Regenerate.
14346 * config.in: Regenerate.
14348 2018-01-26 Julia Koval <julia.koval@intel.com>
14350 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
14351 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
14352 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
14353 _mm_mask_bitshuffle_epi64_mask): Fix type.
14354 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
14355 USI_FTYPE_V4DI_V4DI_USI): Remove.
14356 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
14357 __builtin_ia32_vpshufbitqmb256_mask,
14358 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
14359 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
14360 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
14362 2018-01-26 Alan Modra <amodra@gmail.com>
14365 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
14366 UNSPEC_VBPERMQ. Sort other unspecs.
14368 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
14370 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
14372 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
14374 PR middle-end/83055
14375 * predict.c (drop_profile): Do not push/pop cfun; update also
14377 (handle_missing_profiles): Fix logic looking for zero profiles.
14379 2018-01-25 Jakub Jelinek <jakub@redhat.com>
14381 PR middle-end/83977
14382 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
14383 on functions with #pragma omp declare simd or functions with simd
14385 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
14386 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
14387 Remove trailing \n from warning_at calls.
14389 2018-01-25 Tom de Vries <tom@codesourcery.com>
14392 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14393 for neutered workers.
14395 2018-01-24 Joseph Myers <joseph@codesourcery.com>
14398 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
14399 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
14401 2018-01-24 Jeff Law <law@redhat.com>
14404 * i386.c (get_probe_interval): Move to earlier point.
14405 (ix86_compute_frame_layout): If -fstack-clash-protection and
14406 the frame is larger than the probe interval, then use pushes
14407 to save registers rather than reg->mem moves.
14408 (ix86_expand_prologue): Remove conditional for int_registers_saved
14411 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
14414 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
14415 min/max for never referenced object.
14417 2018-01-24 Jakub Jelinek <jakub@redhat.com>
14419 PR middle-end/83977
14420 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
14422 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
14423 attributes from DECL_ATTRIBUTES (decl) without affecting
14424 DECL_ATTRIBUTES (current_function_decl).
14425 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
14426 functions with non-NULL DECL_ABSTRACT_ORIGIN.
14428 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
14430 PR tree-optimization/83979
14431 * fold-const.c (fold_comparison): Use constant_boolean_node
14432 instead of boolean_{true,false}_node.
14434 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
14436 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
14439 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14441 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14442 Simplify the clause that sets the length attribute.
14443 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14444 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
14445 clause that sets the length attribute.
14446 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14448 2018-01-24 Tom de Vries <tom@codesourcery.com>
14451 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
14452 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
14453 Add strict parameter.
14454 (prevent_branch_around_nothing): Insert dummy insn between branch to
14455 label and label with no ptx insn inbetween.
14456 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
14458 2018-01-24 Tom de Vries <tom@codesourcery.com>
14461 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14462 for neutered threads in warp.
14463 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
14465 2018-01-24 Richard Biener <rguenther@suse.de>
14467 PR tree-optimization/83176
14468 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
14471 2018-01-24 Richard Biener <rguenther@suse.de>
14473 PR tree-optimization/82819
14474 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
14475 code generating pluses that are no-ops in the target precision.
14477 2018-01-24 Richard Biener <rguenther@suse.de>
14479 PR middle-end/84000
14480 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
14482 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
14484 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
14485 to merge probabilities.
14486 * predict.c (probably_never_executed): Also mark as cold functions
14487 with global 0 profile and guessed local profile.
14488 * profile-count.c (profile_probability::combine_with_count): New
14490 * profile-count.h (profile_probability::operator*,
14491 profile_probability::operator*=, profile_probability::operator/,
14492 profile_probability::operator/=): Reduce precision to adjusted
14493 and set value to guessed on contradictory divisions.
14494 (profile_probability::combine_with_freq): Remove.
14495 (profile_probability::combine_wiht_count): Declare.
14496 (profile_count::force_nonzero):: Set to adjusted.
14497 (profile_count::probability_in):: Set quality to adjusted.
14498 * tree-ssa-tail-merge.c (replace_block_by): Use
14499 combine_with_count.
14501 2018-01-23 Andrew Waterman <andrew@sifive.com>
14502 Jim Wilson <jimw@sifive.com>
14504 * config/riscv/riscv.c (riscv_stack_boundary): New.
14505 (riscv_option_override): Set riscv_stack_boundary. Handle
14506 riscv_preferred_stack_boundary_arg.
14507 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
14508 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
14509 (STACK_BOUNDARY): Set to riscv_stack_boundary.
14510 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
14511 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
14512 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
14514 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
14517 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
14518 of struct ix86_frame.
14519 (ix86_expand_epilogue): Likewise. Add a local variable for
14520 the reg_save_offset field in struct ix86_frame.
14522 2018-01-23 Bin Cheng <bin.cheng@arm.com>
14524 PR tree-optimization/82604
14525 * tree-loop-distribution.c (enum partition_kind): New enum item
14526 PKIND_PARTIAL_MEMSET.
14527 (partition_builtin_p): Support above new enum item.
14528 (generate_code_for_partition): Ditto.
14529 (compute_access_range): Differentiate cases that equality can be
14530 proven at all loops, the innermost loops or no loops.
14531 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
14532 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
14533 (finalize_partitions, distribute_loop): Don't fuse partition of
14534 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
14535 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
14536 parloop is enabled.
14538 2018-01-23 Martin Liska <mliska@suse.cz>
14540 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
14541 order to ignore the predictor.
14542 (PRED_POLYMORPHIC_CALL): Likewise.
14543 (PRED_RECURSIVE_CALL): Likewise.
14545 2018-01-23 Martin Liska <mliska@suse.cz>
14547 * tree-profile.c (tree_profiling): Print function header to
14548 aware reader which function we are working on.
14549 * value-prof.c (gimple_find_values_to_profile): Do not print
14550 not interesting value histograms.
14552 2018-01-23 Martin Liska <mliska@suse.cz>
14554 * profile-count.h (enum profile_quality): Add
14555 profile_uninitialized as the first value. Do not number values
14556 as they are zero based.
14557 (profile_count::verify): Update sanity check.
14558 (profile_probability::verify): Likewise.
14560 2018-01-23 Nathan Sidwell <nathan@acm.org>
14562 * doc/invoke.texi (ffor-scope): Deprecate.
14564 2018-01-23 David Malcolm <dmalcolm@redhat.com>
14566 PR tree-optimization/83510
14567 * domwalk.c (set_all_edges_as_executable): New function.
14568 (dom_walker::dom_walker): Convert bool param
14569 "skip_unreachable_blocks" to enum reachability. Move setup of
14570 edge flags to set_all_edges_as_executable and only do it when
14571 reachability is REACHABLE_BLOCKS.
14572 * domwalk.h (enum dom_walker::reachability): New enum.
14573 (dom_walker::dom_walker): Convert bool param
14574 "skip_unreachable_blocks" to enum reachability.
14575 (set_all_edges_as_executable): New decl.
14576 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
14577 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
14579 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
14580 but converting true to REACHABLE_BLOCKS.
14581 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
14583 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
14584 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
14585 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
14587 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
14588 if check_all_array_refs will be called.
14590 2018-01-23 David Malcolm <dmalcolm@redhat.com>
14592 * tree.c (selftest::test_location_wrappers): Add more test
14595 2018-01-23 David Malcolm <dmalcolm@redhat.com>
14597 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
14598 (selftest::test_bit_in_range): Likewise.
14600 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
14603 * doc/sourcebuild.texi (vect_float): Say that the selector
14604 only describes the situation when -funsafe-math-optimizations is on.
14605 (vect_float_strict): Document.
14607 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
14609 PR tree-optimization/83965
14610 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14611 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
14612 instead of checking only for a reduction.
14613 (vect_recog_widen_sum_pattern): Likewise.
14615 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
14617 * predict.c (probably_never_executed): Only use precise profile info.
14618 (compute_function_frequency): Skip after inlining hack since we now
14619 have quality checking.
14621 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
14623 * profile-count.h (profile_probability::very_unlikely,
14624 profile_probability::unlikely, profile_probability::even): Set
14625 precision to guessed.
14627 2018-01-23 Richard Biener <rguenther@suse.de>
14629 PR tree-optimization/83963
14630 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
14631 Properly terminate dominator walk when crossing the exit edge not
14632 when visiting its source block.
14634 2018-01-23 Jakub Jelinek <jakub@redhat.com>
14637 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
14638 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
14640 2018-01-22 Jakub Jelinek <jakub@redhat.com>
14642 PR tree-optimization/83957
14643 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
14644 semicolon after for body surrounded by braces.
14646 PR tree-optimization/83081
14647 * profile-count.h (profile_probability::split): New method.
14648 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
14649 Use profile_probability::split.
14650 (do_compare_rtx_and_jump): Fix adjustment of probabilities
14651 when splitting a single conditional jump into 2.
14653 2018-01-22 David Malcolm <dmalcolm@redhat.com>
14655 PR tree-optimization/69452
14656 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
14659 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14661 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
14662 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
14663 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
14665 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14667 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
14669 * config/rl78/rl78.md (movdi): New define_expand.
14670 * config/rl78/rl78.c (rl78_split_movdi): New function.
14672 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
14675 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
14677 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
14678 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
14679 128-bit to produce an UNSPEC move to get the double word with the
14680 signbit and then a shift directly to do signbit.
14681 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
14682 implementation with a new version that just does either a direct
14683 move or a regular move. Move memory interface to separate insns.
14684 Move insns so they are next to the expander.
14685 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
14686 with signbit move. Split big and little endian case.
14687 (signbit<mode>2_dm_mem_le): Likewise.
14688 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
14689 (signbit<mode>2_dm2): Likewise.
14691 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14693 * config/rl78/rl78.md (anddi3): New define_expand.
14695 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14697 * config/rl78/rl78.md (umindi3): New define_expand.
14699 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14701 * config/rl78/rl78.md (smindi3): New define_expand.
14703 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14705 * config/rl78/rl78.md (smaxdi3): New define_expand.
14707 2018-01-22 Carl Love <cel@us.ibm.com>
14709 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
14710 LVX_V1TI): Add macro expansion.
14711 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
14712 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
14713 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
14714 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
14715 Change check to determine if the instruction is a byte reversing
14716 entry. Fix typo in comment.
14717 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
14718 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
14719 Add def_builtin calls for new builtins.
14720 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
14721 Add define_insn expansion.
14723 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14725 * config/rl78/rl78.md (umaxdi3): New define_expand.
14727 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14729 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
14730 for non-QImode registers.
14732 2018-01-22 Richard Biener <rguenther@suse.de>
14734 PR tree-optimization/83963
14735 * graphite-scop-detection.c (scop_detection::get_sese): Delay
14736 including the loop exit block.
14737 (scop_detection::merge_sese): Likewise.
14738 (scop_detection::add_scop): Do it here instead.
14740 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14742 * doc/sourcebuild.texi (arm_softfloat): Document.
14744 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
14747 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
14748 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
14749 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
14751 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14752 David Edelsohn <dje.gcc@gmail.com>
14755 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14756 Change "crset eq" to "crset 2".
14757 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14758 (*call_indirect_aix<mode>_nospec): Likewise.
14759 (*call_value_indirect_aix<mode>_nospec): Likewise.
14760 (*call_indirect_elfv2<mode>_nospec): Likewise.
14761 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
14762 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
14763 change assembly output from . to $.
14764 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14765 (indirect_jump<mode>_nospec): Change assembly output from . to $.
14766 (*tablejump<mode>_internal1_nospec): Likewise.
14768 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
14771 * config/sh/sh_optimize_sett_clrt.cc:
14772 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
14774 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
14776 PR tree-optimization/83940
14777 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
14778 offset_dt to vect_constant_def rather than vect_unknown_def_type.
14779 (vect_check_load_store_mask): Add a mask_dt_out parameter and
14780 use it to pass back the definition type.
14781 (vect_check_store_rhs): Likewise rhs_dt_out.
14782 (vect_build_gather_load_calls): Add a mask_dt argument and use
14783 it instead of a call to vect_is_simple_use.
14784 (vectorizable_store): Update calls to vect_check_load_store_mask
14785 and vect_check_store_rhs. Use the dt returned by the latter instead
14786 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
14787 instead of calls to vect_is_simple_use. Pass the scalar rather
14788 than the vector operand to vect_is_simple_use when handling
14789 second and subsequent copies of an rhs value.
14790 (vectorizable_load): Update calls to vect_check_load_store_mask
14791 and vect_build_gather_load_calls. Use the cached mask_dt and
14792 gs_info.offset_dt instead of calls to vect_is_simple_use.
14794 2018-01-20 Jakub Jelinek <jakub@redhat.com>
14796 PR middle-end/83945
14797 * tree-emutls.c: Include gimplify.h.
14798 (lower_emutls_2): New function.
14799 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
14800 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
14801 it before further processing.
14804 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
14805 UINTVAL (trueop1) instead of INTVAL (op1).
14807 2018-01-19 Jakub Jelinek <jakub@redhat.com>
14811 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
14812 INCOMING_FRAME_SP_OFFSET if not defined.
14813 (scan_trace): Add ENTRY argument. If true and
14814 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
14815 emit a note to adjust the CFA offset.
14816 (create_cfi_notes): Adjust scan_trace callers.
14817 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
14818 INCOMING_FRAME_SP_OFFSET in the CIE.
14819 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
14820 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
14822 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
14823 * doc/tm.texi: Regenerated.
14825 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14827 PR rtl-optimization/83147
14828 * lra-constraints.c (remove_inheritance_pseudos): Use
14829 lra_substitute_pseudo_within_insn.
14831 2018-01-19 Tom de Vries <tom@codesourcery.com>
14832 Cesar Philippidis <cesar@codesourcery.com>
14835 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
14837 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
14840 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
14841 spaces for function labels.
14843 2018-01-19 Martin Liska <mliska@suse.cz>
14845 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
14846 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
14847 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
14848 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
14849 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
14850 (PRED_CONST_RETURN): Change from 69 to 65.
14851 (PRED_NULL_RETURN): Change from 91 to 71.
14852 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
14853 (PRED_LOOP_GUARD): Change from 66 to 73.
14855 2018-01-19 Martin Liska <mliska@suse.cz>
14857 * predict.c (predict_insn_def): Add new assert.
14858 (struct branch_predictor): Change type to signed integer.
14859 (test_prediction_value_range): Amend test to cover
14860 PROB_UNINITIALIZED.
14861 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
14862 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
14863 (PRED_LOOP_ITERATIONS_MAX): Likewise.
14864 (PRED_LOOP_IV_COMPARE): Likewise.
14865 * predict.h (PROB_UNINITIALIZED): Define new constant.
14867 2018-01-19 Martin Liska <mliska@suse.cz>
14869 * predict.c (dump_prediction): Add new format for
14870 analyze_brprob.py script which is enabled with -details
14872 * profile-count.h (precise_p): New function.
14874 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
14876 PR tree-optimization/83922
14877 * tree-vect-loop.c (vect_verify_full_masking): Return false if
14878 there are no statements that need masking.
14879 (vect_active_double_reduction_p): New function.
14880 (vect_analyze_loop_operations): Use it when handling phis that
14881 are not in the loop header.
14883 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
14885 PR tree-optimization/83914
14886 * tree-vect-loop.c (vectorizable_induction): Don't convert
14887 init_expr or apply the peeling adjustment for inductions
14888 that are nested within the vectorized loop.
14890 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14892 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
14895 2018-01-18 Jakub Jelinek <jakub@redhat.com>
14899 * function.h (gimplify_parameters): Add gimple_seq * argument.
14900 * function.c: Include gimple.h and options.h.
14901 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
14902 for the added local temporaries if needed.
14903 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
14904 if there are any parameter cleanups, wrap whole body into a
14905 try/finally with the cleanups.
14907 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
14910 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
14911 Use GET_MODE_CLASS for scalar floating point.
14913 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
14917 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
14918 Fix call of call_cgraph_insertion_hooks.
14920 2018-01-18 Martin Sebor <msebor@redhat.com>
14922 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
14924 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
14927 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
14930 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
14933 * common.opt: (-ffile-prefix-map): New option.
14934 * opts.c (common_handle_option): Defer it.
14935 * opts-global.c (handle_common_deferred_options): Handle it.
14936 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
14937 * file-prefix-map.h: New file.
14938 (remap_debug_filename, add_debug_prefix_map): ...here.
14939 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
14940 * final.c (debug_prefix_map, add_debug_prefix_map
14941 remap_debug_filename): Move to...
14942 * file-prefix-map.c: New file.
14943 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
14944 generalize, get rid of alloca(), use strrchr() instead of strchr().
14945 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
14946 Implement in terms of add_prefix_map().
14947 (remap_macro_filename, remap_debug_filename): Implement in term of
14949 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
14950 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
14951 * dbxout.c: Include file-prefix-map.h.
14952 * varasm.c: Likewise.
14953 * vmsdbgout.c: Likewise.
14954 * xcoffout.c: Likewise.
14955 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
14956 * doc/cppopts.texi (-fmacro-prefix-map): Document.
14957 * doc/invoke.texi (-ffile-prefix-map): Document.
14958 (-fdebug-prefix-map): Update description.
14960 2018-01-18 Martin Liska <mliska@suse.cz>
14962 * config/i386/i386.c (indirect_thunk_name): Document that also
14964 (output_indirect_thunk): Document why both instructions
14965 (pause and lfence) are generated.
14967 2018-01-18 Richard Biener <rguenther@suse.de>
14969 PR tree-optimization/83887
14970 * graphite-scop-detection.c
14971 (scop_detection::get_nearest_dom_with_single_entry): Remove.
14972 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
14973 (scop_detection::merge_sese): Re-implement with a flood-fill
14974 algorithm that properly finds a SESE region if it exists.
14976 2018-01-18 Jakub Jelinek <jakub@redhat.com>
14979 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
14980 pointer_diff optimizations use view_convert instead of convert.
14982 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14984 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14985 Generate different code for -mno-speculate-indirect-jumps.
14986 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14987 (*call_indirect_aix<mode>): Disable for
14988 -mno-speculate-indirect-jumps.
14989 (*call_indirect_aix<mode>_nospec): New define_insn.
14990 (*call_value_indirect_aix<mode>): Disable for
14991 -mno-speculate-indirect-jumps.
14992 (*call_value_indirect_aix<mode>_nospec): New define_insn.
14993 (*sibcall_nonlocal_sysv<mode>): Generate different code for
14994 -mno-speculate-indirect-jumps.
14995 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14997 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14999 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
15000 long double type, set the flags for noting the default long double
15001 type, even if we don't pass or return a long double type.
15003 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
15006 * ipa-inline.c (flatten_function): Do not overwrite final inlining
15009 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
15011 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
15012 support for merge[hl].
15013 (fold_mergehl_helper): New helper function.
15014 (tree-vector-builder.h): New #include for tree_vector_builder usage.
15015 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
15016 (altivec_vmrglw_direct): Add xxmrglw insn.
15018 2018-01-17 Andrew Waterman <andrew@sifive.com>
15020 * config/riscv/riscv.c (riscv_conditional_register_usage): If
15021 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
15023 2018-01-17 David Malcolm <dmalcolm@redhat.com>
15026 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
15027 call the lto_location_cache before reading the
15028 DECL_SOURCE_LOCATION of the types.
15030 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
15031 Richard Sandiford <richard.sandiford@linaro.org>
15033 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
15034 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
15035 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
15036 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
15037 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
15039 * config/aarch64/constraints.md (aarch64_movti_operand):
15041 * config/aarch64/predicates.md (Uti): Add new constraint.
15043 2018-01-17 Carl Love <cel@us.ibm.com>
15045 * config/rs6000/vsx.md (define_expand xl_len_r,
15046 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
15047 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
15049 (define_expand, define_insn): Move the shift left from the
15050 define_insn to the define_expand for lxvl and stxvl instructions.
15051 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
15052 and XL_LEN_R definitions to PURE.
15054 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
15056 * config/i386/i386.c (indirect_thunk_name): Declare regno
15057 as unsigned int. Compare regno with INVALID_REGNUM.
15058 (output_indirect_thunk): Ditto.
15059 (output_indirect_thunk_function): Ditto.
15060 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
15061 in the call to output_indirect_thunk_function.
15063 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
15065 PR middle-end/83884
15066 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
15067 rather than the size of inner_type to determine the stack slot size
15068 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
15070 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
15073 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
15076 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
15078 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
15079 endian Linux systems to optionally enable multilibs for selecting
15080 the long double type if the user configured an explicit type.
15081 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
15082 have no long double multilibs if not defined.
15083 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
15084 warn if the user used -mabi={ieee,ibm}longdouble and we built
15085 multilibs for long double.
15086 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
15087 appropriate multilib option.
15088 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
15090 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
15091 for building long double multilibs.
15092 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
15094 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
15096 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
15099 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
15101 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
15104 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
15107 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
15110 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15112 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
15113 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
15115 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
15117 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
15118 different rtl trees depending on TARGET_64BIT.
15119 (rs6000_gen_lvx): Likewise.
15121 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15123 * config/visium/visium.md (nop): Tweak comment.
15124 (hazard_nop): Likewise.
15126 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15128 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
15129 -mspeculate-indirect-jumps.
15130 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
15131 for -mno-speculate-indirect-jumps.
15132 (*call_indirect_elfv2<mode>_nospec): New define_insn.
15133 (*call_value_indirect_elfv2<mode>): Disable for
15134 -mno-speculate-indirect-jumps.
15135 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
15136 (indirect_jump): Emit different RTL for
15137 -mno-speculate-indirect-jumps.
15138 (*indirect_jump<mode>): Disable for
15139 -mno-speculate-indirect-jumps.
15140 (*indirect_jump<mode>_nospec): New define_insn.
15141 (tablejump): Emit different RTL for
15142 -mno-speculate-indirect-jumps.
15143 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
15144 (tablejumpsi_nospec): New define_expand.
15145 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
15146 (tablejumpdi_nospec): New define_expand.
15147 (*tablejump<mode>_internal1): Disable for
15148 -mno-speculate-indirect-jumps.
15149 (*tablejump<mode>_internal1_nospec): New define_insn.
15150 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
15153 2018-01-16 Artyom Skrobov tyomitch@gmail.com
15155 * caller-save.c (insert_save): Drop unnecessary parameter. All
15158 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15159 Richard Biener <rguenth@suse.de>
15162 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
15163 return early, inline manually is_gimple_sizepos. Make sure if we
15164 call gimplify_expr we don't end up with a gimple constant.
15165 * tree.c (variably_modified_type_p): Don't return true for
15166 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
15167 * gimplify.h (is_gimple_sizepos): Remove.
15169 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15171 PR tree-optimization/83857
15172 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
15173 vectorizable_live_operation for pure SLP statements.
15174 (vectorizable_live_operation): Handle PHIs.
15176 2018-01-16 Richard Biener <rguenther@suse.de>
15178 PR tree-optimization/83867
15179 * tree-vect-stmts.c (vect_transform_stmt): Precompute
15180 nested_in_vect_loop_p since the scalar stmt may get invalidated.
15182 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15185 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
15186 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
15187 If off is not INTEGER_CST, issue a may not be aligned warning
15188 rather than isn't aligned. Use isn%'t rather than isn't.
15189 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
15191 <case MULT_EXPR>: Improve the case when bottom and one of the
15192 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
15193 operand, in that case check if the other operand is multiple of
15194 bottom divided by the INTEGER_CST operand.
15196 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15199 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
15200 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
15201 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
15202 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
15203 * config/pa/pa.c (pa_function_arg_advance): Likewise.
15204 (pa_function_arg, pa_arg_partial_bytes): Likewise.
15205 (pa_function_arg_size): New function.
15207 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15209 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
15210 in a separate statement.
15212 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15214 PR tree-optimization/83847
15215 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
15216 group gathers and scatters.
15218 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15220 PR rtl-optimization/86620
15221 * params.def (max-sched-ready-insns): Bump minimum value to 1.
15223 PR rtl-optimization/83213
15224 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
15225 to last if both are JUMP_INSNs.
15227 PR tree-optimization/83843
15228 * gimple-ssa-store-merging.c
15229 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
15230 store_immediate_info for bswap/nop orig_stores.
15232 2018-01-15 Andrew Waterman <andrew@sifive.com>
15234 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
15236 <UDIV>: Increase cost if !TARGET_DIV.
15238 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
15240 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
15241 (define_attr "cr_logical_3op"): New.
15242 (cceq_ior_compare): Adjust.
15243 (cceq_ior_compare_complement): Adjust.
15244 (*cceq_rev_compare): Adjust.
15245 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
15246 (is_cracked_insn): Adjust.
15247 (insn_must_be_first_in_group): Adjust.
15248 * config/rs6000/40x.md: Adjust.
15249 * config/rs6000/440.md: Adjust.
15250 * config/rs6000/476.md: Adjust.
15251 * config/rs6000/601.md: Adjust.
15252 * config/rs6000/603.md: Adjust.
15253 * config/rs6000/6xx.md: Adjust.
15254 * config/rs6000/7450.md: Adjust.
15255 * config/rs6000/7xx.md: Adjust.
15256 * config/rs6000/8540.md: Adjust.
15257 * config/rs6000/cell.md: Adjust.
15258 * config/rs6000/e300c2c3.md: Adjust.
15259 * config/rs6000/e500mc.md: Adjust.
15260 * config/rs6000/e500mc64.md: Adjust.
15261 * config/rs6000/e5500.md: Adjust.
15262 * config/rs6000/e6500.md: Adjust.
15263 * config/rs6000/mpc.md: Adjust.
15264 * config/rs6000/power4.md: Adjust.
15265 * config/rs6000/power5.md: Adjust.
15266 * config/rs6000/power6.md: Adjust.
15267 * config/rs6000/power7.md: Adjust.
15268 * config/rs6000/power8.md: Adjust.
15269 * config/rs6000/power9.md: Adjust.
15270 * config/rs6000/rs64.md: Adjust.
15271 * config/rs6000/titan.md: Adjust.
15273 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15275 * config/i386/predicates.md (indirect_branch_operand): Rewrite
15276 ix86_indirect_branch_register logic.
15278 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15280 * config/i386/constraints.md (Bs): Update
15281 ix86_indirect_branch_register check. Don't check
15282 ix86_indirect_branch_register with GOT_memory_operand.
15284 * config/i386/predicates.md (GOT_memory_operand): Don't check
15285 ix86_indirect_branch_register here.
15286 (GOT32_symbol_operand): Likewise.
15288 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15290 * config/i386/predicates.md (constant_call_address_operand):
15291 Rewrite ix86_indirect_branch_register logic.
15292 (sibcall_insn_operand): Likewise.
15294 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15296 * config/i386/constraints.md (Bs): Replace
15297 ix86_indirect_branch_thunk_register with
15298 ix86_indirect_branch_register.
15300 * config/i386/i386.md (indirect_jump): Likewise.
15301 (tablejump): Likewise.
15302 (*sibcall_memory): Likewise.
15303 (*sibcall_value_memory): Likewise.
15304 Peepholes of indirect call and jump via memory: Likewise.
15305 * config/i386/i386.opt: Likewise.
15306 * config/i386/predicates.md (indirect_branch_operand): Likewise.
15307 (GOT_memory_operand): Likewise.
15308 (call_insn_operand): Likewise.
15309 (sibcall_insn_operand): Likewise.
15310 (GOT32_symbol_operand): Likewise.
15312 2018-01-15 Jakub Jelinek <jakub@redhat.com>
15314 PR middle-end/83837
15315 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
15316 type rather than type addr's type points to.
15317 (expand_omp_atomic_mutex): Likewise.
15318 (expand_omp_atomic): Likewise.
15320 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15323 * config/i386/i386.c (output_indirect_thunk_function): Use
15324 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
15325 for __x86_return_thunk.
15327 2018-01-15 Richard Biener <rguenther@suse.de>
15329 PR middle-end/83850
15330 * expmed.c (extract_bit_field_1): Fix typo.
15332 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15335 * config/arm/iterators.md (VF): New mode iterator.
15336 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
15337 Remove integer-related logic from pattern.
15338 (neon_vabd<mode>_3): Likewise.
15340 2018-01-15 Jakub Jelinek <jakub@redhat.com>
15342 PR middle-end/82694
15343 * common.opt (fstrict-overflow): No longer an alias.
15344 (fwrapv-pointer): New option.
15345 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
15346 also for pointer types based on flag_wrapv_pointer.
15347 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
15348 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
15349 opts->x_flag_wrapv got set.
15350 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
15351 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
15352 POINTER_TYPE_OVERFLOW_UNDEFINED.
15353 * match.pd: Likewise in address comparison pattern.
15354 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
15356 2018-01-15 Richard Biener <rguenther@suse.de>
15359 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
15360 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
15361 Reset type names to their identifier if their TYPE_DECL doesn't
15362 have linkage (and thus is used for ODR and devirt).
15363 (save_debug_info_for_decl): Remove.
15364 (save_debug_info_for_type): Likewise.
15365 (add_tree_to_fld_list): Adjust.
15366 * tree-pretty-print.c (dump_generic_node): Make dumping of
15367 type names more robust.
15369 2018-01-15 Richard Biener <rguenther@suse.de>
15371 * BASE-VER: Bump to 8.0.1.
15373 2018-01-14 Martin Sebor <msebor@redhat.com>
15376 * builtins.c (check_access): Avoid warning when the no-warning bit
15379 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
15381 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
15382 * ira-color (allocno_hard_regs_compare): Likewise.
15384 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
15387 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
15388 Use .pushsection/.popsection.
15390 2018-01-14 Martin Sebor <msebor@redhat.com>
15393 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
15395 2018-01-14 Jakub Jelinek <jakub@redhat.com>
15397 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
15398 entry from extra_headers.
15399 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
15400 extra_headers, make the list bitwise identical to the i?86-*-* one.
15402 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15404 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
15405 -mcmodel=large with -mindirect-branch=thunk,
15406 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
15407 -mfunction-return=thunk-extern.
15408 * doc/invoke.texi: Document -mcmodel=large is incompatible with
15409 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
15410 -mfunction-return=thunk and -mfunction-return=thunk-extern.
15412 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15414 * config/i386/i386.c (print_reg): Print the name of the full
15415 integer register without '%'.
15416 (ix86_print_operand): Handle 'V'.
15417 * doc/extend.texi: Document 'V' modifier.
15419 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15421 * config/i386/constraints.md (Bs): Disallow memory operand for
15422 -mindirect-branch-register.
15424 * config/i386/predicates.md (indirect_branch_operand): Likewise.
15425 (GOT_memory_operand): Likewise.
15426 (call_insn_operand): Likewise.
15427 (sibcall_insn_operand): Likewise.
15428 (GOT32_symbol_operand): Likewise.
15429 * config/i386/i386.md (indirect_jump): Call convert_memory_address
15430 for -mindirect-branch-register.
15431 (tablejump): Likewise.
15432 (*sibcall_memory): Likewise.
15433 (*sibcall_value_memory): Likewise.
15434 Disallow peepholes of indirect call and jump via memory for
15435 -mindirect-branch-register.
15436 (*call_pop): Replace m with Bw.
15437 (*call_value_pop): Likewise.
15438 (*sibcall_pop_memory): Replace m with Bs.
15439 * config/i386/i386.opt (mindirect-branch-register): New option.
15440 * doc/invoke.texi: Document -mindirect-branch-register option.
15442 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15444 * config/i386/i386-protos.h (ix86_output_function_return): New.
15445 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
15446 set function_return_type.
15447 (indirect_thunk_name): Add ret_p to indicate thunk for function
15449 (output_indirect_thunk_function): Pass false to
15450 indirect_thunk_name.
15451 (ix86_output_indirect_branch_via_reg): Likewise.
15452 (ix86_output_indirect_branch_via_push): Likewise.
15453 (output_indirect_thunk_function): Create alias for function
15454 return thunk if regno < 0.
15455 (ix86_output_function_return): New function.
15456 (ix86_handle_fndecl_attribute): Handle function_return.
15457 (ix86_attribute_table): Add function_return.
15458 * config/i386/i386.h (machine_function): Add
15459 function_return_type.
15460 * config/i386/i386.md (simple_return_internal): Use
15461 ix86_output_function_return.
15462 (simple_return_internal_long): Likewise.
15463 * config/i386/i386.opt (mfunction-return=): New option.
15464 (indirect_branch): Mention -mfunction-return=.
15465 * doc/extend.texi: Document function_return function attribute.
15466 * doc/invoke.texi: Document -mfunction-return= option.
15468 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15470 * config/i386/i386-opts.h (indirect_branch): New.
15471 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
15472 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
15473 with local indirect jump when converting indirect call and jump.
15474 (ix86_set_indirect_branch_type): New.
15475 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
15476 (indirectlabelno): New.
15477 (indirect_thunk_needed): Likewise.
15478 (indirect_thunk_bnd_needed): Likewise.
15479 (indirect_thunks_used): Likewise.
15480 (indirect_thunks_bnd_used): Likewise.
15481 (INDIRECT_LABEL): Likewise.
15482 (indirect_thunk_name): Likewise.
15483 (output_indirect_thunk): Likewise.
15484 (output_indirect_thunk_function): Likewise.
15485 (ix86_output_indirect_branch_via_reg): Likewise.
15486 (ix86_output_indirect_branch_via_push): Likewise.
15487 (ix86_output_indirect_branch): Likewise.
15488 (ix86_output_indirect_jmp): Likewise.
15489 (ix86_code_end): Call output_indirect_thunk_function if needed.
15490 (ix86_output_call_insn): Call ix86_output_indirect_branch if
15492 (ix86_handle_fndecl_attribute): Handle indirect_branch.
15493 (ix86_attribute_table): Add indirect_branch.
15494 * config/i386/i386.h (machine_function): Add indirect_branch_type
15495 and has_local_indirect_jump.
15496 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
15498 (tablejump): Likewise.
15499 (*indirect_jump): Use ix86_output_indirect_jmp.
15500 (*tablejump_1): Likewise.
15501 (simple_return_indirect_internal): Likewise.
15502 * config/i386/i386.opt (mindirect-branch=): New option.
15503 (indirect_branch): New.
15506 (thunk-inline): Likewise.
15507 (thunk-extern): Likewise.
15508 * doc/extend.texi: Document indirect_branch function attribute.
15509 * doc/invoke.texi: Document -mindirect-branch= option.
15511 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
15514 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
15516 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
15518 * ipa-inline.c (want_inline_small_function_p): Return false if
15519 inlining has already failed with CIF_FINAL_ERROR.
15520 (update_caller_keys): Call want_inline_small_function_p before
15522 (update_callee_keys): Likewise.
15524 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15526 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
15528 (rs6000_quadword_masked_address_p): Likewise.
15529 (quad_aligned_load_p): Likewise.
15530 (quad_aligned_store_p): Likewise.
15531 (const_load_sequence_p): Add comment to describe the outer-most loop.
15532 (mimic_memory_attributes_and_flags): New function.
15533 (rs6000_gen_stvx): Likewise.
15534 (replace_swapped_aligned_store): Likewise.
15535 (rs6000_gen_lvx): Likewise.
15536 (replace_swapped_aligned_load): Likewise.
15537 (replace_swapped_load_constant): Capitalize argument name in
15538 comment describing this function.
15539 (rs6000_analyze_swaps): Add a third pass to search for vector loads
15540 and stores that access quad-word aligned addresses and replace
15541 with stvx or lvx instructions when appropriate.
15542 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
15543 New function prototype.
15544 (rs6000_quadword_masked_address_p): Likewise.
15545 (rs6000_gen_lvx): Likewise.
15546 (rs6000_gen_stvx): Likewise.
15547 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
15548 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
15549 when memory address is aligned.
15550 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
15551 this split to select lvx instruction when memory address is aligned.
15552 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
15553 instruction when memory address is aligned.
15554 (*vsx_le_perm_load_v16qi): Likewise.
15555 (four unnamed splitters): Modify to select the stvx instruction
15556 when memory is aligned.
15558 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
15560 * predict.c (determine_unlikely_bbs): Handle correctly BBs
15561 which appears in the queue multiple times.
15563 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15564 Alan Hayward <alan.hayward@arm.com>
15565 David Sherwood <david.sherwood@arm.com>
15567 * tree-vectorizer.h (vec_lower_bound): New structure.
15568 (_loop_vec_info): Add check_nonzero and lower_bounds.
15569 (LOOP_VINFO_CHECK_NONZERO): New macro.
15570 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
15571 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
15572 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
15573 fields. Make seg_len the distance travelled, not including the
15575 (dr_direction_indicator): Declare.
15576 (dr_zero_step_indicator): Likewise.
15577 (dr_known_forward_stride_p): Likewise.
15578 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
15580 (runtime_alias_check_p): Allow runtime alias checks with
15582 (operator ==): Compare access_size and align.
15583 (prune_runtime_alias_test_list): Rework for new distinction between
15584 the access_size and seg_len.
15585 (create_intersect_range_checks_index): Likewise. Cope with polynomial
15587 (get_segment_min_max): New function.
15588 (create_intersect_range_checks): Use it.
15589 (dr_step_indicator): New function.
15590 (dr_direction_indicator): Likewise.
15591 (dr_zero_step_indicator): Likewise.
15592 (dr_known_forward_stride_p): Likewise.
15593 * tree-loop-distribution.c (data_ref_segment_size): Return
15594 DR_STEP * (niters - 1).
15595 (compute_alias_check_pairs): Update call to the dr_with_seg_len
15597 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
15598 (vect_preserves_scalar_order_p): New function, split out from...
15599 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
15600 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
15601 (vect_vfa_access_size): New function.
15602 (vect_vfa_align): Likewise.
15603 (vect_compile_time_alias): Take access_size_a and access_b arguments.
15604 (dump_lower_bound): New function.
15605 (vect_check_lower_bound): Likewise.
15606 (vect_small_gap_p): Likewise.
15607 (vectorizable_with_step_bound_p): Likewise.
15608 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
15609 depencies if the vectorization factor is 1. Convert the checks
15610 for nonzero steps into checks on the bounds of DR_STEP. Try using
15611 a bunds check for variable steps if the minimum required step is
15612 relatively small. Update calls to the dr_with_seg_len
15613 constructor and to vect_compile_time_alias.
15614 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
15616 (vect_loop_versioning): Call it.
15617 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
15619 (vect_estimate_min_profitable_iters): Account for any bounds checks.
15621 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15622 Alan Hayward <alan.hayward@arm.com>
15623 David Sherwood <david.sherwood@arm.com>
15625 * doc/sourcebuild.texi (vect_scatter_store): Document.
15626 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
15628 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
15630 * genopinit.c (main): Add supports_vec_scatter_store and
15631 supports_vec_scatter_store_cached to target_optabs.
15632 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
15633 IFN_MASK_SCATTER_STORE.
15634 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
15636 * internal-fn.h (internal_store_fn_p): Declare.
15637 (internal_fn_stored_value_index): Likewise.
15638 * internal-fn.c (scatter_store_direct): New macro.
15639 (expand_scatter_store_optab_fn): New function.
15640 (direct_scatter_store_optab_supported_p): New macro.
15641 (internal_store_fn_p): New function.
15642 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
15643 IFN_MASK_SCATTER_STORE.
15644 (internal_fn_mask_index): Likewise.
15645 (internal_fn_stored_value_index): New function.
15646 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
15647 for scatter stores.
15648 * optabs-query.h (supports_vec_scatter_store_p): Declare.
15649 * optabs-query.c (supports_vec_scatter_store_p): New function.
15650 * tree-vectorizer.h (vect_get_store_rhs): Declare.
15651 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
15652 true for scatter stores.
15653 (vect_gather_scatter_fn_p): Handle scatter stores too.
15654 (vect_check_gather_scatter): Consider using scatter stores if
15655 supports_vec_scatter_store_p.
15656 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
15657 scatter stores too.
15658 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15659 internal_fn_stored_value_index.
15660 (check_load_store_masking): Handle scatter stores too.
15661 (vect_get_store_rhs): Make public.
15662 (vectorizable_call): Use internal_store_fn_p.
15663 (vectorizable_store): Handle scatter store internal functions.
15664 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
15665 when deciding whether the end of the group has been reached.
15666 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
15667 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
15668 (mask_scatter_store<mode>): New insns.
15670 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15671 Alan Hayward <alan.hayward@arm.com>
15672 David Sherwood <david.sherwood@arm.com>
15674 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
15675 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
15676 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
15678 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
15679 Use vect_truncate_gather_scatter_offset if we can't treat the
15680 operation as a normal gather load or scatter store.
15681 (get_group_load_store_type): Take the gather_scatter_info
15682 as argument. Try using a gather load or scatter store for
15683 single-element groups.
15684 (get_load_store_type): Update calls to get_group_load_store_type
15685 and vect_use_strided_gather_scatters_p.
15687 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15688 Alan Hayward <alan.hayward@arm.com>
15689 David Sherwood <david.sherwood@arm.com>
15691 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
15692 optional tree argument.
15693 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
15695 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
15696 but continue to use the current value as a fallback.
15697 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
15698 to compare the updates.
15699 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
15700 (get_load_store_type): Use it when handling a strided access.
15701 (vect_get_strided_load_store_ops): New function.
15702 (vect_get_data_ptr_increment): Likewise.
15703 (vectorizable_load): Handle strided gather loads. Always pass
15704 a step to vect_create_data_ref_ptr and bump_vector_ptr.
15706 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15707 Alan Hayward <alan.hayward@arm.com>
15708 David Sherwood <david.sherwood@arm.com>
15710 * doc/md.texi (gather_load@var{m}): Document.
15711 (mask_gather_load@var{m}): Likewise.
15712 * genopinit.c (main): Add supports_vec_gather_load and
15713 supports_vec_gather_load_cached to target_optabs.
15714 * optabs-tree.c (init_tree_optimization_optabs): Use
15715 ggc_cleared_alloc to allocate target_optabs.
15716 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
15717 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
15719 * internal-fn.h (internal_load_fn_p): Declare.
15720 (internal_gather_scatter_fn_p): Likewise.
15721 (internal_fn_mask_index): Likewise.
15722 (internal_gather_scatter_fn_supported_p): Likewise.
15723 * internal-fn.c (gather_load_direct): New macro.
15724 (expand_gather_load_optab_fn): New function.
15725 (direct_gather_load_optab_supported_p): New macro.
15726 (direct_internal_fn_optab): New function.
15727 (internal_load_fn_p): Likewise.
15728 (internal_gather_scatter_fn_p): Likewise.
15729 (internal_fn_mask_index): Likewise.
15730 (internal_gather_scatter_fn_supported_p): Likewise.
15731 * optabs-query.c (supports_at_least_one_mode_p): New function.
15732 (supports_vec_gather_load_p): Likewise.
15733 * optabs-query.h (supports_vec_gather_load_p): Declare.
15734 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
15735 and memory_type field.
15736 (NUM_PATTERNS): Bump to 15.
15737 * tree-vect-data-refs.c: Include internal-fn.h.
15738 (vect_gather_scatter_fn_p): New function.
15739 (vect_describe_gather_scatter_call): Likewise.
15740 (vect_check_gather_scatter): Try using internal functions for
15741 gather loads. Recognize existing calls to a gather load function.
15742 (vect_analyze_data_refs): Consider using gather loads if
15743 supports_vec_gather_load_p.
15744 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
15745 (vect_get_gather_scatter_offset_type): Likewise.
15746 (vect_convert_mask_for_vectype): Likewise.
15747 (vect_add_conversion_to_patterm): Likewise.
15748 (vect_try_gather_scatter_pattern): Likewise.
15749 (vect_recog_gather_scatter_pattern): New pattern recognizer.
15750 (vect_vect_recog_func_ptrs): Add it.
15751 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15752 internal_fn_mask_index and internal_gather_scatter_fn_p.
15753 (check_load_store_masking): Take the gather_scatter_info as an
15754 argument and handle gather loads.
15755 (vect_get_gather_scatter_ops): New function.
15756 (vectorizable_call): Check internal_load_fn_p.
15757 (vectorizable_load): Likewise. Handle gather load internal
15759 (vectorizable_store): Update call to check_load_store_masking.
15760 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
15761 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
15762 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
15763 (aarch64_gather_scale_operand_d): New predicates.
15764 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
15765 (mask_gather_load<mode>): New insns.
15767 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15768 Alan Hayward <alan.hayward@arm.com>
15769 David Sherwood <david.sherwood@arm.com>
15771 * optabs.def (fold_left_plus_optab): New optab.
15772 * doc/md.texi (fold_left_plus_@var{m}): Document.
15773 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
15774 * internal-fn.c (fold_left_direct): Define.
15775 (expand_fold_left_optab_fn): Likewise.
15776 (direct_fold_left_optab_supported_p): Likewise.
15777 * fold-const-call.c (fold_const_fold_left): New function.
15778 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
15779 * tree-parloops.c (valid_reduction_p): New function.
15780 (gather_scalar_reductions): Use it.
15781 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
15782 (vect_finish_replace_stmt): Declare.
15783 * tree-vect-loop.c (fold_left_reduction_fn): New function.
15784 (needs_fold_left_reduction_p): New function, split out from...
15785 (vect_is_simple_reduction): ...here. Accept reductions that
15786 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
15787 (vect_force_simple_reduction): Also store the reduction type in
15788 the assignment's STMT_VINFO_REDUC_TYPE.
15789 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
15790 (merge_with_identity): New function.
15791 (vect_expand_fold_left): Likewise.
15792 (vectorize_fold_left_reduction): Likewise.
15793 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
15794 scalar phi in place for it. Check for target support and reject
15795 cases that would reassociate the operation. Defer the transform
15796 phase to vectorize_fold_left_reduction.
15797 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
15798 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
15799 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
15801 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15803 * tree-if-conv.c (predicate_mem_writes): Remove redundant
15804 call to ifc_temp_var.
15806 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15807 Alan Hayward <alan.hayward@arm.com>
15808 David Sherwood <david.sherwood@arm.com>
15810 * target.def (legitimize_address_displacement): Take the original
15811 offset as a poly_int.
15812 * targhooks.h (default_legitimize_address_displacement): Update
15814 * targhooks.c (default_legitimize_address_displacement): Likewise.
15815 * doc/tm.texi: Regenerate.
15816 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
15817 as an argument, moving assert of ad->disp == ad->disp_term to...
15818 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
15819 Try calling targetm.legitimize_address_displacement before expanding
15820 the address rather than afterwards, and adjust for the new interface.
15821 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
15822 Match the new hook interface. Handle SVE addresses.
15823 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
15824 new hook interface.
15826 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15828 * Makefile.in (OBJS): Add early-remat.o.
15829 * target.def (select_early_remat_modes): New hook.
15830 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
15831 * doc/tm.texi: Regenerate.
15832 * targhooks.h (default_select_early_remat_modes): Declare.
15833 * targhooks.c (default_select_early_remat_modes): New function.
15834 * timevar.def (TV_EARLY_REMAT): New timevar.
15835 * passes.def (pass_early_remat): New pass.
15836 * tree-pass.h (make_pass_early_remat): Declare.
15837 * early-remat.c: New file.
15838 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
15840 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
15842 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15843 Alan Hayward <alan.hayward@arm.com>
15844 David Sherwood <david.sherwood@arm.com>
15846 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
15847 vfm1 with a bound_epilog parameter.
15848 (vect_do_peeling): Update calls accordingly, and move the prologue
15849 call earlier in the function. Treat the base bound_epilog as 0 for
15850 fully-masked loops and retain vf - 1 for other loops. Add 1 to
15851 this base when peeling for gaps.
15852 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
15853 with fully-masked loops.
15854 (vect_estimate_min_profitable_iters): Handle the single peeled
15855 iteration in that case.
15857 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15858 Alan Hayward <alan.hayward@arm.com>
15859 David Sherwood <david.sherwood@arm.com>
15861 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
15862 single-element interleaving even if the size is not a power of 2.
15863 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
15864 accesses for single-element interleaving if the group size is
15867 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15868 Alan Hayward <alan.hayward@arm.com>
15869 David Sherwood <david.sherwood@arm.com>
15871 * doc/md.texi (fold_extract_last_@var{m}): Document.
15872 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
15873 * optabs.def (fold_extract_last_optab): New optab.
15874 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
15875 * internal-fn.c (fold_extract_direct): New macro.
15876 (expand_fold_extract_optab_fn): Likewise.
15877 (direct_fold_extract_optab_supported_p): Likewise.
15878 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
15879 * tree-vect-loop.c (vect_model_reduction_cost): Handle
15880 EXTRACT_LAST_REDUCTION.
15881 (get_initial_def_for_reduction): Do not create an initial vector
15882 for EXTRACT_LAST_REDUCTION reductions.
15883 (vectorizable_reduction): Leave the scalar phi in place for
15884 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
15885 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
15886 epilogue code for EXTRACT_LAST_REDUCTION and defer the
15887 transform phase to vectorizable_condition.
15888 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
15890 (vect_finish_stmt_generation): ...here.
15891 (vect_finish_replace_stmt): New function.
15892 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
15893 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
15895 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
15897 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15898 Alan Hayward <alan.hayward@arm.com>
15899 David Sherwood <david.sherwood@arm.com>
15901 * doc/md.texi (extract_last_@var{m}): Document.
15902 * optabs.def (extract_last_optab): New optab.
15903 * internal-fn.def (EXTRACT_LAST): New internal function.
15904 * internal-fn.c (cond_unary_direct): New macro.
15905 (expand_cond_unary_optab_fn): Likewise.
15906 (direct_cond_unary_optab_supported_p): Likewise.
15907 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
15908 loops using EXTRACT_LAST.
15909 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
15910 (extract_last_<mode>): ...this optab.
15911 (vec_extract<mode><Vel>): Update accordingly.
15913 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15914 Alan Hayward <alan.hayward@arm.com>
15915 David Sherwood <david.sherwood@arm.com>
15917 * target.def (empty_mask_is_expensive): New hook.
15918 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
15919 * doc/tm.texi: Regenerate.
15920 * targhooks.h (default_empty_mask_is_expensive): Declare.
15921 * targhooks.c (default_empty_mask_is_expensive): New function.
15922 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
15923 if the target says that empty masks are expensive.
15924 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
15926 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
15928 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15929 Alan Hayward <alan.hayward@arm.com>
15930 David Sherwood <david.sherwood@arm.com>
15932 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
15933 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
15934 (vect_use_loop_mask_for_alignment_p): New function.
15935 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
15936 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
15937 niters_skip argument. Make sure that the first niters_skip elements
15938 of the first iteration are inactive.
15939 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
15940 Update call to vect_set_loop_masks_directly.
15941 (get_misalign_in_elems): New function, split out from...
15942 (vect_gen_prolog_loop_niters): ...here.
15943 (vect_update_init_of_dr): Take a code argument that specifies whether
15944 the adjustment should be added or subtracted.
15945 (vect_update_init_of_drs): Likewise.
15946 (vect_prepare_for_masked_peels): New function.
15947 (vect_do_peeling): Skip prologue peeling if we're using a mask
15948 instead. Update call to vect_update_inits_of_drs.
15949 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15951 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
15952 alignment. Do not include the number of peeled iterations in
15953 the minimum threshold in that case.
15954 (vectorizable_induction): Adjust the start value down by
15955 LOOP_VINFO_MASK_SKIP_NITERS iterations.
15956 (vect_transform_loop): Call vect_prepare_for_masked_peels.
15957 Take the number of skipped iterations into account when calculating
15959 * tree-vect-stmts.c (vect_gen_while_not): New function.
15961 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15962 Alan Hayward <alan.hayward@arm.com>
15963 David Sherwood <david.sherwood@arm.com>
15965 * doc/sourcebuild.texi (vect_fully_masked): Document.
15966 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
15967 default value to 0.
15968 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
15970 (vect_analyze_loop_2): ...here. Don't check the vectorization
15971 factor against the number of loop iterations if the loop is
15974 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15975 Alan Hayward <alan.hayward@arm.com>
15976 David Sherwood <david.sherwood@arm.com>
15978 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
15979 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
15980 (dump_groups): Update accordingly.
15981 (iv_use::mem_type): New member variable.
15982 (address_p): New function.
15983 (record_use): Add a mem_type argument and initialize the new
15985 (record_group_use): Add a mem_type argument. Use address_p.
15986 Remove obsolete null checks of base_object. Update call to record_use.
15987 (find_interesting_uses_op): Update call to record_group_use.
15988 (find_interesting_uses_cond): Likewise.
15989 (find_interesting_uses_address): Likewise.
15990 (get_mem_type_for_internal_fn): New function.
15991 (find_address_like_use): Likewise.
15992 (find_interesting_uses_stmt): Try find_address_like_use before
15993 calling find_interesting_uses_op.
15994 (addr_offset_valid_p): Use the iv mem_type field as the type
15995 of the addressed memory.
15996 (add_autoinc_candidates): Likewise.
15997 (get_address_cost): Likewise.
15998 (split_small_address_groups_p): Use address_p.
15999 (split_address_groups): Likewise.
16000 (add_iv_candidate_for_use): Likewise.
16001 (autoinc_possible_for_pair): Likewise.
16002 (rewrite_groups): Likewise.
16003 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
16004 (determine_group_iv_cost): Update after split of USE_ADDRESS.
16005 (get_alias_ptr_type_for_ptr_address): New function.
16006 (rewrite_use_address): Rewrite address uses in calls that were
16007 identified by find_address_like_use.
16009 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16010 Alan Hayward <alan.hayward@arm.com>
16011 David Sherwood <david.sherwood@arm.com>
16013 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
16015 * gimple-expr.h (is_gimple_addressable: Likewise.
16016 * gimple-expr.c (is_gimple_address): Likewise.
16017 * internal-fn.c (expand_call_mem_ref): New function.
16018 (expand_mask_load_optab_fn): Use it.
16019 (expand_mask_store_optab_fn): Likewise.
16021 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16022 Alan Hayward <alan.hayward@arm.com>
16023 David Sherwood <david.sherwood@arm.com>
16025 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
16026 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
16027 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
16028 (cond_umax@var{mode}): Document.
16029 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
16030 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
16031 (cond_umin_optab, cond_umax_optab): New optabs.
16032 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
16033 (COND_IOR, COND_XOR): New internal functions.
16034 * internal-fn.h (get_conditional_internal_fn): Declare.
16035 * internal-fn.c (cond_binary_direct): New macro.
16036 (expand_cond_binary_optab_fn): Likewise.
16037 (direct_cond_binary_optab_supported_p): Likewise.
16038 (get_conditional_internal_fn): New function.
16039 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
16040 Cope with reduction statements that are vectorized as calls rather
16042 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
16043 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
16044 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
16045 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16046 (UNSPEC_COND_EOR): New unspecs.
16047 (optab): Add mappings for them.
16048 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
16049 (sve_int_op, sve_fp_op): New int attributes.
16051 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16052 Alan Hayward <alan.hayward@arm.com>
16053 David Sherwood <david.sherwood@arm.com>
16055 * optabs.def (while_ult_optab): New optab.
16056 * doc/md.texi (while_ult@var{m}@var{n}): Document.
16057 * internal-fn.def (WHILE_ULT): New internal function.
16058 * internal-fn.h (direct_internal_fn_supported_p): New override
16059 that takes two types as argument.
16060 * internal-fn.c (while_direct): New macro.
16061 (expand_while_optab_fn): New function.
16062 (convert_optab_supported_p): Likewise.
16063 (direct_while_optab_supported_p): New macro.
16064 * wide-int.h (wi::udiv_ceil): New function.
16065 * tree-vectorizer.h (rgroup_masks): New structure.
16066 (vec_loop_masks): New typedef.
16067 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
16068 and fully_masked_p.
16069 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
16070 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
16071 (vect_max_vf): New function.
16072 (slpeel_make_loop_iterate_ntimes): Delete.
16073 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
16074 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
16075 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
16076 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
16077 internal-fn.h, stor-layout.h and optabs-query.h.
16078 (vect_set_loop_mask): New function.
16079 (add_preheader_seq): Likewise.
16080 (add_header_seq): Likewise.
16081 (interleave_supported_p): Likewise.
16082 (vect_maybe_permute_loop_masks): Likewise.
16083 (vect_set_loop_masks_directly): Likewise.
16084 (vect_set_loop_condition_masked): Likewise.
16085 (vect_set_loop_condition_unmasked): New function, split out from
16086 slpeel_make_loop_iterate_ntimes.
16087 (slpeel_make_loop_iterate_ntimes): Rename to..
16088 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
16089 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
16090 (vect_do_peeling): Update call accordingly.
16091 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
16093 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16094 mask_compare_type, can_fully_mask_p and fully_masked_p.
16095 (release_vec_loop_masks): New function.
16096 (_loop_vec_info): Use it to free the loop masks.
16097 (can_produce_all_loop_masks_p): New function.
16098 (vect_get_max_nscalars_per_iter): Likewise.
16099 (vect_verify_full_masking): Likewise.
16100 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
16101 retries, and free the mask rgroups before retrying. Check loop-wide
16102 reasons for disallowing fully-masked loops. Make the final decision
16103 about whether use a fully-masked loop or not.
16104 (vect_estimate_min_profitable_iters): Do not assume that peeling
16105 for the number of iterations will be needed for fully-masked loops.
16106 (vectorizable_reduction): Disable fully-masked loops.
16107 (vectorizable_live_operation): Likewise.
16108 (vect_halve_mask_nunits): New function.
16109 (vect_double_mask_nunits): Likewise.
16110 (vect_record_loop_mask): Likewise.
16111 (vect_get_loop_mask): Likewise.
16112 (vect_transform_loop): Handle the case in which the final loop
16113 iteration might handle a partial vector. Call vect_set_loop_condition
16114 instead of slpeel_make_loop_iterate_ntimes.
16115 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
16116 (check_load_store_masking): New function.
16117 (prepare_load_store_mask): Likewise.
16118 (vectorizable_store): Handle fully-masked loops.
16119 (vectorizable_load): Likewise.
16120 (supportable_widening_operation): Use vect_halve_mask_nunits for
16122 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
16123 (vect_gen_while): New function.
16124 * config/aarch64/aarch64.md (umax<mode>3): New expander.
16125 (aarch64_uqdec<mode>): New insn.
16127 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16128 Alan Hayward <alan.hayward@arm.com>
16129 David Sherwood <david.sherwood@arm.com>
16131 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
16132 (reduc_xor_scal_optab): New optabs.
16133 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
16134 (reduc_xor_scal_@var{m}): Document.
16135 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
16136 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
16137 internal functions.
16138 * fold-const-call.c (fold_const_call): Handle them.
16139 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
16140 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
16141 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
16142 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
16143 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
16144 (UNSPEC_XORV): New unspecs.
16145 (optab): Add entries for them.
16146 (BITWISEV): New int iterator.
16147 (bit_reduc_op): New int attributes.
16149 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16150 Alan Hayward <alan.hayward@arm.com>
16151 David Sherwood <david.sherwood@arm.com>
16153 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
16154 * internal-fn.def (VEC_SHL_INSERT): New internal function.
16155 * optabs.def (vec_shl_insert_optab): New optab.
16156 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
16157 (duplicate_and_interleave): Likewise.
16158 * tree-vect-loop.c: Include internal-fn.h.
16159 (neutral_op_for_slp_reduction): New function, split out from
16160 get_initial_defs_for_reduction.
16161 (get_initial_def_for_reduction): Handle option 2 for variable-length
16162 vectors by loading the neutral value into a vector and then shifting
16163 the initial value into element 0.
16164 (get_initial_defs_for_reduction): Replace the code argument with
16165 the neutral value calculated by neutral_op_for_slp_reduction.
16166 Use gimple_build_vector for constant-length vectors.
16167 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
16168 but the first group_size elements have a neutral value.
16169 Use duplicate_and_interleave otherwise.
16170 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
16171 Update call to get_initial_defs_for_reduction. Handle SLP
16172 reductions for variable-length vectors by creating one vector
16173 result for each scalar result, with the elements associated
16174 with other scalar results stubbed out with the neutral value.
16175 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
16176 Require IFN_VEC_SHL_INSERT for double reductions on
16177 variable-length vectors, or SLP reductions that have
16178 a neutral value. Require can_duplicate_and_interleave_p
16179 support for variable-length unchained SLP reductions if there
16180 is no neutral value, such as for MIN/MAX reductions. Also require
16181 the number of vector elements to be a multiple of the number of
16182 SLP statements when doing variable-length unchained SLP reductions.
16183 Update call to vect_create_epilog_for_reduction.
16184 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
16185 and remove initial values.
16186 (duplicate_and_interleave): Make public.
16187 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
16188 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
16190 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16191 Alan Hayward <alan.hayward@arm.com>
16192 David Sherwood <david.sherwood@arm.com>
16194 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
16195 (can_duplicate_and_interleave_p): New function.
16196 (vect_get_and_check_slp_defs): Take the vector of statements
16197 rather than just the current one. Remove excess parentheses.
16198 Restriction rejectinon of vect_constant_def and vect_external_def
16199 for variable-length vectors to boolean types, or types for which
16200 can_duplicate_and_interleave_p is false.
16201 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
16202 (duplicate_and_interleave): New function.
16203 (vect_get_constant_vectors): Use gimple_build_vector for
16204 constant-length vectors and suitable variable-length constant
16205 vectors. Use duplicate_and_interleave for other variable-length
16206 vectors. Don't defer the update when inserting new statements.
16208 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16209 Alan Hayward <alan.hayward@arm.com>
16210 David Sherwood <david.sherwood@arm.com>
16212 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
16213 min_profitable_iters doesn't go negative.
16215 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16216 Alan Hayward <alan.hayward@arm.com>
16217 David Sherwood <david.sherwood@arm.com>
16219 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
16220 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
16221 * optabs.def (vec_mask_load_lanes_optab): New optab.
16222 (vec_mask_store_lanes_optab): Likewise.
16223 * internal-fn.def (MASK_LOAD_LANES): New internal function.
16224 (MASK_STORE_LANES): Likewise.
16225 * internal-fn.c (mask_load_lanes_direct): New macro.
16226 (mask_store_lanes_direct): Likewise.
16227 (expand_mask_load_optab_fn): Handle masked operations.
16228 (expand_mask_load_lanes_optab_fn): New macro.
16229 (expand_mask_store_optab_fn): Handle masked operations.
16230 (expand_mask_store_lanes_optab_fn): New macro.
16231 (direct_mask_load_lanes_optab_supported_p): Likewise.
16232 (direct_mask_store_lanes_optab_supported_p): Likewise.
16233 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
16235 (vect_load_lanes_supported): Likewise.
16236 * tree-vect-data-refs.c (strip_conversion): New function.
16237 (can_group_stmts_p): Likewise.
16238 (vect_analyze_data_ref_accesses): Use it instead of checking
16239 for a pair of assignments.
16240 (vect_store_lanes_supported): Take a masked_p parameter.
16241 (vect_load_lanes_supported): Likewise.
16242 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
16243 vect_store_lanes_supported and vect_load_lanes_supported.
16244 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
16245 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
16246 parameter. Don't allow gaps for masked accesses.
16247 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
16248 and vect_load_lanes_supported.
16249 (get_load_store_type): Take a masked_p parameter and update
16250 call to get_group_load_store_type.
16251 (vectorizable_store): Update call to get_load_store_type.
16252 Handle IFN_MASK_STORE_LANES.
16253 (vectorizable_load): Update call to get_load_store_type.
16254 Handle IFN_MASK_LOAD_LANES.
16256 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16257 Alan Hayward <alan.hayward@arm.com>
16258 David Sherwood <david.sherwood@arm.com>
16260 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
16262 * config/aarch64/aarch64-protos.h
16263 (aarch64_sve_struct_memory_operand_p): Declare.
16264 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
16265 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
16266 (VPRED, vpred): Handle SVE structure modes.
16267 * config/aarch64/constraints.md (Utx): New constraint.
16268 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
16269 (aarch64_sve_struct_nonimmediate_operand): New predicates.
16270 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
16271 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
16272 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
16273 structure modes. Split into pieces after RA.
16274 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
16275 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
16277 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
16278 SVE structure modes.
16279 (aarch64_classify_address): Likewise.
16280 (sizetochar): Move earlier in file.
16281 (aarch64_print_operand): Handle SVE register lists.
16282 (aarch64_array_mode): New function.
16283 (aarch64_sve_struct_memory_operand_p): Likewise.
16284 (TARGET_ARRAY_MODE): Redefine.
16286 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16287 Alan Hayward <alan.hayward@arm.com>
16288 David Sherwood <david.sherwood@arm.com>
16290 * target.def (array_mode): New target hook.
16291 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
16292 * doc/tm.texi: Regenerate.
16293 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
16294 * hooks.c (hook_optmode_mode_uhwi_none): New function.
16295 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
16296 targetm.array_mode.
16297 * stor-layout.c (mode_for_array): Likewise. Support polynomial
16300 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16301 Alan Hayward <alan.hayward@arm.com>
16302 David Sherwood <david.sherwood@arm.com>
16304 * fold-const.c (fold_binary_loc): Check the argument types
16305 rather than the result type when testing for a vector operation.
16307 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16309 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
16310 * doc/tm.texi: Regenerate.
16312 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16313 Alan Hayward <alan.hayward@arm.com>
16314 David Sherwood <david.sherwood@arm.com>
16316 * doc/invoke.texi (-msve-vector-bits=): Document new option.
16317 (sve): Document new AArch64 extension.
16318 * doc/md.texi (w): Extend the description of the AArch64
16319 constraint to include SVE vectors.
16320 (Upl, Upa): Document new AArch64 predicate constraints.
16321 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
16323 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
16324 (msve-vector-bits=): New option.
16325 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
16326 SVE when these are disabled.
16327 (sve): New extension.
16328 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
16329 modes. Adjust their number of units based on aarch64_sve_vg.
16330 (MAX_BITSIZE_MODE_ANY_MODE): Define.
16331 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
16332 aarch64_addr_query_type.
16333 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
16334 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
16335 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
16336 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
16337 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
16338 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
16339 (aarch64_simd_imm_zero_p): Delete.
16340 (aarch64_check_zero_based_sve_index_immediate): Declare.
16341 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16342 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16343 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16344 (aarch64_sve_float_mul_immediate_p): Likewise.
16345 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16346 rather than an rtx.
16347 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
16348 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
16349 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
16350 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
16351 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
16352 (aarch64_regmode_natural_size): Likewise.
16353 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
16354 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
16356 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
16357 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
16358 for VG and the SVE predicate registers.
16359 (V_ALIASES): Add a "z"-prefixed alias.
16360 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
16361 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
16362 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
16363 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
16364 (REG_CLASS_NAMES): Add entries for them.
16365 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
16366 and the predicate registers.
16367 (aarch64_sve_vg): Declare.
16368 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
16369 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
16370 (REGMODE_NATURAL_SIZE): Define.
16371 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
16373 * config/aarch64/aarch64.c: Include cfgrtl.h.
16374 (simd_immediate_info): Add a constructor for series vectors,
16375 and an associated step field.
16376 (aarch64_sve_vg): New variable.
16377 (aarch64_dbx_register_number): Handle VG and the predicate registers.
16378 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
16379 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
16380 (VEC_ANY_DATA, VEC_STRUCT): New constants.
16381 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
16382 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
16383 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
16384 (aarch64_get_mask_mode): New functions.
16385 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
16386 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
16387 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
16388 predicate modes and predicate registers. Explicitly restrict
16389 GPRs to modes of 16 bytes or smaller. Only allow FP registers
16390 to store a vector mode if it is recognized by
16391 aarch64_classify_vector_mode.
16392 (aarch64_regmode_natural_size): New function.
16393 (aarch64_hard_regno_caller_save_mode): Return the original mode
16395 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
16396 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
16397 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
16398 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
16400 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
16401 does not overlap dest if the function is frame-related. Handle
16403 (aarch64_split_add_offset): New function.
16404 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
16405 them aarch64_add_offset.
16406 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
16407 and update call to aarch64_sub_sp.
16408 (aarch64_add_cfa_expression): New function.
16409 (aarch64_expand_prologue): Pass extra temporary registers to the
16410 functions above. Handle the case in which we need to emit new
16411 DW_CFA_expressions for registers that were originally saved
16412 relative to the stack pointer, but now have to be expressed
16413 relative to the frame pointer.
16414 (aarch64_output_mi_thunk): Pass extra temporary registers to the
16416 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
16417 IP0 and IP1 values for SVE frames.
16418 (aarch64_expand_vec_series): New function.
16419 (aarch64_expand_sve_widened_duplicate): Likewise.
16420 (aarch64_expand_sve_const_vector): Likewise.
16421 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
16422 Handle SVE constants. Use emit_move_insn to move a force_const_mem
16423 into the register, rather than emitting a SET directly.
16424 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
16425 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
16426 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
16427 (offset_9bit_signed_scaled_p): New functions.
16428 (aarch64_replicate_bitmask_imm): New function.
16429 (aarch64_bitmask_imm): Use it.
16430 (aarch64_cannot_force_const_mem): Reject expressions involving
16431 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
16432 (aarch64_classify_index): Handle SVE indices, by requiring
16433 a plain register index with a scale that matches the element size.
16434 (aarch64_classify_address): Handle SVE addresses. Assert that
16435 the mode of the address is VOIDmode or an integer mode.
16436 Update call to aarch64_classify_symbol.
16437 (aarch64_classify_symbolic_expression): Update call to
16438 aarch64_classify_symbol.
16439 (aarch64_const_vec_all_in_range_p): New function.
16440 (aarch64_print_vector_float_operand): Likewise.
16441 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
16442 "vN" for FP registers with SVE modes. Handle (const ...) vectors
16443 and the FP immediates 1.0 and 0.5.
16444 (aarch64_print_address_internal): Handle SVE addresses.
16445 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
16446 (aarch64_regno_regclass): Handle predicate registers.
16447 (aarch64_secondary_reload): Handle big-endian reloads of SVE
16449 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
16450 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
16451 (aarch64_convert_sve_vector_bits): New function.
16452 (aarch64_override_options): Use it to handle -msve-vector-bits=.
16453 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16454 rather than an rtx.
16455 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
16456 Handle SVE vector and predicate modes. Accept VL-based constants
16457 that need only one temporary register, and VL offsets that require
16458 no temporary registers.
16459 (aarch64_conditional_register_usage): Mark the predicate registers
16460 as fixed if SVE isn't available.
16461 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
16462 Return true for SVE vector and predicate modes.
16463 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
16464 rather than an unsigned int. Handle SVE modes.
16465 (aarch64_preferred_simd_mode): Update call accordingly. Handle
16467 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
16469 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16470 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16471 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16472 (aarch64_sve_float_mul_immediate_p): New functions.
16473 (aarch64_sve_valid_immediate): New function.
16474 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
16475 Explicitly reject structure modes. Check for INDEX constants.
16476 Handle PTRUE and PFALSE constants.
16477 (aarch64_check_zero_based_sve_index_immediate): New function.
16478 (aarch64_simd_imm_zero_p): Delete.
16479 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
16480 vector modes. Accept constants in the range of CNT[BHWD].
16481 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
16482 ask for an Advanced SIMD mode.
16483 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
16484 (aarch64_simd_vector_alignment): Handle SVE predicates.
16485 (aarch64_vectorize_preferred_vector_alignment): New function.
16486 (aarch64_simd_vector_alignment_reachable): Use it instead of
16488 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
16489 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
16491 (MAX_VECT_LEN): Delete.
16492 (expand_vec_perm_d): Add a vec_flags field.
16493 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
16494 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
16495 (aarch64_evpc_ext): Don't apply a big-endian lane correction
16497 (aarch64_evpc_rev): Rename to...
16498 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
16499 (aarch64_evpc_rev_global): New function.
16500 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
16501 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
16503 (aarch64_evpc_sve_tbl): New function.
16504 (aarch64_expand_vec_perm_const_1): Update after rename of
16505 aarch64_evpc_rev. Handle SVE permutes too, trying
16506 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
16507 than aarch64_evpc_tbl.
16508 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
16509 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
16510 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
16511 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
16512 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
16513 (aarch64_expand_sve_vcond): New functions.
16514 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
16515 of aarch64_vector_mode_p.
16516 (aarch64_dwarf_poly_indeterminate_value): New function.
16517 (aarch64_compute_pressure_classes): Likewise.
16518 (aarch64_can_change_mode_class): Likewise.
16519 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
16520 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
16521 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
16522 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
16523 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
16524 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
16525 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
16526 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
16528 (Dn, Dl, Dr): Accept const as well as const_vector.
16529 (Dz): Likewise. Compare against CONST0_RTX.
16530 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
16531 of "vector" where appropriate.
16532 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
16533 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
16534 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
16535 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
16536 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
16537 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
16538 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
16539 (v_int_equiv): Extend to SVE modes.
16540 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
16542 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
16543 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
16544 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
16545 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
16546 (SVE_COND_FP_CMP): New int iterators.
16547 (perm_hilo): Handle the new unpack unspecs.
16548 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
16550 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
16551 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
16552 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
16553 (aarch64_equality_operator, aarch64_constant_vector_operand)
16554 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
16555 (aarch64_sve_nonimmediate_operand): Likewise.
16556 (aarch64_sve_general_operand): Likewise.
16557 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
16558 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
16559 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
16560 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
16561 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
16562 (aarch64_sve_float_arith_immediate): Likewise.
16563 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
16564 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
16565 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
16566 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
16567 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
16568 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
16569 (aarch64_sve_float_arith_operand): Likewise.
16570 (aarch64_sve_float_arith_with_sub_operand): Likewise.
16571 (aarch64_sve_float_mul_operand): Likewise.
16572 (aarch64_sve_vec_perm_operand): Likewise.
16573 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
16574 (aarch64_mov_operand): Accept const_poly_int and const_vector.
16575 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
16576 as well as const_vector.
16577 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
16578 in file. Use CONST0_RTX and CONSTM1_RTX.
16579 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
16580 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
16581 Use aarch64_simd_imm_zero.
16582 * config/aarch64/aarch64-sve.md: New file.
16583 * config/aarch64/aarch64.md: Include it.
16584 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
16585 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
16586 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
16587 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
16588 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
16589 (sve): New attribute.
16590 (enabled): Disable instructions with the sve attribute unless
16592 (movqi, movhi): Pass CONST_POLY_INT operaneds through
16593 aarch64_expand_mov_immediate.
16594 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
16595 CNT[BHSD] immediates.
16596 (movti): Split CONST_POLY_INT moves into two halves.
16597 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
16598 Split additions that need a temporary here if the destination
16599 is the stack pointer.
16600 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
16601 (*add<mode>3_poly_1): New instruction.
16602 (set_clobber_cc): New expander.
16604 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16606 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
16607 parameter and use it instead of GET_MODE_SIZE (innermode). Use
16608 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
16609 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
16610 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
16611 Change innermode from fixed_mode_size to machine_mode.
16612 (simplify_subreg): Update call accordingly. Handle a constant-sized
16613 subreg of a variable-length CONST_VECTOR.
16615 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16616 Alan Hayward <alan.hayward@arm.com>
16617 David Sherwood <david.sherwood@arm.com>
16619 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
16620 (add_offset_to_base): New function, split out from...
16621 (create_mem_ref): ...here. When handling a scale other than 1,
16622 check first whether the address is valid without the offset.
16623 Add it into the base if so, leaving the index and scale as-is.
16625 2018-01-12 Jakub Jelinek <jakub@redhat.com>
16628 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
16629 fold_for_warn before checking if arg2 is INTEGER_CST.
16631 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
16633 * config/rs6000/predicates.md (load_multiple_operation): Delete.
16634 (store_multiple_operation): Delete.
16635 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
16636 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
16637 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
16638 guarded by TARGET_STRING.
16639 (rs6000_output_load_multiple): Delete.
16640 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
16641 OPTION_MASK_STRING / TARGET_STRING handling.
16642 (print_operand) <'N', 'O'>: Add comment that these are unused now.
16643 (const rs6000_opt_masks) <"string">: Change mask to 0.
16644 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
16645 (MASK_STRING): Delete.
16646 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
16648 (load_multiple): Delete.
16655 (store_multiple): Delete.
16662 (movmemsi_8reg): Delete.
16663 (corresponding unnamed define_insn): Delete.
16664 (movmemsi_6reg): Delete.
16665 (corresponding unnamed define_insn): Delete.
16666 (movmemsi_4reg): Delete.
16667 (corresponding unnamed define_insn): Delete.
16668 (movmemsi_2reg): Delete.
16669 (corresponding unnamed define_insn): Delete.
16670 (movmemsi_1reg): Delete.
16671 (corresponding unnamed define_insn): Delete.
16672 * config/rs6000/rs6000.opt (mno-string): New.
16673 (mstring): Replace by deprecation warning stub.
16674 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
16676 2018-01-12 Jakub Jelinek <jakub@redhat.com>
16678 * regrename.c (regrename_do_replace): If replacing the same
16679 reg multiple times, try to reuse last created gen_raw_REG.
16682 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
16683 main to workaround a bug in GDB.
16685 2018-01-12 Tom de Vries <tom@codesourcery.com>
16688 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
16690 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
16692 PR rtl-optimization/80481
16693 * ira-color.c (get_cap_member): New function.
16694 (allocnos_conflict_by_live_ranges_p): Use it.
16695 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
16696 (setup_slot_coalesced_allocno_live_ranges): Ditto.
16698 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
16701 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
16702 (*saddl_se_1): Ditto.
16703 (*ssubsi_1): Ditto.
16704 (*ssubl_se_1): Ditto.
16706 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
16708 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
16709 rather than wi::to_widest for DR_INITs.
16710 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
16711 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
16712 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
16714 (vect_analyze_group_access_1): Note that here.
16716 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
16718 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
16719 polynomial type sizes.
16721 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
16723 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
16724 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
16725 (gimple_add_tmp_var): Likewise.
16727 2018-01-12 Martin Liska <mliska@suse.cz>
16729 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
16730 (gimple_alloc_sizes): Likewise.
16731 (dump_gimple_statistics): Use PRIu64 in printf format.
16732 * gimple.h: Change uint64_t to int.
16734 2018-01-12 Martin Liska <mliska@suse.cz>
16736 * tree-core.h: Use uint64_t instead of int.
16737 * tree.c (tree_node_counts): Likewise.
16738 (tree_node_sizes): Likewise.
16739 (dump_tree_statistics): Use PRIu64 in printf format.
16741 2018-01-12 Martin Liska <mliska@suse.cz>
16743 * Makefile.in: As qsort_chk is implemented in vec.c, add
16744 vec.o to linkage of gencfn-macros.
16745 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
16746 passing the info to record_node_allocation_statistics.
16747 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
16749 * ggc-common.c (struct ggc_usage): Add operator== and use
16750 it in operator< and compare function.
16751 * mem-stats.h (struct mem_usage): Likewise.
16752 * vec.c (struct vec_usage): Remove operator< and compare
16753 function. Can be simply inherited.
16755 2018-01-12 Martin Jambor <mjambor@suse.cz>
16758 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
16759 * tree-ssa-math-opts.c: Include domwalk.h.
16760 (convert_mult_to_fma_1): New function.
16761 (fma_transformation_info): New type.
16762 (fma_deferring_state): Likewise.
16763 (cancel_fma_deferring): New function.
16764 (result_of_phi): Likewise.
16765 (last_fma_candidate_feeds_initial_phi): Likewise.
16766 (convert_mult_to_fma): Added deferring logic, split actual
16767 transformation to convert_mult_to_fma_1.
16768 (math_opts_dom_walker): New type.
16769 (math_opts_dom_walker::after_dom_children): New method, body moved
16770 here from pass_optimize_widening_mul::execute, added deferring logic
16772 (pass_optimize_widening_mul::execute): Moved most of code to
16773 math_opts_dom_walker::after_dom_children.
16774 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
16775 * config/i386/i386.c (ix86_option_override_internal): Added
16776 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
16778 2018-01-12 Richard Biener <rguenther@suse.de>
16781 * dwarf2out.c (gen_variable_die): Do not reset old_die for
16782 inline instance vars.
16784 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
16787 * config/rx/rx.c (rx_is_restricted_memory_address):
16788 Handle SUBREG case.
16790 2018-01-12 Richard Biener <rguenther@suse.de>
16792 PR tree-optimization/80846
16793 * target.def (split_reduction): New target hook.
16794 * targhooks.c (default_split_reduction): New function.
16795 * targhooks.h (default_split_reduction): Declare.
16796 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
16797 target requests first reduce vectors by combining low and high
16799 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
16800 (get_vectype_for_scalar_type_and_size): Export.
16801 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
16802 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
16803 * doc/tm.texi: Regenerate.
16804 * config/i386/i386.c (ix86_split_reduction): Implement
16805 TARGET_VECTORIZE_SPLIT_REDUCTION.
16807 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16810 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
16811 in PIC mode except for TARGET_VXWORKS_RTP.
16812 * config/sparc/sparc.c: Include cfgrtl.h.
16813 (TARGET_INIT_PIC_REG): Define.
16814 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
16815 (sparc_pic_register_p): New predicate.
16816 (sparc_legitimate_address_p): Use it.
16817 (sparc_legitimize_pic_address): Likewise.
16818 (sparc_delegitimize_address): Likewise.
16819 (sparc_mode_dependent_address_p): Likewise.
16820 (gen_load_pcrel_sym): Remove 4th parameter.
16821 (load_got_register): Adjust call to above. Remove obsolete stuff.
16822 (sparc_expand_prologue): Do not call load_got_register here.
16823 (sparc_flat_expand_prologue): Likewise.
16824 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
16825 (sparc_use_pseudo_pic_reg): New function.
16826 (sparc_init_pic_reg): Likewise.
16827 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16828 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
16830 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
16832 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
16833 Add item for branch_cost.
16835 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16837 PR rtl-optimization/83565
16838 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
16839 not extend the result to a larger mode for rotate operations.
16840 (num_sign_bit_copies1): Likewise.
16842 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16845 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
16847 Use values-Xc.o for -pedantic.
16848 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
16850 2018-01-12 Martin Liska <mliska@suse.cz>
16853 * ipa-devirt.c (final_warning_record::grow_type_warnings):
16855 (possible_polymorphic_call_targets): Use it.
16856 (ipa_devirt): Likewise.
16858 2018-01-12 Martin Liska <mliska@suse.cz>
16860 * profile-count.h (enum profile_quality): Use 0 as invalid
16861 enum value of profile_quality.
16863 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
16865 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
16866 -mext-string options.
16868 2018-01-12 Richard Biener <rguenther@suse.de>
16870 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
16871 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
16872 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
16874 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
16876 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
16878 * configure.ac (--with-long-double-format): Add support for the
16879 configuration option to change the default long double format on
16881 * config.gcc (powerpc*-linux*-*): Likewise.
16882 * configure: Regenerate.
16883 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
16884 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
16885 used without modification.
16887 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16889 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
16890 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
16891 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
16892 MISC_BUILTIN_SPEC_BARRIER.
16893 (rs6000_init_builtins): Likewise.
16894 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
16896 (speculation_barrier): New define_insn.
16897 * doc/extend.texi: Document __builtin_speculation_barrier.
16899 2018-01-11 Jakub Jelinek <jakub@redhat.com>
16902 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
16903 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
16904 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
16906 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
16907 integral modes instead of "ss" and "sd".
16908 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
16909 vectors with 32-bit and 64-bit elements.
16910 (vecdupssescalarmodesuffix): New mode attribute.
16911 (vec_dup<mode>): Use it.
16913 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
16916 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
16917 frame if argument is passed on stack.
16919 2018-01-11 Jakub Jelinek <jakub@redhat.com>
16922 * ree.c (combine_reaching_defs): Optimize also
16923 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
16924 reg2=any_extend(exp); reg1=reg2;, formatting fix.
16926 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
16928 PR middle-end/83189
16929 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
16931 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
16933 PR middle-end/83718
16934 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
16935 after they are computed.
16937 2018-01-11 Bin Cheng <bin.cheng@arm.com>
16939 PR tree-optimization/83695
16940 * gimple-loop-linterchange.cc
16941 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
16942 reset cached scev information after interchange.
16943 (pass_linterchange::execute): Remove call to scev_reset_htab.
16945 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16947 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
16948 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
16949 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
16950 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
16951 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
16952 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
16953 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
16954 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
16955 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
16956 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
16957 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
16958 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
16959 (V_lane_reg): Likewise.
16960 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
16962 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
16963 (vfmal_lane_low<mode>_intrinsic,
16964 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
16965 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
16966 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
16967 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
16968 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
16969 vfmsl_lane_high<mode>_intrinsic): New define_insns.
16971 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16973 * config/arm/arm-cpus.in (fp16fml): New feature.
16974 (ALL_SIMD): Add fp16fml.
16975 (armv8.2-a): Add fp16fml as an option.
16976 (armv8.3-a): Likewise.
16977 (armv8.4-a): Add fp16fml as part of fp16.
16978 * config/arm/arm.h (TARGET_FP16FML): Define.
16979 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
16981 * config/arm/arm-modes.def (V2HF): Define.
16982 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
16983 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
16984 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
16985 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
16986 vfmsl_low, vfmsl_high): New set of builtins.
16987 * config/arm/iterators.md (PLUSMINUS): New code iterator.
16988 (vfml_op): New code attribute.
16989 (VFMLHALVES): New int iterator.
16990 (VFML, VFMLSEL): New mode attributes.
16991 (V_reg): Define mapping for V2HF.
16992 (V_hi, V_lo): New mode attributes.
16993 (VF_constraint): Likewise.
16994 (vfml_half, vfml_half_selector): New int attributes.
16995 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
16997 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
16998 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
17000 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
17001 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
17002 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
17003 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
17005 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
17006 Document new effective target and option set.
17008 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17010 * config/arm/arm-cpus.in (armv8_4): New feature.
17011 (ARMv8_4a): New fgroup.
17012 (armv8.4-a): New arch.
17013 * config/arm/arm-tables.opt: Regenerate.
17014 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
17015 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
17016 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
17017 Add matching rules for -march=armv8.4-a and extensions.
17018 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
17020 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
17023 * config/rx/rx.md (BW): New mode attribute.
17024 (sync_lock_test_and_setsi): Add mode suffix to insn output.
17026 2018-01-11 Richard Biener <rguenther@suse.de>
17028 PR tree-optimization/83435
17029 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
17030 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
17031 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
17033 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17034 Alan Hayward <alan.hayward@arm.com>
17035 David Sherwood <david.sherwood@arm.com>
17037 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
17039 (aarch64_classify_address): Initialize it. Track polynomial offsets.
17040 (aarch64_print_address_internal): Use it to check for a zero offset.
17042 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17043 Alan Hayward <alan.hayward@arm.com>
17044 David Sherwood <david.sherwood@arm.com>
17046 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
17047 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
17048 Return a poly_int64 rather than a HOST_WIDE_INT.
17049 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
17050 rather than a HOST_WIDE_INT.
17051 * config/aarch64/aarch64.h (aarch64_frame): Protect with
17052 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
17053 hard_fp_offset, frame_size, initial_adjust, callee_offset and
17054 final_offset from HOST_WIDE_INT to poly_int64.
17055 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
17056 to_constant when getting the number of units in an Advanced SIMD
17058 (aarch64_builtin_vectorized_function): Check for a constant number
17060 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
17062 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
17063 attribute instead of GET_MODE_NUNITS.
17064 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
17065 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
17066 GET_MODE_SIZE for fixed-size registers.
17067 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
17068 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
17069 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
17070 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
17071 (aarch64_print_operand, aarch64_print_address_internal)
17072 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
17073 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
17074 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
17075 Handle polynomial GET_MODE_SIZE.
17076 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
17077 wider than SImode without modification.
17078 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
17079 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
17080 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
17081 passing and returning SVE modes.
17082 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
17083 rather than GEN_INT.
17084 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
17085 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
17086 (aarch64_allocate_and_probe_stack_space): Likewise.
17087 (aarch64_layout_frame): Cope with polynomial offsets.
17088 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
17089 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
17090 polynomial offsets.
17091 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
17092 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
17093 poly_int64 rather than a HOST_WIDE_INT.
17094 (aarch64_get_separate_components, aarch64_process_components)
17095 (aarch64_expand_prologue, aarch64_expand_epilogue)
17096 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
17097 (aarch64_anchor_offset): New function, split out from...
17098 (aarch64_legitimize_address): ...here.
17099 (aarch64_builtin_vectorization_cost): Handle polynomial
17100 TYPE_VECTOR_SUBPARTS.
17101 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
17103 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
17104 number of elements from the PARALLEL rather than the mode.
17105 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
17106 rather than GET_MODE_BITSIZE.
17107 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
17108 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
17109 (aarch64_expand_vec_perm_const_1): Handle polynomial
17110 d->perm.length () and d->perm elements.
17111 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
17112 Apply to_constant to d->perm elements.
17113 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
17114 polynomial CONST_VECTOR_NUNITS.
17115 (aarch64_move_pointer): Take amount as a poly_int64 rather
17117 (aarch64_progress_pointer): Avoid temporary variable.
17118 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
17119 the mode attribute instead of GET_MODE.
17121 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17122 Alan Hayward <alan.hayward@arm.com>
17123 David Sherwood <david.sherwood@arm.com>
17125 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
17126 x exists before using it.
17127 (aarch64_add_constant_internal): Rename to...
17128 (aarch64_add_offset_1): ...this. Replace regnum with separate
17129 src and dest rtxes. Handle the case in which they're different,
17130 including when the offset is zero. Replace scratchreg with an rtx.
17131 Use 2 additions if there is no spare register into which we can
17132 move a 16-bit constant.
17133 (aarch64_add_constant): Delete.
17134 (aarch64_add_offset): Replace reg with separate src and dest
17135 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
17136 Use aarch64_add_offset_1.
17137 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
17138 an rtx rather than an int. Take the delta as a poly_int64
17139 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
17140 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
17141 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
17142 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
17143 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
17144 and aarch64_add_sp.
17145 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
17146 aarch64_add_constant.
17148 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17150 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
17151 Use scalar_float_mode.
17153 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17155 * config/aarch64/aarch64-simd.md
17156 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
17157 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
17158 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
17159 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
17160 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
17161 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
17162 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
17163 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
17164 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
17165 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
17167 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17170 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
17171 targ_options->x_arm_arch_string is non NULL.
17173 2018-01-11 Tamar Christina <tamar.christina@arm.com>
17175 * config/aarch64/aarch64.h
17176 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
17178 2018-01-11 Sudakshina Das <sudi.das@arm.com>
17181 * expmed.c (emit_store_flag_force): Swap if const op0
17182 and change VOIDmode to mode of op0.
17184 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17186 PR rtl-optimization/83761
17187 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
17188 than bytes to mode_for_size.
17190 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17192 PR middle-end/83189
17193 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
17194 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
17197 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17199 PR middle-end/83575
17200 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
17201 when in layout mode.
17202 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
17203 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
17206 2018-01-10 Michael Collison <michael.collison@arm.com>
17208 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
17209 * config/aarch64/aarch64-option-extension.def: Add
17210 AARCH64_OPT_EXTENSION of 'fp16fml'.
17211 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17212 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
17213 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
17214 * config/aarch64/constraints.md (Ui7): New constraint.
17215 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
17216 (VFMLA_SEL_W): Ditto.
17219 (VFMLA16_LOW): New int iterator.
17220 (VFMLA16_HIGH): Ditto.
17221 (UNSPEC_FMLAL): New unspec.
17222 (UNSPEC_FMLSL): Ditto.
17223 (UNSPEC_FMLAL2): Ditto.
17224 (UNSPEC_FMLSL2): Ditto.
17225 (f16mac): New code attribute.
17226 * config/aarch64/aarch64-simd-builtins.def
17227 (aarch64_fmlal_lowv2sf): Ditto.
17228 (aarch64_fmlsl_lowv2sf): Ditto.
17229 (aarch64_fmlalq_lowv4sf): Ditto.
17230 (aarch64_fmlslq_lowv4sf): Ditto.
17231 (aarch64_fmlal_highv2sf): Ditto.
17232 (aarch64_fmlsl_highv2sf): Ditto.
17233 (aarch64_fmlalq_highv4sf): Ditto.
17234 (aarch64_fmlslq_highv4sf): Ditto.
17235 (aarch64_fmlal_lane_lowv2sf): Ditto.
17236 (aarch64_fmlsl_lane_lowv2sf): Ditto.
17237 (aarch64_fmlal_laneq_lowv2sf): Ditto.
17238 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
17239 (aarch64_fmlalq_lane_lowv4sf): Ditto.
17240 (aarch64_fmlsl_lane_lowv4sf): Ditto.
17241 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
17242 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
17243 (aarch64_fmlal_lane_highv2sf): Ditto.
17244 (aarch64_fmlsl_lane_highv2sf): Ditto.
17245 (aarch64_fmlal_laneq_highv2sf): Ditto.
17246 (aarch64_fmlsl_laneq_highv2sf): Ditto.
17247 (aarch64_fmlalq_lane_highv4sf): Ditto.
17248 (aarch64_fmlsl_lane_highv4sf): Ditto.
17249 (aarch64_fmlalq_laneq_highv4sf): Ditto.
17250 (aarch64_fmlsl_laneq_highv4sf): Ditto.
17251 * config/aarch64/aarch64-simd.md:
17252 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
17253 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17254 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
17255 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17256 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
17257 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
17258 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
17259 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
17260 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
17261 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
17262 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
17263 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
17264 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
17265 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
17266 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
17267 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
17268 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
17269 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
17270 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
17271 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
17272 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
17273 (vfmlsl_low_u32): Ditto.
17274 (vfmlalq_low_u32): Ditto.
17275 (vfmlslq_low_u32): Ditto.
17276 (vfmlal_high_u32): Ditto.
17277 (vfmlsl_high_u32): Ditto.
17278 (vfmlalq_high_u32): Ditto.
17279 (vfmlslq_high_u32): Ditto.
17280 (vfmlal_lane_low_u32): Ditto.
17281 (vfmlsl_lane_low_u32): Ditto.
17282 (vfmlal_laneq_low_u32): Ditto.
17283 (vfmlsl_laneq_low_u32): Ditto.
17284 (vfmlalq_lane_low_u32): Ditto.
17285 (vfmlslq_lane_low_u32): Ditto.
17286 (vfmlalq_laneq_low_u32): Ditto.
17287 (vfmlslq_laneq_low_u32): Ditto.
17288 (vfmlal_lane_high_u32): Ditto.
17289 (vfmlsl_lane_high_u32): Ditto.
17290 (vfmlal_laneq_high_u32): Ditto.
17291 (vfmlsl_laneq_high_u32): Ditto.
17292 (vfmlalq_lane_high_u32): Ditto.
17293 (vfmlslq_lane_high_u32): Ditto.
17294 (vfmlalq_laneq_high_u32): Ditto.
17295 (vfmlslq_laneq_high_u32): Ditto.
17296 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
17297 (AARCH64_FL_FOR_ARCH8_4): New.
17298 (AARCH64_ISA_F16FML): New ISA flag.
17299 (TARGET_F16FML): New feature flag for fp16fml.
17300 (doc/invoke.texi): Document new fp16fml option.
17302 2018-01-10 Michael Collison <michael.collison@arm.com>
17304 * config/aarch64/aarch64-builtins.c:
17305 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
17306 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17307 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
17308 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
17309 (AARCH64_ISA_SHA3): New ISA flag.
17310 (TARGET_SHA3): New feature flag for sha3.
17311 * config/aarch64/iterators.md (sha512_op): New int attribute.
17312 (CRYPTO_SHA512): New int iterator.
17313 (UNSPEC_SHA512H): New unspec.
17314 (UNSPEC_SHA512H2): Ditto.
17315 (UNSPEC_SHA512SU0): Ditto.
17316 (UNSPEC_SHA512SU1): Ditto.
17317 * config/aarch64/aarch64-simd-builtins.def
17318 (aarch64_crypto_sha512hqv2di): New builtin.
17319 (aarch64_crypto_sha512h2qv2di): Ditto.
17320 (aarch64_crypto_sha512su0qv2di): Ditto.
17321 (aarch64_crypto_sha512su1qv2di): Ditto.
17322 (aarch64_eor3qv8hi): Ditto.
17323 (aarch64_rax1qv2di): Ditto.
17324 (aarch64_xarqv2di): Ditto.
17325 (aarch64_bcaxqv8hi): Ditto.
17326 * config/aarch64/aarch64-simd.md:
17327 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
17328 (aarch64_crypto_sha512su0qv2di): Ditto.
17329 (aarch64_crypto_sha512su1qv2di): Ditto.
17330 (aarch64_eor3qv8hi): Ditto.
17331 (aarch64_rax1qv2di): Ditto.
17332 (aarch64_xarqv2di): Ditto.
17333 (aarch64_bcaxqv8hi): Ditto.
17334 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
17335 (vsha512h2q_u64): Ditto.
17336 (vsha512su0q_u64): Ditto.
17337 (vsha512su1q_u64): Ditto.
17338 (veor3q_u16): Ditto.
17339 (vrax1q_u64): Ditto.
17340 (vxarq_u64): Ditto.
17341 (vbcaxq_u16): Ditto.
17342 * config/arm/types.md (crypto_sha512): New type attribute.
17343 (crypto_sha3): Ditto.
17344 (doc/invoke.texi): Document new sha3 option.
17346 2018-01-10 Michael Collison <michael.collison@arm.com>
17348 * config/aarch64/aarch64-builtins.c:
17349 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
17350 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17351 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
17352 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
17353 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
17354 (AARCH64_ISA_SM4): New ISA flag.
17355 (TARGET_SM4): New feature flag for sm4.
17356 * config/aarch64/aarch64-simd-builtins.def
17357 (aarch64_sm3ss1qv4si): Ditto.
17358 (aarch64_sm3tt1aq4si): Ditto.
17359 (aarch64_sm3tt1bq4si): Ditto.
17360 (aarch64_sm3tt2aq4si): Ditto.
17361 (aarch64_sm3tt2bq4si): Ditto.
17362 (aarch64_sm3partw1qv4si): Ditto.
17363 (aarch64_sm3partw2qv4si): Ditto.
17364 (aarch64_sm4eqv4si): Ditto.
17365 (aarch64_sm4ekeyqv4si): Ditto.
17366 * config/aarch64/aarch64-simd.md:
17367 (aarch64_sm3ss1qv4si): Ditto.
17368 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
17369 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
17370 (aarch64_sm4eqv4si): Ditto.
17371 (aarch64_sm4ekeyqv4si): Ditto.
17372 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
17373 (sm3part_op): Ditto.
17374 (CRYPTO_SM3TT): Ditto.
17375 (CRYPTO_SM3PART): Ditto.
17376 (UNSPEC_SM3SS1): New unspec.
17377 (UNSPEC_SM3TT1A): Ditto.
17378 (UNSPEC_SM3TT1B): Ditto.
17379 (UNSPEC_SM3TT2A): Ditto.
17380 (UNSPEC_SM3TT2B): Ditto.
17381 (UNSPEC_SM3PARTW1): Ditto.
17382 (UNSPEC_SM3PARTW2): Ditto.
17383 (UNSPEC_SM4E): Ditto.
17384 (UNSPEC_SM4EKEY): Ditto.
17385 * config/aarch64/constraints.md (Ui2): New constraint.
17386 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
17387 * config/arm/types.md (crypto_sm3): New type attribute.
17388 (crypto_sm4): Ditto.
17389 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
17390 (vsm3tt1aq_u32): Ditto.
17391 (vsm3tt1bq_u32): Ditto.
17392 (vsm3tt2aq_u32): Ditto.
17393 (vsm3tt2bq_u32): Ditto.
17394 (vsm3partw1q_u32): Ditto.
17395 (vsm3partw2q_u32): Ditto.
17396 (vsm4eq_u32): Ditto.
17397 (vsm4ekeyq_u32): Ditto.
17398 (doc/invoke.texi): Document new sm4 option.
17400 2018-01-10 Michael Collison <michael.collison@arm.com>
17402 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
17403 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
17404 (AARCH64_FL_FOR_ARCH8_4): New.
17405 (AARCH64_FL_V8_4): New flag.
17406 (doc/invoke.texi): Document new armv8.4-a option.
17408 2018-01-10 Michael Collison <michael.collison@arm.com>
17410 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17411 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
17412 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
17413 * config/aarch64/aarch64-option-extension.def: Add
17414 AARCH64_OPT_EXTENSION of 'sha2'.
17415 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
17416 (crypto): Disable sha2 and aes if crypto disabled.
17417 (crypto): Enable aes and sha2 if enabled.
17418 (simd): Disable sha2 and aes if simd disabled.
17419 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
17421 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
17422 (TARGET_SHA2): New feature flag for sha2.
17423 (TARGET_AES): New feature flag for aes.
17424 * config/aarch64/aarch64-simd.md:
17425 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
17426 conditional on TARGET_AES.
17427 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
17428 (aarch64_crypto_sha1hsi): Make pattern conditional
17430 (aarch64_crypto_sha1hv4si): Ditto.
17431 (aarch64_be_crypto_sha1hv4si): Ditto.
17432 (aarch64_crypto_sha1su1v4si): Ditto.
17433 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
17434 (aarch64_crypto_sha1su0v4si): Ditto.
17435 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
17436 (aarch64_crypto_sha256su0v4si): Ditto.
17437 (aarch64_crypto_sha256su1v4si): Ditto.
17438 (doc/invoke.texi): Document new aes and sha2 options.
17440 2018-01-10 Martin Sebor <msebor@redhat.com>
17442 PR tree-optimization/83781
17443 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
17446 2018-01-11 Martin Sebor <msebor@gmail.com>
17447 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17449 PR tree-optimization/83501
17450 PR tree-optimization/81703
17452 * tree-ssa-strlen.c (get_string_cst): Rename...
17453 (get_string_len): ...to this. Handle global constants.
17454 (handle_char_store): Adjust.
17456 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
17457 Jim Wilson <jimw@sifive.com>
17459 * config/riscv/riscv-protos.h (riscv_output_return): New.
17460 * config/riscv/riscv.c (struct machine_function): New naked_p field.
17461 (riscv_attribute_table, riscv_output_return),
17462 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
17463 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
17464 (riscv_compute_frame_info): Only compute frame->mask if not a naked
17466 (riscv_expand_prologue): Add early return for naked function.
17467 (riscv_expand_epilogue): Likewise.
17468 (riscv_function_ok_for_sibcall): Return false for naked function.
17469 (riscv_set_current_function): New.
17470 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
17471 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
17472 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
17473 * doc/extend.texi (RISC-V Function Attributes): New.
17475 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17477 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
17478 check for 128-bit long double before checking TCmode.
17479 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
17480 128-bit long doubles before checking TFmode or TCmode.
17481 (FLOAT128_IBM_P): Likewise.
17483 2018-01-10 Martin Sebor <msebor@redhat.com>
17485 PR tree-optimization/83671
17486 * builtins.c (c_strlen): Unconditionally return zero for the empty
17488 Use -Warray-bounds for warnings.
17489 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
17490 for non-constant array indices with COMPONENT_REF, arrays of
17491 arrays, and pointers to arrays.
17492 (gimple_fold_builtin_strlen): Determine and set length range for
17493 non-constant character arrays.
17495 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
17497 PR middle-end/81897
17498 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
17501 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
17503 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
17505 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
17508 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
17509 VECTOR_MEM_ALTIVEC_OR_VSX_P.
17510 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
17511 indexed_or_indirect_operand predicate.
17512 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
17513 (*vsx_le_perm_load_v8hi): Likewise.
17514 (*vsx_le_perm_load_v16qi): Likewise.
17515 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
17516 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
17517 (*vsx_le_perm_store_v8hi): Likewise.
17518 (*vsx_le_perm_store_v16qi): Likewise.
17519 (eight unnamed splitters): Likewise.
17521 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
17523 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
17524 * config/rs6000/emmintrin.h: Likewise.
17525 * config/rs6000/mmintrin.h: Likewise.
17526 * config/rs6000/xmmintrin.h: Likewise.
17528 2018-01-10 David Malcolm <dmalcolm@redhat.com>
17531 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
17533 * tree.c (tree_nop_conversion): Return true for location wrapper
17535 (maybe_wrap_with_location): New function.
17536 (selftest::check_strip_nops): New function.
17537 (selftest::test_location_wrappers): New function.
17538 (selftest::tree_c_tests): Call it.
17539 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
17540 (maybe_wrap_with_location): New decl.
17541 (EXPR_LOCATION_WRAPPER_P): New macro.
17542 (location_wrapper_p): New inline function.
17543 (tree_strip_any_location_wrapper): New inline function.
17545 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
17548 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
17549 stack_realign_offset for the largest alignment of stack slot
17551 (ix86_find_max_used_stack_alignment): New function.
17552 (ix86_finalize_stack_frame_flags): Use it. Set
17553 max_used_stack_alignment if we don't realign stack.
17554 * config/i386/i386.h (machine_function): Add
17555 max_used_stack_alignment.
17557 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
17559 * config/arm/arm.opt (-mbranch-cost): New option.
17560 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
17563 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
17566 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
17567 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
17569 2018-01-10 Richard Biener <rguenther@suse.de>
17572 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
17573 early out so it also covers the case where we have a non-NULL
17576 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
17578 PR tree-optimization/83753
17579 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
17580 for non-strided grouped accesses if the number of elements is 1.
17582 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17585 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
17586 * i386.h (TARGET_USE_GATHER): Define.
17587 * x86-tune.def (X86_TUNE_USE_GATHER): New.
17589 2018-01-10 Martin Liska <mliska@suse.cz>
17592 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
17593 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
17595 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
17596 CLEANUP_NO_PARTITIONING is not set.
17598 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
17600 * doc/rtl.texi: Remove documentation of (const ...) wrappers
17601 for vectors, as a partial revert of r254296.
17602 * rtl.h (const_vec_p): Delete.
17603 (const_vec_duplicate_p): Don't test for vector CONSTs.
17604 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
17605 * expmed.c (make_tree): Likewise.
17608 * common.md (E, F): Use CONSTANT_P instead of checking for
17610 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
17611 checking for CONST_VECTOR.
17613 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
17615 PR middle-end/83575
17616 * predict.c (force_edge_cold): Handle in more sane way edges
17617 with no prediction.
17619 2018-01-09 Carl Love <cel@us.ibm.com>
17621 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
17623 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
17624 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
17625 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
17626 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
17627 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
17628 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
17629 * config/rs6000/rs6000-protos.h: Add extern defition for
17630 rs6000_generate_float2_double_code.
17631 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
17633 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
17634 (float2_v2df): Add define_expand.
17636 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
17639 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
17640 op_mode in the force_to_mode call.
17642 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
17644 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
17645 instead of checking each element individually.
17646 (aarch64_evpc_uzp): Likewise.
17647 (aarch64_evpc_zip): Likewise.
17648 (aarch64_evpc_ext): Likewise.
17649 (aarch64_evpc_rev): Likewise.
17650 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
17651 instead of checking each element individually. Return true without
17653 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
17654 whether all selected elements come from the same input, instead of
17655 checking each element individually. Remove calls to gen_rtx_REG,
17656 start_sequence and end_sequence and instead assert that no rtl is
17659 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
17661 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
17662 order of HIGH and CONST checks.
17664 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
17666 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
17667 if the destination isn't an SSA_NAME.
17669 2018-01-09 Richard Biener <rguenther@suse.de>
17671 PR tree-optimization/83668
17672 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
17674 (canonicalize_loop_form): ... here, renamed from ...
17675 (canonicalize_loop_closed_ssa_form): ... this and amended to
17676 swap successor edges for loop exit blocks to make us use
17677 the RPO order we need for initial schedule generation.
17679 2018-01-09 Joseph Myers <joseph@codesourcery.com>
17681 PR tree-optimization/64811
17682 * match.pd: When optimizing comparisons with Inf, avoid
17683 introducing or losing exceptions from comparisons with NaN.
17685 2018-01-09 Martin Liska <mliska@suse.cz>
17688 * asan.c (shadow_mem_size): Add gcc_assert.
17690 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
17692 Don't save registers in main().
17695 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
17696 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
17697 * config/avr/avr.c (avr_set_current_function): Don't error if
17698 naked, OS_task or OS_main are specified at the same time.
17699 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
17701 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
17703 * common/config/avr/avr-common.c (avr_option_optimization_table):
17704 Switch on -mmain-is-OS_task for optimizing compilations.
17706 2018-01-09 Richard Biener <rguenther@suse.de>
17708 PR tree-optimization/83572
17709 * graphite.c: Include cfganal.h.
17710 (graphite_transform_loops): Connect infinite loops to exit
17711 and remove fake edges at the end.
17713 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
17715 * ipa-inline.c (edge_badness): Revert accidental checkin.
17717 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
17720 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
17721 symbols; not inline clones.
17723 2018-01-09 Jakub Jelinek <jakub@redhat.com>
17726 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
17727 hard registers. Formatting fixes.
17729 PR preprocessor/83722
17730 * gcc.c (try_generate_repro): Pass
17731 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
17732 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
17735 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
17736 Kito Cheng <kito.cheng@gmail.com>
17738 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
17739 (riscv_leaf_function_p): Delete.
17740 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
17742 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17744 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
17746 (do_ifelse): New function.
17747 (do_isel): New function.
17748 (do_sub3): New function.
17749 (do_add3): New function.
17750 (do_load_mask_compare): New function.
17751 (do_overlap_load_compare): New function.
17752 (expand_compare_loop): New function.
17753 (expand_block_compare): Call expand_compare_loop() when appropriate.
17754 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
17755 option description.
17756 (-mblock-compare-inline-loop-limit): New option.
17758 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17761 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
17762 Reverse order of second and third operands in first alternative.
17763 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
17764 of first and second elements in UNSPEC_VPERMR vector.
17765 (altivec_expand_vec_perm_le): Likewise.
17767 2018-01-08 Jeff Law <law@redhat.com>
17769 PR rtl-optimizatin/81308
17770 * tree-switch-conversion.c (cfg_altered): New file scoped static.
17771 (process_switch): If group_case_labels makes a change, then set
17773 (pass_convert_switch::execute): If a switch is converted, then
17774 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
17776 PR rtl-optimization/81308
17777 * recog.c (split_all_insns): Conditionally cleanup the CFG after
17780 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
17782 PR target/83663 - Revert r255946
17783 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
17784 generation for cases where splatting a value is not useful.
17785 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
17786 across a vec_duplicate and a paradoxical subreg forming a vector
17787 mode to a vec_concat.
17789 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17791 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
17792 -march=armv8.3-a variants.
17793 * config/arm/t-multilib: Likewise.
17794 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
17796 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17798 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
17800 (cceq_ior_compare_complement): Give it a name so I can use it, and
17801 change boolean_or_operator predicate to boolean_operator so it can
17802 be used to generate a crand.
17803 (eqne): New code iterator.
17804 (bd/bd_neg): New code_attrs.
17805 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
17806 a single define_insn.
17807 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
17808 decrement (bdnzt/bdnzf/bdzt/bdzf).
17809 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
17810 with the new names of the branch decrement patterns, and added the
17811 names of the branch decrement conditional patterns.
17813 2018-01-08 Richard Biener <rguenther@suse.de>
17815 PR tree-optimization/83563
17816 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
17819 2018-01-08 Richard Biener <rguenther@suse.de>
17821 PR middle-end/83713
17822 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
17824 2018-01-08 Richard Biener <rguenther@suse.de>
17826 PR tree-optimization/83685
17827 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
17828 references to abnormals.
17830 2018-01-08 Richard Biener <rguenther@suse.de>
17833 * dwarf2out.c (output_indirect_strings): Handle empty
17834 skeleton_debug_str_hash.
17835 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
17837 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
17839 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
17840 (emit_store_direct): Likewise.
17841 (arc_trampoline_adjust_address): Likewise.
17842 (arc_asm_trampoline_template): New function.
17843 (arc_initialize_trampoline): Use asm_trampoline_template.
17844 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
17845 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
17846 * config/arc/arc.md (flush_icache): Delete pattern.
17848 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
17850 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
17851 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
17854 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
17857 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
17858 by not USED_FOR_TARGET.
17859 (make_pass_resolve_sw_modes): Likewise.
17861 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
17863 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
17866 2018-01-08 Richard Biener <rguenther@suse.de>
17868 PR middle-end/83580
17869 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
17871 2018-01-08 Richard Biener <rguenther@suse.de>
17873 PR middle-end/83517
17874 * match.pd ((t * 2) / 2) -> t): Add missing :c.
17876 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
17878 PR middle-end/81897
17879 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
17880 basic blocks with a small number of successors.
17881 (convert_control_dep_chain_into_preds): Improve handling of
17883 (dump_predicates): Split apart into...
17884 (dump_pred_chain): ...here...
17885 (dump_pred_info): ...and here.
17886 (can_one_predicate_be_invalidated_p): Add debugging printfs.
17887 (can_chain_union_be_invalidated_p): Improve check for invalidation
17889 (uninit_uses_cannot_happen): Avoid unnecessary if
17890 convert_control_dep_chain_into_preds yielded nothing.
17892 2018-01-06 Martin Sebor <msebor@redhat.com>
17894 PR tree-optimization/83640
17895 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
17896 subtracting negative offset from size.
17897 (builtin_access::overlap): Adjust offset bounds of the access to fall
17898 within the size of the object if possible.
17900 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
17902 PR rtl-optimization/83699
17903 * expmed.c (extract_bit_field_1): Restrict the vector usage of
17904 extract_bit_field_as_subreg to cases in which the extracted
17905 value is also a vector.
17907 * lra-constraints.c (process_alt_operands): Test for the equivalence
17908 substitutions when detecting a possible reload cycle.
17910 2018-01-06 Jakub Jelinek <jakub@redhat.com>
17913 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
17914 by default if flag_selective_schedling{,2}. Formatting fixes.
17916 PR rtl-optimization/83682
17917 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
17918 if it has non-VECTOR_MODE element mode.
17919 (vec_duplicate_p): Likewise.
17921 PR middle-end/83694
17922 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
17923 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
17925 2018-01-05 Jakub Jelinek <jakub@redhat.com>
17928 * config/i386/i386-builtin.def
17929 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
17930 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
17931 Require also OPTION_MASK_ISA_AVX512F in addition to
17932 OPTION_MASK_ISA_GFNI.
17933 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
17934 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
17935 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
17936 to OPTION_MASK_ISA_GFNI.
17937 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
17938 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
17939 OPTION_MASK_ISA_AVX512BW.
17940 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
17941 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
17942 addition to OPTION_MASK_ISA_GFNI.
17943 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
17944 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
17945 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
17946 to OPTION_MASK_ISA_GFNI.
17947 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
17948 a requirement for all ISAs rather than any of them with a few
17950 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
17952 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
17953 bitmasks to be enabled with 3 exceptions, instead of requiring any
17954 enabled ISA with lots of exceptions.
17955 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
17956 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
17957 Change avx512bw in isa attribute to avx512f.
17958 * config/i386/sgxintrin.h: Add license boilerplate.
17959 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
17960 to __AVX512F__ and __AVX512VL to __AVX512VL__.
17961 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
17962 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
17964 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
17965 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
17966 temporarily sse2 rather than sse if not enabled already.
17969 * config/i386/sse.md (VI248_VLBW): Rename to ...
17970 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
17971 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
17972 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
17973 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
17974 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
17975 mode iterator instead of VI248_VLBW.
17977 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
17979 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
17980 (record_modified): Skip clobbers; add debug output.
17981 (param_change_prob): Use sreal frequencies.
17983 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
17985 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
17986 punt for user-aligned variables.
17988 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
17990 * tree-chrec.c (chrec_contains_symbols): Return true for
17993 2018-01-05 Sudakshina Das <sudi.das@arm.com>
17996 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
17997 of (x|y) == x for BICS pattern.
17999 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18001 PR tree-optimization/83605
18002 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
18003 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
18006 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
18008 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
18009 * config/epiphany/rtems.h: New file.
18011 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18012 Uros Bizjak <ubizjak@gmail.com>
18015 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
18016 QIreg_operand instead of register_operand predicate.
18017 * config/i386/i386.c (ix86_rop_should_change_byte_p,
18018 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
18019 comments instead of -fmitigate[-_]rop.
18021 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18024 * cgraphunit.c (symbol_table::compile): Switch to text_section
18025 before calling assembly_start debug hook.
18026 * run-rtl-passes.c (run_rtl_passes): Likewise.
18029 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18031 * tree-vrp.c (extract_range_from_binary_expr_1): Check
18032 range_int_cst_p rather than !symbolic_range_p before calling
18033 extract_range_from_multiplicative_op_1.
18035 2018-01-04 Jeff Law <law@redhat.com>
18037 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
18038 redundant test in assertion.
18040 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18042 * doc/rtl.texi: Document machine_mode wrapper classes.
18044 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18046 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
18047 using tree_to_uhwi.
18049 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18051 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
18052 the VEC_PERM_EXPR fold to fail.
18054 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18057 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
18058 to switched_sections.
18060 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18063 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
18064 test for d.testing.
18066 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
18069 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
18070 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
18072 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18075 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
18076 is BLKmode and bitpos not zero or mode change is needed.
18078 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18081 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
18084 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
18087 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
18088 instead of MULT rtx. Update all corresponding splitters.
18089 (*saddl_se): Ditto.
18090 (*ssub<modesuffix>): Ditto.
18091 (*ssubl_se): Ditto.
18092 (*cmp_sadd_di): Update split patterns.
18093 (*cmp_sadd_si): Ditto.
18094 (*cmp_sadd_sidi): Ditto.
18095 (*cmp_ssub_di): Ditto.
18096 (*cmp_ssub_si): Ditto.
18097 (*cmp_ssub_sidi): Ditto.
18098 * config/alpha/predicates.md (const23_operand): New predicate.
18099 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
18100 Look for ASHIFT, not MULT inner operand.
18101 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
18103 2018-01-04 Martin Liska <mliska@suse.cz>
18105 PR gcov-profile/83669
18106 * gcov.c (output_intermediate_file): Add version to intermediate
18108 * doc/gcov.texi: Document new field 'version' in intermediate
18109 file format. Fix location of '-k' option of gcov command.
18111 2018-01-04 Martin Liska <mliska@suse.cz>
18114 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
18116 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18118 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
18120 2018-01-03 Martin Sebor <msebor@redhat.com>
18122 PR tree-optimization/83655
18123 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
18124 checking calls with invalid arguments.
18126 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18128 * tree-vect-stmts.c (vect_get_store_rhs): New function.
18129 (vectorizable_mask_load_store): Delete.
18130 (vectorizable_call): Return false for masked loads and stores.
18131 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
18132 instead of gimple_assign_rhs1.
18133 (vectorizable_load): Handle IFN_MASK_LOAD.
18134 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
18136 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18138 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
18140 (vectorizable_mask_load_store): ...here.
18141 (vectorizable_load): ...and here.
18143 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18145 * tree-vect-stmts.c (vect_build_all_ones_mask)
18146 (vect_build_zero_merge_argument): New functions, split out from...
18147 (vectorizable_load): ...here.
18149 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18151 * tree-vect-stmts.c (vect_check_store_rhs): New function,
18153 (vectorizable_mask_load_store): ...here.
18154 (vectorizable_store): ...and here.
18156 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18158 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
18160 (vectorizable_mask_load_store): ...here.
18162 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18164 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
18165 (vect_model_store_cost): Take a vec_load_store_type instead of a
18167 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
18168 (vect_model_store_cost): Take a vec_load_store_type instead of a
18170 (vectorizable_mask_load_store): Update accordingly.
18171 (vectorizable_store): Likewise.
18172 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
18174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18176 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
18177 IFN_MASK_LOAD calls here rather than...
18178 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
18180 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18181 Alan Hayward <alan.hayward@arm.com>
18182 David Sherwood <david.sherwood@arm.com>
18184 * expmed.c (extract_bit_field_1): For vector extracts,
18185 fall back to extract_bit_field_as_subreg if vec_extract
18188 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18189 Alan Hayward <alan.hayward@arm.com>
18190 David Sherwood <david.sherwood@arm.com>
18192 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
18193 they are variable or constant sized.
18194 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
18195 slots for constant-sized data.
18197 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18198 Alan Hayward <alan.hayward@arm.com>
18199 David Sherwood <david.sherwood@arm.com>
18201 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
18202 handling COND_EXPRs with boolean comparisons, try to find a better
18203 basis for the mask type than the boolean itself.
18205 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18207 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
18208 is calculated and how it can be overridden.
18209 * genmodes.c (max_bitsize_mode_any_mode): New variable.
18210 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
18212 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
18215 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18216 Alan Hayward <alan.hayward@arm.com>
18217 David Sherwood <david.sherwood@arm.com>
18219 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
18220 Remove the mode argument.
18221 (aarch64_simd_valid_immediate): Remove the mode and inverse
18223 * config/aarch64/iterators.md (bitsize): New iterator.
18224 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
18225 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
18226 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
18227 aarch64_simd_valid_immediate.
18228 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
18229 (aarch64_reg_or_bic_imm): Likewise.
18230 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
18231 with an insn_type enum and msl with a modifier_type enum.
18232 Replace element_width with a scalar_mode. Change the shift
18233 to unsigned int. Add constructors for scalar_float_mode and
18234 scalar_int_mode elements.
18235 (aarch64_vect_float_const_representable_p): Delete.
18236 (aarch64_can_const_movi_rtx_p)
18237 (aarch64_simd_scalar_immediate_valid_for_move)
18238 (aarch64_simd_make_constant): Update call to
18239 aarch64_simd_valid_immediate.
18240 (aarch64_advsimd_valid_immediate_hs): New function.
18241 (aarch64_advsimd_valid_immediate): Likewise.
18242 (aarch64_simd_valid_immediate): Remove mode and inverse
18243 arguments. Rewrite to use the above. Use const_vec_duplicate_p
18244 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
18245 and aarch64_float_const_representable_p on the result.
18246 (aarch64_output_simd_mov_immediate): Remove mode argument.
18247 Update call to aarch64_simd_valid_immediate and use of
18248 simd_immediate_info.
18249 (aarch64_output_scalar_simd_mov_immediate): Update call
18252 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18253 Alan Hayward <alan.hayward@arm.com>
18254 David Sherwood <david.sherwood@arm.com>
18256 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
18257 (mode_nunits): Likewise CONST_MODE_NUNITS.
18258 * machmode.def (ADJUST_NUNITS): Document.
18259 * genmodes.c (mode_data::need_nunits_adj): New field.
18260 (blank_mode): Update accordingly.
18261 (adj_nunits): New variable.
18262 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
18264 (emit_mode_size_inline): Set need_bytesize_adj for all modes
18265 listed in adj_nunits.
18266 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
18267 listed in adj_nunits. Don't emit case statements for such modes.
18268 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
18269 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
18270 nothing if adj_nunits is nonnull.
18271 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
18272 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
18273 (emit_mode_fbit): Update use of print_maybe_const_decl.
18274 (emit_move_size): Likewise. Treat the array as non-const
18276 (emit_mode_adjustments): Handle adj_nunits.
18278 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18280 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
18281 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
18282 (VECTOR_MODES): Use it.
18283 (make_vector_modes): Take the prefix as an argument.
18285 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18286 Alan Hayward <alan.hayward@arm.com>
18287 David Sherwood <david.sherwood@arm.com>
18289 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
18290 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
18291 for MODE_VECTOR_BOOL.
18292 * machmode.def (VECTOR_BOOL_MODE): Document.
18293 * genmodes.c (VECTOR_BOOL_MODE): New macro.
18294 (make_vector_bool_mode): New function.
18295 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
18297 * lto-streamer-in.c (lto_input_mode_table): Likewise.
18298 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
18300 * stor-layout.c (int_mode_for_mode): Likewise.
18301 * tree.c (build_vector_type_for_mode): Likewise.
18302 * varasm.c (output_constant_pool_2): Likewise.
18303 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
18304 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
18305 for MODE_VECTOR_BOOL.
18306 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
18307 of mode class checks.
18308 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
18309 instead of a list of mode class checks.
18310 (expand_vector_scalar_condition): Likewise.
18311 (type_for_widest_vector_mode): Handle BImode as an inner mode.
18313 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18314 Alan Hayward <alan.hayward@arm.com>
18315 David Sherwood <david.sherwood@arm.com>
18317 * machmode.h (mode_size): Change from unsigned short to
18319 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
18320 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18321 or if measurement_type is not polynomial.
18322 (fixed_size_mode::includes_p): Check for constant-sized modes.
18323 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
18324 return a poly_uint16 rather than an unsigned short.
18325 (emit_mode_size): Change the type of mode_size from unsigned short
18326 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
18327 (emit_mode_adjustments): Cope with polynomial vector sizes.
18328 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18330 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18332 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
18333 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
18334 * caller-save.c (setup_save_areas): Likewise.
18335 (replace_reg_with_saved_mem): Likewise.
18336 * calls.c (emit_library_call_value_1): Likewise.
18337 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
18338 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
18339 (gen_lowpart_for_combine): Likewise.
18340 * convert.c (convert_to_integer_1): Likewise.
18341 * cse.c (equiv_constant, cse_insn): Likewise.
18342 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
18343 (cselib_subst_to_values): Likewise.
18344 * dce.c (word_dce_process_block): Likewise.
18345 * df-problems.c (df_word_lr_mark_ref): Likewise.
18346 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
18347 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
18348 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
18349 (rtl_for_decl_location): Likewise.
18350 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
18351 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
18352 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
18353 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
18354 (expand_expr_real_1): Likewise.
18355 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
18356 (pad_below): Likewise.
18357 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
18358 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
18359 * ira.c (get_subreg_tracking_sizes): Likewise.
18360 * ira-build.c (ira_create_allocno_objects): Likewise.
18361 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
18362 (ira_sort_regnos_for_alter_reg): Likewise.
18363 * ira-costs.c (record_operand_costs): Likewise.
18364 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
18365 (resolve_simple_move): Likewise.
18366 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
18367 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
18368 (lra_constraints): Likewise.
18369 (CONST_POOL_OK_P): Reject variable-sized modes.
18370 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
18371 (add_pseudo_to_slot, lra_spill): Likewise.
18372 * omp-low.c (omp_clause_aligned_alignment): Likewise.
18373 * optabs-query.c (get_best_extraction_insn): Likewise.
18374 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18375 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
18376 (expand_mult_highpart, valid_multiword_target_p): Likewise.
18377 * recog.c (offsettable_address_addr_space_p): Likewise.
18378 * regcprop.c (maybe_mode_change): Likewise.
18379 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
18380 * regrename.c (build_def_use): Likewise.
18381 * regstat.c (dump_reg_info): Likewise.
18382 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
18383 (find_reloads, find_reloads_subreg_address): Likewise.
18384 * reload1.c (eliminate_regs_1): Likewise.
18385 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
18386 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
18387 (simplify_binary_operation_1, simplify_subreg): Likewise.
18388 * targhooks.c (default_function_arg_padding): Likewise.
18389 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
18390 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
18391 (verify_gimple_assign_ternary): Likewise.
18392 * tree-inline.c (estimate_move_cost): Likewise.
18393 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18394 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
18395 (get_address_cost_ainc): Likewise.
18396 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
18397 (vect_supportable_dr_alignment): Likewise.
18398 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18399 (vectorizable_reduction): Likewise.
18400 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
18401 (vectorizable_operation, vectorizable_load): Likewise.
18402 * tree.c (build_same_sized_truth_vector_type): Likewise.
18403 * valtrack.c (cleanup_auto_inc_dec): Likewise.
18404 * var-tracking.c (emit_note_insn_var_location): Likewise.
18405 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
18406 (ADDR_VEC_ALIGN): Likewise.
18408 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18409 Alan Hayward <alan.hayward@arm.com>
18410 David Sherwood <david.sherwood@arm.com>
18412 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
18414 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18415 or if measurement_type is polynomial.
18416 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
18417 * combine.c (make_extraction): Likewise.
18418 * dse.c (find_shift_sequence): Likewise.
18419 * dwarf2out.c (mem_loc_descriptor): Likewise.
18420 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
18421 (extract_bit_field, extract_low_bits): Likewise.
18422 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
18423 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
18424 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
18425 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
18426 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
18427 * reload.c (find_reloads): Likewise.
18428 * reload1.c (alter_reg): Likewise.
18429 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
18430 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
18431 * tree-if-conv.c (predicate_mem_writes): Likewise.
18432 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
18433 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
18434 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
18435 * valtrack.c (dead_debug_insert_temp): Likewise.
18436 * varasm.c (mergeable_constant_section): Likewise.
18437 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
18439 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18440 Alan Hayward <alan.hayward@arm.com>
18441 David Sherwood <david.sherwood@arm.com>
18443 * expr.c (expand_assignment): Cope with polynomial mode sizes
18444 when assigning to a CONCAT.
18446 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18447 Alan Hayward <alan.hayward@arm.com>
18448 David Sherwood <david.sherwood@arm.com>
18450 * machmode.h (mode_precision): Change from unsigned short to
18452 (mode_to_precision): Return a poly_uint16 rather than an unsigned
18454 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
18455 or if measurement_type is not polynomial.
18456 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
18457 in which the mode is already known to be a scalar_int_mode.
18458 * genmodes.c (emit_mode_precision): Change the type of mode_precision
18459 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
18461 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18462 for GET_MODE_PRECISION.
18463 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18464 for GET_MODE_PRECISION.
18465 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
18467 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
18468 (expand_field_assignment, make_extraction): Likewise.
18469 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
18470 (get_last_value): Likewise.
18471 * convert.c (convert_to_integer_1): Likewise.
18472 * cse.c (cse_insn): Likewise.
18473 * expr.c (expand_expr_real_1): Likewise.
18474 * lra-constraints.c (simplify_operand_subreg): Likewise.
18475 * optabs-query.c (can_atomic_load_p): Likewise.
18476 * optabs.c (expand_atomic_load): Likewise.
18477 (expand_atomic_store): Likewise.
18478 * ree.c (combine_reaching_defs): Likewise.
18479 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
18480 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
18481 * tree.h (type_has_mode_precision_p): Likewise.
18482 * ubsan.c (instrument_si_overflow): Likewise.
18484 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18485 Alan Hayward <alan.hayward@arm.com>
18486 David Sherwood <david.sherwood@arm.com>
18488 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
18489 polynomial numbers of units.
18490 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
18491 (valid_vector_subparts_p): New function.
18492 (build_vector_type): Remove temporary shim and take the number
18493 of units as a poly_uint64 rather than an int.
18494 (build_opaque_vector_type): Take the number of units as a
18495 poly_uint64 rather than an int.
18496 * tree.c (build_vector_from_ctor): Handle polynomial
18497 TYPE_VECTOR_SUBPARTS.
18498 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
18499 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
18500 (build_vector_from_val): If the number of units is variable,
18501 use build_vec_duplicate_cst for constant operands and
18502 VEC_DUPLICATE_EXPR otherwise.
18503 (make_vector_type): Remove temporary is_constant ().
18504 (build_vector_type, build_opaque_vector_type): Take the number of
18505 units as a poly_uint64 rather than an int.
18506 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
18508 * cfgexpand.c (expand_debug_expr): Likewise.
18509 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
18510 (store_constructor, expand_expr_real_1): Likewise.
18511 (const_scalar_mask_from_tree): Likewise.
18512 * fold-const-call.c (fold_const_reduction): Likewise.
18513 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
18514 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
18515 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
18516 (fold_relational_const): Likewise.
18517 (native_interpret_vector): Likewise. Change the size from an
18518 int to an unsigned int.
18519 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
18520 TYPE_VECTOR_SUBPARTS.
18521 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
18522 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
18523 duplicating a non-constant operand into a variable-length vector.
18524 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
18525 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
18526 * ipa-icf.c (sem_variable::equals): Likewise.
18527 * match.pd: Likewise.
18528 * omp-simd-clone.c (simd_clone_subparts): Likewise.
18529 * print-tree.c (print_node): Likewise.
18530 * stor-layout.c (layout_type): Likewise.
18531 * targhooks.c (default_builtin_vectorization_cost): Likewise.
18532 * tree-cfg.c (verify_gimple_comparison): Likewise.
18533 (verify_gimple_assign_binary): Likewise.
18534 (verify_gimple_assign_ternary): Likewise.
18535 (verify_gimple_assign_single): Likewise.
18536 * tree-pretty-print.c (dump_generic_node): Likewise.
18537 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18538 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
18539 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
18540 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
18541 (vect_shift_permute_load_chain): Likewise.
18542 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
18543 (expand_vector_condition, optimize_vector_constructor): Likewise.
18544 (lower_vec_perm, get_compute_type): Likewise.
18545 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18546 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
18547 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
18548 (vect_recog_mask_conversion_pattern): Likewise.
18549 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
18550 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
18551 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18552 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
18553 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
18554 (vectorizable_shift, vectorizable_operation, vectorizable_store)
18555 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
18556 (supportable_widening_operation): Likewise.
18557 (supportable_narrowing_operation): Likewise.
18558 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
18560 * varasm.c (output_constant): Likewise.
18562 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18563 Alan Hayward <alan.hayward@arm.com>
18564 David Sherwood <david.sherwood@arm.com>
18566 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
18567 so that both the length == 3 and length != 3 cases set up their
18568 own permute vectors. Add comments explaining why we know the
18569 number of elements is constant.
18570 (vect_permute_load_chain): Likewise.
18572 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18573 Alan Hayward <alan.hayward@arm.com>
18574 David Sherwood <david.sherwood@arm.com>
18576 * machmode.h (mode_nunits): Change from unsigned char to
18578 (ONLY_FIXED_SIZE_MODES): New macro.
18579 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
18580 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
18581 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
18583 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
18584 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
18585 or if measurement_type is not polynomial.
18586 * genmodes.c (ZERO_COEFFS): New macro.
18587 (emit_mode_nunits_inline): Make mode_nunits_inline return a
18589 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
18590 Use ZERO_COEFFS when emitting initializers.
18591 * data-streamer.h (bp_pack_poly_value): New function.
18592 (bp_unpack_poly_value): Likewise.
18593 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18594 for GET_MODE_NUNITS.
18595 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18596 for GET_MODE_NUNITS.
18597 * tree.c (make_vector_type): Remove temporary shim and make
18598 the real function take the number of units as a poly_uint64
18599 rather than an int.
18600 (build_vector_type_for_mode): Handle polynomial nunits.
18601 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
18602 * emit-rtl.c (const_vec_series_p_1): Likewise.
18603 (gen_rtx_CONST_VECTOR): Likewise.
18604 * fold-const.c (test_vec_duplicate_folding): Likewise.
18605 * genrecog.c (validate_pattern): Likewise.
18606 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
18607 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18608 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
18609 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
18610 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
18611 * rtlanal.c (subreg_get_info): Likewise.
18612 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18613 (vect_grouped_load_supported): Likewise.
18614 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
18615 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
18616 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18617 (simplify_const_unary_operation, simplify_binary_operation_1)
18618 (simplify_const_binary_operation, simplify_ternary_operation)
18619 (test_vector_ops_duplicate, test_vector_ops): Likewise.
18620 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
18621 instead of CONST_VECTOR_NUNITS.
18622 * varasm.c (output_constant_pool_2): Likewise.
18623 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
18624 explicit-encoded elements in the XVEC for variable-length vectors.
18626 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18628 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
18630 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18631 Alan Hayward <alan.hayward@arm.com>
18632 David Sherwood <david.sherwood@arm.com>
18634 * coretypes.h (fixed_size_mode): Declare.
18635 (fixed_size_mode_pod): New typedef.
18636 * builtins.h (target_builtins::x_apply_args_mode)
18637 (target_builtins::x_apply_result_mode): Change type to
18638 fixed_size_mode_pod.
18639 * builtins.c (apply_args_size, apply_result_size, result_vector)
18640 (expand_builtin_apply_args_1, expand_builtin_apply)
18641 (expand_builtin_return): Update accordingly.
18643 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18645 * cse.c (hash_rtx_cb): Hash only the encoded elements.
18646 * cselib.c (cselib_hash_rtx): Likewise.
18647 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
18648 CONST_VECTOR encoding.
18650 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18651 Jeff Law <law@redhat.com>
18654 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
18655 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
18656 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
18657 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
18660 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
18661 explicitly probe *sp in a noreturn function if there were any callee
18662 register saves or frame pointer is needed.
18664 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18667 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
18668 BLKmode for ternary, binary or unary expressions.
18671 * var-tracking.c (delete_vta_debug_insn): New inline function.
18672 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
18673 insns from get_insns () to NULL instead of each bb separately.
18674 Use delete_vta_debug_insn. No longer static.
18675 (vt_debug_insns_local, variable_tracking_main_1): Adjust
18676 delete_vta_debug_insns callers.
18677 * rtl.h (delete_vta_debug_insns): Declare.
18678 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
18679 instead of variable_tracking_main.
18681 2018-01-03 Martin Sebor <msebor@redhat.com>
18683 PR tree-optimization/83603
18684 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
18685 arguments past the endof the argument list in functions declared
18686 without a prototype.
18687 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
18688 Avoid checking when arguments are null.
18690 2018-01-03 Martin Sebor <msebor@redhat.com>
18693 * doc/extend.texi (attribute const): Fix a typo.
18694 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
18695 issuing -Wsuggest-attribute for void functions.
18697 2018-01-03 Martin Sebor <msebor@redhat.com>
18699 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
18700 offset_int::from instead of wide_int::to_shwi.
18701 (maybe_diag_overlap): Remove assertion.
18702 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
18703 * gimple-ssa-sprintf.c (format_directive): Same.
18704 (parse_directive): Same.
18705 (sprintf_dom_walker::compute_format_length): Same.
18706 (try_substitute_return_value): Same.
18708 2018-01-03 Jeff Law <law@redhat.com>
18710 PR middle-end/83654
18711 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
18712 non-constant residual for zero at runtime and avoid probing in
18713 that case. Reorganize code for trailing problem to mirror handling
18716 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18718 PR tree-optimization/83501
18719 * tree-ssa-strlen.c (get_string_cst): New.
18720 (handle_char_store): Call get_string_cst.
18722 2018-01-03 Martin Liska <mliska@suse.cz>
18724 PR tree-optimization/83593
18725 * tree-ssa-strlen.c: Include tree-cfg.h.
18726 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
18727 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
18728 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
18730 (strlen_dom_walker::before_dom_children): Call
18731 gimple_purge_dead_eh_edges. Dump tranformation with details
18733 (strlen_dom_walker::before_dom_children): Update call by adding
18734 new argument cleanup_eh.
18735 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
18737 2018-01-03 Martin Liska <mliska@suse.cz>
18740 * cif-code.def (VARIADIC_THUNK): New enum value.
18741 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
18744 2018-01-03 Jan Beulich <jbeulich@suse.com>
18746 * sse.md (mov<mode>_internal): Tighten condition for when to use
18747 vmovdqu<ssescalarsize> for TI and OI modes.
18749 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18751 Update copyright years.
18753 2018-01-03 Martin Liska <mliska@suse.cz>
18756 * ipa-visibility.c (function_and_variable_visibility): Skip
18757 functions with noipa attribure.
18759 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18761 * gcc.c (process_command): Update copyright notice dates.
18762 * gcov-dump.c (print_version): Ditto.
18763 * gcov.c (print_version): Ditto.
18764 * gcov-tool.c (print_version): Ditto.
18765 * gengtype.c (create_file): Ditto.
18766 * doc/cpp.texi: Bump @copying's copyright year.
18767 * doc/cppinternals.texi: Ditto.
18768 * doc/gcc.texi: Ditto.
18769 * doc/gccint.texi: Ditto.
18770 * doc/gcov.texi: Ditto.
18771 * doc/install.texi: Ditto.
18772 * doc/invoke.texi: Ditto.
18774 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18776 * vector-builder.h (vector_builder::m_full_nelts): Change from
18777 unsigned int to poly_uint64.
18778 (vector_builder::full_nelts): Update prototype accordingly.
18779 (vector_builder::new_vector): Likewise.
18780 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
18781 (vector_builder::operator ==): Likewise.
18782 (vector_builder::finalize): Likewise.
18783 * int-vector-builder.h (int_vector_builder::int_vector_builder):
18784 Take the number of elements as a poly_uint64 rather than an
18786 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
18787 from unsigned int to poly_uint64.
18788 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
18789 (vec_perm_indices::new_vector): Likewise.
18790 (vec_perm_indices::length): Likewise.
18791 (vec_perm_indices::nelts_per_input): Likewise.
18792 (vec_perm_indices::input_nelts): Likewise.
18793 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
18794 number of elements per input as a poly_uint64 rather than an
18795 unsigned int. Use the original encoding for variable-length
18796 vectors, rather than clamping each individual element.
18797 For the second and subsequent elements in each pattern,
18798 clamp the step and base before clamping their sum.
18799 (vec_perm_indices::series_p): Handle polynomial element counts.
18800 (vec_perm_indices::all_in_range_p): Likewise.
18801 (vec_perm_indices_to_tree): Likewise.
18802 (vec_perm_indices_to_rtx): Likewise.
18803 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
18804 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
18805 (tree_vector_builder::new_binary_operation): Handle polynomial
18806 element counts. Return false if we need to know the number
18807 of elements at compile time.
18808 * fold-const.c (fold_vec_perm): Punt if the number of elements
18809 isn't known at compile time.
18811 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18813 * vec-perm-indices.h (vec_perm_builder): Change element type
18814 from HOST_WIDE_INT to poly_int64.
18815 (vec_perm_indices::element_type): Update accordingly.
18816 (vec_perm_indices::clamp): Handle polynomial element_types.
18817 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
18818 (vec_perm_indices::all_in_range_p): Likewise.
18819 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
18821 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
18822 polynomial vec_perm_indices element types.
18823 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
18824 * fold-const.c (fold_vec_perm): Likewise.
18825 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
18826 * tree-vect-generic.c (lower_vec_perm): Likewise.
18827 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18828 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
18829 element type to HOST_WIDE_INT.
18831 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18832 Alan Hayward <alan.hayward@arm.com>
18833 David Sherwood <david.sherwood@arm.com>
18835 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
18836 rather than an int. Use plus_constant.
18837 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
18838 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
18840 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18841 Alan Hayward <alan.hayward@arm.com>
18842 David Sherwood <david.sherwood@arm.com>
18844 * calls.c (emit_call_1, expand_call): Change struct_value_size from
18845 a HOST_WIDE_INT to a poly_int64.
18847 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18848 Alan Hayward <alan.hayward@arm.com>
18849 David Sherwood <david.sherwood@arm.com>
18851 * calls.c (load_register_parameters): Cope with polynomial
18852 mode sizes. Require a constant size for BLKmode parameters
18853 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
18854 forces a parameter to be padded at the lsb end in order to
18855 fill a complete number of words, require the parameter size
18856 to be ordered wrt UNITS_PER_WORD.
18858 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18859 Alan Hayward <alan.hayward@arm.com>
18860 David Sherwood <david.sherwood@arm.com>
18862 * reload1.c (spill_stack_slot_width): Change element type
18863 from unsigned int to poly_uint64_pod.
18864 (alter_reg): Treat mode sizes as polynomial.
18866 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18867 Alan Hayward <alan.hayward@arm.com>
18868 David Sherwood <david.sherwood@arm.com>
18870 * reload.c (complex_word_subreg_p): New function.
18871 (reload_inner_reg_of_subreg, push_reload): Use it.
18873 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18874 Alan Hayward <alan.hayward@arm.com>
18875 David Sherwood <david.sherwood@arm.com>
18877 * lra-constraints.c (process_alt_operands): Reject matched
18878 operands whose sizes aren't ordered.
18879 (match_reload): Refer to this check here.
18881 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18882 Alan Hayward <alan.hayward@arm.com>
18883 David Sherwood <david.sherwood@arm.com>
18885 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
18886 that the mode size is in the set {1, 2, 4, 8, 16}.
18888 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18889 Alan Hayward <alan.hayward@arm.com>
18890 David Sherwood <david.sherwood@arm.com>
18892 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
18893 Use plus_constant instead of gen_rtx_PLUS.
18895 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18896 Alan Hayward <alan.hayward@arm.com>
18897 David Sherwood <david.sherwood@arm.com>
18899 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
18900 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
18901 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
18902 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
18903 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
18904 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
18905 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
18906 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
18907 * config/i386/i386.c (ix86_push_rounding): ...this new function.
18908 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
18910 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
18911 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
18912 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
18913 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
18914 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
18915 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
18916 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
18917 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
18918 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
18919 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
18921 * expr.c (emit_move_resolve_push): Treat the input and result
18922 of PUSH_ROUNDING as a poly_int64.
18923 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
18924 (emit_push_insn): Likewise.
18925 * lra-eliminations.c (mark_not_eliminable): Likewise.
18926 * recog.c (push_operand): Likewise.
18927 * reload1.c (elimination_effects): Likewise.
18928 * rtlanal.c (nonzero_bits1): Likewise.
18929 * calls.c (store_one_arg): Likewise. Require the padding to be
18930 known at compile time.
18932 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18933 Alan Hayward <alan.hayward@arm.com>
18934 David Sherwood <david.sherwood@arm.com>
18936 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
18937 Use plus_constant instead of gen_rtx_PLUS.
18939 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18940 Alan Hayward <alan.hayward@arm.com>
18941 David Sherwood <david.sherwood@arm.com>
18943 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
18944 rather than an int.
18946 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18947 Alan Hayward <alan.hayward@arm.com>
18948 David Sherwood <david.sherwood@arm.com>
18950 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
18951 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
18952 via stack temporaries. Treat the mode size as polynomial too.
18954 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18955 Alan Hayward <alan.hayward@arm.com>
18956 David Sherwood <david.sherwood@arm.com>
18958 * expr.c (expand_expr_real_2): When handling conversions involving
18959 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
18960 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
18961 as a poly_uint64 too.
18963 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18964 Alan Hayward <alan.hayward@arm.com>
18965 David Sherwood <david.sherwood@arm.com>
18967 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
18969 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18970 Alan Hayward <alan.hayward@arm.com>
18971 David Sherwood <david.sherwood@arm.com>
18973 * combine.c (can_change_dest_mode): Handle polynomial
18974 REGMODE_NATURAL_SIZE.
18975 * expmed.c (store_bit_field_1): Likewise.
18976 * expr.c (store_constructor): Likewise.
18977 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
18978 and polynomial REGMODE_NATURAL_SIZE.
18979 (gen_lowpart_common): Likewise.
18980 * reginfo.c (record_subregs_of_mode): Likewise.
18981 * rtlanal.c (read_modify_subreg_p): Likewise.
18983 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18984 Alan Hayward <alan.hayward@arm.com>
18985 David Sherwood <david.sherwood@arm.com>
18987 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
18988 numbers of elements.
18990 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18991 Alan Hayward <alan.hayward@arm.com>
18992 David Sherwood <david.sherwood@arm.com>
18994 * match.pd: Cope with polynomial numbers of vector elements.
18996 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18997 Alan Hayward <alan.hayward@arm.com>
18998 David Sherwood <david.sherwood@arm.com>
19000 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
19001 in a POINTER_PLUS_EXPR.
19003 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19004 Alan Hayward <alan.hayward@arm.com>
19005 David Sherwood <david.sherwood@arm.com>
19007 * omp-simd-clone.c (simd_clone_subparts): New function.
19008 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
19009 (ipa_simd_modify_function_body): Likewise.
19011 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19012 Alan Hayward <alan.hayward@arm.com>
19013 David Sherwood <david.sherwood@arm.com>
19015 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
19016 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
19017 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
19018 (expand_vector_condition, vector_element): Likewise.
19019 (subparts_gt): New function.
19020 (get_compute_type): Use subparts_gt.
19021 (count_type_subparts): Delete.
19022 (expand_vector_operations_1): Use subparts_gt instead of
19023 count_type_subparts.
19025 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19026 Alan Hayward <alan.hayward@arm.com>
19027 David Sherwood <david.sherwood@arm.com>
19029 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
19030 (vect_compile_time_alias): ...this new function. Do the calculation
19031 on poly_ints rather than trees.
19032 (vect_prune_runtime_alias_test_list): Update call accordingly.
19034 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19035 Alan Hayward <alan.hayward@arm.com>
19036 David Sherwood <david.sherwood@arm.com>
19038 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
19040 (vect_schedule_slp_instance): Likewise.
19042 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19043 Alan Hayward <alan.hayward@arm.com>
19044 David Sherwood <david.sherwood@arm.com>
19046 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
19047 constant and extern definitions for variable-length vectors.
19048 (vect_get_constant_vectors): Note that the number of units
19049 is known to be constant.
19051 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19052 Alan Hayward <alan.hayward@arm.com>
19053 David Sherwood <david.sherwood@arm.com>
19055 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
19056 of units as polynomial. Choose between WIDE and NARROW based
19059 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19060 Alan Hayward <alan.hayward@arm.com>
19061 David Sherwood <david.sherwood@arm.com>
19063 * tree-vect-stmts.c (simd_clone_subparts): New function.
19064 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
19066 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19067 Alan Hayward <alan.hayward@arm.com>
19068 David Sherwood <david.sherwood@arm.com>
19070 * tree-vect-stmts.c (vectorizable_call): Treat the number of
19071 vectors as polynomial. Use build_index_vector for
19072 IFN_GOMP_SIMD_LANE.
19074 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19075 Alan Hayward <alan.hayward@arm.com>
19076 David Sherwood <david.sherwood@arm.com>
19078 * tree-vect-stmts.c (get_load_store_type): Treat the number of
19079 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
19080 for variable-length vectors.
19081 (vectorizable_mask_load_store): Treat the number of units as
19082 polynomial, asserting that it is constant if the condition has
19083 already been enforced.
19084 (vectorizable_store, vectorizable_load): Likewise.
19086 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19087 Alan Hayward <alan.hayward@arm.com>
19088 David Sherwood <david.sherwood@arm.com>
19090 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
19091 of units as polynomial. Punt if we can't tell at compile time
19092 which vector contains the final result.
19094 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19095 Alan Hayward <alan.hayward@arm.com>
19096 David Sherwood <david.sherwood@arm.com>
19098 * tree-vect-loop.c (vectorizable_induction): Treat the number
19099 of units as polynomial. Punt on SLP inductions. Use an integer
19100 VEC_SERIES_EXPR for variable-length integer reductions. Use a
19101 cast of such a series for variable-length floating-point
19104 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19105 Alan Hayward <alan.hayward@arm.com>
19106 David Sherwood <david.sherwood@arm.com>
19108 * tree.h (build_index_vector): Declare.
19109 * tree.c (build_index_vector): New function.
19110 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
19111 of units as polynomial, forcibly converting it to a constant if
19112 vectorizable_reduction has already enforced the condition.
19113 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
19114 to create a {1,2,3,...} vector.
19115 (vectorizable_reduction): Treat the number of units as polynomial.
19116 Choose vectype_in based on the largest scalar element size rather
19117 than the smallest number of units. Enforce the restrictions
19120 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19121 Alan Hayward <alan.hayward@arm.com>
19122 David Sherwood <david.sherwood@arm.com>
19124 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
19125 number of units as polynomial.
19127 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19128 Alan Hayward <alan.hayward@arm.com>
19129 David Sherwood <david.sherwood@arm.com>
19131 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
19132 * target.def (autovectorize_vector_sizes): Return the vector sizes
19133 by pointer, using vector_sizes rather than a bitmask.
19134 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
19135 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
19136 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
19138 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
19139 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
19140 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
19141 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
19142 * omp-general.c (omp_max_vf): Likewise.
19143 * omp-low.c (omp_clause_aligned_alignment): Likewise.
19144 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
19145 * tree-vect-loop.c (vect_analyze_loop): Likewise.
19146 * tree-vect-slp.c (vect_slp_bb): Likewise.
19147 * doc/tm.texi: Regenerate.
19148 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
19150 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
19151 the vector size as a poly_uint64 rather than an unsigned int.
19152 (current_vector_size): Change from an unsigned int to a poly_uint64.
19153 (get_vectype_for_scalar_type): Update accordingly.
19154 * tree.h (build_truth_vector_type): Take the size and number of
19155 units as a poly_uint64 rather than an unsigned int.
19156 (build_vector_type): Add a temporary overload that takes
19157 the number of units as a poly_uint64 rather than an unsigned int.
19158 * tree.c (make_vector_type): Likewise.
19159 (build_truth_vector_type): Take the number of units as a poly_uint64
19160 rather than an unsigned int.
19162 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19163 Alan Hayward <alan.hayward@arm.com>
19164 David Sherwood <david.sherwood@arm.com>
19166 * target.def (get_mask_mode): Take the number of units and length
19167 as poly_uint64s rather than unsigned ints.
19168 * targhooks.h (default_get_mask_mode): Update accordingly.
19169 * targhooks.c (default_get_mask_mode): Likewise.
19170 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
19171 * doc/tm.texi: Regenerate.
19173 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19174 Alan Hayward <alan.hayward@arm.com>
19175 David Sherwood <david.sherwood@arm.com>
19177 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
19178 * omp-general.c (omp_max_vf): Likewise.
19179 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
19180 (expand_omp_simd): Handle polynomial safelen.
19181 * omp-low.c (omplow_simd_context): Add a default constructor.
19182 (omplow_simd_context::max_vf): Change from int to poly_uint64.
19183 (lower_rec_simd_input_clauses): Update accordingly.
19184 (lower_rec_input_clauses): Likewise.
19186 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19187 Alan Hayward <alan.hayward@arm.com>
19188 David Sherwood <david.sherwood@arm.com>
19190 * tree-vectorizer.h (vect_nunits_for_cost): New function.
19191 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
19192 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
19193 (vect_analyze_slp_cost): Likewise.
19194 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
19195 (vect_model_load_cost): Likewise.
19197 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19198 Alan Hayward <alan.hayward@arm.com>
19199 David Sherwood <david.sherwood@arm.com>
19201 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
19202 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
19203 from an unsigned int * to a poly_uint64_pod *.
19204 (calculate_unrolling_factor): New function.
19205 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
19207 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19208 Alan Hayward <alan.hayward@arm.com>
19209 David Sherwood <david.sherwood@arm.com>
19211 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
19212 from an unsigned int to a poly_uint64.
19213 (_loop_vec_info::slp_unrolling_factor): Likewise.
19214 (_loop_vec_info::vectorization_factor): Change from an int
19216 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
19217 (vect_get_num_vectors): New function.
19218 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
19219 (vect_get_num_copies): Use vect_get_num_vectors.
19220 (vect_analyze_data_ref_dependences): Change max_vf from an int *
19221 to an unsigned int *.
19222 (vect_analyze_data_refs): Change min_vf from an int * to a
19224 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19225 than an unsigned HOST_WIDE_INT.
19226 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
19227 (vect_analyze_data_ref_dependence): Change max_vf from an int *
19228 to an unsigned int *.
19229 (vect_analyze_data_ref_dependences): Likewise.
19230 (vect_compute_data_ref_alignment): Handle polynomial vf.
19231 (vect_enhance_data_refs_alignment): Likewise.
19232 (vect_prune_runtime_alias_test_list): Likewise.
19233 (vect_shift_permute_load_chain): Likewise.
19234 (vect_supportable_dr_alignment): Likewise.
19235 (dependence_distance_ge_vf): Take the vectorization factor as a
19236 poly_uint64 rather than an unsigned HOST_WIDE_INT.
19237 (vect_analyze_data_refs): Change min_vf from an int * to a
19239 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
19240 vfm1 as a poly_uint64 rather than an int. Make the same change
19241 for the returned bound_scalar.
19242 (vect_gen_vector_loop_niters): Handle polynomial vf.
19243 (vect_do_peeling): Likewise. Update call to
19244 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
19245 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
19247 * tree-vect-loop.c (vect_determine_vectorization_factor)
19248 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
19249 (vect_get_known_peeling_cost): Likewise.
19250 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
19251 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
19252 (vect_transform_loop): Likewise. Use the lowest possible VF when
19253 updating the upper bounds of the loop.
19254 (vect_min_worthwhile_factor): Make static. Return an unsigned int
19255 rather than an int.
19256 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
19257 polynomial unroll factors.
19258 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
19259 (vect_make_slp_decision): Likewise.
19260 (vect_supported_load_permutation_p): Likewise, and polynomial
19262 (vect_analyze_slp_cost): Handle polynomial vf.
19263 (vect_slp_analyze_node_operations): Likewise.
19264 (vect_slp_analyze_bb_1): Likewise.
19265 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19266 than an unsigned HOST_WIDE_INT.
19267 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
19268 (vectorizable_load): Handle polynomial vf.
19269 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
19271 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
19273 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19274 Alan Hayward <alan.hayward@arm.com>
19275 David Sherwood <david.sherwood@arm.com>
19277 * match.pd: Handle bit operations involving three constants
19278 and try to fold one pair.
19280 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19282 * tree-vect-loop-manip.c: Include gimple-fold.h.
19283 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
19284 niters_maybe_zero parameters. Handle other cases besides a step of 1.
19285 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
19286 Add a path that uses a step of VF instead of 1, but disable it
19288 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
19289 and niters_no_overflow parameters. Update calls to
19290 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
19291 Create a new SSA name if the latter choses to use a ste other
19292 than zero, and return it via niters_vector_mult_vf_var.
19293 * tree-vect-loop.c (vect_transform_loop): Update calls to
19294 vect_do_peeling, vect_gen_vector_loop_niters and
19295 slpeel_make_loop_iterate_ntimes.
19296 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
19297 (vect_gen_vector_loop_niters): Update declarations after above changes.
19299 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
19301 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
19302 128-bit round to integer instructions.
19303 (ceil<mode>2): Likewise.
19304 (btrunc<mode>2): Likewise.
19305 (round<mode>2): Likewise.
19307 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19309 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
19310 unaligned VSX load/store on P8/P9.
19311 (expand_block_clear): Allow the use of unaligned VSX
19312 load/store on P8/P9.
19314 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19316 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
19318 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
19319 swap associated with both a load and a store.
19321 2018-01-02 Andrew Waterman <andrew@sifive.com>
19323 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
19324 * config/riscv/riscv.md (clear_cache): Use it.
19326 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
19328 * web.c: Remove out-of-date comment.
19330 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19332 * expr.c (fixup_args_size_notes): Check that any existing
19333 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
19334 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
19335 (emit_single_push_insn): ...here.
19337 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19339 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
19340 (const_vector_encoded_nelts): New function.
19341 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
19342 (const_vector_int_elt, const_vector_elt): Declare.
19343 * emit-rtl.c (const_vector_int_elt_1): New function.
19344 (const_vector_elt): Likewise.
19345 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
19346 of CONST_VECTOR_ELT.
19348 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19350 * expr.c: Include rtx-vector-builder.h.
19351 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
19352 directly on the tree encoding.
19353 (const_vector_from_tree): Likewise.
19354 * optabs.c: Include rtx-vector-builder.h.
19355 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
19356 sequence of "u" values.
19357 * vec-perm-indices.c: Include rtx-vector-builder.h.
19358 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
19359 directly on the vec_perm_indices encoding.
19361 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19363 * doc/rtl.texi (const_vector): Describe new encoding scheme.
19364 * Makefile.in (OBJS): Add rtx-vector-builder.o.
19365 * rtx-vector-builder.h: New file.
19366 * rtx-vector-builder.c: Likewise.
19367 * rtl.h (rtx_def::u2): Add a const_vector field.
19368 (CONST_VECTOR_NPATTERNS): New macro.
19369 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
19370 (CONST_VECTOR_DUPLICATE_P): Likewise.
19371 (CONST_VECTOR_STEPPED_P): Likewise.
19372 (CONST_VECTOR_ENCODED_ELT): Likewise.
19373 (const_vec_duplicate_p): Check for a duplicated vector encoding.
19374 (unwrap_const_vec_duplicate): Likewise.
19375 (const_vec_series_p): Check for a non-duplicated vector encoding.
19376 Say that the function only returns true for integer vectors.
19377 * emit-rtl.c: Include rtx-vector-builder.h.
19378 (gen_const_vec_duplicate_1): Delete.
19379 (gen_const_vector): Call gen_const_vec_duplicate instead of
19380 gen_const_vec_duplicate_1.
19381 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
19382 (gen_const_vec_duplicate): Use rtx_vector_builder.
19383 (gen_const_vec_series): Likewise.
19384 (gen_rtx_CONST_VECTOR): Likewise.
19385 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
19386 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
19387 Build a new vector rather than modifying a CONST_VECTOR in-place.
19388 (handle_special_swappables): Update call accordingly.
19389 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
19390 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
19391 Build a new vector rather than modifying a CONST_VECTOR in-place.
19392 (handle_special_swappables): Update call accordingly.
19394 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19396 * simplify-rtx.c (simplify_const_binary_operation): Use
19397 CONST_VECTOR_ELT instead of XVECEXP.
19399 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19401 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
19402 the selector elements to be different from the data elements
19403 if the selector is a VECTOR_CST.
19404 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
19405 ssizetype for the selector.
19407 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19409 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
19410 before testing each element individually.
19411 * tree-vect-generic.c (lower_vec_perm): Likewise.
19413 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19415 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
19416 * selftest-run-tests.c (selftest::run_tests): Call it.
19417 * vector-builder.h (vector_builder::operator ==): New function.
19418 (vector_builder::operator !=): Likewise.
19419 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
19420 (vec_perm_indices::all_from_input_p): New function.
19421 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19422 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
19423 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
19424 instead of reading the VECTOR_CST directly. Detect whether both
19425 vector inputs are the same before constructing the vec_perm_indices,
19426 and update the number of inputs argument accordingly. Use the
19427 utility functions added above. Only construct sel2 if we need to.
19429 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19431 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
19432 the broadcast of the low byte.
19433 (expand_mult_highpart): Use an explicit encoding for the permutes.
19434 * optabs-query.c (can_mult_highpart_p): Likewise.
19435 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
19436 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19437 (vectorizable_bswap): Likewise.
19438 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
19439 explicit encoding for the power-of-2 permutes.
19440 (vect_permute_store_chain): Likewise.
19441 (vect_grouped_load_supported): Likewise.
19442 (vect_permute_load_chain): Likewise.
19444 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19446 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
19447 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
19448 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
19449 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19450 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
19451 (vect_gen_perm_mask_any): Likewise.
19453 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19455 * int-vector-builder.h: New file.
19456 * vec-perm-indices.h: Include int-vector-builder.h.
19457 (vec_perm_indices): Redefine as an int_vector_builder.
19458 (auto_vec_perm_indices): Delete.
19459 (vec_perm_builder): Redefine as a stand-alone class.
19460 (vec_perm_indices::vec_perm_indices): New function.
19461 (vec_perm_indices::clamp): Likewise.
19462 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
19463 (vec_perm_indices::new_vector): New function.
19464 (vec_perm_indices::new_expanded_vector): Update for new
19465 vec_perm_indices class.
19466 (vec_perm_indices::rotate_inputs): New function.
19467 (vec_perm_indices::all_in_range_p): Operate directly on the
19468 encoded form, without computing elided elements.
19469 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
19470 encoding. Update for new vec_perm_indices class.
19471 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
19472 the given vec_perm_builder.
19473 (expand_vec_perm_var): Update vec_perm_builder constructor.
19474 (expand_mult_highpart): Use vec_perm_builder instead of
19475 auto_vec_perm_indices.
19476 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
19477 vec_perm_indices instead of auto_vec_perm_indices. Use a single
19478 or double series encoding as appropriate.
19479 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
19480 vec_perm_indices instead of auto_vec_perm_indices.
19481 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19482 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19483 (vect_permute_store_chain): Likewise.
19484 (vect_grouped_load_supported): Likewise.
19485 (vect_permute_load_chain): Likewise.
19486 (vect_shift_permute_load_chain): Likewise.
19487 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19488 (vect_transform_slp_perm_load): Likewise.
19489 (vect_schedule_slp_instance): Likewise.
19490 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19491 (vectorizable_mask_load_store): Likewise.
19492 (vectorizable_bswap): Likewise.
19493 (vectorizable_store): Likewise.
19494 (vectorizable_load): Likewise.
19495 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
19496 vec_perm_indices instead of auto_vec_perm_indices. Use
19497 tree_to_vec_perm_builder to read the vector from a tree.
19498 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
19499 vec_perm_builder instead of a vec_perm_indices.
19500 (have_whole_vector_shift): Use vec_perm_builder and
19501 vec_perm_indices instead of auto_vec_perm_indices. Leave the
19502 truncation to calc_vec_perm_mask_for_shift.
19503 (vect_create_epilog_for_reduction): Likewise.
19504 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
19505 from auto_vec_perm_indices to vec_perm_indices.
19506 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19507 instead of changing individual elements.
19508 (aarch64_vectorize_vec_perm_const): Use new_vector to install
19509 the vector in d.perm.
19510 * config/arm/arm.c (expand_vec_perm_d::perm): Change
19511 from auto_vec_perm_indices to vec_perm_indices.
19512 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19513 instead of changing individual elements.
19514 (arm_vectorize_vec_perm_const): Use new_vector to install
19515 the vector in d.perm.
19516 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
19517 Update vec_perm_builder constructor.
19518 (rs6000_expand_interleave): Likewise.
19519 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
19520 (rs6000_expand_interleave): Likewise.
19522 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19524 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
19525 to qimode could truncate the indices.
19526 * optabs.c (expand_vec_perm_var): Likewise.
19528 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19530 * Makefile.in (OBJS): Add vec-perm-indices.o.
19531 * vec-perm-indices.h: New file.
19532 * vec-perm-indices.c: Likewise.
19533 * target.h (vec_perm_indices): Replace with a forward class
19535 (auto_vec_perm_indices): Move to vec-perm-indices.h.
19536 * optabs.h: Include vec-perm-indices.h.
19537 (expand_vec_perm): Delete.
19538 (selector_fits_mode_p, expand_vec_perm_var): Declare.
19539 (expand_vec_perm_const): Declare.
19540 * target.def (vec_perm_const_ok): Replace with...
19541 (vec_perm_const): ...this new hook.
19542 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
19543 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
19544 * doc/tm.texi: Regenerate.
19545 * optabs.def (vec_perm_const): Delete.
19546 * doc/md.texi (vec_perm_const): Likewise.
19547 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
19548 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
19549 expand_vec_perm for constant permutation vectors. Assert that
19550 the mode of variable permutation vectors is the integer equivalent
19551 of the mode that is being permuted.
19552 * optabs-query.h (selector_fits_mode_p): Declare.
19553 * optabs-query.c: Include vec-perm-indices.h.
19554 (selector_fits_mode_p): New function.
19555 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
19556 is defined, instead of checking whether the vec_perm_const_optab
19557 exists. Use targetm.vectorize.vec_perm_const instead of
19558 targetm.vectorize.vec_perm_const_ok. Check whether the indices
19559 fit in the vector mode before using a variable permute.
19560 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
19561 vec_perm_indices instead of an rtx.
19562 (expand_vec_perm): Replace with...
19563 (expand_vec_perm_const): ...this new function. Take the selector
19564 as a vec_perm_indices rather than an rtx. Also take the mode of
19565 the selector. Update call to shift_amt_for_vec_perm_mask.
19566 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
19567 Use vec_perm_indices::new_expanded_vector to expand the original
19568 selector into bytes. Check whether the indices fit in the vector
19569 mode before using a variable permute.
19570 (expand_vec_perm_var): Make global.
19571 (expand_mult_highpart): Use expand_vec_perm_const.
19572 * fold-const.c: Includes vec-perm-indices.h.
19573 * tree-ssa-forwprop.c: Likewise.
19574 * tree-vect-data-refs.c: Likewise.
19575 * tree-vect-generic.c: Likewise.
19576 * tree-vect-loop.c: Likewise.
19577 * tree-vect-slp.c: Likewise.
19578 * tree-vect-stmts.c: Likewise.
19579 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
19581 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
19582 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
19583 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
19584 (aarch64_vectorize_vec_perm_const): ...this new function.
19585 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19586 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19587 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
19588 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
19589 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19590 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19591 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
19593 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
19594 check for NEON modes.
19595 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
19596 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
19597 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
19598 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
19600 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
19601 the old VEC_PERM_CONST conditions.
19602 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
19603 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
19604 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
19605 (ia64_vectorize_vec_perm_const_ok): Merge into...
19606 (ia64_vectorize_vec_perm_const): ...this new function.
19607 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
19608 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
19609 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
19610 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
19611 * config/mips/mips.c (mips_expand_vec_perm_const)
19612 (mips_vectorize_vec_perm_const_ok): Merge into...
19613 (mips_vectorize_vec_perm_const): ...this new function.
19614 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
19615 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
19616 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
19617 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
19618 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
19619 (rs6000_expand_vec_perm_const): Delete.
19620 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
19622 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19623 (altivec_expand_vec_perm_const_le): Take each operand individually.
19624 Operate on constant selectors rather than rtxes.
19625 (altivec_expand_vec_perm_const): Likewise. Update call to
19626 altivec_expand_vec_perm_const_le.
19627 (rs6000_expand_vec_perm_const): Delete.
19628 (rs6000_vectorize_vec_perm_const_ok): Delete.
19629 (rs6000_vectorize_vec_perm_const): New function.
19630 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19631 an element count and rtx array.
19632 (rs6000_expand_extract_even): Update call accordingly.
19633 (rs6000_expand_interleave): Likewise.
19634 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
19635 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
19636 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
19637 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
19638 (rs6000_expand_vec_perm_const): Delete.
19639 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19640 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19641 (altivec_expand_vec_perm_const_le): Take each operand individually.
19642 Operate on constant selectors rather than rtxes.
19643 (altivec_expand_vec_perm_const): Likewise. Update call to
19644 altivec_expand_vec_perm_const_le.
19645 (rs6000_expand_vec_perm_const): Delete.
19646 (rs6000_vectorize_vec_perm_const_ok): Delete.
19647 (rs6000_vectorize_vec_perm_const): New function. Remove stray
19648 reference to the SPE evmerge intructions.
19649 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19650 an element count and rtx array.
19651 (rs6000_expand_extract_even): Update call accordingly.
19652 (rs6000_expand_interleave): Likewise.
19653 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
19654 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
19656 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19658 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19660 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
19661 vector mode and that that mode matches the mode of the data
19663 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
19664 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
19665 directly using expand_vec_perm_1 when forcing selectors into
19667 (expand_vec_perm_var): New function, split out from expand_vec_perm.
19669 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19671 * optabs-query.h (can_vec_perm_p): Delete.
19672 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
19673 * optabs-query.c (can_vec_perm_p): Split into...
19674 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
19675 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
19676 particular selector is valid.
19677 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19678 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19679 (vect_grouped_load_supported): Likewise.
19680 (vect_shift_permute_load_chain): Likewise.
19681 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19682 (vect_transform_slp_perm_load): Likewise.
19683 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19684 (vectorizable_bswap): Likewise.
19685 (vect_gen_perm_mask_checked): Likewise.
19686 * fold-const.c (fold_ternary_loc): Likewise. Don't take
19687 implementations of variable permutation vectors into account
19688 when deciding which selector to use.
19689 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
19690 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
19691 with a false third argument.
19692 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
19693 to test whether the constant selector is valid and can_vec_perm_var_p
19694 to test whether a variable selector is valid.
19696 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19698 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
19699 * optabs-query.c (can_vec_perm_p): Likewise.
19700 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
19701 instead of vec_perm_indices.
19702 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
19703 (vect_gen_perm_mask_checked): Likewise,
19704 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
19705 (vect_gen_perm_mask_checked): Likewise,
19707 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19709 * optabs-query.h (qimode_for_vec_perm): Declare.
19710 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
19711 (qimode_for_vec_perm): ...this new function.
19712 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
19714 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19716 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
19717 does not have a conditional at the top.
19719 2018-01-02 Richard Biener <rguenther@suse.de>
19721 * ipa-inline.c (big_speedup_p): Fix expression.
19723 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
19726 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
19729 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
19733 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
19734 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
19735 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
19736 cond_taken_branch_cost 3->4.
19738 2018-01-01 Jakub Jelinek <jakub@redhat.com>
19740 PR tree-optimization/83581
19741 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
19742 TODO_cleanup_cfg if any changes have been made.
19744 PR middle-end/83608
19745 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
19746 convert_modes if target mode has the right side, but different mode
19749 PR middle-end/83609
19750 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
19751 last argument when extracting from CONCAT. If either from_real or
19752 from_imag is NULL, use expansion through memory. If result is not
19753 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
19754 the parts directly to inner mode, if even that fails, use expansion
19757 PR middle-end/83623
19758 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
19759 check for bswap in mode rather than HImode and use that in expand_unop
19762 Copyright (C) 2018 Free Software Foundation, Inc.
19764 Copying and distribution of this file, with or without modification,
19765 are permitted in any medium without royalty provided the copyright
19766 notice and this notice are preserved.