[Ada] Argument_String_To_List creates empty items from whitespace
[gcc.git] / gcc / ChangeLog
1 2018-07-17 Jakub Jelinek <jakub@redhat.com>
2
3 PR middle-end/86539
4 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5 and cond temporaries don't have reference type if iterator has
6 pointer type. For init use &for_pre_body instead of pre_p if
7 for_pre_body is non-empty.
8
9 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10
11 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
12 double-double modes to SFmode directly directly.
13 (trunc<mode>sf2_fprs): Delete.
14
15 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
16
17 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
18 for conversions between IFmode and the decimal floating point modes.
19 (init_float128_ieee): Use the correct names for conversions between
20 KFmode and the decimal floating point modes.
21
22 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
23
24 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
25 for the conversions between TDmode and IFmode.
26 (init_float128_ieee): Use more correct names for the conversions
27 between TDmode and KFmode.
28
29 2018-07-16 Jakub Jelinek <jakub@redhat.com>
30
31 PR tree-optimization/86526
32 * builtins.c (expand_builtin_memcmp): Formatting fixes.
33 (inline_expand_builtin_string_cmp): Likewise.
34 (inline_string_cmp): Likewise. Use c_readstr instead of
35 builtin_memcpy_read_str. Add unit_mode temporary.
36
37 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
38
39 PR middle-end/86528
40 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
41 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
42
43 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
44
45 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
46 Alphabetize prototypes of built-in functions, separating out
47 built-in functions that are listed in this section but should be
48 described elsewhere.
49
50 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
51
52 PR target/86511
53 * expmed.c (emit_store_flag): Do not emit setcc followed by a
54 conditional move when trapping comparison was split to a
55 non-trapping one (and vice versa).
56
57 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
58
59 * config/s390/s390.c (s390_function_profiler): Generate nops
60 instead of profiler call sequences.
61 * config/s390/s390.opt: Add the new option.
62
63 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
64
65 * config/s390/s390.c (s390_function_profiler): Generate
66 __mcount_loc section.
67 * config/s390/s390.opt: Add the new option.
68
69 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
70
71 * common.opt: Add the new warning.
72 * config/s390/s390.c (s390_function_profiler): Emit "brasl
73 %r0,__fentry__" when -mfentry is specified.
74 (s390_option_override_internal): Disallow -mfentry for 31-bit
75 CPUs.
76 * config/s390/s390.opt: Add the new option.
77
78 2018-07-16 Richard Biener <rguenther@suse.de>
79
80 PR lto/86523
81 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
82 for function-local FUNCTION_DECL and RESULT_DECL immediately.
83
84 2018-07-16 Martin Liska <mliska@suse.cz>
85
86 PR ipa/86529
87 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
88 to ::get_create.
89
90 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
91
92 * config/arc/arcHS.md: Update ARCHS scheduling rules.
93
94 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
95
96 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
97 for ARCHS4x.
98 * config/arc/arc-cpus.def (hs4x): New cpu.
99 (hs4xd): Likewise.
100 * config/arc/arc-tables.opt: Regenerate.
101 * config/arc/arc.c (arc_sched_issue_rate): New function.
102 (TARGET_SCHED_ISSUE_RATE): Define.
103 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
104 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
105 fpu_cvt.
106 (attr tune): Add ARCHS4x tune values.
107 (attr tune_dspmpy): Define.
108 (*tst): Correct instruction type.
109 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
110 * config/arc/arcHS4x.md: New file.
111 * config/arc/fpu.md: Update instruction type attributes.
112 * config/arc/t-multilib: Regenerate.
113
114 2018-07-16 Tom de Vries <tdevries@suse.de>
115
116 PR debug/86455
117 * var-tracking.c (vt_initialize): Fix pre_dec handling.
118
119 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
120
121 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
122 early clobber.
123
124 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
125
126 PR tree-optimization/86514
127 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
128 conversion to a boolean type from a type with greater precision.
129
130 2018-07-16 Tom de Vries <tdevries@suse.de>
131
132 * var-tracking.c (vt_initialize): Print adjusted insn slim if
133 dump_flags request TDF_SLIM.
134
135 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
136
137 * fold-const.c (int_const_binop_1): Abstract...
138 (wide_int_binop): ...wide int code here.
139 (poly_int_binop): ...poly int code here.
140 Abstract the rest of int_const_binop_1 into int_const_binop.
141 * fold-const.h (wide_int_binop): New.
142 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
143 Remove useless PLUS/MINUS_EXPR case.
144 (zero_nonzero_bits_from_vr): Move wide int code...
145 (zero_nonzero_bits_from_bounds): ...here.
146 (extract_range_from_binary_expr_1): Move mask optimization code...
147 (range_easy_mask_min_max): ...here.
148 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
149 (range_easy_mask_min_max): New.
150
151 2018-07-15 Jeff Law <law@redhat.com>
152
153 PR target/85993
154 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
155 block.
156
157 2018-07-14 Jim Wilson <jimw@sifive.com>
158
159 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
160
161 2018-07-14 Paul Koning <ni1d@arrl.net>
162
163 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
164
165 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
166
167 * lto-streamer-out.c (copy_function_or_variable): Dump info about
168 copying section.
169
170 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
171 Steve Munroe <munroesj52@gmail.com>
172
173 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
174 (_mm_andnot_si128): Likewise.
175 (_mm_or_si128): Likewise.
176 (_mm_xor_si128): Likewise.
177
178 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
179
180 PR middle-end/78809
181 * builtins.c (expand_builtin_memcmp): Inline the calls first
182 when result_eq is false.
183 (expand_builtin_strcmp): Inline the calls first.
184 (expand_builtin_strncmp): Likewise.
185 (inline_string_cmp): New routine. Expand a string compare
186 call by using a sequence of char comparison.
187 (inline_expand_builtin_string_cmp): New routine. Inline expansion
188 a call to str(n)cmp/memcmp.
189 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
190 New option.
191 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
192
193 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
194
195 * config/arm/driver-arm.c: Include arm-native.h.
196 (host_detect_local_cpu): Use auto-generated data tables.
197 (vendors, arm_cpu_table): Delete. Move part information to ...
198 * config/arm/arm-cpus.in: ... here.
199 * config/arm/parsecpu.awk (gen_native): New function.
200 (vendor, part): New CPU fields.
201 (END): Add support for building the native CPU detection tables.
202 * config/arm/t-arm (arm-native.h): Add build rule.
203 (driver-arm.o): Add dependency on arm-native.h.
204
205 2018-07-13 Richard Biener <rguenther@suse.de>
206
207 PR middle-end/85974
208 * match.pd (addr1 - addr2): Allow either of the operand to
209 have a conversion.
210
211 2018-07-13 Tom de Vries <tdevries@suse.de>
212
213 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
214 in remap_ssa_name.
215
216 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
217
218 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
219 arrays instead of numbered variables.
220
221 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
222
223 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
224 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
225
226 2018-07-13 Richard Biener <rguenther@suse.de>
227
228 PR debug/86452
229 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
230 instead of get_context_die.
231
232 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
233 Richard Biener <rguenther@suse.de>
234
235 PR middle-end/86489
236 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
237 that the loop latch destination where phi is defined.
238
239 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
240
241 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
242 (riscv_expand_epilogue): Add assertion to check interrupt mode.
243 (riscv_set_current_function): Extract getting interrupt type to new
244 function.
245 (riscv_get_interrupt_type): New function.
246 (riscv_merge_decl_attributes): New function, checking interrupt type is
247 same.
248 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
249
250 2018-07-12 Paul Koning <ni1d@arrl.net>
251
252 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
253 directive.
254
255 2018-07-12 Paul Koning <ni1d@arrl.net>
256
257 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
258 zero reference, add doloop_end instead.
259 * doc/md.texi (decrement_and_branch_until_zero): Remove.
260 (Looping patterns): Remove decrement_and_branch_until_zero. Add
261 detail for doloop_end.
262
263 2018-07-12 Martin Sebor <msebor@redhat.com>
264
265 PR c/86453
266 * attribs.c (decl_attributes): Reject conflicting attributes before
267 calling attribute handlers.
268
269 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
270
271 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
272 parameter.
273 (gcc::dump_manager::get_dump_file_name): likewise.
274 (dump_begin): Likewise.
275 * dumpfile.h (dump_begin): Update prototype.
276 (gcc::dump_manager::get_dump_file_name,
277 gcc::dump_manager::get_dump_file_name): Update prototype.
278
279 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
280
281 * internal-fn.h (vectorizable_internal_fn_p): New function.
282 * tree-vect-slp.c (compatible_calls_p): Likewise.
283 (vect_build_slp_tree_1): Remove nops argument. Handle calls
284 to internal functions.
285 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
286
287 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
288
289 * fold-const.h (inverse_conditions_p): Declare.
290 * fold-const.c (inverse_conditions_p): New function.
291 * match.pd: Use inverse_conditions_p. Add folds of view_converts
292 that test the inverse condition of a conditional internal function.
293 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
294 * internal-fn.c (internal_fn_mask_index): Handle conditional
295 internal functions.
296 (vectorized_internal_fn_supported_p): New function.
297 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
298 (any_pred_load_store): Replace with...
299 (need_to_predicate): ...this new variable.
300 (redundant_ssa_names): New variable.
301 (ifcvt_can_use_mask_load_store): Move initial checks to...
302 (ifcvt_can_predicate): ...this new function. Handle tree codes
303 for which a conditional internal function exists.
304 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
305 instead of ifcvt_can_use_mask_load_store. Update after variable
306 name change.
307 (predicate_load_or_store): New function, split out from
308 predicate_mem_writes.
309 (check_redundant_cond_expr): New function.
310 (value_available_p): Likewise.
311 (predicate_rhs_code): Likewise.
312 (predicate_mem_writes): Rename to...
313 (predicate_statements): ...this. Use predicate_load_or_store
314 and predicate_rhs_code.
315 (combine_blocks, tree_if_conversion): Update after above name changes.
316 (ifcvt_local_dce): Handle redundant_ssa_names.
317 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
318 general conditional functions.
319 * tree-vect-stmts.c (vectorizable_call): Likewise.
320
321 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
322 Alan Hayward <alan.hayward@arm.com>
323 David Sherwood <david.sherwood@arm.com>
324
325 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
326 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
327 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
328 plus and minus and convert them into IFN_COND_FMA-based sequences.
329 (convert_mult_to_fma): Handle conditional plus and minus.
330
331 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
332
333 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
334 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
335 (cond_fnms_optab): New optabs.
336 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
337 internal functions.
338 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
339 * internal-fn.h (get_conditional_internal_fn): Declare.
340 (get_unconditional_internal_fn): Likewise.
341 * internal-fn.c (cond_ternary_direct): New macro.
342 (expand_cond_ternary_optab_fn): Likewise.
343 (direct_cond_ternary_optab_supported_p): Likewise.
344 (FOR_EACH_COND_FN_PAIR): Likewise.
345 (get_conditional_internal_fn): New function.
346 (get_unconditional_internal_fn): Likewise.
347 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
348 (gimple_match_op::gimple_match_op): Add a new overload for 5
349 operands.
350 (gimple_match_op::set_op): Likewise.
351 (gimple_resimplify5): Declare.
352 * genmatch.c (decision_tree::gen): Generate simplifications for
353 5 operands.
354 * gimple-match-head.c (gimple_simplify): Define an overload for
355 5 operands. Handle calls with 5 arguments in the top-level overload.
356 (convert_conditional_op): Handle conversions from unconditional
357 internal functions to conditional ones.
358 (gimple_resimplify5): New function.
359 (build_call_internal): Pass a fifth operand.
360 (maybe_push_res_to_seq): Likewise.
361 (try_conditional_simplification): Try converting conditional
362 internal functions to unconditional internal functions.
363 Handle 3-operand unconditional forms.
364 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
365 Define ternary equivalents of the current rules for binary conditional
366 internal functions.
367 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
368 ternary operations.
369 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
370 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
371 (optab): Handle them.
372 (SVE_COND_FP_TERNARY): New int iterator.
373 (sve_fmla_op, sve_fmad_op): New int attributes.
374 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
375 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
376 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
377
378 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
379
380 * target.def (preferred_else_value): New target hook.
381 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
382 * doc/tm.texi: Regenerate.
383 * targhooks.h (default_preferred_else_value): Declare.
384 * targhooks.c (default_preferred_else_value): New function.
385 * internal-fn.h (conditional_internal_fn_code): Declare.
386 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
387 (get_conditional_internal_fn): Use it.
388 (conditional_internal_fn_code): New function.
389 * gimple-match.h (gimple_match_cond): New struct.
390 (gimple_match_op): Add a cond member function.
391 (gimple_match_op::gimple_match_op): Update all forms to take a
392 gimple_match_cond.
393 * genmatch.c (expr::gen_transform): Use the same condition as res_op
394 for the suboperation, but don't specify a particular else_value.
395 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
396 (visit_nary_op, visit_reference_op_load): Pass
397 gimple_match_cond::UNCOND to the gimple_match_op constructor.
398 * gimple-match-head.c: Include tree-eh.h
399 (convert_conditional_op): New function.
400 (maybe_resimplify_conditional_op): Likewise.
401 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
402 (gimple_resimplify2): Likewise.
403 (gimple_resimplify3): Likewise.
404 (gimple_resimplify4): Likewise.
405 (maybe_push_res_to_seq): Return null for conditional operations.
406 (try_conditional_simplification): New function.
407 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
408 constructor.
409 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
410 IFN_COND_* call.
411 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
412 function.
413 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
414
415 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
416
417 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
418 DECL_FCONTEXT
419 (hash_tree): Do not hash DECL_FCONTEXT
420 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
421 Do not stream DECL_FCONTEXT.
422 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
423 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
424
425 2018-07-12 Richard Biener <rguenther@suse.de>
426
427 PR debug/86462
428 * dwarf2out.c (gen_block_die): Only output blocks when they have
429 at least one !DECL_IGNORED_P variable.
430
431 2018-07-12 Richard Biener <rguenther@suse.de>
432
433 PR target/84829
434 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
435 Remove -mieee-fp handling.
436
437 2018-07-12 Richard Biener <rguenther@suse.de>
438
439 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
440 left-over from last patch.
441
442 2018-07-12 Jakub Jelinek <jakub@redhat.com>
443
444 PR tree-optimization/86492
445 * gimple-ssa-store-merging.c
446 (imm_store_chain_info::coalesce_immediate_stores): Call
447 check_no_overlap even for the merge_overlapping case. Formatting fix.
448
449 2018-07-12 Richard Biener <rguenther@suse.de>
450
451 PR middle-end/86479
452 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
453 move possibly trapping operations into the conditional.
454
455 2018-07-12 Richard Biener <rguenther@suse.de>
456
457 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
458 (vn_lookup_simplify_result): Remove recursion limit applied
459 here.
460 (vn_nary_build_or_lookup_1): Adjust.
461 (try_to_simplify): Likewise.
462 * gimple-match-head.c (gimple_resimplify1): Instead apply one
463 here.
464 (gimple_resimplify2): Likewise.
465 (gimple_resimplify3): Likewise.
466 (gimple_resimplify4): Likewise.
467
468 2018-07-11 Jakub Jelinek <jakub@redhat.com>
469
470 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
471 Use __mmask64 type instead of __mmask8 for __M argument.
472 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
473 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
474 __U argument.
475 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
476 __mmask16 for __M argument.
477 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
478 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
479 to __mmask16 instead of __mmask8.
480 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
481 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
482 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
483 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
484 instead of __mmask16 for __U argument.
485 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
486 __mmask16 instead of __mmask8 for __U argument.
487 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
488 __U argument.
489 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
490 __mmask16.
491 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
492 argument.
493 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
494 __U argument.
495 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
496 __mmask16.
497 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
498 of __mmask16.
499 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
500 __U argument.
501 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
502 __U argument.
503 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
504 __U argument.
505 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
506 __U argument.
507 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
508 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
509 return type as well as __M argument type and all casts from __mmask8
510 to __mmask32.
511 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
512 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
513 return type as well as __M argument type and all casts from __mmask8
514 to __mmask16.
515 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
516 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
517 return type as well as __M argument type and all casts from __mmask8
518 to __mmask32.
519 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
520 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
521 return type as well as __M argument type and all casts from __mmask8
522 to __mmask16.
523 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
524 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
525 __mmask16.
526
527 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
528
529 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
530 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
531 for __U argument.
532
533 2018-07-11 Paul Koning <ni1d@arrl.net>
534
535 * doc/md.texi (define_subst): Document how multiple occurrences of
536 the same argument in the replacement pattern are handled.
537
538 2018-07-11 Paul Koning <ni1d@arrl.net>
539
540 * doc/extend.texi (Common Variable Attributes): Move "mode" into
541 alphabetical order.
542 (Common Type Attributes): Add "mode" attribute.
543
544 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
545
546 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
547 stream DECL_ORIGINAL_TYPE.
548 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
549 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
550 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
551 Do not walk original type.
552 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
553 external decls.
554 (write_ts_decl_non_common_tree_pointers): Do not stream
555 DECL_ORIGINAL_TYPE
556 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
557 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
558
559 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
560
561 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
562 thread twice from the same starting edge.
563
564 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
565
566 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
567 * gimple.c (gimple_call_nonnull_result_p): ...here...
568 (gimple_call_nonnull_arg): ...and here.
569 * gimple.h (gimple_call_nonnull_result_p): New.
570 (gimple_call_nonnull_arg): New.
571
572 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
573
574 * config/arm/arm-cpus.in: Move information from fpu field of each
575 cpu definition to the isa field.
576 * config/arm/parsecpu.awk (fpu): Delete match rule.
577 (gen_comm_data): Don't add bits from the CPU's FPU entry.
578
579 2018-07-11 Richard Biener <rguenther@suse.de>
580
581 PR debug/86457
582 * dwarf2out.c (init_sections_and_labels): Use
583 output_asm_line_debug_info consistently.
584 (dwarf2out_early_finish): Likewise.
585 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
586 type units.
587
588 2018-07-11 Richard Biener <rguenther@suse.de>
589
590 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
591 Rework father_bb setting in a way to avoid propagating constants
592 multiple times on a loop body.
593
594 2018-07-10 Mark Wielaard <mark@klomp.org>
595
596 PR debug/86459
597 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
598
599 2018-07-10 Richard Biener <rguenther@suse.de>
600
601 * hash-map.h (hash_map::iterator::operator*): Return
602 references to key and value.
603
604 2018-07-10 Jakub Jelinek <jakub@redhat.com>
605
606 PR c++/86443
607 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
608 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
609 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
610 (gimplify_omp_for): For composite loops, move outer
611 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
612 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
613 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
614 TREE_LIST for both the original class iterator and the "last" helper
615 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
616 loop, remember has_decl_expr from outer composite loops for the
617 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
618
619 2018-07-09 Martin Sebor <msebor@redhat.com>
620
621 PR middle-end/77357
622 PR middle-end/86428
623 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
624 accessing implicitly initialized array elements.
625 * expr.c (string_constant): Handle string initializers of
626 character arrays within aggregates.
627 * gimple-fold.c (fold_array_ctor_reference): Add argument.
628 Store element offset. As a special case, handle zero size.
629 (fold_nonarray_ctor_reference): Same.
630 (fold_ctor_reference): Add argument. Store subobject offset.
631 * gimple-fold.h (fold_ctor_reference): Add argument.
632
633 2018-07-09 Paul Koning <ni1d@arrl.net>
634
635 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
636 (pdp11_insn_cost): New function.
637 (pdp11_md_asm_adjust): New function.
638 (TARGET_INVALID_WITHIN_DOLOOP): Define.
639 (pdp11_rtx_costs): Update to match machine better.
640 (output_addr_const_pdp11): Correct format mismatch warnings.
641 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
642 * config/pdp11/pdp11.md: General change to add base_cost and/or
643 length attributes for use by new pdp11_insn_cost function.
644 (MIN_BRANCH): Correct definition.
645 (MIN_SOB): Ditto.
646 (doloop_end): Use standard pattern name for looping pattern.
647 (doloop_end_nocc): New.
648 (movsf): Add another constraint alternative.
649 (zero_extendqihi2): Add constraint alternatives for not in place
650 extend.
651 (zero_extendhisi2): Remove.
652 (shift patterns): Add CC handling variants.
653 (bswaphi2): New.
654 (bswapsi2): New.
655 (rothi3): New.
656 (define_peephole2): New peephole to recognize mov that sets CC for
657 subsequent test.
658
659 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
660
661 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
662 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
663 wi::add.
664
665 2018-07-09 Jakub Jelinek <jakub@redhat.com>
666
667 PR c/86420
668 * real.c (real_nextafter): Return true if result is denormal.
669
670 2018-07-09 Martin Liska <mliska@suse.cz>
671
672 * common.opt: Add back wrongly removed attribute.
673
674 2018-07-09 Richard Biener <rguenther@suse.de>
675
676 PR debug/86413
677 * dwarf2out.c (gen_block_die): For an early generated DIE
678 always output high/low PC attributes.
679
680 2018-07-09 Tom de Vries <tdevries@suse.de>
681
682 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
683 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
684 onto VAR_DECL with abstract origin.
685
686 2018-07-07 Jim Wilson <jimw@sifive.com>
687
688 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
689
690 2018-07-07 Tom de Vries <tdevries@suse.de>
691
692 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
693
694 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
695
696 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
697 overflow_type.
698 (combine_bound): Use wide-int overflow calculation instead of
699 rolling our own.
700 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
701 overflow_type.
702 * fold-const.c (int_const_binop_2): Same.
703 (extract_muldiv_1): Same.
704 (fold_div_compare): Same.
705 (fold_abs_const): Same.
706 * match.pd: Same.
707 * poly-int.h (add): Same.
708 (sub): Same.
709 (neg): Same.
710 (mul): Same.
711 * predict.c (predict_iv_comparison): Same.
712 * profile-count.c (slow_safe_scale_64bit): Same.
713 * simplify-rtx.c (simplify_const_binary_operation): Same.
714 * tree-chrec.c (tree_fold_binomial): Same.
715 * tree-data-ref.c (split_constant_offset_1): Same.
716 * tree-if-conv.c (idx_within_array_bound): Same.
717 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
718 * tree-ssa-phiopt.c (minmax_replacement): Same.
719 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
720 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
721 * vr-values.c (vr_values::adjust_range_with_scev): Same.
722 * wide-int.cc (wi::add_large): Same.
723 (wi::mul_internal): Same.
724 (wi::sub_large): Same.
725 (wi::divmod_internal): Same.
726 * wide-int.h: Change overflow type to overflow_type for neg, add,
727 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
728 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
729 mul_internal, divmod_internal.
730 (overflow_type): New enum.
731 (accumulate_overflow): New.
732
733 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
734
735 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
736 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
737
738 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
739
740 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
741 argument is checked for zero before entering loop, avoid checking again.
742
743 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
744
745 * gimplify.h (generic_expr_could_trap_p): Set as global function.
746 * gimplify.h (generic_expr_could_trap_p): Likwise.
747 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
748
749 2018-07-06 Jakub Jelinek <jakub@redhat.com>
750
751 PR tree-optimization/86401
752 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
753 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
754 (fold_bit_and_mask): ... here. New helper function for match.pd.
755 * fold-const.h (fold_bit_and_mask): Declare.
756 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
757
758 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
759
760 PR target/86324
761 * target.def (translate_mode_attribute): New hook.
762 * targhooks.h (default_translate_mode_attribute): Declare.
763 * targhooks.c (default_translate_mode_attribute): New function.
764 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
765 * doc/tm.texi: Regenerate.
766 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
767 (rs6000_translate_mode_attribute): New function.
768
769 2018-07-06 Paul Koning <ni1d@arrl.net>
770
771 * doc/md.texi (define_split): Document DONE and FAIL.
772 (define_peephole2): Ditto.
773
774 2018-07-05 Jeff Law <law@redhat.com>
775
776 PR tree-optimization/86010
777 * tree-ssa-dse.c (compute_trims): More aggressively trim at
778 both the head and tail of mem* and str* calls.
779
780 2018-07-05 Jim Wilson <jimw@sifive.com>
781
782 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
783
784 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
785
786 * config/aarch64/aarch64-simd.md: correct flags text for
787 MIN_EXPR replacement.
788
789 2018-07-05 James Clarke <jrtc27@jrtc27.com>
790
791 * configure: Regenerated.
792
793 2018-07-05 Carl Love <cel@us.ibm.com>
794
795 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
796 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
797 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
798 VSX_BUILTIN_DOUBLEL_V4SF.
799
800 2018-07-05 Martin Sebor <msebor@redhat.com>
801
802 PR c++/86400
803 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
804 than its domain to compute its the upper bound of a char array.
805
806 2018-07-05 Nathan Sidwell <nathan@acm.org>
807
808 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
809 * doc/cpp.texi: Update comment.
810 * doc/tm.texi: Rebuilt.
811 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
812 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
813 * doc/extend.texi (Backwards Compatibility): Clarify it is system
814 headers affected by extern "C".
815 * system.h: Poison NO_IMPLICIT_EXTERN_C.
816 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
817 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
818 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
819 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
820 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
821 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
822 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
823 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
824 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
825 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
826 config/sparc/sp64-elf.h, config/spu/spu.h,
827 config/stormy16/stormy16.h, config/v850/v850.h,
828 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
829 define NO_IMPLICIT_EXTERN_C.
830 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
831
832 2018-07-05 Tamar Christina <tamar.christina@arm.com>
833
834 PR target/84711
835 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
836 instead of GET_MODE_SIZE when comparing Units.
837
838 2018-07-05 Tamar Christina <tamar.christina@arm.com>
839
840 PR target/84711
841 * rtlanal.c (set_noop_p): Constrain on mode change,
842 include hard-reg-set.h
843
844 2018-07-05 Tamar Christina <tamar.christina@arm.com>
845
846 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
847
848 2018-07-05 Jakub Jelinek <jakub@redhat.com>
849
850 Revert
851 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
852
853 PR sanitizer/84250
854 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
855 libasan.
856 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
857
858 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
859
860 PR sanitizer/84250
861 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
862 libasan.
863 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
864
865 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
866
867 PR middle-end/86380
868 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
869
870 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
871
872 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
873 neg_*_op* variables.
874
875 2018-07-04 Martin Liska <mliska@suse.cz>
876
877 * tree-switch-conversion.c: Define
878 max_ratio_for_speed and max_ratio_for_size constants.
879
880 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
881 Martin Liska <mliska@suse.cz>
882
883 PR middle-end/66240
884 PR target/45996
885 PR c/84100
886 * common.opt: Rename align options with 'str_' prefix.
887 * common/config/i386/i386-common.c (set_malign_value): New
888 function.
889 (ix86_handle_option): Use it to set -falign-* options/
890 * config/aarch64/aarch64-protos.h (struct tune_params): Change
891 type from int to string.
892 * config/aarch64/aarch64.c: Update default values from int
893 to string.
894 * config/alpha/alpha.c (alpha_override_options_after_change):
895 Likewise.
896 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
897 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
898 max skip conditionally.
899 * config/i386/freebsd.h (SUBALIGN_LOG): New.
900 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
901 max skip conditionally.
902 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
903 max skip conditionally.
904 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
905 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
906 max skip conditionally.
907 * config/i386/i386.c (struct ptt): Change type from int to
908 string.
909 (ix86_default_align): Set default values.
910 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
911 max skip conditionally.
912 * config/i386/iamcu.h (SUBALIGN_LOG): New.
913 (ASM_OUTPUT_MAX_SKIP_ALIGN):
914 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
915 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
916 max skip conditionally.
917 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
918 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
919 * config/i386/x86-64.h (SUBALIGN_LOG): New.
920 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
921 max skip conditionally.
922 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
923 * config/ia64/ia64.c (ia64_option_override): Set default values
924 for alignment options.
925 * config/m68k/m68k.c: Handle new str_align_* options.
926 * config/mips/mips.c (mips_set_compression_mode): Change
927 type of constants.
928 (mips_option_override): Set default values for options.
929 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
930 Likewise.
931 * config/rs6000/rs6000.c (rs6000_option_override_internal):
932 Likewise.
933 * config/rx/rx.c (rx_option_override): Likewise.
934 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
935 (LABEL_ALIGN): Use align_labels_log.
936 (LOOP_ALIGN): Use align_loops_align.
937 * config/s390/s390.c (s390_asm_output_function_label): Use new
938 macros.
939 * config/sh/sh.c (sh_override_options_after_change):
940 Change type of constants.
941 * config/spu/spu.c (spu_sched_init): Likewise.
942 * config/sparc/sparc.c (sparc_option_override): Set default
943 values for options.
944 * config/visium/visium.c (visium_option_override): Likewise.
945 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
946 emit p2align format with last argument if it's not needed.
947 * doc/invoke.texi: Document extended format of -falign-*.
948 * final.c: Use align_labels alignment.
949 * flags.h (struct target_flag_state): Change type to use
950 align_flags.
951 (struct align_flags_tuple): New.
952 (struct align_flags): Likewise.
953 (align_loops_log): Redefine macro to use new types.
954 (align_loops_max_skip): Redefine macro to use new types.
955 (align_jumps_log): Redefine macro to use new types.
956 (align_jumps_max_skip): Redefine macro to use new types.
957 (align_labels_log): Redefine macro to use new types.
958 (align_labels_max_skip): Redefine macro to use new types.
959 (align_functions_log): Redefine macro to use new types.
960 (align_loops): Redefine macro to use new types.
961 (align_jumps): Redefine macro to use new types.
962 (align_labels): Redefine macro to use new types.
963 (align_functions): Redefine macro to use new types.
964 (align_functions_max_skip): Redefine macro to use new types.
965 (align_loops_value): New macro.
966 (align_jumps_value): New macro.
967 (align_labels_value): New macro.
968 (align_functions_value): New macro.
969 * function.c (invoke_set_current_function_hook): Propagate
970 alignment values from flags to global variables default in
971 topleev.h.
972 * ipa-icf.c (sem_function::equals_wpa): Use
973 cl_optimization_option_eq instead of memcmp.
974 * lto-streamer.h (cl_optimization_stream_out): Support streaming
975 of string types.
976 (cl_optimization_stream_in): Likewise.
977 * optc-save-gen.awk: Support strings in cl_optimization.
978 * opth-gen.awk: Likewise.
979 * opts.c (finish_options): Remove error checking of invalid
980 value ranges.
981 (MAX_CODE_ALIGN): Remove.
982 (MAX_CODE_ALIGN_VALUE): Likewise.
983 (parse_and_check_align_values): New function.
984 (check_alignment_argument): Likewise.
985 (common_handle_option): Use check_alignment_argument.
986 * opts.h (parse_and_check_align_values): Declare.
987 * toplev.c (init_alignments): Remove.
988 (read_log_maxskip): New.
989 (parse_N_M): Likewise.
990 (parse_alignment_opts): Likewise.
991 (backend_init_target): Remove usage of init_alignments.
992 * toplev.h (parse_alignment_opts): Declare.
993 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
994 argument.
995 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
996 * tree.c (cl_option_hasher::equal): New.
997 * varasm.c: Use new global macros.
998
999 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
1000
1001 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
1002 Use a simpler align directive also if MAXSKIP = ALIGN-1.
1003 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1004 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1005 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1006 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1007 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
1008 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
1009 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
1010 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1011 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1012 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1013 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1014
1015 2018-07-04 Martin Liska <mliska@suse.cz>
1016 Jonathan Wakely <jwakely@redhat.com>
1017
1018 * coverage.c: Use correct type.
1019 * doc/invoke.texi: Language correction.
1020
1021 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
1022
1023 PR target/85620
1024 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
1025 ENDBRANCH for non-tail call which may return via indirect branch.
1026 * doc/extend.texi: Document indirect_return attribute.
1027
1028 2018-07-03 Martin Sebor <msebor@redhat.com>
1029
1030 PR tree-optimization/86274
1031 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
1032 precondition.
1033 (format_floating): Correct handling of infinities and NaNs.
1034
1035 2018-07-03 Martin Sebor <msebor@redhat.com>
1036
1037 * print-tree.c (print_real_cst): New function.
1038 (print_node_brief): Call it.
1039 (print_node): Ditto.
1040
1041 2018-07-03 Jeff Law <law@redhat.com>
1042
1043 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
1044 into a single pattern.
1045
1046 * config/h8300/h8300.md (ors code_iterator): New.
1047 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
1048 a single pattern and single splitter.
1049 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
1050 (iorqi3_1, xorqi3_1): Likewise.
1051 (iorqi3, xorqi3 expanders): Similarly.
1052
1053 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
1054 (movmd_internal) into a single pattern using the P mode iterator.
1055 (movmd splitters): Similarly.
1056 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
1057 (movsd splitters): Similarly.
1058
1059 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
1060 ADDB, ADDW and ADDL into a single ADD attribute which selects the
1061 right table based on the size of the operand.
1062 * config/h8300/h8300.md (length_table): Corresponding changes. All
1063 references to "addb", "addw" and "addl" changed to "add".
1064 (btst patterns): Merge two variants into a single pattern.
1065 (tstqi, tsthi): Likewise.
1066 (addhi3_incdec, addsi3_incdec): Likewise.
1067 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
1068 (mulhi3, mulsi3): Likewise.
1069 (udivhi3, udivsi3): Likewise.
1070 (divhi3, divsi3): Likewise.
1071 (andorqi3, andorhi3, andorsi3): Likewise.
1072
1073 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
1074
1075 PR target/85694
1076 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
1077 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
1078
1079 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1080
1081 PR tree-optimization/85694
1082 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
1083 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
1084 UNSPEC_URHADD.
1085 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
1086 (<u>avg<mode>3_ceil): New patterns.
1087
1088 2018-07-03 David Malcolm <dmalcolm@redhat.com>
1089
1090 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
1091 scan-tree-dump directive.
1092 * gcc.dg/vect/slp-perm-2.c: Likewise.
1093 * gcc.dg/vect/slp-perm-3.c: Likewise.
1094 * gcc.dg/vect/slp-perm-5.c: Likewise.
1095 * gcc.dg/vect/slp-perm-6.c: Likewise.
1096 * gcc.dg/vect/slp-perm-7.c: Likewise.
1097 * gcc.dg/vect/slp-perm-8.c: Likewise.
1098
1099 2018-07-03 Marek Polacek <polacek@redhat.com>
1100
1101 PR middle-end/86202
1102 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
1103
1104 2018-07-03 Richard Biener <rguenther@suse.de>
1105
1106 PR ipa/86389
1107 * tree-ssa-structalias.c (find_func_clobbers): Properly
1108 handle indirect calls.
1109
1110 2018-07-03 Jeff Law <law@redhat.com>
1111
1112 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
1113 (shifts): New code iterator.
1114 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
1115 expander. Fix HImode handling on H8/SX.
1116 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
1117 (subqi3, subhi3, subsi3 expanders): Likewise.
1118 (andqi3, andhi3, andsi3 expanders): Likewise.
1119 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
1120 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
1121 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
1122 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
1123 (zero_extendqihi2, zero_extendqisi2): Likewise.
1124 (extendqihi2, extendqisi2): Likewise.
1125 (rotlqi3, rotlhi3, rotlsi3): Likewise.
1126 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
1127 (rotlqi3_1, rotlhi3_1): Likewise.
1128 (logicalhi3_sn, logicalsi3_sn): Likewise.
1129 (logicalhi3, logicalsi3): Likewise.
1130
1131 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1132
1133 * tree-vect-patterns.c (vect_recog_rotate_pattern)
1134 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1135 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
1136 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
1137 type to append_pattern_def_seq instead of creating a stmt_vec_info
1138 directly.
1139 (build_mask_conversion): Likewise. Remove vinfo argument.
1140 (vect_add_conversion_to_patterm): Likewise, renaming to...
1141 (vect_add_conversion_to_pattern): ...this.
1142 (vect_recog_mask_conversion_pattern): Update call to
1143 build_mask_conversion. Pass the vector type to
1144 append_pattern_def_seq here too.
1145 (vect_recog_gather_scatter_pattern): Update call to
1146 vect_add_conversion_to_pattern.
1147
1148 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1149
1150 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
1151 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1152 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
1153 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
1154 STMT_VINFO_PATTERN_DEF_SEQ to null here.
1155 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
1156 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
1157 append_pattern_def_seq instead of new_pattern_def_seq.
1158 (vect_recog_divmod_pattern): Do both of the above.
1159 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
1160 is null.
1161
1162 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1163
1164 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
1165 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
1166 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
1167 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
1168 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
1169 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1170 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
1171 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1172 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1173 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
1174 parameter with a single stmt_vec_info.
1175 (vect_recog_func_ptr): Likewise.
1176 (vect_recog_gather_scatter_pattern): Likewise, folding in...
1177 (vect_try_gather_scatter_pattern): ...this.
1178 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
1179 the stmt_vec_info of the statement to be matched. Don't clear
1180 STMT_VINFO_RELATED_STMT.
1181 (vect_pattern_recog): Update call accordingly.
1182
1183 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1184
1185 PR tree-optimization/85694
1186 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
1187 (uavgM3_ceil): Document new optabs.
1188 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
1189 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
1190 functions.
1191 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
1192 (savg_ceil_optab): New optabs.
1193 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
1194 (vect_vect_recog_func_ptrs): Add it.
1195 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
1196 constant directly from the associated lhs.
1197
1198 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1199
1200 * tree-vect-patterns.c (vect_split_statement): New function.
1201 (vect_convert_input): Use it to try to split an existing cast.
1202
1203 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1204
1205 * poly-int.h (print_hex): New function.
1206 * dumpfile.h (dump_dec, dump_hex): Declare.
1207 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
1208 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
1209 min_input_precision, operation_precision and operation_sign.
1210 * tree-vect-patterns.c (vect_get_range_info): New function.
1211 (vect_same_loop_or_bb_p, vect_single_imm_use)
1212 (vect_operation_fits_smaller_type): Delete.
1213 (vect_look_through_possible_promotion): Add an optional
1214 single_use_p parameter.
1215 (vect_recog_over_widening_pattern): Rewrite to use new
1216 stmt_vec_info infomration. Handle one operation at a time.
1217 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
1218 (vect_truncatable_operation_p, vect_set_operation_type)
1219 (vect_set_min_input_precision): New functions.
1220 (vect_determine_min_output_precision_1): Likewise.
1221 (vect_determine_min_output_precision): Likewise.
1222 (vect_determine_precisions_from_range): Likewise.
1223 (vect_determine_precisions_from_users): Likewise.
1224 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
1225 (vect_vect_recog_func_ptrs): Put over_widening first.
1226 Add cast_forwprop.
1227 (vect_pattern_recog): Call vect_determine_precisions.
1228
1229 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1230
1231 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
1232 statements that have been replaced by further pattern statements.
1233 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
1234
1235 2018-07-03 Richard Biener <rguenther@suse.de>
1236
1237 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
1238 always set *dt. Dump vectype in vectype overload.
1239 * dumpfile.h (dump_gimple_expr): New function.
1240 (dump_gimple_expr_loc): Likewise.
1241 * dumpfile.c (dump_gimple_expr): New function.
1242 (dump_gimple_expr_loc): Likewise.
1243
1244 2018-07-02 Jeff Law <law@redhat.com>
1245
1246 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
1247 the H8/300, H8/300H and H8/S variants into a single pattern.
1248 (movhi_h8300, movqi_h8300hs): Similarly.
1249 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
1250 (QHI mode iterator): New.
1251
1252 * config/h8300/h8300.md: Remove trailing whitespace.
1253
1254 2018-07-02 Jim Wilson <jimw@sifive.com>
1255
1256 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
1257 instead of emit_insn for interrupt returns.
1258 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
1259 (riscv_sret, riscv_uret): Likewise.
1260
1261 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1262
1263 * pretty-print.c (selftest::test_pp_format): Move save and restore
1264 of quotes to class auto_fix_quotes, and add an instance.
1265 * selftest.c: Include "intl.h".
1266 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
1267 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
1268 * selftest.h (selftest::auto_fix_quotes): New class.
1269
1270 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
1271
1272 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
1273 (aarch64_sve_prepare_conditional_op): Remove.
1274 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
1275 Allow aarch64_simd_reg_or_zero as select operand; remove
1276 the aarch64_sve_prepare_conditional_op call.
1277 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
1278 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1279 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
1280 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
1281 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
1282 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
1283 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
1284 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
1285 and a splitters to match all of the *_any patterns.
1286 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
1287
1288 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
1289 (SVE_COND_FP_BINARY_REV): Remove.
1290 (sve_int_op_rev, sve_fp_op_rev): New.
1291 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
1292 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
1293 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
1294 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
1295 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
1296 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
1297 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
1298 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
1299 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
1300
1301 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
1302 Remove match_dup 1 from the inner unspec.
1303 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1304
1305 * config/aarch64/aarch64.md (movprfx): New attr.
1306 (length): Default movprfx to 8.
1307 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
1308 (*madd<SVE_I>, *msub<SVE_I): Likewise.
1309 (*<su>mul<SVE_I>3_highpart): Likewise.
1310 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
1311 (*v<ASHIFT><SVE_I>3): Likewise.
1312 (*<su><MAXMIN><SVE_I>3): Likewise.
1313 (*<su><MAXMIN><SVE_F>3): Likewise.
1314 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
1315 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
1316 (*div<SVE_F>4): Likewise.
1317
1318 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
1319
1320 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
1321 in dump string.
1322
1323 2018-07-02 Richard Biener <rguenther@suse.de>
1324
1325 PR tree-optimization/86363
1326 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
1327 memset argument refers to a non-variable address.
1328
1329 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
1330
1331 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
1332 {PLUS,MINUS}_EXPR code to...
1333 (adjust_symbolic_bound): ...here,
1334 (combine_bound): ...here,
1335 (set_value_range_with_overflow): ...and here.
1336
1337 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
1338
1339 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
1340 code...
1341 (extract_range_from_abs_expr): ...here.
1342
1343 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
1344
1345 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
1346 -fno-omit-frame-pointer when not optimizing.
1347
1348 2018-07-02 Martin Liska <mliska@suse.cz>
1349
1350 PR ipa/86279
1351 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
1352 (propagate_nothrow): Likewise.
1353
1354 2018-07-02 Martin Liska <mliska@suse.cz>
1355
1356 PR ipa/86323
1357 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
1358
1359 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1360
1361 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
1362 function in r262149, changing "loc" param from source_location to
1363 const dump_location_t &.
1364 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
1365 declaration, as above.
1366
1367 2018-07-01 Paul Koning <ni1d@arrl.net>
1368
1369 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1370 -munit-asm, -mgnu-asm, -mdec-asm.
1371 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
1372 (pdp11_output_labelref): New.
1373 (pdp11_output_def): New.
1374 (pdp11_output_addr_vec_elt): New.
1375 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
1376 %# and %@ format codes.
1377 (pdp11_option_override): New.
1378 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
1379 (pdp11_output_ident): New.
1380 (pdp11_asm_named_section): New.
1381 (pdp11_asm_init_sections): New.
1382 (pdp11_file_start): New.
1383 (pdp11_file_end): New.
1384 (output_ascii): Use .ascii/.asciz for -mdec-asm.
1385 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
1386 %o, like %c but octal.
1387 (pdp11_option_override): New.
1388 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
1389 -mdec-asm.
1390 (DATA_SECTION_ASM_OP): Ditto.
1391 (READONLY_DATA_SECTION_ASM_OP): New.
1392 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
1393 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
1394 (ASM_OUTPUT_LABELREF): Ditto.
1395 (ASM_OUTPUT_DEF): Ditto.
1396 (ASM_OUTPUT_EXTERNAL): New.
1397 (ASM_OUTPUT_SOURCE_FILENAME): New.
1398 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
1399 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
1400 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
1401 %# and %@ format codes.
1402 * config/pdp11/pdp11.opt (mgnu-asm): New.
1403 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
1404 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
1405 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
1406
1407 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
1408
1409 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
1410 dereferencing path[] beyond its length.
1411 (debug_path): New.
1412 (debug_all_paths): New.
1413 (rewire_first_differing_edge): New.
1414 (adjust_paths_after_duplication): New.
1415 (duplicate_thread_path): Call adjust_paths_after_duplication.
1416 Add new argument.
1417 (thread_through_all_blocks): Add new argument to
1418 duplicate_thread_path.
1419
1420 2018-06-30 Jim Wilson <jimw@sifive.com>
1421
1422 * config/riscv/predicates.md (p2m1_shift_operand): New.
1423 (high_mask_shift_operand): New.
1424 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
1425 pattern using p2m1_shift_operand.
1426 (lshsi3_zero_extend_3+2): New combiner pattern using
1427 high_mask_shift_operand.
1428
1429 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1430
1431 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
1432 split out from...
1433 (vect_recog_rotate_pattern): ...here.
1434 (vect_convert_input): Try to insert casts of invariants in the
1435 preheader.
1436 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
1437 preheader to be empty.
1438
1439 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1440
1441 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
1442 vector type. If given, install it in the new statement's
1443 STMT_VINFO_VECTYPE.
1444 (vect_element_precision): New function.
1445 (vect_unpromoted_value): New struct.
1446 (vect_unpromoted_value::vect_unpromoted_value): New function.
1447 (vect_unpromoted_value::set_op): Likewise.
1448 (vect_look_through_possible_promotion): Likewise.
1449 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
1450 (vect_widened_op_tree, vect_convert_input): Likewise.
1451 (vect_convert_inputs, vect_convert_output): Likewise.
1452 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
1453 to handle the optional cast of the multiplication result and
1454 vect_widened_op_tree to detect the widened multiplication itself.
1455 Do not require the input and output of promotion casts to have
1456 the same sign, but base the signedness of the operation on the
1457 input rather than the result. If the pattern includes two
1458 promotions, check that those promotions have the same sign.
1459 Do not restrict the MULT_EXPR handling to a double-width result;
1460 handle quadruple-width results and wider. Use vect_convert_inputs
1461 to convert the inputs to the common type.
1462 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
1463 to handle the optional cast of the ABS result. Also allow a sign
1464 change or a sign extension between the ABS and MINUS.
1465 Use vect_widened_op_tree to detect the widened subtraction and use
1466 vect_convert_inputs to convert the inputs to the common type.
1467 (vect_handle_widen_op_by_const): Delete.
1468 (vect_recog_widen_op_pattern): New function.
1469 (vect_recog_widen_mult_pattern): Use it.
1470 (vect_recog_widen_shift_pattern): Likewise.
1471 (vect_recog_widen_sum_pattern): Use
1472 vect_look_through_possible_promotion to handle the promoted
1473 PLUS_EXPR operand.
1474
1475 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1476
1477 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
1478 the containing gimple_seq *.
1479 * gimple-iterator.h (gsi_for_stmt): Declare it.
1480 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
1481 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
1482 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1483 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1484 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
1485 checks.
1486 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
1487 split out from...
1488 (vect_mark_pattern_stmts): ...here. Handle cases in which the
1489 statement being replaced is part of an existing pattern
1490 definition sequence, inserting the new pattern statements before
1491 the original one.
1492 (vect_pattern_recog_1): Don't return a bool. If the statement
1493 is already part of a pattern, instead apply pattern matching
1494 to the pattern definition statements. Don't clear the
1495 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
1496 (vect_pattern_recog): Don't break after the first match;
1497 continue processing the pattern definition statements instead.
1498 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
1499
1500 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1501
1502 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
1503 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1504 (vect_recog_widen_sum_pattern): Use it.
1505
1506 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1507
1508 * tree-vect-loop.c (vectorizable_reduction): Assert that the
1509 phi is not a pattern statement and has not been replaced by
1510 a pattern statement.
1511 * tree-vect-patterns.c (type_conversion_p): Don't check
1512 STMT_VINFO_IN_PATTERN_P.
1513 (vect_recog_vector_vector_shift_pattern): Likewise.
1514 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
1515 the pattern statement rather than the original statement; check
1516 directly for a WIDEN_MULT_EXPR here.
1517 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
1518 vect_is_simple_use to return the pattern statement rather
1519 than the original statement; use is_pattern_stmt_p to check
1520 for such a pattern statement.
1521 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
1522 to return the pattern statement rather than the original statement;
1523 don't do the same transformation here.
1524 (vect_is_simple_use): If the defining statement has been replaced
1525 by a pattern statement, return the pattern statement instead.
1526 Remove the corresponding (local) transformation from the vectype
1527 overload.
1528
1529 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
1530
1531 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
1532 end and default to null.
1533 * tree-vect-loop.c (vect_create_epilog_for_reduction)
1534 (vectorizable_reduction): Update calls accordingly, dropping the
1535 gimple ** argument if the passed-back statement isn't needed.
1536 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
1537 (vect_recog_rotate_pattern): Likewise.
1538 (vect_recog_mask_conversion_pattern): Likewise.
1539 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1540 (vect_mask_constant_operand_p): Likewise.
1541 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
1542 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
1543 (get_group_load_store_type, get_load_store_type): Likewise.
1544 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
1545 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
1546 (vectorizable_conversion, vectorizable_assignment): Likewise.
1547 (vectorizable_shift, vectorizable_operation): Likewise.
1548 (vectorizable_store, vect_is_simple_cond): Likewise.
1549 (vectorizable_condition, vectorizable_comparison): Likewise.
1550 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
1551 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
1552 and move it to the end. Cope with null def_stmt_outs.
1553
1554 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
1555
1556 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
1557
1558 2018-06-29 Jeff Law <law@redhat.com>
1559
1560 * config/v850/v850.c (v850_legitimate_address_p): Handle large
1561 displacements for TARGET_V850E2V3 and newer.
1562 (TARGET_LRA_P): Remove. Defaults to LRA now.
1563 * config/v850/v850.md (sign23byte_load): Remove.
1564 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
1565 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
1566
1567 2018-06-29 Martin Liska <mliska@suse.cz>
1568
1569 PR lto/85759
1570 * coverage.c (coverage_init): Mangle full path name.
1571 * doc/invoke.texi: Document the change.
1572 * gcov-io.c (mangle_path): New.
1573 * gcov-io.h (mangle_path): Likewise.
1574 * gcov.c (mangle_name): Use mangle_path for path mangling.
1575
1576 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1577
1578 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
1579 if starting source register is not even.
1580
1581 2018-06-29 Martin Liska <mliska@suse.cz>
1582
1583 PR tree-optimization/86263
1584 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
1585 Make edge redirection.
1586
1587 2018-06-29 David Malcolm <dmalcolm@redhat.com>
1588
1589 * dumpfile.c (dump_loc): Add indentation based on scope depth.
1590 (dump_scope_depth): New variable.
1591 (get_dump_scope_depth): New function.
1592 (dump_begin_scope): New function.
1593 (dump_end_scope): New function.
1594 * dumpfile.h (get_dump_scope_depth): New declaration.
1595 (dump_begin_scope): New declaration.
1596 (dump_end_scope): New declaration.
1597 (class auto_dump_scope): New class.
1598 (AUTO_DUMP_SCOPE): New macro.
1599 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
1600 AUTO_DUMP_SCOPE.
1601
1602 2018-06-29 Richard Biener <rguenther@suse.de>
1603
1604 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
1605 compute_all_dependences succeeds.
1606 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
1607 exceed --param loop-max-datarefs-for-datadeps.
1608
1609 2018-06-29 Jakub Jelinek <jakub@redhat.com>
1610
1611 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
1612
1613 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
1614
1615 PR target/86348
1616 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
1617 alternative 0 in preferred_for_speed attribute.
1618
1619 2018-06-28 Paul Koning <ni1d@arrl.net>
1620
1621 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
1622 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
1623 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
1624 * config/pdp11/pdp11.md: Correct "length" attribute calculation
1625 for shift insn patterns.
1626
1627 2018-06-28 David Malcolm <dmalcolm@redhat.com>
1628
1629 * cgraph.c (cgraph_node::get_body): Replace assignments to
1630 "dump_file" with calls to set_dump_file.
1631 * dumpfile.c (alt_dump_file): Make static, and group with...
1632 (alt_flags): ...this definition.
1633 (dumps_are_enabled): New variable.
1634 (refresh_dumps_are_enabled): New function.
1635 (set_dump_file): New function.
1636 (set_alt_dump_file): New function.
1637 (gcc::dump_manager::dump_start): Replace assignments to
1638 "dump_file" and "alt_dump_file" with calls to set_dump_file and
1639 set_alt_dump_file.
1640 (gcc::dump_manager::dump_finish): Likewise.
1641 * dumpfile.h (alt_dump_file): Delete decl.
1642 (dumps_are_enabled): New variable decl.
1643 (set_dump_file): New function decl.
1644 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
1645 global.
1646 * tree-nested.c (lower_nested_functions): Replace assignments to
1647 "dump_file" with calls to set_dump_file.
1648
1649 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
1650
1651 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
1652 goto_locus of each outgoing edge of each basic block.
1653
1654 2018-06-28 Richard Biener <rguenther@suse.de>
1655
1656 * dwarf2out.c (decl_scope_table): Remove.
1657 (push_decl_scope): Likewise.
1658 (pop_decl_scope): Likewise.
1659 (gen_type_die_for_member): Do not call push/pop_decl_scope.
1660 (gen_struct_or_union_type_die): Likewise.
1661 (gen_tagged_type_die): Likewise.
1662 (dwarf2out_init): Do not initialize decl_scope_table.
1663 (dwarf2out_c_finalize): Do not free it.
1664
1665 2018-06-28 Richard Biener <rguenther@suse.de>
1666
1667 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
1668 deciding whether to not re-use a DIE.
1669
1670 2018-06-28 Richard Biener <rguenther@suse.de>
1671
1672 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
1673 DW_AT_abstract_origin attribute.
1674
1675 2018-06-28 Martin Liska <mliska@suse.cz>
1676
1677 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1678 Use newly introduced constants.
1679 * tree-switch-conversion.h (struct jump_table_cluster):
1680 Define max_ratio_for_size and max_ratio_for_speed.
1681
1682 2018-06-28 Martin Liska <mliska@suse.cz>
1683
1684 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1685 Add new checking assert to catch invalid state.
1686 (jump_table_cluster::can_be_handled): Handle single case
1687 clusters.
1688 (jump_table_cluster::is_beneficial): Bail out for such case.
1689 (bit_test_cluster::find_bit_tests):
1690 Add new checking assert to catch invalid state.
1691 (bit_test_cluster::can_be_handled): Handle single case
1692 clusters.
1693 (bit_test_cluster::is_beneficial): Bail out for such case.
1694 (switch_decision_tree::analyze_switch_statement):
1695 Fix comment.
1696
1697 2018-06-28 Martin Liska <mliska@suse.cz>
1698
1699 * common.opt: Introduce -completion option.
1700 * gcc.c (driver_handle_option): Handle it.
1701 (driver::main): Print completions if completion
1702 is set.
1703 * opt-suggestions.c (option_proposer::get_completions):
1704 New function.
1705 (option_proposer::suggest_completion): Likewise.
1706 (option_proposer::find_param_completions): Likewise.
1707 (verify_autocompletions): Likewise.
1708 (test_completion_valid_options): Likewise.
1709 (test_completion_valid_params): Likewise.
1710 (in_completion_p): Likewise.
1711 (empty_completion_p): Likewise.
1712 (test_completion_partial_match): Likewise.
1713 (test_completion_garbage): Likewise.
1714 (opt_proposer_c_tests): Likewise.
1715 * opt-suggestions.h: Declare new functions.
1716 * opts.c (common_handle_option): Handle OPT__completion_.
1717 * selftest-run-tests.c (selftest::run_tests): Add
1718 opt_proposer_c_tests.
1719 * selftest.c (assert_str_startswith): New.
1720 * selftest.h (assert_str_startswith): Likewise.
1721 (opt_proposer_c_tests): New.
1722 (ASSERT_STR_STARTSWITH): Likewise.
1723
1724 2018-06-28 Martin Liska <mliska@suse.cz>
1725
1726 * Makefile.in: Add opt-suggestions.o.
1727 * gcc-main.c: Include opt-suggestions.h.
1728 * gcc.c (driver::driver): Likewise.
1729 (driver::~driver): Remove m_option_suggestions.
1730 (driver::build_option_suggestions): Moved to option_proposer.
1731 (driver::suggest_option): Likewise.
1732 (driver::handle_unrecognized_options): Use option_proposer.
1733 * gcc.h (class driver): Add new memver m_option_proposer.
1734 * opt-suggestions.c: New file.
1735 * opt-suggestions.h: New file.
1736
1737 2018-06-28 Martin Liska <mliska@suse.cz>
1738
1739 * vec.h (class auto_string_vec): New (moved from auto_argvec).
1740 (auto_string_vec::~auto_string_vec): Likewise.
1741
1742 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
1743
1744 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
1745 prevent_decl_creation_for_types fields up and add reset_location field.
1746 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
1747 statement if id->reset_location is true.
1748 (copy_edges_for_bb): Do not set goto_locus on the new edges if
1749 id->reset_location is true.
1750 (copy_phis_for_bb): Force input_location on the arguments if
1751 id->reset_location is true.
1752 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
1753 is set on the function to be inlined.
1754
1755 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
1756
1757 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
1758
1759 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
1760
1761 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
1762 registers for Pmode.
1763 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
1764 hard registers for the clobbered pseudo.
1765
1766 2018-06-27 Paul Koning <ni1d@arrl.net>
1767
1768 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1769 mutually exclusive options.
1770 * config/pdp11/constraints.md (h): New constraint.
1771 (O): Update definition to match shift code generation.
1772 (D): New constraint.
1773 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
1774 (CCFP): Remove.
1775 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
1776 function.
1777 (output_jump): Change arguments.
1778 (pdp11_fixed_cc_regs): New function.
1779 (pdp11_cc_mode): Ditto.
1780 (pdp11_expand_shift): Ditto.
1781 (pdp11_assemble_shift): Ditto.
1782 (pdp11_small_shift): Ditto.
1783 (pdp11_branch_cost): Remove.
1784 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
1785 from output.
1786 (pdp11_register_move_cost): Update for CC registers.
1787 (pdp11_rtx_costs): Add case for LSHIFTRT.
1788 (pdp11_output_jump): Add CCNZ mode conditional branches.
1789 (notice_update_cc_on_set): Remove.
1790 (pdp11_cc_mode): New function.
1791 (simple_memory_operand): Correct pre/post decrement case.
1792 (no_side_effect_operand): New function.
1793 (pdp11_regno_reg_class): Add CC_REGS class.
1794 (pdp11_fixed_cc_regs): New function.
1795 (pdp11_small_shift): New function.
1796 (pdp11_expand_shift): New function to expand shift insns.
1797 (pdp11_assemble_shift): New function to output shifts.
1798 (pdp11_branch_cost): Remove.
1799 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
1800 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
1801 (WCHAR_TYPE): Ditto.
1802 (PTRDIFF_TYPE): Ditto.
1803 (ADJUST_INSN_LENGTH): New macro.
1804 (FIXED_REGISTERS): Add CC registers.
1805 (CALL_USED_REGISTERS): Ditto.
1806 (reg_class): Ditto.
1807 (REG_CLASS_NAMES): Ditto.
1808 (REG_CLASS_CONTENTS): Ditto.
1809 (SELECT_CC_MODE): Use new function.
1810 (TARGET_FLAGS_REGNUM): New macro.
1811 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
1812 (cc0_reg_rtx): Remove.
1813 (CC_STATUS_MDEP): Remove.
1814 (CC_STATUS_MDEFP_INIT): Remove.
1815 (CC_IN_FPU): Remove.
1816 (NOTICE_UPDATE_CC): Remove.
1817 (REGISTER_NAMES): Add CC registers.
1818 (BRANCH_COST): Change to constant 1.
1819 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
1820 handling.
1821 * config/pdp11/pdp11.opt (mbcopy): Remove.
1822 (mbcopy-builtin): Remove.
1823 (mbranch-cheap): Remove.
1824 (mbranch-expensive): Remove.
1825 * config/pdp11/predicates.md (expand_shift_operand): Update to
1826 match shift code generation.
1827 (ccnz_operator): New predicate.
1828 * doc/invoke.texi (PDP-11 Options): Remove deleted options
1829 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
1830 Remove non-existent option -mabshi, -mno-abshi. Document mutually
1831 exclusive options.
1832 * doc/md.texi (PDP-11): Document new D and h constraints. Update
1833 description of O constraint.
1834
1835 2018-06-27 Jeff Law <law@redhat.com>
1836 Austin Law <austinklaw@gmail.com>
1837
1838 * config/v850/v850.md (addsi3_set_flags): New pattern.
1839 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
1840 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
1841 (zero_extendhisi2_v850_set_flags): Likewise.
1842 (zero_extendqisi2_v850_set_flags): Likewise.
1843 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
1844 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
1845 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
1846
1847 * config/v850/v850-protos.h (notice_update_cc): Remove.
1848 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
1849 (v850_print_operand): Handle 'D' and "d".
1850 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
1851 Add handling of arithmetic/logical operations compared against zero.
1852 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
1853 Do not look at v850_compare_op, instead get mode from last argument.
1854 (v850_gen_compare): Remove
1855 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
1856 after reload for prologue insns.
1857 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
1858 patterns.
1859 (construct_save_jarl): Likewise.
1860 (TARGET_FLAGS_REGNUM): Define.
1861 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
1862 (NOTICE_UPDATE_CC): Remove.
1863 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
1864 than cc0. Conditionalize on reload_completed.
1865 (cmpsi_insn, setfcc_insn): Likewise.
1866 (tst1 splitter): Turn into define_and_split which sets the flags
1867 after reload.
1868 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
1869 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
1870 (cstoresf4, cstoredf4): Clobber the flags.
1871 (cmpsi, cmpsf, cmpdf): Remove expanders.
1872 (setf_insn): Remove pattern.
1873 (addsi3): Turn into define_and_split which clobbers the flags after
1874 reload and a suitable pattern (addsi3_clobber_flags) for use after
1875 reload.
1876 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
1877 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
1878 (ashrsi3, ashrsi3_v850e2): Likewise.
1879 (bins): Clobber the flags.
1880 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
1881 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
1882 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
1883 (call_value_internal_short, call_value_internal_long): Likewise.
1884 (callt_save_interrupt, callt_return_interrupt): Likewise.
1885 (save_interrupt, return_interrupt): Likewise.
1886 (callt_save_all_interrupt, save_all_interrupt): Likewise.
1887 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
1888 (restore_all_interrupt, _restore_all_interrupt): Likewise.
1889 (All FP comparisons): Only allow after reload has completed.
1890 (trfsr): Likewise.
1891 (divh, divhu): Tweak output template.
1892 (branch_z_normal, branch_z_invert): Remove
1893 (branch_nz_normal, branch_nz_invert): Likewise.
1894 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
1895
1896 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
1897 * config/v850/v850.c (notice_update_cc): Remove.
1898 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
1899 (CC_NO_CARRY): Likewise.
1900 (NOTICE_UPDATE_CC): Define to nothing.
1901 * config/v850/v850.md: Remove block comment on cc0 handling
1902 Remove "cc" attribute from all patterns. Remove cc_status handling
1903 from all patterns. Minor formatting fixes.
1904
1905 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1906
1907 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
1908 (cortex-a76.cortex-a55): Likewise.
1909 * config/aarch64/aarch64-tune.md: Regenerate.
1910 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
1911 cortex-a76.cortex-a55.
1912
1913 2018-06-27 Jeff Law <law@redhat.com>
1914
1915 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
1916 (MULTILIB_DIRNAMES): Similarly.
1917
1918 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
1919
1920 * gimple.h (gimple_return_retbnd): Delete.
1921 (gimple_return_set_retbnd): Likewise.
1922 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
1923 gimple_return_set_retbnd.
1924 * gimple-pretty-print.c (dump_gimple_return): Remove call to
1925 gimple_return_retbnd and adjust.
1926 * tree-inline.h (struct copy_body_data): Remove retbnd field.
1927 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
1928 Explicitly return NULL in a couple more cases. Move assertion
1929 on debug statements and remove unreachable code.
1930 (reset_debug_binding): Do not test id->retbnd.
1931 (expand_call_inline): Do not set it.
1932
1933 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1934
1935 * configure.ac: Add --disable-gcov option.
1936 * configure: Regenerate.
1937 * Makefile.in: Honour @enable_gcov@.
1938 * doc/install.texi: Document --disable-gcov.
1939
1940 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1941
1942 * config/arm/arm-cpus.in (cortex-a76): New entry.
1943 (cortex-a76.cortex-a55): Likewise.
1944 * config/arm/arm-tables.opt: Regenerate.
1945 * config/arm/arm-tune.md: Likewise.
1946 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
1947 * doc/invoke.texi (ARM Options): Document cortex-a76 and
1948 cortex-a76.cortex-a55.
1949
1950 2018-06-27 Tamar Christina <tamar.christina@arm.com>
1951
1952 PR target/85769
1953 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
1954
1955 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
1956
1957 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
1958 comment.
1959 (EPILOGUE_USES): Likewise.
1960
1961 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
1962
1963 * tree-inline.c (remap_location): New function extracted from...
1964 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
1965 (copy_phis_for_bb): ...here. Call remap_location.
1966 (copy_cfg_body): Adjust call to copy_edges_for_bb.
1967
1968 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
1969
1970 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
1971 unaligned vsx for 16B memset.
1972
1973 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
1974
1975 PR target/86285
1976 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
1977 ieee128_float_type_node to long_double_type_node unless
1978 TARGET_LONG_DOUBLE_128 is set.
1979
1980 2018-06-26 David Malcolm <dmalcolm@redhat.com>
1981
1982 * cfgloop.c (get_loop_location): Convert return type from
1983 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
1984 by implicit construction from rtx_insn *, and using
1985 dump_user_location_t::from_function_decl for the fallback case.
1986 * cfgloop.h (get_loop_location): Convert return type from
1987 location_t to dump_user_location_t.
1988 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
1989 dump_printf_loc to pass in a dump_location_t rather than a
1990 location_t, via the gimple stmt.
1991 * coverage.c (get_coverage_counts): Update calls to
1992 dump_printf_loc to pass in dump_location_t rather than a
1993 location_t.
1994 * doc/optinfo.texi (Dump types): Convert example of
1995 dump_printf_loc from taking "locus" to taking "insn". Update
1996 description of the "_loc" calls to cover dump_location_t.
1997 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
1998 "selftest.h".
1999 (dump_user_location_t::dump_user_location_t): New constructors,
2000 from gimple *stmt and rtx_insn *.
2001 (dump_user_location_t::from_function_decl): New function.
2002 (dump_loc): Make static.
2003 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
2004 const dump_location_t &.
2005 (dump_generic_expr_loc): Delete.
2006 (dump_printf_loc): Convert param "loc" from location_t to
2007 const dump_location_t &.
2008 (selftest::test_impl_location): New function.
2009 (selftest::dumpfile_c_tests): New function.
2010 * dumpfile.h: Include "profile-count.h".
2011 (class dump_user_location_t): New class.
2012 (struct dump_impl_location_t): New struct.
2013 (class dump_location_t): New class.
2014 (dump_printf_loc): Convert 2nd param from source_location to
2015 const dump_location_t &.
2016 (dump_generic_expr_loc): Delete.
2017 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
2018 const dump_location_t &.
2019 * gimple-fold.c (fold_gimple_assign): Update call to
2020 dump_printf_loc to pass in a dump_location_t rather than a
2021 location_t, via the gimple stmt.
2022 (gimple_fold_call): Likewise.
2023 * gimple-loop-interchange.cc
2024 (loop_cand::analyze_iloop_reduction_var): Update for change to
2025 check_reduction_path.
2026 (tree_loop_interchange::interchange): Update for change to
2027 find_loop_location.
2028 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
2029 change in return-type of find_loop_location.
2030 (graphite_regenerate_ast_isl): Likewise.
2031 * graphite-optimize-isl.c (optimize_isl): Likewise.
2032 * graphite.c (graphite_transform_loops): Likewise.
2033 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
2034 pass in a dump_location_t rather than a location_t, via the
2035 gimple stmt.
2036 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2037 * ipa.c (walk_polymorphic_call_targets): Likewise.
2038 * loop-unroll.c (report_unroll): Convert "locus" param from
2039 location_t to dump_location_t.
2040 (decide_unrolling): Update for change to get_loop_location's
2041 return type.
2042 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
2043 location_t to dump_user_location_t.
2044 (grid_find_single_omp_among_assignments_1): Updates calls to
2045 dump_printf_loc to pass in a dump_location_t rather than a
2046 location_t, via the gimple stmt.
2047 (grid_parallel_clauses_gridifiable): Convert "tloc" from
2048 location_t to dump_location_t. Updates calls to dump_printf_loc
2049 to pass in a dump_location_t rather than a location_t, via the
2050 gimple stmt.
2051 (grid_inner_loop_gridifiable_p): Likewise.
2052 (grid_dist_follows_simple_pattern): Likewise.
2053 (grid_gfor_follows_tiling_pattern): Likewise.
2054 (grid_target_follows_gridifiable_pattern): Likewise.
2055 (grid_attempt_target_gridification): Convert initialization
2056 of local "grid" from memset to zero-initialization; FIXME: does
2057 this require C++11? Update call to dump_printf_loc to pass in a
2058 optinfo_location rather than a location_t, via the gimple stmt.
2059 * profile.c (read_profile_edge_counts): Updates call to
2060 dump_printf_loc to pass in a dump_location_t rather than a
2061 location_t
2062 (compute_branch_probabilities): Likewise.
2063 * selftest-run-tests.c (selftest::run_tests): Call
2064 dumpfile_c_tests.
2065 * selftest.h (dumpfile_c_tests): New decl.
2066 * tree-loop-distribution.c (pass_loop_distribution::execute):
2067 Update for change in return type of find_loop_location.
2068 * tree-parloops.c (parallelize_loops): Likewise.
2069 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
2070 "locus" from location_t to dump_user_location_t.
2071 (canonicalize_loop_induction_variables): Likewise.
2072 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
2073 for change in return type of find_loop_location.
2074 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
2075 to dump_printf_loc to pass in a dump_location_t rather than a
2076 location_t, via the stmt.
2077 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
2078 Likewise.
2079 * tree-vect-loop-manip.c (find_loop_location): Convert return
2080 type from source_location to dump_user_location_t.
2081 (vect_do_peeling): Update for above change.
2082 (vect_loop_versioning): Update for change in type of
2083 vect_location.
2084 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
2085 from location_t to dump_user_location_t.
2086 (vect_estimate_min_profitable_iters): Update for change in type
2087 of vect_location.
2088 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
2089 location_t to dump_location_t.
2090 (vect_slp_bb): Update for change in type of vect_location.
2091 * tree-vectorizer.c (vect_location): Convert from source_location
2092 to dump_user_location_t.
2093 (try_vectorize_loop_1): Update for change in vect_location's type.
2094 (vectorize_loops): Likewise.
2095 (increase_alignment): Likewise.
2096 * tree-vectorizer.h (vect_location): Convert from source_location
2097 to dump_user_location_t.
2098 (find_loop_location): Convert return type from source_location to
2099 dump_user_location_t.
2100 (check_reduction_path): Convert 1st param from location_t to
2101 dump_user_location_t.
2102 * value-prof.c (check_counter): Update call to dump_printf_loc to
2103 pass in a dump_user_location_t rather than a location_t; update
2104 call to error_at for change in type of "locus".
2105 (check_ic_target): Update call to dump_printf_loc to
2106 pass in a dump_user_location_t rather than a location_t, via the
2107 call_stmt.
2108
2109 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
2110
2111 * config/s390/s390.h (enum processor_flags): Do not use
2112 default tune parameter when -march was specified.
2113
2114 2018-06-26 Jakub Jelinek <jakub@redhat.com>
2115
2116 PR target/86314
2117 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
2118 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
2119 operands.
2120
2121 2018-06-26 Richard Biener <rguenther@suse.de>
2122
2123 PR tree-optimization/86287
2124 PR bootstrap/86316
2125 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
2126 (vect_analyze_loop): Initialize n_stmts.
2127
2128 2018-06-26 Richard Biener <rguenther@suse.de>
2129
2130 PR middle-end/86271
2131 * fold-const.c (fold_convertible_p): Pointer extension
2132 isn't valid.
2133
2134 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
2135
2136 PR debug/86064
2137 * dwarf2out.c (loc_list_has_views): Adjust comments.
2138 (dw_loc_list): Split single cross-partition range with
2139 nonzero locview.
2140
2141 2018-06-25 Jeff Law <law@redhat.com>
2142
2143 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
2144 on -mbig-switch by default.
2145
2146 * config/v850/predicates.md (const_float_1_operand): Fix match_code
2147 test.
2148 (const_float_0_operand): Remove unused predicate.
2149 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
2150 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
2151 (recipsf2): New expander. Original pattern now called
2152 (recipsf2_insn).
2153 (recipdf2, recipdf2_insn): Similarly.
2154 (rsqrtsf2, rsqrtsf2_insn): Similarly
2155 (rsqrtdf2, rsqrtdf2_insn): Similarly
2156
2157 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
2158
2159 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
2160 Simplify logic for FreeBSD (twice).
2161
2162 2018-06-25 Martin Sebor <msebor@redhat.com>
2163
2164 PR tree-optimization/86204
2165 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
2166 a strnlen result if it's less than the length of the string.
2167
2168 2018-06-25 Martin Sebor <msebor@redhat.com>
2169
2170 PR tree-optimization/85700
2171 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
2172 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
2173 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
2174
2175 2018-06-25 Martin Sebor <msebor@redhat.com>
2176
2177 * doc/extend.texi (Zero-length arrays): Update and clarify.
2178
2179 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
2180
2181 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
2182 added IEEE/IBM long double multilib support on PowerPC little
2183 endian Linux systems.
2184 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
2185 (MULTILIB_DEFAULTS): Likewise.
2186 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2187 Likewise.
2188 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
2189 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
2190 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
2191
2192 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
2193
2194 PR middle-end/86311
2195 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
2196 (REORDER_45): Likewise.
2197
2198 2018-06-25 Jeff Law <law@redhat.com>
2199
2200 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
2201 dividend to 32 bits. Adjust length.
2202 (udivmodhi4): Cleanup output template. Fix length.
2203
2204 2018-06-25 Carl Love <cel@us.ibm.com>
2205
2206 * config/rs6000/vsx.md: Change word selector to prefered location.
2207
2208 2018-06-25 Richard Biener <rguenther@suse.de>
2209
2210 PR tree-optimization/86304
2211 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
2212 epilogue-if-converted loops as well.
2213
2214 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
2215
2216 * lto-section-out.c (lto_begin_section): Do not print section
2217 name for noaddr and unnumbered dumps.
2218
2219 2018-06-25 Richard Biener <rguenther@suse.de>
2220
2221 * tree-vectorizer.h (struct vec_info_shared): New structure
2222 with parts split out from struct vec_info and loop_nest from
2223 struct _loop_vec_info.
2224 (struct vec_info): Adjust accordingly.
2225 (struct _loop_vec_info): Likewise.
2226 (LOOP_VINFO_LOOP_NEST): Adjust.
2227 (LOOP_VINFO_DATAREFS): Likewise.
2228 (LOOP_VINFO_DDRS): Likewise.
2229 (struct _bb_vec_info): Likewise.
2230 (BB_VINFO_DATAREFS): Likewise.
2231 (BB_VINFO_DDRS): Likewise.
2232 (struct _stmt_vec_info): Add dr_aux member.
2233 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
2234 (DR_MISALIGNMENT_UNINITIALIZED): New.
2235 (set_dr_misalignment): Adjust.
2236 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
2237 (vect_analyze_loop): Adjust prototype.
2238 (vect_analyze_loop_form): Likewise.
2239 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2240 Compute dependences lazily.
2241 (vect_record_base_alignments): Use shared datarefs/ddrs.
2242 (vect_verify_datarefs_alignment): Likewise.
2243 (vect_analyze_data_refs_alignment): Likewise.
2244 (vect_analyze_data_ref_accesses): Likewise.
2245 (vect_analyze_data_refs): Likewise.
2246 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
2247 constructor parameter for shared part.
2248 (vect_analyze_loop_form): Pass in shared part and adjust.
2249 (vect_analyze_loop_2): Pass in storage for the number of
2250 stmts. Move loop nest finding to the caller. Compute
2251 datarefs lazily.
2252 (vect_analyze_loop): Pass in shared part.
2253 (vect_transform_loop): Verify shared datarefs are unchanged.
2254 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
2255 constructor parameter for shared part.
2256 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
2257 (vect_slp_bb): Verify shared datarefs are unchanged before
2258 transform.
2259 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
2260 change.
2261 (new_stmt_vec_info): Initialize DR_AUX misalignment to
2262 DR_MISALIGNMENT_UNINITIALIZED.
2263 * tree-vectorizer.c (vec_info::vec_info): Add constructor
2264 parameter for shared part.
2265 (vec_info::~vec_info): Adjust.
2266 (vec_info_shared::vec_info_shared): New.
2267 (vec_info_shared::~vec_info_shared): Likewise.
2268 (vec_info_shared::save_datarefs): Likewise.
2269 (vec_info_shared::check_datarefs): Likewise.
2270 (try_vectorize_loop_1): Construct shared part live for analyses
2271 of a single loop for multiple vector sizes.
2272 * tree-parloops.c (gather_scalar_reductions): Adjust.
2273
2274 2018-06-25 Richard Biener <rguenther@suse.de>
2275
2276 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
2277 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
2278 (vect_analyze_data_refs): Remove similar code from here and
2279 simplify accordingly.
2280
2281 2018-06-25 Richard Biener <rguenther@suse.de>
2282
2283 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
2284 for reverse storage order accesses rather than asserting
2285 they cannot happen here.
2286
2287 2018-06-25 Tom de Vries <tdevries@suse.de>
2288
2289 PR debug/86257
2290 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
2291 Use data16 instead of .byte for insn prefix.
2292
2293 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
2294
2295 PR C++/86082
2296 * parser.c (make_char_string_pack): Pass this literal chars
2297 through cpp_interpret_string.
2298 (cp_parser_userdef_numeric_literal): Check the result of
2299 make_char_string_pack.
2300
2301 2018-06-24 Maya Rashish <coypu@sdf.org>
2302
2303 * ginclude/stddef.h: Simplify conditions around avoiding
2304 re-definition of __size_t.
2305
2306 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2307
2308 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
2309 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
2310
2311 2018-06-22 Maya Rashish <coypu@sdf.org>
2312
2313 * doc/invoke.texi (mno-fancy-math-387): Update for changes
2314 made to OpenBSD and NetBSD through the years.
2315
2316 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
2317
2318 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2319 behavior of vec_pack (vector double, vector double) to match
2320 behavior of vec_float2 (vector double, vector double).
2321
2322 2018-06-22 Olivier Hainque <hainque@adacore.com>
2323
2324 * gimplify.c (gimplify_function_tree): Prevent creation
2325 of a trampoline for the address of the current function
2326 passed to entry/exit instrumentation hooks.
2327
2328 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
2329
2330 PR target/86222
2331 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
2332 correctly.
2333
2334 2018-06-22 Martin Liska <mliska@suse.cz>
2335
2336 PR tree-optimization/86263
2337 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2338 Bail out if is_enabled is false.
2339 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
2340 New declaration.
2341 (jump_table_cluster::is_enabled): New function.
2342
2343 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2344
2345 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2346 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
2347 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
2348 (lto_input_ts_binfo_tree_pointers): Likewise.
2349 * tree-streamer-out.c (streamer_write_tree_bitfields,
2350 write_ts_binfo_tree_pointers): Likewise.
2351 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
2352
2353 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2354
2355 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
2356
2357 2018-06-22 Martin Liska <mliska@suse.cz>
2358
2359 * symbol-summary.h (get): Make it pure and inline move
2360 functionality from ::get function.
2361 (get): Remove and inline into ::get and ::get_create.
2362 (get_create): Move code from ::get function.
2363
2364 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2365
2366 PR target/85994
2367 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
2368 -x assembler-with-cpp.
2369
2370 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2371
2372 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
2373 _FILE_OFFSET_BITS=64 for C++.
2374
2375 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
2376
2377 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
2378 conversion insn that shows up when pr85657-3.c is compiled using
2379 IEEE 128-bit long double.
2380 (neg<mode>2_internal): Use the correct mode to check whether the
2381 mode is IBM extended.
2382 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
2383 multiply and divide external functions from being created more
2384 than once.
2385
2386 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2387
2388 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
2389 functions.
2390 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
2391 the edge can be forwarded.
2392 (cfg_layout_merge_blocks): Likewise.
2393
2394 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2395
2396 * except.c (finish_eh_generation): Commit edge insertions only after
2397 the EH edges have been redirected from post-landing to landing pads.
2398
2399 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2400
2401 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
2402 create_tmp_var_for to create the FRAME decl.
2403 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
2404
2405 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
2406
2407 * tree-inline.c (copy_edges_for_bb): Minor tweak.
2408 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
2409 debug statement when resetting its value.
2410 (expand_call_inline): Copy the locus of the call onto the assignment
2411 of the return value, if any. Use local variable in more cases.
2412
2413 2018-06-21 Martin Liska <mliska@suse.cz>
2414
2415 * ipa-pure-const.c (propagate_nothrow): Use
2416 funct_state_summaries->get.
2417 (dump_malloc_lattice): Likewise.
2418 (propagate_malloc): Likewise.
2419
2420 2018-06-21 Richard Biener <rguenther@suse.de>
2421
2422 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
2423 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
2424 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
2425 comment.
2426 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
2427 BLOCK_ABSTRACT_ORIGIN unconditionally.
2428
2429 2018-06-21 David Malcolm <dmalcolm@redhat.com>
2430
2431 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
2432 deleting it.
2433 * ipa-reference.c (ipa_reference_c_finalize): Delete
2434 ipa_ref_opt_sum_summaries and set it to NULL.
2435
2436 2018-06-21 Tom de Vries <tdevries@suse.de>
2437
2438 PR tree-optimization/85859
2439 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
2440 test with comment from bb_no_side_effects_p.
2441
2442 2018-06-21 Richard Biener <rguenther@suse.de>
2443
2444 PR tree-optimization/86232
2445 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
2446 max for constant niter.
2447
2448 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
2449
2450 * config/aarch64/aarch64-simd.md
2451 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
2452
2453 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
2454
2455 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
2456 Make opernads of the unspec commutative.
2457
2458 2018-06-21 Richard Biener <rguenther@suse.de>
2459
2460 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
2461 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
2462 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
2463 (vect_analyze_data_ref_dependence): Re-order checks to deal with
2464 NULL DR_STEP.
2465 (vect_record_base_alignments): Do not record base alignment
2466 for gathers or scatters.
2467 (vect_compute_data_ref_alignment): Drop return value that is always
2468 true. Bail out early for gathers or scatters.
2469 (vect_enhance_data_refs_alignment): Bail out early for gathers
2470 or scatters.
2471 (vect_find_same_alignment_drs): Likewise.
2472 (vect_analyze_data_refs_alignment): Remove dead code.
2473 (vect_slp_analyze_and_verify_node_alignment): Likewise.
2474 (vect_analyze_data_refs): For possible gathers or scatters do
2475 not create an alternate DR, just check their possible validity
2476 and mark them. Adjust DECL_NONALIASED handling to not rely
2477 on DR_BASE_ADDRESS.
2478 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
2479 update inits of gathers or scatters.
2480 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
2481 Also copy gather/scatter flag to pattern vinfo.
2482
2483 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
2484
2485 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2486 behavior of vec_packsu (vector unsigned long long, vector unsigned
2487 long long) to match behavior of vec_packs with same signature.
2488
2489 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2490 Thomas Schwinge <thomas@codesourcery.com>
2491 Cesar Philippidis <cesar@codesourcery.com>
2492
2493 * gimplify.c (gimplify_scan_omp_clauses): Add support for
2494 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2495 (gimplify_adjust_omp_clauses): Likewise.
2496 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
2497 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
2498 (gimplify_omp_target_update): Update handling of acc update and
2499 enter/exit data.
2500 * omp-low.c (install_var_field): Remove unused parameter
2501 base_pointers_restrict.
2502 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
2503 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
2504 FINALIZE}
2505 (omp_target_base_pointers_restrict_p): Delete.
2506 (scan_omp_target): Update call to scan_sharing_clauses.
2507 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
2508 FINALIZE}.
2509 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
2510 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2511 (convert_local_omp_clauses): Likewise.
2512 * tree-pretty-print.c (dump_omp_clause): Likewise.
2513 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
2514 FINALIZE}.
2515 (omp_clause_code_name): Likewise.
2516
2517 2018-06-20 Jakub Jelinek <jakub@redhat.com>
2518
2519 PR debug/86194
2520 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
2521 be narrowed.
2522
2523 PR tree-optimization/86231
2524 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
2525 anti-range don't overwrite *vr0min before using it to compute *vr0max.
2526
2527 2018-06-20 Tom de Vries <tdevries@suse.de>
2528
2529 PR tree-optimization/86097
2530 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
2531 iv type if signedness of iv type is not the same as that of *nit.
2532
2533 2018-06-20 Jakub Jelinek <jakub@redhat.com>
2534
2535 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
2536 EDGE_EH edges, verify they are all EDGE_EH.
2537
2538 2018-06-20 Maya Rashish <coypu@sdf.org>
2539
2540 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
2541
2542 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2543
2544 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
2545 * config/aarch64/aarch64.c (xgene1_tunings): Add
2546 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
2547 (aarch64_mode_valid_for_sched_fusion_p):
2548 Allow 16-byte modes.
2549 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
2550 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
2551 128-bit modes.
2552 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
2553 New pattern.
2554 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
2555 * config/aarch64/iterators.md (VQ2): New mode iterator.
2556
2557 2018-06-20 Martin Liska <mliska@suse.cz>
2558
2559 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2560 Change default ratio from 10 to 8.
2561
2562 2018-06-20 Martin Liska <mliska@suse.cz>
2563
2564 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2565 New.
2566 (bit_test_cluster::find_bit_tests): Likewise.
2567 (switch_decision_tree::analyze_switch_statement): Find clusters.
2568 * tree-switch-conversion.h (struct jump_table_cluster): Document
2569 hierarchy.
2570
2571 2018-06-20 Martin Liska <mliska@suse.cz>
2572
2573 * tree-switch-conversion.c (switch_conversion::collect):
2574 Record m_uniq property.
2575 (switch_conversion::expand): Bail out for special conditions.
2576 (group_cluster::~group_cluster): New.
2577 (group_cluster::group_cluster): Likewise.
2578 (group_cluster::dump): Likewise.
2579 (jump_table_cluster::emit): New.
2580 (switch_decision_tree::fix_phi_operands_for_edges): New.
2581 (struct case_node): Remove struct.
2582 (jump_table_cluster::can_be_handled): New.
2583 (case_values_threshold): Moved to header.
2584 (reset_out_edges_aux): Likewise.
2585 (jump_table_cluster::is_beneficial): New.
2586 (bit_test_cluster::can_be_handled): Likewise.
2587 (add_case_node): Remove.
2588 (bit_test_cluster::is_beneficial): New.
2589 (case_bit_test::cmp): New.
2590 (bit_test_cluster::emit): New.
2591 (expand_switch_as_decision_tree_p): Remove.
2592 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
2593 (fix_phi_operands_for_edge): Likewise.
2594 (switch_decision_tree::analyze_switch_statement): New.
2595 (compute_cases_per_edge): Move ...
2596 (switch_decision_tree::compute_cases_per_edge): ... here.
2597 (try_switch_expansion): Likewise.
2598 (switch_decision_tree::try_switch_expansion): Likewise.
2599 (record_phi_operand_mapping): Likewise.
2600 (switch_decision_tree::record_phi_operand_mapping): Likewise.
2601 (emit_case_decision_tree): Likewise.
2602 (switch_decision_tree::emit): Likewise.
2603 (balance_case_nodes): Likewise.
2604 (switch_decision_tree::balance_case_nodes): Likewise.
2605 (dump_case_nodes): Likewise.
2606 (switch_decision_tree::dump_case_nodes): Likewise.
2607 (emit_jump): Likewise.
2608 (switch_decision_tree::emit_jump): Likewise.
2609 (emit_cmp_and_jump_insns): Likewise.
2610 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
2611 (emit_case_nodes): Likewise.
2612 (switch_decision_tree::emit_case_nodes): Likewise.
2613 (conditional_probability): Remove.
2614 * tree-switch-conversion.h (enum cluster_type): New.
2615 (PRINT_CASE): New.
2616 (struct cluster): Likewise.
2617 (cluster::cluster): Likewise.
2618 (struct simple_cluster): Likewise.
2619 (simple_cluster::simple_cluster): Likewise.
2620 (struct group_cluster): Likewise.
2621 (struct jump_table_cluster): Likewise.
2622 (struct bit_test_cluster): Likewise.
2623 (struct min_cluster_item): Likewise.
2624 (struct case_tree_node): Likewise.
2625 (case_tree_node::case_tree_node): Likewise.
2626 (jump_table_cluster::case_values_threshold): Likewise.
2627 (struct case_bit_test): Likewise.
2628 (struct switch_decision_tree): Likewise.
2629 (struct switch_conversion): Likewise.
2630 (switch_decision_tree::reset_out_edges_aux): Likewise.
2631
2632 2018-06-20 Martin Liska <mliska@suse.cz>
2633
2634 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
2635 (hoist_edge_and_branch_if_true): Likewise.
2636 (expand_switch_using_bit_tests_p): Likewise.
2637 (struct case_bit_test): Likewise.
2638 (case_bit_test_cmp): Likewise.
2639 (emit_case_bit_tests): Likewise.
2640 (switch_conversion::switch_conversion): New class.
2641 (struct switch_conv_info): Remove old struct.
2642 (collect_switch_conv_info): More to ...
2643 (switch_conversion::collect): ... this.
2644 (check_range): Likewise.
2645 (switch_conversion::check_range): Likewise.
2646 (check_all_empty_except_final): Likewise.
2647 (switch_conversion::check_all_empty_except_final): Likewise.
2648 (check_final_bb): Likewise.
2649 (switch_conversion::check_final_bb): Likewise.
2650 (create_temp_arrays): Likewise.
2651 (switch_conversion::create_temp_arrays): Likewise.
2652 (free_temp_arrays): Likewise.
2653 (gather_default_values): Likewise.
2654 (switch_conversion::gather_default_values): Likewise.
2655 (build_constructors): Likewise.
2656 (switch_conversion::build_constructors): Likewise.
2657 (constructor_contains_same_values_p): Likewise.
2658 (switch_conversion::contains_same_values_p): Likewise.
2659 (array_value_type): Likewise.
2660 (switch_conversion::array_value_type): Likewise.
2661 (build_one_array): Likewise.
2662 (switch_conversion::build_one_array): Likewise.
2663 (build_arrays): Likewise.
2664 (switch_conversion::build_arrays): Likewise.
2665 (gen_def_assigns): Likewise.
2666 (switch_conversion::gen_def_assigns): Likewise.
2667 (prune_bbs): Likewise.
2668 (switch_conversion::prune_bbs): Likewise.
2669 (fix_phi_nodes): Likewise.
2670 (switch_conversion::fix_phi_nodes): Likewise.
2671 (gen_inbound_check): Likewise.
2672 (switch_conversion::gen_inbound_check): Likewise.
2673 (process_switch): Use the newly created class.
2674 (switch_conversion::expand): New.
2675 (switch_conversion::~switch_conversion): New.
2676 * tree-switch-conversion.h: New file.
2677
2678 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2679
2680 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
2681 tree-vect-patterns.c.
2682 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
2683 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
2684 (vect_recog_sad_pattern): Likewise.
2685 (vect_recog_widen_sum_pattern): Likewise.
2686 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
2687 (vect_recog_widen_shift_pattern): Remove the type_in argument.
2688 (vect_recog_rotate_pattern): Likewise.
2689 (vect_recog_mult_pattern): Likewise.
2690 (vect_recog_vector_vector_shift_pattern): Likewise.
2691 (vect_recog_divmod_pattern): Likewise.
2692 (vect_recog_mixed_size_cond_pattern): Likewise.
2693 (vect_recog_bool_pattern): Likewise.
2694 (vect_recog_mask_conversion_pattern): Likewise.
2695 (vect_try_gather_scatter_pattern): Likewise.
2696 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
2697 (vect_recog_over_widening_pattern): Likewise.
2698 (vect_recog_gather_scatter_pattern): Likewise.
2699 (vect_recog_func_ptr): Move from tree-vectorizer.h
2700 (vect_vect_recog_func_ptrs): Move further down the file.
2701 (vect_recog_func): Likewise. Remove the third argument.
2702 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
2703 (vect_pattern_recog_1): Expect the pattern function to do any
2704 necessary target tests. Also expect it to provide a vector type.
2705 Remove the type_in handling.
2706
2707 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2708
2709 * tree-vect-patterns.c (vect_pattern_detected): New function.
2710 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
2711 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
2712 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
2713 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
2714 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2715 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2716 (vect_recog_mask_conversion_pattern)
2717 (vect_try_gather_scatter_pattern): Likewise.
2718
2719 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2720
2721 * tree-vect-patterns.c (vect_get_internal_def): New function.
2722 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2723 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
2724 (search_type_for_mask_1): Use it.
2725
2726 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2727
2728 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2729 redundant WIDEN_SUM_EXPR handling.
2730 (vect_recog_sad_pattern): Likewise.
2731
2732 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2733
2734 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2735 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
2736 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
2737 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
2738 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
2739
2740 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2741
2742 * tree-vect-stmts.c (vectorizable_call): Make sure that we
2743 use the stmt_vec_info of the original bb statement for the
2744 new zero assignment, even if the call is part of a pattern.
2745
2746 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2747
2748 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
2749 that the sequence is attached to the original statement rather
2750 than the pattern statement.
2751 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
2752 PATTERN_DEF_SEQ from the original statement rather than
2753 the main pattern statement.
2754 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
2755 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
2756 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
2757
2758 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2759
2760 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
2761 definition statements before the early exit for statements that aren't
2762 live or relevant.
2763 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
2764 split out from...
2765 (vect_transform_loop): ...here. Process pattern definition
2766 statements without first checking whether the main pattern
2767 statement is live or relevant.
2768
2769 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
2770
2771 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
2772 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
2773
2774 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
2775
2776 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
2777 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
2778 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
2779 (expand_block_compare): Change select_block_compare_mode call.
2780 (expand_strncmp_align_check): Use new functions, fix comment.
2781 (emit_final_str_compare_gpr): New function.
2782 (expand_strn_compare): Refactor and clean up code.
2783 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
2784
2785 2018-06-19 Tony Reix <tony.reix@atos.com>
2786 Damien Bergamini <damien.bergamini@atos.com>
2787 David Edelsohn <dje.gcc@gmail.com>
2788
2789 * collect2.c (static_obj): New variable.
2790 (static_libs): New variable.
2791 (is_in_list): Uncomment declaration.
2792 (main): Track AIX libraries linked statically.
2793 (is_in_list): Uncomment definition.
2794 (scan_prog_file): Don't add AIX shared libraries initializer
2795 to constructor list if linking statically.
2796
2797 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
2798
2799 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
2800 constant.
2801 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
2802
2803 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
2804
2805 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
2806 blocks.
2807
2808 2018-06-19 Martin Liska <mliska@suse.cz>
2809
2810 * config/i386/i386.c (ix86_can_inline_p): Do not use
2811 ipa_fn_summaries::get_create.
2812 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
2813 get.
2814 (devirtualization_time_bonus): Likewise.
2815 (ipcp_propagate_stage): Likewise.
2816 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2817 (edge_set_predicate): Likewise.
2818 (evaluate_conditions_for_known_args): Likewise.
2819 (evaluate_properties_for_edge): Likewise.
2820 (ipa_call_summary::reset): Tranform to ...
2821 (ipa_call_summary::~ipa_call_summary): ... this.
2822 (ipa_fn_summary::reset): Transform to ...
2823 (ipa_fn_summary::~ipa_fn_summary): ... this.
2824 (ipa_fn_summary_t::remove): Rename to ...
2825 (ipa_fn_summary_t::remove_callees): ... this.
2826 (ipa_fn_summary_t::duplicate): Use placement new
2827 instead of memory copy.
2828 (ipa_call_summary_t::duplicate): Likewise.
2829 (ipa_call_summary_t::remove): Remove.
2830 (dump_ipa_call_summary): Change get_create to get.
2831 (ipa_dump_fn_summary): Dump only when summary exists.
2832 (analyze_function_body): Use symbol_summary::get instead
2833 of get_create.
2834 (compute_fn_summary): Likewise.
2835 (estimate_edge_devirt_benefit): Likewise.
2836 (estimate_edge_size_and_time): Likewise.
2837 (inline_update_callee_summaries): Likewise.
2838 (remap_edge_change_prob): Likewise.
2839 (remap_edge_summaries): Likewise.
2840 (ipa_merge_fn_summary_after_inlining): Likewise.
2841 (write_ipa_call_summary): Likewise.
2842 (ipa_fn_summary_write): Likewise.
2843 (ipa_free_fn_summary): Likewise.
2844 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
2845 (struct ipa_call_summary): Likewise.
2846 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
2847 of get_create.
2848 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
2849 (estimate_size_after_inlining): Likewise.
2850 (estimate_growth): Likewise.
2851 (growth_likely_positive): Likewise.
2852 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
2853 (inline_call): Likewise.
2854 * ipa-inline.c (caller_growth_limits): Likewise.
2855 (can_inline_edge_p): Likewise.
2856 (can_inline_edge_by_limits_p): Likewise.
2857 (compute_uninlined_call_time): Likewise.
2858 (compute_inlined_call_time): Likewise.
2859 (want_inline_small_function_p): Likewise.
2860 (edge_badness): Likewise.
2861 (update_caller_keys): Likewise.
2862 (update_callee_keys): Likewise.
2863 (inline_small_functions): Likewise.
2864 (inline_to_all_callers_1): Likewise.
2865 (dump_overall_stats): Likewise.
2866 (early_inline_small_functions): Likewise.
2867 (early_inliner): Likewise.
2868 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
2869 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2870 * ipa-pure-const.c (malloc_candidate_p): Likewise.
2871 * ipa-split.c (execute_split_functions): Likewise.
2872 * symbol-summary.h: Likewise.
2873 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2874
2875 2018-06-19 Richard Biener <rguenther@suse.de>
2876
2877 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
2878 (vectorize_loops): ... here. Fix dbgcnt handling.
2879 (try_vectorize_loop): Wrap try_vectorize_loop_1.
2880
2881 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
2882
2883 PR target/86197
2884 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
2885 ieee128 argument takes up only one (vector) register, not two (floating
2886 point) registers.
2887
2888 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
2889
2890 * gimplify.c (gimplify_init_constructor): Really never clear for an
2891 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
2892
2893 2018-06-19 Richard Biener <rguenther@suse.de>
2894
2895 PR tree-optimization/86179
2896 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
2897 after failed recognition.
2898
2899 2018-06-18 Martin Sebor <msebor@redhat.com>
2900
2901 PR middle-end/85602
2902 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
2903 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
2904 Handle integer subtraction.
2905 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
2906 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
2907
2908 2018-06-18 David Malcolm <dmalcolm@redhat.com>
2909
2910 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
2911 param from rtx to rtx_insn *.
2912 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
2913 param.
2914 (frv_ifcvt_modify_insn): Likwise.
2915 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
2916 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
2917 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
2918 as_a <rtx_insn *> cast to local "unprotected_region" once
2919 it's been established that it's not NULL or pc_rtx.
2920 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
2921 param "sethi" from rtx to rtx_insn *.
2922 (nds32_group_float_insns): Likewise for param "insn".
2923 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
2924 param.
2925 (vax_output_int_subtract): Likewise.
2926 * config/vax/vax.c (vax_output_int_add): Likewise for param
2927 "insn".
2928 (vax_output_int_subtract): Likewise.
2929 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
2930 (emit_pattern_after): Likewise for param "after".
2931 (emit_insn_after): Likewise.
2932 (emit_jump_insn_after): Likewise.
2933 (emit_call_insn_after): Likewise.
2934 (emit_debug_insn_after): Likewise.
2935 (emit_pattern_before): Likewise for param "before".
2936 (emit_insn_before): Likewise.
2937 (emit_jump_insn_before): Likewise.
2938 * final.c (get_insn_template): Likewise for param "insn", removing
2939 a cast.
2940 * output.h (get_insn_template): Likewise for 2nd param.
2941 * rtl.h (emit_insn_before): Likewise.
2942 (emit_jump_insn_before): Likewise.
2943 (emit_debug_insn_before_noloc): Likewise.
2944 (emit_insn_after): Likewise.
2945 (emit_jump_insn_after): Likewise.
2946 (emit_call_insn_after): Likewise.
2947 (emit_debug_insn_after): Likewise.
2948 (set_insn_deleted): Likewise for param.
2949
2950 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
2951
2952 PR target/85358
2953 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
2954 floating point modes, so that IFmode is numerically greater than
2955 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
2956 to declare the ordering. This prevents IFmode from being
2957 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
2958 machine. Include rs6000-modes.h to share the fractional values
2959 between genmodes* and the rest of the compiler.
2960 (IFmode): Likewise.
2961 (KFmode): Likewise.
2962 (TFmode): Likewise.
2963 * config/rs6000/rs6000-modes.h: New file.
2964 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
2965 meaning of rs6000_long_double_size so that 126..128 selects an
2966 appropriate 128-bit floating point type.
2967 (rs6000_option_override_internal): Likewise.
2968 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
2969 (TARGET_LONG_DOUBLE_128): Change the meaning of
2970 rs6000_long_double_size so that 126..128 selects an appropriate
2971 128-bit floating point type.
2972 (LONG_DOUBLE_TYPE_SIZE): Update comment.
2973 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
2974 source and destination to match the standard usage.
2975 (truncifkf2): Likewise.
2976 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
2977 ISA 2.07 to use an explicit clobber, instead of passing in a
2978 temporary.
2979 (copysign<mode>3_soft): Likewise.
2980
2981 2018-06-18 David Malcolm <dmalcolm@redhat.com>
2982
2983 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2984 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
2985 (vect_slp_analyze_instance_dependence): Likewise.
2986 (vect_enhance_data_refs_alignment): Likewise.
2987 (vect_analyze_data_refs_alignment): Likewise.
2988 (vect_slp_analyze_and_verify_instance_alignment
2989 (vect_analyze_data_ref_accesses): Likewise.
2990 (vect_prune_runtime_alias_test_list): Likewise.
2991 (vect_analyze_data_refs): Likewise.
2992 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
2993 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
2994 (vect_analyze_scalar_cycles_1): Likewise.
2995 (vect_get_loop_niters): Likewise.
2996 (vect_analyze_loop_form_1): Likewise.
2997 (vect_update_vf_for_slp): Likewise.
2998 (vect_analyze_loop_operations): Likewise.
2999 (vect_analyze_loop): Likewise.
3000 (vectorizable_induction): Likewise.
3001 (vect_transform_loop): Likewise.
3002 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
3003 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3004 (vect_make_slp_decision): Likewise.
3005 (vect_detect_hybrid_slp): Likewise.
3006 (vect_slp_analyze_operations): Likewise.
3007 (vect_slp_bb): Likewise.
3008 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
3009 (vectorizable_bswap): Likewise.
3010 (vectorizable_call): Likewise.
3011 (vectorizable_simd_clone_call): Likewise.
3012 (vectorizable_conversion): Likewise.
3013 (vectorizable_assignment): Likewise.
3014 (vectorizable_shift): Likewise.
3015 (vectorizable_operation): Likewise.
3016 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
3017
3018 2018-06-18 Martin Sebor <msebor@redhat.com>
3019
3020 PR tree-optimization/81384
3021 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
3022 * builtins.c (expand_builtin_strnlen): New function.
3023 (expand_builtin): Call it.
3024 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
3025 * builtins.def (BUILT_IN_STRNLEN): New.
3026 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
3027 Warn for bounds in excess of maximum object size.
3028 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
3029 single-value ranges. Handle strnlen.
3030 (handle_builtin_strlen): Handle strnlen.
3031 (strlen_check_and_optimize_stmt): Same.
3032 * doc/extend.texi (Other Builtins): Document strnlen.
3033
3034 2018-06-18 Maya Rashish <coypu@sdf.org>
3035
3036 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
3037 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
3038 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
3039
3040 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
3041 here to ...
3042 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
3043
3044 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3045
3046 * tree.c (escaped_string::escape): Replace cast to char * by
3047 const_cast<char *> (unescaped).
3048
3049 2018-06-18 Nick Clifton <nickc@redhat.com>
3050
3051 PR 84195
3052 * tree.c (escaped_string): New class. Converts an unescaped
3053 string into its escaped equivalent.
3054 (warn_deprecated_use): Use the new class to convert the
3055 deprecation message, if present.
3056 (test_escaped_strings): New self test.
3057 (test_c_tests): Add test_escaped_strings.
3058 * doc/extend.texi (deprecated): Add a note that the
3059 deprecation message is affected by the -fmessage-length
3060 option, and that control characters will be escaped.
3061 (#pragma GCC error): Document this pragma.
3062 (#pragma GCC warning): Likewise.
3063 * doc/invoke.texi (-fmessage-length): Document this option's
3064 effect on the #warning and #error preprocessor directives and
3065 the deprecated attribute.
3066
3067 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
3068
3069 * tree.c (decl_value_expr_lookup): Revert latest change.
3070 (decl_value_expr_insert): Likewise.
3071
3072 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
3073
3074 * gimplify.c (nonlocal_vlas): Delete.
3075 (nonlocal_vla_vars): Likewise.
3076 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
3077 referenced VLAs.
3078 (gimplify_body): Do not create and destroy nonlocal_vlas.
3079 * tree-nested.c: Include diagnostic.h.
3080 (use_pointer_in_frame): Tweak.
3081 (lookup_field_for_decl): Add assertion and declare the transformation.
3082 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
3083 internal error when the reference is in a wrong context. Do not
3084 create a debug decl by default.
3085 (note_nonlocal_block_vlas): Delete.
3086 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
3087 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
3088 create a debug decl by default.
3089 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
3090 call is in a wrong context.
3091 (fixup_vla_decls): New function.
3092 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
3093 debug variables were created.
3094 * tree.c (decl_value_expr_lookup): Add checking assertion.
3095 (decl_value_expr_insert): Likewise.
3096
3097 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3098
3099 PR middle-end/82479
3100 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
3101 * tree-scalar-evolution.c (interpret_expr): Likewise.
3102 (expression_expensive_p): Likewise.
3103 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
3104 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
3105 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
3106 (ssa_defined_by_minus_one_stmt_p): New.
3107
3108 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3109
3110 PR middle-end/64946
3111 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
3112 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
3113 * dojump.c (do_jump): Likewise.
3114 * expr.c (expand_expr_real_2): Check operand type's sign.
3115 * fold-const.c (const_unop): Handle ABSU_EXPR.
3116 (fold_abs_const): Likewise.
3117 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
3118 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
3119 (strip_sign_op_1): Likesise.
3120 * match.pd: Add new pattern to generate ABSU_EXPR.
3121 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
3122 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3123 * tree-eh.c (operation_could_trap_helper_p): Likewise.
3124 * tree-inline.c (estimate_operator_cost): Likewise.
3125 * tree-pretty-print.c (dump_generic_node): Likewise.
3126 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
3127 * tree.def (ABSU_EXPR): New.
3128
3129 2018-06-16 Jakub Jelinek <jakub@redhat.com>
3130
3131 PR middle-end/86095
3132 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
3133 documented as preserved for backward compatibility only.
3134 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
3135
3136 PR rtl-optimization/86108
3137 * bb-reorder.c (create_forwarder_block): Renamed to ...
3138 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
3139 jump from new landing pad to the second part.
3140 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
3141 Adjust callers.
3142
3143 2018-06-15 Jakub Jelinek <jakub@redhat.com>
3144
3145 PR middle-end/85878
3146 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
3147 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
3148 Only call store_expr for halves if the mode is the same.
3149
3150 PR middle-end/86123
3151 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
3152 Fix up comment formatting.
3153
3154 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3155
3156 * typed-splay-tree.h (typed_splay_tree::remove): New function.
3157 (typed_splay_tree::closure,
3158 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
3159 (typed_splay_tree::typed_splay_tree,
3160 typed_splay_tree::operator =): Declared private.
3161 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
3162 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
3163 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
3164 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
3165 typed_splay_tree::splay_tree_splay,
3166 typed_splay_tree::splay_tree_foreach_helper,
3167 typed_splay_tree::splay_tree_insert,
3168 typed_splay_tree::splay_tree_remove,
3169 typed_splay_tree::splay_tree_lookup,
3170 typed_splay_tree::splay_tree_predecessor,
3171 typed_splay_tree::splay_tree_successor,
3172 typed_splay_tree::splay_tree_min,
3173 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
3174 (typed_splay_tree::root, typed_splay_tree::comp,
3175 typed_splay_tree::delete_key,
3176 typed_splay_tree::delete_value): New data members.
3177 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
3178 typed_splay_tree::remove.
3179
3180 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
3181
3182 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
3183 -mginv and -mno-ginv to the assembler.
3184 * config/mips/mips.opt (-mcrc): New option.
3185 (-mginv): Likewise.
3186 * doc/invoke.text (-mcrc): Document.
3187 (-mginv): Likewise.
3188
3189 2018-06-15 Nick Clifton <nickc@redhat.com>
3190
3191 PR 84195
3192 * tree.c (escaped_string): New class. Converts an unescaped
3193 string into its escaped equivalent.
3194 (warn_deprecated_use): Use the new class to convert the
3195 deprecation message, if present.
3196 (test_escaped_strings): New self test.
3197 (test_c_tests): Add test_escaped_strings.
3198 * doc/extend.texi (deprecated): Add a note that the
3199 deprecation message is affected by the -fmessage-length
3200 option, and that control characters will be escaped.
3201 (#pragma GCC error): Document this pragma.
3202 (#pragma GCC warning): Likewise.
3203 * doc/invoke.texi (-fmessage-length): Document this option's
3204 effect on the #warning and #error preprocessor directives and
3205 the deprecated attribute.
3206
3207 2018-06-15 Richard Biener <rguenther@suse.de>
3208
3209 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
3210 here, also noting vector size used.
3211 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
3212 size used in MSG_OPTIMIZED_LOCATIONS dump.
3213 (pass_slp_vectorize::execute): Adjust.
3214
3215 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
3216
3217 PR target/85968
3218 * config/arc/arc.c (arc_return_address_register): Fix
3219 if-condition.
3220
3221 2018-06-15 Richard Biener <rguenther@suse.de>
3222
3223 PR middle-end/86159
3224 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
3225 leave useless conversion stripping to force_gimple_operand_gsi.
3226 (gimplify_build2): Likewise.
3227 (gimplify_build1): Likewise.
3228
3229 2018-06-15 Richard Biener <rguenther@suse.de>
3230
3231 PR middle-end/86076
3232 * tree-cfg.c (move_stmt_op): unshare invariant addresses
3233 before adjusting their block.
3234
3235 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
3236
3237 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
3238 multilibs for *-*-rtems*.
3239 * config/riscv/t-rtems: New file.
3240
3241 2018-06-14 Jakub Jelinek <jakub@redhat.com>
3242
3243 PR middle-end/86122
3244 * match.pd ((A +- CST1) +- CST2): Punt if last resort
3245 unsigned_type_for returns NULL.
3246
3247 PR target/85945
3248 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
3249 subregs of multi-word pseudos unless the float mode has word size.
3250
3251 2018-06-14 Richard Biener <rguenther@suse.de>
3252
3253 PR middle-end/86139
3254 * tree-vect-generic.c (build_word_mode_vector_type): Remove
3255 duplicate and harmful type_hash_canon.
3256 * tree.c (type_hash_canon): Assert we didn't find ourselves.
3257
3258 2018-06-14 Richard Biener <rguenther@suse.de>
3259
3260 PR ipa/86124
3261 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
3262 NULL cgraph_node.
3263
3264 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3265
3266 * config/rtems.h (STDINT_LONG32): Define.
3267
3268 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
3269 Prachi Godbole <prachi.godbole@imgtec.com>
3270
3271 * config/mips/mips-cpus.def: Define P6600.
3272 * config/mips/mips-tables.opt: Regenerate.
3273 * config/mips/mips.c (mips_ucbranch_type): New enum.
3274 (mips_rtx_cost_data): Add support for P6600.
3275 (mips_issue_rate): Likewise.
3276 (mips_multipass_dfa_lookahead): Likewise.
3277 (mips_avoid_hazard): Likewise.
3278 (mips_reorg_process_insns): Likewise.
3279 (mips_classify_branch_p6600): New function.
3280 * config/mips/mips.h (TUNE_P6600): New define.
3281 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
3282 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
3283 * config/mips/mips.md: Include p6600.md.
3284 (processor): Add p6600.
3285 * config/mips/p6600.md: New file.
3286 * doc/invoke.texi: Add p6600 to supported architectures.
3287
3288 2018-06-13 Martin Sebor <msebor@redhat.com>
3289
3290 PR tree-optimization/86114
3291 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
3292 of integer types.
3293 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
3294
3295 2018-06-13 Richard Biener <rguenther@suse.de>
3296
3297 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
3298 Properly set vector type of the intermediate stmt.
3299 * tree-vect-stmts.c (vectorizable_operation): The destination
3300 var always has vectype_out type.
3301
3302 2018-06-13 Jeff Law <law@redhat.com>
3303
3304 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
3305 integer 0 for argument to print_rtl_with_bb.
3306 (rl78_reorg): Likewise.
3307
3308 2018-06-13 David Malcolm <dmalcolm@redhat.com>
3309
3310 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
3311 from rtx to rtx_insn *.
3312 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
3313 "label".
3314 (add_sched_insns_for_speculation): Likewise for local "target",
3315 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3316 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
3317 from rtx_insn ** to rtx_code_label **.
3318 (reorg_emit_nops): Likewise.
3319 (c6x_reorg): Likewise for local "call_labels".
3320 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
3321 rtx to rtx_insn *.
3322 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
3323 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
3324 the loops over LABEL_REFS.
3325 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
3326 braf_label.
3327 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3328 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
3329 (split_branches): Strengthen local "olabel" from rtx to
3330 rtx_insn *, adding a safe_as_a cast.
3331 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
3332 to "rtx_insn *".
3333 (add_insn_after): Likewise for first two params.
3334 (add_insn_before): Likewise.
3335 (remove_insn): Likewise for param.
3336 (emit_pattern_before_noloc): Likewise for second and third params.
3337 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
3338 (emit_call_insn_before_noloc): Likewise.
3339 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
3340 to "rtx_insn *".
3341 (emit_barrier_before): Likewise.
3342 (emit_label_before): Strengthen "label" param from "rtx" to
3343 "rtx_code_label *". Strengthen "before" param from "rtx" to
3344 "rtx_insn *".
3345 (emit_insn_after_1): Strengthen "after" param from "rtx" to
3346 "rtx_insn *".
3347 (emit_pattern_after_noloc): Likewise.
3348 (emit_insn_after_noloc): Likewise.
3349 (emit_jump_insn_after_noloc): Likewise.
3350 (emit_call_insn_after_noloc): Likewise.
3351 (emit_debug_insn_after_noloc): Likewise.
3352 (emit_barrier_after): Likewise.
3353 (emit_label_after): Likewise for both params.
3354 (emit_pattern_after_setloc): Likewise for "after" param. Convert
3355 "loc" param from "int" to "location_t".
3356 (emit_insn_after_setloc): Likewise.
3357 (emit_jump_insn_after_setloc): Likewise.
3358 (emit_call_insn_after_setloc): Likewise.
3359 (emit_debug_insn_after_setloc): Likewise.
3360 (emit_pattern_before_setloc): Likewise for "before" param. Convert
3361 "loc" param from "int" to "location_t".
3362 (emit_pattern_before): Convert NULL_RTX to NULL.
3363 (emit_insn_before_setloc): Convert "loc" param from "int" to
3364 "location_t".
3365 (emit_jump_insn_before_setloc): Likewise.
3366 (emit_call_insn_before_setloc): Likewise.
3367 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
3368 rtx_insn *. Convert "loc" param from "int" to "location_t".
3369 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
3370 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
3371 Convert 3rd param from "int" to "location_t".
3372 (emit_barrier_before, emit_barrier_after, next_real_insn):
3373 Strengthen param from rtx to rtx_insn *.
3374 (emit_label_before): Strengthen 1st param from "rtx" to
3375 "rtx_code_label *". Strengthen 2nd param from "rtx" to
3376 "rtx_insn *".
3377 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
3378 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
3379 Strengthen 2nd param from "rtx" to "rtx_insn *".
3380 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
3381 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
3382 Likewise. Convert 3rd param from "int" to "location_t".
3383 (emit_label_after): Strengthen 1st param from "rtx" to
3384 "rtx_code_label *".
3385 (next_real_insn, remove_insn): Strengthen param from "rtx" to
3386 "rtx_insn *".
3387 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
3388 from "rtx" to "rtx_insn *".
3389
3390 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
3391
3392 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
3393 bodies streamed in with -Q.
3394 * dumpfile.c (dump_files): Add lto-stream-out dump file.
3395 * dumpfile.h (tree_dump_index): Add lto_stream_out.
3396 * gimple-streamer-out.c: Include gimple-pretty-print.h
3397 (output_bb): Dump stmts streamed.
3398 * lto-section-out.c: Include print-tree.h
3399 (lto_begin_section): Dump sections created.
3400 (lto_output_decl_index): Dump decl encoded.
3401 * lto-streamer-out.c: Include print-tree.h
3402 (create_output_block): Dump output block created.
3403 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
3404 (output_function): Dump function output.
3405 (output_constructor): Dump constructor streamed.
3406 (write_global_stream): Output indexes encoded.
3407 (produce_asm_for_decls): Dump streams encoded.
3408 * lto-streamer.c (streamer_dump_file): New global var.
3409 * lto-streamer.h (streamer_dump_file): Declare.
3410 * passes.c (ipa_write_summaries): Initialize streamer dump.
3411 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
3412 in.
3413
3414 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
3415
3416 PR target/86048
3417 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
3418 offsets for register save directives. Emit a second batch of save
3419 directives, if need be, when the function accesses prior frames.
3420
3421 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3422
3423 * config/arc/fpu.md (fmasf4): Force operand to register.
3424 (fnmasf4): Likewise.
3425
3426 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3427
3428 * config/arc/arc-protos.h (arc_pad_return): Remove.
3429 * config/arc/arc.c (machine_function): Remove force_short_suffix
3430 and size_reason.
3431 (arc_print_operand): Adjust printing of '&'.
3432 (arc_verify_short): Remove conditional printing of short suffix.
3433 (arc_final_prescan_insn): Remove reference to size_reason.
3434 (pad_return): New function.
3435 (arc_reorg): Call pad_return.
3436 (arc_pad_return): Remove.
3437 (arc_init_machine_status): Remove reference to force_short_suffix.
3438 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
3439 (attr length): When attribute iscompact is true force to 2
3440 regardless; in the case of maybe check if we want to force the
3441 instruction to have 4 bytes length.
3442 (nopv): Change it to generate 4 byte long nop as well.
3443 (blockage): New pattern.
3444 (simple_return): Remove call to arc_pad_return.
3445 (p_return_i): Likewise.
3446
3447 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3448
3449 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
3450
3451 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3452
3453 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
3454 ARC cores.
3455
3456 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3457
3458 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
3459 for ARC700 and ARCv2.
3460
3461 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
3462
3463 PR target/86076
3464 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
3465 operands[2] instead of operands[1].
3466
3467
3468 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
3469
3470 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
3471 case, check whether the outer register overlaps an unallocatable
3472 register, not just whether it fits the required class.
3473
3474 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
3475
3476 * poly-int.h (can_div_trunc_p): Add new overload in which all values
3477 are poly_ints.
3478 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
3479 (memrefs_conflict_p): Likewise.
3480 (init_alias_analysis): Likewise.
3481 * cfgexpand.c (expand_debug_expr): Likewise.
3482 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
3483 * cse.c (fold_rtx): Likewise.
3484 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
3485 * expr.c (emit_block_move_hints): Likewise.
3486 (clear_storage_hints, push_block, emit_push_insn): Likewise.
3487 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
3488 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
3489 (emit_group_store): Likewise.
3490 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
3491 to read the PRE/POST_MODIFY increment.
3492 * calls.c (store_one_arg): Use strip_offset.
3493 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
3494 poly_int_rtx_p.
3495 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
3496 by a VEC_SELECT.
3497 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
3498 (simplify_binary_operation_1): Extend CONST_INT handling to
3499 poly_int_rtx_p.
3500 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
3501 than a HOST_WIDE_INT.
3502 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
3503 poly_int64.
3504 (adjust_mems, add_stores): Update accodingly.
3505 (vt_canonicalize_addr): Track polynomial offsets.
3506 (emit_note_insn_var_location): Likewise.
3507 (vt_add_function_parameter): Likewise.
3508 (vt_initialize): Likewise.
3509
3510 2018-06-12 Jeff Law <law@redhat.com>
3511
3512 * config.gcc (alpha*-*-freebsd*): Remove.
3513 * config/alpha/freebsd.h: Remove.
3514
3515 2018-06-12 David Malcolm <dmalcolm@redhat.com>
3516
3517 PR other/69968
3518 * spellcheck-tree.c (levenshtein_distance): Rename to...
3519 (get_edit_distance): ...this, and update for underlying renaming.
3520 * spellcheck-tree.h (levenshtein_distance): Rename to...
3521 (get_edit_distance): ...this.
3522 * spellcheck.c (levenshtein_distance): Rename to...
3523 (get_edit_distance): ...this. Convert from Levenshtein distance
3524 to Damerau-Levenshtein distance by supporting transpositions of
3525 adjacent characters. Rename "v1" to "v_next" and "v0" to
3526 "v_one_ago".
3527 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
3528 (selftest::test_edit_distance_unit_test_oneway): ...this, and
3529 update for underlying renaming.
3530 (selftest::levenshtein_distance_unit_test): Rename to...
3531 (selftest::test_get_edit_distance_unit): ...this, and update for
3532 underlying renaming.
3533 (selftest::test_find_closest_string): Add example from PR 69968
3534 where transposition helps
3535 (selftest::test_metric_conditions): Update for renaming.
3536 (selftest::test_metric_conditions): Likewise.
3537 (selftest::spellcheck_c_tests): Likewise.
3538 * spellcheck.h (levenshtein_distance): Rename both overloads to...
3539 (get_edit_distance): ...this.
3540 (best_match::consider): Update for renaming.
3541
3542 2018-06-12 Martin Sebor <msebor@redhat.com>
3543
3544 PR tree-optimization/85259
3545 * builtins.c (compute_objsize): Handle constant offsets.
3546 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
3547 true iff a warning has been issued.
3548 * gimple.h (gimple_nonartificial_location): New function.
3549 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
3550 gimple_nonartificial_location and handle -Wno-system-headers.
3551 (handle_builtin_stxncpy): Same.
3552
3553 2018-06-12 Martin Sebor <msebor@redhat.com>
3554
3555 PR c/85931
3556 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
3557
3558 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
3559
3560 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
3561 BUILTIN_VEC_XST entries for pointer to double and long long.
3562
3563 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
3564
3565 PR target/85990
3566 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
3567 Update comments.
3568 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
3569 Likewise.
3570
3571 2018-06-12 Martin Liska <mliska@suse.cz>
3572
3573 * doc/options.texi: Document IntegerRange.
3574
3575 2018-06-12 Martin Liska <mliska@suse.cz>
3576
3577 * config/i386/i386.opt: Make MPX-related options as Deprecated.
3578 * opt-functions.awk: Handle Deprecated flag.
3579 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
3580 and report error.
3581 (read_cmdline_option): Report warning for a deprecated option.
3582 * opts.h (struct cl_option): Add new field cl_deprecated.
3583 (CL_ERR_DEPRECATED): New.
3584
3585 2018-06-12 Martin Liska <mliska@suse.cz>
3586
3587 * doc/options.texi: Document Deprecated option flag.
3588
3589 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3590
3591 * config/arc/arc-arch.h (arc_extras): New enum.
3592 (arc_cpu_t):Add field extra.
3593 (arc_cpu_types): Consider the extras.
3594 * config/arc/arc-cpus.def: Add extras info.
3595 * config/arc/arc-opts.h (processor_type): Consider extra field.
3596 * config/arc/arc.c (arc_override_options): Handle extra field.
3597
3598 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3599
3600 * config/arc/arc-arch.h: Update ARC_OPTX macro.
3601 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
3602 field.
3603 * config/arc/arc.c (arc_init): Update pic warning.
3604 (irq_range): Update irq range parsing warnings.
3605 (arc_override_options): Update various warning messages.
3606 (arc_handle_aux_attribute): Likewise.
3607
3608 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
3609
3610 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
3611
3612 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3613
3614 * doc/sourcebuild.texi: Document usage of line number 0 in verify
3615 compiler messages directives.
3616
3617 2018-06-12 Matthew Fortune <mfortune@gmail.com>
3618
3619 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
3620 * config/mips/mips-tables.opt: Regenerate.
3621 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
3622 mips64r6.
3623 * doc/invoke.texi: Document -march=i6500.
3624
3625 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
3626
3627 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
3628 (i6400_gpmul): Add cpu_unit.
3629 (i6400_gpdiv): Likewise.
3630 (i6400_msa_add_d): Update reservations.
3631 (i6400_msa_int_add) Likewise.
3632 (i6400_msa_short_logic3) Likewise.
3633 (i6400_msa_short_logic2) Likewise.
3634 (i6400_msa_short_logic) Likewise.
3635 (i6400_msa_move) Likewise.
3636 (i6400_msa_cmp) Likewise.
3637 (i6400_msa_short_float2) Likewise.
3638 (i6400_msa_div_d) Likewise.
3639 (i6400_msa_long_logic1) Likewise.
3640 (i6400_msa_long_logic2) Likewise.
3641 (i6400_msa_mult) Likewise.
3642 (i6400_msa_long_float2) Likewise.
3643 (i6400_msa_long_float4) Likewise.
3644 (i6400_msa_long_float5) Likewise.
3645 (i6400_msa_long_float8) Likewise.
3646 (i6400_fpu_fadd): Include frint type.
3647 (i6400_fpu_store): New define_insn_reservation.
3648 (i6400_fpu_load): Likewise.
3649 (i6400_fpu_move): Likewise.
3650 (i6400_fpu_fcmp): Likewise.
3651 (i6400_fpu_fmadd): Likewise.
3652 (i6400_int_mult): Include imul3nc type and update reservation.
3653 (i6400_int_div): Include idiv3 type and update reservation.
3654 (i6400_int_load): Update to check type not move_type.
3655 (i6400_int_store): Likewise.
3656 (i6400_int_prefetch): Set zero latency.
3657
3658 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
3659
3660 * gcc.c: Document new %@{...} sequence.
3661 (LINK_COMMAND_SPEC): Use it for the -L switches.
3662 (cpp_unique_options): Use it for the -I switches.
3663 (at_file_argbuf): New global variable.
3664 (in_at_file): Likewise.
3665 (alloc_args): Create at_file_argbuf.
3666 (clear_args): Truncate at_file_argbuf.
3667 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
3668 (open_at_file): New function.
3669 (close_at_file): Likewise.
3670 (create_at_file): Delete.
3671 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
3672 <'o'>: Likewise.
3673 <'@'>: New case.
3674 (validate_switches_from_spec): Deal with %@{...} sequence.
3675 (validate_switches): Likewise.
3676 (driver::finalize): Call clear_args.
3677
3678 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
3679
3680 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
3681
3682 2018-06-11 Martin Sebor <msebor@redhat.com>
3683
3684 * doc/invoke.texi (-Wall): List -Wc++17-compat.
3685 (Wno-class-memaccess): Add @opindex.
3686 (Wno-templates, Wno-multiple-inheritance): Same.
3687 (Wno-virtual-inheritance, Wno-namespaces): Same.
3688 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
3689 (Wno-format-overflow, Wno-format-truncation): Same.
3690 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
3691 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
3692 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
3693 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
3694 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
3695 (Wno-misspelled-isr): Same.
3696
3697 2018-06-11 Martin Sebor <msebor@redhat.com>
3698
3699 * PR tree-optimization/86083
3700 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
3701
3702 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
3703
3704 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
3705
3706 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
3707
3708 PR target/85755
3709 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
3710 on the correct operand.
3711 (*movdi_internal64): Ditto.
3712
3713 2018-06-11 Martin Liska <mliska@suse.cz>
3714
3715 PR tree-optimization/86089
3716 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
3717
3718 2018-06-11 Julia Koval <julia.koval@intel.com>
3719
3720 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
3721 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
3722 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
3723
3724 2018-06-11 Olivier Hainque <hainque@adacore.com>
3725
3726 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
3727 for Ada with strict dwarf2.
3728
3729 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
3730
3731 PR target/85755
3732 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
3733 addresses.
3734
3735 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
3736
3737 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
3738
3739 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
3740
3741 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
3742 TARGET_ELF.
3743
3744 2018-06-08 Martin Liska <mliska@suse.cz>
3745
3746 * tree-cfg.h (debug_function): Fix argument type to match
3747 implementation.
3748
3749 2018-06-08 Martin Liska <mliska@suse.cz>
3750
3751 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
3752 Remove usage of MPX-related (and removed) fields.
3753 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
3754
3755 2018-06-08 David Malcolm <dmalcolm@redhat.com>
3756
3757 * cfg.c (debug): Use TDF_NONE rather than 0.
3758 * cfghooks.c (debug): Likewise.
3759 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
3760 (struct dump_option_value_info): Convert to...
3761 (struct kv_pair): ...this template type.
3762 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
3763 rather than 0.
3764 (optinfo_verbosity_options): Likewise.
3765 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
3766 OPTGROUP_NONE.
3767 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
3768 than int for "optgroup_flags" param.
3769 (dump_generic_expr_loc): Use dump_flags_t rather than int for
3770 "dump_kind" param.
3771 (dump_dec): Likewise.
3772 (dump_finish): Use TDF_NONE rather than 0.
3773 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
3774 rather than int for "optgroup_flags" param. Use TDF_NONE rather
3775 than 0. Update for change to option_ptr.
3776 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
3777 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
3778 0. Update for changes to optinfo_verbosity_options and
3779 optgroup_options.
3780 (opt_info_switch_p): Convert optgroup_flags from int to
3781 optgroup_flags_t.
3782 (dump_basic_block): Use dump_flags_t rather than int
3783 for "dump_kind" param.
3784 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
3785 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
3786 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
3787 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
3788 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
3789 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
3790 TDF_NONE): Convert from macros to...
3791 (enum dump_flag): ...this new enum.
3792 (dump_flags_t): Update to use enum.
3793 (operator|, operator&, operator~, operator|=, operator&=):
3794 Implement for dump_flags_t.
3795 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
3796 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
3797 Convert from macros to...
3798 (enum optgroup_flag): ...this new enum.
3799 (optgroup_flags_t): New typedef.
3800 (operator|, operator|=): Implement for optgroup_flags_t.
3801 (struct dump_file_info): Convert field "alt_flags" to
3802 dump_flags_t. Convert field "optgroup_flags" to
3803 optgroup_flags_t.
3804 (dump_basic_block): Use dump_flags_t rather than int for param.
3805 (dump_generic_expr_loc): Likewise.
3806 (dump_dec): Likewise.
3807 (dump_register): Convert param "optgroup_flags" to
3808 optgroup_flags_t.
3809 (opt_info_enable_passes): Likewise.
3810 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
3811 than 0.
3812 * gimple-pretty-print.c (debug): Likewise.
3813 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
3814 (merged_store_group::apply_stores): Likewise.
3815 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
3816 * gimple.c (verify_gimple_pp): Likewise.
3817 * graphite-poly.c (print_pbb_body): Likewise.
3818 * passes.c (pass_manager::register_one_dump_file): Convert
3819 local "optgroup_flags" to optgroup_flags_t.
3820 * print-tree.c (print_node): Use TDF_NONE rather than 0.
3821 (debug): Likewise.
3822 (debug_body): Likewise.
3823 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
3824 to optgroup_flags_t.
3825 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
3826 than 0.
3827 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
3828 (convert_mult_to_fma): Likewise.
3829 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
3830 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
3831 * tree-vect-data-refs.c (dump_lower_bound): Convert param
3832 "dump_kind" to dump_flags_t.
3833
3834 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
3835
3836 * config/rs6000/rs6000.c (min, max): Delete.
3837
3838 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
3839
3840 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
3841 -mabi=spe and -mabi=no-spe.
3842
3843 2018-06-08 Martin Liska <mliska@suse.cz>
3844
3845 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
3846 where we expect an existing summary.
3847
3848 2018-06-08 Martin Liska <mliska@suse.cz>
3849
3850 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
3851 * ipa-inline.h (estimate_edge_growth): Likewise.
3852
3853 2018-06-08 Martin Liska <mliska@suse.cz>
3854
3855 * cgraph.c (function_version_hasher::hash): Use
3856 cgraph_node::get_uid ().
3857 (function_version_hasher::equal):
3858 * cgraph.h (cgraph_node::get_uid): New method.
3859 * ipa-inline.c (update_caller_keys): Use
3860 cgraph_node::get_uid ().
3861 (update_callee_keys): Likewise.
3862 * ipa-utils.c (searchc): Likewise.
3863 (ipa_reduced_postorder): Likewise.
3864 * lto-cgraph.c (input_node): Likewise.
3865 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
3866 * symbol-summary.h (symtab_insertion): Likewise.
3867 (symtab_removal): Likewise.
3868 (symtab_duplication): Likewise.
3869 * tree-pretty-print.c (dump_function_header): Likewise.
3870 * tree-sra.c (convert_callers_for_node): Likewise.
3871
3872 2018-06-08 Martin Liska <mliska@suse.cz>
3873
3874 * cgraph.c (symbol_table::create_edge): Always assign a new
3875 unique number.
3876 (symbol_table::free_edge): Do not recycle numbers.
3877 * cgraph.h (cgraph_edge::get): New method.
3878 * symbol-summary.h (symtab_removal): Use it.
3879 (symtab_duplication): Likewise.
3880 (call_summary::hashable_uid): Remove.
3881
3882 2018-06-08 Martin Liska <mliska@suse.cz>
3883
3884 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
3885 (initialize_growth_caches): Remove.
3886 (free_growth_caches): Likewise.
3887 (do_estimate_edge_time): Use edge_growth_cache.
3888 (do_estimate_edge_size): Likewise.
3889 (do_estimate_edge_hints): Likewise.
3890 * ipa-inline.c (reset_edge_caches): Likewise.
3891 (recursive_inlining): Likewise.
3892 (inline_small_functions): Likewise.
3893 * ipa-inline.h (initialize_growth_caches): Remove.
3894 (estimate_edge_size): Likewise.
3895 (estimate_edge_time): Likewise.
3896 (estimate_edge_hints): Likewise.
3897 (reset_edge_growth_cache): Likewise.
3898 * symbol-summary.h (call_summary::remove): New method.
3899
3900 2018-06-08 Martin Liska <mliska@suse.cz>
3901
3902 * ipa-cp.c (class edge_clone_summary): New summary.
3903 (grow_edge_clone_vectors): Remove.
3904 (ipcp_edge_duplication_hook): Remove.
3905 (class edge_clone_summary_t): New call_summary class.
3906 (ipcp_edge_removal_hook): Remove.
3907 (edge_clone_summary_t::duplicate): New function.
3908 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
3909 (create_specialized_node): Likewise.
3910 (ipcp_driver): Initialize edge_clone_summaries and do not
3911 register hooks.
3912
3913 2018-06-08 Martin Liska <mliska@suse.cz>
3914
3915 * symbol-summary.h (get): New function.
3916 (call_summary::m_initialize_when_cloning): New class member.
3917
3918 2018-06-08 Martin Liska <mliska@suse.cz>
3919
3920 * cgraph.c (cgraph_node::remove): Do not recycle uid.
3921 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
3922 (symbol_table::allocate_cgraph_symbol): Do not set uid.
3923 * passes.c (uid_hash_t): Record removed_nodes by their uids.
3924 (remove_cgraph_node_from_order): Use the removed_nodes set.
3925 (do_per_function_toporder): Likwise.
3926 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
3927 instead of summary_uid.
3928 (symtab_removal): Likewise.
3929 (symtab_duplication): Likewise.
3930
3931 2018-06-08 Martin Liska <mliska@suse.cz>
3932
3933 * ipa-cp.c (ipcp_store_bits_results): Use
3934 ipcp_transformation_sum.
3935 (ipcp_store_vr_results): Likewise.
3936 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
3937 to ...
3938 (ipcp_transformation_initialize): ... this.
3939 (ipa_set_node_agg_value_chain):
3940 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
3941 (write_ipcp_transformation_info): Likewise.
3942 (read_ipcp_transformation_info): Likewise.
3943 (ipcp_update_bits): Likewise.
3944 (ipcp_update_vr): Likewise.
3945 (ipcp_transform_function): Likewise.
3946 * ipa-prop.h: Rename ipcp_transformation_summary to
3947 ipcp_transformation.
3948 (class ipcp_transformation_t): New function summary.
3949 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
3950 (ipa_get_agg_replacements_for_node): Likewise.
3951
3952 2018-06-08 Martin Liska <mliska@suse.cz>
3953
3954 * ipa-pure-const.c (struct funct_state_d): Do it class instead
3955 of struct.
3956 (class funct_state_summary_t): New function_summary class.
3957 (has_function_state): Remove.
3958 (get_function_state): Likewise.
3959 (set_function_state): Likewise.
3960 (add_new_function): Likewise.
3961 (funct_state_summary_t::insert): New function.
3962 (duplicate_node_data): Remove.
3963 (remove_node_data): Remove.
3964 (funct_state_summary_t::duplicate): New function.
3965 (register_hooks): Create new funct_state_summaries.
3966 (pure_const_generate_summary): Use it.
3967 (pure_const_write_summary): Likewise.
3968 (pure_const_read_summary): Likewise.
3969 (propagate_pure_const): Likewise.
3970 (propagate_nothrow): Likewise.
3971 (dump_malloc_lattice): Likewise.
3972 (propagate_malloc): Likewise.
3973 (execute): Do not register hooks, just remove summary
3974 instead.
3975 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
3976 constructor.
3977
3978 2018-06-08 Martin Liska <mliska@suse.cz>
3979
3980 * ipa-reference.c (remove_node_data): Remove.
3981 (duplicate_node_data): Likewise.
3982 (class ipa_ref_var_info_summary_t): New class.
3983 (class ipa_ref_opt_summary_t): Likewise.
3984 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
3985 (get_reference_optimization_summary): Use
3986 ipa_ref_opt_sum_summaries.
3987 (set_reference_vars_info): Remove.
3988 (set_reference_optimization_summary): Likewise.
3989 (ipa_init): Create summaries.
3990 (init_function_info): Use function summary.
3991 (ipa_ref_opt_summary_t::duplicate): New function.
3992 (ipa_ref_opt_summary_t::remove): New function.
3993 (get_read_write_all_from_node): Fix GNU coding style.
3994 (propagate): Use function summary.
3995 (write_node_summary_p): Fix GNU coding style.
3996 (stream_out_bitmap): Likewise.
3997 (ipa_reference_read_optimization_summary): Use function summary.
3998 (ipa_reference_c_finalize): Do not release hooks.
3999
4000 2018-06-08 Martin Liska <mliska@suse.cz>
4001
4002 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
4003 (analyze_function_body): Extract multiple calls of get_create.
4004 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4005 * ipa-inline.c (recursive_inlining): Use ::get method.
4006 * ipa-inline.h (estimate_edge_growth): Likewise.
4007
4008 2018-06-08 Martin Liska <mliska@suse.cz>
4009
4010 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
4011 HSA_INVALID.
4012 (hsa_function_summary::hsa_function_summary): Use the new enum
4013 value.
4014 (hsa_gpu_implementation_p): Use hsa_summaries::get.
4015 * hsa-gen.c (hsa_get_host_function): Likewise.
4016 (get_brig_function_name): Likewise.
4017 * ipa-hsa.c (process_hsa_functions): Likewise.
4018 (ipa_hsa_write_summary): Likewise.
4019 * symbol-summary.h (symtab_duplication): Use ::get function/
4020 (get): New function.
4021
4022 2018-06-08 Martin Liska <mliska@suse.cz>
4023
4024 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
4025 of get.
4026 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
4027 (hsa_register_kernel): Likewise.
4028 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
4029 * hsa-gen.c (hsa_get_host_function): Likewise.
4030 (get_brig_function_name): Likewise.
4031 (generate_hsa): Likewise.
4032 (pass_gen_hsail::execute): Likewise.
4033 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
4034 (devirtualization_time_bonus): Likewise.
4035 (ipcp_propagate_stage): Likewise.
4036 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4037 (edge_set_predicate): Likewise.
4038 (evaluate_conditions_for_known_args): Likewise.
4039 (evaluate_properties_for_edge): Likewise.
4040 (ipa_fn_summary::reset): Likewise.
4041 (ipa_fn_summary_t::duplicate): Likewise.
4042 (dump_ipa_call_summary): Likewise.
4043 (ipa_dump_fn_summary): Likewise.
4044 (analyze_function_body): Likewise.
4045 (compute_fn_summary): Likewise.
4046 (estimate_edge_devirt_benefit): Likewise.
4047 (estimate_edge_size_and_time): Likewise.
4048 (estimate_calls_size_and_time): Likewise.
4049 (estimate_node_size_and_time): Likewise.
4050 (inline_update_callee_summaries): Likewise.
4051 (remap_edge_change_prob): Likewise.
4052 (remap_edge_summaries): Likewise.
4053 (ipa_merge_fn_summary_after_inlining): Likewise.
4054 (ipa_update_overall_fn_summary): Likewise.
4055 (read_ipa_call_summary): Likewise.
4056 (inline_read_section): Likewise.
4057 (write_ipa_call_summary): Likewise.
4058 (ipa_fn_summary_write): Likewise.
4059 (ipa_free_fn_summary): Likewise.
4060 * ipa-hsa.c (process_hsa_functions): Likewise.
4061 (ipa_hsa_write_summary): Likewise.
4062 (ipa_hsa_read_section): Likewise.
4063 * ipa-icf.c (sem_function::merge): Likewise.
4064 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4065 (do_estimate_edge_time): Likewise.
4066 (estimate_size_after_inlining): Likewise.
4067 (estimate_growth): Likewise.
4068 (growth_likely_positive): Likewise.
4069 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4070 (inline_call): Likewise.
4071 * ipa-inline.c (caller_growth_limits): Likewise.
4072 (can_inline_edge_p): Likewise.
4073 (can_inline_edge_by_limits_p): Likewise.
4074 (compute_uninlined_call_time): Likewise.
4075 (compute_inlined_call_time): Likewise.
4076 (want_inline_small_function_p): Likewise.
4077 (edge_badness): Likewise.
4078 (update_caller_keys): Likewise.
4079 (update_callee_keys): Likewise.
4080 (recursive_inlining): Likewise.
4081 (inline_small_functions): Likewise.
4082 (inline_to_all_callers_1): Likewise.
4083 (dump_overall_stats): Likewise.
4084 (early_inline_small_functions): Likewise.
4085 (early_inliner): Likewise.
4086 * ipa-inline.h (estimate_edge_growth): Likewise.
4087 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4088 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4089 * ipa-prop.h (IPA_NODE_REF): Likewise.
4090 (IPA_EDGE_REF): Likewise.
4091 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4092 (propagate_malloc): Likewise.
4093 * ipa-split.c (execute_split_functions): Likewise.
4094 * symbol-summary.h: Rename get to get_create.
4095 (get): Likewise.
4096 (get_create): Likewise.
4097 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4098
4099 2018-06-08 Martin Liska <mliska@suse.cz>
4100
4101 * symbol-summary.h (release): Move definition out of class
4102 declaration.
4103 (symtab_removal): Likewise.
4104 (symtab_duplication): Likewise.
4105
4106 2018-06-08 Martin Liska <mliska@suse.cz>
4107
4108 * symbol-summary.h (function_summary): Move constructor
4109 implementation out of class declaration.
4110 (release): Likewise.
4111 (symtab_insertion): Likewise.
4112 (symtab_removal): Likewise.
4113 (symtab_duplication): Likewise.
4114 (get): Likewise.
4115
4116 2018-06-08 Martin Liska <mliska@suse.cz>
4117
4118 * Makefile.in: Remove support for MPX (macros, related functions,
4119 fields in cgraph_node, ...).
4120 * builtin-types.def (BT_BND): Likewise.
4121 (BT_FN_BND_CONST_PTR): Likewise.
4122 (BT_FN_CONST_PTR_BND): Likewise.
4123 (BT_FN_VOID_PTR_BND): Likewise.
4124 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
4125 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
4126 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
4127 (expand_builtin_mempcpy_with_bounds): Likewise.
4128 (expand_builtin_memset_with_bounds): Likewise.
4129 (expand_builtin_memset_args): Likewise.
4130 (std_expand_builtin_va_start): Likewise.
4131 (expand_builtin): Likewise.
4132 (expand_builtin_with_bounds): Likewise.
4133 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
4134 (DEF_LIB_BUILTIN_CHKP): Likewise.
4135 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
4136 (DEF_CHKP_BUILTIN): Likewise.
4137 (BUILT_IN_MEMCPY): Likewise.
4138 (BUILT_IN_MEMMOVE): Likewise.
4139 (BUILT_IN_MEMPCPY): Likewise.
4140 (BUILT_IN_MEMSET): Likewise.
4141 (BUILT_IN_STPCPY): Likewise.
4142 (BUILT_IN_STRCAT): Likewise.
4143 (BUILT_IN_STRCHR): Likewise.
4144 (BUILT_IN_STRCPY): Likewise.
4145 (BUILT_IN_STRLEN): Likewise.
4146 (BUILT_IN_MEMCPY_CHK): Likewise.
4147 (BUILT_IN_MEMMOVE_CHK): Likewise.
4148 (BUILT_IN_MEMPCPY_CHK): Likewise.
4149 (BUILT_IN_MEMSET_CHK): Likewise.
4150 (BUILT_IN_STPCPY_CHK): Likewise.
4151 (BUILT_IN_STRCAT_CHK): Likewise.
4152 (BUILT_IN_STRCPY_CHK): Likewise.
4153 * calls.c (store_bounds): Likewise.
4154 (emit_call_1): Likewise.
4155 (special_function_p): Likewise.
4156 (maybe_warn_nonstring_arg): Likewise.
4157 (initialize_argument_information): Likewise.
4158 (finalize_must_preallocate): Likewise.
4159 (compute_argument_addresses): Likewise.
4160 (expand_call): Likewise.
4161 * cfgexpand.c (expand_call_stmt): Likewise.
4162 (expand_return): Likewise.
4163 (expand_gimple_stmt_1): Likewise.
4164 (pass_expand::execute): Likewise.
4165 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
4166 (cgraph_node::remove): Likewise.
4167 (cgraph_node::dump): Likewise.
4168 (cgraph_node::verify_node): Likewise.
4169 * cgraph.h (chkp_function_instrumented_p): Likewise.
4170 (symtab_node::get_alias_target): Likewise.
4171 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
4172 (cgraph_local_p): Likewise.
4173 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
4174 (cgraph_edge::rebuild_references): Likewise.
4175 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
4176 (walk_polymorphic_call_targets): Likewise.
4177 (cgraph_node::expand_thunk): Likewise.
4178 (symbol_table::output_weakrefs): Likewise.
4179 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
4180 (ix86_handle_option): Likewise.
4181 * config/i386/constraints.md: Likewise.
4182 * config/i386/i386-builtin-types.def (BND): Likewise.
4183 (VOID): Likewise.
4184 (PVOID): Likewise.
4185 (ULONG): Likewise.
4186 * config/i386/i386-builtin.def (BDESC_END): Likewise.
4187 (BDESC_FIRST): Likewise.
4188 (BDESC): Likewise.
4189 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
4190 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
4191 * config/i386/i386.c (enum reg_class): Likewise.
4192 (ix86_target_string): Likewise.
4193 (ix86_option_override_internal): Likewise.
4194 (ix86_conditional_register_usage): Likewise.
4195 (ix86_valid_target_attribute_inner_p): Likewise.
4196 (ix86_set_indirect_branch_type): Likewise.
4197 (ix86_set_current_function): Likewise.
4198 (ix86_function_arg_regno_p): Likewise.
4199 (init_cumulative_args): Likewise.
4200 (ix86_function_arg_advance): Likewise.
4201 (ix86_function_arg): Likewise.
4202 (ix86_pass_by_reference): Likewise.
4203 (ix86_function_value_regno_p): Likewise.
4204 (ix86_function_value_1): Likewise.
4205 (ix86_function_value_bounds): Likewise.
4206 (ix86_return_in_memory): Likewise.
4207 (ix86_setup_incoming_vararg_bounds): Likewise.
4208 (ix86_va_start): Likewise.
4209 (indirect_thunk_need_prefix): Likewise.
4210 (print_reg): Likewise.
4211 (ix86_print_operand): Likewise.
4212 (ix86_expand_call): Likewise.
4213 (ix86_output_function_return): Likewise.
4214 (reg_encoded_number): Likewise.
4215 (BDESC_VERIFYS): Likewise.
4216 (ix86_init_mpx_builtins): Likewise.
4217 (ix86_init_builtins): Likewise.
4218 (ix86_emit_cmove): Likewise.
4219 (ix86_emit_move_max): Likewise.
4220 (ix86_expand_builtin): Likewise.
4221 (ix86_builtin_mpx_function): Likewise.
4222 (ix86_get_arg_address_for_bt): Likewise.
4223 (ix86_load_bounds): Likewise.
4224 (ix86_store_bounds): Likewise.
4225 (ix86_load_returned_bounds): Likewise.
4226 (ix86_store_returned_bounds): Likewise.
4227 (ix86_class_likely_spilled_p): Likewise.
4228 (ix86_hard_regno_mode_ok): Likewise.
4229 (x86_order_regs_for_local_alloc): Likewise.
4230 (ix86_mitigate_rop): Likewise.
4231 (ix86_bnd_prefixed_insn_p): Likewise.
4232 (ix86_mpx_bound_mode): Likewise.
4233 (ix86_make_bounds_constant): Likewise.
4234 (ix86_initialize_bounds): Likewise.
4235 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
4236 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
4237 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
4238 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
4239 (TARGET_CHKP_BOUND_MODE): Likewise.
4240 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
4241 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
4242 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
4243 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
4244 * config/i386/i386.h (TARGET_MPX): Likewise.
4245 (TARGET_MPX_P): Likewise.
4246 (VALID_BND_REG_MODE): Likewise.
4247 (FIRST_BND_REG): Likewise.
4248 (LAST_BND_REG): Likewise.
4249 (enum reg_class): Likewise.
4250 (BND_REG_P): Likewise.
4251 (BND_REGNO_P): Likewise.
4252 (BNDmode): Likewise.
4253 (ADJUST_INSN_LENGTH): Likewise.
4254 * config/i386/i386.md: Likewise.
4255 * config/i386/i386.opt: Likewise.
4256 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
4257 (defined): Likewise.
4258 (LINK_MPX): Likewise.
4259 (MPX_SPEC): Likewise.
4260 (LIBMPX_SPEC): Likewise.
4261 (LIBMPXWRAPPERS_SPEC): Likewise.
4262 (CHKP_SPEC): Likewise.
4263 * config/i386/predicates.md: Likewise.
4264 * dbxout.c (dbxout_type): Likewise.
4265 * doc/extend.texi: Likewise.
4266 * doc/invoke.texi: Likewise.
4267 * doc/md.texi: Likewise.
4268 * doc/tm.texi: Likewise.
4269 * doc/tm.texi.in: Likewise.
4270 * dwarf2out.c (is_base_type): Likewise.
4271 (gen_formal_types_die): Likewise.
4272 (gen_subprogram_die): Likewise.
4273 (gen_type_die_with_usage): Likewise.
4274 (gen_decl_die): Likewise.
4275 (dwarf2out_late_global_decl): Likewise.
4276 * expr.c (expand_assignment): Likewise.
4277 (emit_storent_insn): Likewise.
4278 (store_expr_with_bounds): Likewise.
4279 (store_expr): Likewise.
4280 (expand_expr_real_1): Likewise.
4281 * expr.h (store_expr_with_bounds): Likewise.
4282 * function.c (use_register_for_decl): Likewise.
4283 (struct bounds_parm_data): Likewise.
4284 (assign_parms_augmented_arg_list): Likewise.
4285 (assign_parm_find_entry_rtl): Likewise.
4286 (assign_parm_is_stack_parm): Likewise.
4287 (assign_parm_load_bounds): Likewise.
4288 (assign_bounds): Likewise.
4289 (assign_parms): Likewise.
4290 (expand_function_start): Likewise.
4291 * gcc.c (CHKP_SPEC): Likewise.
4292 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
4293 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
4294 (wrestrict_dom_walker::check_call): Likewise.
4295 * gimple.c (gimple_build_call_from_tree): Likewise.
4296 * gimple.h (enum gf_mask): Likewise.
4297 (gimple_call_with_bounds_p): Likewise.
4298 (gimple_call_set_with_bounds): Likewise.
4299 * gimplify.c (gimplify_init_constructor): Likewise.
4300 * ipa-cp.c (initialize_node_lattices): Likewise.
4301 (propagate_constants_across_call): Likewise.
4302 (find_more_scalar_values_for_callers_subset): Likewise.
4303 * ipa-hsa.c (process_hsa_functions): Likewise.
4304 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
4305 * ipa-icf.c (sem_function::merge): Likewise.
4306 * ipa-inline.c (early_inliner): Likewise.
4307 * ipa-pure-const.c (warn_function_noreturn): Likewise.
4308 (warn_function_cold): Likewise.
4309 (propagate_pure_const): Likewise.
4310 * ipa-ref.h (enum GTY): Likewise.
4311 * ipa-split.c (find_retbnd): Likewise.
4312 (consider_split): Likewise.
4313 (split_function): Likewise.
4314 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4315 * ipa.c (walk_polymorphic_call_targets): Likewise.
4316 (symbol_table::remove_unreachable_nodes): Likewise.
4317 (process_references): Likewise.
4318 (cgraph_build_static_cdtor_1): Likewise.
4319 * lto-cgraph.c (lto_output_node): Likewise.
4320 (output_refs): Likewise.
4321 (compute_ltrans_boundary): Likewise.
4322 (input_overwrite_node): Likewise.
4323 (input_node): Likewise.
4324 (input_cgraph_1): Likewise.
4325 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
4326 * passes.c (pass_manager::execute_early_local_passes): Likewise.
4327 (class pass_chkp_instrumentation_passes): Likewise.
4328 (make_pass_chkp_instrumentation_passes): Likewise.
4329 * passes.def: Likewise.
4330 * rtl.h (struct GTY): Likewise.
4331 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
4332 * stor-layout.c (layout_type): Likewise.
4333 * symtab.c: Likewise.
4334 * target.def: Likewise.
4335 * targhooks.c (default_chkp_bound_type): Likewise.
4336 (default_chkp_bound_mode): Likewise.
4337 (default_builtin_chkp_function): Likewise.
4338 (default_chkp_function_value_bounds): Likewise.
4339 (default_chkp_make_bounds_constant): Likewise.
4340 (default_chkp_initialize_bounds): Likewise.
4341 * targhooks.h (default_chkp_bound_type): Likewise.
4342 (default_chkp_bound_mode): Likewise.
4343 (default_builtin_chkp_function): Likewise.
4344 (default_chkp_function_value_bounds): Likewise.
4345 (default_chkp_make_bounds_constant): Likewise.
4346 (default_chkp_initialize_bounds): Likewise.
4347 * toplev.c (compile_file): Likewise.
4348 (process_options): Likewise.
4349 * tree-core.h (DEF_BUILTIN): Likewise.
4350 (DEF_BUILTIN_CHKP): Likewise.
4351 * tree-inline.c (declare_return_variable): Likewise.
4352 (remap_gimple_stmt): Likewise.
4353 (copy_bb): Likewise.
4354 (initialize_inlined_parameters): Likewise.
4355 (expand_call_inline): Likewise.
4356 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
4357 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
4358 (make_pass_ipa_chkp_produce_thunks): Likewise.
4359 (make_pass_chkp): Likewise.
4360 (make_pass_chkp_opt): Likewise.
4361 (make_pass_chkp_instrumentation_passes): Likewise.
4362 * tree-pretty-print.c (dump_generic_node): Likewise.
4363 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
4364 * tree-ssa-dce.c (propagate_necessity): Likewise.
4365 (eliminate_unnecessary_stmts): Likewise.
4366 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
4367 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
4368 * tree-ssa-sccvn.h: Likewise.
4369 * tree-ssa-strlen.c (get_string_length): Likewise.
4370 (valid_builtin_call): Likewise.
4371 (adjust_last_stmt): Likewise.
4372 (handle_builtin_strchr): Likewise.
4373 (handle_builtin_strcpy): Likewise.
4374 (handle_builtin_stxncpy): Likewise.
4375 (handle_builtin_memcpy): Likewise.
4376 (handle_builtin_strcat): Likewise.
4377 (strlen_check_and_optimize_stmt): Likewise.
4378 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
4379 * tree-streamer-in.c: Likewise.
4380 * tree-streamer.c (record_common_node): Likewise.
4381 * tree.c (tree_code_size): Likewise.
4382 (wide_int_to_tree_1): Likewise.
4383 (type_contains_placeholder_1): Likewise.
4384 (build_common_tree_nodes): Likewise.
4385 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
4386 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
4387 (POINTER_BOUNDS_P): Likewise.
4388 (BOUNDED_TYPE_P): Likewise.
4389 (BOUNDED_P): Likewise.
4390 (CALL_WITH_BOUNDS_P): Likewise.
4391 (pointer_bounds_type_node): Likewise.
4392 * value-prof.c (gimple_ic): Likewise.
4393 * var-tracking.c (vt_add_function_parameters): Likewise.
4394 * varasm.c (make_decl_rtl): Likewise.
4395 (assemble_start_function): Likewise.
4396 (output_constant): Likewise.
4397 (maybe_assemble_visibility): Likewise.
4398 * varpool.c (ctor_for_folding): Likewise.
4399 * chkp-builtins.def: Remove.
4400 * ipa-chkp.c: Remove.
4401 * ipa-chkp.h: Remove.
4402 * rtl-chkp.c: Remove.
4403 * rtl-chkp.h: Remove.
4404 * tree-chkp-opt.c: Remove.
4405 * tree-chkp.c: Remove.
4406 * tree-chkp.h: Remove.
4407
4408 2018-06-07 Carl Love <cel@us.ibm.com>
4409
4410 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
4411 vextract_fp_from_shortl): Add BE support.
4412
4413 2018-06-07 Paul Koning <ni1d@arrl.net>
4414
4415 * compare-elim.c (try_merge_compare): Don't merge compare if
4416 address contains a side effect.
4417 (try_eliminate_compare): Likewise.
4418
4419 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
4420
4421 * config.gcc: Support "tremont".
4422 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
4423 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4424 PROCESSOR_TREMONT.
4425 * config/i386/i386.c (m_TREMONT): Define.
4426 (processor_target_table): Add "tremont".
4427 (PTA_TREMONT): Define.
4428 (ix86_lea_outperforms): Add TARGET_TREMONT.
4429 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
4430 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
4431 and M_INTEL_GOLDMONT_PLUS.
4432 (fold_builtin_cpu): Add "tremont".
4433 (ix86_add_stmt_cost): Add TARGET_TREMONT.
4434 (ix86_option_override_internal): Add "tremont".
4435 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
4436 (processor_type): Add PROCESSOR_TREMONT.
4437 * config/i386/x86-tune.def: Add m_TREMONT.
4438 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
4439
4440 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4441
4442 * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
4443 symbol defined for msp430i* devices to be lower case.
4444
4445 gcc/testsuite/gcc.target/msp430/
4446 * msp430i-device-symbol.c: New test.
4447 * msp430f-device-symbol.c: New test.
4448 * msp430.h: New test header file.
4449
4450 2018-06-07 Richard Biener <rguenther@suse.de>
4451
4452 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
4453 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
4454 Properly wrap signed arithmetic if overflow wraps.
4455
4456 2018-06-07 Jakub Jelinek <jakub@redhat.com>
4457
4458 PR tree-optimization/69615
4459 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
4460 of a cast from a same precision integral SSA_NAME in a bb dominated
4461 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
4462 cast to utype if rhs2 has already a compatible type.
4463
4464 2018-06-07 Richard Biener <rguenther@suse.de>
4465
4466 PR tree-optimization/85935
4467 * graphite-scop-detection.c (find_params_in_bb): Analyze
4468 condition operands with respect to the correct loop. Assert
4469 the analysis doesn't fail.
4470
4471 2018-06-04 Carl Love <cel@us.ibm.com>
4472
4473 * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
4474 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
4475 as it is slightly cheaper.
4476 (first_match_or_eos_index_<mode>):
4477 Calculate index using natural element order.
4478 (first_match_index_<mode>):
4479 Calculate index using natural element order.
4480 (first_match_or_eos_index_<mode>):
4481 Calculate index using natural order.
4482 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
4483 for BE and LE modes.
4484 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
4485 P9V_BUILTIN_VCLZLSBB_V16QI.
4486 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
4487 specific.
4488
4489 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
4490
4491 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
4492 indentation and line wrap for many prototypes. Add missing
4493 @smallexample directives around block of prototypes for vec_xl and
4494 vec_xst.
4495
4496 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
4497
4498 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
4499 track if we pass or return IEEE 128-bit floating point.
4500 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
4501 C++ mangling that is compatible with GCC 8.1.
4502 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
4503 (init_cumulative_args): Note if we pass or return IEEE 128-bit
4504 floating point types.
4505 (rs6000_function_arg_advance_1): Likewise.
4506 (rs6000_mangle_type): Optionally generate mangled names that match
4507 what GCC 8.1 generated for IEEE 128-bit floating point types.
4508 (rs6000_globalize_decl_name): If we have an external function that
4509 passes or returns IEEE 128-bit types, generate a weak reference
4510 from the mangled name used in GCC 8.1 to the current mangled
4511 name.
4512 (rs6000_init_builtins): Make __ibm128 use the long double type if
4513 long double is IBM extended double. Make __float128 use the long
4514 double type if long double is IEEE 128-bit.
4515
4516 PR target/85657
4517 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
4518 macro for __ibm128 built-in functions.
4519 (PACK_IF): Add __ibm128 pack/unpack functions.
4520 (UNPACK_IF): Likewise.
4521 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
4522 enable long double built-in functions if long double is IEEE
4523 128-bit floating point.
4524 (rs6000_invalid_builtin): Update long double built-in function
4525 error message.
4526 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
4527 functions, adjust the built-in function to use the long double
4528 built-in function if __ibm128 and long double are the same type.
4529 * doc/extend.texi (PowerPC builtins): Update documention for
4530 __builtin_{,un}pack_longdouble. Add documentation for
4531 __builtin_{,un}pack_ibm128.
4532
4533 2018-06-06 Jim Wilson <jimw@sifive.com>
4534
4535 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
4536 (struct machine_function): New field interrupt_mode.
4537 (riscv_handle_type_attribute): New function. Add forward declaration.
4538 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
4539 (riscv_expand_epilogue): Check interrupt_mode field.
4540 (riscv_set_current_function): Check interrupt attribute args and
4541 set interrupt_mode field.
4542 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
4543 (riscv_sret, riscv_uret): New.
4544 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
4545 new arguments to interrupt attribute.
4546
4547 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
4548
4549 PR target/63177
4550 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
4551 Don't handle -mcpu=power8 if -mpower9-vector is also used.
4552
4553 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
4554
4555 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
4556 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
4557 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
4558 several redundant entries.
4559
4560 2018-06-06 David Malcolm <dmalcolm@redhat.com>
4561
4562 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
4563 type from "rtx" to "rtx_insn *".
4564 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
4565 for local "call_insn", removing cast.
4566 (ix86_expand_call): Likewise, introducing a "call_insn" local.
4567
4568 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
4569
4570 PR tree-optimization/86066
4571 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
4572 for BIT_INSERT_EXPR stores.
4573
4574 2018-06-06 Richard Biener <rguenther@suse.de>
4575
4576 PR tree-optimization/86062
4577 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
4578 component refs ontop
4579 of to be offsetted base.
4580
4581 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4582
4583 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
4584 to be static and remove check on interrupt attribute name.
4585
4586 gcc/testsuite/gcc.target/msp430/
4587 * function-attributes-4.c: New test.
4588 * static-interrupts.c: New test.
4589
4590 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
4591
4592 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
4593 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
4594
4595 2018-06-05 Steve Ellcey <sellcey@cavium.com>
4596
4597 PR target/79924
4598 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
4599 second argument.
4600 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
4601 Remove second argument, change how error is called.
4602 (aarch64_layout_arg): Remove second argument from
4603 aarch64_err_no_fpadvsimd call.
4604 (aarch64_init_cumulative_args): Ditto.
4605 (aarch64_gimplify_va_arg_expr): Ditto.
4606 * config/aarch64/aarch64.md (mov<mode>): Ditto.
4607
4608 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
4609
4610 * config/i386/i386.md (simple_return_indirect_internal): New expander.
4611 (*simple_return_indirect_internal<mode>): Rename from
4612 simple_return_indirect_internal. Use W mode iterator.
4613 (rstorssp): New expander.
4614 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
4615 (clrssbsy): New expander.
4616 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
4617
4618 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
4619
4620 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
4621 __typeof__.
4622 (cmse_check_pointed_object): Likewise.
4623
4624 2018-06-05 Martin Liska <mliska@suse.cz>
4625
4626 PR gcov-profile/47618
4627 * doc/invoke.texi: Document how -fprofile-dir format
4628 is extended.
4629
4630 2018-06-05 Richard Biener <rguenther@suse.de>
4631
4632 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
4633 removal pretend DOM info isn't available so we do not update
4634 it and only remove edges, not dominated blocks. Actually free
4635 DOM info in case we removed something. Remove unreachable blocks.
4636 (mfb_keep_latches): Work with either DOM info or marked backedges.
4637 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
4638 first. Mark backedges if DOM info isn't available.
4639 (Re-)compute DOM info after cleanup_control_flow_pre.
4640
4641 2018-06-05 Richard Biener <rguenther@suse.de>
4642
4643 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
4644 (locus_discrim_hasher::hash): Adjust.
4645 (locus_discrim_hasher::equal): Likewise.
4646 (next_discriminator_for_locus): Work on line directly.
4647 (same_line_p): Pass in expanded locus1 as well.
4648 (assign_discriminators): Avoid redundant location expansions.
4649
4650 2018-06-05 Richard Biener <rguenther@suse.de>
4651
4652 PR tree-optimization/86046
4653 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
4654 if required after clearing TREE_ADDRESSABLE.
4655
4656 2018-06-05 Richard Biener <rguenther@suse.de>
4657
4658 PR tree-optimization/86047
4659 * tree-ssa-loop.c (for_each_index): Glob handling of all
4660 decls and constants and really handle all of them.
4661
4662 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4663
4664 PR target/81497
4665 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
4666 qualifier_void_pointer and qualifier_const_void_pointer.
4667 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
4668 (arm_init_builtins): Handle the above.
4669 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
4670 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
4671 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
4672 void intrinsics.
4673
4674 2018-06-05 Martin Liska <mliska@suse.cz>
4675
4676 * auto-profile.c (read_autofdo_file): Do not use
4677 gcov_ctr_summary struct.
4678 (afdo_callsite_hot_enough_for_early_inline): Likewise.
4679 * coverage.c (struct counts_entry): Likewise.
4680 (read_counts_file): Read just single summary entry.
4681 (get_coverage_counts): Use gcov_summary struct.
4682 * coverage.h (get_coverage_counts): Likewise.
4683 * gcov-dump.c (dump_working_sets): Likewise.
4684 (tag_summary): Dump just single summary.
4685 * gcov-io.c (gcov_write_summary): Write just histogram
4686 summary.
4687 (gcov_read_summary): Read just single summary.
4688 (compute_working_sets): Use gcov_summary struct.
4689 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
4690 of GCOV_COUNTERS_SUMMABLE.
4691 (GCOV_COUNTERS_SUMMABLE): Remove.
4692 (GCOV_FIRST_VALUE_COUNTER): Replace with
4693 GCOV_COUNTER_V_INTERVAL.
4694 (struct gcov_ctr_summary): Remove.
4695 (struct gcov_summary): Directly use fields of former
4696 gcov_ctr_summary.
4697 (compute_working_sets): Use gcov_summary struct.
4698 * gcov.c (read_count_file): Do not use ctrs fields.
4699 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
4700 struct.
4701 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
4702 struct.
4703 * profile.c: Likewise.
4704 * profile.h: Likewise.
4705
4706 2018-06-05 Martin Liska <mliska@suse.cz>
4707
4708 PR gcov-profile/84846
4709 * gcov.c (output_lines): Print working directory only
4710 in intermediate format.
4711
4712 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
4713
4714 * config/s390/s390-builtin-types.def: Add void function type.
4715 * config/s390/s390-builtins.def: Use the function type for the
4716 tbeginc builtin.
4717
4718 2018-06-04 Jim Wilson <jimw@sifive.com>
4719
4720 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
4721 to int.
4722 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
4723 and maybe_eh_return. Change regno to unsigned int. Use new args to
4724 handle EH_RETURN_DATA_REGNO registers properly.
4725 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
4726 (riscv_expand_epilogue): Update comment. Change argument name and
4727 type. Update code to use new name and type. Pass new args to
4728 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
4729 EXCEPTION_RETURN.
4730 * config/riscv/riscv.md (NORMAL_RETURN): New.
4731 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
4732 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
4733 (eh_return): Call gen_eh_return_internal and emit barrier.
4734 (eh_return_internal): Call riscv_expand_epilogue.
4735
4736 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
4737
4738 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
4739 bit_insertion field and declare can_be_merged_into method.
4740 (merged_store_group::can_be_merged_into): New method.
4741 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
4742 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
4743 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
4744
4745 2018-06-04 Richard Biener <rguenther@suse.de>
4746
4747 PR tree-optimization/85955
4748 * builtins.c (fold_builtin_sincos): Convert pointers to
4749 destination to appropriate type before dereferencing.
4750
4751 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
4752
4753 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
4754
4755 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
4756
4757 * expr.c (expand_expr_real_1): Force the operand into memory if
4758 its TYPE_MODE is BLKmode and if there is no integer mode for
4759 the number of bits being extracted.
4760
4761 2018-06-04 Jakub Jelinek <jakub@redhat.com>
4762
4763 PR target/85832
4764 PR target/86036
4765 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
4766 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
4767
4768 2018-06-04 Richard Biener <rguenther@suse.de>
4769
4770 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
4771 (cleanup_tree_cfg_noloop): ... single caller. Do
4772 start_recording_case_labels later.
4773
4774 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
4775
4776 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
4777 to _IMMINTRIN_H_INCLUDED.
4778 * config/i386/pconfigintrin.h: Ditto.
4779 * config/i386/waitpkgintrin.h: Ditto.
4780 * config/i386/immintrin.h: Add includes for sgxintrin.h,
4781 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
4782 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
4783 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
4784 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
4785 waitpkgintrin.h and cldemoteintrin.h.
4786
4787 2018-06-04 Richard Biener <rguenther@suse.de>
4788
4789 PR tree-optimization/86038
4790 * tracer.c (find_best_successor): Check probability for
4791 being initialized, bail out if not.
4792
4793 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
4794
4795 PR target/86003
4796 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
4797 of bits to ignore when comparing architectures.
4798
4799 2018-06-04 Jakub Jelinek <jakub@redhat.com>
4800
4801 PR tree-optimization/69615
4802 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
4803 maximum or minimum of the type, try to merge it also as if
4804 range1 is + [-, x - 1] or + [x + 1, -].
4805
4806 PR c++/86025
4807 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
4808
4809 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
4810
4811 PR tree-optimization/86034
4812 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
4813 the unsigned bitfield type in a bit insertion sequence if it does not
4814 have a larger precision than the bitfield size.
4815 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
4816
4817 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
4818
4819 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
4820
4821 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
4822
4823 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
4824 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
4825 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
4826 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
4827
4828 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
4829
4830 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
4831 Disable -fdelete-null-pointer-checks for ELF toolchain.
4832
4833 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
4834 Kito Cheng <kito.cheng@gmail.com>
4835
4836 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
4837 (nds32le-*-*, nds32be-*-*): Integrate checking process.
4838 (nds32*-*-*): Add glibc and uclibc conditions.
4839 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
4840 (TARGET_EXCEPT_UNWIND_INFO): Define.
4841 * config/nds32/elf.h: New file.
4842 * config/nds32/linux.h: New file.
4843 * config/nds32/nds32-elf.opt: New file.
4844 * config/nds32/nds32-linux.opt: New file.
4845 * config/nds32/nds32-fp-as-gp.c
4846 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
4847 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
4848 TARGET_LINUX_ABI.
4849 (nds32_asm_file_end): Ditto.
4850 (nds32_print_operand): Ditto.
4851 (nds32_insert_attributes): Ditto.
4852 (nds32_init_libfuncs): New function.
4853 (TARGET_HAVE_TLS): Define.
4854 (TARGET_INIT_LIBFUNCS): Define.
4855 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
4856 spec content.
4857 (TARGET_ELF): Apply different mcmodel setting.
4858 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
4859 been migrated into elf.h and linux.h files.
4860 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
4861 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
4862 (mcmodel): The content has been migrated into nds32-elf.opt and
4863 nds32-linux.opt files.
4864 * config/nds32/t-elf: New file.
4865 * config/nds32/t-linux: New file.
4866
4867 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
4868 Shiva Chen <shiva0217@gmail.com>
4869
4870 * config/nds32/constants.md (unspec_volatile_element): Add
4871 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
4872 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
4873 optimization.
4874 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
4875 (make_pass_nds32_fp_as_gp): Declare.
4876 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
4877 optmization pass.
4878 (nds32_asm_function_end_prologue): Remove unused asm output.
4879 (nds32_asm_function_begin_epilogue): Remove unused asm output.
4880 (nds32_asm_file_start): Output necessary fp_as_gp information.
4881 (nds32_option_override): Adjust register usage.
4882 (nds32_expand_prologue): Consider fp_as_gp situation.
4883 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
4884 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
4885 (epilogue): Ditto.
4886 (return): Ditto.
4887 (simple_return): Ditto.
4888 (omit_fp_begin): Output special directive for fp_as_gp.
4889 (omit_fp_end): Output special directive for fp_as_gp.
4890 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
4891 mforbid-fp-as-gp): New options.
4892
4893 2018-06-01 Mark Wielaard <mark@klomp.org>
4894
4895 * dwarf2out.c (dwarf2out_finish): Remove generation of
4896 DW_AT_loclists_base.
4897
4898 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4899
4900 * gimple-ssa-store-merging.c: Include gimple-fold.h.
4901 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
4902 (struct merged_store_group): Add bit_insertion field.
4903 (dump_char_array): Use standard hexadecimal format.
4904 (merged_store_group::merged_store_group): Set bit_insertion to false.
4905 (merged_store_group::apply_stores): Use optimal buffer size. Deal
4906 with BIT_INSERT_EXPR stores. Move up code updating the mask and
4907 also print the mask in the dump file.
4908 (pass_store_merging::gate): Minor tweak.
4909 (imm_store_chain_info::coalesce_immediate): Fix wrong association
4910 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
4911 stores with INTEGER_CST stores.
4912 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
4913 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
4914 and use it throughout. Generate bit insertion sequences if need be.
4915 (pass_store_merging::process_store): Remove redundant condition.
4916 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
4917
4918 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
4919
4920 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
4921 the 128-bit floating point types. Fix function comment.
4922
4923 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4924
4925 * config/aarch64/aarch64-simd.md
4926 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
4927 mnemonics.
4928 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
4929 mnemonics.
4930
4931 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
4932
4933 PR tree-optimization/85989
4934 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
4935 variable.
4936 (backprop::intersect_uses): Check it when deciding whether this
4937 is a backedge reference.
4938 (backprop::process_block): Add each phi to m_visited_phis
4939 after visiting it, then clear it at the end.
4940
4941 2018-06-01 Richard Biener <rguenther@suse.de>
4942
4943 * tree-vectorizer.h (vect_dr_stmt): New function.
4944 (vect_get_load_cost): Adjust.
4945 (vect_get_store_cost): Likewise.
4946 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
4947 Use vect_dr_stmt instead of DR_SMTT.
4948 (vect_record_base_alignments): Likewise.
4949 (vect_calculate_target_alignment): Likewise.
4950 (vect_compute_data_ref_alignment): Likewise and make static.
4951 (vect_update_misalignment_for_peel): Likewise.
4952 (vect_verify_datarefs_alignment): Likewise.
4953 (vector_alignment_reachable_p): Likewise.
4954 (vect_get_data_access_cost): Likewise. Pass down
4955 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
4956 (vect_get_peeling_costs_all_drs): Likewise.
4957 (vect_peeling_hash_get_lowest_cost): Likewise.
4958 (vect_enhance_data_refs_alignment): Likewise.
4959 (vect_find_same_alignment_drs): Likewise.
4960 (vect_analyze_data_refs_alignment): Likewise.
4961 (vect_analyze_group_access_1): Likewise.
4962 (vect_analyze_group_access): Likewise.
4963 (vect_analyze_data_ref_access): Likewise.
4964 (vect_analyze_data_ref_accesses): Likewise.
4965 (vect_vfa_segment_size): Likewise.
4966 (vect_small_gap_p): Likewise.
4967 (vectorizable_with_step_bound_p): Likewise.
4968 (vect_prune_runtime_alias_test_list): Likewise.
4969 (vect_analyze_data_refs): Likewise.
4970 (vect_supportable_dr_alignment): Likewise.
4971 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4972 (vect_gen_prolog_loop_niters): Likewise.
4973 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4974 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
4975 modify DR_STMT.
4976 (vect_recog_mask_conversion_pattern): Likewise.
4977 (vect_try_gather_scatter_pattern): Likewise.
4978 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
4979 to vect_get_store_cost.
4980 (vect_get_store_cost): Get stmt_info instead of DR.
4981 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
4982 (vect_get_load_cost): Get stmt_info instead of DR.
4983
4984 2018-06-01 Richard Biener <rguenther@suse.de>
4985
4986 PR middle-end/86017
4987 * gimple-fold.c (var_decl_component_p): Also allow offsetted
4988 vars wrapped in MEM_REFs.
4989
4990 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
4991
4992 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4993 Fix subreg tests so that we only return a choice between
4994 GENERAL_REGS and FP_REGS if the original classes included both.
4995
4996 2018-06-01 Richard Biener <rguenther@suse.de>
4997
4998 PR ipa/85960
4999 * tree-ssa-structalias.c (get_function_part_constraint):
5000 Handle NULL fi->decl.
5001 (find_func_aliases_for_call): Properly handle indirect
5002 fi from direct call.
5003 (find_func_clobbers): Likewise.
5004 (ipa_pta_execute): Likewise.
5005 (create_variable_info_for): For functions that are ifunc_resolver
5006 resolve to a varinfo that contains the result of the resolver call.
5007 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
5008 aliases.
5009
5010 2018-05-31 Michael Collison <michael.collison@arm.com>
5011
5012 * config/aarch64/aarch64.md:
5013 (*fix_to_zero_extenddfdi2): New pattern.
5014 * gcc.target/aarch64/fix_extend1.c: New testcase.
5015
5016 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
5017
5018 PR middle-end/78809
5019 PR middle-end/83026
5020 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
5021 and BUILT_IN_STRNCMP_EQ.
5022 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
5023 BUILT_IN_STRNCMP_EQ.
5024 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
5025 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5026 (gimple_fold_builtin): Likewise.
5027 * tree-ssa-strlen.c (compute_string_length): New function.
5028 (determine_min_obsize): New function.
5029 (handle_builtin_string_cmp): New function to handle calls to
5030 string compare functions.
5031 (strlen_optimize_stmt): Add handling to builtin string compare
5032 calls.
5033 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
5034 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5035 * tree.c (build_common_builtin_nodes): Add new defines of
5036 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
5037
5038 2018-05-31 Jakub Jelinek <jakub@redhat.com>
5039
5040 PR target/85984
5041 * bb-reorder.c (pass_partition_blocks::gate): Return false for
5042 functions with naked attribute.
5043
5044 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5045
5046 * config/i386/sse.md (avx_vec_concat<mode>):
5047 Substitute concat_tg_mode mode attribute with xtg_mode.
5048 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
5049 (concat_tg_mode): Remove mode attribute.
5050
5051 2018-05-31 Martin Sebor <msebor@redhat.com>
5052
5053 PR c/82063
5054 * calls.c (alloc_max_size): Correct a logic error/typo.
5055 Treat excessive arguments as infinite. Warn for invalid arguments.
5056 * doc/invoke.texi (-Walloc-size-larger-than): Update.
5057
5058 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
5059
5060 PR target/85829
5061 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
5062 and movx for Haswell.
5063
5064 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
5065 Cesar Philippidis <cesar@codesourcery.com>
5066
5067 PR middle-end/85879
5068 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
5069 when emitting error on private/firstprivate reductions.
5070 * omp-low.c (lower_omp_target): Avoid reference-type processing
5071 on pointers for firstprivate clause.
5072
5073 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5074
5075 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
5076 (st1x2): Likewise.
5077 (st1x3): Likewise.
5078 * config/aarch64/aarch64-simd.md
5079 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
5080 (aarch64_ld1_x3_<mode>): Likewise
5081 (aarch64_st1x2<VALLDIF:mode>): Likewise
5082 (aarch64_st1_x2_<mode>): Likewise
5083 (aarch64_st1x3<VALLDIF:mode>): Likewise
5084 (aarch64_st1_x3_<mode>): Likewise
5085 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
5086 (vld1_s8_x3): Likewise.
5087 (vld1_u16_x3): Likewise.
5088 (vld1_s16_x3): Likewise.
5089 (vld1_u32_x3): Likewise.
5090 (vld1_s32_x3): Likewise.
5091 (vld1_u64_x3): Likewise.
5092 (vld1_s64_x3): Likewise.
5093 (vld1_f16_x3): Likewise.
5094 (vld1_f32_x3): Likewise.
5095 (vld1_f64_x3): Likewise.
5096 (vld1_p8_x3): Likewise.
5097 (vld1_p16_x3): Likewise.
5098 (vld1_p64_x3): Likewise.
5099 (vld1q_u8_x3): Likewise.
5100 (vld1q_s8_x3): Likewise.
5101 (vld1q_u16_x3): Likewise.
5102 (vld1q_s16_x3): Likewise.
5103 (vld1q_u32_x3): Likewise.
5104 (vld1q_s32_x3): Likewise.
5105 (vld1q_u64_x3): Likewise.
5106 (vld1q_s64_x3): Likewise.
5107 (vld1q_f16_x3): Likewise.
5108 (vld1q_f32_x3): Likewise.
5109 (vld1q_f64_x3): Likewise.
5110 (vld1q_p8_x3): Likewise.
5111 (vld1q_p16_x3): Likewise.
5112 (vld1q_p64_x3): Likewise.
5113 (vst1_s64_x2): Likewise.
5114 (vst1_u64_x2): Likewise.
5115 (vst1_f64_x2): Likewise.
5116 (vst1_s8_x2): Likewise.
5117 (vst1_p8_x2): Likewise.
5118 (vst1_s16_x2): Likewise.
5119 (vst1_p16_x2): Likewise.
5120 (vst1_s32_x2): Likewise.
5121 (vst1_u8_x2): Likewise.
5122 (vst1_u16_x2): Likewise.
5123 (vst1_u32_x2): Likewise.
5124 (vst1_f16_x2): Likewise.
5125 (vst1_f32_x2): Likewise.
5126 (vst1_p64_x2): Likewise.
5127 (vst1q_s8_x2): Likewise.
5128 (vst1q_p8_x2): Likewise.
5129 (vst1q_s16_x2): Likewise.
5130 (vst1q_p16_x2): Likewise.
5131 (vst1q_s32_x2): Likewise.
5132 (vst1q_s64_x2): Likewise.
5133 (vst1q_u8_x2): Likewise.
5134 (vst1q_u16_x2): Likewise.
5135 (vst1q_u32_x2): Likewise.
5136 (vst1q_u64_x2): Likewise.
5137 (vst1q_f16_x2): Likewise.
5138 (vst1q_f32_x2): Likewise.
5139 (vst1q_f64_x2): Likewise.
5140 (vst1q_p64_x2): Likewise.
5141 (vst1_s64_x3): Likewise.
5142 (vst1_u64_x3): Likewise.
5143 (vst1_f64_x3): Likewise.
5144 (vst1_s8_x3): Likewise.
5145 (vst1_p8_x3): Likewise.
5146 (vst1_s16_x3): Likewise.
5147 (vst1_p16_x3): Likewise.
5148 (vst1_s32_x3): Likewise.
5149 (vst1_u8_x3): Likewise.
5150 (vst1_u16_x3): Likewise.
5151 (vst1_u32_x3): Likewise.
5152 (vst1_f16_x3): Likewise.
5153 (vst1_f32_x3): Likewise.
5154 (vst1_p64_x3): Likewise.
5155 (vst1q_s8_x3): Likewise.
5156 (vst1q_p8_x3): Likewise.
5157 (vst1q_s16_x3): Likewise.
5158 (vst1q_p16_x3): Likewise.
5159 (vst1q_s32_x3): Likewise.
5160 (vst1q_s64_x3): Likewise.
5161 (vst1q_u8_x3): Likewise.
5162 (vst1q_u16_x3): Likewise.
5163 (vst1q_u32_x3): Likewise.
5164 (vst1q_u64_x3): Likewise.
5165 (vst1q_f16_x3): Likewise.
5166 (vst1q_f32_x3): Likewise.
5167 (vst1q_f64_x3): Likewise.
5168 (vst1q_p64_x3): Likewise.
5169
5170 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5171
5172 * config/msp430/msp430.c (msp430_output_labelref): Prepend
5173 user_label_prefix to name.
5174
5175 * tree-core.h: Update comment about the format of NAME string
5176 passed to handler in attribute_spec.
5177
5178 * config/msp430/msp430.md: Remove erroneous subreg expression from
5179 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
5180 zero_extend{q,h}isi2.
5181
5182 2018-05-30 Borislav Petkov <bp@suse.de>
5183
5184 * doc/extend.texi: Document some architecture specific
5185 constraints and sort entries.
5186
5187 2018-05-30 Martin Sebor <msebor@redhat.com>
5188
5189 PR middle-end/85369
5190 * builtins.c (expand_builtin_stpcpy_1): New function.
5191 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
5192 only if the former succeeds.
5193
5194 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5195
5196 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
5197 in saphira.
5198
5199 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5200
5201 * doc/invoke.texi (-flinker-output): Document
5202
5203 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5204
5205 * passes.c (ipa_write_summaries): Only modify statements if body
5206 is in memory.
5207 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
5208 incrementally linking.
5209 (ipa_passes): Likewise.
5210 * lto-cgraph.c (lto_output_node): When incrementally linking do not
5211 pass down resolution info.
5212 * common.opt (flag_incremental_link): Update info.
5213 * gcc.c (plugin specs): Turn flinker-output=* to
5214 -plugin-opt=-linker-output-known
5215 * toplev.c (compile_file): Also cut compilation when doing incremental
5216 link.
5217 * flag-types. (enum lto_partition_model): Add
5218 LTO_LINKER_OUTPUT_NOLTOREL.
5219 (invoke.texi): Add -flinker-output docs.
5220 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
5221 link same way as WPA; do not stream in dead initializers.
5222
5223 * dwarf2out.c (dwarf2out_die_ref_for_decl,
5224 darf2out_register_external_decl): Support incremental link.
5225
5226 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5227
5228 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
5229
5230 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5231
5232 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
5233 it down to simple_object_copy_lto_debug_sections.
5234 (run_gcc): Determine incremental LTO link time and configure
5235 lto1 into non-wpa mode, disable renaming of debug sections.
5236
5237 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
5238
5239 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5240 descriptions of various incorrectly documented functions.
5241
5242 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
5243
5244 Revert:
5245 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5246 address check not strict.
5247
5248 2018-05-30 Richard Biener <rguenther@suse.de>
5249
5250 PR tree-optimization/85964
5251 * tracer.c (better_p): Drop initialized count check, we only
5252 call the function with initialized counts now.
5253 (find_best_successor): Do find a best edge if one
5254 has uninitialized count.
5255 (find_best_predecessor): Likewise. Do BB frequency check only
5256 if count is initialized.
5257
5258 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
5259
5260 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
5261 (aarch64_ldrstr_offset_compare): New.
5262 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
5263 load/store orderings.
5264 (aarch64_gen_adjusted_ldpstp): Likewise.
5265
5266 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
5267
5268 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5269 Check for subset of GENERAL_REGS and FP_REGS.
5270 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
5271 r=w alternative.
5272
5273 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
5274
5275 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
5276 and wi::to_poly_offset. Add the current offset and then check
5277 whether the sum fits, rather than using an unchecked addition of
5278 a checked term. Check for a shwi rather than a uhwi.
5279 * expr.c (get_bit_range): Use tree_to_poly_uint64.
5280 (store_constructor): Use poly_int_tree_p.
5281 (expand_expr_real_1): Likewise.
5282 * function.c (assign_temp): Likewise.
5283 * fold-const.c (const_binop): Use poly_int_tree_p and
5284 wi::to_poly_offset.
5285 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
5286 division.
5287 * ipa-icf-gimple.c (func_checker::compare_operand): Use
5288 to_poly_offset for MEM offsets.
5289 * ipa-icf.c (sem_variable::equals): Likewise.
5290 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
5291 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
5292 wi::to_poly_offset for BIT_FIELD_REF offsets.
5293 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
5294 wi::to_poly_offset.
5295 * var-tracking.c (emit_note_insn_var_location): Use
5296 tree_to_poly_uint64.
5297
5298 2018-05-29 Jim Wilson <jimw@sifive.com>
5299
5300 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
5301
5302 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
5303
5304 PR target/85950
5305 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
5306 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
5307 sequence.
5308 (sse4_1_round<mode>2): Use nonimmediate_operand
5309 for operand 1 predicate.
5310
5311 2018-05-29 Martin Sebor <msebor@redhat.com>
5312 Richard Biener <rguenther@suse.de>
5313
5314 PR testsuite/85888
5315 * calls.c (get_size_range): Call determine_value_range instead
5316 of get_value_range..
5317 * tree-vrp.h (determine_value_range): Declared new function.
5318 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
5319
5320 2018-05-29 Richard Biener <rguenther@suse.de>
5321
5322 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
5323 sure to use non-pattern stmts for get_earlier_stmt arguments.
5324 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
5325 called on pattern stmts.
5326 (get_later_stmt): Likewise.
5327
5328 2018-05-29 Martin Liska <mliska@suse.cz>
5329
5330 PR gcov-profile/85759
5331 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
5332 env variables.
5333
5334 2018-05-29 Jakub Jelinek <jakub@redhat.com>
5335
5336 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
5337 VEC_UNPACK_*_EXPR.
5338 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
5339 VEC_PACK_*_EXPR.
5340
5341 PR target/85918
5342 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5343 VEC_PACK_FLOAT_EXPR): New tree codes.
5344 * tree-pretty-print.c (op_code_prio): Handle
5345 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5346 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5347 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5348 * tree-inline.c (estimate_operator_cost): Likewise.
5349 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
5350 * fold-const.c (const_binop): Likewise.
5351 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
5352 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5353 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5354 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
5355 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5356 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5357 * expr.c (expand_expr_real_2): Likewise.
5358 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
5359 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
5360 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
5361 optabs.
5362 * optabs.c (expand_widen_pattern_expr): For
5363 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
5364 sign from result type rather than operand's type.
5365 (expand_binop_directly): For vec_packu_float_optab and
5366 vec_packs_float_optab allow result type to be different from operand's
5367 type.
5368 * optabs-tree.c (optab_for_tree_code): Handle
5369 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5370 VEC_PACK_FLOAT_EXPR. Formatting fixes.
5371 * tree-vect-generic.c (expand_vector_operations_1): Handle
5372 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5373 VEC_PACK_FLOAT_EXPR.
5374 * tree-vect-stmts.c (supportable_widening_operation): Handle
5375 FIX_TRUNC_EXPR.
5376 (supportable_narrowing_operation): Handle FLOAT_EXPR.
5377 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
5378 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
5379 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
5380 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
5381 mode attributes.
5382 (vec_pack<floatprefix>_float_<mode>): New expander.
5383 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
5384 attributes.
5385 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
5386 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
5387 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
5388 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
5389 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
5390 Document.
5391 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
5392 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
5393 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5394 VEC_PACK_FLOAT_EXPR): Document.
5395
5396 2018-05-29 Richard Biener <rguenther@suse.de>
5397
5398 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
5399 member.
5400 (stmt_vec_info_vec): Make pointer.
5401 (init_stmt_vec_info_vec): Remove.
5402 (free_stmt_vec_info_vec): Likewise.
5403 (set_stmt_vec_info_vec): New function.
5404 (free_stmt_vec_infos): Likewise.
5405 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
5406 (set_vinfo_for_stmt): Likewise.
5407 (get_earlier_stmt): Likewise.
5408 (get_later_stmt): Likewise.
5409 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
5410 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
5411 (vec_info::~vec_info): Free stmt_vec_infos.
5412 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
5413 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
5414 (pass_slp_vectorize::execute): Likewise.
5415 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
5416 (free_stmt_vec_info_vec): Likewise.
5417 (set_stmt_vec_info_vec): New function.
5418 (free_stmt_vec_infos): Likewise.
5419 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
5420 the global stmt_vec_info_vec.
5421 * tree-parloops.c (gather_scalar_reductions): Use
5422 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
5423 vector.
5424
5425 2018-05-29 Richard Biener <rguenther@suse.de>
5426
5427 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
5428
5429 2018-05-29 Martin Liska <mliska@suse.cz>
5430 David Malcolm <dmalcolm@redhat.com>
5431
5432 * vec.c (test_reverse): New.
5433 (vec_c_tests): Add new test.
5434 * vec.h (vl_ptr>::reverse): New function.
5435
5436 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
5437
5438 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
5439
5440 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
5441 and later.
5442
5443 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
5444
5445 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
5446
5447 2018-05-28 Richard Biener <rguenther@suse.de>
5448
5449 PR tree-optimization/85933
5450 * tree-vect-data-refs.c (vect_record_base_alignments): Only
5451 look at stmts marked as vectorizable.
5452
5453 2018-05-28 Richard Biener <rguenther@suse.de>
5454
5455 PR tree-optimization/85934
5456 * tree-vect-generic.c (expand_vector_operations_1): Hoist
5457 vector boolean check before scalar optimization.
5458
5459 2018-05-28 Jakub Jelinek <jakub@redhat.com>
5460
5461 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
5462 for armv5te.
5463
5464 2018-05-28 Mark Wielaard <mark@klomp.org>
5465
5466 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
5467 if it is an expression containing a minus sign.
5468
5469 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
5470
5471 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
5472
5473 2018-05-27 Paul Koning <ni1d@arrl.net>
5474
5475 * config/pdp11/pdp11.md (truncsihi2): Remove.
5476
5477 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
5478 Chung-Ju Wu <jasonwucj@gmail.com>
5479
5480 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
5481 implementation.
5482 (unaligned_store_dw): Ditto.
5483 * config/nds32/nds32-memory-manipulation.c
5484 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
5485 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
5486 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
5487 (emit_setmem_word_loop): Rename to ...
5488 (emit_setmem_doubleword_loop): ... this.
5489 (nds32_gen_dup_4_byte_to_word_value): New function.
5490 (nds32_gen_dup_8_byte_to_double_word_value): New function.
5491 (nds32_expand_setmem_loop): Refine implementation.
5492 (nds32_expand_setmem_loop_v3m): Ditto.
5493 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
5494 pattern.
5495
5496 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
5497
5498 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
5499
5500 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
5501
5502 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
5503 (nds32_init_machine_status): Initialize machine->attr_naked_p and
5504 machine->attr_no_prologue_p.
5505 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
5506 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
5507 (nds32_expand_epilogue): Consider attr_naked_p.
5508 (nds32_expand_epilogue_v3pop): Likewise.
5509 (nds32_can_use_return_insn): Likewise.
5510 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
5511 attr_no_prologue_p fields.
5512 * config/nds32/nds32.opt (mret-in-naked-func): New option.
5513
5514 2018-05-27 Jakub Jelinek <jakub@redhat.com>
5515
5516 PR target/85918
5517 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
5518 attributes.
5519 * config/i386/sse.md
5520 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
5521 Rename to ...
5522 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
5523 ... this.
5524 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
5525 Rename to ...
5526 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
5527 ... this.
5528 (*<floatsuffix>floatv2div2sf2): Rename to ...
5529 (*float<floatunssuffix>v2div2sf2): ... this.
5530 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
5531 (float<floatunssuffix>v2div2sf2_mask): ... this.
5532 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
5533 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
5534 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
5535 to ...
5536 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
5537 ... this.
5538 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5539 Rename to ...
5540 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5541 ... this.
5542 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5543 Rename to ...
5544 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5545 ... this.
5546 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
5547 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
5548 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
5549 gen_ufix_truncv8dfv8si2.
5550 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
5551 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
5552 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
5553 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
5554 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
5555 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
5556 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
5557 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
5558
5559 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
5560
5561 PR target/85900
5562 PR target/85345
5563 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
5564
5565 2018-05-25 Jim Wilson <jimw@sifive.com>
5566
5567 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
5568 * config/riscv/riscv.c (struct machine_function): Add
5569 interrupt_handler_p and attribute_checked_p fields.
5570 (riscv_attribute_table): Add interrupt.
5571 (riscv_interrupt_type_p): New.
5572 (riscv_save_reg_p): Save extra regs for interrupt handler.
5573 (riscv_use_save_libcall): Return false for interrupt handler.
5574 (riscv_first_stack_step): Add forward declaration.
5575 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
5576 for interrupt handler with large frame. Use it for saved reg list.
5577 (riscv_expand_prologue): Move flag_stack_usage_info support to
5578 eliminate duplication.
5579 (riscv_expand_epilogue): Generate mret for interrupt handler.
5580 (riscv_epilogue_uses): New.
5581 (riscv_can_use_return_insn): Return false for interrupt handler.
5582 (riscv_function_ok_for_sibcall): Likewise.
5583 (riscv_set_current_function): Add interrupt handler support.
5584 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
5585 * config/riscv/riscv.md (UNSPECV_MRET): New.
5586 (GP_REGNUM): New.
5587 (riscv_frflags, riscv_fsflags): Use tab after opcode.
5588 (riscv_mret): New.
5589 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
5590
5591 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
5592
5593 PR tree-optimization/85712
5594 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
5595 this candidate has already been replaced in-situ by a copy.
5596
5597 2018-05-25 Jason Merrill <jason@redhat.com>
5598
5599 PR c++/80485 - inline function non-zero address.
5600 * symtab.c (nonzero_address): Check DECL_COMDAT.
5601
5602 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
5603
5604 PR target/83628
5605 * config/alpha/alpha.md (ashlsi3): New insn pattern.
5606 (*ashlsi_se): Rename from *ashldi_se. Define as sign
5607 extension of SImode operation. Use const123_operand predicate.
5608 (*saddsi_1): Remove.
5609 (*saddl_se_1): Ditto.
5610 (*ssubsi_1): Ditto.
5611 (*ssubl_se_1): Ditto.
5612 * config/alpha/predicates.md (const123_operand): New predicate.
5613 * config/alpha/constraints.md (P): Use IN_RANGE.
5614
5615 2018-05-25 Richard Biener <rguenther@suse.de>
5616
5617 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
5618 defaulted to true.
5619 (ref_maybe_used_by_stmt_p): Likewise.
5620 (stmt_may_clobber_ref_p): Likewise.
5621 (stmt_may_clobber_ref_p_1): Likewise.
5622 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
5623 and pass it along.
5624 (ref_maybe_used_by_stmt_p): Likewise.
5625 (stmt_may_clobber_ref_p): Likewise.
5626 (stmt_may_clobber_ref_p_1): Likewise.
5627 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
5628 the alias oracle to disambiguate DRs with stmts DR analysis
5629 couldn't handle.
5630 (vect_analyze_data_refs): Do not give up on not analyzable
5631 DRs for BB vectorization. Remove code truncating the dataref
5632 vector.
5633
5634 2018-05-25 Jakub Jelinek <jakub@redhat.com>
5635
5636 PR target/85832
5637 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5638 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
5639 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
5640
5641 2018-05-25 Richard Biener <rguenther@suse.de>
5642
5643 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
5644 function, combining stmt data ref gathering and fatal analysis
5645 parts.
5646 (vect_analyze_data_refs): Remove now redudnant code and simplify.
5647 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
5648 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
5649 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
5650 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
5651
5652 2018-05-25 Bin Cheng <bin.cheng@arm.com>
5653
5654 PR tree-optimization/85720
5655 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
5656 SCC if all partitions are builtins.
5657 (version_loop_by_alias_check): New parameter. Generate cancelable
5658 runtime alias check if all partitions are builtins.
5659 (distribute_loop): Update call to above function.
5660
5661 2018-05-25 Bin Cheng <bin.cheng@arm.com>
5662
5663 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
5664 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
5665 (parm_default_def_partition_arg): Ditto.
5666 (set_parm_default_def_partition): Ditto.
5667 (get_parm_default_def_partitions): Ditto and make it static.
5668 (get_undefined_value_partitions): Ditto and make it static.
5669 (remove_ssa_form): Refactor call to init_var_map here.
5670 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
5671 computation for loop region.
5672 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
5673 (register_default_def): Delete.
5674 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
5675 (parm_default_def_partition_arg): Ditto.
5676 (set_parm_default_def_partition): Ditto.
5677 (get_parm_default_def_partitions): Ditto and make it static.
5678 (get_undefined_value_partitions): Ditto and make it static.
5679 (coalesce_with_default, coalesce_with_default): Update comment.
5680 (create_coalesce_list_for_region): New func factored out from
5681 create_outofssa_var_map.
5682 (populate_coalesce_list_for_outofssa): New func factored out from
5683 create_outofssa_var_map and coalesce_ssa_name.
5684 (create_outofssa_var_map): Delete.
5685 (coalesce_ssa_name): Refactor to support live range computation.
5686 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
5687 (get_parm_default_def_partitions): Delete.
5688 (get_undefined_value_partitions): Ditto.
5689 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
5690 computation for loop region.
5691 (new_tree_live_info, loe_visit_block): Ditto.
5692 (live_worklist, set_var_live_on_entry): Ditto.
5693 (calculate_live_on_exit, verify_live_on_entry): Ditto.
5694 * tree-ssa-live.h (struct _var_map): New fields.
5695 (init_var_map): Change decl.
5696 (region_contains_p): New.
5697
5698 2018-05-25 Bin Cheng <bin.cheng@arm.com>
5699
5700 * tree-ssa-live.h (live_merge_and_clear): Delete.
5701
5702 2018-05-25 Richard Biener <rguenther@suse.de>
5703
5704 PR c++/85912
5705 * tree-dump.c (dequeue_and_dump): Remove access to removed
5706 operand 2 of a SWITCH_EXPR.
5707
5708 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5709
5710 * doc/sourcebuild.texi (vect_double_cond_arith): Include
5711 multiplication and division.
5712 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
5713 (cond_udiv@var{m}, cond_umod@var{m}): Document.
5714 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
5715 (cond_udiv_optab, cond_umod_optab): New optabs.
5716 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
5717 (IFN_COND_RDIV): New internal functions.
5718 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
5719 TRUNC_MOD_EXPR and RDIV_EXPR.
5720 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
5721 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
5722 New unspecs.
5723 (SVE_INT_BINARY): Include mult.
5724 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
5725 (optab, sve_int_op): Handle mult.
5726 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
5727 UNSPEC_COND_DIV.
5728 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
5729 for SVE_INT_BINARY_SD.
5730
5731 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5732
5733 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
5734 (optab, sve_int_op): Handle div and udiv.
5735 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
5736 for SVE_INT_BINARY_SD.
5737 (*<optab><mode>3): New insn for the same.
5738
5739 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5740
5741 * tree-vect-patterns.c: Include predict.h.
5742 (vect_recog_divmod_pattern): Restrict check for division support
5743 to when optimizing for size.
5744
5745 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5746
5747 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
5748 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
5749 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
5750 (gimple_match_op::set_op): Likewise.
5751 (gimple_resimplify4): Declare.
5752 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
5753 (expr::gen_transform): Likewise.
5754 (decision_tree::gen): Generate a simplification routine for 4 operands.
5755 * gimple-match-head.c (gimple_simplify): Add an overload for
5756 4 operands. In the top-level function, handle up to 4 call
5757 arguments and call gimple_resimplify4.
5758 (gimple_resimplify4): New function.
5759 (build_call_internal): Pass a fourth operand.
5760 (maybe_push_to_seq): Likewise.
5761 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
5762 Fold VEC_COND_EXPRs of an operation and a default value into
5763 an IFN_COND_* function if possible.
5764 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
5765 New unspecs.
5766 (SVE_COND_FP_BINARY): Include them.
5767 (optab, sve_fp_op): Handle them.
5768 (SVE_INT_BINARY_REV): New code iterator.
5769 (SVE_COND_FP_BINARY_REV): New int iterator.
5770 (commutative): New int attribute.
5771 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
5772 Declare.
5773 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
5774 function.
5775 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
5776 (*cond_<optab><mode>): New patterns for reversed operands.
5777
5778 2018-05-25 Richard Biener <rguenther@suse.de>
5779
5780 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
5781 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
5782 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
5783 (STMT_VINFO_GROUPED_ACCESS): Adjust.
5784 * tree-vect-data-refs.c (everywhere): Adjust users.
5785 * tree-vect-loop.c (everywhere): Likewise.
5786 * tree-vect-slp.c (everywhere): Likewise.
5787 * tree-vect-stmts.c (everywhere): Likewise.
5788 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5789
5790 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5791
5792 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
5793 Rename to...
5794 (gcc_cv_as_section_exclude): ... this.
5795 Try Solaris as #exclude syntax.
5796 * configure: Regenerate.
5797 * config.in: Regenerate.
5798 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
5799 SECTION_EXCLUDE.
5800 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
5801 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
5802
5803 * varasm.c (default_elf_asm_named_section): Don't check if
5804 HAVE_GAS_SECTION_EXCLUDE is defined.
5805
5806 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5807
5808 * doc/md.texi: Update the documentation of the cond_* optabs
5809 to mention the new final operand. Fix GET_MODE_NUNITS call.
5810 Describe the scalar case too.
5811 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
5812 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
5813 instead of 2.
5814 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
5815 (get_conditional_internal_fn): Update comment.
5816 * tree-vect-loop.c (vectorizable_reduction): Pass the original
5817 accumulator value as a final argument to conditional functions.
5818 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
5819 a define_expand and add an "else" operand. Assert for now that
5820 the else operand is equal to operand 2. Use SVE_INT_BINARY and
5821 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
5822 (*cond_<optab><mode>): New patterns.
5823 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
5824 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
5825 (UNSPEC_COND_EOR): Delete.
5826 (optab): Remove associated mappings.
5827 (SVE_INT_BINARY): New code iterator.
5828 (sve_int_op): Remove int attribute and add "minus" to the code
5829 attribute.
5830 (SVE_COND_INT_OP): Delete.
5831 (SVE_COND_FP_OP): Rename to...
5832 (SVE_COND_FP_BINARY): ...this.
5833
5834 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5835
5836 * optabs.c (can_reuse_operands_p): New function.
5837 (maybe_legitimize_operands): Try to reuse the results for
5838 earlier operands.
5839
5840 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
5841
5842 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
5843 Add {q} suffix to insn mnemonic.
5844
5845 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5846
5847 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
5848 (msp430_warn_func_return): New.
5849
5850 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
5851
5852 * fold-const.c (tree_nonzero_bits): New function.
5853 * fold-const.h (tree_nonzero_bits): Likewise.
5854 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
5855 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
5856
5857 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
5858
5859 PR target/85900
5860 PR target/85345
5861 * varasm.c (assemble_alias): Check ifunc_resolver only on
5862 FUNCTION_DECL.
5863
5864 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
5865
5866 PR target/85903
5867 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
5868 when memory input operand is handled.
5869
5870 2018-05-24 Luis Machado <luis.machado@linaro.org>
5871
5872 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
5873 global.
5874 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
5875
5876 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
5877
5878 * match.pd: Delay FMA folds until after vectorization.
5879
5880 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
5881
5882 PR target/83009
5883 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5884 address check not strict.
5885
5886 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
5887
5888 * gimple-match.h (gimple_match_op): New class.
5889 (mprts_hook): Replace parameters with a gimple_match_op *.
5890 (maybe_build_generic_op): Likewise.
5891 (gimple_simplified_result_is_gimple_val): Replace parameters with
5892 a const gimple_match_op *.
5893 (gimple_simplify): Replace code_helper * and tree * parameters with
5894 a gimple_match_op * parameter.
5895 (gimple_resimplify1): Replace code_helper *, tree and tree *
5896 parameters with a gimple_match_op * parameter.
5897 (gimple_resimplify2): Likewise.
5898 (gimple_resimplify3): Likewise.
5899 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
5900 parameters with a gimple_match_op * parameter.
5901 * gimple-match-head.c (gimple_simplify): Change prototypes of
5902 auto-generated functions to take a gimple_match_op * instead of
5903 separate code_helper * and tree * parameters. Make the same
5904 change in the top-level overload and update calls to the
5905 gimple_resimplify routines. Update calls to the auto-generated
5906 functions and to maybe_push_res_to_seq in the publicly-facing
5907 operation-specific gimple_simplify overloads.
5908 (gimple_match_op::MAX_NUM_OPS): Define.
5909 (gimple_resimplify1): Replace rcode and ops with a single res_op
5910 parameter. Update call to gimple_simplify.
5911 (gimple_resimplify2): Likewise.
5912 (gimple_resimplify3): Likewise.
5913 (mprts_hook): Replace parameters with a gimple_match_op *.
5914 (maybe_build_generic_op): Likewise.
5915 (build_call_internal): Replace type, nargs and ops with
5916 a gimple_match_op *.
5917 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
5918 with a single gimple_match_op *. Update calls to mprts_hook,
5919 build_call_internal and gimple_simplified_result_is_gimple_val.
5920 Factor out code that is common to the tree_code and combined_fn cases.
5921 * genmatch.c (expr::gen_transform): Replace tem_code and
5922 tem_ops with a gimple_match_op called tem_op. Update calls
5923 to the gimple_resimplify functions and maybe_push_res_to_seq.
5924 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
5925 res_ops. Update call to the gimple_resimplify functions.
5926 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
5927 (decision_tree::gen): Make the functions take a gimple_match_op *
5928 called res_op instead of separate res_code and res_ops parameters.
5929 Update call accordingly.
5930 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
5931 and ops with a single res_op parameter. Update calls to
5932 maybe_build_generic_op and maybe_push_res_to_seq.
5933 (fold_stmt_1): Update calls to gimple_simplify and
5934 replace_stmt_with_simplification.
5935 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
5936 and gimple_simplified_result_is_gimple_val.
5937 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
5938 gimple_simplify.
5939 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
5940 with a gimple_match_op *.
5941 (vn_nary_build_or_lookup): Likewise. Update call to
5942 vn_nary_build_or_lookup_1.
5943 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
5944 gimple_match_op *. Update calls to the gimple_resimplify routines
5945 and to gimple_simplified_result_is_gimple_val.
5946 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
5947 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
5948 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
5949 (visit_nary_op): Likewise.
5950 (visit_reference_op_load): Likewise.
5951
5952 2018-05-23 Luis Machado <luis.machado@linaro.org>
5953
5954 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
5955 modifier for printing the step amount.
5956
5957 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
5958
5959 PR target/78849
5960 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
5961 types.
5962
5963 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
5964
5965 * doc/sourcebuild.texi (Endianness): New subsubsection.
5966
5967 2018-05-23 Luis Machado <luis.machado@linaro.org>
5968
5969 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5970 <prefetch_dynamic_strides>: New const bool field.
5971 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5972 prefetch_dynamic_strides.
5973 (exynosm1_prefetch_tune): Likewise.
5974 (thunderxt88_prefetch_tune): Likewise.
5975 (thunderx_prefetch_tune): Likewise.
5976 (thunderx2t99_prefetch_tune): Likewise.
5977 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
5978 false.
5979 (aarch64_override_options_internal): Update to set
5980 PARAM_PREFETCH_DYNAMIC_STRIDES.
5981 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5982 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5983 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5984 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5985 prefetch-dynamic-strides setting.
5986
5987 2018-05-23 Luis Machado <luis.machado@linaro.org>
5988
5989 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5990 <minimum_stride>: New const int field.
5991 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5992 minimum_stride field defaulting to -1.
5993 (exynosm1_prefetch_tune): Likewise.
5994 (thunderxt88_prefetch_tune): Likewise.
5995 (thunderx_prefetch_tune): Likewise.
5996 (thunderx2t99_prefetch_tune): Likewise.
5997 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
5998 <default_opt_level>: Set to 3.
5999 (aarch64_override_options_internal): Update to set
6000 PARAM_PREFETCH_MINIMUM_STRIDE.
6001 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6002 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6003 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6004 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6005 stride is constant and is below the minimum stride threshold.
6006
6007 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6008
6009 * config/arm/arm-cpus.in (mode26): Delete.
6010 (armv4): Delete mode26 reference.
6011 * config/arm/arm.c (arm_configure_build_target): Delete use of
6012 isa_bit_mode26.
6013
6014 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
6015
6016 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
6017 New insn pattern.
6018 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
6019 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
6020 for non-SSE modes.
6021 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
6022 (floatunsdidf2): Ditto.
6023
6024 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
6025
6026 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
6027 (fixuns_trunc<mode>si2_avx512f): Ditto.
6028 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
6029 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
6030 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
6031
6032 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
6033
6034 PR rtl-optimization/79985
6035 * df-scan.c (df_insn_refs_collect): Remove special case for
6036 global registers and asm statements.
6037
6038 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
6039
6040 * extend.texi (Global Register Variables): Rewrite the bullet list.
6041 Note that the register is available for allocation. Note that access
6042 via inline asm must use constraints. Add note about async-signal
6043 handlers. Remove paragraph about automagic register selection.
6044
6045 2018-05-23 Richard Biener <rguenther@suse.de>
6046
6047 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
6048 of fixed offset from memset VN.
6049
6050 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
6051
6052 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
6053 first_interp field.
6054 (alloc_cand_and_find_basis): Initialize first_interp field.
6055 (slsr_process_mul): Modify first_interp field.
6056 (slsr_process_add): Likewise.
6057 (slsr_process_cast): Modify first_interp field for each new
6058 interpretation.
6059 (slsr_process_copy): Likewise.
6060 (dump_candidate): Dump first_interp field.
6061 (replace_mult_candidate): Process all interpretations, not just
6062 subsequent ones.
6063 (replace_rhs_if_not_dup): Likewise.
6064 (replace_one_candidate): Likewise.
6065
6066 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
6067
6068 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
6069 Add new boolean.
6070 (aarch64_needs_frame_chain): New function.
6071 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
6072
6073 2018-05-23 Sudakshina Das <sudi.das@arm.com>
6074
6075 PR target/84882
6076 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
6077 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
6078 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
6079 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
6080 as true for strict-align.
6081 (aarch64_can_inline_p): Perform checks even when callee has no
6082 attributes to check for strict alignment.
6083 * doc/extend.texi (AArch64 Function Attributes): Document
6084 no-strict-align.
6085 * doc/invoke.texi: (AArch64 Options): Likewise.
6086
6087 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
6088
6089 PR tree-optimization/85853
6090 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
6091 the handling of the root of the node to...
6092 (vect_slp_analyze_node_operations_1): ...this new function,
6093 and run the whole thing with the child nodes' def types
6094 set according to their SLP node's def type.
6095
6096 2018-05-23 Richard Biener <rguenther@suse.de>
6097
6098 PR middle-end/85874
6099 * tree-data-ref.c (create_runtime_alias_checks): Defer
6100 and ignore overflow warnings.
6101
6102 2018-05-23 Yury Gribov <tetra2005@gmail.com>
6103
6104 PR tree-optimization/85822
6105 * tree-vrp.c (is_masked_range_test): Fix handling of negative
6106 constants.
6107
6108 2018-05-23 Richard Biener <rguenther@suse.de>
6109
6110 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6111 memset constants via native_interpret_expr.
6112
6113 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
6114
6115 PR target/85345
6116 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
6117 attribute.
6118 (cgraph_node::create_alias): Likewise.
6119 (cgraph_node::get_availability): Check ifunc_resolver instead
6120 of looking up ifunc attribute.
6121 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6122 * varasm.c (do_assemble_alias): Likewise.
6123 (assemble_alias): Likewise.
6124 (default_binds_local_p_3): Likewise.
6125 * cgraph.h (cgraph_node): Add ifunc_resolver.
6126 (cgraph_node::only_called_directly_or_aliased_p): Return false
6127 for IFUNC resolver.
6128 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
6129 attribute.
6130 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
6131 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
6132 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
6133 instead of looking up ifunc attribute.
6134
6135 2018-05-22 Luis Machado <luis.machado@linaro.org>
6136
6137 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
6138
6139 2018-05-22 Martin Sebor <msebor@redhat.com>
6140
6141 PR middle-end/85359
6142 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
6143 only when expasion succeeds.
6144 (expand_builtin_strcmp): Same.
6145 (expand_builtin_strncmp): Same.
6146
6147 2018-05-22 Martin Sebor <msebor@redhat.com>
6148
6149 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
6150
6151 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6152 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6153
6154 * config/aarch64/aarch64-ldpstp.md: Replace uses of
6155 aarch64_mem_pair_operand with memory_operand and delete operand swapping
6156 code.
6157 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6158 Add check for legitimate_address.
6159 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
6160 (aarch64_swap_ldrstr_operands): New.
6161 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
6162 Define prototype.
6163
6164 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6165 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6166
6167 * config/aarch64/aarch64.md: New patterns to generate stp
6168 and ldp.
6169 (store_pair_sw, store_pair_dw): New patterns to generate stp for
6170 single words and double words.
6171 (load_pair_sw, load_pair_dw): Likewise.
6172 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
6173 Delete.
6174 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
6175 Delete.
6176 * config/aarch64/aarch64-ldpstp.md: Modify peephole
6177 for different mode ldpstp and add peephole for merged zero stores.
6178 Likewise for loads.
6179 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6180 Add size check.
6181 (aarch64_gen_store_pair): Rename calls to match new patterns.
6182 (aarch64_gen_load_pair): Rename calls to match new patterns.
6183 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
6184 (load_pair<DREG:mode><DREG2:mode>): ... This.
6185 (store_pair<mode>): Rename to...
6186 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
6187 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
6188 New mode iterators.
6189 (V_INT_EQUIV): Handle SImode.
6190 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
6191 New predicate.
6192
6193 2018-05-22 Martin Sebor <msebor@redhat.com>
6194
6195 PR c/85623
6196 * calls.c (maybe_warn_nonstring_arg): Use string length to set
6197 or ajust the presumed bound on an operation to avoid unnecessary
6198 warnings.
6199
6200 2018-05-22 Martin Sebor <msebor@redhat.com>
6201
6202 PR tree-optimization/85826
6203 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
6204 assuming that a DECL necesarily has a constant size.
6205
6206 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
6207
6208 PR middle-end/85862
6209 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
6210
6211 2018-05-22 Richard Biener <rguenther@suse.de>
6212
6213 PR tree-optimization/85834
6214 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
6215 non-constant and non-zero memset arguments.
6216
6217 2018-05-22 Martin Liska <mliska@suse.cz>
6218
6219 PR ipa/85607
6220 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
6221
6222 2018-05-22 Richard Biener <rguenther@suse.de>
6223
6224 PR tree-optimization/85863
6225 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
6226 comparisons when vectype is specified.
6227 (vectorizable_condition): Do not specify vectype for
6228 vect_is_simple_cond when SLP vectorizing.
6229
6230 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
6231
6232 PR target/85657
6233 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
6234 define __ibm128 as long double.
6235 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
6236 as a distinct type when IEEE 128-bit support is enabled.
6237 (init_float128_ieee): Fix up conversions between IFmode and IEEE
6238 128-bit types to use the correct functions.
6239 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
6240 convert between 128-bit floating point types that have different
6241 modes but the same representation, instead of using gen_lowpart to
6242 makean alias.
6243 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
6244 KFmode.
6245 (IFKF_reg): New attributes to give the register constraints for
6246 IFmode and KFmode.
6247 (extend<mode>tf2_internal): New insns to mark an explicit
6248 conversion between 128-bit floating point types that have a
6249 different mode but share the same representation.
6250
6251 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
6252
6253 PR tree-optimization/85814
6254 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
6255 a null return from get_strinfo when unsharing the next
6256 strinfo in the chain.
6257
6258 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6259
6260 PR gcc/84923
6261 * varasm.c (weak_finish): Clean up weak_decls.
6262
6263 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6264
6265 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
6266 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
6267 UNSPEC_UADALP values.
6268 * config/aarch64/iterators.md (ABAL): New int iterator.
6269 (ABDL2): Likewise.
6270 (ADALP): Likewise.
6271 (sur): Add mappings for the above.
6272 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
6273 New define_insn.
6274 (aarch64_<sur>abal<mode>_4): Likewise.
6275 (aarch64_<sur>adalp<mode>_3): Likewise.
6276 (<sur>sadv16qi): New define_expand.
6277
6278 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
6279
6280 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
6281 (*movdf_internal): Ditto.
6282 (*rcpsf2_sse): Ditto.
6283 (*rsqrtsf2_sse): Ditto.
6284 (*sqrt<mode>2_sse): Ditto.
6285
6286 2018-05-21 Tamar Christina <tamar.christina@arm.com>
6287
6288 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
6289 eor3q<mode>4.
6290 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
6291 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
6292 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
6293 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
6294 vbcaxq_s64): New.
6295 * config/aarch64/arm_neon.h: Likewise.
6296 * config/aarch64/iterators.md (VQ_I): New.
6297
6298 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
6299
6300 * config.gcc: Add arc/t-multilib-linux to tmake_file for
6301 arc*-*-linux*.
6302 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
6303 MULTILIB_DIRNAMES
6304
6305 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
6306
6307 * config/nds32/constraints.md (S): New constraint.
6308 * config/nds32/nds32.md (call_internal): Use constraint S.
6309 (call_value_internal): Likewise.
6310 (sibcall_internal): Likewise.
6311 (sibcall_value_internal): Likewise.
6312
6313 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
6314 Chung-Ju Wu <jasonwucj@gmail.com>
6315
6316 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
6317 into consideration.
6318
6319 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
6320 Chung-Ju Wu <jasonwucj@gmail.com>
6321
6322 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
6323 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
6324 (nds32_rtx_costs_impl): Simplify.
6325 (nds32_address_cost_impl): Simplify.
6326 (nds32_init_rtx_costs): New function.
6327 (nds32_rtx_costs_speed_prefer): Likewise.
6328 (nds32_rtx_costs_size_prefer): Likewise.
6329 (nds32_address_cost_speed_prefer): Likewise.
6330 (nds32_address_cost_speed_fwprop): Likewise.
6331 (nds32_address_cost_size_prefer): Likewise.
6332 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
6333 * config/nds32/nds32.c (nds32_option_override): Use
6334 nds32_init_rtx_costs function.
6335
6336 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
6337
6338 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
6339 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
6340 (TARGET_PIPELINE_N8): Likewise.
6341 (TARGET_PIPELINE_N10): Likewise.
6342 (TARGET_PIPELINE_N13): Likewise.
6343 (TARGET_PIPELINE_GRAYWOLF): Likewise.
6344
6345 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
6346
6347 * config/nds32/nds32-fpu.md: Update copyright year.
6348
6349 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6350
6351 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
6352
6353 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6354
6355 * config/nds32/nds32.c
6356 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
6357 * config/nds32/nds32.opt (minline-asm-r15): New option.
6358
6359 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6360
6361 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
6362 MASK_HW_ABS.
6363 * config/nds32/nds32.md (abssi2): New pattern.
6364
6365 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
6366
6367 * config/i386/i386.md (rex64namesuffix): New mode attribute.
6368 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
6369 Merge insn pattern from sse_cvtsi2ss<round_name> and
6370 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
6371 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
6372 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
6373 using SWI48 mode iterator.
6374 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
6375 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
6376 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
6377 pattern from sse_cvttss2si<round_saeonly_name>
6378 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
6379 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
6380 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
6381 using SWI48 mode iterator.
6382 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
6383 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
6384 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
6385 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
6386 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
6387 using SWI48 mode iterator.
6388 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
6389 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
6390 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
6391 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
6392 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
6393 SWI48 mode iterator.
6394 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
6395 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
6396 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
6397 pattern from sse_cvttsd2si<round_saeonly_name>
6398 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
6399
6400 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6401
6402 * config/nds32/nds32-md-auxiliary.c
6403 (nds32_valid_smw_lwm_base_p): Refine.
6404 (nds32_output_smw_single_word): Refine.
6405 (nds32_output_smw_double_word): New.
6406 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
6407
6408 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6409
6410 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
6411 (nds32_output_stack_pop): Refine.
6412 (nds32_expand_unaligned_load): Refine.
6413 (nds32_expand_unaligned_store): Refine.
6414
6415 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6416 Chung-Ju Wu <jasonwucj@gmail.com>
6417
6418 * config/nds32/constants.md: Add TP_REGNUM constant.
6419 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
6420 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
6421 UNSPEC_ADD32.
6422 * config/nds32/nds32-doubleword.md: Consider flag_pic.
6423 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
6424 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
6425 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
6426 and PIC code generation.
6427 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
6428 code generation.
6429 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
6430 optimization.
6431 * config/nds32/nds32.md: Support TLS and PIC.
6432 * config/nds32/nds32.c: Support TLS and PIC.
6433 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
6434 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
6435 predicate.
6436
6437 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6438
6439 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
6440 mode with E_ prefix.
6441
6442 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6443 Chung-Ju Wu <jasonwucj@gmail.com>
6444
6445 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
6446 * config/nds32/nds32-md-auxiliary.c
6447 (symbolic_reference_mentioned_p): New.
6448 (nds32_legitimize_ict_address): New.
6449 (nds32_expand_ict_move): New.
6450 (nds32_indirect_call_referenced_p): New.
6451 (nds32_symbol_binds_local_p): Delete.
6452 (nds32_long_call_p): Modify.
6453 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
6454 * config/nds32/nds32-protos.h
6455 (symbolic_reference_mentioned_p): Declare.
6456 (nds32_legitimize_ict_address): Declare.
6457 (nds32_expand_ict_move): Declare.
6458 (nds32_indirect_call_referenced_p): Declare.
6459 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
6460 (nds32_relax_group): Use nds32_ict_const_p as condition.
6461 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
6462 (nds32_asm_file_start): Output ict_model directive in asm code.
6463 (nds32_legitimate_address_p): Consider indirect call.
6464 (nds32_print_operand): Consider indirect call.
6465 (nds32_print_operand_address): Consider indirect call.
6466 (nds32_insert_attributes): Handle "indirect_call" attribute.
6467 (TARGET_LEGITIMATE_ADDRESS_P): Define.
6468 (TARGET_LEGITIMATE_CONSTANT_P): Define.
6469 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
6470 (TARGET_DELEGITIMIZE_ADDRESS): Define.
6471 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
6472 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
6473 (TARGET_ICT_MODEL_SMALL): Define.
6474 (TARGET_ICT_MODEL_LARGE): Define.
6475 * config/nds32/nds32.md (movsi): Consider ict model.
6476 (call, call_value): Consider ict model.
6477 (sibcall, sibcall_value): Consider ict model.
6478 * config/nds32/nds32.opt (mict-model): New option.
6479 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
6480 model.
6481
6482 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
6483 Monk Chiang <sh.chiang04@gmail.com>
6484 Jim Wilson <jimw@sifive.com>
6485
6486 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
6487 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
6488 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
6489 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
6490 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
6491 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
6492 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
6493 compute save_libcall_adjustment properly.
6494 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
6495 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
6496 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
6497 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
6498 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
6499 (ABI_SPEC): Handle mabi=ilp32e.
6500 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
6501 (RVE): Add RVE mask.
6502 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
6503 <-march>: Add rv32e as an example.
6504
6505 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
6506
6507 PR c++/82899
6508 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
6509 (intra_create_variable_infos): Handle C++ constructors.
6510
6511 2018-05-18 Martin Liska <mliska@suse.cz>
6512
6513 * passes.def: Remove a redundant pass.
6514
6515 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
6516
6517 PR bootstrap/85838
6518 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
6519
6520 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6521
6522 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
6523 (ARMv4): Update.
6524 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
6525 (ARMv6m): Update.
6526 (armv2, armv2a, armv3, armv3m): Delete architectures.
6527 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
6528 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
6529 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
6530 Delete cpus.
6531 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
6532 (*mulsidi3adddi): Likewise.
6533 (mulsidi3): Likewise.
6534 (*mulsidi3_nov6): Likewise.
6535 (umulsidi3): Likewise.
6536 (umulsidi3_nov6): Likewise.
6537 (umaddsidi4): Likewise.
6538 (*umulsidi3adddi): Likewise.
6539 (smulsi3_highpart): Likewise.
6540 (*smulsi3_highpart_nov6): Likewise.
6541 (umulsi3_highpart): Likewise.
6542 (*umulsi3_highpart_nov6): Likewise.
6543 * config/arm/arm.h (arm_arch3m): Delete.
6544 * config/arm/arm.c (arm_arch3m): Delete.
6545 (arm_option_override_internal): Update armv3-related comment.
6546 (arm_configure_build_target): Delete use of isa_bit_mode32.
6547 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
6548 (arm_rtx_costs_internal): Delete check of arm_arch3m.
6549 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
6550 (mulsa3): Likewise.
6551 (mulusa3): Likewise.
6552 * config/arm/arm-protos.h (arm_arch3m): Delete.
6553 * config/arm/arm-tables.opt: Regenerate.
6554 * config/arm/arm-tune.md: Likewise.
6555 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
6556 deleted architectures.
6557
6558 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6559
6560 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
6561 (armv5t, armv5te): New features.
6562 (ARMv5, ARMv5e): Delete fgroups.
6563 (ARMv5t, ARMv5te): Adjust for above changes.
6564 (ARMv6m): Likewise.
6565 (armv5, armv5e): Delete arches.
6566 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
6567 arm_arch5.
6568 (*call_reg_arm): Likewise.
6569 (*call_value_reg_armv5): Likewise.
6570 (*call_value_reg_arm): Likewise.
6571 (*call_symbol): Likewise.
6572 (*call_value_symbol): Likewise.
6573 (*sibcall_insn): Likewise.
6574 (*sibcall_value_insn): Likewise.
6575 (clzsi2): Likewise.
6576 (prefetch): Likewise.
6577 (define_split and define_peephole2 dependent on arm_arch5):
6578 Likewise.
6579 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
6580 arm_arch5e.
6581 (TARGET_ARM_QBIT): Likewise.
6582 (TARGET_DSP_MULTIPLY): Likewise.
6583 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
6584 (arm_arch5, arm_arch5e): Delete.
6585 (arm_arch5t, arm_arch5te): Declare.
6586 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
6587 (arm_arch5t): Declare.
6588 (arm_option_reconfigure_globals): Update for the above.
6589 (arm_options_perform_arch_sanity_checks): Update comment, replace
6590 use of arm_arch5 with arm_arch5t.
6591 (use_return_insn): Likewise.
6592 (arm_emit_call_insn): Likewise.
6593 (output_return_instruction): Likewise.
6594 (arm_final_prescan_insn): Likewise.
6595 (arm_coproc_builtin_available): Likewise.
6596 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
6597 arm_arch5e with arm_arch5t and arm_arch5te.
6598 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
6599 (arm_arch5t, arm_arch5te): Declare.
6600 * config/arm/arm-tables.opt: Regenerate.
6601 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
6602 * config/arm/t-multilib: Likewise.
6603 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
6604 instead of arm_arch5.
6605 (*call_reg_thumb1): Likewise.
6606 (*call_value_reg_thumb1_v5): Likewise.
6607 (*call_value_reg_thumb1): Likewise.
6608 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
6609 unreachable path.
6610 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
6611
6612 2018-05-18 Martin Liska <mliska@suse.cz>
6613
6614 PR gcov-profile/84846
6615 * doc/gcov.texi: Document -t option of gcov tool.
6616
6617 2018-05-18 Martin Liska <mliska@suse.cz>
6618
6619 PR gcov-profile/84846
6620 * gcov.c (print_usage): Add new -t option.
6621 (process_args): Handle the option.
6622 (generate_results): Use stdout as output when requested by
6623 the option.
6624
6625 2018-05-18 Martin Liska <mliska@suse.cz>
6626
6627 PR gcov-profile/84846
6628 * coverage.c (coverage_init): Write PWD to .gcno file.
6629 * doc/gcov.texi: Document how working directory is printed.
6630 * gcov-dump.c (dump_gcov_file): Print PWD.
6631 * gcov.c (output_intermediate_file): Likewise.
6632 (read_graph_file): Read PWD string.
6633 (output_lines): Print PWD.
6634
6635 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6636
6637 PR middle-end/85817
6638 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
6639 for retval and return false if all args to phi are zero.
6640
6641 2018-05-18 Richard Biener <rguenther@suse.de>
6642
6643 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
6644 method.
6645 (evrp_dom_walker::before_dom_children): Call it.
6646
6647 2018-05-18 Richard Biener <rguenther@suse.de>
6648
6649 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
6650 results when processing array refs with variable index.
6651
6652 2018-05-18 Toon Moene <toon@moene.org>
6653
6654 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
6655 directly after that of -floop-interchange. Indicate that both
6656 options are enabled by default when specifying -O3.
6657
6658 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6659
6660 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
6661 iterator. Delete separate integer-mode vec_set<mode> expander.
6662 (aarch64_simd_vec_setv2di): Delete.
6663 (vec_setv2di): Delete.
6664 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
6665 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
6666 the "w, r" alternative.
6667
6668 2018-05-18 Martin Liska <mliska@suse.cz>
6669
6670 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
6671 * tree-pass.h (make_pass_lower_switch_O0): New function.
6672 * tree-switch-conversion.c (node_has_low_bound): Remove.
6673 (node_has_high_bound): Likewise.
6674 (node_is_bounded): Likewise.
6675 (class pass_lower_switch): Make it a template type and create
6676 two instances.
6677 (pass_lower_switch::execute): Add template argument.
6678 (make_pass_lower_switch): New function.
6679 (make_pass_lower_switch_O0): New function.
6680 (do_jump_if_equal): Remove.
6681 (emit_case_nodes): Simplify to just handle all 3 cases and leave
6682 all the hard work to tree optimization passes.
6683
6684 2018-05-18 Martin Liska <mliska@suse.cz>
6685
6686 * dbgcnt.c (limit_low): Renamed from limit.
6687 (limit_high): New variable.
6688 (dbg_cnt_is_enabled): Check for upper limit.
6689 (dbg_cnt): Adjust dumping.
6690 (dbg_cnt_set_limit_by_index): Add new argument for high
6691 value.
6692 (dbg_cnt_set_limit_by_name): Likewise.
6693 (dbg_cnt_process_single_pair): Parse new format.
6694 (dbg_cnt_process_opt): Use strtok.
6695 (dbg_cnt_list_all_counters): Remove 'value' and add
6696 'limit_high'.
6697 * doc/invoke.texi: Document changes.
6698
6699 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
6700
6701 * doc/sourcebuild.texi (scalar_all_fma): Document.
6702 * tree.def (FMA_EXPR): Delete.
6703 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
6704 * internal-fn.c (ternary_direct): New macro.
6705 (expand_ternary_optab_fn): Likewise.
6706 (direct_ternary_optab_supported_p): Likewise.
6707 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
6708 * builtins.c (fold_builtin_fma): Delete.
6709 (fold_builtin_3): Don't call it.
6710 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
6711 * expr.c (expand_expr_real_2): Likewise.
6712 * fold-const.c (operand_equal_p): Likewise.
6713 (fold_ternary_loc): Likewise.
6714 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
6715 * gimple.c (DEFTREECODE): Likewise.
6716 * gimplify.c (gimplify_expr): Likewise.
6717 * optabs-tree.c (optab_for_tree_code): Likewise.
6718 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
6719 * tree-eh.c (operation_could_trap_p): Likewise.
6720 (stmt_could_throw_1_p): Likewise.
6721 * tree-inline.c (estimate_operator_cost): Likewise.
6722 * tree-pretty-print.c (dump_generic_node): Likewise.
6723 (op_code_prio): Likewise.
6724 * tree-ssa-loop-im.c (stmt_cost): Likewise.
6725 * tree-ssa-operands.c (get_expr_operands): Likewise.
6726 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
6727 * fold-const-call.h (fold_fma): Delete.
6728 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
6729 CFN_FNMA and CFN_FNMS.
6730 (fold_fma): Delete.
6731 * genmatch.c (combined_fn): New enum.
6732 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
6733 (commutative_op): New function.
6734 (commutate): Use it. Handle more than 2 operands.
6735 (dt_operand::gen_gimple_expr): Use commutative_op.
6736 (parser::parse_expr): Allow :c to be used with non-binary
6737 operators if the commutative operand is known.
6738 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
6739 CFN_FMS, CFN_FNMA and CFN_FNMS.
6740 (backprop::process_assign_use): Remove FMA_EXPR handling.
6741 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
6742 (gen_hsa_fma): New function.
6743 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
6744 IFN_FNMA and IFN_FNMS.
6745 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
6746 * gimple-fold.h (follow_all_ssa_edges): Declare.
6747 * gimple-fold.c (follow_all_ssa_edges): New function.
6748 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
6749 gimple_build interface and use follow_all_ssa_edges to fold the result.
6750 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
6751 instead of checking for optabs directly.
6752 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
6753 rather than FMA_EXPRs.
6754 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
6755 call to IFN_FMA instead of an FMA_EXPR.
6756
6757 2018-05-17 Jim Wilson <jimw@sifive.com>
6758
6759 * expr.c (do_tablejump): When converting index to Pmode, if we have a
6760 sign extended promoted subreg, and the range does not have the sign bit
6761 set, then do a sign extend.
6762
6763 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
6764 test, check for sign extended subreg and/or constant operands, and
6765 do a sign extend in that case.
6766
6767 2018-05-17 Steve Ellcey <sellcey@cavium.com>
6768
6769 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
6770 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
6771 Add untyped.
6772 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
6773 Change logics_shift_reg to logics_shift_imm.
6774 (thunderx2t99_fp_loadpair_basic): Delete.
6775 (thunderx2t99_fp_storepair_basic): Delete.
6776 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
6777 (thunderx2t99_asimd_polynomial): Delete.
6778 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
6779 and neon_fp_mul_d_scalar_q.
6780 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
6781 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
6782 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
6783 (thunderx2t99_asimd_lut): Add missing tbl types.
6784 (thunderx2t99_asimd_ext): Delete.
6785 (thunderx2t99_asimd_load1_1_mult): Delete.
6786 (thunderx2t99_asimd_load1_2_mult): Delete.
6787 (thunderx2t99_asimd_load1_ldp): New.
6788 (thunderx2t99_asimd_load1): New.
6789 (thunderx2t99_asimd_load2): Add missing *load2* types.
6790 (thunderx2t99_asimd_load3): New.
6791 (thunderx2t99_asimd_load4): New.
6792 (thunderx2t99_asimd_store1_1_mult): Delete.
6793 (thunderx2t99_asimd_store1_2_mult): Delete.
6794 (thunderx2t99_asimd_store2_mult): Delete.
6795 (thunderx2t99_asimd_store2_onelane): Delete.
6796 (thunderx2t99_asimd_store_stp): New.
6797 (thunderx2t99_asimd_store1): New.
6798 (thunderx2t99_asimd_store2): New.
6799 (thunderx2t99_asimd_store3): New.
6800 (thunderx2t99_asimd_store4): New.
6801
6802 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
6803
6804 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
6805 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
6806
6807 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
6808 Segher Boessenkool <segher@kernel.crashing.org>
6809
6810 PR target/85698
6811 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
6812 operand.
6813
6814 2018-05-17 Richard Biener <rguenther@suse.de>
6815
6816 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
6817 for pruning loop and prune defs feeding only already visited PHIs.
6818
6819 2018-05-17 Richard Biener <rguenther@suse.de>
6820
6821 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
6822
6823 2018-05-17 Bin Cheng <bin.cheng@arm.com>
6824 Richard Biener <rguenther@suse.de>
6825
6826 PR tree-optimization/85793
6827 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
6828 for VMAT_ELEMENTWISE.
6829
6830 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
6831
6832 * internal-fn.h (lookup_internal_fn): Declare
6833 * internal-fn.c (lookup_internal_fn): New function.
6834 * gimple.c (gimple_build_call_from_tree): Handle calls to
6835 internal functions.
6836 * gimple-pretty-print.c (dump_gimple_call): Print "." before
6837 internal function names.
6838 * tree-pretty-print.c (dump_generic_node): Likewise.
6839 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
6840
6841 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
6842
6843 * gimple-fold.h (gimple_build): Make the function forms take
6844 combined_fn rather than built_in_function.
6845 (gimple_simplify): Likewise.
6846 * gimple-match-head.c (gimple_simplify): Likewise.
6847 * gimple-fold.c (gimple_build): Likewise.
6848 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
6849 rather than gimple_build_call_internal.
6850 (get_initial_defs_for_reduction): Likewise.
6851 (vect_create_epilog_for_reduction): Likewise.
6852 (vectorizable_live_operation): Likewise.
6853
6854 2018-05-17 Martin Liska <mliska@suse.cz>
6855
6856 * gimple-ssa-sprintf.c (format_directive): Do not use
6857 space in between 'G_' and '('.
6858
6859 2018-05-17 Jakub Jelinek <jakub@redhat.com>
6860
6861 PR target/85323
6862 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
6863 even if the mask is not all ones.
6864
6865 PR target/85323
6866 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
6867 vector.
6868 (ix86_gimple_fold_builtin): Likewise.
6869
6870 PR target/85323
6871 * config/i386/i386.c: Include tree-vector-builder.h.
6872 (ix86_vector_shift_count): New function.
6873 (ix86_fold_builtin): Fold shift builtins by scalar count.
6874 (ix86_gimple_fold_builtin): Likewise.
6875
6876 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
6877 _mm512_setzero): New intrinsics.
6878
6879 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
6880 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6881
6882 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
6883 code generation for cases where splatting a value is not useful.
6884 * simplify-rtx.c (simplify_ternary_operation): Simplify
6885 vec_merge across a vec_duplicate and a paradoxical subreg forming
6886 a vector mode to a vec_concat.
6887
6888 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
6889
6890 * config.gcc: Support "goldmont-plus".
6891 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6892 "goldmont-plus".
6893 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6894 PROCESSOR_GOLDMONT_PLUS.
6895 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
6896 (processor_target_table): Add "goldmont-plus".
6897 (PTA_GOLDMONT_PLUS): Define.
6898 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
6899 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
6900 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
6901 (fold_builtin_cpu): Add "goldmont-plus".
6902 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
6903 (ix86_option_override_internal): Add "goldmont-plus".
6904 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
6905 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
6906 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
6907 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
6908
6909 2018-05-17 Richard Biener <rguenther@suse.de>
6910
6911 PR tree-optimization/85757
6912 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
6913 remove defs that only feed that PHI from further processing.
6914
6915 2018-05-16 Jim Wilson <jimw@sifive.com>
6916
6917 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
6918 asterisk to name.
6919 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
6920
6921 2018-05-16 Mark Wielaard <mark@klomp.org>
6922
6923 * dwarf2out.c (count_index_strings): New function.
6924 (output_indirect_strings): Call count_index_strings and generate
6925 header for dwarf_version >= 5.
6926
6927 2018-05-16 Mark Wielaard <mark@klomp.org>
6928
6929 * dwarf2out.c (dwarf_FORM): New function.
6930 (set_indirect_string): Use dwarf_FORM.
6931 (reset_indirect_string): Likewise.
6932 (size_of_die): Likewise.
6933 (value_format): Likewise.
6934 (output_die): Likewise.
6935 (add_skeleton_AT_string): Likewise.
6936 (output_macinfo_op): Likewise.
6937 (index_string): Likewise.
6938 (output_index_string_offset): Likewise.
6939 (output_index_string): Likewise.
6940 (count_index_strings): Likewise.
6941
6942 2018-05-16 Carl Love <cel@us.ibm.com>
6943
6944 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
6945 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
6946
6947 2018-05-16 Martin Jambor <mjambor@suse.cz>
6948
6949 * ipa-prop.c (ipa_free_all_edge_args): Remove.
6950 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
6951
6952 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
6953
6954 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
6955 (fnma<mode>4): Likewise.
6956 (fms<mode>4): Likewise.
6957 (fnms<mode>4): Likewise.
6958 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
6959 (aarch64_fnma<mode>4): Likewise.
6960 (aarch64_fms<mode>4): Likewise.
6961 (aarch64_fnms<mode>4): Likewise.
6962 (aarch64_fnmadd<mode>4): Likewise.
6963
6964 2018-05-16 Jason Merrill <jason@redhat.com>
6965
6966 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
6967
6968 2018-05-16 Richard Biener <rguenther@suse.de>
6969
6970 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
6971 (dump_stmt_cost): Declare.
6972 (add_stmt_cost): Dump cost we add.
6973 (add_stmt_costs): New function.
6974 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
6975 No longer exported.
6976 (vect_analyze_stmt): Adjust prototype.
6977 (vectorizable_condition): Likewise.
6978 (vectorizable_live_operation): Likewise.
6979 (vectorizable_reduction): Likewise.
6980 (vectorizable_induction): Likewise.
6981 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
6982 cost vector to pass to vectorizable_ and record afterwards.
6983 (vect_model_reduction_cost): Take cost vector argument and adjust.
6984 (vect_model_induction_cost): Likewise.
6985 (vectorizable_reduction): Likewise.
6986 (vectorizable_induction): Likewise.
6987 (vectorizable_live_operation): Likewise.
6988 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
6989 SLP_TREE_NUMBER_OF_VEC_STMTS.
6990 (vect_analyze_slp_cost_1): Remove.
6991 (vect_analyze_slp_cost): Likewise.
6992 (vect_slp_analyze_node_operations): Take visited args and
6993 a target cost vector. Avoid processing already visited stmt sets.
6994 (vect_slp_analyze_operations): Use a local cost vector to gather
6995 costs and register those of non-discarded instances.
6996 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
6997 (vect_schedule_slp_instance): Remove copying of
6998 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
6999 zero.
7000 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
7001 adding cost. Record cost entry location.
7002 (vect_prologue_cost_for_slp_op): Function to compute cost of
7003 a constant or invariant generated for SLP vect in the prologue,
7004 split out from vect_analyze_slp_cost_1.
7005 (vect_model_simple_cost): Make static. Adjust for SLP costing.
7006 (vect_model_promotion_demotion_cost): Likewise.
7007 (vect_model_store_cost): Likewise, make static.
7008 (vect_model_load_cost): Likewise.
7009 (vectorizable_bswap): Add cost vector arg and adjust.
7010 (vectorizable_call): Likewise.
7011 (vectorizable_simd_clone_call): Likewise.
7012 (vectorizable_conversion): Likewise.
7013 (vectorizable_assignment): Likewise.
7014 (vectorizable_shift): Likewise.
7015 (vectorizable_operation): Likewise.
7016 (vectorizable_store): Likewise.
7017 (vectorizable_load): Likewise.
7018 (vectorizable_condition): Likewise.
7019 (vectorizable_comparison): Likewise.
7020 (can_vectorize_live_stmts): Likewise.
7021 (vect_analyze_stmt): Likewise.
7022 (vect_transform_stmt): Adjust calls to vectorizable_*.
7023 * tree-vectorizer.c: Include gimple-pretty-print.h.
7024 (dump_stmt_cost): New function.
7025
7026 2018-05-16 Richard Biener <rguenther@suse.de>
7027
7028 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
7029 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
7030 * tree-ssa-dse.c: Include tree-ssa-loop.h.
7031 (check_name): New callback.
7032 (dse_classify_store): Track cycles via a visited bitmap of PHI
7033 defs and simplify handling of in-loop and across loop dead stores
7034 and properly fail for loop-variant refs. Handle byte-tracking with
7035 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
7036 limiting the walk.
7037
7038 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
7039
7040 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
7041 (vect_get_mask_type_for_stmt): Likewise.
7042 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
7043 split out from...
7044 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
7045 to determine the statement's vector type and the vector type that
7046 should be used for calculating nunits. Deal with cases in which
7047 the type has to be deferred.
7048 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
7049 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
7050 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
7051 (vect_determine_vf_for_stmt): New functions, split out from...
7052 (vect_determine_vectorization_factor): ...here.
7053 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
7054 (vect_get_mask_type_for_stmt): New functions, split out from
7055 vect_determine_vectorization_factor.
7056
7057 2018-05-16 Richard Biener <rguenther@suse.de>
7058
7059 * tree-cfg.c (verify_gimple_assign_ternary): Properly
7060 verify the [VEC_]COND_EXPR embedded comparison.
7061
7062 2018-05-15 Martin Sebor <msebor@redhat.com>
7063
7064 PR tree-optimization/85753
7065 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
7066 RECORD_TYPE in addition to ARRAY_TYPE.
7067
7068 2018-05-15 Martin Sebor <msebor@redhat.com>
7069
7070 PR middle-end/85643
7071 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
7072
7073 2018-05-15 Richard Biener <rguenther@suse.de>
7074
7075 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
7076 add by_clobber_p one. Change algorithm to collect all defs
7077 representing uses we need to walk and try reducing them to
7078 a single one before failing.
7079 (dse_dom_walker::dse_optimize_stmt): Adjust.
7080
7081 2018-05-13 Mark Wielaard <mark@klomp.org>
7082
7083 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
7084 (size_of_loc_descr): Likewise.
7085 (output_loc_operands): Likewise.
7086 (output_loc_operands_raw): Likewise.
7087 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
7088 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
7089 (hash_loc_operands): Likewise.
7090 (compare_loc_operands): Likewise.
7091
7092 2018-05-14 Mark Wielaard <mark@klomp.org>
7093
7094 * dwarf2out.c (count_index_addrs): New function.
7095 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
7096
7097 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7098
7099 PR tree-optimization/83648
7100 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
7101 return value as malloc candidate.
7102
7103 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7104
7105 PR ipa/85734
7106 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
7107 param as true in call to suggest_attribute.
7108
7109 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
7110
7111 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
7112 -mreadonly-in-sdata.
7113
7114 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7115
7116 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
7117 New pattern.
7118 (aarch64_crypto_aesd_fused): Likewise.
7119
7120 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
7121
7122 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
7123 (movsi_aarch64): Likewise.
7124 (load_pairsi): Likewise.
7125 (load_pairdi): Likewise.
7126 (store_pairsi): Likewise.
7127 (store_pairdi): Likewise.
7128 (load_pairsf): Likewise.
7129 (load_pairdf): Likewise.
7130 (store_pairsf): Likewise.
7131 (store_pairdf): Likewise.
7132 (zero_extend): Likewise.
7133 (trunc): Swap alternatives.
7134 (fcvt_target): Add '?' to prefer w over r.
7135
7136 2018-05-14 Jakub Jelinek <jakub@redhat.com>
7137
7138 PR target/85756
7139 * config/i386/i386.md: Disallow non-commutative arithmetics in
7140 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
7141 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
7142 in the peephole2 before it.
7143
7144 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
7145
7146 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
7147 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
7148 (ix86_handle_option): Handle -mcldemote.
7149 * config.gcc: New header.
7150 * config/i386/cldemoteintrin.h: New file.
7151 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
7152 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7153 -mcldemote.
7154 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7155 OPTION_MASK_ISA_CLDEMOTE.
7156 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
7157 (ix86_valid_target_attribute_inner_p): Ditto.
7158 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
7159 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
7160 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
7161 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
7162 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
7163 (cldemote): New.
7164 * config/i386/i386.opt: Add -mcldemote.
7165 * config/i386/x86intrin.h: New header.
7166 * doc/invoke.texi: Add -mcldemote.
7167
7168 2018-05-14 Richard Biener <rguenther@suse.de>
7169
7170 * doc/match-and-simplify.texi: Adjust :s documentation.
7171
7172 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
7173
7174 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
7175 intended memcpy size.
7176 (REORDER_45): Likewise.
7177
7178 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
7179
7180 * sort.cc: New file.
7181 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
7182 * vec.c (qsort_chk): Use gcc_qsort.
7183 * Makefile.in (OBJS-libcommon): Add sort.o.
7184 (build/sort.o): New target. Use it...
7185 (BUILD_RTL): ... here, and...
7186 (build/gencfn-macros): ... here, and...
7187 (build/genmatch): ... here.
7188
7189 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7190 Chung-Ju Wu <jasonwucj@gmail.com>
7191
7192 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
7193 * config/nds32/nds32-graywolf.md: New file.
7194 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
7195 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
7196 pipeline.
7197 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
7198 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
7199 * config/nds32/nds32.md (pipeline_model): Add graywolf.
7200 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
7201 * config/nds32/pipelines.md: Include n15 settings.
7202
7203 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7204 Chung-Ju Wu <jasonwucj@gmail.com>
7205
7206 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
7207 * config/nds32/nds32-n13.md: New file.
7208 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
7209 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
7210 pipeline.
7211 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
7212 * config/nds32/nds32.md (pipeline_model): Add n13.
7213 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
7214 * config/nds32/pipelines.md: Include n13 settings.
7215
7216 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7217 Chung-Ju Wu <jasonwucj@gmail.com>
7218
7219 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
7220 * config/nds32/nds32-n10.md: New file.
7221 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
7222 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
7223 pipeline.
7224 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
7225 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
7226 * config/nds32/nds32.md (pipeline_model): Add n10.
7227 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
7228 * config/nds32/pipelines.md: Include n10 settings.
7229
7230 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
7231 Kito Cheng <kito.cheng@gmail.com>
7232 Chung-Ju Wu <jasonwucj@gmail.com>
7233
7234 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
7235 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7236 Add enum values for DSP extension instructions.
7237 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
7238 New constraints.
7239 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
7240 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
7241 New code iterators.
7242 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
7243 * config/nds32/nds32-dspext.md: New file for DSP implementation.
7244 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
7245 * config/nds32/nds32-intrinsic.md: Likewise.
7246 * config/nds32/nds32_intrinsic.h: Likewise.
7247 * config/nds32/nds32-md-auxiliary.c: Likewise.
7248 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
7249 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
7250 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
7251 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
7252 * config/nds32/nds32-protos.h: New declarations for DSP extension.
7253 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
7254 TYPE_DMAC in switch statement.
7255 * config/nds32/nds32.c: New checking and implementation for DSP
7256 extension instructions.
7257 * config/nds32/nds32.h: Likewise.
7258 * config/nds32/nds32.md: Likewise.
7259 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
7260 * config/nds32/predicates.md: Implement new predicates for DSP
7261 extension.
7262
7263 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7264
7265 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
7266 Reformat alternatives and attributes so it is easier to identify
7267 which constraints/attributes go with which instruction.
7268 (mov<mode>_hardfloat32, FMOVE64): Likewise.
7269 (mov<mode>_softfloat32, FMOVE64): Likewise.
7270 (mov<mode>_hardfloat64, FMOVE64): Likewise.
7271 (mov<mode>_softfloat64, FMOVE64): Likewise.
7272
7273 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
7274
7275 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7276 subsection.
7277 (Basic PowerPC Built-in Functions): The new name of the
7278 subsection previously known as "PowerPC Built-in Functions".
7279 (Basic PowerPC Built-in Functions Available on all Configurations):
7280 New subsubsection.
7281 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
7282 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
7283 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
7284 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
7285
7286 2018-05-11 Martin Jambor <mjambor@suse.cz>
7287
7288 PR ipa/85655
7289 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
7290 single const.
7291
7292 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
7293
7294 PR target/85733
7295 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
7296
7297 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
7298
7299 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
7300 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
7301 (ix86_handle_option): Handle -mwaitpkg.
7302 * config.gcc: New header.
7303 * config/i386/cpuid.h (bit_WAITPKG): New bit.
7304 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
7305 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
7306 function type.
7307 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7308 OPTION_MASK_ISA_WAITPKG.
7309 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
7310 (ix86_option_override_internal): Add PTA_WAITPKG.
7311 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
7312 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
7313 IX86_BUILTIN_TPAUSE.
7314 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
7315 __builtin_ia32_umwait and __builtin_ia32_tpause.
7316 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
7317 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
7318 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
7319 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
7320 UNSPECV_TPAUSE): New.
7321 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
7322 * config/i386/i386.opt: Add -mwaitpkg.
7323 * config/i386/waitpkgintrin.h: New file.
7324 * config/i386/x86intrin.h: New header.
7325 * doc/invoke.texi: Add -mwaitpkg.
7326
7327 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
7328
7329 PR target/85606
7330 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
7331 equivalent.
7332 (cortex-m0): Use armv6s-m isa.
7333 (cortex-m0plus): Likewise.
7334 (cortex-m1): Likewise.
7335 (cortex-m0.small-multiply): Likewise.
7336 (cortex-m0plus.small-multiply): Likewise.
7337 (cortex-m1.small-multiply): Likewise.
7338
7339 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
7340 Jakub Jelinek <jakub@redhat.com>
7341
7342 PR tree-optimization/85692
7343 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
7344 source permute as well.
7345
7346 2018-05-11 Martin Liska <mliska@suse.cz>
7347
7348 PR sanitizer/85556
7349 * doc/extend.texi: Document LLVM style format for no_sanitize
7350 attribute.
7351
7352 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
7353
7354 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
7355 mode_supports_vsx_dform_quad to mode_supports_dq_form.
7356 (mode_supports_vsx_dform_quad): Likewise.
7357 (mode_supports_vmx_dform): Move these functions to be next to the
7358 other mode_supports functions.
7359 (mode_supports_dq_form): Likewise.
7360 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
7361 mode_supports_dq_form.
7362 (reg_offset_addressing_ok_p): Likewise.
7363 (offsettable_ok_by_alignment): Likewise.
7364 (rs6000_legitimate_offset_address_p): Likewise.
7365 (legitimate_lo_sum_address_p): Likewise.
7366 (rs6000_legitimize_address): Likewise.
7367 (rs6000_legitimize_reload_address): Likewise.
7368 (rs6000_secondary_reload_inner): Likewise.
7369 (rs6000_preferred_reload_class): Likewise.
7370 (rs6000_output_move_128bit): Likewise.
7371
7372 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
7373
7374 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
7375 Generate SImode target register for null target.
7376 <case IX86_BUILTIN_XGETBV>: Ditto.
7377 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
7378 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
7379
7380 2018-05-10 Carl Love <cel@us.ibm.com>
7381
7382 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7383 dcbtt and dcbtstt if operands[2] is 0.
7384
7385 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
7386
7387 PR target/85693
7388 * config/i386/sse.md (usadv64qi): New expander.
7389
7390 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
7391
7392 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
7393 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
7394 -maltivec=be support.
7395 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
7396 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
7397 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
7398 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
7399 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
7400 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
7401 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
7402 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
7403 altivec_vsumsws): Adjust.
7404 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
7405 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
7406 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
7407 support.
7408 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
7409 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
7410 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
7411 (altivec_lve<VI_char>x): Delete expand.
7412 (*altivec_lve<VI_char>x_internal): Rename to...
7413 (altivec_lve<VI_char>x): ... this.
7414 (altivec_lvxl_<mode>): Delete expand.
7415 (*altivec_lvxl_<mode>_internal): Rename to ...
7416 (altivec_lvxl_<mode>): ... this.
7417 (altivec_stvxl_<mode>): Delete expand.
7418 (*altivec_stvxl_<mode>_internal): Rename to ...
7419 (altivec_stvxl_<mode>): ... this.
7420 (altivec_stve<VI_char>x): Delete expand.
7421 (*altivec_stve<VI_char>x_internal): Rename to ...
7422 (altivec_stve<VI_char>x): ... this.
7423 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
7424 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
7425 reduc_plus_scal_<mode>): Adjust.
7426 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
7427 comment.
7428 (rs6000_cpu_cpp_builtins): Adjust.
7429 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
7430 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
7431 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
7432 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
7433 -maltivec=be support.
7434 (rs6000_split_vec_extract_var): Adjust.
7435 (rs6000_split_v4si_init): Adjust.
7436 (swap_selector_for_mode): Delete.
7437 (altivec_expand_lvx_be, altivec_expand_stvx_be,
7438 altivec_expand_stvex_be): Delete.
7439 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
7440 -maltivec=be support.
7441 (rs6000_gimple_fold_builtin): Ditto.
7442 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
7443 Adjust.
7444 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
7445 (TARGET_DIRECT_MOVE_64BIT): Adjust.
7446 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
7447 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
7448 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
7449 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
7450 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
7451 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
7452 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
7453 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
7454 anonymous split): Adjust.
7455 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
7456 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
7457
7458 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
7459
7460 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
7461 when --with-gxx-include-dir is also specified.
7462 * configure: Regenerate.
7463
7464 2018-05-09 Jim Wilson <jimw@sifive.com>
7465
7466 PR target/84797
7467 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
7468 * config/riscv/t-withmultilib: New.
7469 * config/riscv/withmultilib.h: New.
7470 * doc/install.texi: Document RISC-V --with-multilib-list support.
7471
7472 2018-05-09 Richard Biener <rguenther@suse.de>
7473
7474 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
7475 vector.
7476 (vect_bb_vectorization_profitable_p): Adjust. Compute
7477 actual scalar cost using the cost vector and the add_stmt_cost
7478 machinery.
7479
7480 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7481
7482 PR rtl-optimization/85645
7483 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
7484 in the REG_CFA_REGISTER note for LR, don't leave it empty.
7485
7486 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7487
7488 PR rtl-optimization/85645
7489 * shrink-wrap.c (spread_components): Return a boolean saying if
7490 anything was changed.
7491 (try_shrink_wrapping_separate): Iterate spread_components until
7492 nothing changes anymore.
7493
7494 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7495
7496 PR rtl-optimization/85645
7497 * regrename.c (build_def_use): Also kill the chains that include the
7498 destination of a REG_CFA_REGISTER note.
7499
7500 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
7501
7502 PR rtl-optimization/85645
7503 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
7504 insn that has a REG_CFA_REGISTER note.
7505
7506 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
7507
7508 * cfgexpand.c (expand_clobber): New function.
7509 (expand_gimple_stmt_1): Use it.
7510 * tree-vect-stmts.c (vect_clobber_variable): New function,
7511 split out from...
7512 (vectorizable_simd_clone_call): ...here.
7513 (vectorizable_store): Emit a clobber either side of an
7514 IFN_STORE_LANES sequence.
7515 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
7516
7517 2018-05-09 Tom de Vries <tom@codesourcery.com>
7518
7519 PR target/85626
7520 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
7521 (define_insn "trap_if_false"): Add exit after trap.
7522
7523 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
7524
7525 PR rtl-optimization/85638
7526 * bb-reorder.c: Include common/common-target.h.
7527 (create_forwarder_block): New function extracted from...
7528 (fix_up_crossing_landing_pad): ...here. Rename into...
7529 (dw2_fix_up_crossing_landing_pad): ...this.
7530 (sjlj_fix_up_crossing_landing_pad): New function.
7531 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
7532 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
7533 from both partitions and exit the loop after one iteration.
7534
7535 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
7536
7537 Revert:
7538 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7539 subsection.
7540 (Basic PowerPC Built-in Functions): The new name of the
7541 subsection previously known as "PowerPC Built-in Functions".
7542 (Basic PowerPC Built-in Functions Available on all Configurations):
7543 New subsubsection.
7544 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
7545 subsubsection.
7546 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
7547 subsubsection.
7548 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
7549 subsubsection.
7550 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
7551 subsubsection.
7552
7553 2018-05-08 Jim Wilson <jimw@sifive.com>
7554
7555 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
7556 (LD_EMUL_SUFFIX): New.
7557 (LINK_SPEC): Use it.
7558
7559 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
7560
7561 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7562 subsection.
7563 (Basic PowerPC Built-in Functions): The new name of the
7564 subsection previously known as "PowerPC Built-in Functions".
7565 (Basic PowerPC Built-in Functions Available on all Configurations):
7566 New subsubsection.
7567 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
7568 subsubsection.
7569 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
7570 subsubsection.
7571 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
7572 subsubsection.
7573 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
7574 subsubsection.
7575
7576 2018-05-08 Jakub Jelinek <jakub@redhat.com>
7577
7578 PR target/85683
7579 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
7580 after cmpelim optimization.
7581
7582 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
7583
7584 * config.gcc: Support "goldmont".
7585 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
7586 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7587 PROCESSOR_GOLDMONT.
7588 * config/i386/i386.c (m_GOLDMONT): Define.
7589 (processor_target_table): Add "goldmont".
7590 (PTA_GOLDMONT): Define.
7591 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
7592 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
7593 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
7594 (fold_builtin_cpu): Add "goldmont".
7595 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
7596 (ix86_option_override_internal): Add "goldmont".
7597 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
7598 (processor_type): Add PROCESSOR_GOLDMONT.
7599 * config/i386/i386.md: Add CPU "glm".
7600 * config/i386/glm.md: New file.
7601 * config/i386/x86-tune.def: Add m_GOLDMONT.
7602 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
7603
7604 2018-05-08 Jakub Jelinek <jakub@redhat.com>
7605
7606 PR target/85572
7607 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
7608 E_V4DImode.
7609 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
7610 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
7611 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
7612
7613 PR target/85317
7614 * config/i386/i386.c (ix86_fold_builtin): Handle
7615 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
7616
7617 PR target/85480
7618 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
7619 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
7620
7621 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
7622
7623 PR target/85658
7624 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
7625 (check_arch): Likewise.
7626 (check_fpu): Return the result rather than printing it.
7627 (end arch): Fix operator precedence.
7628 (end cpu): Likewise.
7629 (END): Print the result from check_fpu.
7630
7631 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
7632 Alan Hayward <alan.hayward@arm.com>
7633 David Sherwood <david.sherwood@arm.com>
7634
7635 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
7636 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
7637 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
7638 (*fcmuo<mode>_and): New patterns.
7639
7640 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
7641
7642 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
7643 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
7644 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
7645 (cmp_op, sve_imm_con): New code attributes.
7646 (SVE_COND_INT_CMP, imm_con): Delete.
7647 (cmp_op): Remove above unspecs from int attribute.
7648 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
7649 to...
7650 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
7651 comparison-specific unspecs.
7652 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
7653 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
7654 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
7655 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
7656 (*vec_fcm<cmp_op><mode>): Rename to...
7657 (*fcm<cmp_op><mode>): ...this and adjust likewise.
7658 (*vec_fcmuo<mode>): Rename to...
7659 (*fcmuo<mode>): ...this and adjust likewise.
7660 (*pred_fcm<cmp_op><mode>): New pattern.
7661 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
7662 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
7663 functions.
7664 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
7665 and UNORDERED.
7666 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
7667 (aarch64_emit_sve_predicated_cond): New function.
7668 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
7669 (aarch64_emit_unspec_cond_or): Replace with...
7670 (aarch64_emit_sve_or_conds): ...this new function. Use
7671 aarch64_emit_sve_ptrue_op for the individual comparisons and
7672 aarch64_emit_binop to OR them together.
7673 (aarch64_emit_inverted_unspec_cond): Replace with...
7674 (aarch64_emit_sve_inverted_cond): ...this new function. Use
7675 aarch64_emit_sve_ptrue_op for the comparison and
7676 aarch64_emit_unop to invert the result.
7677 (aarch64_expand_sve_vec_cmp_float): Update after the above
7678 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
7679
7680 2018-05-07 Nathan Sidwell <nathan@acm.org>
7681
7682 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
7683 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
7684 (Backwards Compatibility): Likewise.
7685
7686 2018-05-07 Luis Machado <luis.machado@linaro.org>
7687
7688 PR bootstrap/85681
7689 Revert:
7690 2018-05-07 Luis Machado <luis.machado@linaro.org>
7691
7692 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7693 <prefetch_dynamic_strides>: New const bool field.
7694 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7695 prefetch_dynamic_strides.
7696 (exynosm1_prefetch_tune): Likewise.
7697 (thunderxt88_prefetch_tune): Likewise.
7698 (thunderx_prefetch_tune): Likewise.
7699 (thunderx2t99_prefetch_tune): Likewise.
7700 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7701 to false.
7702 (aarch64_override_options_internal): Update to set
7703 PARAM_PREFETCH_DYNAMIC_STRIDES.
7704 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7705 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7706 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7707 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7708 prefetch-dynamic-strides setting.
7709
7710 2018-05-07 Luis Machado <luis.machado@linaro.org>
7711
7712 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7713 <minimum_stride>: New const int field.
7714 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7715 minimum_stride field.
7716 (exynosm1_prefetch_tune): Likewise.
7717 (thunderxt88_prefetch_tune): Likewise.
7718 (thunderx_prefetch_tune): Likewise.
7719 (thunderx2t99_prefetch_tune): Likewise.
7720 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7721 (aarch64_override_options_internal): Update to set
7722 PARAM_PREFETCH_MINIMUM_STRIDE.
7723 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7724 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7725 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7726 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7727 stride is constant and is below the minimum stride threshold.
7728
7729 2018-05-07 Luis Machado <luis.machado@linaro.org>
7730
7731 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
7732 to 512.
7733
7734 2018-05-07 Luis Machado <luis.machado@linaro.org>
7735
7736 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7737 <prefetch_dynamic_strides>: New const bool field.
7738 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7739 prefetch_dynamic_strides.
7740 (exynosm1_prefetch_tune): Likewise.
7741 (thunderxt88_prefetch_tune): Likewise.
7742 (thunderx_prefetch_tune): Likewise.
7743 (thunderx2t99_prefetch_tune): Likewise.
7744 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7745 to false.
7746 (aarch64_override_options_internal): Update to set
7747 PARAM_PREFETCH_DYNAMIC_STRIDES.
7748 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7749 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7750 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7751 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7752 prefetch-dynamic-strides setting.
7753
7754 2018-05-07 Luis Machado <luis.machado@linaro.org>
7755
7756 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7757 <minimum_stride>: New const int field.
7758 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7759 minimum_stride field.
7760 (exynosm1_prefetch_tune): Likewise.
7761 (thunderxt88_prefetch_tune): Likewise.
7762 (thunderx_prefetch_tune): Likewise.
7763 (thunderx2t99_prefetch_tune): Likewise.
7764 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7765 (aarch64_override_options_internal): Update to set
7766 PARAM_PREFETCH_MINIMUM_STRIDE.
7767 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7768 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7769 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7770 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7771 stride is constant and is below the minimum stride threshold.
7772
7773 2018-05-06 Jakub Jelinek <jakub@redhat.com>
7774
7775 PR c++/85659
7776 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
7777 the type is addressable. Don't force op into register if it has
7778 BLKmode.
7779
7780 2018-05-05 Roland McGrath <mcgrathr@google.com>
7781
7782 PR other/77609
7783 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
7784 any section for which we don't know a specific type it should have,
7785 regardless of name. Previously this was done only for the exact
7786 names ".init_array", ".fini_array", and ".preinit_array".
7787 (default_elf_asm_named_section): Add comment about
7788 relationship with default_section_type_flags and SECTION_NOTYPE.
7789 (get_section): Don't consider it a type conflict if one side has
7790 SECTION_NOTYPE and the other doesn't, as long as neither has the
7791 SECTION_BSS et al used in the default_section_type_flags logic.
7792
7793 2018-05-05 Tom de Vries <tom@codesourcery.com>
7794
7795 PR target/85653
7796 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
7797 (workaround_barsyncs): New function.
7798 (nvptx_reorg): Use workaround_barsyncs.
7799 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7800 (define_expand "nvptx_membar_cta"): New define_expand.
7801 (define_insn "*nvptx_membar_cta"): New insn.
7802
7803 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
7804
7805 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
7806 To improve optimization opportunities.
7807 * builtin-types.def: The new needed builtin types for the above.
7808
7809 2018-05-04 Richard Biener <rguenther@suse.de>
7810
7811 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
7812 * gimple-ssa-store-merging.c
7813 (imm_store_chain_info::output_merged_store): Remove redundant create,
7814 release split_store vector contents on failure.
7815 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
7816 scalar stmt vector on cache hit.
7817
7818 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
7819
7820 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
7821 Xilinx FP support.
7822 * config.gcc (powerpc-xilinx-eabi*): Remove.
7823 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
7824 support.
7825 (fusion_addis_mem_combo_load): Ditto.
7826 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
7827 FP support.
7828 (rs6000_cpu_cpp_builtins): Ditto.
7829 * config/rs6000/rs6000-linux.c
7830 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
7831 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
7832 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
7833 support.
7834 (rs6000_setup_reg_addr_masks): Ditto.
7835 (rs6000_init_hard_regno_mode_ok): Ditto.
7836 (rs6000_option_override_internal): Ditto.
7837 (legitimate_lo_sum_address_p): Ditto.
7838 (rs6000_legitimize_address): Ditto.
7839 (rs6000_legitimize_reload_address): Ditto.
7840 (rs6000_legitimate_address_p): Ditto.
7841 (abi_v4_pass_in_fpr): Ditto.
7842 (setup_incoming_varargs): Ditto.
7843 (rs6000_gimplify_va_arg): Ditto.
7844 (rs6000_split_multireg_move): Ditto.
7845 (rs6000_savres_strategy): Ditto.
7846 (rs6000_emit_prologue_components): Ditto.
7847 (rs6000_emit_epilogue_components): Ditto.
7848 (rs6000_emit_prologue): Ditto.
7849 (rs6000_emit_epilogue): Ditto.
7850 (rs6000_elf_file_end): Ditto.
7851 (rs6000_function_value): Ditto.
7852 (rs6000_libcall_value): Ditto.
7853 * config/rs6000/rs6000.h: Ditto.
7854 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
7855 (TARGET_MINMAX): ... this. New.
7856 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
7857 * config/rs6000/rs6000.md: Remove Xilinx FP support.
7858 (*movsi_internal1_single): Delete.
7859 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
7860 mfpu=, mxilinx-fpu): Delete.
7861 * config/rs6000/singlefp.h: Delete.
7862 * config/rs6000/sysv4.h: Remove Xilinx FP support.
7863 * config/rs6000/t-rs6000: Ditto.
7864 * config/rs6000/t-xilinx: Delete.
7865 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
7866 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
7867 (VStype_simple): Delete.
7868 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
7869 * config/rs6000/xfpu.h: Delete.
7870 * config/rs6000/xfpu.md: Delete.
7871 * config/rs6000/xilinx.h: Delete.
7872 * config/rs6000/xilinx.opt: Delete.
7873 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
7874 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
7875
7876 2018-05-04 Tom de Vries <tom@codesourcery.com>
7877
7878 PR libgomp/85639
7879 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
7880 if ignore == 0.
7881
7882 2018-05-04 Richard Biener <rguenther@suse.de>
7883
7884 PR middle-end/85627
7885 * tree-complex.c (update_complex_assignment): We are always in SSA form.
7886 (expand_complex_div_wide): Likewise.
7887 (expand_complex_operations_1): Likewise.
7888 (expand_complex_libcall): Preserve EH info of the original stmt.
7889 (tree_lower_complex): Handle removed blocks.
7890 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
7891 on complex multiplication and division libcall builtins.
7892
7893 2018-05-04 Richard Biener <rguenther@suse.de>
7894
7895 PR middle-end/85574
7896 * fold-const.c (negate_expr_p): Restrict negation of operand
7897 zero of a division to when we know that can happen without
7898 overflow.
7899 (fold_negate_expr_1): Likewise.
7900
7901 2018-05-04 Jakub Jelinek <jakub@redhat.com>
7902
7903 PR libstdc++/85466
7904 * real.h (real_nextafter): Declare.
7905 * real.c (real_nextafter): New function.
7906 * fold-const-call.c (fold_const_nextafter): New function.
7907 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
7908 CASE_CFN_NEXTTOWARD.
7909 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
7910 even when arg1_mode is different from arg0_mode.
7911
7912 2018-05-03 Nathan Sidwell <nathan@acm.org>
7913
7914 * doc/extend.texi (Deprecated Features): Remove
7915 -ffriend-injection.
7916 (Backwards Compatibility): Likewise.
7917 * doc/invoke.texi (C++ Language Options): Likewise.
7918 (C++ Dialect Options): Likewise.
7919
7920 2018-05-03 Jakub Jelinek <jakub@redhat.com>
7921
7922 PR target/85530
7923 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
7924 _mm512_mask_mullox_epi64): New intrinsics.
7925
7926 2018-05-03 Tom de Vries <tom@codesourcery.com>
7927
7928 PR testsuite/85106
7929 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7930 dump files): Add offload-tree.
7931
7932 2018-05-03 Richard Biener <rguenther@suse.de>
7933
7934 PR tree-optimization/85615
7935 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
7936 to loops not nested in BBs loop father to avoid creating multi-entry
7937 loops.
7938
7939 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7940
7941 PR tree-optimization/70291
7942 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
7943 arguments. Change return type to tree. Emit libcall as a new
7944 statement rather than replacing existing one when inplace_p is true.
7945 (expand_complex_multiplication_components): New function.
7946 (expand_complex_multiplication): Expand floating-point complex
7947 multiplication using the above.
7948 (expand_complex_division): Rename inner_type parameter to type.
7949 Update expand_complex_libcall call-site.
7950 (expand_complex_operations_1): Update expand_complex_multiplication
7951 and expand_complex_division call-sites.
7952
7953 2018-05-02 Jakub Jelinek <jakub@redhat.com>
7954
7955 PR target/85582
7956 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7957 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7958 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
7959 the highest significant bit of the shift count mask is clear. In
7960 check whether and[sq]i3 is needed verify that all significant bits
7961 of the shift count other than the highest are set.
7962
7963 2018-05-02 Tom de Vries <tom@codesourcery.com>
7964
7965 PR libgomp/82428
7966 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
7967 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
7968 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
7969 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
7970 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
7971 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
7972 __builtin_goacc_parlevel_size.
7973
7974 2018-05-02 Richard Biener <rguenther@suse.de>
7975
7976 PR tree-optimization/85597
7977 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
7978 do not use split vect_get_vec_defs call but call vect_get_slp_defs
7979 directly.
7980
7981 2018-05-02 Tom de Vries <tom@codesourcery.com>
7982
7983 PR testsuite/85106
7984 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7985 dump files): Add ltrans-tree.
7986
7987 2018-05-02 Tom de Vries <tom@codesourcery.com>
7988
7989 PR testsuite/85106
7990 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7991 dump files): Add wpa-ipa.
7992
7993 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
7994
7995 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
7996 powerpc*-*-linux*paired* target.
7997 * config/rs6000/750cl.h: Delete.
7998 * config/rs6000/paired.h: Delete.
7999 * config/rs6000/paired.md: Delete.
8000 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
8001 float support.
8002 * config/rs6000/rs6000-builtin.def: Remove paired float support.
8003 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
8004 comment. Remove paired float support.
8005 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
8006 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8007 VECTOR_PAIRED.
8008 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
8009 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
8010 declarations.
8011 * config/rs6000/rs6000.c: Remove paired float support.
8012 (paired_expand_vector_init, paired_expand_vector_move,
8013 paired_emit_vector_compare, paired_emit_vector_cond_expr,
8014 (paired_expand_lv_builtin, paired_expand_stv_builtin,
8015 paired_expand_builtin, paired_expand_predicate_builtin,
8016 paired_init_builtins): Delete.
8017 * config/rs6000/rs6000.h: Remove paired float support.
8018 * config/rs6000/rs6000.md: Remove paired float support.
8019 (move_from_CR_ov_bit): Delete.
8020 * config/rs6000/rs6000.opt (mpaired): Delete.
8021 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
8022 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
8023
8024 2018-05-02 Richard Biener <rguenther@suse.de>
8025
8026 PR middle-end/85567
8027 * gimplify.c (gimplify_save_expr): When in SSA form allow
8028 SAVE_EXPRs to compute to SSA vars.
8029
8030 2018-05-02 Jakub Jelinek <jakub@redhat.com>
8031
8032 PR target/85582
8033 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8034 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8035 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
8036 clobber operands[2], instead use a new pseudo. Formatting fixes.
8037
8038 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
8039
8040 PR tree-optimization/85586
8041 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
8042 exit early for statements in the same group if the accesses are
8043 not strided.
8044
8045 2018-05-02 Tom de Vries <tom@codesourcery.com>
8046
8047 PR lto/85451
8048 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
8049 error message.
8050
8051 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
8052
8053 PR tree-optimization/85143
8054 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
8055
8056 2018-05-01 Tom de Vries <tom@codesourcery.com>
8057
8058 PR lto/85451
8059 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
8060 not found" error message.
8061
8062 2018-05-01 Tom de Vries <tom@codesourcery.com>
8063
8064 PR other/83786
8065 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
8066 * vec.c (test_ordered_remove_if): New function.
8067 (vec_c_tests): Call test_ordered_remove_if.
8068 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
8069 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
8070 * tree-vect-patterns.c (vect_pattern_recog_1): Use
8071 VEC_ORDERED_REMOVE_IF.
8072
8073 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8074
8075 PR tree-optimization/82665
8076 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
8077 pointer subtraction where arguments come from a memchr call.
8078
8079 2018-05-01 Jakub Jelinek <jakub@redhat.com>
8080
8081 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
8082 --push-state --as-needed and --pop-state instead of --as-needed and
8083 --no-as-needed if ld supports it.
8084 * configure: Regenerated.
8085
8086 PR web/85578
8087 * doc/install.texi2html: Replace _002d with - and _002a with * in
8088 generated html files using sed.
8089
8090 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8091
8092 PR c++/85523
8093 * gcc-rich-location.c (blank_line_before_p): New function.
8094 (use_new_line): New function.
8095 (gcc_rich_location::add_fixit_insert_formatted): New function.
8096 * gcc-rich-location.h
8097 (gcc_rich_location::add_fixit_insert_formatted): New function.
8098
8099 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8100
8101 * selftest.c (assert_streq): Rename "expected" and "actual" to
8102 "val1" and "val2". Extend NULL-handling to cover both inputs
8103 symmetrically, while still requiring both to be non-NULL for a pass.
8104 * selftest.h (assert_streq): Rename "expected" and "actual" to
8105 "val1" and "val2".
8106 (ASSERT_EQ): Likewise.
8107 (ASSERT_EQ_AT): Likewise.
8108 (ASSERT_KNOWN_EQ): Likewise.
8109 (ASSERT_KNOWN_EQ_AT): Likewise.
8110 (ASSERT_NE): Likewise.
8111 (ASSERT_MAYBE_NE): Likewise.
8112 (ASSERT_MAYBE_NE_AT): Likewise.
8113 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
8114 the assertion to pass.
8115 (ASSERT_STREQ_AT): Likewise.
8116
8117 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8118
8119 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
8120 interaction with -pie.
8121
8122 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8123
8124 * selftest.h: Fix alphabetization of per-source-file selftest
8125 declarations.
8126
8127 2018-04-30 Jason Merrill <jason@redhat.com>
8128
8129 PR c++/61982 - dead stores to destroyed objects.
8130 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
8131 of clobber.
8132
8133 2018-04-30 Jason Merrill <jason@redhat.com>
8134
8135 * tree.c (build_clobber): New.
8136 * tree.h: Declare it.
8137 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
8138
8139 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8140
8141 * diagnostic-show-locus.c (layout::layout): Update for
8142 location_get_source_line returning a char_span.
8143 (struct char_span): Move to input.h.
8144 (struct correction): Update for fields in char_span becoming
8145 private.
8146 (struct source_line): Update for location_get_source_line
8147 returning a char_span.
8148 (layout::print_line): Likewise.
8149 * edit-context.c (edited_file::print_content): Likewise.
8150 (edited_file::print_diff_hunk): Likewise.
8151 (edited_file::print_run_of_changed_lines): Likewise.
8152 (edited_file::get_num_lines): Likewise.
8153 (edited_line::edited_line): Likewise.
8154 * final.c (asm_show_source): Likewise.
8155 * input.c (location_get_source_line): Convert return type
8156 from const char * to char_span, losing the final "line_len"
8157 param.
8158 (dump_location_info): Update for the above.
8159 (get_substring_ranges_for_loc): Likewise. Use a char_span
8160 when handling the literal within the line.
8161 (test_reading_source_line): Update for location_get_source_line
8162 returning a char_span.
8163 * input.h (class char_span): Move here from
8164 diagnostic-show-locus.c, converting from a struct to a class.
8165 Make data members private.
8166 (char_span::operator bool): New.
8167 (char_span::length): New.
8168 (char_span::get_buffer): New.
8169 (char_span::operator[]): New.
8170 (char_span::subspan): Make const.
8171 (char_span::xstrdup): New.
8172 (location_get_source_line): Convert return type from const char *
8173 to char_span, losing the final "line_size" param.
8174
8175 2018-04-30 Jan Hubicka <jh@suse.cz>
8176
8177 * lto-wrapper.c (ltrans_priorities): New static var.
8178 (cmp_priority): New.
8179 (run_gcc): Read priorities and if doing parallel build order
8180 the Makefile by them.
8181
8182 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8183
8184 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
8185
8186 2018-04-30 Richard Biener <rguenther@suse.de>
8187
8188 * tree-cfg.c (verify_address): Remove base argument, add
8189 flag whether to check TREE_ADDRESSABLE and do that.
8190 (verify_expr): Remove.
8191 (verify_types_in_gimple_reference): Add pieces from verify_expr.
8192 (verify_gimple_assign_single): Likewise.
8193 (verify_gimple_switch): Likewise.
8194 (verify_expr_location_1): Dereference tp once. Add (disabled)
8195 piece from verify_expr.
8196 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
8197
8198 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8199
8200 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
8201
8202 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8203
8204 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
8205 (small_data_pattern): Likewise.
8206 (arc_rewrite_small_data): Likewise.
8207 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
8208 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
8209 (get_symbol_alignment): New function.
8210 (legitimate_small_data_address_p): Likewise.
8211 (legitimate_scaled_address): Update, call
8212 legitimate_small_data_address_p.
8213 (output_sdata): New static variable.
8214 (arc_print_operand): Update how we handle small data operands.
8215 (arc_print_operand_address): Likewise.
8216 (arc_legitimate_address_p): Update, use
8217 legitimate_small_data_address_p.
8218 (arc_rewrite_small_data_p): Remove.
8219 (arc_rewrite_small_data_1): Likewise.
8220 (arc_rewrite_small_data): Likewise.
8221 (small_data_pattern): Likewise.
8222 (compact_sda_memory_operand): Update to use
8223 legitimate_small_data_address_p and get_symbol_alignment.
8224 (prepare_move_operands): Don't rewite sdata pattern.
8225 (prepare_extend_operands): Remove.
8226 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
8227 pattern.
8228 (zero_extendqisi2): Likewise.
8229 (zero_extendhisi2): Likewise.
8230 (extendqihi2): Likewise.
8231 (extendqisi2): Likewise.
8232 (extendhisi2): Likewise.
8233 (addsi3): Likewise.
8234 (subsi3): Likewise.
8235 (andsi3): Likewise.
8236 * config/arc/constraints.md (Usd): Change it to memory constraint.
8237
8238 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8239
8240 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
8241 as source of std instructions.
8242 * config/arc/arc.md (movsi_insn): Update pattern predicate to
8243 allow 6-bit constants as source for store instructions.
8244 (movdi_insn): Update instruction pattern to allow 6-bit constants
8245 as source for store instructions.
8246
8247 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8248
8249 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
8250
8251 2018-04-30 Nathan Sidwell <nathan@acm.org>
8252 Sandra Loosemore <sandra@codesourcery.com>
8253
8254 * dumpfile.c (dump_open): Allow '-' for stdout.
8255 * doc/invoke.texi (Developer Options): Document dump filename
8256 determination early. Document stdin/stdout selection.
8257
8258 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
8259
8260 Microblaze Target: PIC data text relative
8261
8262 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
8263 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
8264 Add declaration.
8265 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
8266 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
8267 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
8268 New addressing mode for data-text relative position indepenedent code.
8269 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
8270 'ADDRESS_SYMBOLIC_TXT_REL'.
8271 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
8272 (microblaze_legitimate_pic_operand): Exclude function calls from
8273 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
8274 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
8275 addresses cases.
8276 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8277 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8278 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
8279 for 'address + offset'.
8280 (microblaze_expand_prologue): Add new function prologue call for
8281 'r20' assignation.
8282 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
8283 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
8284 table in case of TARGET_PIC_DATA_TEXT_REL.
8285 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
8286 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
8287 Add new macros 'UNSPEC_TEXT',
8288 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
8289 + exclude function calls from 'UNSPEC_PLT' in case of data text
8290 relative mode.
8291 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8292 new target hook for generating address diff vector tables in case of
8293 flag_pic.
8294 * doc/tm.texi : Regenerate.
8295 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
8296 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
8297 of addr diff vector generation.
8298 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8299 target hook definition.
8300 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
8301 Add default function for generate_pic_addr_diff_vec -> flag_pic.
8302 * doc/invoke.texi (Add new pic option): Add new microblaze pic
8303 option for data text relative.
8304
8305 2018-04-30 Richard Biener <rguenther@suse.de>
8306
8307 * tree-chrec.h (evolution_function_is_constant_p): Remove
8308 redundant check.
8309 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
8310
8311 2018-04-30 Richard Biener <rguenther@suse.de>
8312
8313 PR bootstrap/85571
8314 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
8315
8316 2018-04-30 Richard Biener <rguenther@suse.de>
8317
8318 PR tree-optimization/28364
8319 PR tree-optimization/85275
8320 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
8321 copying first exit test.
8322
8323 2018-04-28 Mark Wielaard <mark@klomp.org>
8324
8325 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
8326 dwarf_version >= 5.
8327 (dwarf_AT): Handle DW_AT_addr_base.
8328 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
8329
8330 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
8331
8332 PR target/84431
8333 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
8334 (*ashl<dwi>3_doubleword_mask_1): Ditto.
8335 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
8336 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
8337
8338 2018-04-28 Richard Biener <rguenther@suse.de>
8339
8340 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
8341 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
8342 to reflect use. Only add interesting stmts.
8343
8344 2018-04-27 Martin Jambor <mjambor@suse.cz>
8345
8346 PR ipa/85549
8347 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
8348 the jump function allows for passing through aggregate values.
8349
8350 2018-04-27 David Malcolm <dmalcolm@redhat.com>
8351
8352 * input.h (in_system_header_at): Convert from macro to inline
8353 function.
8354 (from_macro_expansion_at): Likewise.
8355 (from_macro_definition_at): Likewise.
8356
8357 2018-04-27 Jeff Law <law@redhat.com>
8358
8359 * config.gcc: Mark tile* targets as deprecated/obsolete.
8360
8361 2018-04-27 Richard Biener <rguenther@suse.de>
8362
8363 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
8364 fix for ILP32.
8365
8366 2018-04-27 Richard Biener <rguenther@suse.de>
8367
8368 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
8369
8370 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
8371
8372 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
8373 with Yd constraint. Set "preferred_for_speed" attribute from
8374 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
8375 with Yd constraint.
8376 (*movdi_internal): Ditto.
8377 (movti_interunit splitters): Remove
8378 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
8379 (movdi_interunit splitters): Ditto.
8380 * config/i386/constraints.md (Ye): Remove.
8381 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
8382
8383 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8384
8385 PR target/85512
8386 * config/aarch64/constraints.md (Usg): Limit to 31.
8387 (Usj): Limit to 63.
8388
8389 2018-04-27 Jakub Jelinek <jakub@redhat.com>
8390
8391 PR tree-optimization/85529
8392 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
8393 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
8394 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
8395 zero extension or masking of the MSB bit.
8396 (optimize_range_tests): Add FIRST_BB argument, pass it through
8397 to optimize_range_tests_var_bound.
8398 (maybe_optimize_range_tests, reassociate_bb): Adjust
8399 optimize_range_tests callers.
8400
8401 2018-04-26 Richard Biener <rguenther@suse.de>
8402 Jakub Jelinek <jakub@redhat.com>
8403
8404 * cgraph.h (symbol_table): Just declare debug method here.
8405 * symtab.c (symbol_table::debug): Define.
8406
8407 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
8408
8409 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
8410
8411 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
8412
8413 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
8414 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
8415 (*movdi_internal): Substitute Yi and Yj constraint with x
8416 and Ym and Yn constraint with y constraint. Update "isa"
8417 attribute and set "preferred_for_speed" attribute from
8418 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
8419 (*movsi_internal): Ditto.
8420 (*movdf_internal): Ditto.
8421 (*movsf_internal): Ditto.
8422 (*zero_extendsidi2): Ditto.
8423 * config/i386/sse.md (vec_set<mode>_0): Ditto.
8424 (sse2_loadld): Ditto.
8425 (*vec_extract<ssevecmodelower>_0): Ditto.
8426 (*vec_extractv4si_0_zext_sse4): Ditto.
8427 (vec_concatv2di): Ditto.
8428 (*vec_dup<mode>): Ditto.
8429 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
8430 * config/i386/constraints.md (Yi): Remove.
8431 (Yj): Remove.
8432 (Ym): Remove.
8433 (Yn): Remove.
8434
8435 2018-04-26 Nathan Sidwell <nathan@acm.org>
8436
8437 * dumpfile.c (dump_open): New.
8438 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
8439 (dump_finish): Detect stdio/stderr by value not name.
8440
8441 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
8442
8443 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
8444
8445 2018-04-26 Tom de Vries <tom@codesourcery.com>
8446
8447 PR target/84952
8448 * config/nvptx/nvptx.c (verify_neutering_jumps)
8449 (verify_neutering_labels): New function
8450 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
8451
8452 2018-04-26 Tom de Vries <tom@codesourcery.com>
8453
8454 PR target/84025
8455 * config/nvptx/nvptx.c (needs_neutering_p): New function.
8456 (nvptx_single): Use needs_neutering_p to skip over insns that do not
8457 need neutering.
8458
8459 2018-04-26 Richard Biener <rguenther@suse.de>
8460 Tom de Vries <tom@codesourcery.com>
8461
8462 PR lto/85422
8463 * lto-streamer-out.c (output_function): Fixup loops if required to match
8464 discovery done in the reader.
8465
8466 2018-04-26 Richard Biener <rguenther@suse.de>
8467
8468 PR tree-optimization/85116
8469 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
8470 have a loop exit from the single latch predecessor. Remove
8471 case of header with just condition.
8472 (ch_base::copy_headers): Exclude infinite loops from any
8473 processing.
8474 (pass_ch::execute): Record exits.
8475
8476 2018-04-26 Richard Biener <rguenther@suse.de>
8477
8478 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
8479 prologue cost vector and pass it to vect_get_load_cost.
8480 (vect_get_peeling_costs_all_drs): Likewise.
8481 (vect_peeling_hash_get_lowest_cost): Likewise.
8482 (vect_enhance_data_refs_alignment): Likewise.
8483
8484 2018-04-26 Richard Biener <rguenther@suse.de>
8485
8486 PR middle-end/85450
8487 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
8488 checking of integer<->pointer conversions.
8489 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
8490 sign-/zero-extending pointer types.
8491 (expand_omp_for_static_chunk): Likewise.
8492
8493 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
8494 Jean Lee <xiaoyur347@gmail.com>
8495
8496 * config/mips/mips.c (mips_asan_shadow_offset): New function.
8497 (TARGET_ASAN_SHADOW_OFFSET): Define.
8498 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
8499 true for -fsanitize=address.
8500
8501 2018-04-25 Mark Wielaard <mark@klomp.org>
8502
8503 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
8504 shorter ones.
8505
8506 2018-04-25 Jakub Jelinek <jakub@redhat.com>
8507
8508 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
8509 than "alu", remove explicit "memory" and "imm_disp" attributes.
8510 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
8511
8512 PR middle-end/85414
8513 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
8514 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
8515 gen_lowpart_no_emit.
8516
8517 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
8518
8519 PR target/85473
8520 * config/i386/i386.c (ix86_expand_builtin): Change memory
8521 operand to XI, extend p0 to Pmode.
8522 * config/i386/i386.md: Change unspec volatile and operand
8523 1 mode to XI, change operand 0 mode to P.
8524
8525 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8526
8527 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
8528 GET_MODE_MASK before any checking.
8529 (nds32_can_use_bset_p): Likewise.
8530 (nds32_can_use_btgl_p): Likewise.
8531
8532 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8533
8534 * config/nds32/nds32-doubleword.md: New define_split pattern for
8535 illegal register number.
8536
8537 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8538
8539 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
8540
8541 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
8542
8543 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
8544
8545 2018-04-25 Richard Biener <rguenther@suse.de>
8546
8547 * lto-streamer.h (LTO_major_version): Bump to 8.
8548
8549 2018-04-25 Jakub Jelinek <jakub@redhat.com>
8550
8551 * BASE-VER: Set to 9.0.0.
8552
8553 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
8554
8555 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
8556 in __abskf2 and __powikf2.
8557
8558 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8559
8560 PR target/85512
8561 * config/aarch64/constraints.md (Usg, Usj): New constraints.
8562 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
8563 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
8564 Use the above on operand 2. Reindent.
8565 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
8566
8567 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
8568
8569 PR target/85485
8570 * common/config/i386/i386-common.c (ix86_handle_option): Don't
8571 handle OPT_mcet.
8572 * config/i386/i386.opt (mcet): Removed.
8573 * doc/install.texi: Remove -mcet documentation.
8574 * doc/invoke.texi: Likewise.
8575
8576 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
8577
8578 PR target/85485
8579 * doc/install.texi: Remove -mcet from bootstrap-cet.
8580
8581 2018-04-24 Jakub Jelinek <jakub@redhat.com>
8582
8583 PR target/85511
8584 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
8585 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
8586 if TARGET_64BIT.
8587
8588 PR target/85503
8589 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
8590 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
8591 containing a CONST_VECTOR.
8592
8593 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
8594
8595 * doc/install.texi: Update newlib dependency for nvptx.
8596
8597 2018-04-24 Jakub Jelinek <jakub@redhat.com>
8598
8599 PR target/85508
8600 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
8601 instead of INTVAL when shifting x left.
8602
8603 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
8604
8605 PR tree-optimization/85478
8606 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
8607 vect_grouped_store_supported for single element vectors.
8608
8609 2018-04-24 Richard Biener <rguenther@suse.de>
8610
8611 PR target/85491
8612 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
8613 load cost increase to the case of non-constant step.
8614
8615 2018-04-24 Jakub Jelinek <jakub@redhat.com>
8616
8617 PR target/84828
8618 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
8619 destination if any_malformed_asm.
8620
8621 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
8622
8623 PR middle-end/85496
8624 * expr.c (store_field): In the bitfield case, if the value comes from
8625 a function call and is returned in registers by means of a PARALLEL,
8626 do not change the mode of the temporary unless BLKmode and VOIDmode.
8627
8628 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
8629
8630 PR rtl-optimization/85423
8631 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
8632 dependencies to debug insns when the previous insn is non-debug.
8633
8634 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
8635
8636 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
8637 enums into a single definition.
8638 (fls): Fix predicates and printing.
8639 (seti): Likewise.
8640
8641 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
8642
8643 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
8644 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
8645 and short u6 immediate.
8646 (check_if_valid_sleep_operand): Remove.
8647 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
8648
8649 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8650
8651 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
8652 flag_always_save_lp condition.
8653 * config/nds32/nds32.opt (malways-save-lp): New option.
8654
8655 2018-04-22 Shiva Chen <shiva0217@gmail.com>
8656
8657 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
8658 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
8659 * config/nds32/nds32.h
8660 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
8661 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
8662
8663 2018-04-22 Shiva Chen <shiva0217@gmail.com>
8664
8665 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
8666 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
8667
8668 2018-04-22 Shiva Chen <shiva0217@gmail.com>
8669 Chung-Ju Wu <jasonwucj@gmail.com>
8670
8671 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
8672 Declare.
8673 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
8674 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
8675
8676 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8677
8678 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
8679
8680 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8681
8682 * config/nds32/nds32-protos.h (nds32_data_alignment,
8683 nds32_local_alignment): Declare.
8684 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
8685 nds32_local_alignment): New functions.
8686 (TARGET_CONSTANT_ALIGNMENT): Define.
8687 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
8688
8689 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8690
8691 * config/nds32/nds32.c
8692 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
8693 (TARGET_MODES_TIEABLE_P): Likewise.
8694
8695 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8696
8697 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
8698 level Ofast and Og.
8699
8700 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
8701 Chung-Ju Wu <jasonwucj@gmail.com>
8702
8703 * config/nds32/constants.md (unspec_volatile_element): Add enum values
8704 for unaligned access.
8705 * config/nds32/nds32-intrinsic.c: Implementation of expanding
8706 unaligned access.
8707 * config/nds32/nds32-intrinsic.md: Likewise.
8708 * config/nds32/nds32_intrinsic.h: Likewise.
8709 * config/nds32/nds32.h (nds32_builtins): Likewise.
8710 * config/nds32/nds32.opt (munaligned-access): New option.
8711 * config/nds32/nds32.c (nds32_asm_file_start): Display
8712 flag_unaligned_access status.
8713
8714 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
8715
8716 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
8717 -mno-relax is present.
8718 * config/riscv/linux.h (LINK_SPEC): Ditto.
8719
8720 2018-04-20 Martin Sebor <msebor@redhat.com>
8721
8722 PR c/85365
8723 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
8724 for null pointers.
8725 (gimple_fold_builtin_stxcpy_chk): Same.
8726 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
8727
8728 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
8729
8730 PR target/85456
8731 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
8732 __powikf2 when long double is IEEE 128-bit.
8733
8734 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
8735
8736 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
8737 step to make sure stack always aligned.
8738
8739 2018-04-20 Carl Love <cel@us.ibm.com>
8740
8741 PR target/83402
8742 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
8743 size check for arg0.
8744
8745 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
8746 Tom de Vries <tom@codesourcery.com>
8747
8748 PR target/85445
8749 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
8750 Emit insns for calls too.
8751 (nvptx_find_par): Always look for worker-level predecessor insn.
8752 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
8753 calls.
8754 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
8755 (nvptx_process_pars): Propagate frames for calls.
8756
8757 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
8758
8759 PR target/85469
8760 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
8761 Removed.
8762 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
8763 (ix86_handle_option): Don't handle OPT_mibt.
8764 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
8765 __SHSTK__.
8766 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
8767 has_ibt and ibt.
8768 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
8769 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
8770 (ix86_target_macros): Define __CET__ with flag_cf_protection
8771 for -fcf-protection.
8772 * config/i386/i386.c (isa2_opts): Remove -mibt.
8773 * config/i386/i386.h (TARGET_IBT): Removed.
8774 (TARGET_IBT_P): Likewise.
8775 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
8776 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
8777 * config/i386/i386.opt (mcet): Update help message.
8778 (mshstk): Likewise.
8779 (mibt): Removed.
8780 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
8781 -mcet as an alias for -mshstk.
8782
8783 2018-04-20 Richard Biener <rguenther@suse.de>
8784
8785 PR middle-end/85475
8786 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
8787 complexity by forcing a single use of the multiply operand.
8788
8789 2018-04-20 Martin Jambor <mjambor@suse.cz>
8790
8791 ipa/85449
8792 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
8793 recursion dependency to only apply to non-clones.
8794
8795 2018-04-20 Martin Jambor <mjambor@suse.cz>
8796
8797 ipa/85447
8798 * ipa-cp.c (create_specialized_node): Check that clones of
8799 self-recursive edges exist during IPA-CP.
8800
8801 2018-04-19 Toon Moene <toon@moene.org>
8802
8803 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
8804 by -O3.
8805
8806 2018-04-19 Jakub Jelinek <jakub@redhat.com>
8807
8808 PR tree-optimization/85467
8809 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
8810 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
8811 VECTOR_CST element to type.
8812
8813 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
8814
8815 PR target/85397
8816 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
8817 * config/i386/i386.md (builtin_setjmp_setup): Removed.
8818 (builtin_longjmp): Likewise.
8819 (save_stack_nonlocal): New pattern.
8820 (restore_stack_nonlocal): Likewise.
8821
8822 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
8823
8824 PR target/85404
8825 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8826 Replace ASM_OUTPUT_LABEL with fprintf.
8827
8828 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
8829
8830 PR target/85417
8831 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8832 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
8833 * config/i386/i386-c.c (ix86_target_macros_internal): Also
8834 define __IBT__ and __SHSTK__ for -fcf-protection.
8835 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
8836 TARGET_IBT.
8837 (ix86_trampoline_init): Likewise.
8838 (x86_output_mi_thunk): Likewise.
8839 (ix86_notrack_prefixed_insn_p): Likewise.
8840 (ix86_option_override_internal): Don't disallow -fcf-protection.
8841 * config/i386/i386.md (rdssp<mode>): Also enable for
8842 -fcf-protection.
8843 (incssp<mode>): Likewise.
8844 (nop_endbr): Likewise.
8845 * config/i386/i386.opt (mcet): Change help message to built-in
8846 functions only.
8847 (mibt): Likewise.
8848 (mshstk): Likewise.
8849 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
8850 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
8851 enable CET built-in functions.
8852
8853 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
8854
8855 * common/config/i386/i386-common.c
8856 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
8857 OPTION_MASK_ISA_MOVDIRI_UNSET,
8858 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
8859 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
8860 * config.gcc (movdirintrin.h): New header.
8861 * config/i386/cpuid.h (bit_MOVDIRI,
8862 bit_MOVDIR64B): New bits.
8863 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
8864 and -mmvodir64b.
8865 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
8866 (VOID, PVOID, PCVOID)): New function types.
8867 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
8868 __builtin_ia32_directstoreu_u64,
8869 __builtin_ia32_movdir64b): New builtins.
8870 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
8871 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
8872 and -mmovdiri.
8873 (ix86_valid_target_attribute_inner_p): Ditto.
8874 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
8875 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
8876 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
8877 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
8878 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
8879 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
8880 (movdiri<mode>, movdir64b_<mode>): New.
8881 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
8882 * config/i386/immintrin.h: Include movdirintrin.h.
8883 * config/i386/movdirintrin.h: New file.
8884 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
8885
8886 2018-04-19 Richard Biener <rguenther@suse.de>
8887
8888 PR middle-end/85455
8889 * cfg.c (clear_bb_flags): When loop state says we have
8890 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
8891
8892 2018-04-19 Richard Biener <rguenther@suse.de>
8893
8894 PR tree-optimization/84737
8895 * tree-vect-data-refs.c (vect_copy_ref_info): New function
8896 copying restrict info.
8897 (vect_setup_realignment): Use it.
8898 * tree-vectorizer.h (vect_copy_ref_info): Declare.
8899 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
8900 the first DR to all generated stores.
8901 (vectorizable_load): Likewise for loads.
8902
8903 2018-04-19 Jakub Jelinek <jakub@redhat.com>
8904
8905 PR tree-optimization/85446
8906 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
8907 the integral and pointer types to have the same precision.
8908
8909 * doc/install.texi: Document --disable-cet being the default and
8910 --enable-cet=auto.
8911
8912 2018-04-18 Martin Liska <mliska@suse.cz>
8913
8914 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
8915 style.
8916
8917 2018-04-18 Martin Liska <mliska@suse.cz>
8918
8919 Revert
8920 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
8921
8922 PR ipa/83983
8923 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
8924 arguments if they are comparable.
8925
8926 2018-04-18 Martin Liska <mliska@suse.cz>
8927
8928 Revert
8929 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
8930
8931 PR lto/84805
8932 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
8933 incomplete types.
8934
8935 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
8936
8937 PR target/85388
8938 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
8939 ENDBR after calling __morestack.
8940
8941 2018-04-18 David Malcolm <dmalcolm@redhat.com>
8942
8943 PR jit/85384
8944 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
8945 by using gcc_base_ver to generate a gcc_driver_version, and use
8946 it when generating GCC_DRIVER_NAME.
8947 * configure: Regenerate.
8948
8949 2018-04-18 Jakub Jelinek <jakub@redhat.com>
8950
8951 PR target/81084
8952 * config.gcc: Obsolete powerpc*-*-*spe*.
8953
8954 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8955
8956 PR debug/84637
8957 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
8958 (stabstr_D): Change type of unum from unsigned int to
8959 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
8960 type.
8961
8962 2018-04-17 Jim Wilson <jimw@sifive.com>
8963
8964 PR 84856
8965 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
8966 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
8967 Set arg_pointer_offset after using pretend_args_size.
8968
8969 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8970
8971 PR rtl-optimization/85431
8972 * dse.c (record_store): Ignore zero width stores.
8973
8974 PR sanitizer/85230
8975 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
8976 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
8977 __builtin_stack_restore rather than after it.
8978 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
8979 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
8980 argument instead of virtual_dynamic_stack_rtx.
8981
8982 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
8983
8984 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
8985 New prototype.
8986 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8987 Add note to error message to explain internal mapping of overloaded
8988 built-in function name to non-overloaded built-in function name.
8989 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
8990 function.
8991
8992 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
8993
8994 PR target/85424
8995 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
8996 where the inputs overlap with the output.
8997
8998 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8999
9000 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
9001 (=v, v) alternative and explicit "memory" attribute.
9002 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
9003 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9004 attributes.
9005 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
9006 "sselog1" type instead of "sselog".
9007 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
9008 "sselog". Remove explicit "memory" attribute.
9009 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
9010 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9011 attributes.
9012 (vec_extract_hi_v32hi): Merge all alternatives into one, use
9013 "sselog1" type instead of "sselog". Remove explicit "memory"
9014 attribute.
9015 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
9016 use "sselog1" type instead of "sselog". Remove explicit "memory"
9017 attribute.
9018 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
9019 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9020 attributes.
9021 (vec_extract_hi_v64qi): Merge all alternatives into one, use
9022 "sselog1" type instead of "sselog". Remove explicit "memory"
9023 attribute.
9024 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
9025 use "sselog1" type instead of "sselog". Remove explicit "memory"
9026 attribute.
9027
9028 PR target/85430
9029 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
9030
9031 PR middle-end/85414
9032 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
9033 on a SUBREG.
9034
9035 2018-04-17 Martin Jambor <mjambor@suse.cz>
9036
9037 PR ipa/85421
9038 * ipa-cp.c (create_specialized_node): Call
9039 expand_all_artificial_thunks if necessary.
9040
9041 2018-04-17 Martin Liska <mliska@suse.cz>
9042
9043 PR lto/85405
9044 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
9045 in message, remote space in between '_G' and '('.
9046
9047 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9048
9049 PR target/85281
9050 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
9051 avx512f_vmcmp<mode>3<round_saeonly_name>,
9052 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
9053 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
9054 avx512f_rndscale<mode><round_saeonly_name>,
9055 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
9056 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
9057 Use %<iptr>2 instead of %2 for -masm=intel.
9058 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
9059 avx512f_vcvttss2usi<round_saeonly_name>,
9060 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
9061 -masm=intel.
9062 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
9063 avx512f_vcvttsd2usi<round_saeonly_name>,
9064 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
9065 Use %q1 instead of %1 for -masm=intel.
9066 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
9067 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
9068 of %3 for -masm=intel.
9069 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
9070 -masm=intel.
9071 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
9072 -masm=intel.
9073 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
9074 -masm=intel.
9075 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
9076 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
9077 %g1.
9078 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
9079 -masm=intel.
9080 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
9081 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
9082 %g1 and one with %0 and %1.
9083 (avx512er_vmrcp28<mode><round_saeonly_name>,
9084 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
9085 %1 for -masm=intel.
9086 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
9087 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
9088 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
9089 of %0 and %{%4%} for -masm=intel.
9090 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
9091 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
9092 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
9093 order of %0 and %{%5%}%{z%} for -masm=intel.
9094
9095 2018-04-17 Jan Hubicka <jh@suse.cz>
9096
9097 PR lto/85405
9098 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
9099
9100 2018-04-17 Martin Liska <mliska@suse.cz>
9101
9102 PR ipa/85329
9103 * multiple_target.c (create_dispatcher_calls): Set apostrophes
9104 for target_clone error message. Make default implementation
9105 clone to be a local declaration.
9106 (separate_attrs): Add new argument and check for an empty
9107 string.
9108 (expand_target_clones): Handle it.
9109 (ipa_target_clone): Make redirection just for target_clones
9110 functions.
9111
9112 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
9113 Tom de Vries <tom@codesourcery.com>
9114
9115 PR middle-end/84955
9116 * omp-expand.c (expand_oacc_for): Add dummy false branch for
9117 tiled basic blocks without omp continue statements.
9118
9119 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
9120
9121 PR target/83660
9122 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
9123 vec_extract expression as having side effects to make sure it gets
9124 a cleanup point.
9125
9126 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
9127
9128 PR target/85403
9129 * config/i386/i386.c (get_builtin_code_for_version): Check
9130 error_mark_node.
9131
9132 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
9133
9134 PR target/84331
9135 * gcc/config.gcc: Support "skylake".
9136 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
9137 PROCESSOR_SKYLAKE.
9138 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
9139 (processor_target_table): Add "skylake".
9140 (ix86_option_override_internal): Add "skylake".
9141 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
9142 PROCESSOR_CANNONLAKE.
9143 (get_builtin_code_for_version): Fix priority for
9144 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
9145 PROCESSOR_SKYLAKE-AVX512.
9146 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
9147 (processor_type): Add PROCESSOR_SKYLAKE.
9148
9149 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
9150 Jason Merrill <jason@redhat.com>
9151
9152 PR c++/85112
9153 * convert.c (convert_to_integer_1): Use direct recursion for
9154 enumeral types and types with a precision less than the number
9155 of bits in their mode.
9156
9157 2018-04-16 Julia Koval <julia.koval@intel.com>
9158
9159 PR target/84413
9160 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
9161 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
9162
9163 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
9164
9165 PR target/85293
9166 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
9167 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
9168 and -mno-direct-move.
9169
9170 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
9171
9172 PR target/83402
9173 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
9174 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
9175 Ensure negative shifts result in {0}.
9176
9177 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
9178
9179 PR rtl-optimization/79916
9180 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
9181 regs (if any) to define how to gnerate SD moves when LRA is in
9182 progress.
9183
9184 2018-04-13 Jakub Jelinek <jakub@redhat.com>
9185
9186 PR rtl-optimization/85393
9187 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
9188 * except.c (expand_dw2_landing_pad_for_region): Make static.
9189 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
9190 a label and unconditional jump to old_bb, rather than
9191 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
9192 basic block.
9193
9194 PR rtl-optimization/85376
9195 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
9196 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
9197 instead of a specific value.
9198
9199 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9200 Bin Cheng <bin.cheng@arm.com>
9201
9202 PR tree-optimization/82965
9203 PR tree-optimization/83991
9204 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
9205 by_profile_only parameter.
9206 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
9207 information if the loop was predicted to iterate too many times.
9208 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
9209
9210 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9211
9212 PR lto/71991
9213 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
9214 always inline.
9215
9216 2018-04-13 Martin Liska <mliska@suse.cz>
9217 Jakub Jelinek <jakub@redhat.com>
9218
9219 PR middle-end/81657
9220 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
9221 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
9222 * builtins.c (expand_builtin_memory_copy_args): Use
9223 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
9224 handle dest_addr == pc_rtx.
9225
9226 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
9227
9228 PR target/85291
9229 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
9230 asked to not generate direct moves.
9231 (fix_trunc<mode>si2_stfiwx): Similar.
9232 (fix_trunc<mode>si2_internal): Similar.
9233
9234 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9235
9236 PR debug/83157
9237 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
9238 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
9239 lookup if dest in some wider mode is known to be const0_rtx and
9240 if so, record permanent equivalence for it to be ZERO_EXTEND of
9241 the narrower mode destination.
9242
9243 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9244
9245 * lto-streamer-out.c (output_function): Revert 259346.
9246 * omp-expand.c (expand_oacc_for): Likewise.
9247
9248 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
9249
9250 PR rtl-optimization/85354
9251 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
9252 * sel-sched.c (sel_global_init): ... here.
9253
9254 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
9255
9256 PR target/85238
9257 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
9258 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9259 mode for PE-COFF targets.
9260 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
9261 (i386_pe_asm_lto_end): Likewise.
9262 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
9263 (TARGET_ASM_LTO_END): Likewise.
9264 * config/i386/winnt.c (saved_debug_info_level): New static variable.
9265 (i386_pe_asm_lto_start): New function.
9266 (i386_pe_asm_lto_end): Likewise.
9267
9268 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9269 Richard Biener <rguenther@suse.de>
9270
9271 PR middle-end/84955
9272 * lto-streamer-out.c (output_function): Fix CFG loop state before
9273 streaming out.
9274 * omp-expand.c (expand_oacc_for): Handle calls to internal
9275 functions like regular functions.
9276
9277 2018-04-12 Richard Biener <rguenther@suse.de>
9278
9279 PR lto/85371
9280 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
9281 for the early LTO debug to properly generate references to it
9282 during DIE emission. Do not re-use that for the skeleton for
9283 split-dwarf.
9284 (dwarf2out_early_finish): Likewise.
9285
9286 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9287
9288 PR target/85328
9289 * config/i386/sse.md
9290 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
9291 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
9292 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
9293 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
9294 and output is a reg, avoid creating invalid lowpart subreg, but
9295 instead split into a 512-bit move. Don't split if not AVX512VL,
9296 input is xmm16+ reg and output is a mem.
9297 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
9298 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
9299 xmm16+ reg and output is a mem.
9300
9301 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9302
9303 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
9304 also for flag_dwarf2_cfi_asm.
9305
9306 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9307
9308 PR rtl-optimization/85342
9309 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
9310 a bool scalar var inside of the loop instead. Don't try to update
9311 recog_data.operand after failed apply_change_group.
9312
9313 2018-04-12 Tom de Vries <tom@codesourcery.com>
9314
9315 PR target/85296
9316 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
9317 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
9318 array with flexible array member as array without given dimension.
9319 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
9320 argument for undefined param to true.
9321
9322 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
9323
9324 PR target/85321
9325 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9326 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
9327 from PowerPC section.
9328 * config/rs6000/sysv4.opt (mcall-): Improve help text.
9329 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
9330 help text that is too long.
9331 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
9332 help text that is too long.
9333 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
9334 help text that is too long.
9335
9336 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
9337
9338 * config/alpha/alpha.md (stack_probe_internal): Rename
9339 from "probe_stack". Update all callers.
9340
9341 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9342
9343 PR rtl-optimization/84566
9344 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
9345 sched_macro_fuse_insns.
9346
9347 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9348
9349 PR target/84301
9350 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
9351 (compute_block_dependences): ... from here.
9352
9353 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9354
9355 PR tree-optimization/85331
9356 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
9357 from int to HOST_WIDE_INT.
9358
9359 2018-04-11 Martin Jambor <mjambor@suse.cz>
9360
9361 PR ipa/84149
9362 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
9363 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
9364 not the same as the source val.
9365 (cgraph_edge_brings_value_p): New parameter.
9366 (gather_edges_for_value): Pass destination value to
9367 cgraph_edge_brings_value_p.
9368 (perhaps_add_new_callers): Likewise.
9369 (get_info_about_necessary_edges): Likewise and exclude values brought
9370 only by self-recursive edges.
9371 (create_specialized_node): Redirect only clones of self-calling edges.
9372 (+self_recursive_pass_through_p): New function.
9373 (find_more_scalar_values_for_callers_subset): Use it.
9374 (find_aggregate_values_for_callers_subset): Likewise.
9375 (known_aggs_to_agg_replacement_list): Removed.
9376 (decide_whether_version_node): Re-calculate known constants for all
9377 remaining context clones.
9378
9379 2018-04-11 Richard Biener <rguenther@suse.de>
9380
9381 PR lto/85339
9382 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
9383 from early DWARF output.
9384 (dwarf2out_early_finish): Output line info unconditionally into
9385 early DWARF and add reference to it.
9386
9387 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9388
9389 PR target/85281
9390 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
9391 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
9392 other than V2DFmode using iptr mode attribute.
9393 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
9394
9395 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9396
9397 PR rtl-optimization/84659
9398 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
9399
9400 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9401
9402 PR debug/85302
9403 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
9404 SIZEP is NULL.
9405 (output_loc_list): Pass address of a dummy size variable even in the
9406 locview handling loop.
9407 (index_location_lists): Add comment on why skip_loc_list_entry can't
9408 call size_of_locs.
9409
9410 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
9411
9412 PR target/85261
9413 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
9414 into register.
9415
9416 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
9417
9418 PR target/85321
9419 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9420 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
9421 and -mstring-compare-inline-limit.
9422
9423 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
9424
9425 PR target/85287
9426 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
9427 for stack clash protection in a register whenever we need it to be in
9428 a register.
9429
9430 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
9431
9432 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
9433 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
9434
9435 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
9436
9437 PR target/85321
9438 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
9439 the help text.
9440 (mlong-double-): Ditto.
9441 * config/rs6000/sysv4.opt (msdata=): Ditto.
9442 (mtls-size=): Ditto.
9443
9444 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
9445
9446 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9447 erroneous entries for
9448 "vector int vec_ldl (int, long int *)", and
9449 "vector unsigned int vec_ldl (int, unsigned long int *)".
9450 Add comments and entries for
9451 "vector bool char vec_ldl (int, bool char *)",
9452 "vector bool short vec_ldl (int, bool short *)",
9453 "vector bool int vec_ldl (int, bool int *)",
9454 "vector bool long long vec_ldl (int, bool long long *)",
9455 "vector pixel vec_ldl (int, pixel *)",
9456 "vector long long vec_ldl (int, long long *)",
9457 "vector unsigned long long vec_ldl (int, unsigned long long *)".
9458 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
9459 type tree bool_long_long_type_node and correct definition of
9460 bool_V2DI_type_node to make reference to this new type tree.
9461 (rs6000_mangle_type): Replace erroneous reference to
9462 bool_long_type_node with bool_long_long_type_node.
9463 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
9464 comments to emphasize sign distinctions for char and int types and
9465 replace RS6000_BTI_bool_long constant with
9466 RS6000_BTI_bool_long_long constant. Also add comment to restrict
9467 use of RS6000_BTI_pixel.
9468 (bool_long_type_node): Remove this macro definition.
9469 (bool_long_long_type_node): New macro definition
9470
9471 2018-04-10 Jakub Jelinek <jakub@redhat.com>
9472
9473 PR rtl-optimization/85300
9474 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
9475 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
9476 simplify_unary_operation fails.
9477
9478 2018-04-10 Martin Liska <mliska@suse.cz>
9479
9480 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
9481 cgraph_edge and ipa_ref.
9482
9483 2018-04-10 Jakub Jelinek <jakub@redhat.com>
9484
9485 PR target/85177
9486 PR target/85255
9487 * config/i386/sse.md
9488 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
9489 computation of the VEC_MERGE selector from mask.
9490 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
9491 Fix decoding of the VEC_MERGE selector into mask.
9492
9493 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
9494
9495 PR tree-optimization/85286
9496 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
9497
9498 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
9499
9500 * final.c (final_1): Set insn_last_address as well as
9501 insn_current_address.
9502
9503 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9504
9505 PR target/85173
9506 * explow.c (emit_stack_probe): Call validize_mem on memory location
9507 before passing it to gen_probe_stack. Create address operand and
9508 legitimize it for the probe_stack_address case.
9509
9510 2018-04-09 Jan Hubicka <jh@suse.cz>
9511
9512 PR lto/85078
9513 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
9514 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
9515 * tree.c (free_lang_data_in_type): Fix handling of binfos;
9516 walk basetypes.
9517 (free_lang_data): Rebuild type inheritance graph.
9518
9519 2018-04-09 Martin Sebor <msebor@redhat.com>
9520
9521 * invoke.texi (-finline-small-functions): Mention other optimization
9522 options.
9523 (-findirect-inlining, -fpartial-inlining): Same.
9524 (-finline-functions-called-once): Same.
9525 (-freorder-blocks-and-partition): Same.
9526
9527 2018-04-09 Jan Hubicka <jh@suse.cz>
9528
9529 PR rtl/84058
9530 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
9531 jumps; choose last target that matches the criteria (i.e.
9532 no partition changes for non-crossing jumps).
9533 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
9534 support for redirecting crossing jumps to non-crossing.
9535
9536 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
9537
9538 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
9539 also for naked functions.
9540
9541 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
9542
9543 * config/arc/arc.md (add_shift): New pattern.
9544 (add_shift2): Likewise.
9545 (sub_shift): Likewise.
9546 (sub_shift_cmp0_noout): Likewise.
9547 (compare_si_ashiftsi): Likewise.
9548 (xbfu_cmp0_noout): New combine pattern.
9549 (xbfu_cmp0"): Likewise.
9550 (movsi_set_cc_insn): Place the predicable variant first.
9551 (commutative_binary_cmp0_noout): Remove clobber.
9552 (commutative_binary_cmp0): New pattern.
9553 (noncommutative_binary_cmp0): Likewise.
9554 (noncommutative_binary_cmp0_noout): Likewise.
9555 (noncommutative_binary_comparison_result_used): Removed.
9556 (rsub_cmp0): New pattern.
9557 (rsub_cmp0_noout): Likewise.
9558 (extzvsi): Changed, keep only meaningful variants.
9559 (SQH, SEZ): New iterators.
9560 (SQH_postfix): New mode attribute.
9561 (SEZ_prefix): New code attribute.
9562 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
9563 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
9564 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
9565 of numerical value.
9566 (noncommutative_operator): Check the availability of barrel
9567 shifter option.
9568
9569 2018-04-09 Richard Biener <rguenther@suse.de>
9570
9571 PR tree-optimization/85284
9572 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
9573 Only use the niter constraining form of simple_iv when the exit
9574 is always executed.
9575
9576 2018-04-09 Tom de Vries <tom@codesourcery.com>
9577
9578 PR target/84041
9579 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9580 (define_expand "*memory_barrier"): New define_expand.
9581 (define_insn "memory_barrier"): New insn.
9582
9583 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9584
9585 PR rtl-optimization/80463
9586 PR rtl-optimization/83972
9587 PR rtl-optimization/83480
9588
9589 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
9590 correct producer for the insn.
9591 (tidy_control_flow): Fixup seqnos in case of debug insns.
9592
9593 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9594
9595 PR rtl-optimization/83913
9596
9597 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
9598 different sched-times when merging exprs.
9599
9600 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9601
9602 PR rtl-optimization/83962
9603
9604 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
9605 tidy_fallthru_edge and tidy_control_flow.
9606
9607 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9608
9609 PR rtl-optimization/83530
9610
9611 * sel-sched.c (force_next_insn): New global variable.
9612 (remove_insn_for_debug): When force_next_insn is true, also leave only
9613 next insn in the ready list.
9614 (sel_sched_region): When the region wasn't scheduled, make another pass
9615 over it with force_next_insn set to 1.
9616
9617 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
9618
9619 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
9620 into tm_file.
9621 * config/nds32/constants.md (unspec_volatile_element): Add enum values
9622 for interrupt control.
9623 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9624 functions for interrupt control.
9625 * config/nds32/nds32-intrinsic.md: Likewise.
9626 * config/nds32/nds32_intrinsic.h: Likewise.
9627 * config/nds32/nds32.h (nds32_builtins): Likewise.
9628
9629 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
9630
9631 * config/nds32/nds32.c (nds32_init_machine_status,
9632 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
9633 strict_aligned_p field.
9634 (nds32_expand_to_rtl_hook): New function.
9635 (TARGET_EXPAND_TO_RTL_HOOK): Define.
9636 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
9637
9638 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9639 Chung-Ju Wu <jasonwucj@gmail.com>
9640
9641 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
9642 * config/nds32/nds32-n7.md: New file.
9643 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
9644 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
9645 pipeline.
9646 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
9647 * config/nds32/nds32.md (pipeline_model): Add n7.
9648 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
9649 * config/nds32/pipelines.md: Include n7 settings.
9650
9651 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9652 Chung-Ju Wu <jasonwucj@gmail.com>
9653
9654 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
9655 * config/nds32/nds32-e8.md: New file.
9656 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
9657 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
9658 pipeline.
9659 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
9660 * config/nds32/nds32.md (pipeline_model): Add e8.
9661 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
9662 * config/nds32/pipelines.md: Include e8 settings.
9663
9664 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9665 Chung-Ju Wu <jasonwucj@gmail.com>
9666
9667 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
9668 * config/nds32/nds32-n8.md: New file.
9669 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
9670 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
9671 pipeline.
9672 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
9673 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
9674 * config/nds32/nds32.md (pipeline_model): Add n8.
9675 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
9676 * config/nds32/pipelines.md: Include n8 settings.
9677
9678 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9679 Chung-Ju Wu <jasonwucj@gmail.com>
9680
9681 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
9682 * config/nds32/nds32-n9-2r1w.md: New file.
9683 * config/nds32/nds32-n9-3r2w.md: New file.
9684 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
9685 nds32_register_ports): New or modify for cpu n9.
9686 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
9687 pipeline.
9688 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
9689 * config/nds32/nds32-utils.c: New file.
9690 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
9691 TARGET_MUL_SLOW): Define.
9692 * config/nds32/nds32.md (pipeline_model): New attribute.
9693 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
9694 New options that support cpu n9.
9695 * config/nds32/pipelines.md: Include n9 settings.
9696 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
9697
9698 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
9699
9700 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
9701 information if necessary.
9702 (output_cond_branch_compare_zero): Likewise.
9703 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
9704 (nds32_target_alignment): Refine for alignment.
9705 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
9706 (FUNCTION_BOUNDARY): Modify.
9707 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
9708 align case.
9709 * config/nds32/nds32.opt (malways-align, malign-functions): New.
9710
9711 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
9712
9713 * config/nds32/constants.md (unspec_volatile_element): Add values for
9714 TLB operation and data prefetch.
9715 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9716 functions for TLB operation and data prefetch.
9717 * config/nds32/nds32-intrinsic.md: Likewise.
9718 * config/nds32/nds32_intrinsic.h: Likewise.
9719 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
9720 (nds32_print_operand): Likewise.
9721 * config/nds32/nds32.h (nds32_builtins): Likewise.
9722
9723 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
9724 Andrew Pinski <pinsika@gcc.gnu.org>
9725
9726 PR middle-end/82976
9727 * match.pd: Use constant_boolean_node of correct type instead of
9728 boolean_true_node or boolean_false_node for simplifying
9729 pointer comparisons to zero.
9730
9731 2018-04-07 Jakub Jelinek <jakub@redhat.com>
9732
9733 PR tree-optimization/80021
9734 * tree.c (verify_type_variant): Make error call in verify_variant_match
9735 translatable and remove final full stop.
9736
9737 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9738
9739 * config/nds32/constants.md (unspec_volatile_element): Add
9740 UNSPEC_VOLATILE_EH_RETURN.
9741 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
9742 nds32_output_stack_pop): Support dwarf exception handling process.
9743 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
9744 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
9745 exception handling process.
9746 (nds32_compute_stack_frame): Likewise.
9747 (nds32_return_addr_rtx): Likewise.
9748 (nds32_initial_elimination_offset): Likewise.
9749 (nds32_expand_prologue): Likewise.
9750 (nds32_expand_epilogue): Likewise.
9751 (nds32_dynamic_chain_address): New function.
9752 * config/nds32/nds32.h (machine_function): Add fields for dwarf
9753 exception handling.
9754 (DYNAMIC_CHAIN_ADDRESS): Define.
9755 (EH_RETURN_DATA_REGNO): Define.
9756 (EH_RETURN_STACKADJ_RTX): Define.
9757 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
9758 patterns for dwarf exception handling.
9759
9760 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9761
9762 * config/nds32/nds32.h: Clean up obsolete macros.
9763
9764 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9765
9766 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9767 Add enum values for particular instructions.
9768 * config/nds32/nds32-intrinsic.c: Implementation of expanding
9769 particular intrinsic functions.
9770 * config/nds32/nds32-intrinsic.md: Likewise.
9771 * config/nds32/nds32_intrinsic.h: Likewise.
9772 * config/nds32/nds32.h (nds32_builtins): Likewise.
9773 * config/nds32/nds32.md (type): Add pbsad and pbsada.
9774 (btst, ave): New patterns for particular instructions.
9775
9776 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9777
9778 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9779 Add enum values for atomic load/store and memory sync.
9780 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
9781 and memory sync.
9782 * config/nds32/nds32-intrinsic.md: Likewise.
9783 * config/nds32/nds32_intrinsic.h: Likewise.
9784 * config/nds32/nds32.h (nds32_builtins): Likewise.
9785
9786 2018-04-07 Jakub Jelinek <jakub@redhat.com>
9787
9788 PR tree-optimization/85257
9789 * fold-const.c (native_encode_vector): If not all elts could fit
9790 and off is -1, return 0 rather than offset.
9791 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
9792 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
9793 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
9794 adjust buffer in native_interpret_expr call.
9795
9796 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9797
9798 * config/nds32/constants.md (unspec_volatile_element): Add cache
9799 control enum values.
9800 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
9801 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
9802 * config/nds32/nds32.c (nds32_cctl_names): New.
9803 (nds32_print_operand): Handle cache control register names.
9804 * config/nds32/nds32.h (nds32_builtins): New enum values.
9805 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
9806 macros.
9807 * config/nds32/nds32.md (type): Add mmu.
9808 * config/nds32/pipelines.md (simple_insn): Add mmu.
9809
9810 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9811
9812 * config/nds32/nds32.md (type): Remove call.
9813 * config/nds32/pipelines.md (simple_insn): Likewise.
9814
9815 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9816
9817 * config/nds32/constants.md (unspec_volatile_element): Add
9818 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
9819 UNSPEC_VOLATILE_FMFCFG.
9820 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
9821 description for fmfcfg and fmfcsr.
9822 (bdesc_1arg): Add fmtcsr.
9823 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
9824 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
9825 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
9826 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
9827 unspec_fmfcfg): New patterns.
9828 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
9829 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
9830 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
9831 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
9832 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
9833 __nds32__fmfcfg): Define.
9834
9835 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9836
9837 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
9838 intrinsic register names.
9839 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
9840 intrinsic register enum values and macros.
9841
9842 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9843
9844 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
9845 for load/store addressing form.
9846 (nds32_print_operand_address): Likewise.
9847
9848 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
9849
9850 PR target/85196
9851 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
9852 based on LABEL_REF. Remove useless assertion.
9853 (pic_address_needs_scratch): Fix formatting.
9854 (sparc_legitimize_pic_address): Minor tweaks.
9855 (sparc_delegitimize_address): Adjust assertion accordingly.
9856 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
9857 into symbolic_operand.
9858 (movsi_high_pic_label_ref): Likewise.
9859 (movsi_lo_sum_pic_label_ref): Likewise.
9860 (movdi_pic_label_ref): Likewise.
9861 (movdi_high_pic_label_ref): Likewise.
9862 (movdi_lo_sum_pic_label_ref): Likewise.
9863
9864 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
9865
9866 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
9867 custom LIB_SPEC setup.
9868
9869 2018-04-06 Ruslan Bukin <br@bsdpad.com>
9870 Kito Cheng <kito.cheng@gmail.com>
9871
9872 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
9873 * config/riscv/freebsd.h: New.
9874
9875 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
9876
9877 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
9878 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
9879 file.
9880
9881 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
9882 Kito Cheng <kito.cheng@gmail.com>
9883
9884 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
9885 nds32_output_call, nds32_symbol_binds_local_p): New functions.
9886 * config/nds32/nds32-protos.h (nds32_output_call,
9887 nds32_output_return): Declare.
9888 * config/nds32/nds32.md: Refine all the call and return patterns.
9889
9890 2018-04-06 Jakub Jelinek <jakub@redhat.com>
9891
9892 PR debug/85252
9893 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
9894 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
9895
9896 PR rtl-optimization/84872
9897 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
9898 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
9899 EDGE_CROSSING edge.
9900
9901 2018-04-06 Tamar Christina <tamar.christina@arm.com>
9902
9903 * expr.c (copy_blkmode_to_reg): Revert 254862.
9904 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
9905
9906 2018-04-06 Richard Biener <rguenther@suse.de>
9907
9908 PR middle-end/85244
9909 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
9910 after seeing a component reference with an adjacent field. Treat
9911 refs to arrays at struct end of external decls similar to
9912 refs to unconstrained commons.
9913
9914 2018-04-06 Jakub Jelinek <jakub@redhat.com>
9915
9916 PR sanitizer/85213
9917 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
9918 look through SAVE_EXPRs with non-side-effects argument. Adjust
9919 recursive calls.
9920 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
9921 save_p here.
9922
9923 2018-04-06 Richard Biener <rguenther@suse.de>
9924
9925 PR middle-end/85180
9926 * alias.c (find_base_term): New wrapper around find_base_term
9927 unwinding CSELIB_VAL_PTR changes.
9928 (find_base_term): Do not restore CSELIB_VAL_PTR during the
9929 recursion.
9930
9931 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9932
9933 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
9934 instructions.
9935 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
9936 constant definitions.
9937 ("nop"): lr 0,0 -> nopr r0
9938 ("nop_lr0", "nop_lr1"): New insn definitions.
9939
9940 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
9941
9942 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
9943 NDS32_V3PUSH_AVAILABLE_P macro.
9944
9945 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
9946 Chung-Ju Wu <jasonwucj@gmail.com>
9947
9948 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
9949 (nds32*-*-*): Add float and fpu_config into supported_defaults.
9950 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
9951 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
9952 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
9953 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
9954 * config/nds32/constraints.md: New constraints and checking for hard
9955 float configuration.
9956 * config/nds32/iterators.md: New mode iterator and attribute for hard
9957 float configuration.
9958 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
9959 patterns.
9960 * config/nds32/nds32-fpu.md: New file.
9961 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
9962 deal with hard float code generation.
9963 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
9964 ARCH_V3S.
9965 (abi_type, float_reg_number): New enum type.
9966 * config/nds32/nds32-predicates.c: New predicates for hard float.
9967 * config/nds32/nds32-protos.h: Declare functions for hard float.
9968 * config/nds32/nds32.c: Implementation for hard float configuration.
9969 * config/nds32/nds32.h: Definitions for hard float configuration.
9970 * config/nds32/nds32.md: Include hard float machine description and
9971 modify patterns for hard float configuration.
9972 * config/nds32/nds32.opt: New options for hard float configuration.
9973 * config/nds32/predicates.md: New predicates for hard float
9974 configuration.
9975
9976 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
9977
9978 * common/config/nds32/nds32-common.c
9979 (nds32_option_optimization_table): Enable -mreleax-hint by default.
9980
9981 2018-04-05 Jakub Jelinek <jakub@redhat.com>
9982
9983 PR middle-end/85195
9984 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
9985 CONSTRUCTOR_ELT (ctor, ...)->value.
9986
9987 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
9988
9989 PR target/85193
9990 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
9991
9992 2018-04-05 Tom de Vries <tom@codesourcery.com>
9993
9994 PR target/85204
9995 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
9996 cond jump.
9997
9998 2018-04-05 Shiva Chen <shiva0217@gmail.com>
9999 Kito Cheng <kito.cheng@gmail.com>
10000
10001 * config/nds32/constraints.md (U33): Fine-tune checking condition.
10002 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
10003 * config/nds32/nds32.h (nds32_16bit_address_type): Add
10004 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
10005
10006 2018-04-05 Shiva Chen <shiva0217@gmail.com>
10007 Kito Cheng <kito.cheng@gmail.com>
10008
10009 * config/nds32/constraints.md (Ufe): New memory constraint.
10010 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
10011 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
10012 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
10013 operands.
10014 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
10015 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
10016
10017 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10018
10019 * config/nds32/nds32.md: Use optimize_size in the condition for
10020 alu-shift instructions.
10021
10022 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10023
10024 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
10025
10026 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10027
10028 * config/nds32/nds32.md (negsi2): Refine pattern.
10029
10030 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
10031 Chung-Ju Wu <jasonwucj@gmail.com>
10032
10033 * config/nds32/iterators.md (shift_rotate): New code iterator.
10034 (shift): New code attribute.
10035 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
10036 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
10037 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
10038 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
10039 bit-wise operations.
10040 (andsi3, *andsi3): Ditto.
10041 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
10042 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
10043 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
10044 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
10045 nds32_ior_operand, nds32_xor_operand): New predicates.
10046
10047 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10048
10049 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
10050 (addsi3, subsi3): ... this.
10051
10052 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10053
10054 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
10055
10056 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10057
10058 * config/nds32/nds32.md: Adjust indention.
10059
10060 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
10061
10062 * config/nds32/nds32.md (feature): New attribute.
10063
10064 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10065
10066 * config/nds32/nds32.md (subtype): New attribute.
10067
10068 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
10069
10070 PR target/85203
10071 * config/arm/arm-builtins.c (arm_expand_builtin): Change
10072 expansion to perform a bitwise AND of the argument followed by a
10073 boolean negation of the result.
10074
10075 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
10076
10077 PR rtl-optimization/84878
10078 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
10079 the basic block. Assert the use reference is not artificial and that
10080 it has an associated insn.
10081
10082 2018-04-04 Michael Matz <matz@suse.de>
10083
10084 * builtins.c (compute_objsize): Pass correct operand
10085 to array_at_struct_end_p.
10086
10087 2018-04-04 Richard Biener <rguenther@suse.de>
10088
10089 PR lto/85176
10090 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
10091 from contexts for DINFO_LEVEL_TERSE and below.
10092
10093 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10094
10095 * config/nds32/nds32-doubleword.md (move_<mode>): Require
10096 resiter_operand condition.
10097 * config/nds32/nds32.md (*move<mode>): Ditto.
10098
10099 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10100 Monk Chiang <sh.chiang04@gmail.com>
10101
10102 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
10103
10104 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10105
10106 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
10107
10108 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10109 Kito Cheng <kito.cheng@gmail.com>
10110
10111 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
10112 nds32_cond_code_str, output_cond_branch,
10113 output_cond_branch_compare_zero, nds32_expand_cbranch,
10114 nds32_expand_cstore, nds32_expand_movcc,
10115 nds32_output_cbranchsi4_equality_zero,
10116 nds32_output_cbranchsi4_equality_reg,
10117 nds32_output_cbranchsi4_equality_reg_or_const_int,
10118 nds32_output_cbranchsi4_greater_less_zero: New functions.
10119 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
10120 nds32_expand_cstore, nds32_expand_movcc,
10121 nds32_output_cbranchsi4_equality_zero,
10122 nds32_output_cbranchsi4_equality_reg,
10123 nds32_output_cbranchsi4_equality_reg_or_const_int,
10124 nds32_output_cbranchsi4_greater_less_zero): Declare.
10125 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
10126 nds32_rimm11s_operand): New predicates.
10127 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
10128 * config/nds32/nds32.md: Rewrite all the branch and conditional move
10129 patterns.
10130
10131 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10132
10133 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
10134 * config/nds32/nds32.md: Ditto.
10135 * config/nds32/pipelines.md: Ditto.
10136
10137 2018-04-04 Richard Biener <rguenther@suse.de>
10138
10139 PR tree-optimization/85168
10140 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
10141 propagating abnormals.
10142
10143 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10144
10145 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
10146
10147 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10148 Kito Cheng <kito.cheng@gmail.com>
10149
10150 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
10151 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
10152 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
10153 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
10154 * config/nds32/nds32.md (sibcall_internal): New.
10155 (sibcall_register): Remove.
10156 (sibcall_immediate): Remove.
10157 (sibcall_value_internal): New.
10158 (sibcall_value_register): Remove.
10159 (sibcall_value_immediate): Remove.
10160 * config/nds32/predicates.md (nds32_general_register_operand): New.
10161 (nds32_call_address_operand): New.
10162
10163 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10164
10165 PR rtl-optimization/85167
10166 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
10167 bb_defs if *split_p, instead preinitialize it to NULL.
10168
10169 PR tree-optimization/85156
10170 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
10171 evaluating the argument multiple times.
10172
10173 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
10174
10175 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
10176 than vector.
10177 (_mm_cvtpd_ps): Likewise.
10178 (_mm_cvttpd_epi32): Likewise.
10179 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
10180 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
10181 vector, pixel, and bool following altivec.h include.
10182
10183 2018-04-03 Martin Sebor <msebor@redhat.com>
10184
10185 * doc/extend.texi (Common Function Attributes): Clarify.
10186 (const attribute): Likewise.
10187 (pure attribute): Likewise.
10188
10189 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10190
10191 PR target/85169
10192 * config/i386/i386.c (ix86_expand_vector_set): Use
10193 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
10194
10195 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
10196
10197 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
10198 instructions when changing rounding bits to preserve precision bits
10199 in the x87 control word.
10200
10201 2018-04-03 Martin Liska <mliska@suse.cz>
10202
10203 PR tree-optimization/82491
10204 * rtl.h (strip_offset_and_add): Replace += suboffset with
10205 poly_uint64 () + suboffset.
10206
10207 2018-03-29 Martin Liska <mliska@suse.cz>
10208 Martin Jambor <mjambor@suse.cz>
10209
10210 PR ipa/84947
10211 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
10212 param_type is not an integral or pointer type.
10213
10214 2018-04-03 Richard Biener <rguenther@suse.de>
10215
10216 * sese.h (recompute_all_dominators): Remove.
10217
10218 2018-04-02 Martin Sebor <msebor@redhat.com>
10219
10220 * doc/invoke.texi (-Wrestrict): Fix typos.
10221
10222 2018-04-02 Jim Wilson <jimw@sifive.com>
10223
10224 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
10225 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
10226 (<optab>di3, <optab>si3_extend): Likewise.
10227 (<optab>si3_mask, <optab>si3_mask_1): New.
10228 (<optab>di3_mask, <optab>di3_mask_1): New.
10229 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
10230 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
10231 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
10232
10233 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
10234
10235 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
10236 example.
10237
10238 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
10239
10240 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
10241 (nds32_canonicalize_comparison): New function.
10242
10243 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10244 Kito Cheng <kito.cheng@gmail.com>
10245 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10246
10247 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
10248 * config/nds32/constants.md (unspec_volatile_element): Add
10249 UNSPEC_VOLATILE_RELAX_GROUP.
10250 * config/nds32/nds32-relax-opt.c: New file.
10251 * config/nds32/nds32-predicates.c
10252 (nds32_symbol_load_store_p): New function.
10253 * config/nds32/nds32-protos.h
10254 (nds32_symbol_load_store_p): Declare function.
10255 (make_pass_nds32_relax_opt): Declare new rtl pass function.
10256 * config/nds32/nds32.c
10257 (nds32_register_pass): New function to register pass.
10258 (nds32_register_passes): New function to register passes.
10259 * config/nds32/nds32.md (relax_group): New pattern.
10260 * config/nds32/nds32.opt (mrelax-hint): New option.
10261 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
10262
10263 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
10264
10265 * config/nds32/t-nds32: Modify files dependency.
10266
10267 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10268
10269 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
10270 (PROFILE_HOOK): Define its implementation.
10271
10272 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10273
10274 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
10275 type and 32-bit size.
10276
10277 2018-04-01 Jakub Jelinek <jakub@redhat.com>
10278
10279 PR middle-end/85090
10280 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
10281 (V_128_256): New mode iterator.
10282 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
10283 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
10284 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
10285 of V.
10286 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
10287 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
10288
10289 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
10290
10291 PR target/83315
10292 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
10293 NaN inputs correctly.
10294
10295 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
10296
10297 PR target/80546
10298 * config/rs6000/vsx.md (??r): New mode attribute.
10299 (*vsx_mov<mode>_64bit): Use it.
10300 (*vsx_mov<mode>_32bit): Likewise.
10301
10302 2018-03-30 Martin Sebor <msebor@redhat.com>
10303
10304 PR tree-optimization/84818
10305 * builtins.c (check_access): Use warning_n.
10306
10307 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10308
10309 PR target/83822
10310 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
10311 condition.
10312 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
10313 condition.
10314
10315 2018-03-30 Julia Koval <julia.koval@intel.com>
10316
10317 PR target/84413
10318 * x86-tune.def (movx, partial_reg_dependency): Enable for
10319 m_SKYLAKE_AVX512.
10320
10321 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
10322
10323 PR inline-asm/84985
10324 * lra-constraints.c (process_alt_operands): Move setting
10325 this_alternative_matches below.
10326
10327 2018-03-29 Martin Liska <mliska@suse.cz>
10328
10329 PR lto/84995.
10330 * doc/invoke.texi: Document how LTO works with debug info.
10331 Describe auto-load support of binutils. Mention 'x86-64'
10332 as valid option value of -march option.
10333
10334 2018-03-29 Jakub Jelinek <jakub@redhat.com>
10335
10336 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
10337
10338 PR c/85094
10339 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
10340 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
10341 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
10342 checking.
10343
10344 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
10345
10346 PR target/84912
10347 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
10348 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
10349 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
10350 for RS6000_BTM_POWERPC64.
10351 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
10352 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
10353 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
10354 definition.
10355 (DIVDE): Use it.
10356 (DIVDEU): Likewise.
10357
10358 2018-03-28 Carl Love <cel@us.ibm.com>
10359
10360 Revert
10361 2017-09-27 Carl Love <cel@us.ibm.com>
10362
10363 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
10364 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
10365 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
10366 fctiw instruction.
10367
10368 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10369
10370 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
10371 instead of __vector bool.
10372 (_mm_max_pu8): Likewise.
10373 (_mm_min_pi16): Likewise.
10374
10375 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
10376
10377 PR target/84912
10378 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
10379 (DIVWEUO): Likewise.
10380 (DIVDEO): Likewise.
10381 (DIVDEUO): Likewise.
10382 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
10383 DIVWEUO and DIVDEUO.
10384 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
10385 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
10386 (div_extend): Likewise.
10387 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
10388 builtin function.
10389 (__builtin_divweuo): Likewise.
10390 (__builtin_divdeo): Likewise.
10391 (__builtin_divdeuo): Likewise.
10392
10393 2018-03-28 Jakub Jelinek <jakub@redhat.com>
10394
10395 PR target/85095
10396 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
10397 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
10398
10399 PR tree-optimization/82004
10400 * gimple-match-head.c (optimize_pow_to_exp): New function.
10401 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
10402 Don't fold to exp if optimize_pow_to_exp is false.
10403
10404 2018-03-28 Martin Liska <mliska@suse.cz>
10405
10406 PR other/84819
10407 * calls.c (initialize_argument_information): Fix trailing space.
10408 * common.opt: Fix typo and provide better explanation for
10409 -fsanitize-coverage option.
10410 * config/i386/i386.opt: Fix typo.
10411
10412 2018-03-28 Jakub Jelinek <jakub@redhat.com>
10413 Martin Liska <mliska@suse.cz>
10414
10415 PR sanitizer/85081
10416 * gimplify.c (asan_poison_variable): Don't do the check for
10417 gimplify_omp_ctxp here.
10418 (gimplify_decl_expr): Do it here.
10419 (gimplify_target_expr): Likewise.
10420
10421 2018-03-28 Martin Liska <mliska@suse.cz>
10422
10423 PR target/84988
10424 * config/i386/i386.c (ix86_function_arg_advance): Do not call
10425 chkp_type_bounds_count if MPX is not enabled.
10426
10427 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
10428
10429 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
10430
10431 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
10432
10433 PR target/84914
10434 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
10435 function to create the function decl for complex long double
10436 multiply and divide for -mabi=ieeelongdouble.
10437 (init_float128_ieee): Call it.
10438
10439 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
10440
10441 PR target/85044
10442 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
10443 -fcf-protection=branch -mibt.
10444 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
10445
10446 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10447
10448 PR target/81863
10449 * config/arm/arm.c (arm_valid_symbolic_address): Handle
10450 arm_word_relocations.
10451
10452 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
10453
10454 PR target/85056
10455 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
10456 extern array declarations.
10457
10458 2018-03-27 Richard Biener <rguenther@suse.de>
10459
10460 PR middle-end/84067
10461 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
10462 explicit single_use checks.
10463
10464 2018-03-27 Richard Biener <rguenther@suse.de>
10465
10466 PR tree-optimization/85082
10467 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
10468 Valueize the VUSE.
10469
10470 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10471
10472 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
10473 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
10474 Turn on fasynchronous-unwind-tables and funwind-tables.
10475
10476 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
10477
10478 PR target/85073
10479 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
10480 (*bmi_blsr_<mode>_ccz): Ditto.
10481
10482 2018-03-26 Tom de Vries <tom@codesourcery.com>
10483
10484 PR tree-optimization/85063
10485 * omp-general.c (offloading_function_p): New function. Factor out
10486 of ...
10487 * omp-offload.c (pass_omp_target_link::gate): ... here.
10488 * omp-general.h (offloading_function_p): Declare.
10489 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
10490 with attribute omp declare target for offloading functions.
10491
10492 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
10493
10494 PR tree-optimization/84005
10495 * tree-data-ref.h (get_base_for_alignment): Declare.
10496 * tree-data-ref.c (get_base_for_alignment_1): New function.
10497 (get_base_for_alignment): Likewise.
10498 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
10499 get_base_for_alignment to find a suitable base object, instead
10500 of always using drb->base_address.
10501
10502 2018-03-23 Jakub Jelinek <jakub@redhat.com>
10503
10504 PR inline-asm/85022
10505 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
10506 known size by default.
10507
10508 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
10509
10510 PR inline-asm/85030
10511 * lra-constraints.c (process_alt_operands): Don't match BLKmode
10512 and non BLKmode operands.
10513
10514 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10515
10516 PR target/85026
10517 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
10518 Clean up attributes.
10519
10520 2018-03-23 Richard Biener <rguenther@suse.de>
10521
10522 PR debug/85020
10523 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
10524 we are going to emit early debug for LTO.
10525
10526 2018-03-23 Jakub Jelinek <jakub@redhat.com>
10527
10528 PR inline-asm/85034
10529 * function.c (match_asm_constraints_1): Don't optimize if input
10530 doesn't satisfy general_operand predicate for output's mode.
10531
10532 PR inline-asm/85022
10533 * alias.c (write_dependence_p): Don't require for x_canonicalized
10534 non-VOIDmode if x has VOIDmode.
10535
10536 PR sanitizer/85029
10537 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
10538 just don't try to optimize it rather than assert it never happens.
10539
10540 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
10541
10542 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
10543 macro expansions for definition of ST_INTERNAL_<mode> and
10544 LD_INTERNAL_<mode> builtins.
10545 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
10546 Remove prototype.
10547 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
10548 function.
10549 (altivec_expand_st_builtin): Likewise.
10550 (altivec_expand_builtin): Remove calls to deleted functions.
10551 (rs6000_address_for_altivec): Delete this function.
10552 * config/rs6000/vector.md: Remove expands for
10553 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
10554
10555 2018-03-22 Sudakshina Das <sudi.das@arm.com>
10556
10557 PR target/84826
10558 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
10559 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
10560 re-computing once computed.
10561 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
10562 (arm_init_machine_status): Initialize
10563 machine->static_chain_stack_bytes.
10564
10565 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
10566
10567 PR target/84760
10568 * doc/extend.texi: Add four new prototypes for vec_ld.
10569 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
10570 definitions for more logical presentation.
10571 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
10572 entries for V1TI variants of __builtin_altivec_ld builtin.
10573 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
10574 handling of V1TI variant of LVX icode pattern.
10575 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
10576 (rs6000_gimple_fold_builtin): Likewise.
10577 (altivec_init_builtins): Add code to define
10578 __builtin_altivec_lvx_v1ti function.
10579
10580 2018-03-22 Jakub Jelinek <jakub@redhat.com>
10581
10582 PR inline-asm/84941
10583 * function.c (match_asm_constraints_1): Don't do the optimization
10584 if input isn't a REG, SUBREG, MEM or constant.
10585
10586 2018-03-22 Tom de Vries <tom@codesourcery.com>
10587
10588 PR tree-optimization/84956
10589 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
10590 bb_has_abnormal_pred.
10591
10592 2018-03-22 Jakub Jelinek <jakub@redhat.com>
10593
10594 PR sanitizer/85018
10595 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
10596 DECL_INITIAL (decl) to decl at the end.
10597 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
10598 adjust the comment.
10599
10600 2018-03-21 Joseph Myers <joseph@codesourcery.com>
10601
10602 * doc/extend.texi (__builtin_tgmath): Document when complex
10603 integer types are treated as _Complex _Float64.
10604
10605 2018-03-21 Tom de Vries <tom@codesourcery.com>
10606
10607 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
10608
10609 2018-03-21 Jakub Jelinek <jakub@redhat.com>
10610
10611 PR tree-optimization/84960
10612 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
10613 if it is ENTRY block, move them into single succ of ENTRY in that case.
10614
10615 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
10616
10617 PR tree-optimization/84811
10618 * poly-int.h (poly_span_traits): Remove the T3 parameter and
10619 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
10620 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
10621 (known_subrange_p): Update accordingly. Cast each value involved
10622 in the size comparison, rather than casting the result of the
10623 subtraction.
10624
10625 2018-03-21 Jakub Jelinek <jakub@redhat.com>
10626
10627 PR tree-optimization/84982
10628 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
10629 by flipping the least significant bit rather than all bits from
10630 bitpos to bitpos + bitsize - 1.
10631
10632 2018-03-21 Nathan Sidwell <nathan@acm.org>
10633
10634 * doc/extend.texi (Deprecated Features): Remove mention of
10635 long-deleted deprecations.
10636
10637 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10638
10639 PR jit/84288
10640 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
10641 * configure: Regenerate.
10642
10643 2018-03-21 Tom de Vries <tom@codesourcery.com>
10644
10645 PR tree-optimization/83126
10646 * tree-parloops.c (num_phis): New function.
10647 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
10648
10649 2018-03-21 Nathan Sidwell <nathan@acm.org>
10650
10651 * doc/extend.texi (Deprecated Features): Update deprecated flags,
10652 mention anon-struct/union members and trailing attributes.
10653
10654 2018-03-21 Bin Cheng <bin.cheng@arm.com>
10655
10656 PR tree-optimization/84969
10657 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
10658 builtin memset partitions if they set different rhs values.
10659
10660 2018-03-21 Jakub Jelinek <jakub@redhat.com>
10661
10662 PR rtl-optimization/84989
10663 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
10664 VEC_DUPLICATE with scalar result mode.
10665
10666 2018-03-21 Martin Liska <mliska@suse.cz>
10667
10668 PR ipa/84963
10669 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
10670 not intended return statement.
10671
10672 2018-03-21 Martin Liska <mliska@suse.cz>
10673
10674 PR target/84988
10675 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
10676 (chkp_find_bound_slots_1): Limit number of iterations.
10677
10678 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
10679
10680 PR target/84838
10681 * Minor grammar fixes for x86 options.
10682
10683 2018-03-20 Jakub Jelinek <jakub@redhat.com>
10684
10685 PR debug/84875
10686 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
10687 holding REG_CFA_RESTORE notes, instead turn them into a USE.
10688
10689 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
10690
10691 PR target/83789
10692 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
10693 (altivec_lvx_<mode>_1op): Likewise.
10694 (altivec_stvx_<mode>_2op): Likewise.
10695 (altivec_stvx_<mode>_1op): Likewise.
10696 (altivec_lvx_<VM2:mode>): New define_expand.
10697 (altivec_stvx_<VM2:mode>): Likewise.
10698 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
10699 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10700 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
10701 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10702 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
10703 (rs6000_gen_lvx): Likewise.
10704 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
10705 (altivec_expand_stv_builtin): Likewise.
10706 (altivec_expand_builtin): Likewise.
10707 * config/rs6000/vector.md: Likewise.
10708
10709 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10710
10711 PR target/82518
10712 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
10713 BYTES_BIG_ENDIAN.
10714
10715 2018-03-20 Richard Biener <rguenther@suse.de>
10716
10717 PR target/84986
10718 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
10719 sign-conversions as zero, fall back to standard scalar_stmt
10720 cost for the rest.
10721
10722 2018-03-20 Martin Liska <mliska@suse.cz>
10723
10724 PR ipa/84825
10725 * predict.c (rebuild_frequencies): Handle case when we have
10726 PROFILE_ABSENT, but flag_guess_branch_prob is false.
10727
10728 2018-03-20 Jakub Jelinek <jakub@redhat.com>
10729
10730 PR target/84990
10731 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
10732 flag_section_anchors.
10733 * varasm.c (use_blocks_for_decl_p): Remove hack for
10734 dw2_force_const_mem.
10735
10736 PR target/84845
10737 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
10738 to ...
10739 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
10740 be created, use lowpart_subreg of operands[0] rather than operands[0]
10741 itself.
10742 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
10743 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
10744 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
10745 and n constraint instead of aarch64_shift_imm_di and Usd.
10746 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
10747 (*aarch64_<optab>_reg_minus<mode>3): ... this.
10748
10749 2018-03-20 Sudakshina Das <sudi.das@arm.com>
10750
10751 PR target/82989
10752 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
10753 to favor GPR over NEON registers.
10754 (<shift>di3_neon): Likewise.
10755
10756 2018-03-20 Tom de Vries <tom@codesourcery.com>
10757
10758 PR target/84952
10759 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
10760 (nvptx_process_pars): Emit bar.sync asap and alap.
10761
10762 2018-03-20 Tom de Vries <tom@codesourcery.com>
10763
10764 PR target/84954
10765 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
10766 seen_label if seen_label is already set.
10767
10768 2018-03-20 Jakub Jelinek <jakub@redhat.com>
10769
10770 PR target/84945
10771 * config/i386/i386.c (fold_builtin_cpu): For features above 31
10772 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
10773 Use 1U instead of 1. Formatting fixes.
10774
10775 PR c/84953
10776 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
10777 instead of TREE_TYPE (s1) for the return value.
10778
10779 2018-03-19 Jakub Jelinek <jakub@redhat.com>
10780
10781 PR tree-optimization/84946
10782 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
10783 bitsize + bitsize in poly_uint64 rather than poly_int64.
10784
10785 PR sanitizer/78651
10786 * dwarf2asm.c: Include fold-const.c.
10787 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
10788 of decl rather than decl itself.
10789
10790 PR rtl-optimization/84643
10791 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
10792
10793 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
10794
10795 PR sanitizer/78651
10796 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
10797 calling assemble_variable.
10798
10799 2018-03-19 Sudakshina Das <sudi.das@arm.com>
10800
10801 PR target/81647
10802 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
10803 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
10804
10805 2018-03-19 Jim Wilson <jimw@sifive.com>
10806
10807 PR bootstrap/84856
10808 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
10809 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
10810 (riscv_first_stack_step): Likewise.
10811 (riscv_option_override): Use STACK_BOUNDARY instead of
10812 MIN_STACK_BOUNDARY.
10813 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
10814 MIN_STACK_BOUNDARY.
10815 (BIGGEST_ALIGNMENT): Set to 128.
10816 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
10817 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
10818 STACK_BOUNDARY.
10819
10820 2018-03-19 Richard Biener <rguenther@suse.de>
10821
10822 PR tree-optimization/84933
10823 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
10824 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
10825
10826 2018-03-19 Richard Biener <rguenther@suse.de>
10827
10828 PR tree-optimization/84859
10829 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
10830 (cond_if_else_store_replacement): Perform sinking operation on
10831 single-store BBs regardless of MAX_STORES_TO_SINK setting.
10832 Generalize what a BB with a single eligible store is.
10833
10834 2018-03-19 Richard Biener <rguenther@suse.de>
10835
10836 PR tree-optimization/84929
10837 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
10838 chrec_is_positive against non-chrec arg.
10839
10840 2018-03-19 Tamar Christina <tamar.christina@arm.com>
10841
10842 PR target/84711
10843 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
10844
10845 2018-03-18 Martin Liska <mliska@suse.cz>
10846
10847 PR rtl-optimization/84635
10848 * regrename.c (build_def_use): Use matches_mode only when
10849 matches >= 0.
10850
10851 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
10852
10853 PR tree-optimization/84913
10854 * tree-vect-loop.c (vectorizable_reduction): Don't try to
10855 vectorize chains of COND_EXPRs.
10856
10857 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
10858
10859 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
10860
10861 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
10862
10863 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
10864
10865 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
10866
10867 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
10868
10869 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
10870 Kito Cheng <kito.cheng@gmail.com>
10871
10872 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
10873 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
10874 (nds32_adjust_reg_alloc_order): New function.
10875 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
10876
10877 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
10878
10879 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
10880 nds32_print_operand, nds32_print_operand_address): Use
10881 HOST_WIDE_INT_PRINT_DEC instead.
10882
10883 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
10884
10885 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
10886
10887 2018-03-17 Jakub Jelinek <jakub@redhat.com>
10888
10889 PR target/84902
10890 * config/i386/i386.c (initial_ix86_tune_features,
10891 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
10892 unsigned long long.
10893 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
10894 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
10895 rather than 1u << ix86_tune. Formatting fix.
10896 (ix86_option_override_internal): Change ix86_arch_mask from
10897 unsigned int to unsigned HOST_WIDE_INT, initialize to
10898 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
10899 (ix86_function_specific_restore): Likewise.
10900
10901 2018-03-16 Jakub Jelinek <jakub@redhat.com>
10902
10903 PR target/84899
10904 * postreload.c (reload_combine_recognize_pattern): Perform
10905 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
10906 truncate_int_for_mode the result for the destination's mode.
10907
10908 PR c/84909
10909 * hsa-gen.c (mem_type_for_type): Fix comment typo.
10910 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
10911 Likewise.
10912 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
10913 Likewise.
10914
10915 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
10916
10917 PR target/84876
10918 * lra-assigns.c (lra_split_hard_reg_for): Don't use
10919 regno_allocno_class_array and sorted_pseudos.
10920 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
10921 insns where regno is used.
10922
10923 2018-03-16 Martin Liska <mliska@suse.cz>
10924
10925 PR ipa/84833
10926 * multiple_target.c (create_dispatcher_calls): Redirect
10927 reference in the symbol table.
10928
10929 2018-03-16 Martin Liska <mliska@suse.cz>
10930
10931 PR ipa/84722
10932 * multiple_target.c (create_dispatcher_calls): Redirect also
10933 an alias.
10934
10935 2018-03-16 Jakub Jelinek <jakub@redhat.com>
10936
10937 PR c++/79937
10938 PR c++/82410
10939 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
10940 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
10941 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
10942
10943 2018-03-16 Julia Koval <julia.koval@intel.com>
10944
10945 * doc/invoke.texi (Skylake Server): Add CLWB.
10946 Cannonlake): Remove CLWB.
10947
10948 2018-03-16 Jakub Jelinek <jakub@redhat.com>
10949
10950 PR tree-optimization/84841
10951 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
10952 1 << 3.
10953 (FLOAT_ONE_CONST_TYPE): Define.
10954 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
10955 (sort_by_operand_rank): Put entries with higher constant_type last
10956 rather than first to match comments.
10957
10958 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
10959
10960 * config/nios2/nios2.md (movsi_internal): Fix thinko in
10961 split predicate.
10962
10963 2018-03-15 Jakub Jelinek <jakub@redhat.com>
10964
10965 PR c++/79085
10966 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
10967 check and use address of target always.
10968
10969 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
10970
10971 PR target/84574
10972 * config/i386/i386.c (indirect_thunk_needed): Update comments.
10973 (indirect_thunk_bnd_needed): Likewise.
10974 (indirect_thunks_used): Likewise.
10975 (indirect_thunks_bnd_used): Likewise.
10976 (indirect_return_needed): New.
10977 (indirect_return_bnd_needed): Likewise.
10978 (output_indirect_thunk_function): Add a bool argument for
10979 function return.
10980 (output_indirect_thunk_function): Don't generate alias for
10981 function return thunk.
10982 (ix86_code_end): Call output_indirect_thunk_function to generate
10983 function return thunks.
10984 (ix86_output_function_return): Set indirect_return_bnd_needed
10985 and indirect_return_needed instead of indirect_thunk_bnd_needed
10986 and indirect_thunk_needed.
10987
10988 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
10989
10990 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
10991 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
10992 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
10993
10994 2018-03-15 David Malcolm <dmalcolm@redhat.com>
10995 Paul Hua <paul.hua.gm@gmail.com>
10996
10997 PR c/84852
10998 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
10999
11000 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
11001
11002 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
11003 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
11004 resp. SFmode cases.
11005
11006 2018-03-15 Tamar Christina <tamar.christina@arm.com>
11007
11008 PR target/84711
11009 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11010 instead of GET_MODE_SIZE when comparing Units.
11011
11012 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11013
11014 PR target/68256
11015 * varasm.c (hash_section): Return an unchangeble hash value
11016 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
11017 Return !aarch64_can_use_per_function_literal_pools_p ().
11018
11019 2018-03-15 Jakub Jelinek <jakub@redhat.com>
11020
11021 PR target/84860
11022 * optabs.c (emit_conditional_move): Pass address of cmode's copy
11023 rather than address of cmode as last argument to prepare_cmp_insn.
11024
11025 2018-03-15 Julia Koval <julia.koval@intel.com>
11026
11027 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
11028 F_AVX512VNNI, F_AVX512BITALG): New.
11029
11030 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
11031
11032 PR target/83451
11033 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
11034 insn for floating-point loads and stores.
11035
11036 2018-03-14 Carl Love <cel@us.ibm.com>
11037
11038 * config/rs6000/rs6000-c.c: Add macro definitions for
11039 ALTIVEC_BUILTIN_VEC_PERMXOR.
11040 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
11041 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
11042 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
11043 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
11044 UNSPEC_VPERMXOR.
11045 * config/doc/extend.texi: Add prototypes for vec_permxor.
11046
11047 2018-03-14 David Malcolm <dmalcolm@redhat.com>
11048
11049 PR c/84852
11050 * diagnostic-show-locus.c (class layout_point): Convert m_line
11051 from int to linenum_type.
11052 (line_span::comparator): Use linenum "compare" function when
11053 comparing line numbers.
11054 (test_line_span): New function.
11055 (layout_range::contains_point): Convert param "row" from int to
11056 linenum_type.
11057 (layout_range::intersects_line_p): Likewise.
11058 (layout::will_show_line_p): Likewise.
11059 (layout::print_source_line): Likewise.
11060 (layout::should_print_annotation_line_p): Likewise.
11061 (layout::print_annotation_line): Likewise.
11062 (layout::print_leading_fixits): Likewise.
11063 (layout::annotation_line_showed_range_p): Likewise.
11064 (struct line_corrections): Likewise for field m_row.
11065 (line_corrections::line_corrections): Likewise for param "row".
11066 (layout::print_trailing_fixits): Likewise.
11067 (layout::get_state_at_point): Likewise.
11068 (layout::get_x_bound_for_row): Likewise.
11069 (layout::print_line): Likewise.
11070 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
11071 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
11072 * input.c (selftest::test_linenum_comparisons): New function.
11073 (selftest::input_c_tests): Call it.
11074 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
11075 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
11076 * selftest.h (ASSERT_GT): New macro.
11077 (ASSERT_GT_AT): New macro.
11078 (ASSERT_LT): New macro.
11079 (ASSERT_LT_AT): New macro.
11080
11081 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
11082
11083 PR rtl-optimization/84780
11084 * combine.c (distribute_links): Don't make a link based on pc_rtx.
11085
11086 2018-03-14 Martin Liska <mliska@suse.cz>
11087
11088 * tree.c (record_node_allocation_statistics): Use
11089 get_stats_node_kind.
11090 (get_stats_node_kind): New function extracted from
11091 record_node_allocation_statistics.
11092 (free_node): Use get_stats_node_kind.
11093
11094 2018-03-14 Richard Biener <rguenther@suse.de>
11095
11096 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
11097 that the value-set of ANTIC_IN doesn't grow.
11098
11099 Revert
11100 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11101 member.
11102 (BB_VISITED_WITH_VISITED_SUCCS): New define.
11103 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11104
11105 2018-03-14 Julia Koval <julia.koval@intel.com>
11106
11107 * config.gcc (icelake-client, icelake-server): New.
11108 (icelake): Remove.
11109 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
11110 (initial_ix86_arch_features): Ditto.
11111 (PTA_SKYLAKE): Add SGX.
11112 (PTA_ICELAKE): Remove.
11113 (PTA_ICELAKE_CLIENT): New.
11114 (PTA_ICELAKE_SERVER): New.
11115 (ix86_option_override_internal): Split up icelake on icelake client and
11116 icelake server.
11117 (get_builtin_code_for_version): Ditto.
11118 (fold_builtin_cpu): Ditto.
11119 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
11120 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
11121 * config/i386/i386.h (processor_type): Ditto.
11122 * doc/invoke.texi: Ditto.
11123
11124 2018-03-14 Jakub Jelinek <jakub@redhat.com>
11125
11126 PR sanitizer/83392
11127 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
11128 INTEGER_CST offset, add it together with bitpos / 8 and
11129 sign extend based on POINTER_SIZE.
11130
11131 PR target/84844
11132 Revert
11133 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
11134
11135 PR target/78090
11136 * config/i386/constraints.md (Yc): New register constraint.
11137 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
11138 Use Yc constraint for alternative 2 of operand 0. Remove
11139 preferred_for_speed attribute.
11140
11141 2018-03-14 Richard Biener <rguenther@suse.de>
11142
11143 PR tree-optimization/84830
11144 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
11145 with the old one to avoid oscillations.
11146
11147 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
11148
11149 PR target/83712
11150 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
11151 pseudos.
11152 (assign_by_spills): Return a flag of reload assignment failure.
11153 Do not process the reload assignment failures. Do not spill other
11154 reload pseudos if they has the same reg class. Update n if
11155 necessary.
11156 (lra_assign): Add a return arg. Set up from the result of
11157 assign_by_spills call.
11158 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11159 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11160 usage_insns if it is not NULL.
11161 (spill_hard_reg_in_range): New function.
11162 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11163 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11164 function prototypes.
11165 (lra_assign): Change prototype.
11166 * lra.c (lra): Add code to deal with fails by splitting hard reg
11167 live ranges.
11168
11169 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
11170
11171 * config/riscv/riscv.opt (mrelax): New option.
11172 * config/riscv/riscv.c (riscv_file_start): Emit ".option
11173 "norelax" when riscv_mrelax is disabled.
11174 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
11175
11176 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11177
11178 PR target/84743
11179 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
11180 reassociation for int modes.
11181
11182 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11183
11184 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
11185 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
11186 for big-endian.
11187 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
11188 * config/aarch64/aarch64-sve.md
11189 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
11190 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
11191 (*extend<mode><Vwide>2): Rename to...
11192 (aarch64_sve_extend<mode><Vwide>2): ...this.
11193 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
11194 renaming the old pattern to...
11195 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
11196 unsigned packs.
11197 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
11198 define_expand, renaming the old pattern to...
11199 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
11200 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
11201 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
11202 account when deciding which SVE instruction the optab should use.
11203 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
11204
11205 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11206
11207 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
11208 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
11209 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
11210 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
11211 (tlsdesc_small_<mode>): Turn a define_expand and use
11212 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
11213 (tlsdesc_small_advsimd_<mode>): ...this.
11214 (tlsdesc_small_sve_<mode>): New pattern.
11215
11216 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11217
11218 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
11219 (UNSPEC_UMUL_HIGHPART): New constants.
11220 (MUL_HIGHPART): New int iteraor.
11221 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
11222 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
11223 define_expand.
11224 (*<su>mul<mode>3_highpart): New define_insn.
11225
11226 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11227
11228 PR lto/84805
11229 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11230 incomplete types.
11231
11232 2018-03-13 Martin Liska <mliska@suse.cz>
11233
11234 PR ipa/84658.
11235 * (sem_item_optimizer::sem_item_optimizer): Initialize new
11236 vector.
11237 (sem_item_optimizer::~sem_item_optimizer): Release it.
11238 (sem_item_optimizer::merge_classes): Register variable aliases.
11239 (sem_item_optimizer::fixup_pt_set): New function.
11240 (sem_item_optimizer::fixup_points_to_sets): Likewise.
11241 * ipa-icf.h: Declare new variables and functions.
11242
11243 2018-03-13 Jakub Jelinek <jakub@redhat.com>
11244
11245 PR middle-end/84834
11246 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
11247 integer_pow2p@2 and test integer_pow2p in condition.
11248 (A < 0 ? C : 0): Similarly for @1.
11249
11250 PR middle-end/84831
11251 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
11252 characters starting at p contain '\0' character, don't look beyond
11253 that.
11254
11255 PR target/84827
11256 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
11257 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
11258
11259 PR target/84828
11260 * reg-stack.c (change_stack): Change update_end var from int to
11261 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
11262 also call set_block_for_insn on the newly added insns and rescan.
11263
11264 PR target/84786
11265 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
11266 on the last operand.
11267
11268 PR c++/84704
11269 * tree.c (stabilize_reference_1): Return save_expr (e) for
11270 STATEMENT_LIST even if it doesn't have side-effects.
11271
11272 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
11273
11274 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
11275
11276 2018-03-12 Renlin Li <renlin.li@arm.com>
11277
11278 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
11279 aarch64_output_scalar_simd_mov_immediate.
11280
11281 2018-03-12 Martin Sebor <msebor@redhat.com>
11282
11283 PR tree-optimization/83456
11284 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
11285 for perfectly overlapping calls to memcpy.
11286 (gimple_fold_builtin_memory_chk): Same.
11287 (gimple_fold_builtin_strcpy): Handle no-warning.
11288 (gimple_fold_builtin_stxcpy_chk): Same.
11289 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
11290
11291 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11292
11293 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
11294 parameter. Use it for SFmode.
11295 (rs6000_function_arg_advance_1): Adjust.
11296 (rs6000_function_arg): Adjust.
11297 (rs6000_gimplify_va_arg): Pass false for that new parameter.
11298
11299 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11300
11301 PR rtl-optimization/84169
11302 PR rtl-optimization/84780
11303 * combine.c (can_combine_p): Check for a 2-insn combination whether
11304 the destination register is used between the two insns, too.
11305
11306 2018-03-12 Richard Biener <rguenther@suse.de>
11307
11308 PR tree-optimization/84803
11309 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
11310 for refs DR analysis didn't process.
11311
11312 2018-03-12 Richard Biener <rguenther@suse.de>
11313
11314 PR tree-optimization/84777
11315 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
11316 force-vectorize loops ignore whether we are optimizing for size.
11317
11318 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
11319
11320 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
11321 (TARGET_MD_ASM_ADJUST): Define.
11322
11323 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
11324 Kito Cheng <kito.cheng@gmail.com>
11325 Chung-Ju Wu <jasonwucj@gmail.com>
11326
11327 * config/nds32/nds32.c (nds32_compute_stack_frame,
11328 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
11329 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
11330 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
11331 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
11332 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
11333 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
11334 * config/nds32/nds32.md (prologue, epilogue): Use macro
11335 NDS32_V3PUSH_AVAILABLE_P to do checking.
11336
11337 2018-03-11 Jakub Jelinek <jakub@redhat.com>
11338
11339 PR debug/58150
11340 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
11341 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
11342 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
11343 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
11344 addition of most attributes on !orig_type_die or the attribute not
11345 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
11346
11347 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11348 Chung-Ju Wu <jasonwucj@gmail.com>
11349
11350 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
11351 __NDS32_VH__ macro.
11352 * config/nds32/nds32.opt (mvh): New option.
11353
11354 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11355 Chung-Ju Wu <jasonwucj@gmail.com>
11356
11357 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
11358 function.
11359 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
11360 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
11361 definition.
11362
11363 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11364 Chung-Ju Wu <jasonwucj@gmail.com>
11365
11366 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
11367 function.
11368 * config/nds32/nds32-multiple.md (strlensi): New pattern.
11369 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
11370
11371 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
11372 Kito Cheng <kito.cheng@gmail.com>
11373 Chung-Ju Wu <jasonwucj@gmail.com>
11374
11375 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
11376 UNSPEC_FFMISM and UNSPEC_FLMISM.
11377 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
11378 for ffb, ffmism and flmism.
11379 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
11380 (unspec_ffmism): Ditto.
11381 (unspec_flmism): Ditto.
11382 (nds32_expand_builtin_impl): Check if string extension is available.
11383 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
11384 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
11385
11386 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
11387
11388 Reverting patch:
11389 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
11390
11391 PR target/83712
11392 * lra-assigns.c (assign_by_spills): Return a flag of reload
11393 assignment failure. Do not process the reload assignment
11394 failures. Do not spill other reload pseudos if they has the same
11395 reg class.
11396 (lra_assign): Add a return arg. Set up from the result of
11397 assign_by_spills call.
11398 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11399 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11400 usage_insns if it is not NULL.
11401 (spill_hard_reg_in_range): New function.
11402 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11403 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11404 function prototypes.
11405 (lra_assign): Change prototype.
11406 * lra.c (lra): Add code to deal with fails by splitting hard reg
11407 live ranges.
11408
11409 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
11410
11411 PR target/84807
11412 * config/i386/i386.opt: Replace Enforcment with Enforcement.
11413
11414 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
11415
11416 PR debug/84620
11417 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
11418 (dw_val_node): Add val_symbolic_view.
11419 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
11420 (symview_upper_bound): New.
11421 (new_line_info_table): Initialize symviews_since_reset.
11422 (dwarf2out_source_line): Count symviews_since_reset and set
11423 symview_upper_bound.
11424 (dw_val_equal_p): Handle symview.
11425 (add_AT_symview): New.
11426 (print_dw_val): Handle symview.
11427 (attr_checksum, attr_checksum_ordered): Likewise.
11428 (same_dw_val_p, size_of_die): Likewise.
11429 (value_format, output_die): Likewise.
11430 (add_high_low_attributes): Use add_AT_symview for entry_view.
11431 (dwarf2out_finish): Reset symview_upper_bound, clear
11432 zero_view_p.
11433
11434 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
11435
11436 PR target/83969
11437 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
11438 Add strict argument and use it.
11439 (rs6000_split_multireg_move): Update for new strict argument.
11440 (mem_operand_gpr): Disallow all non-offsettable addresses.
11441 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
11442
11443 2018-03-09 Jakub Jelinek <jakub@redhat.com>
11444
11445 PR target/84772
11446 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
11447 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
11448 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
11449
11450 PR c++/84767
11451 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
11452 decl, use remap_type if we want to use the type.
11453
11454 2018-03-09 Martin Sebor <msebor@redhat.com>
11455
11456 PR tree-optimization/84526
11457 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11458 Remove dead code.
11459 (builtin_access::generic_overlap): Be prepared to handle non-array
11460 base objects.
11461
11462 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
11463
11464 PR rtl-optimization/84682
11465 * lra-constraints.c (process_address_1): Check is_address flag
11466 for address constraints.
11467 (process_alt_operands): Likewise.
11468 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
11469 preprocess_constraints.
11470 * recog.h (preprocess_constraints): Add oploc parameter.
11471 Adjust callers.
11472 * recog.c (preprocess_constraints): Test address_operand for
11473 CT_ADDRESS constraints.
11474
11475 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
11476
11477 PR target/83712
11478 * lra-assigns.c (assign_by_spills): Return a flag of reload
11479 assignment failure. Do not process the reload assignment
11480 failures. Do not spill other reload pseudos if they has the same
11481 reg class.
11482 (lra_assign): Add a return arg. Set up from the result of
11483 assign_by_spills call.
11484 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11485 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11486 usage_insns if it is not NULL.
11487 (spill_hard_reg_in_range): New function.
11488 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11489 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11490 function prototypes.
11491 (lra_assign): Change prototype.
11492 * lra.c (lra): Add code to deal with fails by splitting hard reg
11493 live ranges.
11494
11495 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11496
11497 PR target/83193
11498 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
11499 Accept complain bool parameter. Only emit errors if it is true.
11500 (arm_parse_cpu_option_name): Likewise.
11501 (arm_target_thumb_only): Adjust callers of the above.
11502 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
11503 prototype to take a default true bool parameter.
11504 (arm_parse_arch_option_name): Likewise.
11505
11506 2018-03-09 David Malcolm <dmalcolm@redhat.com>
11507 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
11508
11509 PR jit/64089
11510 PR jit/84288
11511 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
11512 * configure: Regenerate.
11513 * configure.ac ("linker --version-script option"): New.
11514 ("linker soname option"): New.
11515
11516 2018-03-09 Richard Biener <rguenther@suse.de>
11517
11518 PR tree-optimization/84775
11519 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
11520 immediate uses of predicate stmts and mark them modified.
11521
11522 Revert
11523 PR tree-optimization/84178
11524 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
11525 to caller.
11526 (version_loop_for_if_conversion): Delay update_ssa call.
11527 (tree_if_conversion): Delay update_ssa until after predicate
11528 insertion.
11529
11530 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
11531
11532 PR target/84763
11533 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
11534 when the function accesses prior frames.
11535
11536 2018-03-08 Jakub Jelinek <jakub@redhat.com>
11537
11538 PR debug/84456
11539 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
11540 gen_llsym, otherwise call maybe_gen_llsym.
11541
11542 PR inline-asm/84742
11543 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
11544 has ',' character inside of it.
11545
11546 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11547
11548 PR target/84748
11549 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
11550 as clobbering CC_REGNUM.
11551
11552 2018-03-08 Richard Biener <rguenther@suse.de>
11553
11554 PR middle-end/84552
11555 * tree-scalar-evolution.c: Include tree-into-ssa.h.
11556 (follow_copies_to_constant): Do not follow SSA names registered
11557 for update.
11558
11559 2018-03-08 Richard Biener <rguenther@suse.de>
11560
11561 PR tree-optimization/84178
11562 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
11563 to caller.
11564 (version_loop_for_if_conversion): Delay update_ssa call.
11565 (tree_if_conversion): Delay update_ssa until after predicate
11566 insertion.
11567
11568 2018-03-08 David Malcolm <dmalcolm@redhat.com>
11569
11570 PR tree-optimization/84178
11571 * tree-if-conv.c (release_bb_predicate): Remove the
11572 the assertion that the stmts have NULL use_ops.
11573 Discard the statements, asserting that they haven't
11574 yet been added to a BB.
11575
11576 2018-03-08 Richard Biener <rguenther@suse.de>
11577
11578 PR tree-optimization/84746
11579 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
11580 (phi_translate): Pass in destination ANTIC_OUT set.
11581 (phi_translate_1): Likewise. For a simplified result lookup
11582 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
11583 (phi_translate_set): Adjust.
11584 (do_pre_regular_insertion): Likewise.
11585 (do_pre_partial_partial_insertion): Likewise.
11586
11587 2018-03-08 Martin Liska <mliska@suse.cz>
11588
11589 PR gcov-profile/84735
11590 * doc/gcov.texi: Document usage of profile files.
11591 * gcov-io.h: Document changes in the format.
11592
11593 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
11594
11595 PR debug/84404
11596 PR debug/84408
11597 * dwarf2out.c (struct dw_line_info_table): Update comments for
11598 view == -1.
11599 (FORCE_RESET_NEXT_VIEW): New.
11600 (FORCE_RESETTING_VIEW_P): New.
11601 (RESETTING_VIEW_P): Check for -1 too.
11602 (ZERO_VIEW_P): Likewise.
11603 (new_line_info_table): Force-reset next view.
11604 (dwarf2out_begin_function): Likewise.
11605 (dwarf2out_source_line): Simplify zero_view_p initialization.
11606 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
11607 view directly. Omit view when omitting .loc at line 0.
11608
11609 2018-03-08 Jakub Jelinek <jakub@redhat.com>
11610
11611 PR tree-optimization/84740
11612 * tree-switch-conversion.c (process_switch): Call build_constructors
11613 only if info.phi_count is non-zero.
11614
11615 PR tree-optimization/84739
11616 * tree-tailcall.c (find_tail_calls): Check call arguments against
11617 DECL_ARGUMENTS (current_function_decl) rather than
11618 DECL_ARGUMENTS (func) when checking for tail recursion.
11619
11620 2018-03-07 Jakub Jelinek <jakub@redhat.com>
11621
11622 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
11623 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
11624 Volker Reichelt's entry and add entries for people that perform
11625 GCC fuzzy testing and report numerous bugs.
11626
11627 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
11628
11629 PR target/82411
11630 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
11631 readonly data in sdata, if that is disabled.
11632 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
11633 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
11634 -mreadonly-in-sdata option.
11635
11636 2018-03-07 Martin Sebor <msebor@redhat.com>
11637
11638 PR tree-optimization/84468
11639 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
11640 basic block when looking for nul assignment.
11641
11642 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
11643
11644 PR target/84277
11645 * except.h (output_function_exception_table): Adjust prototype.
11646 * except.c (output_function_exception_table): Remove FNNAME parameter
11647 and add SECTION parameter. Ouput one part of the table at a time.
11648 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
11649 the first part of the exception table and emit unwind directives.
11650 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
11651 (i386_pe_seh_cold_init): Likewise.
11652 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
11653 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
11654 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
11655 (ix86_output_call_insn): Emit a nop in one more case for SEH.
11656 * config/i386/winnt.c: Include except.h.
11657 (struct seh_frame_state): Add reg_offset, after_prologue and
11658 in_cold_section fields.
11659 (i386_pe_seh_end_prologue): Set seh->after_prologue.
11660 (i386_pe_seh_cold_init): New function.
11661 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
11662 to seh->in_cold_section.
11663 (seh_emit_push): Record the offset of the push.
11664 (seh_emit_save): Record the offet of the save.
11665 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
11666 Test seh->after_prologue to disregard the epilogue.
11667 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
11668 (i386_pe_end_cold_function): New function.
11669
11670 2018-03-07 Jakub Jelinek <jakub@redhat.com>
11671
11672 PR fortran/84565
11673 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
11674 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
11675
11676 PR c++/84704
11677 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
11678 on tmp_var.
11679 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
11680 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
11681
11682 PR middle-end/84723
11683 * multiple_target.c: Include tree-inline.h and intl.h.
11684 (expand_target_clones): Diagnose and fail if node->definition and
11685 !tree_versionable_function_p (node->decl).
11686
11687 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
11688
11689 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
11690 sprint_ul.
11691 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
11692 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
11693 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
11694
11695 2018-03-06 Jakub Jelinek <jakub@redhat.com>
11696
11697 PR target/84710
11698 * combine.c (try_combine): Use reg_or_subregno instead of handling
11699 just paradoxical SUBREGs and REGs.
11700
11701 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
11702
11703 * config/arc/arc.c (arc_finalize_pic): Remove function.
11704 (arc_must_save_register): We use single base PIC register, remove
11705 checks to save/restore the PIC register.
11706 (arc_expand_prologue): Likewise.
11707 * config/arc/arc-protos.h (arc_set_default_type_attributes):
11708 Remove.
11709 (arc_verify_short): Likewise.
11710 (arc_attr_type): Likewise.
11711 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
11712 (walk_stores): Likewise.
11713 (arc_address_cost): Make it static.
11714 (arc_verify_short): Likewise.
11715 (branch_dest): Likewise.
11716 (arc_attr_type): Likewise.
11717 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
11718 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
11719 (arc_final_prescan_insn): Remove inserting the nops due to
11720 hardware hazards. It is done in reorg step.
11721 (insn_length_variant_t): Remove.
11722 (insn_length_parameters_t): Likewise.
11723 (arc_insn_length_parameters): Likewise.
11724 (arc_get_insn_variants): Likewise.
11725 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
11726
11727 2018-03-06 Jakub Jelinek <jakub@redhat.com>
11728
11729 PR inline-asm/84683
11730 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
11731 assertion failure.
11732
11733 PR tree-optimization/84687
11734 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
11735 on new_node->decl.
11736 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
11737
11738 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11739
11740 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
11741 Rename to ppc_speculation_barrier.
11742 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
11743 __builtin_ppc_speculation_barrier.
11744
11745 2018-03-05 Jakub Jelinek <jakub@redhat.com>
11746
11747 PR target/84700
11748 * combine.c (combine_simplify_rtx): Don't try to simplify if
11749 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
11750 are equal to x.
11751
11752 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
11753
11754 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
11755 to 32 bytes when compiling for POWER9.
11756
11757 2018-03-05 Jakub Jelinek <jakub@redhat.com>
11758
11759 PR target/84564
11760 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
11761 regparm >= 3 with no arg reg available also for calls with
11762 flag_force_indirect_call. Pass decl to ix86_function_regparm.
11763
11764 PR target/84524
11765 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
11766 orig,vex.
11767 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
11768
11769 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
11770
11771 PR target/84264
11772 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
11773
11774 2018-03-05 Richard Biener <rguenther@suse.de>
11775
11776 PR tree-optimization/84486
11777 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
11778 When inserting a __builtin_assume_aligned call set the LHS
11779 SSA name alignment info accordingly.
11780
11781 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
11782
11783 PR tree-optimization/84114
11784 * config/aarch64/aarch64.c (aarch64_reassociation_width)
11785 Avoid reassociation of FLOAT_MODE addition.
11786
11787 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
11788
11789 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
11790 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
11791 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
11792 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
11793 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
11794 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
11795 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
11796 and -mwbnoinvd.
11797 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
11798 __builtin_ia32_wbinvd): New builtins.
11799 (SPECIAL_ARGS2): New.
11800 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
11801 (SPECIAL_ARGS2): New.
11802 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
11803 (ix86_valid_target_attribute_inner_p): Ditto.
11804 (ix86_init_mmx_sse_builtins): Add special_args2.
11805 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
11806 TARGET_WBNOINVD_P): New.
11807 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
11808 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
11809 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
11810 * config/i386/immintrin.h (_wbinvd): New intrinsic.
11811 * config/i386/pconfigintrin.h: New file.
11812 * config/i386/wbnoinvdintrin.h: Ditto.
11813 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
11814 wbnoinvdintrin.h.
11815 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
11816
11817 2018-03-05 Richard Biener <rguenther@suse.de>
11818
11819 PR tree-optimization/84670
11820 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11821 member.
11822 (BB_VISITED_WITH_VISITED_SUCCS): New define.
11823 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11824 (compute_antic_aux): Only assert the number of values in ANTIC_IN
11825 doesn't grow if all successors (recursively) were visited at least
11826 once.
11827
11828 2018-03-05 Richard Biener <rguenther@suse.de>
11829
11830 PR tree-optimization/84650
11831 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
11832 if executed in the loop pipeline.
11833
11834 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
11835
11836 * doc/configfiles.texi (Configuration Files): Move info about
11837 conditionalizing $target-protos.h to...
11838 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
11839 differs from $target-protos.h.
11840
11841 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
11842 Chung-Ju Wu <jasonwucj@gmail.com>
11843
11844 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
11845 * config/nds32/nds32-multiple.md (setmemsi): Define.
11846 * config/nds32/nds32-memory-manipulation.c
11847 (nds32_gen_dup_4_byte_to_word_value): New.
11848 (emit_setmem_word_loop): New.
11849 (emit_setmem_byte_loop): New.
11850 (nds32_expand_setmem_loop): New.
11851 (nds32_expand_setmem_loop_v3m): New.
11852 (nds32_expand_setmem_unroll): New.
11853 (nds32_expand_setmem): New.
11854
11855 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
11856 Chung-Ju Wu <jasonwucj@gmail.com>
11857
11858 * config/nds32/nds32-memory-manipulation.c
11859 (nds32_emit_load_store): New.
11860 (nds32_emit_post_inc_load_store): New.
11861 (nds32_emit_mem_move): New.
11862 (nds32_emit_mem_move_block): New.
11863 (nds32_expand_movmemsi_loop_unknown_size): New.
11864 (nds32_expand_movmemsi_loop_known_size): New.
11865 (nds32_expand_movmemsi_loop): New.
11866 (nds32_expand_movmemsi_unroll): New.
11867 (nds32_expand_movmemqi): Rename ...
11868 (nds32_expand_movmemsi): ... to this.
11869 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
11870 (movmemsi): ... to this.
11871 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
11872 (nds32_expand_movmemsi): ... to this.
11873
11874 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
11875 Monk Chiang <sh.chiang04@gmail.com>
11876 Chung-Ju Wu <jasonwucj@gmail.com>
11877
11878 * config/nds32/nds32-protos.h
11879 (nds32_expand_load_multiple): New arguments.
11880 (nds32_expand_store_multiple): Ditto.
11881 (nds32_valid_multiple_load_store): Rename ...
11882 (nds32_valid_multiple_load_store_p): ... to this.
11883 * config/nds32/nds32-memory-manipulation.c
11884 (nds32_expand_load_multiple): Refine implementation.
11885 (nds32_expand_store_multiple): Ditto.
11886 * config/nds32/nds32-multiple.md
11887 (load_multiple): Update nds32_expand_load_multiple interface.
11888 (store_multiple): Update nds32_expand_store_multiple interface.
11889 * config/nds32/nds32-predicates.c
11890 (nds32_valid_multiple_load_store): Rename ...
11891 (nds32_valid_multiple_load_store_p): ... to this and refine
11892 implementation.
11893 * config/nds32/predicates.md
11894 (nds32_load_multiple_and_update_address_operation): New predicate.
11895 (nds32_store_multiple_and_update_address_operation): New predicate.
11896
11897 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
11898 Chung-Ju Wu <jasonwucj@gmail.com>
11899
11900 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
11901 (combo): New attribute.
11902 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
11903
11904 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
11905
11906 * config/nds32/nds32.opt: Change -mcmodel= default value.
11907
11908 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
11909 Monk Chiang <sh.chiang04@gmail.com>
11910 Chung-Ju Wu <jasonwucj@gmail.com>
11911
11912 * config/nds32/constants.md (unspec_element): New enum.
11913 * config/nds32/constraints.md (Umw): New constraint.
11914 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
11915 * config/nds32/nds32-intrinsic.md: Likewise.
11916 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
11917 (nds32_valid_smw_lwm_base_p): New.
11918 (nds32_output_smw_single_word): New.
11919 (nds32_output_lmw_single_word): New.
11920 (nds32_expand_unaligned_load): New.
11921 (nds32_expand_unaligned_store): New.
11922 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
11923 (nds32_output_smw_single_word): Declare.
11924 (nds32_output_lmw_single_word): Declare.
11925 (nds32_expand_unaligned_load): Declare.
11926 (nds32_expand_unaligned_store): Declare.
11927 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
11928 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
11929 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
11930 NDS32_BUILTIN_UASTORE_DW.
11931 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
11932 predicate.
11933
11934 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
11935 Kito Cheng <kito.cheng@gmail.com>
11936 Chung-Ju Wu <jasonwucj@gmail.com>
11937
11938 * config/nds32/nds32-intrinsic.c
11939 (nds32_expand_builtin_null_ftype_reg): Delete.
11940 (nds32_expand_builtin_reg_ftype_imm): Ditto.
11941 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
11942 (nds32_read_argument): New.
11943 (nds32_legitimize_target): Ditto.
11944 (nds32_legitimize_argument): Ditto.
11945 (nds32_check_constant_argument): Ditto.
11946 (nds32_expand_unop_builtin): Ditto.
11947 (nds32_expand_unopimm_builtin): Ditto.
11948 (nds32_expand_binop_builtin): Ditto.
11949 (nds32_builtin_decl_impl): Ditto.
11950 (builtin_description): Ditto.
11951 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
11952 (nds32_init_builtins_impl): Ditto.
11953 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
11954 (nds32_builtin_decl): New.
11955 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
11956 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
11957
11958 2018-03-02 Jeff Law <law@redhat.com>
11959
11960 * reorg.c (stop_search_p): Handle DEBUG_INSN.
11961 (redundant_insn, fill_simple_delay_slots): Likewise.
11962 (fill_slots_from_thread): Likewise.
11963 * resource.c (mark_referenced_resources): Likewise.
11964 (mark_set_resources, find_dead_or_set_registers): Likewise.
11965
11966 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11967
11968 * substring-locations.h (format_warning_va): Formatting fix for
11969 ATTRIBUTE_GCC_DIAG.
11970 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
11971 argument.
11972 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
11973 * substring-locations.c: Include intl.h.
11974 (format_warning_va): Turned into small wrapper around
11975 format_warning_n_va, renamed to ...
11976 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
11977 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
11978 use ngettext.
11979 (format_warning_at_substring_n): New function.
11980 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
11981 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
11982 format_warning_at_substring with just a shorter name instead of
11983 const function pointer.
11984 (fmtwarn_n): New function.
11985 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
11986 appropriate, get rid of all the fmtstr temporaries, move conditionals
11987 with G_() wrapped string literals directly into fmtwarn arguments,
11988 cast dir.len to (int), formatting fixes.
11989
11990 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
11991
11992 * doc/invoke.texi: Remove "Cilk Plus" references.
11993
11994 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11995 Richard Biener <rguenther@suse.de>
11996
11997 PR ipa/84628
11998 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
11999 for error or warning attributes if CALL_FROM_THUNK_P is set.
12000 Formatting fixes.
12001
12002 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12003
12004 PR target/56540
12005 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
12006 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
12007
12008 PR target/56540
12009 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
12010 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
12011
12012 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
12013 instead of -1U in last predictors element's probability member.
12014
12015 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
12016
12017 PR ipa/83983
12018 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12019 arguments if they are comparable.
12020
12021 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
12022
12023 PR tree-optimization/84634
12024 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
12025 masks and masked_loop_p with a single loop_masks, making sure it's
12026 null for bb vectorization.
12027
12028 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
12029
12030 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12031 (vect_analyze_data_ref_access): Use loop->safe_len rather than
12032 loop->force_vectorize to check whether there is no alias.
12033
12034 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12035
12036 PR target/84614
12037 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
12038 prototypes.
12039 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
12040 comments.
12041 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
12042 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
12043 instead of a loop around prev_real_insn.
12044 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
12045 prev_real_insn.
12046
12047 PR inline-asm/84625
12048 * config/i386/i386.c (ix86_print_operand): Use conditional
12049 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
12050 zero vector.
12051
12052 2018-03-02 Richard Biener <rguenther@suse.de>
12053
12054 PR tree-optimization/84427
12055 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
12056 (bitmap_set_subtract_values): Rewrite to handle multiple
12057 exprs per value.
12058 (clean): Likewise.
12059 (prune_clobbered_mems): Likewise.
12060 (phi_translate): Take edge instead of pred/phiblock.
12061 (phi_translate_1): Likewise.
12062 (phi_translate_set): Likewise. Insert all translated
12063 exprs for a value into the set, keeping possibly multiple
12064 expressions per value.
12065 (compute_antic_aux): Adjust for phi_translate changes.
12066 When intersecting union the expressions and prune those
12067 not in the final value set, keeping possibly multiple
12068 expressions per value. Do not use value-insertion
12069 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
12070 all expressions. Add verification that the value-sets
12071 only shrink during iteration.
12072 (compute_partial_antic_aux): Adjust for the phi_translate changes.
12073 (do_pre_regular_insertion): Likewise.
12074 (do_pre_partial_partial_insertion): Likewise.
12075
12076 2018-03-02 Richard Biener <rguenther@suse.de>
12077
12078 PR target/82005
12079 * config/darwin.c (saved_debug_info_level): New static global.
12080 (darwin_asm_lto_start): Disable debug info generation for LTO out.
12081 (darwin_asm_lto_end): Restore debug info generation settings.
12082
12083 2018-03-01 Martin Liska <mliska@suse.cz>
12084
12085 PR sanitizer/82484
12086 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
12087 volatile arguments.
12088
12089 2018-03-01 Richard Biener <rguenther@suse.de>
12090
12091 PR debug/84645
12092 * dwarf2out.c (gen_variable_die): Properly handle late VLA
12093 type annotation with LTO when debug was disabled at compile-time.
12094
12095 2018-03-01 Matthew Fortune <mfortune@gmail.com>
12096
12097 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
12098 XINT with INTVAL.
12099 (mips_final_postscan_insn): Likewise.
12100
12101 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
12102
12103 PR rtl-optimization/84528
12104 * alias.c (init_alias_target): Add commentary.
12105 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
12106 a unique base value if the frame pointer is not eliminated
12107 to the stack pointer.
12108
12109 2018-03-01 Tom de Vries <tom@codesourcery.com>
12110
12111 PR rtl-optimization/83327
12112 * lra-int.h (hard_regs_spilled_into): Declare.
12113 * lra.c (hard_regs_spilled_into): Define.
12114 (init_reg_info): Init hard_regs_spilled_into.
12115 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
12116 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
12117 (process_bb_lives): Handle hard_regs_spilled_into.
12118 (lra_create_live_ranges_1): Before doing liveness propagation, clear
12119 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
12120
12121 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
12122
12123 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
12124 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
12125 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
12126 * config/rs6000/aix72.h: New file.
12127
12128 2018-02-28 Jakub Jelinek <jakub@redhat.com>
12129
12130 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
12131 instead of warning_at with conditional singular and plural messages
12132 where possible.
12133
12134 PR target/52991
12135 * stor-layout.c (update_alignment_for_field): For
12136 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
12137 && !DECL_PACKED (field), do the alignment update, just use
12138 only desired_align instead of MAX (type_align, desired_align)
12139 as the alignment.
12140 (place_field): Don't do known_align < desired_align handling
12141 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
12142 is non-NULL, instead do it after rli->prev_field handling and
12143 only if not within a bitfield word. For DECL_PACKED (field)
12144 use type_align of BITS_PER_UNIT.
12145
12146 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
12147
12148 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
12149 superfluous parentheses and trailing spaces.
12150
12151 2018-02-28 Richard Biener <rguenther@suse.de>
12152
12153 PR tree-optimization/84584
12154 * graphite-scop-detection.c (scop_detection::add_scop): Discard
12155 SCoPs with fake exit edge.
12156
12157 2018-02-28 Martin Liska <mliska@suse.cz>
12158
12159 PR testsuite/84597
12160 * timevar.c (timer::print): Fix format to properly print 100%
12161 values.
12162
12163 2018-02-28 Richard Biener <rguenther@suse.de>
12164
12165 PR middle-end/84607
12166 * genmatch.c (capture_info::walk_match): Do not mark
12167 captured expressions without operands as expr_p given
12168 they act more like predicates and should be subject to
12169 "lost tail" side-effect preserving.
12170
12171 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
12172
12173 PR rtl-optimization/81611
12174 * auto-inc-dec.c (attempt_change): Move dead note from
12175 mem_insn if it's the next use of regno
12176 (find_address): Take address use of reg holding
12177 non-incremented value. Add parm to limit search to the named
12178 reg only.
12179 (merge_in_block): Attempt to use a mem insn that is the next
12180 use of the original regno.
12181
12182 2018-02-27 Martin Sebor <msebor@redhat.com>
12183
12184 PR c++/83871
12185 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
12186 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
12187
12188 2018-02-27 Martin Sebor <msebor@redhat.com>
12189
12190 PR translation/84207
12191 * diagnostic-core.h (warning_n, error_n, inform_n): Change
12192 n argument to unsigned HOST_WIDE_INT.
12193 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
12194 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
12195 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
12196 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
12197
12198 2018-02-27 Richard Biener <rguenther@suse.de>
12199
12200 PR tree-optimization/84512
12201 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
12202 Do not use the estimate returned from record_stmt_cost for
12203 the scalar iteration cost but sum properly using add_stmt_cost.
12204
12205 2018-02-27 Richard Biener <rguenther@suse.de>
12206
12207 PR tree-optimization/84466
12208 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12209 Adjust last change to less strictly validate use operands.
12210
12211 2018-02-27 Martin Liska <mliska@suse.cz>
12212
12213 PR gcov-profile/84548
12214 * gcov.c (process_file): Allow partial overlap and consider it
12215 also as group functions.
12216 (output_lines): Properly calculate range of lines for a group.
12217
12218 2018-02-27 Martin Liska <mliska@suse.cz>
12219
12220 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
12221 'ggc' suffixes. Change first column width.
12222 (timer::print): Fix formatting of the column.
12223
12224 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
12225
12226 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
12227 preserve inline entry blocks for the sake of debug inline
12228 entry point markers alone.
12229 (remove_unused_locals): Suggest in comments a better place to
12230 force the preservation of inline entry blocks that are
12231 otherwise unused, but do not preserve them.
12232
12233 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12234
12235 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
12236
12237 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12238
12239 PR target/84039
12240 * config/i386/constraints.md (Bs): Replace
12241 ix86_indirect_branch_register with
12242 TARGET_INDIRECT_BRANCH_REGISTER.
12243 (Bw): Likewise.
12244 * config/i386/i386.md (indirect_jump): Likewise.
12245 (tablejump): Likewise.
12246 (*sibcall_memory): Likewise.
12247 (*sibcall_value_memory): Likewise.
12248 Peepholes of indirect call and jump via memory: Likewise.
12249 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
12250 (*sibcall_value_GOT_32): Likewise.
12251 * config/i386/predicates.md (indirect_branch_operand): Likewise.
12252 (GOT_memory_operand): Likewise.
12253 (call_insn_operand): Likewise.
12254 (sibcall_insn_operand): Likewise.
12255 (GOT32_symbol_operand): Likewise.
12256 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
12257
12258 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12259
12260 PR rtl-optimization/83496
12261 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
12262 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
12263 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
12264 redundant insn, if any.
12265 (relax_delay_slots): Likewise.
12266 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
12267
12268 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
12269
12270 PR tree-optimization/83965
12271 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
12272 that grouped statements are part of a reduction chain. Return
12273 true if the statement is not marked as a reduction itself but
12274 is part of a group.
12275 (vect_recog_dot_prod_pattern): Don't check whether the statement
12276 is part of a group here.
12277 (vect_recog_sad_pattern): Likewise.
12278 (vect_recog_widen_sum_pattern): Likewise.
12279
12280 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12281
12282 PR debug/84545
12283 * final.c (rest_of_clean_state): Also look for calls inside sequences.
12284
12285 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12286
12287 PR target/84530
12288 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
12289 the bool argument.
12290 (ix86_output_indirect_function_return): New prototype.
12291 (ix86_split_simple_return_pop_internal): Likewise.
12292 * config/i386/i386.c (indirect_return_via_cx): New.
12293 (indirect_return_via_cx_bnd): Likewise.
12294 (indirect_thunk_name): Handle return va CX_REG.
12295 (output_indirect_thunk_function): Create alias for
12296 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
12297 (ix86_output_indirect_jmp): Remove the bool argument.
12298 (ix86_output_indirect_function_return): New function.
12299 (ix86_split_simple_return_pop_internal): Likewise.
12300 * config/i386/i386.md (*indirect_jump): Don't pass false
12301 to ix86_output_indirect_jmp.
12302 (*tablejump_1): Likewise.
12303 (simple_return_pop_internal): Change it to define_insn_and_split.
12304 Call ix86_split_simple_return_pop_internal to split it for
12305 -mfunction-return=.
12306 (simple_return_indirect_internal): Call
12307 ix86_output_indirect_function_return instead of
12308 ix86_output_indirect_jmp.
12309
12310 2018-02-26 Jakub Jelinek <jakub@redhat.com>
12311
12312 PR bootstrap/84405
12313 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
12314 memset and value initialization afterwards.
12315
12316 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
12317
12318 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
12319
12320 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12321
12322 PR target/84521
12323 * common/config/aarch64/aarch64-common.c
12324 (aarch_option_optimization_table[]): Switch
12325 off fomit-frame-pointer
12326
12327 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
12328 Chung-Ju Wu <jasonwucj@gmail.com>
12329
12330 * config/nds32/nds32-multiple.md (load_multiple): Disallow
12331 volatile memory.
12332 (store_multiple): Ditto.
12333
12334 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
12335
12336 * config.gcc: Add --with-cpu support for nds32 target.
12337 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
12338 * config/nds32/nds32.opt: Add -mcpu= option.
12339
12340 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
12341
12342 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
12343 isel=yes): Warn for these deprecated options.
12344
12345 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
12346
12347 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
12348 ISA_2_5_MASKS_EMBEDDED.
12349
12350 2018-02-23 Jakub Jelinek <jakub@redhat.com>
12351
12352 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
12353 p->max as pointers rather than using iterative_hash_expr.
12354
12355 2018-02-23 Carl Love <cel@us.ibm.com>
12356
12357 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
12358 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
12359 BU_P8V_OVERLOAD_2.
12360 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
12361 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
12362 P8V_BUILTIN_VEC_VUNSIGNED2.
12363
12364 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
12365
12366 PR target/81572
12367 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
12368 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
12369 LRA_UNKNOWN_ALT.
12370 * lra-constraints.c (curr_insn_transform): Set up
12371 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
12372 LRA_UNKNOWN_ALT.
12373 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
12374 * lra-eliminations.c (spill_pseudos): Ditto.
12375 (process_insn_for_elimination): Ditto.
12376 * lra-lives.c (reg_early_clobber_p): Use the new macros.
12377 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
12378 LRA_NON_CLOBBERED_ALT.
12379
12380 2018-02-22 Martin Sebor <msebor@redhat.com>
12381
12382 PR tree-optimization/84480
12383 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
12384 to maybe_diag_stxncpy_trunc. Call it.
12385 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
12386 from gimple_fold_builtin_strcpy. Print inlining stack.
12387 (handle_builtin_stxncpy): Print inlining stack.
12388 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
12389
12390 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
12391
12392 PR target/84176
12393 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
12394 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
12395 and -fcheck-pointer-bounds are used together.
12396 (indirect_thunk_prefix): New enum.
12397 (indirect_thunk_need_prefix): New function.
12398 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
12399 "_nt" instead of "_bnd" for NOTRACK prefix.
12400 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
12401 (output_indirect_thunk_function): Likewise.
12402 (): Likewise.
12403 (ix86_code_end): Update output_indirect_thunk_function calls.
12404 (ix86_output_indirect_branch_via_reg): Replace
12405 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
12406 (ix86_output_indirect_branch_via_push): Likewise.
12407 (ix86_output_function_return): Likewise.
12408 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
12409 incompatible with -fcf-protection=branch and
12410 -fcheck-pointer-bounds.
12411
12412 2018-02-22 Steve Ellcey <sellcey@cavium.com>
12413
12414 PR target/83335
12415 * config/aarch64/aarch64.c (aarch64_print_address_internal):
12416 Change gcc_assert call to output_operand_lossage.
12417
12418 2018-02-22 Steve Ellcey <sellcey@cavium.com>
12419
12420 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
12421
12422 2018-02-22 DJ Delorie <dj@redhat.com>
12423 Sebastian Perta <sebastian.perta@renesas.com>
12424 Oleg Endo <olegendo@gcc.gnu.org>
12425
12426 * config/rx/rx.c (rx_rtx_costs): New function.
12427 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
12428
12429 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
12430
12431 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
12432
12433 2018-02-22 Martin Liska <mliska@suse.cz>
12434
12435 PR driver/83193
12436 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
12437 Add "native" as a possible value.
12438
12439 2018-02-22 Martin Liska <mliska@suse.cz>
12440
12441 PR driver/83193
12442 * config/i386/i386.c (ix86_option_override_internal):
12443 Add "native" as a possible value for -march and -mtune.
12444
12445 2018-02-22 Jakub Jelinek <jakub@redhat.com>
12446
12447 PR target/84502
12448 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
12449 to all type variants.
12450
12451 PR tree-optimization/84503
12452 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
12453 width as info->bitpos + info->bitsize - start.
12454 (merged_store_group::merge_overlapping): Simplify width computation.
12455 (check_no_overlap): New function.
12456 (imm_store_chain_info::try_coalesce_bswap): Compute expected
12457 start + width and last_order of the group, fail if check_no_overlap
12458 fails.
12459 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
12460 to group if check_no_overlap fails.
12461
12462 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
12463
12464 * config/rs6000/altivec.md: Delete contraint arguments to
12465 define_expand, define_split, and define_peephole2, and in
12466 define_insn_and_split if always unused.
12467 * config/rs6000/darwin.md: Ditto.
12468 * config/rs6000/dfp.md: Ditto.
12469 * config/rs6000/rs6000.md: Ditto.
12470 * config/rs6000/sync.md: Ditto.
12471 * config/rs6000/vector.md: Ditto.
12472 * config/rs6000/vsx.md: Ditto.
12473
12474 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
12475
12476 * config/rs6000/altivec.md: Write output control strings as braced
12477 blocks instead of double-quoted strings.
12478 * config/rs6000/darwin.md: Ditto.
12479 * config/rs6000/rs6000.md: Ditto.
12480 * config/rs6000/vector.md: Ditto.
12481 * config/rs6000/vsx.md: Ditto.
12482
12483 2018-02-21 Jason Merrill <jason@redhat.com>
12484
12485 PR c++/84314 - ICE with templates and fastcall attribute.
12486 * attribs.c (build_type_attribute_qual_variant): Remove assert.
12487
12488 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
12489
12490 * ipa-cp.c (determine_versionability): Fix comment typos.
12491
12492 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
12493
12494 PR c/84229
12495 * ipa-cp.c (determine_versionability): Do not version functions caling
12496 va_arg_pack.
12497
12498 2018-02-21 Martin Liska <mliska@suse.cz>
12499
12500 PR driver/83193
12501 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
12502 Add "native" as a possible value.
12503 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
12504 the macro when native cpu detection is available.
12505
12506 2018-02-21 Martin Liska <mliska@suse.cz>
12507
12508 PR driver/83193
12509 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
12510 Add "native" as a possible value.
12511 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
12512 when native cpu detection is available.
12513
12514 2018-02-21 Jakub Jelinek <jakub@redhat.com>
12515 Martin Sebor <msebor@redhat.com>
12516
12517 PR tree-optimization/84478
12518 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
12519 false.
12520 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
12521 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
12522 support which is conservatively correct, for 2 only stay conservative
12523 for maxlen. Formatting and comment capitalization fixes. Add STRICT
12524 argument to the 2 argument get_range_strlen, adjust 6 arg
12525 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
12526 false.
12527 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
12528 (gimple_fold_builtin_strlen): Pass true as last argument to
12529 get_range_strlen.
12530
12531 2018-02-20 Martin Sebor <msebor@redhat.com>
12532
12533 PR middle-end/84095
12534 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
12535 (builtin_memref::set_base_and_offset): Same. Handle inner references.
12536 (builtin_memref::builtin_memref): Factor out parts into
12537 set_base_and_offset and call it.
12538
12539 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
12540
12541 PR middle-end/84406
12542 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
12543 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
12544 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
12545 search at the associated MODE_INT.
12546
12547 2018-02-20 Jeff Law <law@redhat.com>
12548
12549 PR middle-end/82123
12550 PR tree-optimization/81592
12551 PR middle-end/79257
12552 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
12553 for range data rather than using global data.
12554 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
12555 range data rather than using global data.
12556 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
12557 pass it to children as needed.
12558 (struct directive::fmtresult): Similarly.
12559 (struct directive::set_width): Similarly.
12560 (struct directive::set_precision): Similarly.
12561 (format_integer, format_directive, parse_directive): Similarly.
12562 (format_none): Accept unnamed vr_values parameter.
12563 (format_percent, format_floating, format_character): Similarly.
12564 (format_string, format_plain): Similarly.
12565 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
12566 the EVRP range analyzer for range data rather than using global data.
12567 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
12568 gimple-ssa-evrp-analyze.h
12569 (class sprintf_dom_walker): Add after_dom_children member function.
12570 Add evrp_range_analyzer member.
12571 (sprintf_dom_walker::before_dom_children): Call into the EVRP
12572 range analyzer as needed.
12573 (sprintf_dom_walker::after_dom_children): New member function.
12574 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
12575 if not optimizing.
12576 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
12577 (evrp_range_analyzer::pop_to_marker): Likewise.
12578
12579 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
12580
12581 PR tree-optimization/84419
12582 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
12583 with the required type if its current type is compatible but
12584 different.
12585
12586 2018-02-20 Jakub Jelinek <jakub@redhat.com>
12587
12588 PR middle-end/82004
12589 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
12590 after vectorization.
12591
12592 2018-02-20 Martin Liska <mliska@suse.cz>
12593
12594 PR driver/83193
12595 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
12596 possible values if we don't have a hint.
12597
12598 2018-02-20 Martin Liska <mliska@suse.cz>
12599
12600 PR c/84310
12601 PR target/79747
12602 * final.c (shorten_branches): Build align_tab array with one
12603 more element.
12604 * opts.c (finish_options): Add alignment option limit check.
12605 (MAX_CODE_ALIGN): Likewise.
12606 (MAX_CODE_ALIGN_VALUE): Likewise.
12607 * doc/invoke.texi: Document maximum allowed option value for
12608 all -falign-* options.
12609
12610 2018-02-19 Jakub Jelinek <jakub@redhat.com>
12611
12612 PR target/84146
12613 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
12614 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
12615 * var-tracking.c (emit_note_insn_var_location): Remove all references
12616 to NOTE_INSN_CALL_ARG_LOCATION.
12617 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
12618 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
12619 Use copy_rtx_if_shared.
12620 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
12621 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
12622 (dwarf2out_var_location): Remove handling of
12623 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
12624 on call_insn.
12625 * final.c (final_scan_insn): Remove all references to
12626 NOTE_INSN_CALL_ARG_LOCATION.
12627 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
12628 before dumping final insns.
12629 * except.c (emit_note_eh_region_end): Remove all references to
12630 NOTE_INSN_CALL_ARG_LOCATION.
12631 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
12632 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
12633 * config/arc/arc.c (hwloop_optimize): Likewise.
12634 * config/arm/arm.c (create_fix_barrier): Likewise.
12635 * config/s390/s390.c (s390_chunkify_start): Likewise.
12636 * config/sh/sh.c (find_barrier): Likewise.
12637 * config/i386/i386.c (rest_of_insert_endbranch,
12638 ix86_seh_fixup_eh_fallthru): Likewise.
12639 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
12640 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
12641 * config/frv/frv.c (frv_function_prologue): Likewise.
12642 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
12643 reg note.
12644 (note_outside_basic_block_p): Remove all references to
12645 NOTE_INSN_CALL_ARG_LOCATION.
12646 * gengtype.c (adjust_field_rtx_def): Likewise.
12647 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
12648 Likewise.
12649 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
12650 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
12651
12652 PR c++/84444
12653 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
12654 is ADDR_EXPR.
12655
12656 PR tree-optimization/84452
12657 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
12658 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
12659 is NULL.
12660
12661 2018-02-19 Martin Liska <mliska@suse.cz>
12662
12663 PR sanitizer/82183
12664 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
12665
12666 2018-02-19 Martin Liska <mliska@suse.cz>
12667 Richard Sandiford <richard.sandiford@linaro.org>
12668
12669 PR tree-optimization/82491
12670 * gimple-fold.c (get_base_constructor): Make earlier bail out
12671 to prevent ubsan.
12672
12673 2018-02-19 Carl Love <cel@us.ibm.com>
12674
12675 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
12676 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
12677 BU_P8V_OVERLOAD_1.
12678 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
12679 P8V_BUILTIN_VEC_NEG.
12680
12681 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
12682
12683 * config/rl78/rl78.md (movdf): New define expand.
12684
12685 2018-02-19 Martin Liska <mliska@suse.cz>
12686
12687 PR other/80589
12688 * doc/invoke.texi: Fix typo.
12689 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
12690
12691 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
12692
12693 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
12694 handle rs6000_single_float and rs6000_double_float specially for
12695 e500 family CPUs.
12696
12697 2018-02-16 Jeff Law <law@redhat.com>
12698
12699 * config/rx/rx.c (add_pop_cfi_notes): New function.;
12700 (pop_regs): Use it.
12701
12702 2018-02-16 Jakub Jelinek <jakub@redhat.com>
12703
12704 PR ipa/84425
12705 * ipa-inline.c (inline_small_functions): Fix a typo.
12706
12707 2018-02-16 Nathan Sidwell <nathan@acm.org>
12708
12709 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
12710
12711 2018-02-16 Carl Love <cel@us.ibm.com>
12712
12713 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
12714 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
12715 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
12716 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
12717 expansion to P8V_BUILTIN_VEC_FLOAT2.
12718
12719 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
12720
12721 PR rtl-optimization/70023
12722 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
12723 src_regno into account.
12724
12725 2018-02-16 Carl Love <cel@us.ibm.com>
12726
12727 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
12728 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
12729 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
12730 * config/rs6000/rs6000.c: Remove case statements for
12731 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
12732 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
12733 and P9V_BUILTIN_VEC_VINSERT4B.
12734 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
12735 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
12736 * config/rs6000/vsx.md:
12737 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
12738 vec_insert4b.
12739
12740 2018-02-16 Carl Love <cel@us.ibm.com>
12741
12742 * config/rs6000/altivec.h: Add builtin names vec_extract4b
12743 vec_insert4b.
12744 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
12745 definitions.
12746 * config/rs6000/rs6000-c.c: Add the definitions for
12747 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
12748 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
12749 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
12750 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
12751 definition for insert4b and define insn *insert3b_internal.
12752 * doc/extend.texi: Add documentation for vec_extract4b.
12753
12754 2018-02-16 Nathan Sidwell <nathan@acm.org>
12755
12756 * doc/extend.texi (Backwards Compatibility): Mention friend
12757 injection. Note for-scope is deprecated.
12758 * doc/invoke.texi (-ffriend-injection): Deprecate.
12759
12760 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
12761
12762 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
12763 that moved to I2, also allow destinations that are a paradoxical
12764 subreg (instead of a normal reg).
12765
12766 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
12767
12768 PR target/83831
12769 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
12770 to QImode.
12771
12772 2018-02-16 Richard Biener <rguenther@suse.de>
12773
12774 PR tree-optimization/84037
12775 PR tree-optimization/84016
12776 PR target/82862
12777 * config/i386/i386.c (ix86_builtin_vectorization_cost):
12778 Adjust vec_construct for the fact we need additional higher latency
12779 128bit inserts for AVX256 and AVX512 vector builds.
12780 (ix86_add_stmt_cost): Scale vector construction cost for
12781 elementwise loads.
12782
12783 2018-02-16 Richard Biener <rguenther@suse.de>
12784
12785 PR tree-optimization/84417
12786 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
12787 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
12788 (non_rewritable_lvalue_p): Likewise, use poly-ints.
12789
12790 2018-02-16 Martin Liska <mliska@suse.cz>
12791
12792 PR sanitizer/84307
12793 * internal-fn.def (ASAN_CHECK): Set proper flags.
12794 (ASAN_MARK): Likewise.
12795
12796 2018-02-16 Julia Koval <julia.koval@intel.com>
12797
12798 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
12799 from PTA_CANNONLAKE.
12800
12801 2018-02-16 Jakub Jelinek <jakub@redhat.com>
12802
12803 PR target/84272
12804 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
12805 Use ++iter rather than iter++ for std::list iterators.
12806 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
12807 defer deleting them until all nodes in the forest are processed. Do
12808 free even leaf nodes. Change to_process into auto_vec.
12809
12810 PR bootstrap/84405
12811 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
12812 * vec.h (vec_default_construct): Use memset instead of placement new
12813 if BROKEN_VALUE_INITIALIZATION is defined.
12814 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
12815 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
12816 is defined.
12817
12818 PR rtl-optimization/83723
12819 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
12820 * lra.c (lra_substitute_pseudo): Likewise. If true, use
12821 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
12822 recursive calls.
12823 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
12824 callers.
12825 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
12826
12827 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
12828
12829 PR rtl-optimization/81443
12830 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
12831 from inner REGs to paradoxical SUBREGs.
12832
12833 2018-02-16 Richard Biener <rguenther@suse.de>
12834
12835 PR tree-optimization/84399
12836 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12837 For operands we can analyze at their definition make sure we can
12838 analyze them at each use as well.
12839
12840 2018-02-16 Richard Biener <rguenther@suse.de>
12841
12842 PR tree-optimization/84190
12843 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
12844 volatile accesses if the decl isn't volatile.
12845
12846 2018-02-15 Jason Merrill <jason@redhat.com>
12847
12848 PR c++/84314 - ICE with templates and fastcall attribute.
12849 * attribs.c (build_type_attribute_qual_variant): Don't clobber
12850 TYPE_CANONICAL on an existing type.
12851
12852 2018-02-15 Jakub Jelinek <jakub@redhat.com>
12853
12854 PR tree-optimization/84383
12855 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
12856 dstoff nor call operand_equal_p if dstbase is NULL.
12857
12858 PR tree-optimization/84334
12859 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
12860 also a CONSTANT_CLASS_P, punt.
12861
12862 2018-02-14 Jim Wilson <jimw@sifive.com>
12863
12864 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
12865 first SMALL_OPERAND check. New local min_second_step. Move assert
12866 to where locals are set. Add TARGET_RVC support.
12867 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
12868
12869 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
12870
12871 * doc/invoke.texi: Correct -Wformat-overflow code sample.
12872
12873 2018-02-14 Martin Sebor <msebor@redhat.com>
12874
12875 PR tree-optimization/83698
12876 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
12877 arrays constrain the offset range to their bounds.
12878 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
12879 (builtin_access::overlap): Avoid setting the size of overlap if it's
12880 already been set.
12881 (maybe_diag_overlap): Also consider arrays when deciding what values
12882 of offsets to include in diagnostics.
12883
12884 2018-02-14 Martin Sebor <msebor@redhat.com>
12885
12886 PR c/84108
12887 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
12888 that correspond to the kind of a declaration.
12889
12890 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
12891
12892 PR target/83984
12893 * config/pa/pa.md: Load address of PIC label using the linkage table
12894 if the label is nonlocal.
12895
12896 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
12897
12898 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
12899 warning message if user requests -maltivec=be.
12900 * doc/invoke.texi: Document deprecation of -maltivec=be.
12901
12902 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
12903
12904 PR target/84220
12905 * config/rs6000/rs6000-c.c: Update definitions for
12906 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
12907 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
12908
12909 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
12910
12911 PR target/84239
12912 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
12913 add _get_ssp intrinsics. Remove argument from
12914 __builtin_ia32_rdssp[d|q].
12915 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
12916 * config/i386/i386-builtin.def: Remove argument from
12917 __builtin_ia32_rdssp[d|q].
12918 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
12919 ix86_expand_special_args_builtin for _rdssp[d|q].
12920 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
12921 Clear register before usage.
12922 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
12923 Add documentation for new _get_ssp and _inc_ssp intrinsics.
12924
12925 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
12926
12927 PR tree-optimization/84357
12928 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
12929 operand 1 of an ARRAY_REF too.
12930
12931 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
12932
12933 PR target/83831
12934 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
12935 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12936 declarations.
12937 (set_of_reg): New struct.
12938 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
12939 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
12940 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12941 functions.
12942 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
12943 Split into bitclr, bitset, bitinvert patterns if appropriate.
12944 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
12945 use rx_fuse_in_memory_bitop.
12946 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
12947 to named insn, correct maximum insn length.
12948
12949 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
12950
12951 PR target/79242
12952 * machmode.def: Define a complex mode for PARTIAL_INT.
12953 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
12954 MODE_PARTIAL_INT.
12955 * doc/rtl.texi: Document CSPImode.
12956 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
12957 handling.
12958 (msp430_hard_regno_nregs_with_padding): Likewise.
12959
12960 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
12961
12962 PR target/84279
12963 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
12964
12965 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
12966
12967 PR rtl-optimization/84169
12968 * combine.c (try_combine): New variable split_i2i3. Set it to true if
12969 we generated a parallel as new i3 and we split that to new i2 and i3
12970 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
12971 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
12972 those to i2, not i1. Partially rewrite this scan code.
12973
12974 2018-02-13 Jakub Jelinek <jakub@redhat.com>
12975
12976 PR c/82210
12977 * stor-layout.c (place_field): For variable length fields, adjust
12978 offset_align afterwards not just based on the field's alignment,
12979 but also on the size.
12980
12981 PR middle-end/84309
12982 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
12983 of exps and logs in the use_exp2 case.
12984
12985 2018-02-13 Jeff Law <law@redhat.com>
12986
12987 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
12988 entry for "vector".
12989
12990 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
12991 ARGS as unused.
12992
12993 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
12994
12995 PR debug/84342
12996 PR debug/84319
12997 * common.opt (gas-loc-support, gas-locview-support): New.
12998 (ginline-points, ginternal-reset-location-views): New.
12999 * doc/invoke.texi: Document them. Use @itemx where intended.
13000 (gvariable-location-views): Adjust.
13001 * target.def (reset_location_view): New.
13002 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
13003 (TARGET_RESET_LOCATION_VIEW): New.
13004 * doc/tm.texi: Rebuilt.
13005 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
13006 (dwarf2out_default_as_locview_support): New.
13007 (output_asm_line_debug_info): Use option variables.
13008 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
13009 (output_loc_list): Likewise.
13010 (add_high_low_attributes): Check option variables.
13011 Don't output entry view attribute in strict mode.
13012 (gen_inlined_subroutine_die): Check option variables.
13013 (dwarf2out_inline_entry): Likewise.
13014 (init_sections_and_labels): Likewise.
13015 (dwarf2out_early_finish): Likewise.
13016 (maybe_reset_location_view): New, from...
13017 (dwarf2out_var_location): ... here. Call it.
13018 * debug.h (dwarf2out_default_as_loc_support): Declare.
13019 (dwarf2out_default_as_locview_support): Declare.
13020 * hooks.c (hook_int_rtx_insn_0): New.
13021 * hooks.h (hook_int_rtx_insn_0): Declare.
13022 * toplev.c (process_options): Take -gas-loc-support and
13023 -gas-locview-support from dwarf2out. Enable
13024 -gvariable-location-views by default only with locview
13025 assembler support. Enable -ginternal-reset-location-views by
13026 default only if the target defines the corresponding hook.
13027 Enable -ginline-points by default if location views are
13028 enabled; force it disabled if statement frontiers are
13029 disabled.
13030 * tree-inline.c (expand_call_inline): Check option variables.
13031 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
13032
13033 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
13034
13035 PR tree-optimization/84321
13036 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
13037 handling. Also check whether the anti-range contains any values
13038 that satisfy the mask; switch to a VR_RANGE if not.
13039
13040 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
13041
13042 PR sanitizer/84340
13043 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
13044
13045 2018-02-13 Martin Jambor <mjambor@suse.cz>
13046
13047 PR c++/83990
13048 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
13049 of call statements, also set location of a load to a temporary.
13050
13051 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
13052
13053 * config/rl78/rl78.c (add_vector_labels): New function.
13054 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
13055 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
13056 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
13057 which checks that no arguments are passed.
13058 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
13059 * doc/extend.texi: Documentation for the new attribute.
13060
13061 2018-02-13 Andreas Schwab <schwab@suse.de>
13062
13063 * config/riscv/linux.h (CPP_SPEC): Define.
13064
13065 2018-02-13 Jakub Jelinek <jakub@redhat.com>
13066
13067 PR target/84335
13068 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
13069 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
13070 OPTION_MASK_ISA_AES as first argument to def_builtin_const
13071 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
13072 instead of OPTION_MASK_ISA_PCLMUL as first argument to
13073 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
13074 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
13075 temporarily for AES and PCLMUL builtins.
13076
13077 PR tree-optimization/84339
13078 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
13079 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
13080 Formatting fixes.
13081
13082 PR middle-end/84309
13083 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
13084 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
13085 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
13086 inline function.
13087 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
13088 inline function.
13089 * omp-simd-clone.h: New file.
13090 * omp-simd-clone.c: Include omp-simd-clone.h.
13091 (expand_simd_clones): No longer static.
13092 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
13093 cgraph.h and omp-simd-clone.h.
13094 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
13095 (vect_recog_widen_shift_pattern): Formatting fix.
13096 (vect_pattern_recog_1): Don't check optab for calls.
13097
13098 PR target/84336
13099 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
13100 operands[2] into a REG before using gen_lowpart on it.
13101
13102 2018-02-12 Jeff Law <law@redhat.com>
13103
13104 PR target/83760
13105 * config/sh/sh.c (find_barrier): Consider a sibling call
13106 a barrier as well.
13107
13108 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
13109 successfully back substituting a reg.
13110
13111 2018-02-12 Richard Biener <rguenther@suse.de>
13112
13113 PR tree-optimization/84037
13114 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
13115 parameter, move visited init to caller.
13116 (vect_slp_analyze_operations): Separate cost from validity
13117 check, initialize visited once for all instances.
13118 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
13119 for all instances.
13120 * tree-vect-stmts.c (vect_model_simple_cost): Make early
13121 out an assert.
13122 (vect_model_promotion_demotion_cost): Likewise.
13123 (vectorizable_bswap): Guard cost modeling with !slp_node
13124 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
13125 SLP stmts.
13126 (vectorizable_call): Likewise.
13127 (vectorizable_conversion): Likewise.
13128 (vectorizable_assignment): Likewise.
13129 (vectorizable_shift): Likewise.
13130 (vectorizable_operation): Likewise.
13131 (vectorizable_store): Likewise.
13132 (vectorizable_load): Likewise.
13133 (vectorizable_condition): Likewise.
13134 (vectorizable_comparison): Likewise.
13135
13136 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
13137
13138 PR sanitizer/84307
13139 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
13140 (ASAN_MARK): Fix fnspec to account for return value, change pointer
13141 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
13142
13143 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
13144
13145 PR middle-end/83665
13146 * params.def (inline-min-speedup): Increase from 8 to 15.
13147 (max-inline-insns-auto): Decrease from 40 to 30.
13148 * ipa-split.c (consider_split): Add some buffer for function to
13149 be considered inlining candidate.
13150 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
13151 default values.
13152
13153 2018-02-12 Richard Biener <rguenther@suse.de>
13154
13155 PR tree-optimization/84037
13156 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
13157 matched stmts if we cannot swap the non-matched ones.
13158
13159 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13160
13161 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
13162 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
13163 _mm_maskz_scalef_round_ss): New intrinsics.
13164 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
13165 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
13166 __builtin_ia32_scalefss_round): Remove.
13167 (__builtin_ia32_scalefsd_mask_round,
13168 __builtin_ia32_scalefss_mask_round): New intrinsics.
13169 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
13170 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
13171 ((match_operand:VF_128 2 "<round_nimm_predicate>"
13172 "<round_constraint>")): Changed to ...
13173 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
13174 "<round_scalar_constraint>")): ... this.
13175 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
13176 %0, %1, %2<round_op3>}"): Changed to ...
13177 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
13178 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
13179 %2<round_scalar_mask_op3>}"): ... this.
13180 * config/i386/subst.md (round_scalar_nimm_predicate): New.
13181
13182 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13183
13184 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
13185 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
13186 (_mm_maskz_sqrt_round_ss): New intrinsics.
13187 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
13188 (__builtin_ia32_sqrtsd_mask_round)
13189 (__builtin_ia32_sqrtss_mask_round): New builtins.
13190 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
13191 (__builtin_ia32_sqrtss_round): Remove.
13192 (__builtin_ia32_sqrtsd_mask_round)
13193 (__builtin_ia32_sqrtss_mask_round): New builtins.
13194 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
13195 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
13196 ((match_operand:VF_128 1 "vector_operand"
13197 "xBm,<round_constraint>")): Changed to ...
13198 ((match_operand:VF_128 1 "vector_operand"
13199 "xBm,<round_scalar_constraint>")): ... this.
13200 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
13201 %0, %2, %<iptr>1<round_op3>}): Changed to ...
13202 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
13203 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
13204 %<iptr>1<round_scalar_mask_op3>}): ... this.
13205 ((set_attr "prefix" "<round_prefix>")): Changed to ...
13206 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
13207
13208 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
13209
13210 PR target/84266
13211 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
13212 Cast vec_cmpeq result to correct type.
13213 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
13214 Cast vec_cmpgt result to correct type.
13215
13216 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
13217
13218 * final.c (final_scan_insn_1): Renamed from...
13219 (final_scan_insn): ... this. New wrapper, to recover
13220 seen from the outermost call in recursive ones.
13221 * config/sparc/sparc.c (output_return): Drop seen from call.
13222 (output_sibcall): Likewise.
13223 * config/visium/visium.c (output_branch): Likewise.
13224
13225 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
13226
13227 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
13228 function label.
13229
13230 2018-02-10 Alan Modra <amodra@gmail.com>
13231
13232 PR target/84300
13233 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
13234 Specify LR as an input.
13235
13236 2018-02-10 Jakub Jelinek <jakub@redhat.com>
13237
13238 PR sanitizer/83987
13239 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
13240 remove_member_access_dummy_vars): New functions.
13241 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
13242 lower_omp_1, execute_lower_omp): Use them.
13243
13244 PR rtl-optimization/84308
13245 * shrink-wrap.c (spread_components): Release todo vector.
13246
13247 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
13248
13249 PR rtl-optimization/57193
13250 * ira-color.c (struct allocno_color_data): Add member
13251 conflict_allocno_hard_prefs.
13252 (update_conflict_allocno_hard_prefs): New.
13253 (bucket_allocno_compare_func): Add a preference based on
13254 conflict_allocno_hard_prefs.
13255 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
13256 (color_allocnos): Remove a dead code. Initiate
13257 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
13258
13259 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13260
13261 PR target/84226
13262 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
13263 constraint from =wa to wa. Avoid a subreg on the output operand,
13264 instead use a pseudo and subreg it in a move.
13265 (p9_xxbrd_<mode>): Changed to ...
13266 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
13267 (p9_xxbrd_v2df): New expander.
13268 (p9_xxbrw_<mode>): Changed to ...
13269 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
13270 (p9_xxbrw_v4sf): New expander.
13271
13272 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13273
13274 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
13275
13276 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
13277
13278 PR target/83926
13279 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
13280 multiply in 32-bit mode.
13281 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
13282 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
13283 mode.
13284
13285 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13286
13287 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
13288 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
13289 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
13290 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
13291
13292 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
13293
13294 PR lto/84213
13295 * dwarf2out.c (is_trivial_indirect_ref): New function.
13296 (dwarf2out_late_global_decl): Do not generate a location
13297 attribute for variables that have a non-trivial DECL_VALUE_EXPR
13298 and that are not defined in the current unit.
13299
13300 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
13301
13302 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
13303 instead of a libcall for UNORDERED.
13304
13305 2018-02-09 Tamar Christina <tamar.christina@arm.com>
13306
13307 PR target/82641
13308 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
13309 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
13310
13311 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13312
13313 PR target/PR84295
13314 * config/s390/s390.c (s390_set_current_function): Invoke
13315 s390_indirect_branch_settings also if fndecl didn't change.
13316
13317 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
13318
13319 * config/rs6000/rs6000.md (blockage): Set length to zero.
13320
13321 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
13322
13323 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
13324
13325 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13326
13327 PR sanitizer/84285
13328 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
13329 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
13330 -static-lib*san.
13331
13332 PR debug/84252
13333 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
13334 PARALLEL incoming that failed vt_get_decl_and_offset check.
13335
13336 PR middle-end/84237
13337 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
13338 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
13339 TREE_READONLY bit.
13340 (get_variable_section): For decls in named .bss* sections pass true as
13341 second argument to bss_initializer_p.
13342
13343 2018-02-09 Marek Polacek <polacek@redhat.com>
13344 Jakub Jelinek <jakub@redhat.com>
13345
13346 PR c++/83659
13347 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
13348 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
13349 Sync some changes from cxx_fold_indirect_ref.
13350
13351 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
13352
13353 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
13354 markers.
13355 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
13356 (BLOCK_INLINE_ENTRY_LABEL): New.
13357 (dwarf2out_var_location): Disregard inline entry markers.
13358 (inline_entry_data): New struct.
13359 (inline_entry_data_hasher): New hashtable type.
13360 (inline_entry_data_hasher::hash): New.
13361 (inline_entry_data_hasher::equal): New.
13362 (inline_entry_data_table): New variable.
13363 (add_high_low_attributes): Add DW_AT_entry_pc and
13364 DW_AT_GNU_entry_view attributes if a pending entry is found
13365 in inline_entry_data_table. Add old entry_pc attribute only
13366 if debug nonbinding markers are disabled.
13367 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
13368 markers are enabled.
13369 (block_within_block_p, dwarf2out_inline_entry): New.
13370 (dwarf2out_finish): Check that no entries remained in
13371 inline_entry_data_table.
13372 * final.c (reemit_insn_block_notes): Handle inline entry notes.
13373 (final_scan_insn, notice_source_line): Likewise.
13374 (rest_of_clean_state): Skip inline entry markers.
13375 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
13376 markers.
13377 * gimple.c (gimple_build_debug_inline_entry): New.
13378 * gimple.h (enum gimple_debug_subcode): Add
13379 GIMPLE_DEBUG_INLINE_ENTRY.
13380 (gimple_build_debug_inline_entry): Declare.
13381 (gimple_debug_inline_entry_p): New.
13382 (gimple_debug_nonbind_marker_p): Adjust.
13383 * insn-notes.def (INLINE_ENTRY): New.
13384 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
13385 inline entry marker notes.
13386 (print_insn): Likewise.
13387 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
13388 (INSN_DEBUG_MARKER_KIND): Likewise.
13389 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
13390 * tree-inline.c (expand_call_inline): Build and insert
13391 debug_inline_entry stmt.
13392 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
13393 inline entry blocks early, if nonbind markers are enabled.
13394 (dump_scope_block): Dump fragment info.
13395 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
13396 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
13397 (gimple_build_debug_inline_entry): New.
13398 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
13399 Enable/disable inline entry points too.
13400 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
13401 (DEBUG_INSN): Describe inline entry markers.
13402
13403 * common.opt (gvariable-location-views): New.
13404 (gvariable-location-views=incompat5): New.
13405 * config.in: Rebuilt.
13406 * configure: Rebuilt.
13407 * configure.ac: Test assembler for view support.
13408 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
13409 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
13410 * dwarf2out.c (var_loc_view): New typedef.
13411 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
13412 (dwarf2out_locviews_in_attribute): New.
13413 (dwarf2out_locviews_in_loclist): New.
13414 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
13415 (enum dw_line_info_opcode): Add LI_adv_address.
13416 (struct dw_line_info_table): Add view.
13417 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
13418 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
13419 (zero_view_p): New variable.
13420 (ZERO_VIEW_P): New macro.
13421 (output_asm_line_debug_info): New.
13422 (struct var_loc_node): Add view.
13423 (add_AT_view_list, AT_loc_list): New.
13424 (add_var_loc_to_decl): Add view param. Test it against last.
13425 (new_loc_list): Add view params. Record them.
13426 (AT_loc_list_ptr): Handle loc and view lists.
13427 (view_list_to_loc_list_val_node): New.
13428 (print_dw_val): Handle dw_val_class_view_list.
13429 (size_of_die): Likewise.
13430 (value_format): Likewise.
13431 (loc_list_has_views): New.
13432 (gen_llsym): Set vl_symbol too.
13433 (maybe_gen_llsym, skip_loc_list_entry): New.
13434 (dwarf2out_maybe_output_loclist_view_pair): New.
13435 (output_loc_list): Output view list or entries too.
13436 (output_view_list_offset): New.
13437 (output_die): Handle dw_val_class_view_list.
13438 (output_dwarf_version): New.
13439 (output_compilation_unit_header): Use it.
13440 (output_skeleton_debug_sections): Likewise.
13441 (output_rnglists, output_line_info): Likewise.
13442 (output_pubnames, output_aranges): Update version comments.
13443 (output_one_line_info_table): Output view numbers in asm comments.
13444 (dw_loc_list): Determine current endview, pass it to new_loc_list.
13445 Call maybe_gen_llsym.
13446 (loc_list_from_tree_1): Adjust.
13447 (add_AT_location_description): Create view list attribute if
13448 needed, check it's absent otherwise.
13449 (convert_cfa_to_fb_loc_list): Adjust.
13450 (maybe_emit_file): Call output_asm_line_debug_info for test.
13451 (dwarf2out_var_location): Reset views as needed. Precompute
13452 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
13453 attribute. Set view.
13454 (new_line_info_table): Reset next view.
13455 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
13456 (dwarf2out_source_line): Likewise. Output view resets and labels to
13457 the assembler, or select appropriate line info opcodes.
13458 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
13459 (optimize_string_length): Catch it. Adjust.
13460 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
13461 dw_val_class_view_list, and remove it if no longer needed.
13462 (hash_loc_list): Hash view numbers.
13463 (loc_list_hasher::equal): Compare them.
13464 (optimize_location_lists): Check whether a view list symbol is
13465 needed, and whether the locview attribute is present, and
13466 whether they match. Remove the locview attribute if no longer
13467 needed.
13468 (index_location_lists): Call skip_loc_list_entry for test.
13469 (dwarf2out_finish): Call output_asm_line_debug_info for test.
13470 Use output_dwarf_version.
13471 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
13472 (struct dw_val_node): Add val_view_list.
13473 * final.c (SEEN_NEXT_VIEW): New.
13474 (set_next_view_needed): New.
13475 (clear_next_view_needed): New.
13476 (maybe_output_next_view): New.
13477 (final_start_function): Rename to...
13478 (final_start_function_1): ... this. Take pointer to FIRST,
13479 add SEEN parameter. Emit param bindings in the initial view.
13480 (final_start_function): Reintroduce SEEN-less interface.
13481 (final): Rename to...
13482 (final_1): ... this. Take SEEN parameter. Output final pending
13483 next view at the end.
13484 (final): Reintroduce seen-less interface.
13485 (final_scan_insn): Output pending next view before switching
13486 sections or ending a block. Mark the next view as needed when
13487 outputting variable locations. Notify debug backend of section
13488 changes, and of location view changes.
13489 (rest_of_handle_final): Adjust.
13490 * toplev.c (process_options): Autodetect value for debug variable
13491 location views option. Warn on incompat5 without -gdwarf-5.
13492 * doc/invoke.texi (gvariable-location-views): New.
13493 (gvariable-location-views=incompat5): New.
13494 (gno-variable-location-views): New.
13495
13496 2018-02-08 David Malcolm <dmalcolm@redhat.com>
13497
13498 PR tree-optimization/84136
13499 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
13500 that the result of find_edge is non-NULL.
13501
13502 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
13503
13504 PR target/83008
13505 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
13506 storing integer register in SImode. Fix cost of 256 and 512
13507 byte aligned SSE register store.
13508
13509 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
13510
13511 * config/i386/i386.c (ix86_multiplication_cost): Fix
13512 multiplication cost for TARGET_AVX512DQ.
13513
13514 2018-02-08 Marek Polacek <polacek@redhat.com>
13515
13516 PR tree-optimization/84238
13517 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
13518 get_range_strlen.
13519
13520 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
13521
13522 PR tree-optimization/84265
13523 * tree-vect-stmts.c (vectorizable_store): Don't treat
13524 VMAT_CONTIGUOUS accesses as grouped.
13525 (vectorizable_load): Likewise.
13526
13527 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
13528
13529 PR tree-optimization/81635
13530 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
13531 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
13532 (test_round_for_mask): New functions.
13533 (wide_int_cc_tests): Call test_round_for_mask.
13534 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
13535 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
13536 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
13537 range returned by get_range_info.
13538
13539 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
13540
13541 PR ipa/81360
13542 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
13543 * symtab.c: Include builtins.h
13544 (symtab_node::output_to_lto_symbol_table_p): Move here
13545 from lto-streamer-out.c:output_symbol_p.
13546 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
13547 (output_symbol_p): Move all logic to symtab.c
13548 (produce_symtab): Update.
13549
13550 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13551
13552 * config/s390/s390-opts.h (enum indirect_branch): Define.
13553 * config/s390/s390-protos.h (s390_return_addr_from_memory)
13554 (s390_indirect_branch_via_thunk)
13555 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
13556 (enum s390_indirect_branch_type): Define.
13557 * config/s390/s390.c (struct s390_frame_layout, struct
13558 machine_function): Remove.
13559 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
13560 (indirect_branch_table_label_no, indirect_branch_table_name):
13561 Define variables.
13562 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
13563 (enum s390_indirect_branch_option): Define.
13564 (s390_return_addr_from_memory): New function.
13565 (s390_handle_string_attribute): New function.
13566 (s390_attribute_table): Add new attribute handler.
13567 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
13568 (s390_indirect_branch_via_thunk): New function.
13569 (s390_indirect_branch_via_inline_thunk): New function.
13570 (s390_function_ok_for_sibcall): When jumping via thunk disallow
13571 sibling call optimization for non z10 compiles.
13572 (s390_emit_call): Force indirect branch target to be a single
13573 register. Add r1 clobber for non-z10 compiles.
13574 (s390_emit_epilogue): Emit return jump via return_use expander.
13575 (s390_reorg): Handle JUMP_INSNs as execute targets.
13576 (s390_option_override_internal): Perform validity checks for the
13577 new command line options.
13578 (s390_indirect_branch_attrvalue): New function.
13579 (s390_indirect_branch_settings): New function.
13580 (s390_set_current_function): Invoke s390_indirect_branch_settings.
13581 (s390_output_indirect_thunk_function): New function.
13582 (s390_code_end): Implement target hook.
13583 (s390_case_values_threshold): Implement target hook.
13584 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
13585 macros.
13586 * config/s390/s390.h (struct s390_frame_layout)
13587 (struct machine_function): Move here from s390.c.
13588 (TARGET_INDIRECT_BRANCH_NOBP_RET)
13589 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
13590 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
13591 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
13592 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
13593 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
13594 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
13595 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
13596 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
13597 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
13598 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
13599 (mnemonic attribute): Add values which aren't recognized
13600 automatically.
13601 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
13602 pattern for branch conversion. Fix mnemonic attribute.
13603 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
13604 indirect branch via thunk if requested.
13605 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
13606 ("*indirect_jump"): Disable for branch conversion using out of
13607 line thunks.
13608 ("indirect_jump_via_thunk<mode>_z10")
13609 ("indirect_jump_via_thunk<mode>")
13610 ("indirect_jump_via_inlinethunk<mode>_z10")
13611 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
13612 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
13613 ("casesi_jump_via_inlinethunk<mode>_z10")
13614 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
13615 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
13616 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
13617 ("*indirect2_jump"): Disable for branch conversion.
13618 ("casesi_jump"): Turn into expander and expand patterns for branch
13619 conversion.
13620 ("return_use"): New expander.
13621 ("*return"): Emit return via thunk and rename it to ...
13622 ("*return<mode>"): ... this one.
13623 * config/s390/s390.opt: Add new options and and enum for the
13624 option values.
13625
13626 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
13627
13628 * lra-constraints.c (match_reload): Unconditionally use
13629 gen_lowpart_SUBREG, rather than selecting between that
13630 and equivalent gen_rtx_SUBREG code.
13631
13632 2018-02-08 Richard Biener <rguenther@suse.de>
13633
13634 PR tree-optimization/84233
13635 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
13636 changed flag instead of boguously re-using phi_inserted.
13637
13638 2018-02-08 Martin Jambor <mjambor@suse.cz>
13639
13640 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
13641 static local variables.
13642
13643 2018-02-08 Richard Biener <rguenther@suse.de>
13644
13645 PR tree-optimization/84278
13646 * tree-vect-stmts.c (vectorizable_store): When looking for
13647 smaller vector types to perform grouped strided loads/stores
13648 make sure the mode is supported by the target.
13649 (vectorizable_load): Likewise.
13650
13651 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
13652
13653 * config/aarch64/aarch64.c (aarch64_components_for_bb):
13654 Increase LDP/STP opportunities by adding adjacent callee-saves.
13655
13656 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
13657
13658 PR rtl-optimization/84068
13659 PR rtl-optimization/83459
13660 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
13661
13662 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
13663
13664 PR tree-optimization/84224
13665 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
13666 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
13667 non-zero arguments.
13668
13669 2018-02-07 Iain Sandoe <iain@codesourcery.com>
13670
13671 PR target/84113
13672 * config/rs6000/altivec.md (*restore_world): Remove LR use.
13673 * config/rs6000/predicates.md (restore_world_operation): Adjust op
13674 count, remove one USE.
13675
13676 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
13677
13678 * doc/install.texi (Configuration): Document the
13679 --with-long-double-format={ibm,ieee} PowerPC configuration
13680 options.
13681
13682 PR target/84154
13683 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
13684 Convert from define_expand to be define_insn_and_split. Rework
13685 float/double/_Float128 conversions to QI/HI/SImode to work with
13686 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
13687 conversions to QI/HImode types did a store and then a load to
13688 truncate the value. For conversions to VSX registers, don't split
13689 the insn, instead emit the code directly. Use the code iterator
13690 any_fix to combine signed and unsigned conversions.
13691 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
13692 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
13693 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13694 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
13695 (fix_<mode>di2_hw): Likewise.
13696 (fixuns_<mode>di2_hw): Likewise.
13697 (fix_<mode>si2_hw): Likewise.
13698 (fixuns_<mode>si2_hw): Likewise.
13699 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
13700 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13701 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
13702 fix<uns>_trunc<SFDF:mode>si2_p8.
13703 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
13704 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
13705 (fix<uns>_<mode>_mem): Likewise.
13706 (fctiw<u>z_<mode>_mem): Likewise.
13707 (fix<uns>_<mode>_mem): Likewise.
13708 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
13709 the register allocator from doing a direct move to the GPRs to do
13710 a store, and instead use the ISA 3.0 store byte/half-word from
13711 vector register instruction. For IEEE 128-bit floating point,
13712 also optimize stores of 32-bit ints.
13713 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
13714
13715 2018-02-07 Alan Hayward <alan.hayward@arm.com>
13716
13717 * genextract.c (push_pathstr_operand): New function to support
13718 [a-zA-Z].
13719 (walk_rtx): Call push_pathstr_operand.
13720 (print_path): Support [a-zA-Z].
13721
13722 2018-02-07 Richard Biener <rguenther@suse.de>
13723
13724 PR tree-optimization/84037
13725 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
13726 (cse_and_gimplify_to_preheader): Declare.
13727 (vect_get_place_in_interleaving_chain): Likewise.
13728 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13729 ivexpr_map.
13730 (_loop_vec_info::~_loop_vec_info): Delete it.
13731 (cse_and_gimplify_to_preheader): New function.
13732 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
13733 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
13734 (vectorizable_load): Likewise. For grouped stores always base
13735 the IV on the first element.
13736 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
13737 condition before gimplifying.
13738
13739 2018-02-07 Jakub Jelinek <jakub@redhat.com>
13740
13741 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
13742 *DIV_EXPR and *MOD_EXPR.
13743
13744 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
13745
13746 PR target/84248
13747 * config/i386/i386.c (ix86_option_override_internal): Mask out
13748 the CF_SET bit when checking -fcf-protection.
13749
13750 2018-02-07 Tom de Vries <tom@codesourcery.com>
13751
13752 PR libgomp/84217
13753 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
13754 enough.
13755
13756 2018-02-07 Richard Biener <rguenther@suse.de>
13757
13758 PR tree-optimization/84204
13759 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
13760 this place.
13761
13762 PR tree-optimization/84205
13763 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
13764 special-case isl_ast_op_zdiv_r.
13765
13766 PR tree-optimization/84223
13767 * graphite-scop-detection.c (gather_bbs::before_dom_children):
13768 Only add conditions from within the region.
13769 (gather_bbs::after_dom_children): Adjust.
13770
13771 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
13772
13773 PR target/84209
13774 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
13775 * config/avr/avr.md: Only post-reload split REG-REG moves if
13776 either register is GENERAL_REG_P.
13777
13778 2018-02-07 Jakub Jelinek <jakub@redhat.com>
13779
13780 PR tree-optimization/84235
13781 * tree-ssa-scopedtables.c
13782 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
13783 if the subtraction is performed in floating point type where NaNs are
13784 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
13785 build 1. Formatting fix.
13786
13787 2018-02-06 Jakub Jelinek <jakub@redhat.com>
13788
13789 PR target/84146
13790 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
13791 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
13792 and skip it regardless of bb boundaries. Use CALL_P macro,
13793 don't test INSN_P (insn) together with CALL_P or JUMP_P check
13794 unnecessarily, formatting fix.
13795
13796 2018-02-06 Michael Collison <michael.collison@arm.com>
13797
13798 * config/arm/thumb2.md:
13799 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
13800 (*thumb_mov_notscc): Ditto.
13801
13802 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
13803
13804 PR target/84154
13805 * config/rs6000/rs6000.md (su code attribute): Use "u" for
13806 unsigned_fix, not "s".
13807
13808 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13809
13810 * configure.ac (gcc_fn_eh_frame_ro): New function.
13811 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
13812 correct .eh_frame permissions.
13813 * configure: Regenerate.
13814
13815 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
13816
13817 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
13818 irrelevant options.
13819
13820 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13821
13822 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13823 Display warning message for -mno-speculate-indirect-jumps.
13824
13825 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
13826
13827 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
13828 Undocumented.
13829 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
13830
13831 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
13832
13833 PR tree-optimization/84225
13834 * tree-eh.c (find_trapping_overflow): Only call
13835 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
13836
13837 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13838
13839 PR target/84145
13840 * config/i386/i386.c: Reimplement the check of possible options
13841 -mibt/-mshstk conbination. Change error messages.
13842 * doc/invoke.texi: Fix a typo: remove extra '='.
13843
13844 2018-02-06 Marek Polacek <polacek@redhat.com>
13845
13846 PR tree-optimization/84228
13847 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
13848
13849 2018-02-06 Tamar Christina <tamar.christina@arm.com>
13850
13851 PR target/82641
13852 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
13853 emitted arch directives.
13854 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
13855 __ARM_FEATURE_COPROC before changing architectures.
13856
13857 2018-02-06 Richard Biener <rguenther@suse.de>
13858
13859 * config/i386/i386.c (print_reg): Fix typo.
13860 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
13861
13862 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
13863
13864 * configure: Regenerate.
13865
13866 2018-02-05 Martin Sebor <msebor@redhat.com>
13867
13868 PR tree-optimization/83369
13869 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
13870 inlining context.
13871
13872 2018-02-05 Martin Liska <mliska@suse.cz>
13873
13874 * doc/invoke.texi: Cherry-pick upstream r323995.
13875
13876 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
13877
13878 * ira.c (ira_init_register_move_cost): Adjust comment.
13879
13880 2018-02-05 Martin Liska <mliska@suse.cz>
13881
13882 PR gcov-profile/84137
13883 * doc/gcov.texi: Fix typo in documentation.
13884
13885 2018-02-05 Martin Liska <mliska@suse.cz>
13886
13887 PR gcov-profile/83879
13888 * doc/gcov.texi: Document necessity of --dynamic-list-data when
13889 using dlopen functionality.
13890
13891 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
13892
13893 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
13894 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
13895 _mm_maskz_range_ss, _mm_mask_range_round_ss,
13896 _mm_maskz_range_round_ss): New intrinsics.
13897 (__builtin_ia32_rangesd128_round)
13898 (__builtin_ia32_rangess128_round): Remove.
13899 (__builtin_ia32_rangesd128_mask_round,
13900 __builtin_ia32_rangess128_mask_round): New builtins.
13901 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
13902 __builtin_ia32_rangess128_round): Remove.
13903 (__builtin_ia32_rangesd128_mask_round,
13904 __builtin_ia32_rangess128_mask_round): New builtins.
13905 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
13906 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
13907 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
13908 "<round_saeonly_constraint>")): Changed to ...
13909 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
13910 "<round_saeonly_scalar_constraint>")): ... this.
13911 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
13912 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
13913 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
13914 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
13915 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
13916
13917 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
13918
13919 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
13920 options.
13921 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
13922 Remove all values except native, 8540 and 8548.
13923
13924 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
13925
13926 * config/i386/i386.c (ix86_output_function_return): Pass
13927 INVALID_REGNUM, instead of -1, as invalid register number to
13928 indirect_thunk_name and output_indirect_thunk.
13929
13930 2018-02-02 Julia Koval <julia.koval@intel.com>
13931
13932 * config.gcc: Add -march=icelake.
13933 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
13934 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
13935 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
13936 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
13937 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
13938 (processor_target_table): Add icelake.
13939 (ix86_option_override_internal): Handle new PTAs.
13940 (get_builtin_code_for_version): Handle icelake.
13941 (M_INTEL_COREI7_ICELAKE): New.
13942 (fold_builtin_cpu): Handle icelake.
13943 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
13944 * doc/invoke.texi: Add -march=icelake.
13945
13946 2018-02-02 Julia Koval <julia.koval@intel.com>
13947
13948 * config/i386/i386.c (ix86_option_override_internal): Change flags type
13949 to wide_int_bitmask.
13950 * wide-int-bitmask.h: New.
13951
13952 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13953
13954 PR target/84066
13955 * config/i386/i386.md: Replace Pmode with word_mode in
13956 builtin_setjmp_setup and builtin_longjmp to support x32.
13957
13958 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
13959
13960 PR target/56010
13961 PR target/83743
13962 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
13963 #include "opts.h".
13964 (rs6000_supported_cpu_names): New static variable.
13965 (linux_cpu_translation_table): Likewise.
13966 (elf_platform) <cpu>: Define new static variable and use it.
13967 Translate kernel AT_PLATFORM name to canonical name if needed.
13968 Error if platform name is unknown.
13969
13970 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
13971
13972 PR target/84089
13973 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
13974
13975 2018-02-01 Jeff Law <law@redhat.com>
13976
13977 PR target/84128
13978 * config/i386/i386.c (release_scratch_register_on_entry): Add new
13979 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
13980 the scratch if RELEASE_VIA_POP is false.
13981 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
13982 If we have to save a temporary register, decrement SIZE appropriately.
13983 Pass new arguments to release_scratch_register_on_entry.
13984 (ix86_adjust_stack_and_probe): Likewise.
13985 (ix86_emit_probe_stack_range): Pass new arguments to
13986 release_scratch_register_on_entry.
13987
13988 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
13989
13990 PR rtl-optimization/84157
13991 * combine.c (change_zero_ext): Use REG_P predicate in
13992 front of HARD_REGISTER_P predicate.
13993
13994 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
13995
13996 * config/avr/avr.c (avr_option_override): Move disabling of
13997 -fdelete-null-pointer-checks to...
13998 * common/config/avr/avr-common.c (avr_option_optimization_table):
13999 ...here.
14000
14001 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14002
14003 PR tree-optimization/81635
14004 * tree-data-ref.c (split_constant_offset_1): For types that
14005 wrap on overflow, try to use range info to prove that wrapping
14006 cannot occur.
14007
14008 2018-02-01 Renlin Li <renlin.li@arm.com>
14009
14010 PR target/83370
14011 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
14012 TAILCALL_ADDR_REGS.
14013 (aarch64_register_move_cost): Likewise.
14014 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
14015 TAILCALL_ADDR_REGS.
14016 (REG_CLASS_NAMES): Likewise.
14017 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
14018 TAILCALL_ADDR_REGS. Remove IP registers.
14019 * config/aarch64/aarch64.md (Ucs): Update register constraint.
14020
14021 2018-02-01 Richard Biener <rguenther@suse.de>
14022
14023 * domwalk.h (dom_walker::dom_walker): Add additional constructor
14024 for specifying RPO order and allow NULL for that.
14025 * domwalk.c (dom_walker::dom_walker): Likewise.
14026 (dom_walker::walk): Handle NULL RPO order.
14027 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
14028 in RPO order.
14029 (rewrite_update_dom_walker): Likewise.
14030 (mark_def_dom_walker): Likewise.
14031
14032 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14033
14034 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
14035 (aarch64_maybe_expand_sve_subreg_move): Declare.
14036 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
14037 * config/aarch64/predicates.md (aarch64_any_register_operand): New
14038 predicate.
14039 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
14040 that are semantically a reverse operation.
14041 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
14042 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
14043 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
14044 functions.
14045 (aarch64_can_change_mode_class): For big-endian, forbid changes
14046 between two SVE modes if they have different element sizes.
14047
14048 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14049
14050 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
14051 the TImode handling for big-endian targets.
14052
14053 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14054
14055 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
14056 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
14057 not just bytes.
14058 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
14059 Remove BSWAP handing for big-endian targets and use the form of
14060 LD1RQ appropariate for the mode.
14061
14062 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14063
14064 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
14065 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
14066 duplicated element.
14067
14068 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14069
14070 PR tearget/83845
14071 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
14072 check for operands that need to go through aarch64_sve_reload_be.
14073
14074 2018-02-01 Jakub Jelinek <jakub@redhat.com>
14075
14076 PR tree-optimization/81661
14077 PR tree-optimization/84117
14078 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
14079 * tree-eh.c: Include gimplify.h.
14080 (find_trapping_overflow, replace_trapping_overflow,
14081 rewrite_to_non_trapping_overflow): New functions.
14082 * tree-vect-loop.c: Include tree-eh.h.
14083 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
14084 * tree-data-ref.c: Include tree-eh.h.
14085 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
14086
14087 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
14088
14089 PR rtl-optimization/84123
14090 * combine.c (change_zero_ext): Check if hard register satisfies
14091 can_change_dest_mode before calling gen_lowpart_SUBREG.
14092
14093 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
14094
14095 PR target/82444
14096 * ira.c (ira_init_register_move_cost): Remove assert.
14097
14098 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14099
14100 PR rtl-optimization/84071
14101 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
14102 * doc/tm.texi: Regenerate.
14103
14104 2018-01-31 Richard Biener <rguenther@suse.de>
14105
14106 PR tree-optimization/84132
14107 * tree-data-ref.c (analyze_miv_subscript): Properly
14108 check whether evolution_function_is_affine_multivariate_p
14109 before calling gcd_of_steps_may_divide_p.
14110
14111 2018-01-31 Julia Koval <julia.koval@intel.com>
14112
14113 PR target/83618
14114 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
14115 * config/i386/i386.md (rdpid_rex64) New.
14116 (rdpid): Make 32bit only.
14117
14118 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
14119
14120 PR lto/84105
14121 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
14122 an IDENTIFIER_NODE for FUNCTION_TYPE's.
14123
14124 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14125
14126 Revert
14127 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
14128
14129 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14130
14131 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14132
14133 PR rtl-optimization/84071
14134 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
14135 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
14136
14137 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14138
14139 * config/arc/arc.c (arc_handle_aux_attribute): New function.
14140 (arc_attribute_table): Add 'aux' attribute.
14141 (arc_in_small_data_p): Consider aux like variables.
14142 (arc_is_aux_reg_p): New function.
14143 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
14144 (arc_get_aux_arg): New function.
14145 (prepare_move_operands): Handle aux-register access.
14146 (arc_handle_aux_attribute): New function.
14147 * doc/extend.texi (ARC Variable attributes): Add subsection.
14148
14149 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14150
14151 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
14152 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
14153 (arc_attribute_table): Add 'uncached' attribute.
14154 (arc_print_operand): Print '.di' flag for uncached memory
14155 accesses.
14156 (arc_in_small_data_p): Do not consider for small data the uncached
14157 types.
14158 (arc_is_uncached_mem_p): New function.
14159 * config/arc/predicates.md (compact_store_memory_operand): Check
14160 for uncached memory accesses.
14161 (nonvol_nonimm_operand): Likewise.
14162 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
14163
14164 2018-01-31 Jakub Jelinek <jakub@redhat.com>
14165
14166 PR c/84100
14167 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
14168 falign-loops=): Add Optimization flag.
14169
14170 2018-01-30 Jeff Law <law@redhat.com>
14171
14172 PR target/84064
14173 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
14174 INT_REGISTERS_SAVED. Check it prior to calling
14175 get_scratch_register_on_entry.
14176 (ix86_adjust_stack_and_probe): Similarly.
14177 (ix86_emit_probe_stack_range): Similarly.
14178 (ix86_expand_prologue): Corresponding changes.
14179
14180 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14181
14182 PR target/40411
14183 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
14184 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
14185
14186 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
14187
14188 PR target/84112
14189 * lra-constraints.c (curr_insn_transform): Process AND in the
14190 address.
14191
14192 2018-01-30 Jakub Jelinek <jakub@redhat.com>
14193
14194 PR rtl-optimization/83986
14195 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
14196 dependence against last_pending_memory_flush in addition to
14197 pending_jump_insns.
14198
14199 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
14200
14201 PR tree-optimization/81611
14202 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
14203 copies.
14204
14205 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14206
14207 PR target/83758
14208 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
14209 a reg rtx.
14210
14211 2018-01-30 Richard Biener <rguenther@suse.de>
14212 Jakub Jelinek <jakub@redhat.com>
14213
14214 PR tree-optimization/84111
14215 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
14216 inner loops added during recursion, as they don't have up-to-date
14217 SSA form.
14218
14219 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14220
14221 PR ipa/81360
14222 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
14223 (can_inline_edge_by_limits_p): ... here.
14224 (can_early_inline_edge_p, check_callers,
14225 update_caller_keys, update_callee_keys, recursive_inlining,
14226 add_new_edges_to_heap, speculation_useful_p,
14227 inline_small_functions,
14228 inline_small_functions, flatten_function,
14229 inline_to_all_callers_1): Update.
14230
14231 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14232
14233 * profile-count.c (profile_count::combine_with_ipa_count): Handle
14234 zeros correctly.
14235
14236 2018-01-30 Richard Biener <rguenther@suse.de>
14237
14238 PR tree-optimization/83008
14239 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
14240 invariant and constant vector uses in stmts when they need
14241 more than one stmt.
14242
14243 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14244
14245 PR bootstrap/84017
14246 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
14247 * configure: Regenerate.
14248
14249 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14250
14251 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
14252 pattern.
14253 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
14254 Use gen_rtx_REG rather than gen_lowpart.
14255
14256 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14257
14258 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
14259 rather than 0 when creating partial subregs.
14260
14261 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14262
14263 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
14264 of usage.
14265
14266 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
14267
14268 PR target/81550
14269 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
14270 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
14271 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
14272 flags. This restores the settings used before the 2017-07-24.
14273 Turning off pre increment/decrement/modify allows IVOPTS to
14274 optimize DF/SF loops where the index is an int.
14275
14276 2018-01-29 Richard Biener <rguenther@suse.de>
14277 Kelvin Nilsen <kelvin@gcc.gnu.org>
14278
14279 PR bootstrap/80867
14280 * tree-vect-stmts.c (vectorizable_call): Don't call
14281 targetm.vectorize_builtin_md_vectorized_function if callee is
14282 NULL.
14283
14284 2018-01-22 Carl Love <cel@us.ibm.com>
14285
14286 * doc/extend.tex: Fix typo in second arg in
14287 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
14288
14289 2018-01-29 Richard Biener <rguenther@suse.de>
14290
14291 PR tree-optimization/84086
14292 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
14293 (flush_ssaname_freelist): When SSA names were released reset
14294 the SCEV hash table.
14295
14296 2018-01-29 Richard Biener <rguenther@suse.de>
14297
14298 PR tree-optimization/84057
14299 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
14300 removed paths when removing edges.
14301
14302 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
14303
14304 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
14305 -mfunction-return=@var{choice}.
14306
14307 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
14308
14309 PR diagnostic/84034
14310 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
14311 Handle CR like TAB.
14312 (layout::print_source_line): Likewise.
14313 (test_get_line_width_without_trailing_whitespace): Add test cases.
14314
14315 2018-01-27 Jakub Jelinek <jakub@redhat.com>
14316
14317 PR middle-end/84040
14318 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
14319 debug insns.
14320
14321 2018-01-26 Jim Wilson <jimw@sifive.com>
14322
14323 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
14324
14325 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
14326 specified.
14327
14328 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14329
14330 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
14331 and CMP + SUB-immediate -> SUBS.
14332
14333 2018-01-26 Martin Sebor <msebor@redhat.com>
14334
14335 PR tree-optimization/83896
14336 * tree-ssa-strlen.c (get_string_len): Rename...
14337 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
14338 Avoid assuming length is constant.
14339 (handle_char_store): Use HOST_WIDE_INT for string length.
14340
14341 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
14342
14343 PR target/81763
14344 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
14345 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
14346
14347 2018-01-26 Richard Biener <rguenther@suse.de>
14348
14349 PR rtl-optimization/84003
14350 * dse.c (record_store): Only record redundant stores when
14351 the earlier store aliases at least all accesses the later one does.
14352
14353 2018-01-26 Jakub Jelinek <jakub@redhat.com>
14354
14355 PR rtl-optimization/83985
14356 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
14357 REG_CFA_RESTORE insns.
14358 (delete_unmarked_insns): Don't ignore separate shrink wrapping
14359 REG_CFA_RESTORE insns here.
14360
14361 PR c/83989
14362 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
14363 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
14364
14365 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14366
14367 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
14368 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
14369 (arc_init): Likewise.
14370 (arc_override_options): Likewise.
14371 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
14372 value.
14373 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
14374 support.
14375 * config/arc/arc.h (TARGET_DBNZ): Define.
14376 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
14377 properly set the tune attribute.
14378 (dbnz): Use TARGET_DBNZ guard.
14379 * config/arc/arc.opt (mtune): Add core3 option.
14380
14381 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14382
14383 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
14384 recognize new pic like addresses.
14385 (arc_delegitimize_address): Clean up.
14386
14387 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14388
14389 * config/arc/arc-arches.def: Option mrf16 valid for all
14390 architectures.
14391 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
14392 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
14393 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
14394 * config/arc/arc-tables.opt: Regenerate.
14395 * config/arc/arc.c (arc_conditional_register_usage): Handle
14396 reduced register file case.
14397 (arc_file_start): Set must have build attributes.
14398 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
14399 mrf16 option value.
14400 * config/arc/arc.opt (mrf16): Add new option.
14401 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
14402 * config/arc/genmultilib.awk: Handle new mrf16 option.
14403 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
14404 * config/arc/t-multilib: Regenerate.
14405 * doc/invoke.texi (ARC Options): Document mrf16 option.
14406
14407 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14408
14409 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
14410 * config/arc/arc.c (arc_handle_secure_attribute): New function.
14411 (arc_attribute_table): Add 'secure_call' attribute.
14412 (arc_print_operand): Print secure call operand.
14413 (arc_function_ok_for_sibcall): Don't optimize tail calls when
14414 secure.
14415 (arc_is_secure_call_p): New function. * config/arc/arc.md
14416 (call_i): Add support for sjli instruction.
14417 (call_value_i): Likewise.
14418 * config/arc/constraints.md (Csc): New constraint.
14419
14420 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14421 John Eric Martin <John.Martin@emmicro-us.com>
14422
14423 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
14424 * config/arc/arc.c (_arc_jli_section): New struct.
14425 (arc_jli_section): New type.
14426 (rc_jli_sections): New static variable.
14427 (arc_handle_jli_attribute): New function.
14428 (arc_attribute_table): Add jli_always and jli_fixed attribute.
14429 (arc_file_end): New function.
14430 (TARGET_ASM_FILE_END): Define.
14431 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
14432 (arc_add_jli_section): New function.
14433 (jli_call_scan): Likewise.
14434 (arc_reorg): Call jli_call_scan.
14435 (arc_output_addsi): Remove 'S' from printing asm operand.
14436 (arc_is_jli_call_p): New function.
14437 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
14438 operand.
14439 (movhi_insn): Likewise.
14440 (movsi_insn): Likewise.
14441 (movsi_set_cc_insn): Likewise.
14442 (loadqi_update): Likewise.
14443 (load_zeroextendqisi_update): Likewise.
14444 (load_signextendqisi_update): Likewise.
14445 (loadhi_update): Likewise.
14446 (load_zeroextendhisi_update): Likewise.
14447 (load_signextendhisi_update): Likewise.
14448 (loadsi_update): Likewise.
14449 (loadsf_update): Likewise.
14450 (movsicc_insn): Likewise.
14451 (bset_insn): Likewise.
14452 (bxor_insn): Likewise.
14453 (bclr_insn): Likewise.
14454 (bmsk_insn): Likewise.
14455 (bicsi3_insn): Likewise.
14456 (cmpsi_cc_c_insn): Likewise.
14457 (movsi_ne): Likewise.
14458 (movsi_cond_exec): Likewise.
14459 (clrsbsi2): Likewise.
14460 (norm_f): Likewise.
14461 (normw): Likewise.
14462 (swap): Likewise.
14463 (divaw): Likewise.
14464 (flag): Likewise.
14465 (sr): Likewise.
14466 (kflag): Likewise.
14467 (ffs): Likewise.
14468 (ffs_f): Likewise.
14469 (fls): Likewise.
14470 (call_i): Remove 'S' asm letter, add jli instruction.
14471 (call_value_i): Likewise.
14472 * config/arc/arc.op (mjli-always): New option.
14473 * config/arc/constraints.md (Cji): New constraint.
14474 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
14475 operand.
14476 (subsf3_fpx): Likewise.
14477 (mulsf3_fpx): Likewise.
14478 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
14479 asm operand.
14480 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
14481 function attrbutes.
14482 * doc/invoke.texi (ARC): Document mjli-always option.
14483
14484 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
14485
14486 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
14487 avoid addition with 0 and use incw and decw where possible.
14488
14489 2018-01-26 Richard Biener <rguenther@suse.de>
14490
14491 PR tree-optimization/81082
14492 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
14493 association if it requires casting to unsigned.
14494 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
14495 from fold_plusminus_mult_expr to catch important cases late when
14496 range info is available.
14497
14498 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14499
14500 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
14501 * configure.ac (hidden_linkonce): New test.
14502 * configure: Regenerate.
14503 * config.in: Regenerate.
14504
14505 2018-01-26 Julia Koval <julia.koval@intel.com>
14506
14507 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
14508 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
14509 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
14510 _mm_mask_bitshuffle_epi64_mask): Fix type.
14511 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
14512 USI_FTYPE_V4DI_V4DI_USI): Remove.
14513 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
14514 __builtin_ia32_vpshufbitqmb256_mask,
14515 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
14516 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
14517 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
14518
14519 2018-01-26 Alan Modra <amodra@gmail.com>
14520
14521 PR target/84033
14522 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
14523 UNSPEC_VBPERMQ. Sort other unspecs.
14524
14525 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
14526
14527 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
14528
14529 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
14530
14531 PR middle-end/83055
14532 * predict.c (drop_profile): Do not push/pop cfun; update also
14533 node->count.
14534 (handle_missing_profiles): Fix logic looking for zero profiles.
14535
14536 2018-01-25 Jakub Jelinek <jakub@redhat.com>
14537
14538 PR middle-end/83977
14539 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
14540 on functions with #pragma omp declare simd or functions with simd
14541 attribute.
14542 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
14543 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
14544 Remove trailing \n from warning_at calls.
14545
14546 2018-01-25 Tom de Vries <tom@codesourcery.com>
14547
14548 PR target/84028
14549 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14550 for neutered workers.
14551
14552 2018-01-24 Joseph Myers <joseph@codesourcery.com>
14553
14554 PR target/68467
14555 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
14556 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
14557
14558 2018-01-24 Jeff Law <law@redhat.com>
14559
14560 PR target/83994
14561 * i386.c (get_probe_interval): Move to earlier point.
14562 (ix86_compute_frame_layout): If -fstack-clash-protection and
14563 the frame is larger than the probe interval, then use pushes
14564 to save registers rather than reg->mem moves.
14565 (ix86_expand_prologue): Remove conditional for int_registers_saved
14566 assertion.
14567
14568 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
14569
14570 PR target/84014
14571 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
14572 min/max for never referenced object.
14573
14574 2018-01-24 Jakub Jelinek <jakub@redhat.com>
14575
14576 PR middle-end/83977
14577 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
14578 here.
14579 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
14580 attributes from DECL_ATTRIBUTES (decl) without affecting
14581 DECL_ATTRIBUTES (current_function_decl).
14582 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
14583 functions with non-NULL DECL_ABSTRACT_ORIGIN.
14584
14585 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
14586
14587 PR tree-optimization/83979
14588 * fold-const.c (fold_comparison): Use constant_boolean_node
14589 instead of boolean_{true,false}_node.
14590
14591 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
14592
14593 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
14594 with zero counts.
14595
14596 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14597
14598 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14599 Simplify the clause that sets the length attribute.
14600 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14601 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
14602 clause that sets the length attribute.
14603 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14604
14605 2018-01-24 Tom de Vries <tom@codesourcery.com>
14606
14607 PR target/83589
14608 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
14609 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
14610 Add strict parameter.
14611 (prevent_branch_around_nothing): Insert dummy insn between branch to
14612 label and label with no ptx insn inbetween.
14613 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
14614
14615 2018-01-24 Tom de Vries <tom@codesourcery.com>
14616
14617 PR target/81352
14618 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14619 for neutered threads in warp.
14620 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
14621
14622 2018-01-24 Richard Biener <rguenther@suse.de>
14623
14624 PR tree-optimization/83176
14625 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
14626 operands.
14627
14628 2018-01-24 Richard Biener <rguenther@suse.de>
14629
14630 PR tree-optimization/82819
14631 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
14632 code generating pluses that are no-ops in the target precision.
14633
14634 2018-01-24 Richard Biener <rguenther@suse.de>
14635
14636 PR middle-end/84000
14637 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
14638
14639 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
14640
14641 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
14642 to merge probabilities.
14643 * predict.c (probably_never_executed): Also mark as cold functions
14644 with global 0 profile and guessed local profile.
14645 * profile-count.c (profile_probability::combine_with_count): New
14646 member function.
14647 * profile-count.h (profile_probability::operator*,
14648 profile_probability::operator*=, profile_probability::operator/,
14649 profile_probability::operator/=): Reduce precision to adjusted
14650 and set value to guessed on contradictory divisions.
14651 (profile_probability::combine_with_freq): Remove.
14652 (profile_probability::combine_wiht_count): Declare.
14653 (profile_count::force_nonzero):: Set to adjusted.
14654 (profile_count::probability_in):: Set quality to adjusted.
14655 * tree-ssa-tail-merge.c (replace_block_by): Use
14656 combine_with_count.
14657
14658 2018-01-23 Andrew Waterman <andrew@sifive.com>
14659 Jim Wilson <jimw@sifive.com>
14660
14661 * config/riscv/riscv.c (riscv_stack_boundary): New.
14662 (riscv_option_override): Set riscv_stack_boundary. Handle
14663 riscv_preferred_stack_boundary_arg.
14664 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
14665 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
14666 (STACK_BOUNDARY): Set to riscv_stack_boundary.
14667 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
14668 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
14669 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
14670
14671 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
14672
14673 PR target/83905
14674 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
14675 of struct ix86_frame.
14676 (ix86_expand_epilogue): Likewise. Add a local variable for
14677 the reg_save_offset field in struct ix86_frame.
14678
14679 2018-01-23 Bin Cheng <bin.cheng@arm.com>
14680
14681 PR tree-optimization/82604
14682 * tree-loop-distribution.c (enum partition_kind): New enum item
14683 PKIND_PARTIAL_MEMSET.
14684 (partition_builtin_p): Support above new enum item.
14685 (generate_code_for_partition): Ditto.
14686 (compute_access_range): Differentiate cases that equality can be
14687 proven at all loops, the innermost loops or no loops.
14688 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
14689 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
14690 (finalize_partitions, distribute_loop): Don't fuse partition of
14691 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
14692 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
14693 parloop is enabled.
14694
14695 2018-01-23 Martin Liska <mliska@suse.cz>
14696
14697 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
14698 order to ignore the predictor.
14699 (PRED_POLYMORPHIC_CALL): Likewise.
14700 (PRED_RECURSIVE_CALL): Likewise.
14701
14702 2018-01-23 Martin Liska <mliska@suse.cz>
14703
14704 * tree-profile.c (tree_profiling): Print function header to
14705 aware reader which function we are working on.
14706 * value-prof.c (gimple_find_values_to_profile): Do not print
14707 not interesting value histograms.
14708
14709 2018-01-23 Martin Liska <mliska@suse.cz>
14710
14711 * profile-count.h (enum profile_quality): Add
14712 profile_uninitialized as the first value. Do not number values
14713 as they are zero based.
14714 (profile_count::verify): Update sanity check.
14715 (profile_probability::verify): Likewise.
14716
14717 2018-01-23 Nathan Sidwell <nathan@acm.org>
14718
14719 * doc/invoke.texi (ffor-scope): Deprecate.
14720
14721 2018-01-23 David Malcolm <dmalcolm@redhat.com>
14722
14723 PR tree-optimization/83510
14724 * domwalk.c (set_all_edges_as_executable): New function.
14725 (dom_walker::dom_walker): Convert bool param
14726 "skip_unreachable_blocks" to enum reachability. Move setup of
14727 edge flags to set_all_edges_as_executable and only do it when
14728 reachability is REACHABLE_BLOCKS.
14729 * domwalk.h (enum dom_walker::reachability): New enum.
14730 (dom_walker::dom_walker): Convert bool param
14731 "skip_unreachable_blocks" to enum reachability.
14732 (set_all_edges_as_executable): New decl.
14733 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
14734 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
14735 "reachability".
14736 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
14737 but converting true to REACHABLE_BLOCKS.
14738 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
14739 * tree-vrp.c
14740 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
14741 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
14742 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
14743 REACHABLE_BLOCKS.
14744 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
14745 if check_all_array_refs will be called.
14746
14747 2018-01-23 David Malcolm <dmalcolm@redhat.com>
14748
14749 * tree.c (selftest::test_location_wrappers): Add more test
14750 coverage.
14751
14752 2018-01-23 David Malcolm <dmalcolm@redhat.com>
14753
14754 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
14755 (selftest::test_bit_in_range): Likewise.
14756
14757 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
14758
14759 PR testsuite/83888
14760 * doc/sourcebuild.texi (vect_float): Say that the selector
14761 only describes the situation when -funsafe-math-optimizations is on.
14762 (vect_float_strict): Document.
14763
14764 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
14765
14766 PR tree-optimization/83965
14767 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14768 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
14769 instead of checking only for a reduction.
14770 (vect_recog_widen_sum_pattern): Likewise.
14771
14772 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
14773
14774 * predict.c (probably_never_executed): Only use precise profile info.
14775 (compute_function_frequency): Skip after inlining hack since we now
14776 have quality checking.
14777
14778 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
14779
14780 * profile-count.h (profile_probability::very_unlikely,
14781 profile_probability::unlikely, profile_probability::even): Set
14782 precision to guessed.
14783
14784 2018-01-23 Richard Biener <rguenther@suse.de>
14785
14786 PR tree-optimization/83963
14787 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
14788 Properly terminate dominator walk when crossing the exit edge not
14789 when visiting its source block.
14790
14791 2018-01-23 Jakub Jelinek <jakub@redhat.com>
14792
14793 PR c++/83918
14794 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
14795 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
14796
14797 2018-01-22 Jakub Jelinek <jakub@redhat.com>
14798
14799 PR tree-optimization/83957
14800 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
14801 semicolon after for body surrounded by braces.
14802
14803 PR tree-optimization/83081
14804 * profile-count.h (profile_probability::split): New method.
14805 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
14806 Use profile_probability::split.
14807 (do_compare_rtx_and_jump): Fix adjustment of probabilities
14808 when splitting a single conditional jump into 2.
14809
14810 2018-01-22 David Malcolm <dmalcolm@redhat.com>
14811
14812 PR tree-optimization/69452
14813 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
14814 decl.
14815
14816 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14817
14818 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
14819 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
14820 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
14821
14822 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14823
14824 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
14825 declaration.
14826 * config/rl78/rl78.md (movdi): New define_expand.
14827 * config/rl78/rl78.c (rl78_split_movdi): New function.
14828
14829 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
14830
14831 PR target/83862
14832 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
14833 no longer used.
14834 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
14835 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
14836 128-bit to produce an UNSPEC move to get the double word with the
14837 signbit and then a shift directly to do signbit.
14838 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
14839 implementation with a new version that just does either a direct
14840 move or a regular move. Move memory interface to separate insns.
14841 Move insns so they are next to the expander.
14842 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
14843 with signbit move. Split big and little endian case.
14844 (signbit<mode>2_dm_mem_le): Likewise.
14845 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
14846 (signbit<mode>2_dm2): Likewise.
14847
14848 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14849
14850 * config/rl78/rl78.md (anddi3): New define_expand.
14851
14852 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14853
14854 * config/rl78/rl78.md (umindi3): New define_expand.
14855
14856 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14857
14858 * config/rl78/rl78.md (smindi3): New define_expand.
14859
14860 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14861
14862 * config/rl78/rl78.md (smaxdi3): New define_expand.
14863
14864 2018-01-22 Carl Love <cel@us.ibm.com>
14865
14866 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
14867 LVX_V1TI): Add macro expansion.
14868 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
14869 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
14870 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
14871 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
14872 Change check to determine if the instruction is a byte reversing
14873 entry. Fix typo in comment.
14874 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
14875 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
14876 Add def_builtin calls for new builtins.
14877 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
14878 Add define_insn expansion.
14879
14880 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14881
14882 * config/rl78/rl78.md (umaxdi3): New define_expand.
14883
14884 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14885
14886 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
14887 for non-QImode registers.
14888
14889 2018-01-22 Richard Biener <rguenther@suse.de>
14890
14891 PR tree-optimization/83963
14892 * graphite-scop-detection.c (scop_detection::get_sese): Delay
14893 including the loop exit block.
14894 (scop_detection::merge_sese): Likewise.
14895 (scop_detection::add_scop): Do it here instead.
14896
14897 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14898
14899 * doc/sourcebuild.texi (arm_softfloat): Document.
14900
14901 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
14902
14903 PR gcc/77734
14904 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
14905 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
14906 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
14907
14908 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14909 David Edelsohn <dje.gcc@gmail.com>
14910
14911 PR target/83946
14912 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14913 Change "crset eq" to "crset 2".
14914 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14915 (*call_indirect_aix<mode>_nospec): Likewise.
14916 (*call_value_indirect_aix<mode>_nospec): Likewise.
14917 (*call_indirect_elfv2<mode>_nospec): Likewise.
14918 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
14919 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
14920 change assembly output from . to $.
14921 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14922 (indirect_jump<mode>_nospec): Change assembly output from . to $.
14923 (*tablejump<mode>_internal1_nospec): Likewise.
14924
14925 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
14926
14927 PR target/80870
14928 * config/sh/sh_optimize_sett_clrt.cc:
14929 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
14930
14931 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
14932
14933 PR tree-optimization/83940
14934 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
14935 offset_dt to vect_constant_def rather than vect_unknown_def_type.
14936 (vect_check_load_store_mask): Add a mask_dt_out parameter and
14937 use it to pass back the definition type.
14938 (vect_check_store_rhs): Likewise rhs_dt_out.
14939 (vect_build_gather_load_calls): Add a mask_dt argument and use
14940 it instead of a call to vect_is_simple_use.
14941 (vectorizable_store): Update calls to vect_check_load_store_mask
14942 and vect_check_store_rhs. Use the dt returned by the latter instead
14943 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
14944 instead of calls to vect_is_simple_use. Pass the scalar rather
14945 than the vector operand to vect_is_simple_use when handling
14946 second and subsequent copies of an rhs value.
14947 (vectorizable_load): Update calls to vect_check_load_store_mask
14948 and vect_build_gather_load_calls. Use the cached mask_dt and
14949 gs_info.offset_dt instead of calls to vect_is_simple_use.
14950
14951 2018-01-20 Jakub Jelinek <jakub@redhat.com>
14952
14953 PR middle-end/83945
14954 * tree-emutls.c: Include gimplify.h.
14955 (lower_emutls_2): New function.
14956 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
14957 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
14958 it before further processing.
14959
14960 PR target/83930
14961 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
14962 UINTVAL (trueop1) instead of INTVAL (op1).
14963
14964 2018-01-19 Jakub Jelinek <jakub@redhat.com>
14965
14966 PR debug/81570
14967 PR debug/83728
14968 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
14969 INCOMING_FRAME_SP_OFFSET if not defined.
14970 (scan_trace): Add ENTRY argument. If true and
14971 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
14972 emit a note to adjust the CFA offset.
14973 (create_cfi_notes): Adjust scan_trace callers.
14974 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
14975 INCOMING_FRAME_SP_OFFSET in the CIE.
14976 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
14977 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
14978 Likewise.
14979 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
14980 * doc/tm.texi: Regenerated.
14981
14982 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14983
14984 PR rtl-optimization/83147
14985 * lra-constraints.c (remove_inheritance_pseudos): Use
14986 lra_substitute_pseudo_within_insn.
14987
14988 2018-01-19 Tom de Vries <tom@codesourcery.com>
14989 Cesar Philippidis <cesar@codesourcery.com>
14990
14991 PR target/83920
14992 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
14993
14994 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
14995
14996 PR target/83790
14997 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
14998 spaces for function labels.
14999
15000 2018-01-19 Martin Liska <mliska@suse.cz>
15001
15002 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
15003 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
15004 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
15005 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
15006 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
15007 (PRED_CONST_RETURN): Change from 69 to 65.
15008 (PRED_NULL_RETURN): Change from 91 to 71.
15009 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
15010 (PRED_LOOP_GUARD): Change from 66 to 73.
15011
15012 2018-01-19 Martin Liska <mliska@suse.cz>
15013
15014 * predict.c (predict_insn_def): Add new assert.
15015 (struct branch_predictor): Change type to signed integer.
15016 (test_prediction_value_range): Amend test to cover
15017 PROB_UNINITIALIZED.
15018 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
15019 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
15020 (PRED_LOOP_ITERATIONS_MAX): Likewise.
15021 (PRED_LOOP_IV_COMPARE): Likewise.
15022 * predict.h (PROB_UNINITIALIZED): Define new constant.
15023
15024 2018-01-19 Martin Liska <mliska@suse.cz>
15025
15026 * predict.c (dump_prediction): Add new format for
15027 analyze_brprob.py script which is enabled with -details
15028 suboption.
15029 * profile-count.h (precise_p): New function.
15030
15031 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
15032
15033 PR tree-optimization/83922
15034 * tree-vect-loop.c (vect_verify_full_masking): Return false if
15035 there are no statements that need masking.
15036 (vect_active_double_reduction_p): New function.
15037 (vect_analyze_loop_operations): Use it when handling phis that
15038 are not in the loop header.
15039
15040 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
15041
15042 PR tree-optimization/83914
15043 * tree-vect-loop.c (vectorizable_induction): Don't convert
15044 init_expr or apply the peeling adjustment for inductions
15045 that are nested within the vectorized loop.
15046
15047 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15048
15049 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
15050 instead of NEG.
15051
15052 2018-01-18 Jakub Jelinek <jakub@redhat.com>
15053
15054 PR sanitizer/81715
15055 PR testsuite/83882
15056 * function.h (gimplify_parameters): Add gimple_seq * argument.
15057 * function.c: Include gimple.h and options.h.
15058 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
15059 for the added local temporaries if needed.
15060 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
15061 if there are any parameter cleanups, wrap whole body into a
15062 try/finally with the cleanups.
15063
15064 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
15065
15066 PR target/82964
15067 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
15068 Use GET_MODE_CLASS for scalar floating point.
15069
15070 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
15071
15072 PR ipa/82256
15073 patch by PaX Team
15074 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
15075 Fix call of call_cgraph_insertion_hooks.
15076
15077 2018-01-18 Martin Sebor <msebor@redhat.com>
15078
15079 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
15080
15081 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
15082
15083 PR ipa/83619
15084 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
15085 frequencies.
15086
15087 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
15088
15089 PR other/70268
15090 * common.opt: (-ffile-prefix-map): New option.
15091 * opts.c (common_handle_option): Defer it.
15092 * opts-global.c (handle_common_deferred_options): Handle it.
15093 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
15094 * file-prefix-map.h: New file.
15095 (remap_debug_filename, add_debug_prefix_map): ...here.
15096 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
15097 * final.c (debug_prefix_map, add_debug_prefix_map
15098 remap_debug_filename): Move to...
15099 * file-prefix-map.c: New file.
15100 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
15101 generalize, get rid of alloca(), use strrchr() instead of strchr().
15102 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
15103 Implement in terms of add_prefix_map().
15104 (remap_macro_filename, remap_debug_filename): Implement in term of
15105 remap_filename().
15106 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
15107 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
15108 * dbxout.c: Include file-prefix-map.h.
15109 * varasm.c: Likewise.
15110 * vmsdbgout.c: Likewise.
15111 * xcoffout.c: Likewise.
15112 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
15113 * doc/cppopts.texi (-fmacro-prefix-map): Document.
15114 * doc/invoke.texi (-ffile-prefix-map): Document.
15115 (-fdebug-prefix-map): Update description.
15116
15117 2018-01-18 Martin Liska <mliska@suse.cz>
15118
15119 * config/i386/i386.c (indirect_thunk_name): Document that also
15120 lfence is emitted.
15121 (output_indirect_thunk): Document why both instructions
15122 (pause and lfence) are generated.
15123
15124 2018-01-18 Richard Biener <rguenther@suse.de>
15125
15126 PR tree-optimization/83887
15127 * graphite-scop-detection.c
15128 (scop_detection::get_nearest_dom_with_single_entry): Remove.
15129 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
15130 (scop_detection::merge_sese): Re-implement with a flood-fill
15131 algorithm that properly finds a SESE region if it exists.
15132
15133 2018-01-18 Jakub Jelinek <jakub@redhat.com>
15134
15135 PR c/61240
15136 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
15137 pointer_diff optimizations use view_convert instead of convert.
15138
15139 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15140
15141 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15142 Generate different code for -mno-speculate-indirect-jumps.
15143 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15144 (*call_indirect_aix<mode>): Disable for
15145 -mno-speculate-indirect-jumps.
15146 (*call_indirect_aix<mode>_nospec): New define_insn.
15147 (*call_value_indirect_aix<mode>): Disable for
15148 -mno-speculate-indirect-jumps.
15149 (*call_value_indirect_aix<mode>_nospec): New define_insn.
15150 (*sibcall_nonlocal_sysv<mode>): Generate different code for
15151 -mno-speculate-indirect-jumps.
15152 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15153
15154 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
15155
15156 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
15157 long double type, set the flags for noting the default long double
15158 type, even if we don't pass or return a long double type.
15159
15160 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
15161
15162 PR ipa/83051
15163 * ipa-inline.c (flatten_function): Do not overwrite final inlining
15164 failure.
15165
15166 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
15167
15168 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
15169 support for merge[hl].
15170 (fold_mergehl_helper): New helper function.
15171 (tree-vector-builder.h): New #include for tree_vector_builder usage.
15172 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
15173 (altivec_vmrglw_direct): Add xxmrglw insn.
15174
15175 2018-01-17 Andrew Waterman <andrew@sifive.com>
15176
15177 * config/riscv/riscv.c (riscv_conditional_register_usage): If
15178 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
15179
15180 2018-01-17 David Malcolm <dmalcolm@redhat.com>
15181
15182 PR lto/83121
15183 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
15184 call the lto_location_cache before reading the
15185 DECL_SOURCE_LOCATION of the types.
15186
15187 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
15188 Richard Sandiford <richard.sandiford@linaro.org>
15189
15190 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
15191 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
15192 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
15193 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
15194 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
15195 Add declaration.
15196 * config/aarch64/constraints.md (aarch64_movti_operand):
15197 Limit immediates.
15198 * config/aarch64/predicates.md (Uti): Add new constraint.
15199
15200 2018-01-17 Carl Love <cel@us.ibm.com>
15201
15202 * config/rs6000/vsx.md (define_expand xl_len_r,
15203 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
15204 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
15205 lxvll.
15206 (define_expand, define_insn): Move the shift left from the
15207 define_insn to the define_expand for lxvl and stxvl instructions.
15208 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
15209 and XL_LEN_R definitions to PURE.
15210
15211 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
15212
15213 * config/i386/i386.c (indirect_thunk_name): Declare regno
15214 as unsigned int. Compare regno with INVALID_REGNUM.
15215 (output_indirect_thunk): Ditto.
15216 (output_indirect_thunk_function): Ditto.
15217 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
15218 in the call to output_indirect_thunk_function.
15219
15220 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
15221
15222 PR middle-end/83884
15223 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
15224 rather than the size of inner_type to determine the stack slot size
15225 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
15226
15227 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
15228
15229 PR target/83546
15230 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
15231 to PTA_SILVERMONT.
15232
15233 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
15234
15235 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
15236 endian Linux systems to optionally enable multilibs for selecting
15237 the long double type if the user configured an explicit type.
15238 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
15239 have no long double multilibs if not defined.
15240 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
15241 warn if the user used -mabi={ieee,ibm}longdouble and we built
15242 multilibs for long double.
15243 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
15244 appropriate multilib option.
15245 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
15246 multilib options.
15247 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
15248 for building long double multilibs.
15249 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
15250
15251 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
15252
15253 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
15254 copies.
15255
15256 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
15257 64 bits.
15258 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
15259 128 bits.
15260
15261 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
15262 variables.
15263
15264 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
15265 return value.
15266
15267 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15268
15269 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
15270 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
15271
15272 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
15273
15274 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
15275 different rtl trees depending on TARGET_64BIT.
15276 (rs6000_gen_lvx): Likewise.
15277
15278 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15279
15280 * config/visium/visium.md (nop): Tweak comment.
15281 (hazard_nop): Likewise.
15282
15283 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15284
15285 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
15286 -mspeculate-indirect-jumps.
15287 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
15288 for -mno-speculate-indirect-jumps.
15289 (*call_indirect_elfv2<mode>_nospec): New define_insn.
15290 (*call_value_indirect_elfv2<mode>): Disable for
15291 -mno-speculate-indirect-jumps.
15292 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
15293 (indirect_jump): Emit different RTL for
15294 -mno-speculate-indirect-jumps.
15295 (*indirect_jump<mode>): Disable for
15296 -mno-speculate-indirect-jumps.
15297 (*indirect_jump<mode>_nospec): New define_insn.
15298 (tablejump): Emit different RTL for
15299 -mno-speculate-indirect-jumps.
15300 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
15301 (tablejumpsi_nospec): New define_expand.
15302 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
15303 (tablejumpdi_nospec): New define_expand.
15304 (*tablejump<mode>_internal1): Disable for
15305 -mno-speculate-indirect-jumps.
15306 (*tablejump<mode>_internal1_nospec): New define_insn.
15307 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
15308 option.
15309
15310 2018-01-16 Artyom Skrobov tyomitch@gmail.com
15311
15312 * caller-save.c (insert_save): Drop unnecessary parameter. All
15313 callers updated.
15314
15315 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15316 Richard Biener <rguenth@suse.de>
15317
15318 PR libgomp/83590
15319 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
15320 return early, inline manually is_gimple_sizepos. Make sure if we
15321 call gimplify_expr we don't end up with a gimple constant.
15322 * tree.c (variably_modified_type_p): Don't return true for
15323 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
15324 * gimplify.h (is_gimple_sizepos): Remove.
15325
15326 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15327
15328 PR tree-optimization/83857
15329 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
15330 vectorizable_live_operation for pure SLP statements.
15331 (vectorizable_live_operation): Handle PHIs.
15332
15333 2018-01-16 Richard Biener <rguenther@suse.de>
15334
15335 PR tree-optimization/83867
15336 * tree-vect-stmts.c (vect_transform_stmt): Precompute
15337 nested_in_vect_loop_p since the scalar stmt may get invalidated.
15338
15339 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15340
15341 PR c/83844
15342 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
15343 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
15344 If off is not INTEGER_CST, issue a may not be aligned warning
15345 rather than isn't aligned. Use isn%'t rather than isn't.
15346 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
15347 into MULT_EXPR.
15348 <case MULT_EXPR>: Improve the case when bottom and one of the
15349 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
15350 operand, in that case check if the other operand is multiple of
15351 bottom divided by the INTEGER_CST operand.
15352
15353 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15354
15355 PR target/83858
15356 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
15357 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
15358 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
15359 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
15360 * config/pa/pa.c (pa_function_arg_advance): Likewise.
15361 (pa_function_arg, pa_arg_partial_bytes): Likewise.
15362 (pa_function_arg_size): New function.
15363
15364 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15365
15366 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
15367 in a separate statement.
15368
15369 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15370
15371 PR tree-optimization/83847
15372 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
15373 group gathers and scatters.
15374
15375 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15376
15377 PR rtl-optimization/86620
15378 * params.def (max-sched-ready-insns): Bump minimum value to 1.
15379
15380 PR rtl-optimization/83213
15381 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
15382 to last if both are JUMP_INSNs.
15383
15384 PR tree-optimization/83843
15385 * gimple-ssa-store-merging.c
15386 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
15387 store_immediate_info for bswap/nop orig_stores.
15388
15389 2018-01-15 Andrew Waterman <andrew@sifive.com>
15390
15391 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
15392 !TARGET_MUL.
15393 <UDIV>: Increase cost if !TARGET_DIV.
15394
15395 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
15396
15397 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
15398 (define_attr "cr_logical_3op"): New.
15399 (cceq_ior_compare): Adjust.
15400 (cceq_ior_compare_complement): Adjust.
15401 (*cceq_rev_compare): Adjust.
15402 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
15403 (is_cracked_insn): Adjust.
15404 (insn_must_be_first_in_group): Adjust.
15405 * config/rs6000/40x.md: Adjust.
15406 * config/rs6000/440.md: Adjust.
15407 * config/rs6000/476.md: Adjust.
15408 * config/rs6000/601.md: Adjust.
15409 * config/rs6000/603.md: Adjust.
15410 * config/rs6000/6xx.md: Adjust.
15411 * config/rs6000/7450.md: Adjust.
15412 * config/rs6000/7xx.md: Adjust.
15413 * config/rs6000/8540.md: Adjust.
15414 * config/rs6000/cell.md: Adjust.
15415 * config/rs6000/e300c2c3.md: Adjust.
15416 * config/rs6000/e500mc.md: Adjust.
15417 * config/rs6000/e500mc64.md: Adjust.
15418 * config/rs6000/e5500.md: Adjust.
15419 * config/rs6000/e6500.md: Adjust.
15420 * config/rs6000/mpc.md: Adjust.
15421 * config/rs6000/power4.md: Adjust.
15422 * config/rs6000/power5.md: Adjust.
15423 * config/rs6000/power6.md: Adjust.
15424 * config/rs6000/power7.md: Adjust.
15425 * config/rs6000/power8.md: Adjust.
15426 * config/rs6000/power9.md: Adjust.
15427 * config/rs6000/rs64.md: Adjust.
15428 * config/rs6000/titan.md: Adjust.
15429
15430 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15431
15432 * config/i386/predicates.md (indirect_branch_operand): Rewrite
15433 ix86_indirect_branch_register logic.
15434
15435 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15436
15437 * config/i386/constraints.md (Bs): Update
15438 ix86_indirect_branch_register check. Don't check
15439 ix86_indirect_branch_register with GOT_memory_operand.
15440 (Bw): Likewise.
15441 * config/i386/predicates.md (GOT_memory_operand): Don't check
15442 ix86_indirect_branch_register here.
15443 (GOT32_symbol_operand): Likewise.
15444
15445 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15446
15447 * config/i386/predicates.md (constant_call_address_operand):
15448 Rewrite ix86_indirect_branch_register logic.
15449 (sibcall_insn_operand): Likewise.
15450
15451 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15452
15453 * config/i386/constraints.md (Bs): Replace
15454 ix86_indirect_branch_thunk_register with
15455 ix86_indirect_branch_register.
15456 (Bw): Likewise.
15457 * config/i386/i386.md (indirect_jump): Likewise.
15458 (tablejump): Likewise.
15459 (*sibcall_memory): Likewise.
15460 (*sibcall_value_memory): Likewise.
15461 Peepholes of indirect call and jump via memory: Likewise.
15462 * config/i386/i386.opt: Likewise.
15463 * config/i386/predicates.md (indirect_branch_operand): Likewise.
15464 (GOT_memory_operand): Likewise.
15465 (call_insn_operand): Likewise.
15466 (sibcall_insn_operand): Likewise.
15467 (GOT32_symbol_operand): Likewise.
15468
15469 2018-01-15 Jakub Jelinek <jakub@redhat.com>
15470
15471 PR middle-end/83837
15472 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
15473 type rather than type addr's type points to.
15474 (expand_omp_atomic_mutex): Likewise.
15475 (expand_omp_atomic): Likewise.
15476
15477 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
15478
15479 PR target/83839
15480 * config/i386/i386.c (output_indirect_thunk_function): Use
15481 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
15482 for __x86_return_thunk.
15483
15484 2018-01-15 Richard Biener <rguenther@suse.de>
15485
15486 PR middle-end/83850
15487 * expmed.c (extract_bit_field_1): Fix typo.
15488
15489 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15490
15491 PR target/83687
15492 * config/arm/iterators.md (VF): New mode iterator.
15493 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
15494 Remove integer-related logic from pattern.
15495 (neon_vabd<mode>_3): Likewise.
15496
15497 2018-01-15 Jakub Jelinek <jakub@redhat.com>
15498
15499 PR middle-end/82694
15500 * common.opt (fstrict-overflow): No longer an alias.
15501 (fwrapv-pointer): New option.
15502 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
15503 also for pointer types based on flag_wrapv_pointer.
15504 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
15505 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
15506 opts->x_flag_wrapv got set.
15507 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
15508 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
15509 POINTER_TYPE_OVERFLOW_UNDEFINED.
15510 * match.pd: Likewise in address comparison pattern.
15511 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
15512
15513 2018-01-15 Richard Biener <rguenther@suse.de>
15514
15515 PR lto/83804
15516 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
15517 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
15518 Reset type names to their identifier if their TYPE_DECL doesn't
15519 have linkage (and thus is used for ODR and devirt).
15520 (save_debug_info_for_decl): Remove.
15521 (save_debug_info_for_type): Likewise.
15522 (add_tree_to_fld_list): Adjust.
15523 * tree-pretty-print.c (dump_generic_node): Make dumping of
15524 type names more robust.
15525
15526 2018-01-15 Richard Biener <rguenther@suse.de>
15527
15528 * BASE-VER: Bump to 8.0.1.
15529
15530 2018-01-14 Martin Sebor <msebor@redhat.com>
15531
15532 PR other/83508
15533 * builtins.c (check_access): Avoid warning when the no-warning bit
15534 is set.
15535
15536 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
15537
15538 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
15539 * ira-color (allocno_hard_regs_compare): Likewise.
15540
15541 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
15542
15543 PR target/83013
15544 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
15545 Use .pushsection/.popsection.
15546
15547 2018-01-14 Martin Sebor <msebor@redhat.com>
15548
15549 PR c++/81327
15550 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
15551
15552 2018-01-14 Jakub Jelinek <jakub@redhat.com>
15553
15554 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
15555 entry from extra_headers.
15556 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
15557 extra_headers, make the list bitwise identical to the i?86-*-* one.
15558
15559 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15560
15561 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
15562 -mcmodel=large with -mindirect-branch=thunk,
15563 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
15564 -mfunction-return=thunk-extern.
15565 * doc/invoke.texi: Document -mcmodel=large is incompatible with
15566 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
15567 -mfunction-return=thunk and -mfunction-return=thunk-extern.
15568
15569 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15570
15571 * config/i386/i386.c (print_reg): Print the name of the full
15572 integer register without '%'.
15573 (ix86_print_operand): Handle 'V'.
15574 * doc/extend.texi: Document 'V' modifier.
15575
15576 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15577
15578 * config/i386/constraints.md (Bs): Disallow memory operand for
15579 -mindirect-branch-register.
15580 (Bw): Likewise.
15581 * config/i386/predicates.md (indirect_branch_operand): Likewise.
15582 (GOT_memory_operand): Likewise.
15583 (call_insn_operand): Likewise.
15584 (sibcall_insn_operand): Likewise.
15585 (GOT32_symbol_operand): Likewise.
15586 * config/i386/i386.md (indirect_jump): Call convert_memory_address
15587 for -mindirect-branch-register.
15588 (tablejump): Likewise.
15589 (*sibcall_memory): Likewise.
15590 (*sibcall_value_memory): Likewise.
15591 Disallow peepholes of indirect call and jump via memory for
15592 -mindirect-branch-register.
15593 (*call_pop): Replace m with Bw.
15594 (*call_value_pop): Likewise.
15595 (*sibcall_pop_memory): Replace m with Bs.
15596 * config/i386/i386.opt (mindirect-branch-register): New option.
15597 * doc/invoke.texi: Document -mindirect-branch-register option.
15598
15599 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15600
15601 * config/i386/i386-protos.h (ix86_output_function_return): New.
15602 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
15603 set function_return_type.
15604 (indirect_thunk_name): Add ret_p to indicate thunk for function
15605 return.
15606 (output_indirect_thunk_function): Pass false to
15607 indirect_thunk_name.
15608 (ix86_output_indirect_branch_via_reg): Likewise.
15609 (ix86_output_indirect_branch_via_push): Likewise.
15610 (output_indirect_thunk_function): Create alias for function
15611 return thunk if regno < 0.
15612 (ix86_output_function_return): New function.
15613 (ix86_handle_fndecl_attribute): Handle function_return.
15614 (ix86_attribute_table): Add function_return.
15615 * config/i386/i386.h (machine_function): Add
15616 function_return_type.
15617 * config/i386/i386.md (simple_return_internal): Use
15618 ix86_output_function_return.
15619 (simple_return_internal_long): Likewise.
15620 * config/i386/i386.opt (mfunction-return=): New option.
15621 (indirect_branch): Mention -mfunction-return=.
15622 * doc/extend.texi: Document function_return function attribute.
15623 * doc/invoke.texi: Document -mfunction-return= option.
15624
15625 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15626
15627 * config/i386/i386-opts.h (indirect_branch): New.
15628 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
15629 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
15630 with local indirect jump when converting indirect call and jump.
15631 (ix86_set_indirect_branch_type): New.
15632 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
15633 (indirectlabelno): New.
15634 (indirect_thunk_needed): Likewise.
15635 (indirect_thunk_bnd_needed): Likewise.
15636 (indirect_thunks_used): Likewise.
15637 (indirect_thunks_bnd_used): Likewise.
15638 (INDIRECT_LABEL): Likewise.
15639 (indirect_thunk_name): Likewise.
15640 (output_indirect_thunk): Likewise.
15641 (output_indirect_thunk_function): Likewise.
15642 (ix86_output_indirect_branch_via_reg): Likewise.
15643 (ix86_output_indirect_branch_via_push): Likewise.
15644 (ix86_output_indirect_branch): Likewise.
15645 (ix86_output_indirect_jmp): Likewise.
15646 (ix86_code_end): Call output_indirect_thunk_function if needed.
15647 (ix86_output_call_insn): Call ix86_output_indirect_branch if
15648 needed.
15649 (ix86_handle_fndecl_attribute): Handle indirect_branch.
15650 (ix86_attribute_table): Add indirect_branch.
15651 * config/i386/i386.h (machine_function): Add indirect_branch_type
15652 and has_local_indirect_jump.
15653 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
15654 to true.
15655 (tablejump): Likewise.
15656 (*indirect_jump): Use ix86_output_indirect_jmp.
15657 (*tablejump_1): Likewise.
15658 (simple_return_indirect_internal): Likewise.
15659 * config/i386/i386.opt (mindirect-branch=): New option.
15660 (indirect_branch): New.
15661 (keep): Likewise.
15662 (thunk): Likewise.
15663 (thunk-inline): Likewise.
15664 (thunk-extern): Likewise.
15665 * doc/extend.texi: Document indirect_branch function attribute.
15666 * doc/invoke.texi: Document -mindirect-branch= option.
15667
15668 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
15669
15670 PR ipa/83051
15671 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
15672
15673 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
15674
15675 * ipa-inline.c (want_inline_small_function_p): Return false if
15676 inlining has already failed with CIF_FINAL_ERROR.
15677 (update_caller_keys): Call want_inline_small_function_p before
15678 can_inline_edge_p.
15679 (update_callee_keys): Likewise.
15680
15681 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15682
15683 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
15684 New function.
15685 (rs6000_quadword_masked_address_p): Likewise.
15686 (quad_aligned_load_p): Likewise.
15687 (quad_aligned_store_p): Likewise.
15688 (const_load_sequence_p): Add comment to describe the outer-most loop.
15689 (mimic_memory_attributes_and_flags): New function.
15690 (rs6000_gen_stvx): Likewise.
15691 (replace_swapped_aligned_store): Likewise.
15692 (rs6000_gen_lvx): Likewise.
15693 (replace_swapped_aligned_load): Likewise.
15694 (replace_swapped_load_constant): Capitalize argument name in
15695 comment describing this function.
15696 (rs6000_analyze_swaps): Add a third pass to search for vector loads
15697 and stores that access quad-word aligned addresses and replace
15698 with stvx or lvx instructions when appropriate.
15699 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
15700 New function prototype.
15701 (rs6000_quadword_masked_address_p): Likewise.
15702 (rs6000_gen_lvx): Likewise.
15703 (rs6000_gen_stvx): Likewise.
15704 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
15705 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
15706 when memory address is aligned.
15707 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
15708 this split to select lvx instruction when memory address is aligned.
15709 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
15710 instruction when memory address is aligned.
15711 (*vsx_le_perm_load_v16qi): Likewise.
15712 (four unnamed splitters): Modify to select the stvx instruction
15713 when memory is aligned.
15714
15715 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
15716
15717 * predict.c (determine_unlikely_bbs): Handle correctly BBs
15718 which appears in the queue multiple times.
15719
15720 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15721 Alan Hayward <alan.hayward@arm.com>
15722 David Sherwood <david.sherwood@arm.com>
15723
15724 * tree-vectorizer.h (vec_lower_bound): New structure.
15725 (_loop_vec_info): Add check_nonzero and lower_bounds.
15726 (LOOP_VINFO_CHECK_NONZERO): New macro.
15727 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
15728 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
15729 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
15730 fields. Make seg_len the distance travelled, not including the
15731 access size.
15732 (dr_direction_indicator): Declare.
15733 (dr_zero_step_indicator): Likewise.
15734 (dr_known_forward_stride_p): Likewise.
15735 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
15736 tree-ssanames.h.
15737 (runtime_alias_check_p): Allow runtime alias checks with
15738 variable strides.
15739 (operator ==): Compare access_size and align.
15740 (prune_runtime_alias_test_list): Rework for new distinction between
15741 the access_size and seg_len.
15742 (create_intersect_range_checks_index): Likewise. Cope with polynomial
15743 segment lengths.
15744 (get_segment_min_max): New function.
15745 (create_intersect_range_checks): Use it.
15746 (dr_step_indicator): New function.
15747 (dr_direction_indicator): Likewise.
15748 (dr_zero_step_indicator): Likewise.
15749 (dr_known_forward_stride_p): Likewise.
15750 * tree-loop-distribution.c (data_ref_segment_size): Return
15751 DR_STEP * (niters - 1).
15752 (compute_alias_check_pairs): Update call to the dr_with_seg_len
15753 constructor.
15754 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
15755 (vect_preserves_scalar_order_p): New function, split out from...
15756 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
15757 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
15758 (vect_vfa_access_size): New function.
15759 (vect_vfa_align): Likewise.
15760 (vect_compile_time_alias): Take access_size_a and access_b arguments.
15761 (dump_lower_bound): New function.
15762 (vect_check_lower_bound): Likewise.
15763 (vect_small_gap_p): Likewise.
15764 (vectorizable_with_step_bound_p): Likewise.
15765 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
15766 depencies if the vectorization factor is 1. Convert the checks
15767 for nonzero steps into checks on the bounds of DR_STEP. Try using
15768 a bunds check for variable steps if the minimum required step is
15769 relatively small. Update calls to the dr_with_seg_len
15770 constructor and to vect_compile_time_alias.
15771 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
15772 function.
15773 (vect_loop_versioning): Call it.
15774 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
15775 when retrying.
15776 (vect_estimate_min_profitable_iters): Account for any bounds checks.
15777
15778 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15779 Alan Hayward <alan.hayward@arm.com>
15780 David Sherwood <david.sherwood@arm.com>
15781
15782 * doc/sourcebuild.texi (vect_scatter_store): Document.
15783 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
15784 optabs.
15785 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
15786 Document.
15787 * genopinit.c (main): Add supports_vec_scatter_store and
15788 supports_vec_scatter_store_cached to target_optabs.
15789 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
15790 IFN_MASK_SCATTER_STORE.
15791 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
15792 functions.
15793 * internal-fn.h (internal_store_fn_p): Declare.
15794 (internal_fn_stored_value_index): Likewise.
15795 * internal-fn.c (scatter_store_direct): New macro.
15796 (expand_scatter_store_optab_fn): New function.
15797 (direct_scatter_store_optab_supported_p): New macro.
15798 (internal_store_fn_p): New function.
15799 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
15800 IFN_MASK_SCATTER_STORE.
15801 (internal_fn_mask_index): Likewise.
15802 (internal_fn_stored_value_index): New function.
15803 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
15804 for scatter stores.
15805 * optabs-query.h (supports_vec_scatter_store_p): Declare.
15806 * optabs-query.c (supports_vec_scatter_store_p): New function.
15807 * tree-vectorizer.h (vect_get_store_rhs): Declare.
15808 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
15809 true for scatter stores.
15810 (vect_gather_scatter_fn_p): Handle scatter stores too.
15811 (vect_check_gather_scatter): Consider using scatter stores if
15812 supports_vec_scatter_store_p.
15813 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
15814 scatter stores too.
15815 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15816 internal_fn_stored_value_index.
15817 (check_load_store_masking): Handle scatter stores too.
15818 (vect_get_store_rhs): Make public.
15819 (vectorizable_call): Use internal_store_fn_p.
15820 (vectorizable_store): Handle scatter store internal functions.
15821 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
15822 when deciding whether the end of the group has been reached.
15823 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
15824 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
15825 (mask_scatter_store<mode>): New insns.
15826
15827 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15828 Alan Hayward <alan.hayward@arm.com>
15829 David Sherwood <david.sherwood@arm.com>
15830
15831 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
15832 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
15833 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
15834 function.
15835 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
15836 Use vect_truncate_gather_scatter_offset if we can't treat the
15837 operation as a normal gather load or scatter store.
15838 (get_group_load_store_type): Take the gather_scatter_info
15839 as argument. Try using a gather load or scatter store for
15840 single-element groups.
15841 (get_load_store_type): Update calls to get_group_load_store_type
15842 and vect_use_strided_gather_scatters_p.
15843
15844 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15845 Alan Hayward <alan.hayward@arm.com>
15846 David Sherwood <david.sherwood@arm.com>
15847
15848 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
15849 optional tree argument.
15850 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
15851 null target hooks.
15852 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
15853 but continue to use the current value as a fallback.
15854 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
15855 to compare the updates.
15856 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
15857 (get_load_store_type): Use it when handling a strided access.
15858 (vect_get_strided_load_store_ops): New function.
15859 (vect_get_data_ptr_increment): Likewise.
15860 (vectorizable_load): Handle strided gather loads. Always pass
15861 a step to vect_create_data_ref_ptr and bump_vector_ptr.
15862
15863 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15864 Alan Hayward <alan.hayward@arm.com>
15865 David Sherwood <david.sherwood@arm.com>
15866
15867 * doc/md.texi (gather_load@var{m}): Document.
15868 (mask_gather_load@var{m}): Likewise.
15869 * genopinit.c (main): Add supports_vec_gather_load and
15870 supports_vec_gather_load_cached to target_optabs.
15871 * optabs-tree.c (init_tree_optimization_optabs): Use
15872 ggc_cleared_alloc to allocate target_optabs.
15873 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
15874 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
15875 functions.
15876 * internal-fn.h (internal_load_fn_p): Declare.
15877 (internal_gather_scatter_fn_p): Likewise.
15878 (internal_fn_mask_index): Likewise.
15879 (internal_gather_scatter_fn_supported_p): Likewise.
15880 * internal-fn.c (gather_load_direct): New macro.
15881 (expand_gather_load_optab_fn): New function.
15882 (direct_gather_load_optab_supported_p): New macro.
15883 (direct_internal_fn_optab): New function.
15884 (internal_load_fn_p): Likewise.
15885 (internal_gather_scatter_fn_p): Likewise.
15886 (internal_fn_mask_index): Likewise.
15887 (internal_gather_scatter_fn_supported_p): Likewise.
15888 * optabs-query.c (supports_at_least_one_mode_p): New function.
15889 (supports_vec_gather_load_p): Likewise.
15890 * optabs-query.h (supports_vec_gather_load_p): Declare.
15891 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
15892 and memory_type field.
15893 (NUM_PATTERNS): Bump to 15.
15894 * tree-vect-data-refs.c: Include internal-fn.h.
15895 (vect_gather_scatter_fn_p): New function.
15896 (vect_describe_gather_scatter_call): Likewise.
15897 (vect_check_gather_scatter): Try using internal functions for
15898 gather loads. Recognize existing calls to a gather load function.
15899 (vect_analyze_data_refs): Consider using gather loads if
15900 supports_vec_gather_load_p.
15901 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
15902 (vect_get_gather_scatter_offset_type): Likewise.
15903 (vect_convert_mask_for_vectype): Likewise.
15904 (vect_add_conversion_to_patterm): Likewise.
15905 (vect_try_gather_scatter_pattern): Likewise.
15906 (vect_recog_gather_scatter_pattern): New pattern recognizer.
15907 (vect_vect_recog_func_ptrs): Add it.
15908 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15909 internal_fn_mask_index and internal_gather_scatter_fn_p.
15910 (check_load_store_masking): Take the gather_scatter_info as an
15911 argument and handle gather loads.
15912 (vect_get_gather_scatter_ops): New function.
15913 (vectorizable_call): Check internal_load_fn_p.
15914 (vectorizable_load): Likewise. Handle gather load internal
15915 functions.
15916 (vectorizable_store): Update call to check_load_store_masking.
15917 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
15918 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
15919 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
15920 (aarch64_gather_scale_operand_d): New predicates.
15921 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
15922 (mask_gather_load<mode>): New insns.
15923
15924 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15925 Alan Hayward <alan.hayward@arm.com>
15926 David Sherwood <david.sherwood@arm.com>
15927
15928 * optabs.def (fold_left_plus_optab): New optab.
15929 * doc/md.texi (fold_left_plus_@var{m}): Document.
15930 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
15931 * internal-fn.c (fold_left_direct): Define.
15932 (expand_fold_left_optab_fn): Likewise.
15933 (direct_fold_left_optab_supported_p): Likewise.
15934 * fold-const-call.c (fold_const_fold_left): New function.
15935 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
15936 * tree-parloops.c (valid_reduction_p): New function.
15937 (gather_scalar_reductions): Use it.
15938 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
15939 (vect_finish_replace_stmt): Declare.
15940 * tree-vect-loop.c (fold_left_reduction_fn): New function.
15941 (needs_fold_left_reduction_p): New function, split out from...
15942 (vect_is_simple_reduction): ...here. Accept reductions that
15943 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
15944 (vect_force_simple_reduction): Also store the reduction type in
15945 the assignment's STMT_VINFO_REDUC_TYPE.
15946 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
15947 (merge_with_identity): New function.
15948 (vect_expand_fold_left): Likewise.
15949 (vectorize_fold_left_reduction): Likewise.
15950 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
15951 scalar phi in place for it. Check for target support and reject
15952 cases that would reassociate the operation. Defer the transform
15953 phase to vectorize_fold_left_reduction.
15954 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
15955 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
15956 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
15957
15958 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15959
15960 * tree-if-conv.c (predicate_mem_writes): Remove redundant
15961 call to ifc_temp_var.
15962
15963 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15964 Alan Hayward <alan.hayward@arm.com>
15965 David Sherwood <david.sherwood@arm.com>
15966
15967 * target.def (legitimize_address_displacement): Take the original
15968 offset as a poly_int.
15969 * targhooks.h (default_legitimize_address_displacement): Update
15970 accordingly.
15971 * targhooks.c (default_legitimize_address_displacement): Likewise.
15972 * doc/tm.texi: Regenerate.
15973 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
15974 as an argument, moving assert of ad->disp == ad->disp_term to...
15975 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
15976 Try calling targetm.legitimize_address_displacement before expanding
15977 the address rather than afterwards, and adjust for the new interface.
15978 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
15979 Match the new hook interface. Handle SVE addresses.
15980 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
15981 new hook interface.
15982
15983 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15984
15985 * Makefile.in (OBJS): Add early-remat.o.
15986 * target.def (select_early_remat_modes): New hook.
15987 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
15988 * doc/tm.texi: Regenerate.
15989 * targhooks.h (default_select_early_remat_modes): Declare.
15990 * targhooks.c (default_select_early_remat_modes): New function.
15991 * timevar.def (TV_EARLY_REMAT): New timevar.
15992 * passes.def (pass_early_remat): New pass.
15993 * tree-pass.h (make_pass_early_remat): Declare.
15994 * early-remat.c: New file.
15995 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
15996 function.
15997 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
15998
15999 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16000 Alan Hayward <alan.hayward@arm.com>
16001 David Sherwood <david.sherwood@arm.com>
16002
16003 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
16004 vfm1 with a bound_epilog parameter.
16005 (vect_do_peeling): Update calls accordingly, and move the prologue
16006 call earlier in the function. Treat the base bound_epilog as 0 for
16007 fully-masked loops and retain vf - 1 for other loops. Add 1 to
16008 this base when peeling for gaps.
16009 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
16010 with fully-masked loops.
16011 (vect_estimate_min_profitable_iters): Handle the single peeled
16012 iteration in that case.
16013
16014 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16015 Alan Hayward <alan.hayward@arm.com>
16016 David Sherwood <david.sherwood@arm.com>
16017
16018 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
16019 single-element interleaving even if the size is not a power of 2.
16020 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
16021 accesses for single-element interleaving if the group size is
16022 not a power of 2.
16023
16024 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16025 Alan Hayward <alan.hayward@arm.com>
16026 David Sherwood <david.sherwood@arm.com>
16027
16028 * doc/md.texi (fold_extract_last_@var{m}): Document.
16029 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
16030 * optabs.def (fold_extract_last_optab): New optab.
16031 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
16032 * internal-fn.c (fold_extract_direct): New macro.
16033 (expand_fold_extract_optab_fn): Likewise.
16034 (direct_fold_extract_optab_supported_p): Likewise.
16035 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
16036 * tree-vect-loop.c (vect_model_reduction_cost): Handle
16037 EXTRACT_LAST_REDUCTION.
16038 (get_initial_def_for_reduction): Do not create an initial vector
16039 for EXTRACT_LAST_REDUCTION reductions.
16040 (vectorizable_reduction): Leave the scalar phi in place for
16041 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
16042 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
16043 epilogue code for EXTRACT_LAST_REDUCTION and defer the
16044 transform phase to vectorizable_condition.
16045 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
16046 split out from...
16047 (vect_finish_stmt_generation): ...here.
16048 (vect_finish_replace_stmt): New function.
16049 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
16050 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
16051 pattern.
16052 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
16053
16054 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16055 Alan Hayward <alan.hayward@arm.com>
16056 David Sherwood <david.sherwood@arm.com>
16057
16058 * doc/md.texi (extract_last_@var{m}): Document.
16059 * optabs.def (extract_last_optab): New optab.
16060 * internal-fn.def (EXTRACT_LAST): New internal function.
16061 * internal-fn.c (cond_unary_direct): New macro.
16062 (expand_cond_unary_optab_fn): Likewise.
16063 (direct_cond_unary_optab_supported_p): Likewise.
16064 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
16065 loops using EXTRACT_LAST.
16066 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
16067 (extract_last_<mode>): ...this optab.
16068 (vec_extract<mode><Vel>): Update accordingly.
16069
16070 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16071 Alan Hayward <alan.hayward@arm.com>
16072 David Sherwood <david.sherwood@arm.com>
16073
16074 * target.def (empty_mask_is_expensive): New hook.
16075 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
16076 * doc/tm.texi: Regenerate.
16077 * targhooks.h (default_empty_mask_is_expensive): Declare.
16078 * targhooks.c (default_empty_mask_is_expensive): New function.
16079 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
16080 if the target says that empty masks are expensive.
16081 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
16082 New function.
16083 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
16084
16085 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16086 Alan Hayward <alan.hayward@arm.com>
16087 David Sherwood <david.sherwood@arm.com>
16088
16089 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
16090 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
16091 (vect_use_loop_mask_for_alignment_p): New function.
16092 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
16093 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
16094 niters_skip argument. Make sure that the first niters_skip elements
16095 of the first iteration are inactive.
16096 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
16097 Update call to vect_set_loop_masks_directly.
16098 (get_misalign_in_elems): New function, split out from...
16099 (vect_gen_prolog_loop_niters): ...here.
16100 (vect_update_init_of_dr): Take a code argument that specifies whether
16101 the adjustment should be added or subtracted.
16102 (vect_update_init_of_drs): Likewise.
16103 (vect_prepare_for_masked_peels): New function.
16104 (vect_do_peeling): Skip prologue peeling if we're using a mask
16105 instead. Update call to vect_update_inits_of_drs.
16106 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16107 mask_skip_niters.
16108 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
16109 alignment. Do not include the number of peeled iterations in
16110 the minimum threshold in that case.
16111 (vectorizable_induction): Adjust the start value down by
16112 LOOP_VINFO_MASK_SKIP_NITERS iterations.
16113 (vect_transform_loop): Call vect_prepare_for_masked_peels.
16114 Take the number of skipped iterations into account when calculating
16115 the loop bounds.
16116 * tree-vect-stmts.c (vect_gen_while_not): New function.
16117
16118 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16119 Alan Hayward <alan.hayward@arm.com>
16120 David Sherwood <david.sherwood@arm.com>
16121
16122 * doc/sourcebuild.texi (vect_fully_masked): Document.
16123 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
16124 default value to 0.
16125 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
16126 split out from...
16127 (vect_analyze_loop_2): ...here. Don't check the vectorization
16128 factor against the number of loop iterations if the loop is
16129 fully-masked.
16130
16131 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16132 Alan Hayward <alan.hayward@arm.com>
16133 David Sherwood <david.sherwood@arm.com>
16134
16135 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
16136 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
16137 (dump_groups): Update accordingly.
16138 (iv_use::mem_type): New member variable.
16139 (address_p): New function.
16140 (record_use): Add a mem_type argument and initialize the new
16141 mem_type field.
16142 (record_group_use): Add a mem_type argument. Use address_p.
16143 Remove obsolete null checks of base_object. Update call to record_use.
16144 (find_interesting_uses_op): Update call to record_group_use.
16145 (find_interesting_uses_cond): Likewise.
16146 (find_interesting_uses_address): Likewise.
16147 (get_mem_type_for_internal_fn): New function.
16148 (find_address_like_use): Likewise.
16149 (find_interesting_uses_stmt): Try find_address_like_use before
16150 calling find_interesting_uses_op.
16151 (addr_offset_valid_p): Use the iv mem_type field as the type
16152 of the addressed memory.
16153 (add_autoinc_candidates): Likewise.
16154 (get_address_cost): Likewise.
16155 (split_small_address_groups_p): Use address_p.
16156 (split_address_groups): Likewise.
16157 (add_iv_candidate_for_use): Likewise.
16158 (autoinc_possible_for_pair): Likewise.
16159 (rewrite_groups): Likewise.
16160 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
16161 (determine_group_iv_cost): Update after split of USE_ADDRESS.
16162 (get_alias_ptr_type_for_ptr_address): New function.
16163 (rewrite_use_address): Rewrite address uses in calls that were
16164 identified by find_address_like_use.
16165
16166 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16167 Alan Hayward <alan.hayward@arm.com>
16168 David Sherwood <david.sherwood@arm.com>
16169
16170 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
16171 TARGET_MEM_REFs.
16172 * gimple-expr.h (is_gimple_addressable: Likewise.
16173 * gimple-expr.c (is_gimple_address): Likewise.
16174 * internal-fn.c (expand_call_mem_ref): New function.
16175 (expand_mask_load_optab_fn): Use it.
16176 (expand_mask_store_optab_fn): Likewise.
16177
16178 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16179 Alan Hayward <alan.hayward@arm.com>
16180 David Sherwood <david.sherwood@arm.com>
16181
16182 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
16183 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
16184 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
16185 (cond_umax@var{mode}): Document.
16186 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
16187 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
16188 (cond_umin_optab, cond_umax_optab): New optabs.
16189 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
16190 (COND_IOR, COND_XOR): New internal functions.
16191 * internal-fn.h (get_conditional_internal_fn): Declare.
16192 * internal-fn.c (cond_binary_direct): New macro.
16193 (expand_cond_binary_optab_fn): Likewise.
16194 (direct_cond_binary_optab_supported_p): Likewise.
16195 (get_conditional_internal_fn): New function.
16196 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
16197 Cope with reduction statements that are vectorized as calls rather
16198 than assignments.
16199 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
16200 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
16201 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
16202 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16203 (UNSPEC_COND_EOR): New unspecs.
16204 (optab): Add mappings for them.
16205 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
16206 (sve_int_op, sve_fp_op): New int attributes.
16207
16208 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16209 Alan Hayward <alan.hayward@arm.com>
16210 David Sherwood <david.sherwood@arm.com>
16211
16212 * optabs.def (while_ult_optab): New optab.
16213 * doc/md.texi (while_ult@var{m}@var{n}): Document.
16214 * internal-fn.def (WHILE_ULT): New internal function.
16215 * internal-fn.h (direct_internal_fn_supported_p): New override
16216 that takes two types as argument.
16217 * internal-fn.c (while_direct): New macro.
16218 (expand_while_optab_fn): New function.
16219 (convert_optab_supported_p): Likewise.
16220 (direct_while_optab_supported_p): New macro.
16221 * wide-int.h (wi::udiv_ceil): New function.
16222 * tree-vectorizer.h (rgroup_masks): New structure.
16223 (vec_loop_masks): New typedef.
16224 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
16225 and fully_masked_p.
16226 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
16227 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
16228 (vect_max_vf): New function.
16229 (slpeel_make_loop_iterate_ntimes): Delete.
16230 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
16231 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
16232 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
16233 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
16234 internal-fn.h, stor-layout.h and optabs-query.h.
16235 (vect_set_loop_mask): New function.
16236 (add_preheader_seq): Likewise.
16237 (add_header_seq): Likewise.
16238 (interleave_supported_p): Likewise.
16239 (vect_maybe_permute_loop_masks): Likewise.
16240 (vect_set_loop_masks_directly): Likewise.
16241 (vect_set_loop_condition_masked): Likewise.
16242 (vect_set_loop_condition_unmasked): New function, split out from
16243 slpeel_make_loop_iterate_ntimes.
16244 (slpeel_make_loop_iterate_ntimes): Rename to..
16245 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
16246 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
16247 (vect_do_peeling): Update call accordingly.
16248 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
16249 loops.
16250 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16251 mask_compare_type, can_fully_mask_p and fully_masked_p.
16252 (release_vec_loop_masks): New function.
16253 (_loop_vec_info): Use it to free the loop masks.
16254 (can_produce_all_loop_masks_p): New function.
16255 (vect_get_max_nscalars_per_iter): Likewise.
16256 (vect_verify_full_masking): Likewise.
16257 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
16258 retries, and free the mask rgroups before retrying. Check loop-wide
16259 reasons for disallowing fully-masked loops. Make the final decision
16260 about whether use a fully-masked loop or not.
16261 (vect_estimate_min_profitable_iters): Do not assume that peeling
16262 for the number of iterations will be needed for fully-masked loops.
16263 (vectorizable_reduction): Disable fully-masked loops.
16264 (vectorizable_live_operation): Likewise.
16265 (vect_halve_mask_nunits): New function.
16266 (vect_double_mask_nunits): Likewise.
16267 (vect_record_loop_mask): Likewise.
16268 (vect_get_loop_mask): Likewise.
16269 (vect_transform_loop): Handle the case in which the final loop
16270 iteration might handle a partial vector. Call vect_set_loop_condition
16271 instead of slpeel_make_loop_iterate_ntimes.
16272 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
16273 (check_load_store_masking): New function.
16274 (prepare_load_store_mask): Likewise.
16275 (vectorizable_store): Handle fully-masked loops.
16276 (vectorizable_load): Likewise.
16277 (supportable_widening_operation): Use vect_halve_mask_nunits for
16278 booleans.
16279 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
16280 (vect_gen_while): New function.
16281 * config/aarch64/aarch64.md (umax<mode>3): New expander.
16282 (aarch64_uqdec<mode>): New insn.
16283
16284 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16285 Alan Hayward <alan.hayward@arm.com>
16286 David Sherwood <david.sherwood@arm.com>
16287
16288 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
16289 (reduc_xor_scal_optab): New optabs.
16290 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
16291 (reduc_xor_scal_@var{m}): Document.
16292 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
16293 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
16294 internal functions.
16295 * fold-const-call.c (fold_const_call): Handle them.
16296 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
16297 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
16298 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
16299 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
16300 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
16301 (UNSPEC_XORV): New unspecs.
16302 (optab): Add entries for them.
16303 (BITWISEV): New int iterator.
16304 (bit_reduc_op): New int attributes.
16305
16306 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16307 Alan Hayward <alan.hayward@arm.com>
16308 David Sherwood <david.sherwood@arm.com>
16309
16310 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
16311 * internal-fn.def (VEC_SHL_INSERT): New internal function.
16312 * optabs.def (vec_shl_insert_optab): New optab.
16313 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
16314 (duplicate_and_interleave): Likewise.
16315 * tree-vect-loop.c: Include internal-fn.h.
16316 (neutral_op_for_slp_reduction): New function, split out from
16317 get_initial_defs_for_reduction.
16318 (get_initial_def_for_reduction): Handle option 2 for variable-length
16319 vectors by loading the neutral value into a vector and then shifting
16320 the initial value into element 0.
16321 (get_initial_defs_for_reduction): Replace the code argument with
16322 the neutral value calculated by neutral_op_for_slp_reduction.
16323 Use gimple_build_vector for constant-length vectors.
16324 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
16325 but the first group_size elements have a neutral value.
16326 Use duplicate_and_interleave otherwise.
16327 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
16328 Update call to get_initial_defs_for_reduction. Handle SLP
16329 reductions for variable-length vectors by creating one vector
16330 result for each scalar result, with the elements associated
16331 with other scalar results stubbed out with the neutral value.
16332 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
16333 Require IFN_VEC_SHL_INSERT for double reductions on
16334 variable-length vectors, or SLP reductions that have
16335 a neutral value. Require can_duplicate_and_interleave_p
16336 support for variable-length unchained SLP reductions if there
16337 is no neutral value, such as for MIN/MAX reductions. Also require
16338 the number of vector elements to be a multiple of the number of
16339 SLP statements when doing variable-length unchained SLP reductions.
16340 Update call to vect_create_epilog_for_reduction.
16341 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
16342 and remove initial values.
16343 (duplicate_and_interleave): Make public.
16344 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
16345 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
16346
16347 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16348 Alan Hayward <alan.hayward@arm.com>
16349 David Sherwood <david.sherwood@arm.com>
16350
16351 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
16352 (can_duplicate_and_interleave_p): New function.
16353 (vect_get_and_check_slp_defs): Take the vector of statements
16354 rather than just the current one. Remove excess parentheses.
16355 Restriction rejectinon of vect_constant_def and vect_external_def
16356 for variable-length vectors to boolean types, or types for which
16357 can_duplicate_and_interleave_p is false.
16358 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
16359 (duplicate_and_interleave): New function.
16360 (vect_get_constant_vectors): Use gimple_build_vector for
16361 constant-length vectors and suitable variable-length constant
16362 vectors. Use duplicate_and_interleave for other variable-length
16363 vectors. Don't defer the update when inserting new statements.
16364
16365 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16366 Alan Hayward <alan.hayward@arm.com>
16367 David Sherwood <david.sherwood@arm.com>
16368
16369 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
16370 min_profitable_iters doesn't go negative.
16371
16372 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16373 Alan Hayward <alan.hayward@arm.com>
16374 David Sherwood <david.sherwood@arm.com>
16375
16376 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
16377 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
16378 * optabs.def (vec_mask_load_lanes_optab): New optab.
16379 (vec_mask_store_lanes_optab): Likewise.
16380 * internal-fn.def (MASK_LOAD_LANES): New internal function.
16381 (MASK_STORE_LANES): Likewise.
16382 * internal-fn.c (mask_load_lanes_direct): New macro.
16383 (mask_store_lanes_direct): Likewise.
16384 (expand_mask_load_optab_fn): Handle masked operations.
16385 (expand_mask_load_lanes_optab_fn): New macro.
16386 (expand_mask_store_optab_fn): Handle masked operations.
16387 (expand_mask_store_lanes_optab_fn): New macro.
16388 (direct_mask_load_lanes_optab_supported_p): Likewise.
16389 (direct_mask_store_lanes_optab_supported_p): Likewise.
16390 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
16391 parameter.
16392 (vect_load_lanes_supported): Likewise.
16393 * tree-vect-data-refs.c (strip_conversion): New function.
16394 (can_group_stmts_p): Likewise.
16395 (vect_analyze_data_ref_accesses): Use it instead of checking
16396 for a pair of assignments.
16397 (vect_store_lanes_supported): Take a masked_p parameter.
16398 (vect_load_lanes_supported): Likewise.
16399 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
16400 vect_store_lanes_supported and vect_load_lanes_supported.
16401 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
16402 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
16403 parameter. Don't allow gaps for masked accesses.
16404 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
16405 and vect_load_lanes_supported.
16406 (get_load_store_type): Take a masked_p parameter and update
16407 call to get_group_load_store_type.
16408 (vectorizable_store): Update call to get_load_store_type.
16409 Handle IFN_MASK_STORE_LANES.
16410 (vectorizable_load): Update call to get_load_store_type.
16411 Handle IFN_MASK_LOAD_LANES.
16412
16413 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16414 Alan Hayward <alan.hayward@arm.com>
16415 David Sherwood <david.sherwood@arm.com>
16416
16417 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
16418 modes for SVE.
16419 * config/aarch64/aarch64-protos.h
16420 (aarch64_sve_struct_memory_operand_p): Declare.
16421 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
16422 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
16423 (VPRED, vpred): Handle SVE structure modes.
16424 * config/aarch64/constraints.md (Utx): New constraint.
16425 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
16426 (aarch64_sve_struct_nonimmediate_operand): New predicates.
16427 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
16428 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
16429 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
16430 structure modes. Split into pieces after RA.
16431 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
16432 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
16433 New patterns.
16434 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
16435 SVE structure modes.
16436 (aarch64_classify_address): Likewise.
16437 (sizetochar): Move earlier in file.
16438 (aarch64_print_operand): Handle SVE register lists.
16439 (aarch64_array_mode): New function.
16440 (aarch64_sve_struct_memory_operand_p): Likewise.
16441 (TARGET_ARRAY_MODE): Redefine.
16442
16443 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16444 Alan Hayward <alan.hayward@arm.com>
16445 David Sherwood <david.sherwood@arm.com>
16446
16447 * target.def (array_mode): New target hook.
16448 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
16449 * doc/tm.texi: Regenerate.
16450 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
16451 * hooks.c (hook_optmode_mode_uhwi_none): New function.
16452 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
16453 targetm.array_mode.
16454 * stor-layout.c (mode_for_array): Likewise. Support polynomial
16455 type sizes.
16456
16457 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16458 Alan Hayward <alan.hayward@arm.com>
16459 David Sherwood <david.sherwood@arm.com>
16460
16461 * fold-const.c (fold_binary_loc): Check the argument types
16462 rather than the result type when testing for a vector operation.
16463
16464 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16465
16466 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
16467 * doc/tm.texi: Regenerate.
16468
16469 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16470 Alan Hayward <alan.hayward@arm.com>
16471 David Sherwood <david.sherwood@arm.com>
16472
16473 * doc/invoke.texi (-msve-vector-bits=): Document new option.
16474 (sve): Document new AArch64 extension.
16475 * doc/md.texi (w): Extend the description of the AArch64
16476 constraint to include SVE vectors.
16477 (Upl, Upa): Document new AArch64 predicate constraints.
16478 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
16479 enum.
16480 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
16481 (msve-vector-bits=): New option.
16482 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
16483 SVE when these are disabled.
16484 (sve): New extension.
16485 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
16486 modes. Adjust their number of units based on aarch64_sve_vg.
16487 (MAX_BITSIZE_MODE_ANY_MODE): Define.
16488 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
16489 aarch64_addr_query_type.
16490 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
16491 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
16492 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
16493 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
16494 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
16495 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
16496 (aarch64_simd_imm_zero_p): Delete.
16497 (aarch64_check_zero_based_sve_index_immediate): Declare.
16498 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16499 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16500 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16501 (aarch64_sve_float_mul_immediate_p): Likewise.
16502 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16503 rather than an rtx.
16504 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
16505 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
16506 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
16507 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
16508 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
16509 (aarch64_regmode_natural_size): Likewise.
16510 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
16511 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
16512 left one place.
16513 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
16514 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
16515 for VG and the SVE predicate registers.
16516 (V_ALIASES): Add a "z"-prefixed alias.
16517 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
16518 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
16519 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
16520 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
16521 (REG_CLASS_NAMES): Add entries for them.
16522 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
16523 and the predicate registers.
16524 (aarch64_sve_vg): Declare.
16525 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
16526 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
16527 (REGMODE_NATURAL_SIZE): Define.
16528 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
16529 SVE macros.
16530 * config/aarch64/aarch64.c: Include cfgrtl.h.
16531 (simd_immediate_info): Add a constructor for series vectors,
16532 and an associated step field.
16533 (aarch64_sve_vg): New variable.
16534 (aarch64_dbx_register_number): Handle VG and the predicate registers.
16535 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
16536 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
16537 (VEC_ANY_DATA, VEC_STRUCT): New constants.
16538 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
16539 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
16540 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
16541 (aarch64_get_mask_mode): New functions.
16542 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
16543 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
16544 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
16545 predicate modes and predicate registers. Explicitly restrict
16546 GPRs to modes of 16 bytes or smaller. Only allow FP registers
16547 to store a vector mode if it is recognized by
16548 aarch64_classify_vector_mode.
16549 (aarch64_regmode_natural_size): New function.
16550 (aarch64_hard_regno_caller_save_mode): Return the original mode
16551 for predicates.
16552 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
16553 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
16554 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
16555 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
16556 functions.
16557 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
16558 does not overlap dest if the function is frame-related. Handle
16559 SVE constants.
16560 (aarch64_split_add_offset): New function.
16561 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
16562 them aarch64_add_offset.
16563 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
16564 and update call to aarch64_sub_sp.
16565 (aarch64_add_cfa_expression): New function.
16566 (aarch64_expand_prologue): Pass extra temporary registers to the
16567 functions above. Handle the case in which we need to emit new
16568 DW_CFA_expressions for registers that were originally saved
16569 relative to the stack pointer, but now have to be expressed
16570 relative to the frame pointer.
16571 (aarch64_output_mi_thunk): Pass extra temporary registers to the
16572 functions above.
16573 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
16574 IP0 and IP1 values for SVE frames.
16575 (aarch64_expand_vec_series): New function.
16576 (aarch64_expand_sve_widened_duplicate): Likewise.
16577 (aarch64_expand_sve_const_vector): Likewise.
16578 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
16579 Handle SVE constants. Use emit_move_insn to move a force_const_mem
16580 into the register, rather than emitting a SET directly.
16581 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
16582 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
16583 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
16584 (offset_9bit_signed_scaled_p): New functions.
16585 (aarch64_replicate_bitmask_imm): New function.
16586 (aarch64_bitmask_imm): Use it.
16587 (aarch64_cannot_force_const_mem): Reject expressions involving
16588 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
16589 (aarch64_classify_index): Handle SVE indices, by requiring
16590 a plain register index with a scale that matches the element size.
16591 (aarch64_classify_address): Handle SVE addresses. Assert that
16592 the mode of the address is VOIDmode or an integer mode.
16593 Update call to aarch64_classify_symbol.
16594 (aarch64_classify_symbolic_expression): Update call to
16595 aarch64_classify_symbol.
16596 (aarch64_const_vec_all_in_range_p): New function.
16597 (aarch64_print_vector_float_operand): Likewise.
16598 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
16599 "vN" for FP registers with SVE modes. Handle (const ...) vectors
16600 and the FP immediates 1.0 and 0.5.
16601 (aarch64_print_address_internal): Handle SVE addresses.
16602 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
16603 (aarch64_regno_regclass): Handle predicate registers.
16604 (aarch64_secondary_reload): Handle big-endian reloads of SVE
16605 data modes.
16606 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
16607 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
16608 (aarch64_convert_sve_vector_bits): New function.
16609 (aarch64_override_options): Use it to handle -msve-vector-bits=.
16610 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16611 rather than an rtx.
16612 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
16613 Handle SVE vector and predicate modes. Accept VL-based constants
16614 that need only one temporary register, and VL offsets that require
16615 no temporary registers.
16616 (aarch64_conditional_register_usage): Mark the predicate registers
16617 as fixed if SVE isn't available.
16618 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
16619 Return true for SVE vector and predicate modes.
16620 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
16621 rather than an unsigned int. Handle SVE modes.
16622 (aarch64_preferred_simd_mode): Update call accordingly. Handle
16623 SVE modes.
16624 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
16625 if SVE is enabled.
16626 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16627 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16628 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16629 (aarch64_sve_float_mul_immediate_p): New functions.
16630 (aarch64_sve_valid_immediate): New function.
16631 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
16632 Explicitly reject structure modes. Check for INDEX constants.
16633 Handle PTRUE and PFALSE constants.
16634 (aarch64_check_zero_based_sve_index_immediate): New function.
16635 (aarch64_simd_imm_zero_p): Delete.
16636 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
16637 vector modes. Accept constants in the range of CNT[BHWD].
16638 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
16639 ask for an Advanced SIMD mode.
16640 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
16641 (aarch64_simd_vector_alignment): Handle SVE predicates.
16642 (aarch64_vectorize_preferred_vector_alignment): New function.
16643 (aarch64_simd_vector_alignment_reachable): Use it instead of
16644 the vector size.
16645 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
16646 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
16647 functions.
16648 (MAX_VECT_LEN): Delete.
16649 (expand_vec_perm_d): Add a vec_flags field.
16650 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
16651 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
16652 (aarch64_evpc_ext): Don't apply a big-endian lane correction
16653 for SVE modes.
16654 (aarch64_evpc_rev): Rename to...
16655 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
16656 (aarch64_evpc_rev_global): New function.
16657 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
16658 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
16659 MAX_VECT_LEN.
16660 (aarch64_evpc_sve_tbl): New function.
16661 (aarch64_expand_vec_perm_const_1): Update after rename of
16662 aarch64_evpc_rev. Handle SVE permutes too, trying
16663 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
16664 than aarch64_evpc_tbl.
16665 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
16666 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
16667 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
16668 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
16669 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
16670 (aarch64_expand_sve_vcond): New functions.
16671 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
16672 of aarch64_vector_mode_p.
16673 (aarch64_dwarf_poly_indeterminate_value): New function.
16674 (aarch64_compute_pressure_classes): Likewise.
16675 (aarch64_can_change_mode_class): Likewise.
16676 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
16677 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
16678 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
16679 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
16680 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
16681 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
16682 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
16683 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
16684 constraints.
16685 (Dn, Dl, Dr): Accept const as well as const_vector.
16686 (Dz): Likewise. Compare against CONST0_RTX.
16687 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
16688 of "vector" where appropriate.
16689 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
16690 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
16691 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
16692 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
16693 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
16694 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
16695 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
16696 (v_int_equiv): Extend to SVE modes.
16697 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
16698 mode attributes.
16699 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
16700 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
16701 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
16702 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
16703 (SVE_COND_FP_CMP): New int iterators.
16704 (perm_hilo): Handle the new unpack unspecs.
16705 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
16706 attributes.
16707 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
16708 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
16709 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
16710 (aarch64_equality_operator, aarch64_constant_vector_operand)
16711 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
16712 (aarch64_sve_nonimmediate_operand): Likewise.
16713 (aarch64_sve_general_operand): Likewise.
16714 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
16715 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
16716 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
16717 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
16718 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
16719 (aarch64_sve_float_arith_immediate): Likewise.
16720 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
16721 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
16722 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
16723 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
16724 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
16725 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
16726 (aarch64_sve_float_arith_operand): Likewise.
16727 (aarch64_sve_float_arith_with_sub_operand): Likewise.
16728 (aarch64_sve_float_mul_operand): Likewise.
16729 (aarch64_sve_vec_perm_operand): Likewise.
16730 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
16731 (aarch64_mov_operand): Accept const_poly_int and const_vector.
16732 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
16733 as well as const_vector.
16734 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
16735 in file. Use CONST0_RTX and CONSTM1_RTX.
16736 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
16737 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
16738 Use aarch64_simd_imm_zero.
16739 * config/aarch64/aarch64-sve.md: New file.
16740 * config/aarch64/aarch64.md: Include it.
16741 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
16742 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
16743 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
16744 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
16745 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
16746 (sve): New attribute.
16747 (enabled): Disable instructions with the sve attribute unless
16748 TARGET_SVE.
16749 (movqi, movhi): Pass CONST_POLY_INT operaneds through
16750 aarch64_expand_mov_immediate.
16751 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
16752 CNT[BHSD] immediates.
16753 (movti): Split CONST_POLY_INT moves into two halves.
16754 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
16755 Split additions that need a temporary here if the destination
16756 is the stack pointer.
16757 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
16758 (*add<mode>3_poly_1): New instruction.
16759 (set_clobber_cc): New expander.
16760
16761 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16762
16763 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
16764 parameter and use it instead of GET_MODE_SIZE (innermode). Use
16765 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
16766 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
16767 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
16768 Change innermode from fixed_mode_size to machine_mode.
16769 (simplify_subreg): Update call accordingly. Handle a constant-sized
16770 subreg of a variable-length CONST_VECTOR.
16771
16772 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16773 Alan Hayward <alan.hayward@arm.com>
16774 David Sherwood <david.sherwood@arm.com>
16775
16776 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
16777 (add_offset_to_base): New function, split out from...
16778 (create_mem_ref): ...here. When handling a scale other than 1,
16779 check first whether the address is valid without the offset.
16780 Add it into the base if so, leaving the index and scale as-is.
16781
16782 2018-01-12 Jakub Jelinek <jakub@redhat.com>
16783
16784 PR c++/83778
16785 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
16786 fold_for_warn before checking if arg2 is INTEGER_CST.
16787
16788 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
16789
16790 * config/rs6000/predicates.md (load_multiple_operation): Delete.
16791 (store_multiple_operation): Delete.
16792 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
16793 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
16794 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
16795 guarded by TARGET_STRING.
16796 (rs6000_output_load_multiple): Delete.
16797 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
16798 OPTION_MASK_STRING / TARGET_STRING handling.
16799 (print_operand) <'N', 'O'>: Add comment that these are unused now.
16800 (const rs6000_opt_masks) <"string">: Change mask to 0.
16801 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
16802 (MASK_STRING): Delete.
16803 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
16804 parts. Simplify.
16805 (load_multiple): Delete.
16806 (*ldmsi8): Delete.
16807 (*ldmsi7): Delete.
16808 (*ldmsi6): Delete.
16809 (*ldmsi5): Delete.
16810 (*ldmsi4): Delete.
16811 (*ldmsi3): Delete.
16812 (store_multiple): Delete.
16813 (*stmsi8): Delete.
16814 (*stmsi7): Delete.
16815 (*stmsi6): Delete.
16816 (*stmsi5): Delete.
16817 (*stmsi4): Delete.
16818 (*stmsi3): Delete.
16819 (movmemsi_8reg): Delete.
16820 (corresponding unnamed define_insn): Delete.
16821 (movmemsi_6reg): Delete.
16822 (corresponding unnamed define_insn): Delete.
16823 (movmemsi_4reg): Delete.
16824 (corresponding unnamed define_insn): Delete.
16825 (movmemsi_2reg): Delete.
16826 (corresponding unnamed define_insn): Delete.
16827 (movmemsi_1reg): Delete.
16828 (corresponding unnamed define_insn): Delete.
16829 * config/rs6000/rs6000.opt (mno-string): New.
16830 (mstring): Replace by deprecation warning stub.
16831 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
16832
16833 2018-01-12 Jakub Jelinek <jakub@redhat.com>
16834
16835 * regrename.c (regrename_do_replace): If replacing the same
16836 reg multiple times, try to reuse last created gen_raw_REG.
16837
16838 PR debug/81155
16839 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
16840 main to workaround a bug in GDB.
16841
16842 2018-01-12 Tom de Vries <tom@codesourcery.com>
16843
16844 PR target/83737
16845 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
16846
16847 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
16848
16849 PR rtl-optimization/80481
16850 * ira-color.c (get_cap_member): New function.
16851 (allocnos_conflict_by_live_ranges_p): Use it.
16852 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
16853 (setup_slot_coalesced_allocno_live_ranges): Ditto.
16854
16855 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
16856
16857 PR target/83628
16858 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
16859 (*saddl_se_1): Ditto.
16860 (*ssubsi_1): Ditto.
16861 (*ssubl_se_1): Ditto.
16862
16863 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
16864
16865 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
16866 rather than wi::to_widest for DR_INITs.
16867 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
16868 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
16869 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
16870 INTEGER_CSTs.
16871 (vect_analyze_group_access_1): Note that here.
16872
16873 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
16874
16875 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
16876 polynomial type sizes.
16877
16878 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
16879
16880 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
16881 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
16882 (gimple_add_tmp_var): Likewise.
16883
16884 2018-01-12 Martin Liska <mliska@suse.cz>
16885
16886 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
16887 (gimple_alloc_sizes): Likewise.
16888 (dump_gimple_statistics): Use PRIu64 in printf format.
16889 * gimple.h: Change uint64_t to int.
16890
16891 2018-01-12 Martin Liska <mliska@suse.cz>
16892
16893 * tree-core.h: Use uint64_t instead of int.
16894 * tree.c (tree_node_counts): Likewise.
16895 (tree_node_sizes): Likewise.
16896 (dump_tree_statistics): Use PRIu64 in printf format.
16897
16898 2018-01-12 Martin Liska <mliska@suse.cz>
16899
16900 * Makefile.in: As qsort_chk is implemented in vec.c, add
16901 vec.o to linkage of gencfn-macros.
16902 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
16903 passing the info to record_node_allocation_statistics.
16904 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
16905 and pass the info.
16906 * ggc-common.c (struct ggc_usage): Add operator== and use
16907 it in operator< and compare function.
16908 * mem-stats.h (struct mem_usage): Likewise.
16909 * vec.c (struct vec_usage): Remove operator< and compare
16910 function. Can be simply inherited.
16911
16912 2018-01-12 Martin Jambor <mjambor@suse.cz>
16913
16914 PR target/81616
16915 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
16916 * tree-ssa-math-opts.c: Include domwalk.h.
16917 (convert_mult_to_fma_1): New function.
16918 (fma_transformation_info): New type.
16919 (fma_deferring_state): Likewise.
16920 (cancel_fma_deferring): New function.
16921 (result_of_phi): Likewise.
16922 (last_fma_candidate_feeds_initial_phi): Likewise.
16923 (convert_mult_to_fma): Added deferring logic, split actual
16924 transformation to convert_mult_to_fma_1.
16925 (math_opts_dom_walker): New type.
16926 (math_opts_dom_walker::after_dom_children): New method, body moved
16927 here from pass_optimize_widening_mul::execute, added deferring logic
16928 bits.
16929 (pass_optimize_widening_mul::execute): Moved most of code to
16930 math_opts_dom_walker::after_dom_children.
16931 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
16932 * config/i386/i386.c (ix86_option_override_internal): Added
16933 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
16934
16935 2018-01-12 Richard Biener <rguenther@suse.de>
16936
16937 PR debug/83157
16938 * dwarf2out.c (gen_variable_die): Do not reset old_die for
16939 inline instance vars.
16940
16941 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
16942
16943 PR target/81819
16944 * config/rx/rx.c (rx_is_restricted_memory_address):
16945 Handle SUBREG case.
16946
16947 2018-01-12 Richard Biener <rguenther@suse.de>
16948
16949 PR tree-optimization/80846
16950 * target.def (split_reduction): New target hook.
16951 * targhooks.c (default_split_reduction): New function.
16952 * targhooks.h (default_split_reduction): Declare.
16953 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
16954 target requests first reduce vectors by combining low and high
16955 parts.
16956 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
16957 (get_vectype_for_scalar_type_and_size): Export.
16958 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
16959 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
16960 * doc/tm.texi: Regenerate.
16961 * config/i386/i386.c (ix86_split_reduction): Implement
16962 TARGET_VECTORIZE_SPLIT_REDUCTION.
16963
16964 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16965
16966 PR target/83368
16967 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
16968 in PIC mode except for TARGET_VXWORKS_RTP.
16969 * config/sparc/sparc.c: Include cfgrtl.h.
16970 (TARGET_INIT_PIC_REG): Define.
16971 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
16972 (sparc_pic_register_p): New predicate.
16973 (sparc_legitimate_address_p): Use it.
16974 (sparc_legitimize_pic_address): Likewise.
16975 (sparc_delegitimize_address): Likewise.
16976 (sparc_mode_dependent_address_p): Likewise.
16977 (gen_load_pcrel_sym): Remove 4th parameter.
16978 (load_got_register): Adjust call to above. Remove obsolete stuff.
16979 (sparc_expand_prologue): Do not call load_got_register here.
16980 (sparc_flat_expand_prologue): Likewise.
16981 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
16982 (sparc_use_pseudo_pic_reg): New function.
16983 (sparc_init_pic_reg): Likewise.
16984 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16985 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
16986
16987 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
16988
16989 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
16990 Add item for branch_cost.
16991
16992 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16993
16994 PR rtl-optimization/83565
16995 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
16996 not extend the result to a larger mode for rotate operations.
16997 (num_sign_bit_copies1): Likewise.
16998
16999 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17000
17001 PR target/40411
17002 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
17003 -symbolic.
17004 Use values-Xc.o for -pedantic.
17005 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
17006
17007 2018-01-12 Martin Liska <mliska@suse.cz>
17008
17009 PR ipa/83054
17010 * ipa-devirt.c (final_warning_record::grow_type_warnings):
17011 New function.
17012 (possible_polymorphic_call_targets): Use it.
17013 (ipa_devirt): Likewise.
17014
17015 2018-01-12 Martin Liska <mliska@suse.cz>
17016
17017 * profile-count.h (enum profile_quality): Use 0 as invalid
17018 enum value of profile_quality.
17019
17020 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
17021
17022 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
17023 -mext-string options.
17024
17025 2018-01-12 Richard Biener <rguenther@suse.de>
17026
17027 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
17028 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
17029 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
17030 Likewise.
17031 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
17032
17033 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17034
17035 * configure.ac (--with-long-double-format): Add support for the
17036 configuration option to change the default long double format on
17037 PowerPC systems.
17038 * config.gcc (powerpc*-linux*-*): Likewise.
17039 * configure: Regenerate.
17040 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
17041 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
17042 used without modification.
17043
17044 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17045
17046 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
17047 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
17048 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
17049 MISC_BUILTIN_SPEC_BARRIER.
17050 (rs6000_init_builtins): Likewise.
17051 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
17052 enum value.
17053 (speculation_barrier): New define_insn.
17054 * doc/extend.texi: Document __builtin_speculation_barrier.
17055
17056 2018-01-11 Jakub Jelinek <jakub@redhat.com>
17057
17058 PR target/83203
17059 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
17060 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
17061 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
17062 iterators.
17063 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
17064 integral modes instead of "ss" and "sd".
17065 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
17066 vectors with 32-bit and 64-bit elements.
17067 (vecdupssescalarmodesuffix): New mode attribute.
17068 (vec_dup<mode>): Use it.
17069
17070 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
17071
17072 PR target/83330
17073 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
17074 frame if argument is passed on stack.
17075
17076 2018-01-11 Jakub Jelinek <jakub@redhat.com>
17077
17078 PR target/82682
17079 * ree.c (combine_reaching_defs): Optimize also
17080 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
17081 reg2=any_extend(exp); reg1=reg2;, formatting fix.
17082
17083 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
17084
17085 PR middle-end/83189
17086 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
17087
17088 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
17089
17090 PR middle-end/83718
17091 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
17092 after they are computed.
17093
17094 2018-01-11 Bin Cheng <bin.cheng@arm.com>
17095
17096 PR tree-optimization/83695
17097 * gimple-loop-linterchange.cc
17098 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
17099 reset cached scev information after interchange.
17100 (pass_linterchange::execute): Remove call to scev_reset_htab.
17101
17102 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17103
17104 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
17105 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
17106 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
17107 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
17108 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
17109 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
17110 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
17111 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
17112 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
17113 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
17114 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
17115 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
17116 (V_lane_reg): Likewise.
17117 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
17118 New define_expand.
17119 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
17120 (vfmal_lane_low<mode>_intrinsic,
17121 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
17122 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
17123 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
17124 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
17125 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
17126 vfmsl_lane_high<mode>_intrinsic): New define_insns.
17127
17128 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17129
17130 * config/arm/arm-cpus.in (fp16fml): New feature.
17131 (ALL_SIMD): Add fp16fml.
17132 (armv8.2-a): Add fp16fml as an option.
17133 (armv8.3-a): Likewise.
17134 (armv8.4-a): Add fp16fml as part of fp16.
17135 * config/arm/arm.h (TARGET_FP16FML): Define.
17136 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
17137 when appropriate.
17138 * config/arm/arm-modes.def (V2HF): Define.
17139 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
17140 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
17141 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
17142 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
17143 vfmsl_low, vfmsl_high): New set of builtins.
17144 * config/arm/iterators.md (PLUSMINUS): New code iterator.
17145 (vfml_op): New code attribute.
17146 (VFMLHALVES): New int iterator.
17147 (VFML, VFMLSEL): New mode attributes.
17148 (V_reg): Define mapping for V2HF.
17149 (V_hi, V_lo): New mode attributes.
17150 (VF_constraint): Likewise.
17151 (vfml_half, vfml_half_selector): New int attributes.
17152 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
17153 define_expand.
17154 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
17155 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
17156 New define_insn.
17157 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
17158 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
17159 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
17160 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
17161 documentation.
17162 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
17163 Document new effective target and option set.
17164
17165 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17166
17167 * config/arm/arm-cpus.in (armv8_4): New feature.
17168 (ARMv8_4a): New fgroup.
17169 (armv8.4-a): New arch.
17170 * config/arm/arm-tables.opt: Regenerate.
17171 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
17172 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
17173 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
17174 Add matching rules for -march=armv8.4-a and extensions.
17175 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
17176
17177 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
17178
17179 PR target/81821
17180 * config/rx/rx.md (BW): New mode attribute.
17181 (sync_lock_test_and_setsi): Add mode suffix to insn output.
17182
17183 2018-01-11 Richard Biener <rguenther@suse.de>
17184
17185 PR tree-optimization/83435
17186 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
17187 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
17188 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
17189
17190 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17191 Alan Hayward <alan.hayward@arm.com>
17192 David Sherwood <david.sherwood@arm.com>
17193
17194 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
17195 field.
17196 (aarch64_classify_address): Initialize it. Track polynomial offsets.
17197 (aarch64_print_address_internal): Use it to check for a zero offset.
17198
17199 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17200 Alan Hayward <alan.hayward@arm.com>
17201 David Sherwood <david.sherwood@arm.com>
17202
17203 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
17204 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
17205 Return a poly_int64 rather than a HOST_WIDE_INT.
17206 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
17207 rather than a HOST_WIDE_INT.
17208 * config/aarch64/aarch64.h (aarch64_frame): Protect with
17209 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
17210 hard_fp_offset, frame_size, initial_adjust, callee_offset and
17211 final_offset from HOST_WIDE_INT to poly_int64.
17212 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
17213 to_constant when getting the number of units in an Advanced SIMD
17214 mode.
17215 (aarch64_builtin_vectorized_function): Check for a constant number
17216 of units.
17217 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
17218 GET_MODE_SIZE.
17219 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
17220 attribute instead of GET_MODE_NUNITS.
17221 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
17222 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
17223 GET_MODE_SIZE for fixed-size registers.
17224 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
17225 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
17226 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
17227 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
17228 (aarch64_print_operand, aarch64_print_address_internal)
17229 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
17230 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
17231 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
17232 Handle polynomial GET_MODE_SIZE.
17233 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
17234 wider than SImode without modification.
17235 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
17236 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
17237 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
17238 passing and returning SVE modes.
17239 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
17240 rather than GEN_INT.
17241 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
17242 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
17243 (aarch64_allocate_and_probe_stack_space): Likewise.
17244 (aarch64_layout_frame): Cope with polynomial offsets.
17245 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
17246 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
17247 polynomial offsets.
17248 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
17249 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
17250 poly_int64 rather than a HOST_WIDE_INT.
17251 (aarch64_get_separate_components, aarch64_process_components)
17252 (aarch64_expand_prologue, aarch64_expand_epilogue)
17253 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
17254 (aarch64_anchor_offset): New function, split out from...
17255 (aarch64_legitimize_address): ...here.
17256 (aarch64_builtin_vectorization_cost): Handle polynomial
17257 TYPE_VECTOR_SUBPARTS.
17258 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
17259 GET_MODE_NUNITS.
17260 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
17261 number of elements from the PARALLEL rather than the mode.
17262 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
17263 rather than GET_MODE_BITSIZE.
17264 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
17265 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
17266 (aarch64_expand_vec_perm_const_1): Handle polynomial
17267 d->perm.length () and d->perm elements.
17268 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
17269 Apply to_constant to d->perm elements.
17270 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
17271 polynomial CONST_VECTOR_NUNITS.
17272 (aarch64_move_pointer): Take amount as a poly_int64 rather
17273 than an int.
17274 (aarch64_progress_pointer): Avoid temporary variable.
17275 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
17276 the mode attribute instead of GET_MODE.
17277
17278 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17279 Alan Hayward <alan.hayward@arm.com>
17280 David Sherwood <david.sherwood@arm.com>
17281
17282 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
17283 x exists before using it.
17284 (aarch64_add_constant_internal): Rename to...
17285 (aarch64_add_offset_1): ...this. Replace regnum with separate
17286 src and dest rtxes. Handle the case in which they're different,
17287 including when the offset is zero. Replace scratchreg with an rtx.
17288 Use 2 additions if there is no spare register into which we can
17289 move a 16-bit constant.
17290 (aarch64_add_constant): Delete.
17291 (aarch64_add_offset): Replace reg with separate src and dest
17292 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
17293 Use aarch64_add_offset_1.
17294 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
17295 an rtx rather than an int. Take the delta as a poly_int64
17296 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
17297 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
17298 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
17299 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
17300 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
17301 and aarch64_add_sp.
17302 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
17303 aarch64_add_constant.
17304
17305 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17306
17307 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
17308 Use scalar_float_mode.
17309
17310 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17311
17312 * config/aarch64/aarch64-simd.md
17313 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
17314 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
17315 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
17316 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
17317 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
17318 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
17319 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
17320 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
17321 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
17322 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
17323
17324 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17325
17326 PR target/83514
17327 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
17328 targ_options->x_arm_arch_string is non NULL.
17329
17330 2018-01-11 Tamar Christina <tamar.christina@arm.com>
17331
17332 * config/aarch64/aarch64.h
17333 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
17334
17335 2018-01-11 Sudakshina Das <sudi.das@arm.com>
17336
17337 PR target/82096
17338 * expmed.c (emit_store_flag_force): Swap if const op0
17339 and change VOIDmode to mode of op0.
17340
17341 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17342
17343 PR rtl-optimization/83761
17344 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
17345 than bytes to mode_for_size.
17346
17347 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17348
17349 PR middle-end/83189
17350 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
17351 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
17352 profile.
17353
17354 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17355
17356 PR middle-end/83575
17357 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
17358 when in layout mode.
17359 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
17360 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
17361 partition fixup.
17362
17363 2018-01-10 Michael Collison <michael.collison@arm.com>
17364
17365 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
17366 * config/aarch64/aarch64-option-extension.def: Add
17367 AARCH64_OPT_EXTENSION of 'fp16fml'.
17368 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17369 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
17370 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
17371 * config/aarch64/constraints.md (Ui7): New constraint.
17372 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
17373 (VFMLA_SEL_W): Ditto.
17374 (f16quad): Ditto.
17375 (f16mac1): Ditto.
17376 (VFMLA16_LOW): New int iterator.
17377 (VFMLA16_HIGH): Ditto.
17378 (UNSPEC_FMLAL): New unspec.
17379 (UNSPEC_FMLSL): Ditto.
17380 (UNSPEC_FMLAL2): Ditto.
17381 (UNSPEC_FMLSL2): Ditto.
17382 (f16mac): New code attribute.
17383 * config/aarch64/aarch64-simd-builtins.def
17384 (aarch64_fmlal_lowv2sf): Ditto.
17385 (aarch64_fmlsl_lowv2sf): Ditto.
17386 (aarch64_fmlalq_lowv4sf): Ditto.
17387 (aarch64_fmlslq_lowv4sf): Ditto.
17388 (aarch64_fmlal_highv2sf): Ditto.
17389 (aarch64_fmlsl_highv2sf): Ditto.
17390 (aarch64_fmlalq_highv4sf): Ditto.
17391 (aarch64_fmlslq_highv4sf): Ditto.
17392 (aarch64_fmlal_lane_lowv2sf): Ditto.
17393 (aarch64_fmlsl_lane_lowv2sf): Ditto.
17394 (aarch64_fmlal_laneq_lowv2sf): Ditto.
17395 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
17396 (aarch64_fmlalq_lane_lowv4sf): Ditto.
17397 (aarch64_fmlsl_lane_lowv4sf): Ditto.
17398 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
17399 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
17400 (aarch64_fmlal_lane_highv2sf): Ditto.
17401 (aarch64_fmlsl_lane_highv2sf): Ditto.
17402 (aarch64_fmlal_laneq_highv2sf): Ditto.
17403 (aarch64_fmlsl_laneq_highv2sf): Ditto.
17404 (aarch64_fmlalq_lane_highv4sf): Ditto.
17405 (aarch64_fmlsl_lane_highv4sf): Ditto.
17406 (aarch64_fmlalq_laneq_highv4sf): Ditto.
17407 (aarch64_fmlsl_laneq_highv4sf): Ditto.
17408 * config/aarch64/aarch64-simd.md:
17409 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
17410 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17411 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
17412 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17413 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
17414 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
17415 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
17416 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
17417 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
17418 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
17419 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
17420 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
17421 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
17422 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
17423 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
17424 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
17425 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
17426 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
17427 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
17428 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
17429 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
17430 (vfmlsl_low_u32): Ditto.
17431 (vfmlalq_low_u32): Ditto.
17432 (vfmlslq_low_u32): Ditto.
17433 (vfmlal_high_u32): Ditto.
17434 (vfmlsl_high_u32): Ditto.
17435 (vfmlalq_high_u32): Ditto.
17436 (vfmlslq_high_u32): Ditto.
17437 (vfmlal_lane_low_u32): Ditto.
17438 (vfmlsl_lane_low_u32): Ditto.
17439 (vfmlal_laneq_low_u32): Ditto.
17440 (vfmlsl_laneq_low_u32): Ditto.
17441 (vfmlalq_lane_low_u32): Ditto.
17442 (vfmlslq_lane_low_u32): Ditto.
17443 (vfmlalq_laneq_low_u32): Ditto.
17444 (vfmlslq_laneq_low_u32): Ditto.
17445 (vfmlal_lane_high_u32): Ditto.
17446 (vfmlsl_lane_high_u32): Ditto.
17447 (vfmlal_laneq_high_u32): Ditto.
17448 (vfmlsl_laneq_high_u32): Ditto.
17449 (vfmlalq_lane_high_u32): Ditto.
17450 (vfmlslq_lane_high_u32): Ditto.
17451 (vfmlalq_laneq_high_u32): Ditto.
17452 (vfmlslq_laneq_high_u32): Ditto.
17453 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
17454 (AARCH64_FL_FOR_ARCH8_4): New.
17455 (AARCH64_ISA_F16FML): New ISA flag.
17456 (TARGET_F16FML): New feature flag for fp16fml.
17457 (doc/invoke.texi): Document new fp16fml option.
17458
17459 2018-01-10 Michael Collison <michael.collison@arm.com>
17460
17461 * config/aarch64/aarch64-builtins.c:
17462 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
17463 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17464 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
17465 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
17466 (AARCH64_ISA_SHA3): New ISA flag.
17467 (TARGET_SHA3): New feature flag for sha3.
17468 * config/aarch64/iterators.md (sha512_op): New int attribute.
17469 (CRYPTO_SHA512): New int iterator.
17470 (UNSPEC_SHA512H): New unspec.
17471 (UNSPEC_SHA512H2): Ditto.
17472 (UNSPEC_SHA512SU0): Ditto.
17473 (UNSPEC_SHA512SU1): Ditto.
17474 * config/aarch64/aarch64-simd-builtins.def
17475 (aarch64_crypto_sha512hqv2di): New builtin.
17476 (aarch64_crypto_sha512h2qv2di): Ditto.
17477 (aarch64_crypto_sha512su0qv2di): Ditto.
17478 (aarch64_crypto_sha512su1qv2di): Ditto.
17479 (aarch64_eor3qv8hi): Ditto.
17480 (aarch64_rax1qv2di): Ditto.
17481 (aarch64_xarqv2di): Ditto.
17482 (aarch64_bcaxqv8hi): Ditto.
17483 * config/aarch64/aarch64-simd.md:
17484 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
17485 (aarch64_crypto_sha512su0qv2di): Ditto.
17486 (aarch64_crypto_sha512su1qv2di): Ditto.
17487 (aarch64_eor3qv8hi): Ditto.
17488 (aarch64_rax1qv2di): Ditto.
17489 (aarch64_xarqv2di): Ditto.
17490 (aarch64_bcaxqv8hi): Ditto.
17491 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
17492 (vsha512h2q_u64): Ditto.
17493 (vsha512su0q_u64): Ditto.
17494 (vsha512su1q_u64): Ditto.
17495 (veor3q_u16): Ditto.
17496 (vrax1q_u64): Ditto.
17497 (vxarq_u64): Ditto.
17498 (vbcaxq_u16): Ditto.
17499 * config/arm/types.md (crypto_sha512): New type attribute.
17500 (crypto_sha3): Ditto.
17501 (doc/invoke.texi): Document new sha3 option.
17502
17503 2018-01-10 Michael Collison <michael.collison@arm.com>
17504
17505 * config/aarch64/aarch64-builtins.c:
17506 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
17507 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17508 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
17509 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
17510 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
17511 (AARCH64_ISA_SM4): New ISA flag.
17512 (TARGET_SM4): New feature flag for sm4.
17513 * config/aarch64/aarch64-simd-builtins.def
17514 (aarch64_sm3ss1qv4si): Ditto.
17515 (aarch64_sm3tt1aq4si): Ditto.
17516 (aarch64_sm3tt1bq4si): Ditto.
17517 (aarch64_sm3tt2aq4si): Ditto.
17518 (aarch64_sm3tt2bq4si): Ditto.
17519 (aarch64_sm3partw1qv4si): Ditto.
17520 (aarch64_sm3partw2qv4si): Ditto.
17521 (aarch64_sm4eqv4si): Ditto.
17522 (aarch64_sm4ekeyqv4si): Ditto.
17523 * config/aarch64/aarch64-simd.md:
17524 (aarch64_sm3ss1qv4si): Ditto.
17525 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
17526 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
17527 (aarch64_sm4eqv4si): Ditto.
17528 (aarch64_sm4ekeyqv4si): Ditto.
17529 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
17530 (sm3part_op): Ditto.
17531 (CRYPTO_SM3TT): Ditto.
17532 (CRYPTO_SM3PART): Ditto.
17533 (UNSPEC_SM3SS1): New unspec.
17534 (UNSPEC_SM3TT1A): Ditto.
17535 (UNSPEC_SM3TT1B): Ditto.
17536 (UNSPEC_SM3TT2A): Ditto.
17537 (UNSPEC_SM3TT2B): Ditto.
17538 (UNSPEC_SM3PARTW1): Ditto.
17539 (UNSPEC_SM3PARTW2): Ditto.
17540 (UNSPEC_SM4E): Ditto.
17541 (UNSPEC_SM4EKEY): Ditto.
17542 * config/aarch64/constraints.md (Ui2): New constraint.
17543 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
17544 * config/arm/types.md (crypto_sm3): New type attribute.
17545 (crypto_sm4): Ditto.
17546 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
17547 (vsm3tt1aq_u32): Ditto.
17548 (vsm3tt1bq_u32): Ditto.
17549 (vsm3tt2aq_u32): Ditto.
17550 (vsm3tt2bq_u32): Ditto.
17551 (vsm3partw1q_u32): Ditto.
17552 (vsm3partw2q_u32): Ditto.
17553 (vsm4eq_u32): Ditto.
17554 (vsm4ekeyq_u32): Ditto.
17555 (doc/invoke.texi): Document new sm4 option.
17556
17557 2018-01-10 Michael Collison <michael.collison@arm.com>
17558
17559 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
17560 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
17561 (AARCH64_FL_FOR_ARCH8_4): New.
17562 (AARCH64_FL_V8_4): New flag.
17563 (doc/invoke.texi): Document new armv8.4-a option.
17564
17565 2018-01-10 Michael Collison <michael.collison@arm.com>
17566
17567 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17568 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
17569 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
17570 * config/aarch64/aarch64-option-extension.def: Add
17571 AARCH64_OPT_EXTENSION of 'sha2'.
17572 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
17573 (crypto): Disable sha2 and aes if crypto disabled.
17574 (crypto): Enable aes and sha2 if enabled.
17575 (simd): Disable sha2 and aes if simd disabled.
17576 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
17577 New flags.
17578 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
17579 (TARGET_SHA2): New feature flag for sha2.
17580 (TARGET_AES): New feature flag for aes.
17581 * config/aarch64/aarch64-simd.md:
17582 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
17583 conditional on TARGET_AES.
17584 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
17585 (aarch64_crypto_sha1hsi): Make pattern conditional
17586 on TARGET_SHA2.
17587 (aarch64_crypto_sha1hv4si): Ditto.
17588 (aarch64_be_crypto_sha1hv4si): Ditto.
17589 (aarch64_crypto_sha1su1v4si): Ditto.
17590 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
17591 (aarch64_crypto_sha1su0v4si): Ditto.
17592 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
17593 (aarch64_crypto_sha256su0v4si): Ditto.
17594 (aarch64_crypto_sha256su1v4si): Ditto.
17595 (doc/invoke.texi): Document new aes and sha2 options.
17596
17597 2018-01-10 Martin Sebor <msebor@redhat.com>
17598
17599 PR tree-optimization/83781
17600 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
17601 as string arrays.
17602
17603 2018-01-11 Martin Sebor <msebor@gmail.com>
17604 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17605
17606 PR tree-optimization/83501
17607 PR tree-optimization/81703
17608
17609 * tree-ssa-strlen.c (get_string_cst): Rename...
17610 (get_string_len): ...to this. Handle global constants.
17611 (handle_char_store): Adjust.
17612
17613 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
17614 Jim Wilson <jimw@sifive.com>
17615
17616 * config/riscv/riscv-protos.h (riscv_output_return): New.
17617 * config/riscv/riscv.c (struct machine_function): New naked_p field.
17618 (riscv_attribute_table, riscv_output_return),
17619 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
17620 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
17621 (riscv_compute_frame_info): Only compute frame->mask if not a naked
17622 function.
17623 (riscv_expand_prologue): Add early return for naked function.
17624 (riscv_expand_epilogue): Likewise.
17625 (riscv_function_ok_for_sibcall): Return false for naked function.
17626 (riscv_set_current_function): New.
17627 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
17628 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
17629 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
17630 * doc/extend.texi (RISC-V Function Attributes): New.
17631
17632 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17633
17634 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
17635 check for 128-bit long double before checking TCmode.
17636 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
17637 128-bit long doubles before checking TFmode or TCmode.
17638 (FLOAT128_IBM_P): Likewise.
17639
17640 2018-01-10 Martin Sebor <msebor@redhat.com>
17641
17642 PR tree-optimization/83671
17643 * builtins.c (c_strlen): Unconditionally return zero for the empty
17644 string.
17645 Use -Warray-bounds for warnings.
17646 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
17647 for non-constant array indices with COMPONENT_REF, arrays of
17648 arrays, and pointers to arrays.
17649 (gimple_fold_builtin_strlen): Determine and set length range for
17650 non-constant character arrays.
17651
17652 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
17653
17654 PR middle-end/81897
17655 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
17656 empty blocks.
17657
17658 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
17659
17660 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
17661
17662 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
17663
17664 PR target/83399
17665 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
17666 VECTOR_MEM_ALTIVEC_OR_VSX_P.
17667 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
17668 indexed_or_indirect_operand predicate.
17669 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
17670 (*vsx_le_perm_load_v8hi): Likewise.
17671 (*vsx_le_perm_load_v16qi): Likewise.
17672 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
17673 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
17674 (*vsx_le_perm_store_v8hi): Likewise.
17675 (*vsx_le_perm_store_v16qi): Likewise.
17676 (eight unnamed splitters): Likewise.
17677
17678 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
17679
17680 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
17681 * config/rs6000/emmintrin.h: Likewise.
17682 * config/rs6000/mmintrin.h: Likewise.
17683 * config/rs6000/xmmintrin.h: Likewise.
17684
17685 2018-01-10 David Malcolm <dmalcolm@redhat.com>
17686
17687 PR c++/43486
17688 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
17689 "public_flag".
17690 * tree.c (tree_nop_conversion): Return true for location wrapper
17691 nodes.
17692 (maybe_wrap_with_location): New function.
17693 (selftest::check_strip_nops): New function.
17694 (selftest::test_location_wrappers): New function.
17695 (selftest::tree_c_tests): Call it.
17696 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
17697 (maybe_wrap_with_location): New decl.
17698 (EXPR_LOCATION_WRAPPER_P): New macro.
17699 (location_wrapper_p): New inline function.
17700 (tree_strip_any_location_wrapper): New inline function.
17701
17702 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
17703
17704 PR target/83735
17705 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
17706 stack_realign_offset for the largest alignment of stack slot
17707 actually used.
17708 (ix86_find_max_used_stack_alignment): New function.
17709 (ix86_finalize_stack_frame_flags): Use it. Set
17710 max_used_stack_alignment if we don't realign stack.
17711 * config/i386/i386.h (machine_function): Add
17712 max_used_stack_alignment.
17713
17714 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
17715
17716 * config/arm/arm.opt (-mbranch-cost): New option.
17717 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
17718 account.
17719
17720 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
17721
17722 PR target/83629
17723 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
17724 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
17725
17726 2018-01-10 Richard Biener <rguenther@suse.de>
17727
17728 PR debug/83765
17729 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
17730 early out so it also covers the case where we have a non-NULL
17731 origin.
17732
17733 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
17734
17735 PR tree-optimization/83753
17736 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
17737 for non-strided grouped accesses if the number of elements is 1.
17738
17739 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17740
17741 PR target/81616
17742 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
17743 * i386.h (TARGET_USE_GATHER): Define.
17744 * x86-tune.def (X86_TUNE_USE_GATHER): New.
17745
17746 2018-01-10 Martin Liska <mliska@suse.cz>
17747
17748 PR bootstrap/82831
17749 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
17750 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
17751 partitioning.
17752 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
17753 CLEANUP_NO_PARTITIONING is not set.
17754
17755 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
17756
17757 * doc/rtl.texi: Remove documentation of (const ...) wrappers
17758 for vectors, as a partial revert of r254296.
17759 * rtl.h (const_vec_p): Delete.
17760 (const_vec_duplicate_p): Don't test for vector CONSTs.
17761 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
17762 * expmed.c (make_tree): Likewise.
17763
17764 Revert:
17765 * common.md (E, F): Use CONSTANT_P instead of checking for
17766 CONST_VECTOR.
17767 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
17768 checking for CONST_VECTOR.
17769
17770 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
17771
17772 PR middle-end/83575
17773 * predict.c (force_edge_cold): Handle in more sane way edges
17774 with no prediction.
17775
17776 2018-01-09 Carl Love <cel@us.ibm.com>
17777
17778 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
17779 V4SI, V4SF types.
17780 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
17781 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
17782 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
17783 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
17784 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
17785 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
17786 * config/rs6000/rs6000-protos.h: Add extern defition for
17787 rs6000_generate_float2_double_code.
17788 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
17789 function.
17790 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
17791 (float2_v2df): Add define_expand.
17792
17793 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
17794
17795 PR target/83628
17796 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
17797 op_mode in the force_to_mode call.
17798
17799 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
17800
17801 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
17802 instead of checking each element individually.
17803 (aarch64_evpc_uzp): Likewise.
17804 (aarch64_evpc_zip): Likewise.
17805 (aarch64_evpc_ext): Likewise.
17806 (aarch64_evpc_rev): Likewise.
17807 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
17808 instead of checking each element individually. Return true without
17809 generating rtl if
17810 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
17811 whether all selected elements come from the same input, instead of
17812 checking each element individually. Remove calls to gen_rtx_REG,
17813 start_sequence and end_sequence and instead assert that no rtl is
17814 generated.
17815
17816 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
17817
17818 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
17819 order of HIGH and CONST checks.
17820
17821 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
17822
17823 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
17824 if the destination isn't an SSA_NAME.
17825
17826 2018-01-09 Richard Biener <rguenther@suse.de>
17827
17828 PR tree-optimization/83668
17829 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
17830 move prologue...
17831 (canonicalize_loop_form): ... here, renamed from ...
17832 (canonicalize_loop_closed_ssa_form): ... this and amended to
17833 swap successor edges for loop exit blocks to make us use
17834 the RPO order we need for initial schedule generation.
17835
17836 2018-01-09 Joseph Myers <joseph@codesourcery.com>
17837
17838 PR tree-optimization/64811
17839 * match.pd: When optimizing comparisons with Inf, avoid
17840 introducing or losing exceptions from comparisons with NaN.
17841
17842 2018-01-09 Martin Liska <mliska@suse.cz>
17843
17844 PR sanitizer/82517
17845 * asan.c (shadow_mem_size): Add gcc_assert.
17846
17847 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
17848
17849 Don't save registers in main().
17850
17851 PR target/83738
17852 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
17853 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
17854 * config/avr/avr.c (avr_set_current_function): Don't error if
17855 naked, OS_task or OS_main are specified at the same time.
17856 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
17857 OS_main.
17858 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
17859 attribute.
17860 * common/config/avr/avr-common.c (avr_option_optimization_table):
17861 Switch on -mmain-is-OS_task for optimizing compilations.
17862
17863 2018-01-09 Richard Biener <rguenther@suse.de>
17864
17865 PR tree-optimization/83572
17866 * graphite.c: Include cfganal.h.
17867 (graphite_transform_loops): Connect infinite loops to exit
17868 and remove fake edges at the end.
17869
17870 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
17871
17872 * ipa-inline.c (edge_badness): Revert accidental checkin.
17873
17874 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
17875
17876 PR ipa/80763
17877 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
17878 symbols; not inline clones.
17879
17880 2018-01-09 Jakub Jelinek <jakub@redhat.com>
17881
17882 PR target/83507
17883 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
17884 hard registers. Formatting fixes.
17885
17886 PR preprocessor/83722
17887 * gcc.c (try_generate_repro): Pass
17888 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
17889 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
17890 do_report_bug.
17891
17892 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
17893 Kito Cheng <kito.cheng@gmail.com>
17894
17895 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
17896 (riscv_leaf_function_p): Delete.
17897 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
17898
17899 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17900
17901 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
17902 function.
17903 (do_ifelse): New function.
17904 (do_isel): New function.
17905 (do_sub3): New function.
17906 (do_add3): New function.
17907 (do_load_mask_compare): New function.
17908 (do_overlap_load_compare): New function.
17909 (expand_compare_loop): New function.
17910 (expand_block_compare): Call expand_compare_loop() when appropriate.
17911 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
17912 option description.
17913 (-mblock-compare-inline-loop-limit): New option.
17914
17915 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17916
17917 PR target/83677
17918 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
17919 Reverse order of second and third operands in first alternative.
17920 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
17921 of first and second elements in UNSPEC_VPERMR vector.
17922 (altivec_expand_vec_perm_le): Likewise.
17923
17924 2018-01-08 Jeff Law <law@redhat.com>
17925
17926 PR rtl-optimizatin/81308
17927 * tree-switch-conversion.c (cfg_altered): New file scoped static.
17928 (process_switch): If group_case_labels makes a change, then set
17929 cfg_altered.
17930 (pass_convert_switch::execute): If a switch is converted, then
17931 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
17932
17933 PR rtl-optimization/81308
17934 * recog.c (split_all_insns): Conditionally cleanup the CFG after
17935 splitting insns.
17936
17937 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
17938
17939 PR target/83663 - Revert r255946
17940 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
17941 generation for cases where splatting a value is not useful.
17942 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
17943 across a vec_duplicate and a paradoxical subreg forming a vector
17944 mode to a vec_concat.
17945
17946 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17947
17948 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
17949 -march=armv8.3-a variants.
17950 * config/arm/t-multilib: Likewise.
17951 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
17952
17953 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17954
17955 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
17956 to generate rtl.
17957 (cceq_ior_compare_complement): Give it a name so I can use it, and
17958 change boolean_or_operator predicate to boolean_operator so it can
17959 be used to generate a crand.
17960 (eqne): New code iterator.
17961 (bd/bd_neg): New code_attrs.
17962 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
17963 a single define_insn.
17964 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
17965 decrement (bdnzt/bdnzf/bdzt/bdzf).
17966 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
17967 with the new names of the branch decrement patterns, and added the
17968 names of the branch decrement conditional patterns.
17969
17970 2018-01-08 Richard Biener <rguenther@suse.de>
17971
17972 PR tree-optimization/83563
17973 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
17974 cache.
17975
17976 2018-01-08 Richard Biener <rguenther@suse.de>
17977
17978 PR middle-end/83713
17979 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
17980
17981 2018-01-08 Richard Biener <rguenther@suse.de>
17982
17983 PR tree-optimization/83685
17984 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
17985 references to abnormals.
17986
17987 2018-01-08 Richard Biener <rguenther@suse.de>
17988
17989 PR lto/83719
17990 * dwarf2out.c (output_indirect_strings): Handle empty
17991 skeleton_debug_str_hash.
17992 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
17993
17994 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
17995
17996 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
17997 (emit_store_direct): Likewise.
17998 (arc_trampoline_adjust_address): Likewise.
17999 (arc_asm_trampoline_template): New function.
18000 (arc_initialize_trampoline): Use asm_trampoline_template.
18001 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
18002 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
18003 * config/arc/arc.md (flush_icache): Delete pattern.
18004
18005 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
18006
18007 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
18008 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
18009 munaligned-access.
18010
18011 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
18012
18013 PR target/83681
18014 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
18015 by not USED_FOR_TARGET.
18016 (make_pass_resolve_sw_modes): Likewise.
18017
18018 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
18019
18020 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
18021 USED_FOR_TARGET.
18022
18023 2018-01-08 Richard Biener <rguenther@suse.de>
18024
18025 PR middle-end/83580
18026 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
18027
18028 2018-01-08 Richard Biener <rguenther@suse.de>
18029
18030 PR middle-end/83517
18031 * match.pd ((t * 2) / 2) -> t): Add missing :c.
18032
18033 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
18034
18035 PR middle-end/81897
18036 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
18037 basic blocks with a small number of successors.
18038 (convert_control_dep_chain_into_preds): Improve handling of
18039 forwarder blocks.
18040 (dump_predicates): Split apart into...
18041 (dump_pred_chain): ...here...
18042 (dump_pred_info): ...and here.
18043 (can_one_predicate_be_invalidated_p): Add debugging printfs.
18044 (can_chain_union_be_invalidated_p): Improve check for invalidation
18045 of paths.
18046 (uninit_uses_cannot_happen): Avoid unnecessary if
18047 convert_control_dep_chain_into_preds yielded nothing.
18048
18049 2018-01-06 Martin Sebor <msebor@redhat.com>
18050
18051 PR tree-optimization/83640
18052 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
18053 subtracting negative offset from size.
18054 (builtin_access::overlap): Adjust offset bounds of the access to fall
18055 within the size of the object if possible.
18056
18057 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
18058
18059 PR rtl-optimization/83699
18060 * expmed.c (extract_bit_field_1): Restrict the vector usage of
18061 extract_bit_field_as_subreg to cases in which the extracted
18062 value is also a vector.
18063
18064 * lra-constraints.c (process_alt_operands): Test for the equivalence
18065 substitutions when detecting a possible reload cycle.
18066
18067 2018-01-06 Jakub Jelinek <jakub@redhat.com>
18068
18069 PR debug/83480
18070 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
18071 by default if flag_selective_schedling{,2}. Formatting fixes.
18072
18073 PR rtl-optimization/83682
18074 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
18075 if it has non-VECTOR_MODE element mode.
18076 (vec_duplicate_p): Likewise.
18077
18078 PR middle-end/83694
18079 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
18080 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
18081
18082 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18083
18084 PR target/83604
18085 * config/i386/i386-builtin.def
18086 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
18087 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
18088 Require also OPTION_MASK_ISA_AVX512F in addition to
18089 OPTION_MASK_ISA_GFNI.
18090 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
18091 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
18092 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
18093 to OPTION_MASK_ISA_GFNI.
18094 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
18095 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
18096 OPTION_MASK_ISA_AVX512BW.
18097 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
18098 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
18099 addition to OPTION_MASK_ISA_GFNI.
18100 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
18101 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
18102 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
18103 to OPTION_MASK_ISA_GFNI.
18104 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
18105 a requirement for all ISAs rather than any of them with a few
18106 exceptions.
18107 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
18108 processing.
18109 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
18110 bitmasks to be enabled with 3 exceptions, instead of requiring any
18111 enabled ISA with lots of exceptions.
18112 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
18113 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
18114 Change avx512bw in isa attribute to avx512f.
18115 * config/i386/sgxintrin.h: Add license boilerplate.
18116 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
18117 to __AVX512F__ and __AVX512VL to __AVX512VL__.
18118 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
18119 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
18120 defined.
18121 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
18122 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
18123 temporarily sse2 rather than sse if not enabled already.
18124
18125 PR target/83604
18126 * config/i386/sse.md (VI248_VLBW): Rename to ...
18127 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
18128 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
18129 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
18130 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
18131 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
18132 mode iterator instead of VI248_VLBW.
18133
18134 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
18135
18136 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
18137 (record_modified): Skip clobbers; add debug output.
18138 (param_change_prob): Use sreal frequencies.
18139
18140 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18141
18142 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
18143 punt for user-aligned variables.
18144
18145 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18146
18147 * tree-chrec.c (chrec_contains_symbols): Return true for
18148 POLY_INT_CST.
18149
18150 2018-01-05 Sudakshina Das <sudi.das@arm.com>
18151
18152 PR target/82439
18153 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
18154 of (x|y) == x for BICS pattern.
18155
18156 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18157
18158 PR tree-optimization/83605
18159 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
18160 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
18161 can throw.
18162
18163 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
18164
18165 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
18166 * config/epiphany/rtems.h: New file.
18167
18168 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18169 Uros Bizjak <ubizjak@gmail.com>
18170
18171 PR target/83554
18172 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
18173 QIreg_operand instead of register_operand predicate.
18174 * config/i386/i386.c (ix86_rop_should_change_byte_p,
18175 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
18176 comments instead of -fmitigate[-_]rop.
18177
18178 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18179
18180 PR bootstrap/81926
18181 * cgraphunit.c (symbol_table::compile): Switch to text_section
18182 before calling assembly_start debug hook.
18183 * run-rtl-passes.c (run_rtl_passes): Likewise.
18184 Include output.h.
18185
18186 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18187
18188 * tree-vrp.c (extract_range_from_binary_expr_1): Check
18189 range_int_cst_p rather than !symbolic_range_p before calling
18190 extract_range_from_multiplicative_op_1.
18191
18192 2018-01-04 Jeff Law <law@redhat.com>
18193
18194 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
18195 redundant test in assertion.
18196
18197 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18198
18199 * doc/rtl.texi: Document machine_mode wrapper classes.
18200
18201 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18202
18203 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
18204 using tree_to_uhwi.
18205
18206 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18207
18208 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
18209 the VEC_PERM_EXPR fold to fail.
18210
18211 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18212
18213 PR debug/83585
18214 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
18215 to switched_sections.
18216
18217 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18218
18219 PR target/83680
18220 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
18221 test for d.testing.
18222
18223 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
18224
18225 PR target/83387
18226 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
18227 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
18228
18229 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18230
18231 PR debug/83666
18232 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
18233 is BLKmode and bitpos not zero or mode change is needed.
18234
18235 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18236
18237 PR target/83675
18238 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
18239 TARGET_VIS2.
18240
18241 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
18242
18243 PR target/83628
18244 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
18245 instead of MULT rtx. Update all corresponding splitters.
18246 (*saddl_se): Ditto.
18247 (*ssub<modesuffix>): Ditto.
18248 (*ssubl_se): Ditto.
18249 (*cmp_sadd_di): Update split patterns.
18250 (*cmp_sadd_si): Ditto.
18251 (*cmp_sadd_sidi): Ditto.
18252 (*cmp_ssub_di): Ditto.
18253 (*cmp_ssub_si): Ditto.
18254 (*cmp_ssub_sidi): Ditto.
18255 * config/alpha/predicates.md (const23_operand): New predicate.
18256 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
18257 Look for ASHIFT, not MULT inner operand.
18258 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
18259
18260 2018-01-04 Martin Liska <mliska@suse.cz>
18261
18262 PR gcov-profile/83669
18263 * gcov.c (output_intermediate_file): Add version to intermediate
18264 gcov file.
18265 * doc/gcov.texi: Document new field 'version' in intermediate
18266 file format. Fix location of '-k' option of gcov command.
18267
18268 2018-01-04 Martin Liska <mliska@suse.cz>
18269
18270 PR ipa/82352
18271 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
18272
18273 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18274
18275 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
18276
18277 2018-01-03 Martin Sebor <msebor@redhat.com>
18278
18279 PR tree-optimization/83655
18280 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
18281 checking calls with invalid arguments.
18282
18283 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18284
18285 * tree-vect-stmts.c (vect_get_store_rhs): New function.
18286 (vectorizable_mask_load_store): Delete.
18287 (vectorizable_call): Return false for masked loads and stores.
18288 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
18289 instead of gimple_assign_rhs1.
18290 (vectorizable_load): Handle IFN_MASK_LOAD.
18291 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
18292
18293 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18294
18295 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
18296 split out from..,
18297 (vectorizable_mask_load_store): ...here.
18298 (vectorizable_load): ...and here.
18299
18300 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18301
18302 * tree-vect-stmts.c (vect_build_all_ones_mask)
18303 (vect_build_zero_merge_argument): New functions, split out from...
18304 (vectorizable_load): ...here.
18305
18306 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18307
18308 * tree-vect-stmts.c (vect_check_store_rhs): New function,
18309 split out from...
18310 (vectorizable_mask_load_store): ...here.
18311 (vectorizable_store): ...and here.
18312
18313 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18314
18315 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
18316 split out from...
18317 (vectorizable_mask_load_store): ...here.
18318
18319 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18320
18321 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
18322 (vect_model_store_cost): Take a vec_load_store_type instead of a
18323 vect_def_type.
18324 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
18325 (vect_model_store_cost): Take a vec_load_store_type instead of a
18326 vect_def_type.
18327 (vectorizable_mask_load_store): Update accordingly.
18328 (vectorizable_store): Likewise.
18329 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
18330
18331 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18332
18333 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
18334 IFN_MASK_LOAD calls here rather than...
18335 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
18336
18337 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18338 Alan Hayward <alan.hayward@arm.com>
18339 David Sherwood <david.sherwood@arm.com>
18340
18341 * expmed.c (extract_bit_field_1): For vector extracts,
18342 fall back to extract_bit_field_as_subreg if vec_extract
18343 isn't available.
18344
18345 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18346 Alan Hayward <alan.hayward@arm.com>
18347 David Sherwood <david.sherwood@arm.com>
18348
18349 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
18350 they are variable or constant sized.
18351 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
18352 slots for constant-sized data.
18353
18354 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18355 Alan Hayward <alan.hayward@arm.com>
18356 David Sherwood <david.sherwood@arm.com>
18357
18358 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
18359 handling COND_EXPRs with boolean comparisons, try to find a better
18360 basis for the mask type than the boolean itself.
18361
18362 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18363
18364 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
18365 is calculated and how it can be overridden.
18366 * genmodes.c (max_bitsize_mode_any_mode): New variable.
18367 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
18368 if defined.
18369 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
18370 if nonzero.
18371
18372 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18373 Alan Hayward <alan.hayward@arm.com>
18374 David Sherwood <david.sherwood@arm.com>
18375
18376 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
18377 Remove the mode argument.
18378 (aarch64_simd_valid_immediate): Remove the mode and inverse
18379 arguments.
18380 * config/aarch64/iterators.md (bitsize): New iterator.
18381 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
18382 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
18383 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
18384 aarch64_simd_valid_immediate.
18385 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
18386 (aarch64_reg_or_bic_imm): Likewise.
18387 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
18388 with an insn_type enum and msl with a modifier_type enum.
18389 Replace element_width with a scalar_mode. Change the shift
18390 to unsigned int. Add constructors for scalar_float_mode and
18391 scalar_int_mode elements.
18392 (aarch64_vect_float_const_representable_p): Delete.
18393 (aarch64_can_const_movi_rtx_p)
18394 (aarch64_simd_scalar_immediate_valid_for_move)
18395 (aarch64_simd_make_constant): Update call to
18396 aarch64_simd_valid_immediate.
18397 (aarch64_advsimd_valid_immediate_hs): New function.
18398 (aarch64_advsimd_valid_immediate): Likewise.
18399 (aarch64_simd_valid_immediate): Remove mode and inverse
18400 arguments. Rewrite to use the above. Use const_vec_duplicate_p
18401 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
18402 and aarch64_float_const_representable_p on the result.
18403 (aarch64_output_simd_mov_immediate): Remove mode argument.
18404 Update call to aarch64_simd_valid_immediate and use of
18405 simd_immediate_info.
18406 (aarch64_output_scalar_simd_mov_immediate): Update call
18407 accordingly.
18408
18409 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18410 Alan Hayward <alan.hayward@arm.com>
18411 David Sherwood <david.sherwood@arm.com>
18412
18413 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
18414 (mode_nunits): Likewise CONST_MODE_NUNITS.
18415 * machmode.def (ADJUST_NUNITS): Document.
18416 * genmodes.c (mode_data::need_nunits_adj): New field.
18417 (blank_mode): Update accordingly.
18418 (adj_nunits): New variable.
18419 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
18420 parameter.
18421 (emit_mode_size_inline): Set need_bytesize_adj for all modes
18422 listed in adj_nunits.
18423 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
18424 listed in adj_nunits. Don't emit case statements for such modes.
18425 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
18426 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
18427 nothing if adj_nunits is nonnull.
18428 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
18429 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
18430 (emit_mode_fbit): Update use of print_maybe_const_decl.
18431 (emit_move_size): Likewise. Treat the array as non-const
18432 if adj_nunits.
18433 (emit_mode_adjustments): Handle adj_nunits.
18434
18435 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18436
18437 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
18438 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
18439 (VECTOR_MODES): Use it.
18440 (make_vector_modes): Take the prefix as an argument.
18441
18442 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18443 Alan Hayward <alan.hayward@arm.com>
18444 David Sherwood <david.sherwood@arm.com>
18445
18446 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
18447 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
18448 for MODE_VECTOR_BOOL.
18449 * machmode.def (VECTOR_BOOL_MODE): Document.
18450 * genmodes.c (VECTOR_BOOL_MODE): New macro.
18451 (make_vector_bool_mode): New function.
18452 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
18453 MODE_VECTOR_BOOL.
18454 * lto-streamer-in.c (lto_input_mode_table): Likewise.
18455 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
18456 Likewise.
18457 * stor-layout.c (int_mode_for_mode): Likewise.
18458 * tree.c (build_vector_type_for_mode): Likewise.
18459 * varasm.c (output_constant_pool_2): Likewise.
18460 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
18461 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
18462 for MODE_VECTOR_BOOL.
18463 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
18464 of mode class checks.
18465 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
18466 instead of a list of mode class checks.
18467 (expand_vector_scalar_condition): Likewise.
18468 (type_for_widest_vector_mode): Handle BImode as an inner mode.
18469
18470 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18471 Alan Hayward <alan.hayward@arm.com>
18472 David Sherwood <david.sherwood@arm.com>
18473
18474 * machmode.h (mode_size): Change from unsigned short to
18475 poly_uint16_pod.
18476 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
18477 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18478 or if measurement_type is not polynomial.
18479 (fixed_size_mode::includes_p): Check for constant-sized modes.
18480 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
18481 return a poly_uint16 rather than an unsigned short.
18482 (emit_mode_size): Change the type of mode_size from unsigned short
18483 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
18484 (emit_mode_adjustments): Cope with polynomial vector sizes.
18485 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18486 for GET_MODE_SIZE.
18487 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18488 for GET_MODE_SIZE.
18489 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
18490 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
18491 * caller-save.c (setup_save_areas): Likewise.
18492 (replace_reg_with_saved_mem): Likewise.
18493 * calls.c (emit_library_call_value_1): Likewise.
18494 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
18495 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
18496 (gen_lowpart_for_combine): Likewise.
18497 * convert.c (convert_to_integer_1): Likewise.
18498 * cse.c (equiv_constant, cse_insn): Likewise.
18499 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
18500 (cselib_subst_to_values): Likewise.
18501 * dce.c (word_dce_process_block): Likewise.
18502 * df-problems.c (df_word_lr_mark_ref): Likewise.
18503 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
18504 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
18505 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
18506 (rtl_for_decl_location): Likewise.
18507 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
18508 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
18509 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
18510 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
18511 (expand_expr_real_1): Likewise.
18512 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
18513 (pad_below): Likewise.
18514 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
18515 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
18516 * ira.c (get_subreg_tracking_sizes): Likewise.
18517 * ira-build.c (ira_create_allocno_objects): Likewise.
18518 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
18519 (ira_sort_regnos_for_alter_reg): Likewise.
18520 * ira-costs.c (record_operand_costs): Likewise.
18521 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
18522 (resolve_simple_move): Likewise.
18523 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
18524 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
18525 (lra_constraints): Likewise.
18526 (CONST_POOL_OK_P): Reject variable-sized modes.
18527 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
18528 (add_pseudo_to_slot, lra_spill): Likewise.
18529 * omp-low.c (omp_clause_aligned_alignment): Likewise.
18530 * optabs-query.c (get_best_extraction_insn): Likewise.
18531 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18532 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
18533 (expand_mult_highpart, valid_multiword_target_p): Likewise.
18534 * recog.c (offsettable_address_addr_space_p): Likewise.
18535 * regcprop.c (maybe_mode_change): Likewise.
18536 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
18537 * regrename.c (build_def_use): Likewise.
18538 * regstat.c (dump_reg_info): Likewise.
18539 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
18540 (find_reloads, find_reloads_subreg_address): Likewise.
18541 * reload1.c (eliminate_regs_1): Likewise.
18542 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
18543 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
18544 (simplify_binary_operation_1, simplify_subreg): Likewise.
18545 * targhooks.c (default_function_arg_padding): Likewise.
18546 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
18547 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
18548 (verify_gimple_assign_ternary): Likewise.
18549 * tree-inline.c (estimate_move_cost): Likewise.
18550 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18551 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
18552 (get_address_cost_ainc): Likewise.
18553 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
18554 (vect_supportable_dr_alignment): Likewise.
18555 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18556 (vectorizable_reduction): Likewise.
18557 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
18558 (vectorizable_operation, vectorizable_load): Likewise.
18559 * tree.c (build_same_sized_truth_vector_type): Likewise.
18560 * valtrack.c (cleanup_auto_inc_dec): Likewise.
18561 * var-tracking.c (emit_note_insn_var_location): Likewise.
18562 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
18563 (ADDR_VEC_ALIGN): Likewise.
18564
18565 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18566 Alan Hayward <alan.hayward@arm.com>
18567 David Sherwood <david.sherwood@arm.com>
18568
18569 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
18570 unsigned short.
18571 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18572 or if measurement_type is polynomial.
18573 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
18574 * combine.c (make_extraction): Likewise.
18575 * dse.c (find_shift_sequence): Likewise.
18576 * dwarf2out.c (mem_loc_descriptor): Likewise.
18577 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
18578 (extract_bit_field, extract_low_bits): Likewise.
18579 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
18580 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
18581 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
18582 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
18583 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
18584 * reload.c (find_reloads): Likewise.
18585 * reload1.c (alter_reg): Likewise.
18586 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
18587 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
18588 * tree-if-conv.c (predicate_mem_writes): Likewise.
18589 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
18590 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
18591 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
18592 * valtrack.c (dead_debug_insert_temp): Likewise.
18593 * varasm.c (mergeable_constant_section): Likewise.
18594 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
18595
18596 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18597 Alan Hayward <alan.hayward@arm.com>
18598 David Sherwood <david.sherwood@arm.com>
18599
18600 * expr.c (expand_assignment): Cope with polynomial mode sizes
18601 when assigning to a CONCAT.
18602
18603 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18604 Alan Hayward <alan.hayward@arm.com>
18605 David Sherwood <david.sherwood@arm.com>
18606
18607 * machmode.h (mode_precision): Change from unsigned short to
18608 poly_uint16_pod.
18609 (mode_to_precision): Return a poly_uint16 rather than an unsigned
18610 short.
18611 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
18612 or if measurement_type is not polynomial.
18613 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
18614 in which the mode is already known to be a scalar_int_mode.
18615 * genmodes.c (emit_mode_precision): Change the type of mode_precision
18616 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
18617 initializer.
18618 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18619 for GET_MODE_PRECISION.
18620 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18621 for GET_MODE_PRECISION.
18622 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
18623 as polynomial.
18624 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
18625 (expand_field_assignment, make_extraction): Likewise.
18626 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
18627 (get_last_value): Likewise.
18628 * convert.c (convert_to_integer_1): Likewise.
18629 * cse.c (cse_insn): Likewise.
18630 * expr.c (expand_expr_real_1): Likewise.
18631 * lra-constraints.c (simplify_operand_subreg): Likewise.
18632 * optabs-query.c (can_atomic_load_p): Likewise.
18633 * optabs.c (expand_atomic_load): Likewise.
18634 (expand_atomic_store): Likewise.
18635 * ree.c (combine_reaching_defs): Likewise.
18636 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
18637 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
18638 * tree.h (type_has_mode_precision_p): Likewise.
18639 * ubsan.c (instrument_si_overflow): Likewise.
18640
18641 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18642 Alan Hayward <alan.hayward@arm.com>
18643 David Sherwood <david.sherwood@arm.com>
18644
18645 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
18646 polynomial numbers of units.
18647 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
18648 (valid_vector_subparts_p): New function.
18649 (build_vector_type): Remove temporary shim and take the number
18650 of units as a poly_uint64 rather than an int.
18651 (build_opaque_vector_type): Take the number of units as a
18652 poly_uint64 rather than an int.
18653 * tree.c (build_vector_from_ctor): Handle polynomial
18654 TYPE_VECTOR_SUBPARTS.
18655 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
18656 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
18657 (build_vector_from_val): If the number of units is variable,
18658 use build_vec_duplicate_cst for constant operands and
18659 VEC_DUPLICATE_EXPR otherwise.
18660 (make_vector_type): Remove temporary is_constant ().
18661 (build_vector_type, build_opaque_vector_type): Take the number of
18662 units as a poly_uint64 rather than an int.
18663 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
18664 VECTOR_CST_NELTS.
18665 * cfgexpand.c (expand_debug_expr): Likewise.
18666 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
18667 (store_constructor, expand_expr_real_1): Likewise.
18668 (const_scalar_mask_from_tree): Likewise.
18669 * fold-const-call.c (fold_const_reduction): Likewise.
18670 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
18671 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
18672 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
18673 (fold_relational_const): Likewise.
18674 (native_interpret_vector): Likewise. Change the size from an
18675 int to an unsigned int.
18676 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
18677 TYPE_VECTOR_SUBPARTS.
18678 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
18679 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
18680 duplicating a non-constant operand into a variable-length vector.
18681 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
18682 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
18683 * ipa-icf.c (sem_variable::equals): Likewise.
18684 * match.pd: Likewise.
18685 * omp-simd-clone.c (simd_clone_subparts): Likewise.
18686 * print-tree.c (print_node): Likewise.
18687 * stor-layout.c (layout_type): Likewise.
18688 * targhooks.c (default_builtin_vectorization_cost): Likewise.
18689 * tree-cfg.c (verify_gimple_comparison): Likewise.
18690 (verify_gimple_assign_binary): Likewise.
18691 (verify_gimple_assign_ternary): Likewise.
18692 (verify_gimple_assign_single): Likewise.
18693 * tree-pretty-print.c (dump_generic_node): Likewise.
18694 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18695 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
18696 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
18697 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
18698 (vect_shift_permute_load_chain): Likewise.
18699 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
18700 (expand_vector_condition, optimize_vector_constructor): Likewise.
18701 (lower_vec_perm, get_compute_type): Likewise.
18702 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18703 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
18704 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
18705 (vect_recog_mask_conversion_pattern): Likewise.
18706 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
18707 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
18708 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18709 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
18710 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
18711 (vectorizable_shift, vectorizable_operation, vectorizable_store)
18712 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
18713 (supportable_widening_operation): Likewise.
18714 (supportable_narrowing_operation): Likewise.
18715 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
18716 Likewise.
18717 * varasm.c (output_constant): Likewise.
18718
18719 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18720 Alan Hayward <alan.hayward@arm.com>
18721 David Sherwood <david.sherwood@arm.com>
18722
18723 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
18724 so that both the length == 3 and length != 3 cases set up their
18725 own permute vectors. Add comments explaining why we know the
18726 number of elements is constant.
18727 (vect_permute_load_chain): Likewise.
18728
18729 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18730 Alan Hayward <alan.hayward@arm.com>
18731 David Sherwood <david.sherwood@arm.com>
18732
18733 * machmode.h (mode_nunits): Change from unsigned char to
18734 poly_uint16_pod.
18735 (ONLY_FIXED_SIZE_MODES): New macro.
18736 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
18737 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
18738 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
18739 New typedefs.
18740 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
18741 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
18742 or if measurement_type is not polynomial.
18743 * genmodes.c (ZERO_COEFFS): New macro.
18744 (emit_mode_nunits_inline): Make mode_nunits_inline return a
18745 poly_uint16.
18746 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
18747 Use ZERO_COEFFS when emitting initializers.
18748 * data-streamer.h (bp_pack_poly_value): New function.
18749 (bp_unpack_poly_value): Likewise.
18750 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18751 for GET_MODE_NUNITS.
18752 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18753 for GET_MODE_NUNITS.
18754 * tree.c (make_vector_type): Remove temporary shim and make
18755 the real function take the number of units as a poly_uint64
18756 rather than an int.
18757 (build_vector_type_for_mode): Handle polynomial nunits.
18758 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
18759 * emit-rtl.c (const_vec_series_p_1): Likewise.
18760 (gen_rtx_CONST_VECTOR): Likewise.
18761 * fold-const.c (test_vec_duplicate_folding): Likewise.
18762 * genrecog.c (validate_pattern): Likewise.
18763 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
18764 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18765 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
18766 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
18767 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
18768 * rtlanal.c (subreg_get_info): Likewise.
18769 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18770 (vect_grouped_load_supported): Likewise.
18771 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
18772 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
18773 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18774 (simplify_const_unary_operation, simplify_binary_operation_1)
18775 (simplify_const_binary_operation, simplify_ternary_operation)
18776 (test_vector_ops_duplicate, test_vector_ops): Likewise.
18777 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
18778 instead of CONST_VECTOR_NUNITS.
18779 * varasm.c (output_constant_pool_2): Likewise.
18780 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
18781 explicit-encoded elements in the XVEC for variable-length vectors.
18782
18783 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18784
18785 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
18786
18787 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18788 Alan Hayward <alan.hayward@arm.com>
18789 David Sherwood <david.sherwood@arm.com>
18790
18791 * coretypes.h (fixed_size_mode): Declare.
18792 (fixed_size_mode_pod): New typedef.
18793 * builtins.h (target_builtins::x_apply_args_mode)
18794 (target_builtins::x_apply_result_mode): Change type to
18795 fixed_size_mode_pod.
18796 * builtins.c (apply_args_size, apply_result_size, result_vector)
18797 (expand_builtin_apply_args_1, expand_builtin_apply)
18798 (expand_builtin_return): Update accordingly.
18799
18800 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18801
18802 * cse.c (hash_rtx_cb): Hash only the encoded elements.
18803 * cselib.c (cselib_hash_rtx): Likewise.
18804 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
18805 CONST_VECTOR encoding.
18806
18807 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18808 Jeff Law <law@redhat.com>
18809
18810 PR target/83641
18811 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
18812 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
18813 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
18814 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
18815
18816 PR target/83641
18817 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
18818 explicitly probe *sp in a noreturn function if there were any callee
18819 register saves or frame pointer is needed.
18820
18821 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18822
18823 PR debug/83621
18824 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
18825 BLKmode for ternary, binary or unary expressions.
18826
18827 PR debug/83645
18828 * var-tracking.c (delete_vta_debug_insn): New inline function.
18829 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
18830 insns from get_insns () to NULL instead of each bb separately.
18831 Use delete_vta_debug_insn. No longer static.
18832 (vt_debug_insns_local, variable_tracking_main_1): Adjust
18833 delete_vta_debug_insns callers.
18834 * rtl.h (delete_vta_debug_insns): Declare.
18835 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
18836 instead of variable_tracking_main.
18837
18838 2018-01-03 Martin Sebor <msebor@redhat.com>
18839
18840 PR tree-optimization/83603
18841 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
18842 arguments past the endof the argument list in functions declared
18843 without a prototype.
18844 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
18845 Avoid checking when arguments are null.
18846
18847 2018-01-03 Martin Sebor <msebor@redhat.com>
18848
18849 PR c/83559
18850 * doc/extend.texi (attribute const): Fix a typo.
18851 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
18852 issuing -Wsuggest-attribute for void functions.
18853
18854 2018-01-03 Martin Sebor <msebor@redhat.com>
18855
18856 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
18857 offset_int::from instead of wide_int::to_shwi.
18858 (maybe_diag_overlap): Remove assertion.
18859 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
18860 * gimple-ssa-sprintf.c (format_directive): Same.
18861 (parse_directive): Same.
18862 (sprintf_dom_walker::compute_format_length): Same.
18863 (try_substitute_return_value): Same.
18864
18865 2018-01-03 Jeff Law <law@redhat.com>
18866
18867 PR middle-end/83654
18868 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
18869 non-constant residual for zero at runtime and avoid probing in
18870 that case. Reorganize code for trailing problem to mirror handling
18871 of the residual.
18872
18873 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18874
18875 PR tree-optimization/83501
18876 * tree-ssa-strlen.c (get_string_cst): New.
18877 (handle_char_store): Call get_string_cst.
18878
18879 2018-01-03 Martin Liska <mliska@suse.cz>
18880
18881 PR tree-optimization/83593
18882 * tree-ssa-strlen.c: Include tree-cfg.h.
18883 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
18884 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
18885 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
18886 to false.
18887 (strlen_dom_walker::before_dom_children): Call
18888 gimple_purge_dead_eh_edges. Dump tranformation with details
18889 dump flags.
18890 (strlen_dom_walker::before_dom_children): Update call by adding
18891 new argument cleanup_eh.
18892 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
18893
18894 2018-01-03 Martin Liska <mliska@suse.cz>
18895
18896 PR ipa/83549
18897 * cif-code.def (VARIADIC_THUNK): New enum value.
18898 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
18899 thunks.
18900
18901 2018-01-03 Jan Beulich <jbeulich@suse.com>
18902
18903 * sse.md (mov<mode>_internal): Tighten condition for when to use
18904 vmovdqu<ssescalarsize> for TI and OI modes.
18905
18906 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18907
18908 Update copyright years.
18909
18910 2018-01-03 Martin Liska <mliska@suse.cz>
18911
18912 PR ipa/83594
18913 * ipa-visibility.c (function_and_variable_visibility): Skip
18914 functions with noipa attribure.
18915
18916 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18917
18918 * gcc.c (process_command): Update copyright notice dates.
18919 * gcov-dump.c (print_version): Ditto.
18920 * gcov.c (print_version): Ditto.
18921 * gcov-tool.c (print_version): Ditto.
18922 * gengtype.c (create_file): Ditto.
18923 * doc/cpp.texi: Bump @copying's copyright year.
18924 * doc/cppinternals.texi: Ditto.
18925 * doc/gcc.texi: Ditto.
18926 * doc/gccint.texi: Ditto.
18927 * doc/gcov.texi: Ditto.
18928 * doc/install.texi: Ditto.
18929 * doc/invoke.texi: Ditto.
18930
18931 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18932
18933 * vector-builder.h (vector_builder::m_full_nelts): Change from
18934 unsigned int to poly_uint64.
18935 (vector_builder::full_nelts): Update prototype accordingly.
18936 (vector_builder::new_vector): Likewise.
18937 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
18938 (vector_builder::operator ==): Likewise.
18939 (vector_builder::finalize): Likewise.
18940 * int-vector-builder.h (int_vector_builder::int_vector_builder):
18941 Take the number of elements as a poly_uint64 rather than an
18942 unsigned int.
18943 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
18944 from unsigned int to poly_uint64.
18945 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
18946 (vec_perm_indices::new_vector): Likewise.
18947 (vec_perm_indices::length): Likewise.
18948 (vec_perm_indices::nelts_per_input): Likewise.
18949 (vec_perm_indices::input_nelts): Likewise.
18950 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
18951 number of elements per input as a poly_uint64 rather than an
18952 unsigned int. Use the original encoding for variable-length
18953 vectors, rather than clamping each individual element.
18954 For the second and subsequent elements in each pattern,
18955 clamp the step and base before clamping their sum.
18956 (vec_perm_indices::series_p): Handle polynomial element counts.
18957 (vec_perm_indices::all_in_range_p): Likewise.
18958 (vec_perm_indices_to_tree): Likewise.
18959 (vec_perm_indices_to_rtx): Likewise.
18960 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
18961 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
18962 (tree_vector_builder::new_binary_operation): Handle polynomial
18963 element counts. Return false if we need to know the number
18964 of elements at compile time.
18965 * fold-const.c (fold_vec_perm): Punt if the number of elements
18966 isn't known at compile time.
18967
18968 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18969
18970 * vec-perm-indices.h (vec_perm_builder): Change element type
18971 from HOST_WIDE_INT to poly_int64.
18972 (vec_perm_indices::element_type): Update accordingly.
18973 (vec_perm_indices::clamp): Handle polynomial element_types.
18974 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
18975 (vec_perm_indices::all_in_range_p): Likewise.
18976 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
18977 than shwi trees.
18978 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
18979 polynomial vec_perm_indices element types.
18980 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
18981 * fold-const.c (fold_vec_perm): Likewise.
18982 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
18983 * tree-vect-generic.c (lower_vec_perm): Likewise.
18984 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18985 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
18986 element type to HOST_WIDE_INT.
18987
18988 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18989 Alan Hayward <alan.hayward@arm.com>
18990 David Sherwood <david.sherwood@arm.com>
18991
18992 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
18993 rather than an int. Use plus_constant.
18994 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
18995 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
18996
18997 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18998 Alan Hayward <alan.hayward@arm.com>
18999 David Sherwood <david.sherwood@arm.com>
19000
19001 * calls.c (emit_call_1, expand_call): Change struct_value_size from
19002 a HOST_WIDE_INT to a poly_int64.
19003
19004 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19005 Alan Hayward <alan.hayward@arm.com>
19006 David Sherwood <david.sherwood@arm.com>
19007
19008 * calls.c (load_register_parameters): Cope with polynomial
19009 mode sizes. Require a constant size for BLKmode parameters
19010 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
19011 forces a parameter to be padded at the lsb end in order to
19012 fill a complete number of words, require the parameter size
19013 to be ordered wrt UNITS_PER_WORD.
19014
19015 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19016 Alan Hayward <alan.hayward@arm.com>
19017 David Sherwood <david.sherwood@arm.com>
19018
19019 * reload1.c (spill_stack_slot_width): Change element type
19020 from unsigned int to poly_uint64_pod.
19021 (alter_reg): Treat mode sizes as polynomial.
19022
19023 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19024 Alan Hayward <alan.hayward@arm.com>
19025 David Sherwood <david.sherwood@arm.com>
19026
19027 * reload.c (complex_word_subreg_p): New function.
19028 (reload_inner_reg_of_subreg, push_reload): Use it.
19029
19030 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19031 Alan Hayward <alan.hayward@arm.com>
19032 David Sherwood <david.sherwood@arm.com>
19033
19034 * lra-constraints.c (process_alt_operands): Reject matched
19035 operands whose sizes aren't ordered.
19036 (match_reload): Refer to this check here.
19037
19038 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19039 Alan Hayward <alan.hayward@arm.com>
19040 David Sherwood <david.sherwood@arm.com>
19041
19042 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
19043 that the mode size is in the set {1, 2, 4, 8, 16}.
19044
19045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19046 Alan Hayward <alan.hayward@arm.com>
19047 David Sherwood <david.sherwood@arm.com>
19048
19049 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
19050 Use plus_constant instead of gen_rtx_PLUS.
19051
19052 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19053 Alan Hayward <alan.hayward@arm.com>
19054 David Sherwood <david.sherwood@arm.com>
19055
19056 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
19057 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
19058 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
19059 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
19060 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
19061 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
19062 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
19063 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
19064 * config/i386/i386.c (ix86_push_rounding): ...this new function.
19065 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
19066 a poly_int64.
19067 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
19068 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
19069 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
19070 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
19071 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
19072 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
19073 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
19074 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
19075 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
19076 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
19077 function.
19078 * expr.c (emit_move_resolve_push): Treat the input and result
19079 of PUSH_ROUNDING as a poly_int64.
19080 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
19081 (emit_push_insn): Likewise.
19082 * lra-eliminations.c (mark_not_eliminable): Likewise.
19083 * recog.c (push_operand): Likewise.
19084 * reload1.c (elimination_effects): Likewise.
19085 * rtlanal.c (nonzero_bits1): Likewise.
19086 * calls.c (store_one_arg): Likewise. Require the padding to be
19087 known at compile time.
19088
19089 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19090 Alan Hayward <alan.hayward@arm.com>
19091 David Sherwood <david.sherwood@arm.com>
19092
19093 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
19094 Use plus_constant instead of gen_rtx_PLUS.
19095
19096 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19097 Alan Hayward <alan.hayward@arm.com>
19098 David Sherwood <david.sherwood@arm.com>
19099
19100 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
19101 rather than an int.
19102
19103 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19104 Alan Hayward <alan.hayward@arm.com>
19105 David Sherwood <david.sherwood@arm.com>
19106
19107 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
19108 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
19109 via stack temporaries. Treat the mode size as polynomial too.
19110
19111 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19112 Alan Hayward <alan.hayward@arm.com>
19113 David Sherwood <david.sherwood@arm.com>
19114
19115 * expr.c (expand_expr_real_2): When handling conversions involving
19116 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
19117 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
19118 as a poly_uint64 too.
19119
19120 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19121 Alan Hayward <alan.hayward@arm.com>
19122 David Sherwood <david.sherwood@arm.com>
19123
19124 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
19125
19126 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19127 Alan Hayward <alan.hayward@arm.com>
19128 David Sherwood <david.sherwood@arm.com>
19129
19130 * combine.c (can_change_dest_mode): Handle polynomial
19131 REGMODE_NATURAL_SIZE.
19132 * expmed.c (store_bit_field_1): Likewise.
19133 * expr.c (store_constructor): Likewise.
19134 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
19135 and polynomial REGMODE_NATURAL_SIZE.
19136 (gen_lowpart_common): Likewise.
19137 * reginfo.c (record_subregs_of_mode): Likewise.
19138 * rtlanal.c (read_modify_subreg_p): Likewise.
19139
19140 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19141 Alan Hayward <alan.hayward@arm.com>
19142 David Sherwood <david.sherwood@arm.com>
19143
19144 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
19145 numbers of elements.
19146
19147 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19148 Alan Hayward <alan.hayward@arm.com>
19149 David Sherwood <david.sherwood@arm.com>
19150
19151 * match.pd: Cope with polynomial numbers of vector elements.
19152
19153 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19154 Alan Hayward <alan.hayward@arm.com>
19155 David Sherwood <david.sherwood@arm.com>
19156
19157 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
19158 in a POINTER_PLUS_EXPR.
19159
19160 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19161 Alan Hayward <alan.hayward@arm.com>
19162 David Sherwood <david.sherwood@arm.com>
19163
19164 * omp-simd-clone.c (simd_clone_subparts): New function.
19165 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
19166 (ipa_simd_modify_function_body): Likewise.
19167
19168 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19169 Alan Hayward <alan.hayward@arm.com>
19170 David Sherwood <david.sherwood@arm.com>
19171
19172 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
19173 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
19174 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
19175 (expand_vector_condition, vector_element): Likewise.
19176 (subparts_gt): New function.
19177 (get_compute_type): Use subparts_gt.
19178 (count_type_subparts): Delete.
19179 (expand_vector_operations_1): Use subparts_gt instead of
19180 count_type_subparts.
19181
19182 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19183 Alan Hayward <alan.hayward@arm.com>
19184 David Sherwood <david.sherwood@arm.com>
19185
19186 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
19187 (vect_compile_time_alias): ...this new function. Do the calculation
19188 on poly_ints rather than trees.
19189 (vect_prune_runtime_alias_test_list): Update call accordingly.
19190
19191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19192 Alan Hayward <alan.hayward@arm.com>
19193 David Sherwood <david.sherwood@arm.com>
19194
19195 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
19196 numbers of units.
19197 (vect_schedule_slp_instance): Likewise.
19198
19199 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19200 Alan Hayward <alan.hayward@arm.com>
19201 David Sherwood <david.sherwood@arm.com>
19202
19203 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
19204 constant and extern definitions for variable-length vectors.
19205 (vect_get_constant_vectors): Note that the number of units
19206 is known to be constant.
19207
19208 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19209 Alan Hayward <alan.hayward@arm.com>
19210 David Sherwood <david.sherwood@arm.com>
19211
19212 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
19213 of units as polynomial. Choose between WIDE and NARROW based
19214 on multiple_p.
19215
19216 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19217 Alan Hayward <alan.hayward@arm.com>
19218 David Sherwood <david.sherwood@arm.com>
19219
19220 * tree-vect-stmts.c (simd_clone_subparts): New function.
19221 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
19222
19223 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19224 Alan Hayward <alan.hayward@arm.com>
19225 David Sherwood <david.sherwood@arm.com>
19226
19227 * tree-vect-stmts.c (vectorizable_call): Treat the number of
19228 vectors as polynomial. Use build_index_vector for
19229 IFN_GOMP_SIMD_LANE.
19230
19231 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19232 Alan Hayward <alan.hayward@arm.com>
19233 David Sherwood <david.sherwood@arm.com>
19234
19235 * tree-vect-stmts.c (get_load_store_type): Treat the number of
19236 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
19237 for variable-length vectors.
19238 (vectorizable_mask_load_store): Treat the number of units as
19239 polynomial, asserting that it is constant if the condition has
19240 already been enforced.
19241 (vectorizable_store, vectorizable_load): Likewise.
19242
19243 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19244 Alan Hayward <alan.hayward@arm.com>
19245 David Sherwood <david.sherwood@arm.com>
19246
19247 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
19248 of units as polynomial. Punt if we can't tell at compile time
19249 which vector contains the final result.
19250
19251 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19252 Alan Hayward <alan.hayward@arm.com>
19253 David Sherwood <david.sherwood@arm.com>
19254
19255 * tree-vect-loop.c (vectorizable_induction): Treat the number
19256 of units as polynomial. Punt on SLP inductions. Use an integer
19257 VEC_SERIES_EXPR for variable-length integer reductions. Use a
19258 cast of such a series for variable-length floating-point
19259 reductions.
19260
19261 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19262 Alan Hayward <alan.hayward@arm.com>
19263 David Sherwood <david.sherwood@arm.com>
19264
19265 * tree.h (build_index_vector): Declare.
19266 * tree.c (build_index_vector): New function.
19267 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
19268 of units as polynomial, forcibly converting it to a constant if
19269 vectorizable_reduction has already enforced the condition.
19270 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
19271 to create a {1,2,3,...} vector.
19272 (vectorizable_reduction): Treat the number of units as polynomial.
19273 Choose vectype_in based on the largest scalar element size rather
19274 than the smallest number of units. Enforce the restrictions
19275 relied on above.
19276
19277 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19278 Alan Hayward <alan.hayward@arm.com>
19279 David Sherwood <david.sherwood@arm.com>
19280
19281 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
19282 number of units as polynomial.
19283
19284 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19285 Alan Hayward <alan.hayward@arm.com>
19286 David Sherwood <david.sherwood@arm.com>
19287
19288 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
19289 * target.def (autovectorize_vector_sizes): Return the vector sizes
19290 by pointer, using vector_sizes rather than a bitmask.
19291 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
19292 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
19293 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
19294 Likewise.
19295 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
19296 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
19297 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
19298 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
19299 * omp-general.c (omp_max_vf): Likewise.
19300 * omp-low.c (omp_clause_aligned_alignment): Likewise.
19301 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
19302 * tree-vect-loop.c (vect_analyze_loop): Likewise.
19303 * tree-vect-slp.c (vect_slp_bb): Likewise.
19304 * doc/tm.texi: Regenerate.
19305 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
19306 to a poly_uint64.
19307 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
19308 the vector size as a poly_uint64 rather than an unsigned int.
19309 (current_vector_size): Change from an unsigned int to a poly_uint64.
19310 (get_vectype_for_scalar_type): Update accordingly.
19311 * tree.h (build_truth_vector_type): Take the size and number of
19312 units as a poly_uint64 rather than an unsigned int.
19313 (build_vector_type): Add a temporary overload that takes
19314 the number of units as a poly_uint64 rather than an unsigned int.
19315 * tree.c (make_vector_type): Likewise.
19316 (build_truth_vector_type): Take the number of units as a poly_uint64
19317 rather than an unsigned int.
19318
19319 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19320 Alan Hayward <alan.hayward@arm.com>
19321 David Sherwood <david.sherwood@arm.com>
19322
19323 * target.def (get_mask_mode): Take the number of units and length
19324 as poly_uint64s rather than unsigned ints.
19325 * targhooks.h (default_get_mask_mode): Update accordingly.
19326 * targhooks.c (default_get_mask_mode): Likewise.
19327 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
19328 * doc/tm.texi: Regenerate.
19329
19330 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19331 Alan Hayward <alan.hayward@arm.com>
19332 David Sherwood <david.sherwood@arm.com>
19333
19334 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
19335 * omp-general.c (omp_max_vf): Likewise.
19336 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
19337 (expand_omp_simd): Handle polynomial safelen.
19338 * omp-low.c (omplow_simd_context): Add a default constructor.
19339 (omplow_simd_context::max_vf): Change from int to poly_uint64.
19340 (lower_rec_simd_input_clauses): Update accordingly.
19341 (lower_rec_input_clauses): Likewise.
19342
19343 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19344 Alan Hayward <alan.hayward@arm.com>
19345 David Sherwood <david.sherwood@arm.com>
19346
19347 * tree-vectorizer.h (vect_nunits_for_cost): New function.
19348 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
19349 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
19350 (vect_analyze_slp_cost): Likewise.
19351 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
19352 (vect_model_load_cost): Likewise.
19353
19354 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19355 Alan Hayward <alan.hayward@arm.com>
19356 David Sherwood <david.sherwood@arm.com>
19357
19358 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
19359 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
19360 from an unsigned int * to a poly_uint64_pod *.
19361 (calculate_unrolling_factor): New function.
19362 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
19363
19364 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19365 Alan Hayward <alan.hayward@arm.com>
19366 David Sherwood <david.sherwood@arm.com>
19367
19368 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
19369 from an unsigned int to a poly_uint64.
19370 (_loop_vec_info::slp_unrolling_factor): Likewise.
19371 (_loop_vec_info::vectorization_factor): Change from an int
19372 to a poly_uint64.
19373 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
19374 (vect_get_num_vectors): New function.
19375 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
19376 (vect_get_num_copies): Use vect_get_num_vectors.
19377 (vect_analyze_data_ref_dependences): Change max_vf from an int *
19378 to an unsigned int *.
19379 (vect_analyze_data_refs): Change min_vf from an int * to a
19380 poly_uint64 *.
19381 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19382 than an unsigned HOST_WIDE_INT.
19383 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
19384 (vect_analyze_data_ref_dependence): Change max_vf from an int *
19385 to an unsigned int *.
19386 (vect_analyze_data_ref_dependences): Likewise.
19387 (vect_compute_data_ref_alignment): Handle polynomial vf.
19388 (vect_enhance_data_refs_alignment): Likewise.
19389 (vect_prune_runtime_alias_test_list): Likewise.
19390 (vect_shift_permute_load_chain): Likewise.
19391 (vect_supportable_dr_alignment): Likewise.
19392 (dependence_distance_ge_vf): Take the vectorization factor as a
19393 poly_uint64 rather than an unsigned HOST_WIDE_INT.
19394 (vect_analyze_data_refs): Change min_vf from an int * to a
19395 poly_uint64 *.
19396 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
19397 vfm1 as a poly_uint64 rather than an int. Make the same change
19398 for the returned bound_scalar.
19399 (vect_gen_vector_loop_niters): Handle polynomial vf.
19400 (vect_do_peeling): Likewise. Update call to
19401 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
19402 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
19403 be constant.
19404 * tree-vect-loop.c (vect_determine_vectorization_factor)
19405 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
19406 (vect_get_known_peeling_cost): Likewise.
19407 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
19408 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
19409 (vect_transform_loop): Likewise. Use the lowest possible VF when
19410 updating the upper bounds of the loop.
19411 (vect_min_worthwhile_factor): Make static. Return an unsigned int
19412 rather than an int.
19413 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
19414 polynomial unroll factors.
19415 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
19416 (vect_make_slp_decision): Likewise.
19417 (vect_supported_load_permutation_p): Likewise, and polynomial
19418 vf too.
19419 (vect_analyze_slp_cost): Handle polynomial vf.
19420 (vect_slp_analyze_node_operations): Likewise.
19421 (vect_slp_analyze_bb_1): Likewise.
19422 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19423 than an unsigned HOST_WIDE_INT.
19424 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
19425 (vectorizable_load): Handle polynomial vf.
19426 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
19427 a poly_uint64.
19428 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
19429
19430 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19431 Alan Hayward <alan.hayward@arm.com>
19432 David Sherwood <david.sherwood@arm.com>
19433
19434 * match.pd: Handle bit operations involving three constants
19435 and try to fold one pair.
19436
19437 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19438
19439 * tree-vect-loop-manip.c: Include gimple-fold.h.
19440 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
19441 niters_maybe_zero parameters. Handle other cases besides a step of 1.
19442 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
19443 Add a path that uses a step of VF instead of 1, but disable it
19444 for now.
19445 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
19446 and niters_no_overflow parameters. Update calls to
19447 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
19448 Create a new SSA name if the latter choses to use a ste other
19449 than zero, and return it via niters_vector_mult_vf_var.
19450 * tree-vect-loop.c (vect_transform_loop): Update calls to
19451 vect_do_peeling, vect_gen_vector_loop_niters and
19452 slpeel_make_loop_iterate_ntimes.
19453 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
19454 (vect_gen_vector_loop_niters): Update declarations after above changes.
19455
19456 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
19457
19458 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
19459 128-bit round to integer instructions.
19460 (ceil<mode>2): Likewise.
19461 (btrunc<mode>2): Likewise.
19462 (round<mode>2): Likewise.
19463
19464 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19465
19466 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
19467 unaligned VSX load/store on P8/P9.
19468 (expand_block_clear): Allow the use of unaligned VSX
19469 load/store on P8/P9.
19470
19471 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19472
19473 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
19474 New function.
19475 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
19476 swap associated with both a load and a store.
19477
19478 2018-01-02 Andrew Waterman <andrew@sifive.com>
19479
19480 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
19481 * config/riscv/riscv.md (clear_cache): Use it.
19482
19483 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
19484
19485 * web.c: Remove out-of-date comment.
19486
19487 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19488
19489 * expr.c (fixup_args_size_notes): Check that any existing
19490 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
19491 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
19492 (emit_single_push_insn): ...here.
19493
19494 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19495
19496 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
19497 (const_vector_encoded_nelts): New function.
19498 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
19499 (const_vector_int_elt, const_vector_elt): Declare.
19500 * emit-rtl.c (const_vector_int_elt_1): New function.
19501 (const_vector_elt): Likewise.
19502 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
19503 of CONST_VECTOR_ELT.
19504
19505 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19506
19507 * expr.c: Include rtx-vector-builder.h.
19508 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
19509 directly on the tree encoding.
19510 (const_vector_from_tree): Likewise.
19511 * optabs.c: Include rtx-vector-builder.h.
19512 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
19513 sequence of "u" values.
19514 * vec-perm-indices.c: Include rtx-vector-builder.h.
19515 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
19516 directly on the vec_perm_indices encoding.
19517
19518 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19519
19520 * doc/rtl.texi (const_vector): Describe new encoding scheme.
19521 * Makefile.in (OBJS): Add rtx-vector-builder.o.
19522 * rtx-vector-builder.h: New file.
19523 * rtx-vector-builder.c: Likewise.
19524 * rtl.h (rtx_def::u2): Add a const_vector field.
19525 (CONST_VECTOR_NPATTERNS): New macro.
19526 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
19527 (CONST_VECTOR_DUPLICATE_P): Likewise.
19528 (CONST_VECTOR_STEPPED_P): Likewise.
19529 (CONST_VECTOR_ENCODED_ELT): Likewise.
19530 (const_vec_duplicate_p): Check for a duplicated vector encoding.
19531 (unwrap_const_vec_duplicate): Likewise.
19532 (const_vec_series_p): Check for a non-duplicated vector encoding.
19533 Say that the function only returns true for integer vectors.
19534 * emit-rtl.c: Include rtx-vector-builder.h.
19535 (gen_const_vec_duplicate_1): Delete.
19536 (gen_const_vector): Call gen_const_vec_duplicate instead of
19537 gen_const_vec_duplicate_1.
19538 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
19539 (gen_const_vec_duplicate): Use rtx_vector_builder.
19540 (gen_const_vec_series): Likewise.
19541 (gen_rtx_CONST_VECTOR): Likewise.
19542 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
19543 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
19544 Build a new vector rather than modifying a CONST_VECTOR in-place.
19545 (handle_special_swappables): Update call accordingly.
19546 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
19547 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
19548 Build a new vector rather than modifying a CONST_VECTOR in-place.
19549 (handle_special_swappables): Update call accordingly.
19550
19551 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19552
19553 * simplify-rtx.c (simplify_const_binary_operation): Use
19554 CONST_VECTOR_ELT instead of XVECEXP.
19555
19556 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19557
19558 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
19559 the selector elements to be different from the data elements
19560 if the selector is a VECTOR_CST.
19561 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
19562 ssizetype for the selector.
19563
19564 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19565
19566 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
19567 before testing each element individually.
19568 * tree-vect-generic.c (lower_vec_perm): Likewise.
19569
19570 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19571
19572 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
19573 * selftest-run-tests.c (selftest::run_tests): Call it.
19574 * vector-builder.h (vector_builder::operator ==): New function.
19575 (vector_builder::operator !=): Likewise.
19576 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
19577 (vec_perm_indices::all_from_input_p): New function.
19578 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19579 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
19580 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
19581 instead of reading the VECTOR_CST directly. Detect whether both
19582 vector inputs are the same before constructing the vec_perm_indices,
19583 and update the number of inputs argument accordingly. Use the
19584 utility functions added above. Only construct sel2 if we need to.
19585
19586 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19587
19588 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
19589 the broadcast of the low byte.
19590 (expand_mult_highpart): Use an explicit encoding for the permutes.
19591 * optabs-query.c (can_mult_highpart_p): Likewise.
19592 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
19593 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19594 (vectorizable_bswap): Likewise.
19595 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
19596 explicit encoding for the power-of-2 permutes.
19597 (vect_permute_store_chain): Likewise.
19598 (vect_grouped_load_supported): Likewise.
19599 (vect_permute_load_chain): Likewise.
19600
19601 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19602
19603 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
19604 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
19605 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
19606 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19607 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
19608 (vect_gen_perm_mask_any): Likewise.
19609
19610 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19611
19612 * int-vector-builder.h: New file.
19613 * vec-perm-indices.h: Include int-vector-builder.h.
19614 (vec_perm_indices): Redefine as an int_vector_builder.
19615 (auto_vec_perm_indices): Delete.
19616 (vec_perm_builder): Redefine as a stand-alone class.
19617 (vec_perm_indices::vec_perm_indices): New function.
19618 (vec_perm_indices::clamp): Likewise.
19619 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
19620 (vec_perm_indices::new_vector): New function.
19621 (vec_perm_indices::new_expanded_vector): Update for new
19622 vec_perm_indices class.
19623 (vec_perm_indices::rotate_inputs): New function.
19624 (vec_perm_indices::all_in_range_p): Operate directly on the
19625 encoded form, without computing elided elements.
19626 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
19627 encoding. Update for new vec_perm_indices class.
19628 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
19629 the given vec_perm_builder.
19630 (expand_vec_perm_var): Update vec_perm_builder constructor.
19631 (expand_mult_highpart): Use vec_perm_builder instead of
19632 auto_vec_perm_indices.
19633 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
19634 vec_perm_indices instead of auto_vec_perm_indices. Use a single
19635 or double series encoding as appropriate.
19636 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
19637 vec_perm_indices instead of auto_vec_perm_indices.
19638 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19639 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19640 (vect_permute_store_chain): Likewise.
19641 (vect_grouped_load_supported): Likewise.
19642 (vect_permute_load_chain): Likewise.
19643 (vect_shift_permute_load_chain): Likewise.
19644 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19645 (vect_transform_slp_perm_load): Likewise.
19646 (vect_schedule_slp_instance): Likewise.
19647 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19648 (vectorizable_mask_load_store): Likewise.
19649 (vectorizable_bswap): Likewise.
19650 (vectorizable_store): Likewise.
19651 (vectorizable_load): Likewise.
19652 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
19653 vec_perm_indices instead of auto_vec_perm_indices. Use
19654 tree_to_vec_perm_builder to read the vector from a tree.
19655 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
19656 vec_perm_builder instead of a vec_perm_indices.
19657 (have_whole_vector_shift): Use vec_perm_builder and
19658 vec_perm_indices instead of auto_vec_perm_indices. Leave the
19659 truncation to calc_vec_perm_mask_for_shift.
19660 (vect_create_epilog_for_reduction): Likewise.
19661 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
19662 from auto_vec_perm_indices to vec_perm_indices.
19663 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19664 instead of changing individual elements.
19665 (aarch64_vectorize_vec_perm_const): Use new_vector to install
19666 the vector in d.perm.
19667 * config/arm/arm.c (expand_vec_perm_d::perm): Change
19668 from auto_vec_perm_indices to vec_perm_indices.
19669 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19670 instead of changing individual elements.
19671 (arm_vectorize_vec_perm_const): Use new_vector to install
19672 the vector in d.perm.
19673 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
19674 Update vec_perm_builder constructor.
19675 (rs6000_expand_interleave): Likewise.
19676 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
19677 (rs6000_expand_interleave): Likewise.
19678
19679 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19680
19681 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
19682 to qimode could truncate the indices.
19683 * optabs.c (expand_vec_perm_var): Likewise.
19684
19685 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19686
19687 * Makefile.in (OBJS): Add vec-perm-indices.o.
19688 * vec-perm-indices.h: New file.
19689 * vec-perm-indices.c: Likewise.
19690 * target.h (vec_perm_indices): Replace with a forward class
19691 declaration.
19692 (auto_vec_perm_indices): Move to vec-perm-indices.h.
19693 * optabs.h: Include vec-perm-indices.h.
19694 (expand_vec_perm): Delete.
19695 (selector_fits_mode_p, expand_vec_perm_var): Declare.
19696 (expand_vec_perm_const): Declare.
19697 * target.def (vec_perm_const_ok): Replace with...
19698 (vec_perm_const): ...this new hook.
19699 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
19700 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
19701 * doc/tm.texi: Regenerate.
19702 * optabs.def (vec_perm_const): Delete.
19703 * doc/md.texi (vec_perm_const): Likewise.
19704 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
19705 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
19706 expand_vec_perm for constant permutation vectors. Assert that
19707 the mode of variable permutation vectors is the integer equivalent
19708 of the mode that is being permuted.
19709 * optabs-query.h (selector_fits_mode_p): Declare.
19710 * optabs-query.c: Include vec-perm-indices.h.
19711 (selector_fits_mode_p): New function.
19712 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
19713 is defined, instead of checking whether the vec_perm_const_optab
19714 exists. Use targetm.vectorize.vec_perm_const instead of
19715 targetm.vectorize.vec_perm_const_ok. Check whether the indices
19716 fit in the vector mode before using a variable permute.
19717 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
19718 vec_perm_indices instead of an rtx.
19719 (expand_vec_perm): Replace with...
19720 (expand_vec_perm_const): ...this new function. Take the selector
19721 as a vec_perm_indices rather than an rtx. Also take the mode of
19722 the selector. Update call to shift_amt_for_vec_perm_mask.
19723 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
19724 Use vec_perm_indices::new_expanded_vector to expand the original
19725 selector into bytes. Check whether the indices fit in the vector
19726 mode before using a variable permute.
19727 (expand_vec_perm_var): Make global.
19728 (expand_mult_highpart): Use expand_vec_perm_const.
19729 * fold-const.c: Includes vec-perm-indices.h.
19730 * tree-ssa-forwprop.c: Likewise.
19731 * tree-vect-data-refs.c: Likewise.
19732 * tree-vect-generic.c: Likewise.
19733 * tree-vect-loop.c: Likewise.
19734 * tree-vect-slp.c: Likewise.
19735 * tree-vect-stmts.c: Likewise.
19736 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
19737 Delete.
19738 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
19739 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
19740 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
19741 (aarch64_vectorize_vec_perm_const): ...this new function.
19742 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19743 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19744 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
19745 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
19746 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19747 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19748 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
19749 into...
19750 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
19751 check for NEON modes.
19752 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
19753 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
19754 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
19755 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
19756 into...
19757 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
19758 the old VEC_PERM_CONST conditions.
19759 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
19760 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
19761 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
19762 (ia64_vectorize_vec_perm_const_ok): Merge into...
19763 (ia64_vectorize_vec_perm_const): ...this new function.
19764 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
19765 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
19766 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
19767 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
19768 * config/mips/mips.c (mips_expand_vec_perm_const)
19769 (mips_vectorize_vec_perm_const_ok): Merge into...
19770 (mips_vectorize_vec_perm_const): ...this new function.
19771 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
19772 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
19773 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
19774 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
19775 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
19776 (rs6000_expand_vec_perm_const): Delete.
19777 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
19778 Delete.
19779 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19780 (altivec_expand_vec_perm_const_le): Take each operand individually.
19781 Operate on constant selectors rather than rtxes.
19782 (altivec_expand_vec_perm_const): Likewise. Update call to
19783 altivec_expand_vec_perm_const_le.
19784 (rs6000_expand_vec_perm_const): Delete.
19785 (rs6000_vectorize_vec_perm_const_ok): Delete.
19786 (rs6000_vectorize_vec_perm_const): New function.
19787 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19788 an element count and rtx array.
19789 (rs6000_expand_extract_even): Update call accordingly.
19790 (rs6000_expand_interleave): Likewise.
19791 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
19792 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
19793 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
19794 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
19795 (rs6000_expand_vec_perm_const): Delete.
19796 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19797 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19798 (altivec_expand_vec_perm_const_le): Take each operand individually.
19799 Operate on constant selectors rather than rtxes.
19800 (altivec_expand_vec_perm_const): Likewise. Update call to
19801 altivec_expand_vec_perm_const_le.
19802 (rs6000_expand_vec_perm_const): Delete.
19803 (rs6000_vectorize_vec_perm_const_ok): Delete.
19804 (rs6000_vectorize_vec_perm_const): New function. Remove stray
19805 reference to the SPE evmerge intructions.
19806 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19807 an element count and rtx array.
19808 (rs6000_expand_extract_even): Update call accordingly.
19809 (rs6000_expand_interleave): Likewise.
19810 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
19811 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
19812 new function.
19813 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19814
19815 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19816
19817 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
19818 vector mode and that that mode matches the mode of the data
19819 being permuted.
19820 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
19821 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
19822 directly using expand_vec_perm_1 when forcing selectors into
19823 registers.
19824 (expand_vec_perm_var): New function, split out from expand_vec_perm.
19825
19826 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19827
19828 * optabs-query.h (can_vec_perm_p): Delete.
19829 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
19830 * optabs-query.c (can_vec_perm_p): Split into...
19831 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
19832 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
19833 particular selector is valid.
19834 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19835 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19836 (vect_grouped_load_supported): Likewise.
19837 (vect_shift_permute_load_chain): Likewise.
19838 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19839 (vect_transform_slp_perm_load): Likewise.
19840 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19841 (vectorizable_bswap): Likewise.
19842 (vect_gen_perm_mask_checked): Likewise.
19843 * fold-const.c (fold_ternary_loc): Likewise. Don't take
19844 implementations of variable permutation vectors into account
19845 when deciding which selector to use.
19846 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
19847 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
19848 with a false third argument.
19849 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
19850 to test whether the constant selector is valid and can_vec_perm_var_p
19851 to test whether a variable selector is valid.
19852
19853 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19854
19855 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
19856 * optabs-query.c (can_vec_perm_p): Likewise.
19857 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
19858 instead of vec_perm_indices.
19859 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
19860 (vect_gen_perm_mask_checked): Likewise,
19861 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
19862 (vect_gen_perm_mask_checked): Likewise,
19863
19864 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19865
19866 * optabs-query.h (qimode_for_vec_perm): Declare.
19867 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
19868 (qimode_for_vec_perm): ...this new function.
19869 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
19870
19871 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19872
19873 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
19874 does not have a conditional at the top.
19875
19876 2018-01-02 Richard Biener <rguenther@suse.de>
19877
19878 * ipa-inline.c (big_speedup_p): Fix expression.
19879
19880 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
19881
19882 PR target/81616
19883 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
19884 for generic 4->6.
19885
19886 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
19887
19888 PR target/81616
19889 Generic tuning.
19890 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
19891 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
19892 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
19893 cond_taken_branch_cost 3->4.
19894
19895 2018-01-01 Jakub Jelinek <jakub@redhat.com>
19896
19897 PR tree-optimization/83581
19898 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
19899 TODO_cleanup_cfg if any changes have been made.
19900
19901 PR middle-end/83608
19902 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
19903 convert_modes if target mode has the right side, but different mode
19904 class.
19905
19906 PR middle-end/83609
19907 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
19908 last argument when extracting from CONCAT. If either from_real or
19909 from_imag is NULL, use expansion through memory. If result is not
19910 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
19911 the parts directly to inner mode, if even that fails, use expansion
19912 through memory.
19913
19914 PR middle-end/83623
19915 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
19916 check for bswap in mode rather than HImode and use that in expand_unop
19917 too.
19918 \f
19919 Copyright (C) 2018 Free Software Foundation, Inc.
19920
19921 Copying and distribution of this file, with or without modification,
19922 are permitted in any medium without royalty provided the copyright
19923 notice and this notice are preserved.