]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ChangeLog
* reg-stack.c: Include regs.h.
[thirdparty/gcc.git] / gcc / ChangeLog
1 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
2
3 * reg-stack.c: Include regs.h.
4 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
5 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
6 FIRST_STACK_REG, not DFmode.
7 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
8 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
9 (change stack): Default register mode to the reg_raw_mode of
10 FIRST_STACK_REG, not DFmode.
11 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
12 (*swapxf): Rename from swapxf.
13
14 2018-09-14 Carl Love <cel@us.ibm.com>
15
16 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
17 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
18
19 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
20
21 PR target/87224
22 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
23 alternatives.
24
25 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
26
27 PR target/85628
28 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
29
30 2018-09-14 Jason Merrill <jason@redhat.com>
31
32 Fix --enable-gather-detailed-mem-stats.
33 * hash-table.c (hash_table_usage): Change from variable to function.
34 * hash-table.h: Adjust.
35 * Makefile.in: Add missing dependencies on hash-table.h.
36
37 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
38
39 PR tree-optimization/87259
40 PR lto/87283
41 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
42 execute_cse_reciprocals_1 has tried transforming.
43
44 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
45
46 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
47 VR_VARYING for PLUS/MINUS_EXPR.
48
49 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
50
51 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
52 formatting.
53
54 2018-09-14 Richard Biener <rguenther@suse.de>
55
56 PR middle-end/63155
57 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
58 bits for the merged partition.
59
60 2018-09-13 Martin Sebor <msebor@redhat.com>
61 Bernd Edlinger <bernd.edlinger@hotmail.de>
62
63 * builtins.h (c_srlen): Add argument.
64 * builtins.c (warn_string_no_nul): New function.
65 (c_strlen): Add argument and use it. Update recursive calls.
66 Pass DECL argument to string_constant to get info on non
67 terminated strings. Update *NONSTR as needed.
68 (fold_builtin_strlen): Add argument to calls to c_strlen.
69 Warn for unterminated arrays.
70 (warn_string_no_null): Add prototype.
71 * expr.c (string_constant): Update arguments. Update recursive
72 calls appropriately. Detect missing NUL terminator and outermost
73 declaration its missing in.
74 Improve checks for arrays with nonzero lower bound or elements
75 that are not a single byte. Simplify offset computation.
76 Simplify checks for non-NUL terminated strings.
77 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
78 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
79
80 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
81
82 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
83 correctly.
84 * fold-const.c (c_getstr): Fix function comment. Remove unused third
85 argument. Fix range checks.
86 * fold-const.h (c_getstr): Adjust protoype.
87 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
88 string is constant but contains no NUL byte.
89
90 * expr.c (string_constant): Adjust function comment.
91 Remove bogus check for zero termination.
92
93 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
94
95 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
96 (get_constant_size): Don't make STRING_CSTs larger than they are.
97 (check_string_literal): New check function for STRING_CSTs.
98 (output_constant): Use it.
99
100 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
101
102 PR target/86812
103 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
104
105 2018-09-13 Richard Biener <rguenther@suse.de>
106
107 PR tree-optimization/87263
108 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
109 (struct unwind_state): Add max_rpo field.
110 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
111 Compute max_rpo, the max RPO number a block can be backwards reached
112 from. Re-write non-iterating mode to a RPO ordered worklist approach,
113 separating it from the iterating mode.
114
115 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
116
117 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
118 (rfs_decision): New scheduling decision.
119
120 2018-09-13 Richard Biener <rguenther@suse.de>
121
122 PR bootstrap/87134
123 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
124 (vn_nary_op_insert_pieces_predicated): Do not write useless
125 valid_dominated_by_p entry outside of the allocated storage.
126
127 2018-09-13 Omar Sandoval <osandov@osandov.com>
128 Tom de Vries <tdevries@suse.de>
129
130 PR debug/86985
131 * dwarf2out.c (is_c): New function.
132 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
133
134 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
135
136 PR target/85628
137 * config/aarch64/aarch64.md (*aarch64_bfxil):
138 Define.
139 * config/aarch64/constraints.md (Ulc): Define.
140 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
141 Define.
142 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
143 New function.
144
145 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
146
147 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
148 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
149 aarch64_layout_frame call.
150 (aarch64_expand_epilogue): Likewise.
151 (aarch64_initial_elimination_offset): Likewise.
152 (aarch64_get_separate_components): Likewise.
153 (aarch64_use_return_insn_p): Likewise.
154 (aarch64_layout_frame): Remove unneeded check.
155
156 2018-09-13 Jakub Jelinek <jakub@redhat.com>
157
158 * configure.ac: Only append
159 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
160 gcc_config_arguments if it was never reconfigured or last reconfigure
161 was with different arguments.
162 * configure: Regenerated.
163
164 2018-09-13 Jakub Jelinek <jakub@redhat.com>
165 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
166
167 PR middle-end/87290
168 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
169 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
170
171 2018-09-13 Jakub Jelinek <jakub@redhat.com>
172
173 PR tree-optimization/87287
174 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
175 X % C == 0 to X % (unsigned) C == 0 optimization to ...
176 * match.pd (X % C == 0): ... here. New optimization.
177
178 2018-09-12 Jakub Jelinek <jakub@redhat.com>
179
180 PR middle-end/82853
181 * expr.h (maybe_optimize_mod_cmp): Declare.
182 * expr.c (mod_inv): New function.
183 (maybe_optimize_mod_cmp): New function.
184 (do_store_flag): Use it.
185 * cfgexpand.c (expand_gimple_cond): Likewise.
186
187 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
188 Julian Brown <julian@codesourcery.com>
189
190 PR middle-end/86336
191 * gimplify.c (gimplify_scan_omp_clauses): Set
192 target_firstprivatize_array_bases in OpenACC parallel and kernels
193 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
194 OpenACC data regions.
195
196 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
197
198 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
199 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
200
201 2018-09-12 Richard Biener <rguenther@suse.de>
202
203 PR tree-optimization/87280
204 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
205 edge but unreachable target.
206 (do_rpo_vn): For conservatively handling a PHI only mark
207 the backedge executable but not the block reachable.
208
209 2018-09-12 Richard Biener <rguenther@suse.de>
210
211 PR tree-optimization/87266
212 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
213 visited blocks.
214
215 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
216
217 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
218 constants.
219 ("trunc<BFP:mode><DFP_ALL:mode>2")
220 ("trunc<DFP_ALL:mode><BFP:mode>2")
221 ("extend<BFP:mode><DFP_ALL:mode>2")
222 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
223 according to the target operand type.
224
225 2018-09-12 Jakub Jelinek <jakub@redhat.com>
226 Andreas Krebbel <krebbel@linux.ibm.com>
227
228 PR tree-optimization/86844
229 * gimple-ssa-store-merging.c
230 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
231 there are any overlapping stores in between them, make sure they are
232 also coalesced or we give up completely.
233
234 2018-09-12 Jakub Jelinek <jakub@redhat.com>
235
236 PR middle-end/87248
237 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
238 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
239
240 2018-09-12 Tom de Vries <tdevries@suse.de>
241
242 * common.opt (gdescribe-dies): Add option.
243 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
244 attribute for artifical and nameless decls.
245 (dwarf2out_register_external_die): Add description attribute to
246 external reference die.
247 (add_desc_attribute): New functions.
248 (gen_subprogram_die): Add description attribute to
249 DW_TAG_call_site_parameter.
250 * tree-pretty-print.c (print_generic_expr_to_str): New function.
251 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
252 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
253 -gno-describe-dies.
254 (@item -gdescribe-dies): Add.
255
256 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
257
258 * tree-vrp.c (vrp_shift_undefined_p): Remove.
259 (extract_range_from_binary_expr_1: Call
260 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
261 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
262 depend on sign.
263
264 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
265
266 * gimple-ssa-warn-alloca.c
267 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
268 field for ALLOCA_BOUND_*_LARGE.
269
270 2018-09-11 Nathan Sidwell <nathan@acm.org>
271
272 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
273
274 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
275
276 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
277 for clobbers. Remove obsolete comment.
278
279 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
280
281 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
282 mpxchk, mpxld and mpxst types.
283 (define_attr length_immediate): Remove all processing of mpx types.
284 (define_attr prefix_0f): Ditto.
285 (define_attr memory): Ditto.
286
287 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
288
289 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
290 (log<mode>2): Change operand 1 predicate to general_operand.
291 Extend operand 1 to XFmode and generate logxf3 insn.
292 (log10<mode>2): Change operand 1 predicate to general_operand.
293 Extend operand 1 to XFmode and generate log10xf3 insn.
294 (log2<mode>2): Change operand 1 predicate to general_operand.
295 Extend operand 1 to XFmode and generate log2xf3 insn.
296 (fyl2xp1_extend<mode>xf3_i387): Remove.
297 (log1p<mode>2): Change operand 1 predicate to general_operand.
298 Extend operand 1 to XFmode and generate log1pxf3 insn.
299 (fxtract_extend<mode>xf3_i387): Remove.
300 (logb<mode>2): Change operand 1 predicate to general_operand.
301 Extend operand 1 to XFmode and generate logbxf3 insn.
302 (ilogb<mode>2): Change operand 1 predicate to general_operand.
303 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
304 (significand<mode>2): Change operand 1 predicate to general_operand.
305 Extend operand 1 to XFmode and generate significandxf3 insn.
306
307 2018-09-11 Nathan Sidwell <nathan@acm.org>
308
309 * gcc.c (perror_with_name, pfatal_with_name): Delete.
310 (load_specs): Use fatal_error.
311 (DELETE_IF_ORDINARY, process_command): Use error.
312 (execute, run_attempt): Use fatal_error.
313
314 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
315
316 * diagnostic-core.h (sorry_at): New prototype.
317 * diagnostic.c (sorry_at): New function.
318
319 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
320
321 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
322 by zero as VR_UNDEFINED.
323
324 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
325
326 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
327 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
328 (<sincos>mode2): New expander.
329 (sincos_extend<mode>xf3_i387): Remove insn pattern.
330 (sincos -> sin, cos splitters): Remove splitter patterns.
331 (sincos<mode>3): Change operand 2 predicate to general_operand.
332 Extend operand 2 to XFmode and generate sincosxf3 insn.
333 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
334 Change operand 3 predicate to const1_operand.
335 (fptan_extend<mode>xf4_i387): Remove insn pattern.
336 (tanxf2): Update operands in the call to fptanxf4_i387.
337 (tan<mode>2): Change operand 1 predicate to general_operand.
338 Extend operand 1 to XFmode and generate tanxf3 insn.
339 (atan2xf3): Rename from *fpatanxf3_i387.
340 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
341 (atan2xf3): Remove expander.
342 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
343 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
344 (atan<mode>2): Change operand 1 predicate to general_operand.
345 Extend operand 1 to XFmode and generate atanxf3 insn.
346
347 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
348
349 * config/i386/i386.md (x87/SSE constant load splitter): Use
350 memory_operand instead of nonimmediate_operand for input operand
351 predicate.
352
353 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
354
355 * config/i386/i386.md (float partial SSE register stall splitter): Move
356 splitter near its instruction pattern.
357 (float_extend partial SSE register stall splitter): Ditto.
358 (float_truncate partial SSE register stall splitter): Ditto.
359
360 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
361
362 PR target/86794
363 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
364 to speculation_safe_value_not_needed.
365
366 PR target/85666
367 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
368 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
369 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
370 leaf_function_p, instead use has_hard_reg_initial_val.
371
372 2018-09-09 Nathan Sidwell <nathan@acm.org>
373
374 * gcc.h (pfatal_with_name): Don't declare here.
375 * gcc.c (pfatal_with_name): Make static.
376
377 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
378
379 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
380 earlyclobber.
381
382 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
383
384 PR rtl-optimization/85458
385 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
386 priority hook to reduce the priority of EXPR.
387
388 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
389
390 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
391 DImode for x87 on 32bit targets. Conditionally disable x87 modes
392 with X87_ENABLE_FLOAT. Remove preparation code.
393 (*float<SWI48:mode><MODEF:mode>2): Rename from
394 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
395 math using "enabled" attribute.
396 (*floatdi<MODEF:mode>2_i387): Rename from
397 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
398 enable for 32bit targets only.
399 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
400 splitter.
401 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
402 as operand 1 predicate. Rewrite as define_insn_and_split.
403 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
404
405 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
406
407 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
408 to fallthru to FLOAT case.
409
410 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
411
412 PR target/86731
413 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
414 around folding of vec_sl to handle out of range shift values.
415
416 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
417
418 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
419 Update callers to gen_fix_trunc<mode>_i387_fisttp
420 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
421 nonimmediate_operand.
422 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
423 and corresponding splitters.
424 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
425 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
426 (fix_truncdi_i387_with_temp): Remove insn pattern
427 and corresponding splitters.
428 (fix_trunc<mode>_i387): Change operand 0 predicate to
429 nonimmediate_operand.
430 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
431 and corresponding splitters.
432 (*fistdi2_1): Remove.
433 (fistdi2): Ditto.
434 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
435 (lrintxfdi2): Remove expander. Reimplement as define_insn.
436 (*fist<mode>2_1): Remove.
437 (fist<mode>2): Ditto.
438 (fist<mode>2_with_temp): Remove insn pattern and corresponding
439 splitters.
440 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
441 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
442 (fistdi2_<rounding>): Change operand 0 predicate to
443 nonimmediate_operand.
444 (fistdi2_<rounding>_with_temp): Remove insn pattern
445 and corresponding splitters.
446 (fist<mode>2_<rounding>): Change operand 0 predicate to
447 nonimmediate_operand.
448 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
449 and corresponding splitters.
450
451 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
452
453 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
454
455 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
456 the init value.
457
458 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
459
460 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
461 early gimple folding of vec_splat().
462 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
463 * gimple-fold.h: Add an extern define for tree_vec_extract().
464
465 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
466
467 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
468 wrappers around TREE_TYPE comparisons.
469
470 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
471
472 PR target/80080
473 * config/s390/predicates.md: Add nonsym_memory_operand.
474 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
475 contains a SYMBOL_REF, load it into an intermediate pseudo.
476 (s390_emit_compare_and_swap): Legitimize operand.
477 * config/s390/s390.md: Use the new nonsym_memory_operand
478 with UNSPECV_CAS patterns.
479
480 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
481
482 PR target/80080
483 * config/s390/s390-passes.def: New file.
484 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
485 declaration.
486 (make_pass_s390_early_mach): Add declaration.
487 * config/s390/s390.c (make_pass_s390_early_mach):
488 (s390_option_override): Remove dynamic registration.
489 * config/s390/t-s390: Add s390-passes.def.
490
491 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
492
493 * config/s390/s390.c (s390_decompose_constant_pool_ref):
494 Remove UNSPEC_LTREL_BASE check.
495 (annotate_constant_pool_refs): Likewise.
496 (find_constant_pool_ref): Likewise.
497 (find_ltrel_base): Removed.
498 (replace_ltrel_base): Removed.
499 (s390_mainpool_finish): Remove replace_ltrel_base call.
500 (s390_chunkify_start): Remove pending LTREL_BASE logic.
501 (s390_chunkify_finish): Remove replace_ltrel_base call.
502 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
503
504 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
505
506 PR target/86779
507 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
508 to speculation_safe_value_not_needed.
509
510 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
511 Bernd Schmidt <bernds_cb1@t-online.de>
512
513 * config/nvptx/nvptx-opts.h: New file.
514 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
515 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
516 (ASM_SPEC): Define.
517 (TARGET_SM35): New macro.
518 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
519 correct predicate.
520 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
521 values.
522 (misa=): New option.
523 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
524
525 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
526
527 * config/i386/i386.md (truncdfsf2): Remove expander.
528 (truncdfsf2_with_temp): Ditto.
529 (truncxf<mode>2): Ditto.
530 (*truncdfsf_fast_mixed): Remove insn pattern.
531 (*truncdfsf_fast_i387): Ditto.
532 (*truncdfsf_mixed): Ditto.
533 (*truncdfsf_i387): Ditto.
534 (*truncdfsf2_i387_1): Ditto.
535 (*truncxfsf2_mixed): Ditto.
536 (*truncxfdf2_mixed): Ditto.
537 (*truncxf<mode>2_i387_noop): Ditto. Update callers
538 to call gen_truncxf<mode>2 instead.
539 (*truncxf<mode>2_i387): Remove.
540 (reg->reg splitters): Remove splitter pattern.
541 (reg->mem splitters): Ditto.
542
543 (truncdfsf2): New insn pattern.
544 (truncxf<mode>2): Ditto.
545
546 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
547
548 * tree-ssa-math-opts.c (is_mult_by): New function.
549 (is_square_of): Use the above.
550 (optimize_recip_sqrt): New function.
551 (pass_cse_reciprocals::execute): Use the above.
552
553 2018-09-05 Richard Biener <rguenther@suse.de>
554
555 PR bootstrap/87134
556 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
557 to zero-init the emplaced vec.
558
559 2018-09-05 Martin Liska <mliska@suse.cz>
560
561 PR tree-optimization/87205
562 * tree-switch-conversion.c (pass_lower_switch::execute):
563 Group cases for switch statements.
564
565 2018-09-05 Richard Biener <rguenther@suse.de>
566
567 PR tree-optimization/87217
568 * tree-ssa-sccvn.c (vuse_valueize): New.
569 (vn_reference_lookup_pieces): Use it.
570 (vn_reference_lookup): Likewise.
571
572 2018-09-05 Nathan Sidwell <nathan@acm.org>
573
574 PR c++/87137
575 * stor-layout.c (place_field): Scan forwards to check last
576 bitfield when ms_bitfield_placement is in effect.
577
578 2018-09-05 Richard Biener <rguenther@suse.de>
579
580 PR bootstrap/87225
581 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
582 return.
583
584 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
585 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
586
587 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
588 * config.gcc (extra_objs): Build it.
589 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
590 Likewise.
591 * config/aarch64/aarch64-passes.def
592 (pass_tag_collision_avoidance): New pass.
593 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
594 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
595 (aarch64_classify_address): Remove static qualifier.
596 (aarch64_address_info, aarch64_address_type): Move to...
597 * config/aarch64/aarch64-protos.h: ... here.
598 (make_pass_tag_collision_avoidance): New function.
599 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
600 New tuning flag.
601
602 2018-09-05 Martin Liska <mliska@suse.cz>
603
604 * doc/gcov.texi: Update documentation of humar
605 readable mode.
606 * gcov.c (format_count): Print one decimal place, it provides
607 more fine number of situations like '1G' vs. '1.4G'.
608
609 2018-09-05 Martin Liska <mliska@suse.cz>
610
611 PR target/87164
612 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
613 * optc-gen.awk: Allow 'Var' for Deprecated options in order
614 to generate a MASK value.
615
616 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
617
618 PR debug/86593
619 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
620 if frame pointer isn't used.
621 (compute_frame_pointer_to_fb_displacement): Likewise.
622
623 2018-09-04 Jakub Jelinek <jakub@redhat.com>
624
625 PR target/87198
626 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
627 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
628 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
629 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
630 and OPTION_MASK_ISA_XSAVEC_UNSET.
631
632 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
633
634 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
635 XOR operations in NAND case.
636
637 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
638
639 * wide-int-range.cc (wide_int_range_convert): New.
640 * wide-int-range.h (wide_int_range_convert): New.
641 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
642 code into wide_int_range_convert.
643 (extract_range_into_wide_ints): Do not munge anti range constants
644 into the entire domain. Just return the range back.
645
646 2018-09-04 Martin Liska <mliska@suse.cz>
647
648 * genmatch.c (output_line_directive): Add new argument
649 fnargs.
650 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
651
652 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
653
654 * doc/invoke.texi (Option Summary): Add whitespace.
655
656 * doc/invoke.texi (Option Summary): Add -Waligned-new.
657
658 2018-09-04 Richard Biener <rguenther@suse.de>
659
660 PR tree-optimization/87211
661 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
662 backedge value we're supposed to treat as VARYING also number
663 the PHI to VARYING in case it got a different value-number already.
664
665 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
666
667 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
668 (extract_range_from_binary_expr_1): Do not call
669 vrp_can_optimize_bit_op.
670 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
671 static.
672 (wide_int_range_get_mask_and_bounds): New.
673 (wide_int_range_optimize_bit_op): New.
674 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
675 (wide_int_range_bit_and): Same.
676 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
677 (wide_int_range_optimize_bit_op): New.
678 (wide_int_range_get_mask_and_bounds): New.
679
680 2018-09-04 Richard Biener <rguenther@suse.de>
681
682 PR tree-optimization/87176
683 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
684 variable. When value-numbering a virtual PHI node make sure
685 to not value-number to the backedge value.
686
687 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
688
689 * doc/extend.texi (Long Long, Hex Floats): Document support for
690 long long and hex floats in more recent versions of ISO C++.
691
692 2018-09-03 Richard Biener <rguenther@suse.de>
693
694 PR tree-optimization/87177
695 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
696 cleanup.
697
698 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
699
700 * bb-reorder.c (edge_order): Convert to C-qsort-style
701 tri-state comparator.
702 (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
703
704 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
705
706 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
707 tri-state comparator.
708 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
709
710 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
711
712 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
713 (mergesort): ... here as maximum count for using netsort.
714 (gcc_qsort): Set nlim to 3 if stable sort is requested.
715 (gcc_stablesort): New.
716 * system.h (gcc_stablesort): Declare.
717
718 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
719
720 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
721 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
722 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
723
724 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
725
726 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
727 lxsdx and stxsdx alternatives.
728 (*mov<mode>_hardfloat64): Ditto.
729 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
730
731 2018-09-03 Richard Biener <rguenther@suse.de>
732
733 PR tree-optimization/87200
734 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
735 simplify result.
736
737 2018-09-03 Martin Liska <mliska@suse.cz>
738
739 PR tree-optimization/87201
740 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
741 Fix parenthesis in an expression.
742
743 2018-09-03 Richard Biener <rguenther@suse.de>
744
745 PR tree-optimization/87197
746 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
747 visited. CSE the VN_INFO hashtable lookup.
748
749 PR tree-optimization/87169
750 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
751 iterating make sure there's no extra backedges from irreducible
752 regions feeding the header. Mark the destination block
753 executable.
754
755 2018-09-03 Martin Liska <mliska@suse.cz>
756
757 PR driver/83193
758 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
759 * common/common-targhooks.c (default_get_valid_option_values):
760 New function.
761 * common/common-targhooks.h (default_get_valid_option_values):
762 Likewise.
763 * common/config/i386/i386-common.c: Move processor_target_table
764 from i386.c.
765 (ix86_get_valid_option_values): New function.
766 (TARGET_GET_VALID_OPTION_VALUES): New macro.
767 * config/i386/i386.c (struct ptt): Move to i386-common.c.
768 (PTA_*): Move all defined masks into i386-common.c.
769 (ix86_function_specific_restore): Use new processor_cost_table.
770 * config/i386/i386.h (struct ptt): Moved from i386.c.
771 (struct pta): Likewise.
772 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
773 * doc/tm.texi.in: Likewise.
774 * opt-suggestions.c (option_proposer::suggest_option):
775 Pass prefix to build_option_suggestions.
776 (option_proposer::get_completions): Likewise.
777 (option_proposer::build_option_suggestions): Use the new target
778 hook.
779 * opts.c (struct option_help_tuple): New struct.
780 (print_filtered_help): Use the new target hook.
781
782 2018-09-03 Martin Liska <mliska@suse.cz>
783
784 PR middle-end/59521
785 * predict.c (set_even_probabilities): Add likely_edges
786 argument and handle cases where we have precisely one
787 likely edge.
788 (combine_predictions_for_bb): Catch also likely_edges.
789 (tree_predict_by_opcode): Handle gswitch statements.
790 * tree-cfg.h (find_case_label_for_value): New declaration.
791 (find_taken_edge_switch_expr): Likewise.
792 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
793 Find pivot in decision tree based on probabily, not by number of
794 nodes.
795
796 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
797
798 * doc/standards.texi (Standards): Update Objective-C reference.
799
800 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
801
802 * doc/install.texi (Prerequisites): Update link for MPC.
803
804 2018-09-01 Michael Matz <matz@suse.de>
805
806 PR tree-optimization/87074
807 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
808 PHIs for outer-loop uses.
809
810 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
811
812 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
813 * doc/invoke.texi (C Dialect Options): Ditto.
814
815 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
816
817 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
818
819 2018-08-31 Richard Biener <rguenther@suse.de>
820
821 PR tree-optimization/87168
822 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
823 (rpo_elim::eliminate_avail): When OP was not visited it must
824 be available.
825
826 2018-08-31 David Malcolm <dmalcolm@redhat.com>
827
828 * tree-vrp.c (copy_value_range): Convert param "from" from
829 "value_range *" to "const value_range *".
830 (range_is_null): Likewise for param "vr".
831 (range_int_cst_p): Likewise.
832 (range_int_cst_singleton_p): Likewise.
833 (symbolic_range_p): Likewise.
834 (value_ranges_intersect_p): Likewise for both params.
835 (value_range_nonnegative_p): Likewise for param "vr".
836 (value_range_constant_singleton): Likewise.
837 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
838 (extract_range_into_wide_ints): Likewise for param "vr".
839 (extract_range_from_multiplicative_op): Likewise for params "vr0"
840 and "vr1".
841 (vrp_can_optimize_bit_op): Likewise.
842 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
843 "vr1_".
844 (extract_range_from_unary_expr): Likewise.
845 (debug_value_range): Likewise for param "vr".
846 (value_range::dump): Add "const" qualifier.
847 (vrp_prop::check_array_ref): Convert local "vr" from
848 "value_range *" to "const value_range *".
849 (vrp_prop::check_mem_ref): Likewise.
850 (vrp_prop::visit_stmt): Likewise for local "old_vr".
851 (vrp_intersect_ranges_1): Likewise for param "vr_1".
852 (vrp_intersect_ranges): Likewise.
853 (simplify_stmt_for_jump_threading): Likewise for local "vr".
854 (vrp_prop::vrp_finalize): Likewise.
855 * tree-vrp.h (value_range::dump): Add "const" qualifier.
856 (vrp_intersect_ranges): Add "const" qualifier to params as above.
857 (extract_range_from_unary_expr): Likewise.
858 (value_range_constant_singleton): Likewise.
859 (symbolic_range_p): Likewise.
860 (copy_value_range): Likewise.
861 (extract_range_from_binary_expr_1): Likewise.
862 (range_int_cst_p): Likewise.
863 (vrp_set_zero_nonzero_bits): Likewise.
864 (range_int_cst_singleton_p): Likewise.
865
866 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
867
868 * config/aarch64/arm_neon.h (vabsd_s64): New.
869 (vnegd_s64): Likewise.
870
871 2018-08-31 Martin Jambor <mjambor@suse.cz>
872
873 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
874
875 2018-08-31 Martin Liska <mliska@suse.cz>
876
877 * ipa-icf.c (sem_item::add_type): Use
878 sem_item::m_type_hash_cache.
879 * ipa-icf.h: Move the cache from sem_item_optimizer
880 to sem_item.
881
882 2018-08-31 Nathan Sidwell <nathan@acm.org>
883
884 * doc/extend.texi (Backwards Compatibility): Remove implicit
885 extern C leeway of () being (...).
886
887 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
888
889 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
890
891 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
892
893 PR target/86684
894 PR target/87149
895 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
896
897 2018-08-31 Jakub Jelinek <jakub@redhat.com>
898
899 PR middle-end/87138
900 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
901 gen_int_mode. Formatting fixes.
902
903 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
904
905 * target.def (custom_function_descriptors): Improve documentation.
906 * doc/tm.texi.in (Trampolines): Expand discussion of function
907 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
908 beginning of the section.
909 * doc/tm.texi: Regenerated.
910
911 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
912
913 * cfg.h (class auto_edge_flag): Spell out the template-id of the
914 base class in the initializer list. This is a workaround for
915 building with older GCC.
916 (class auto_bb_flag): Likewise.
917
918 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
919
920 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
921 (altivec_vcmpequ<VI_char>_p): Remove star.
922 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
923 vector load modes.
924 (expand_strncmp_vec_sequence): New function.
925 (emit_final_str_compare_vec): New function.
926 (expand_strn_compare): Add support for vector strncmp.
927 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
928 length specification to bytes.
929 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
930 (vcmpnezb_p): New pattern.
931 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
932 for option -mstring-compare-inline-limit.
933
934 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
935
936 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
937 (PTA_SKYLAKE): Add PTA_AES.
938 (PTA_GOLDMONT): Likewise.
939
940 2018-08-29 Jan Hubicka <jh@suse.cz>
941
942 PR lto/86517
943 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
944 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
945
946 2018-08-29 Jan Hubicka <jh@suse.cz>
947
948 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
949 TYPE_STUB_DECL.
950 (hash_tree): Do not visit TYPE_STUB_DECL.
951 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
952 stream TYPE_STUB_DECL.
953 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
954 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
955 after free_lang_data.
956 (type_in_anonymous_namespace_p): Likewise.
957
958 2018-08-29 Jan Hubicka <jh@suse.cz>
959
960 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
961 comment that it has to be even number.
962 (class sreal): Change m_sig type to int32_t.
963 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
964 int64_t for temporary calculations.
965 (sreal_verify_basics): Drop one bit from minimum and maximum.
966
967 2018-08-30 Richard Biener <rguenther@suse.de>
968
969 PR tree-optimization/87147
970 * tree-ssa-sccvn.c (SSA_VISITED): New function.
971 (visit_phi): When the degenerate result is from the backedge and
972 we didn't visit its definition yet drop to VARYING.
973 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
974
975 2018-08-29 Jan Hubicka <jh@suse.cz>
976
977 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
978 DECL_VINDEX.
979 (hash_tree): Likewise.
980
981 2018-08-29 Jan Hubicka <jh@suse.cz>
982
983 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
984 and TYPE_NEXT_REF_TO.
985
986 2018-08-29 Jan Hubicka <jh@suse.cz>
987
988 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
989 comment that it has to be even number.
990 (class sreal): Change m_sig type to int32_t.
991 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
992 int64_t for temporary calculations.
993 (sreal_verify_basics): Drop one bit from minimum and maximum.
994
995 2018-08-30 Tamar Christina <tamar.christina@arm.com>
996
997 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
998
999 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
1000
1001 PR middle-end/86995
1002 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
1003 if to_add is negative.
1004
1005 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
1006
1007 PR middle-end/87053
1008 * builtins.c (c_strlen): Improve range checks.
1009
1010 2018-08-29 Martin Sebor <msebor@redhat.com>
1011 Jeff Law <law@redhat.com>
1012
1013 PR tree-optimization/86714
1014 PR tree-optimization/86711
1015 * builtins.c (c_strlen): Add arguments to call to string_constant.
1016 * expr.c (string_constant): Add argument. Detect missing nul
1017 terminator and outermost declaration it's missing in.
1018 * expr.h (string_constant): Add argument.
1019 * fold-const.c (read_from_constant_string): Add arguments to call to
1020 string_constant.
1021 (c_getstr): Likewise.
1022 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1023 to string_constant.
1024 * tree-ssa-strlen.c (get_stridx): Likewise.
1025
1026 2018-08-29 Jan Hubicka <jh@suse.cz>
1027
1028 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
1029 Do not stream DECL_VINDEX.
1030 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
1031 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
1032 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
1033
1034 2018-08-29 Richard Biener <rguenther@suse.de>
1035
1036 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
1037 virtual operands that are not default defs to honor region
1038 boundaries.
1039 (rpo_vn_valueize): Remove ineffective code here.
1040
1041 2018-08-29 Richard Biener <rguenther@suse.de>
1042
1043 PR tree-optimization/87132
1044 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
1045 when skipping defs reachable over backedges.
1046
1047 2018-08-29 Richard Biener <rguenther@suse.de>
1048
1049 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
1050 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
1051 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
1052 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
1053 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
1054 (vn_reference_lookup_3): Remove use of const_parms.
1055 (free_rpo_vn): Do not free const_parms.
1056 (do_rpo_vn): Do not call init_const_parms.
1057 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
1058 SSA_NAME_POINTS_TO_READONLY_MEMORY.
1059 (call_may_clobber_ref_p_1): Likewise.
1060
1061 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
1062
1063 PR other/86726
1064 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
1065 (-O): Ditto.
1066 (-ftree-scev-cprop): Document.
1067
1068 2018-08-29 Jan Hubicka <jh@suse.cz>
1069
1070 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
1071 parameters.
1072 (sreal constructor): Update.
1073 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
1074 sreal:operator/): Update.
1075
1076 2018-08-29 Martin Liska <mliska@suse.cz>
1077
1078 * tree-switch-conversion.c (switch_conversion::expand):
1079 Strenghten assumption about gswitch statements.
1080
1081 2018-08-29 Richard Biener <rguenther@suse.de>
1082
1083 PR tree-optimization/87117
1084 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1085 re-value-number released SSA VDEFs.
1086
1087 2018-08-29 Richard Biener <rguenther@suse.de>
1088
1089 PR tree-optimization/87126
1090 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
1091
1092 2018-08-28 Jim Wilson <jimw@sifive.com>
1093
1094 * config/riscv/pic.md: Rewrite.
1095 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1096 invalid address.
1097 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1098 (SOFTF, default_load, softload, softstore): New.
1099
1100 2018-08-28 Jeff Law <law@redhat.com>
1101
1102 * fold-const.c (fold_binary_loc): Remove recently added assert.
1103
1104 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
1105
1106 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1107 to OP parmeter of generated function.
1108
1109 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
1110
1111 PR tree-optimization/87009
1112 * match.pd: Add boolean optimizations.
1113
1114 2018-08-28 Martin Sebor <msebor@redhat.com>
1115
1116 PR middle-end/86631
1117 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1118 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1119 (pass_walloca::gate): Use it.
1120 (alloca_call_type): Same.
1121 (pass_walloca::execute): Same.
1122 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1123
1124 2018-08-28 David Malcolm <dmalcolm@redhat.com>
1125
1126 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1127 GCC_VERSION for usage of "__gcc_dump_printf__" format from
1128 >= 3005 to >= 9000.
1129
1130 2018-08-28 Richard Biener <rguenther@suse.de>
1131
1132 PR tree-optimization/87124
1133 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1134 constants before looking up avail.
1135
1136 2018-08-28 Jakub Jelinek <jakub@redhat.com>
1137
1138 PR middle-end/87099
1139 * calls.c (maybe_warn_nonstring_arg): Punt early if
1140 warn_stringop_overflow is zero. Don't call get_range_strlen
1141 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1142 Swap comparison operands to have constants on rhs. Only use
1143 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
1144 increment lenrng[0].
1145
1146 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
1147
1148 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1149 use of tree_to_shwi. Remove duplicated test for the size being
1150 a whole number of bytes.
1151
1152 2018-08-28 Richard Biener <rguenther@suse.de>
1153
1154 PR tree-optimization/87117
1155 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1156 Handle removed stmt without LHS (GIMPLE_NOP).
1157
1158 2018-08-28 Richard Biener <rguenther@suse.de>
1159
1160 PR tree-optimization/87117
1161 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1162 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1163
1164 2018-08-28 Richard Biener <rguenther@suse.de>
1165
1166 PR tree-optimization/87117
1167 * tree-ssa-pre.c (compute_avail): Do not make expressions
1168 with predicated values available.
1169 (get_expr_value_id): Assert we do not run into predicated value
1170 expressions.
1171
1172 2018-08-28 Richard Biener <rguenther@suse.de>
1173
1174 PR tree-optimization/87117
1175 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1176 get virtual operands.
1177 (get_expr_operands): Handle STRING_CST like other decls.
1178
1179 2018-08-28 Martin Liska <mliska@suse.cz>
1180
1181 * tree.h: Update documentation of fndecl_built_in_p
1182 functions.
1183
1184
1185 2018-08-27 Jeff Law <law@redhat.com>
1186 PR tree-optimization/87110
1187 * tree-ssa-dse.c (compute_trims): Handle non-constant
1188 TYPE_SIZE_UNIT.
1189
1190 2018-08-27 Martin Sebor <msebor@redhat.com>
1191
1192 PR tree-optimization/86914
1193 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1194
1195 2018-08-27 Martin Sebor <msebor@redhat.com>
1196
1197 PR tree-optimization/87112
1198 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1199 the type of the bound argument.
1200
1201 2018-08-27 Jeff Law <law@redhat.com>
1202
1203 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1204 type does not have a TYPE_SIZE_UNIT.
1205
1206 2018-08-27 Steve Ellcey <sellcey@cavium.com>
1207
1208 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1209 with include of backend.h.
1210
1211 2018-08-27 Richard Biener <rguenther@suse.de>
1212
1213 PR tree-optimization/86927
1214 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1215 use const cond reduction code.
1216
1217 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
1218
1219 PR tree-optimization/85758
1220 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1221
1222 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1223
1224 PR c++/87091
1225 * diagnostic-show-locus.c (class layout_range): Update for
1226 conversion of show_caret_p to a tri-state.
1227 (layout_range::layout_range): Likewise.
1228 (make_range): Likewise.
1229 (layout::maybe_add_location_range): Likewise.
1230 (layout::should_print_annotation_line_p): Don't show annotation
1231 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1232 (layout::get_state_at_point): Update for conversion of
1233 show_caret_p to a tri-state. Bail out early for
1234 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1235 underlining or source colorization.
1236 (gcc_rich_location::add_location_if_nearby): Update for conversion
1237 of show_caret_p to a tri-state.
1238 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1239 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1240 Likewise.
1241 (selftest::test_one_liner_labels): Likewise.
1242 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1243 conversion of show_caret_p to a tri-state.
1244 * pretty-print.c (text_info::set_location): Likewise.
1245 * pretty-print.h (text_info::set_location): Likewise.
1246 * substring-locations.c (format_warning_n_va): Likewise.
1247 * tree-diagnostic.c (default_tree_printer): Likewise.
1248 * tree-pretty-print.c (newline_and_indent): Likewise.
1249
1250 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1251
1252 PR c++/87091
1253 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1254 line above for line-insertion fix-it hints.
1255 (selftest::test_fixit_insert_containing_newline): Update the
1256 expected results, and add a test with line-numbering enabled.
1257
1258 2018-08-27 Martin Liska <mliska@suse.cz>
1259
1260 PR sanitizer/86962
1261 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1262 params with DECL_HAS_VALUE_EXPR_P.
1263
1264 2018-08-27 Martin Liska <mliska@suse.cz>
1265
1266 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1267 selected expansion strategy.
1268
1269 2018-08-27 Martin Liska <mliska@suse.cz>
1270
1271 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1272 * builtins.c (is_builtin_fn): Likewise.
1273 * attribs.c (diag_attr_exclusions): Use new function
1274 fndecl_built_in_p and remove check for FUNCTION_DECL if
1275 possible.
1276 (builtin_mathfn_code): Likewise.
1277 (fold_builtin_expect): Likewise.
1278 (fold_call_expr): Likewise.
1279 (fold_builtin_call_array): Likewise.
1280 (fold_call_stmt): Likewise.
1281 (set_builtin_user_assembler_name): Likewise.
1282 (is_simple_builtin): Likewise.
1283 * calls.c (gimple_alloca_call_p): Likewise.
1284 (maybe_warn_nonstring_arg): Likewise.
1285 * cfgexpand.c (expand_call_stmt): Likewise.
1286 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1287 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1288 (cgraph_node::verify_node): Likewise.
1289 * cgraphclones.c (build_function_decl_skip_args): Likewise.
1290 (cgraph_node::create_clone): Likewise.
1291 * config/arm/arm.c (arm_insert_attributes): Likewise.
1292 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1293 * dse.c (scan_insn): Likewise.
1294 * expr.c (expand_expr_real_1): Likewise.
1295 * fold-const.c (operand_equal_p): Likewise.
1296 (fold_binary_loc): Likewise.
1297 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1298 * gimple-low.c (lower_stmt): Likewise.
1299 * gimple-pretty-print.c (dump_gimple_call): Likewise.
1300 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1301 * gimple.c (gimple_build_call_from_tree): Likewise.
1302 (gimple_call_builtin_p): Likewise.
1303 (gimple_call_combined_fn): Likewise.
1304 * gimplify.c (gimplify_call_expr): Likewise.
1305 (gimple_boolify): Likewise.
1306 (gimplify_modify_expr): Likewise.
1307 (gimplify_addr_expr): Likewise.
1308 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1309 * ipa-cp.c (determine_versionability): Likewise.
1310 * ipa-fnsummary.c (compute_fn_summary): Likewise.
1311 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1312 * ipa-split.c (visit_bb): Likewise.
1313 (split_function): Likewise.
1314 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1315 * lto-cgraph.c (input_node): Likewise.
1316 * lto-streamer-out.c (write_symbol): Likewise.
1317 * omp-low.c (setjmp_or_longjmp_p): Likewise.
1318 (lower_omp_1): Likewise.
1319 * predict.c (strip_predict_hints): Likewise.
1320 * print-tree.c (print_node): Likewise.
1321 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1322 * trans-mem.c (is_tm_irrevocable): Likewise.
1323 (is_tm_load): Likewise.
1324 (is_tm_simple_load): Likewise.
1325 (is_tm_store): Likewise.
1326 (is_tm_simple_store): Likewise.
1327 (is_tm_abort): Likewise.
1328 (tm_region_init_1): Likewise.
1329 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1330 * tree-cfg.c (verify_gimple_call): Likewise.
1331 (move_stmt_r): Likewise.
1332 (stmt_can_terminate_bb_p): Likewise.
1333 * tree-eh.c (lower_eh_constructs_2): Likewise.
1334 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1335 * tree-inline.c (remap_gimple_stmt): Likewise.
1336 (copy_bb): Likewise.
1337 (estimate_num_insns): Likewise.
1338 (fold_marked_statements): Likewise.
1339 * tree-sra.c (scan_function): Likewise.
1340 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1341 (optimize_stack_restore): Likewise.
1342 (pass_fold_builtins::execute): Likewise.
1343 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1344 (mark_all_reaching_defs_necessary_1): Likewise.
1345 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1346 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1347 (pass_forwprop::execute): Likewise.
1348 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1349 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1350 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1351 * tree-ssa-strlen.c (get_string_length): Likewise.
1352 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1353 (find_func_aliases_for_call): Likewise.
1354 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1355 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1356 * tree-tailcall.c (find_tail_calls): Likewise.
1357 * tree.c (need_assembler_name_p): Likewise.
1358 (free_lang_data_in_decl): Likewise.
1359 (get_call_combined_fn): Likewise.
1360 * ubsan.c (is_ubsan_builtin_p): Likewise.
1361 * varasm.c (incorporeal_function_p): Likewise.
1362 * tree.h (DECL_BUILT_IN): Remove and replace with
1363 fndecl_built_in_p.
1364 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1365 (fndecl_built_in_p): New.
1366
1367 2018-08-27 Martin Liska <mliska@suse.cz>
1368
1369 PR tree-optimization/86847
1370 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1371 Dump also subtree probability.
1372 (switch_decision_tree::do_jump_if_equal): New function.
1373 (switch_decision_tree::emit_case_nodes): Handle special
1374 situations in balanced tree that can be emitted much simpler.
1375 Fix calculation of probabilities that happen in tree expansion.
1376 * tree-switch-conversion.h (struct cluster): Add
1377 is_single_value_p.
1378 (struct simple_cluster): Likewise.
1379 (struct case_tree_node): Add new function has_child.
1380 (do_jump_if_equal): New.
1381
1382 2018-08-27 Martin Liska <mliska@suse.cz>
1383
1384 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1385 Add new argument to bit_test_cluster constructor.
1386 (bit_test_cluster::emit): Set bits really number of values
1387 handlel by a test.
1388 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1389 probability argument.
1390 * tree-switch-conversion.h (struct bit_test_cluster):
1391 Add m_handles_entire_switch.
1392
1393 2018-08-27 Martin Liska <mliska@suse.cz>
1394
1395 PR tree-optimization/86702
1396 * tree-switch-conversion.c (jump_table_cluster::emit):
1397 Make probabilities even for values in jump table
1398 according to number of cases handled.
1399 (switch_decision_tree::compute_cases_per_edge): Pass
1400 argument to reset_out_edges_aux function.
1401 (switch_decision_tree::analyze_switch_statement): Likewise.
1402 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1403 Make it static.
1404
1405 2018-08-27 Martin Liska <mliska@suse.cz>
1406
1407 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1408 cfun argument explicitly.
1409 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1410 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1411 function gimple_switch_default_bb.
1412 (convert_switch_statements):
1413 (expand_builtins):
1414 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1415 * stmt.c (label_to_block_fn): Use label_to_block and pass
1416 cfun argument explicitly and use gimple_switch_label_bb.
1417 (expand_case): Likewise.
1418 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1419 cfun argument explicitly. Likewise.
1420 (make_edges_bb): Likewise.
1421 (make_cond_expr_edges): Likewise.
1422 (get_cases_for_edge): Likewise.
1423 (make_gimple_switch_edges): Likewise.
1424 (label_to_block_fn): Likewise.
1425 (label_to_block): Likewise.
1426 (make_goto_expr_edges): Likewise.
1427 (make_gimple_asm_edges): Likewise.
1428 (main_block_label): Likewise.
1429 (group_case_labels_stmt): Likewise.
1430 (find_taken_edge_computed_goto): Likewise.
1431 (find_taken_edge_switch_expr): Likewise.
1432 (gimple_verify_flow_info): Likewise.
1433 (gimple_redirect_edge_and_branch): Likewise.
1434 (gimple_switch_label_bb): New function.
1435 (gimple_switch_default_bb): Likewise.
1436 (gimple_switch_edge): Likewise.
1437 (gimple_switch_default_edge): Likewise.
1438 * tree-cfg.h (label_to_block_fn): Remove and replace ...
1439 (label_to_block): ... with this.
1440 (gimple_switch_label_bb): New.
1441 (gimple_switch_default_bb): Likewise.
1442 (gimple_switch_edge): Likewise.
1443 (gimple_switch_default_edge): Likewise.
1444 * tree-cfgcleanup.c (convert_single_case_switch): Use
1445 new gimple functions and pass new argument to label_to_block.
1446 (cleanup_control_flow_bb):
1447 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1448 cfun argument explicitly.
1449 (make_eh_edges): Likewise.
1450 (redirect_eh_dispatch_edge): Likewise.
1451 (lower_resx): Likewise.
1452 (lower_eh_dispatch): Likewise.
1453 (maybe_remove_unreachable_handlers): Likewise.
1454 (unsplit_eh): Likewise.
1455 (cleanup_empty_eh): Likewise.
1456 (verify_eh_edges): Likewise.
1457 (verify_eh_dispatch_edge): Likewise.
1458 * tree-ssa-dom.c (record_edge_info): Likewise.
1459 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1460 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1461 (thread_through_normal_block): Likewise.
1462 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1463 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1464 * tree-switch-conversion.c (switch_conversion::collect): Use new
1465 gimple functions.
1466 (switch_conversion::check_final_bb): Likewise.
1467 (switch_conversion::gather_default_values): Pass new argument
1468 to label_to_block.
1469 (switch_conversion::build_constructors): Likewise.
1470 (switch_decision_tree::compute_cases_per_edge): Use new
1471 gimple_switch_edge function.
1472 (switch_decision_tree::analyze_switch_statement): Pass new argument
1473 to label_to_block.
1474 (switch_decision_tree::try_switch_expansion): Use
1475 gimple_switch_default_edge.
1476 * tree-vrp.c (find_switch_asserts): Pass new argument
1477 to label_to_block.
1478 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1479 (vr_values::simplify_switch_using_ranges): Likewise.
1480
1481 2018-08-27 Richard Biener <rguenther@suse.de>
1482
1483 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1484 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1485
1486 * tree-ssa-sccvn.h (struct vn_pval): New structure.
1487 (struct vn_nary_op_s): Add unwind_to member. Add
1488 predicated_values flag and put result into a union together
1489 with a linked list of vn_pval.
1490 (struct vn_ssa_aux): Add name member to make maintaining
1491 a map of SSA name to vn_ssa_aux possible. Remove no longer
1492 needed info, dfsnum, low, visited, on_sccstack, use_processed
1493 and range_info_anti_range_p members.
1494 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1495 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1496 New functions.
1497 (vn_valueize): New global.
1498 (vn_context_bb): Likewise.
1499 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1500 VN_INFO_PTR_INFO): Remove.
1501 * tree-ssa-sccvn.c: ... (rewrite)
1502 (pass_fre::execute): For -O2+ initialize loops and run
1503 RPO VN in optimistic mode (iterating). For -O1 and -Og
1504 run RPO VN in non-optimistic mode.
1505 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1506 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1507 * doc/invoke.texi (sccvn-max-scc-size): Remove.
1508 (rpo-vn-max-loop-depth): Document.
1509 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1510 when valuezing the VUSE signals we walked out of the region.
1511 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1512 (phi_translate): Set VN context block to use for availability
1513 lookup.
1514 (compute_avail): Likewise.
1515 (pre_valueize): New function.
1516 (pass_pre::execute): Adjust to the RPO VN API.
1517
1518 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1519 (propagate_constants_for_unrolling): Remove.
1520 (tree_unroll_loops_completely): Perform value-numbering
1521 on the unrolled bodies loop parent.
1522
1523 2018-08-27 Richard Biener <rguenther@suse.de>
1524
1525 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1526 for partial antic compute.
1527
1528 2018-08-27 Jakub Jelinek <jakub@redhat.com>
1529
1530 PR rtl-optimization/87065
1531 * combine.c (simplify_if_then_else): Formatting fix.
1532 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1533 check.
1534 (known_cond): Don't return const_true_rtx for vector modes. Use
1535 CONST0_RTX instead of const0_rtx. Formatting fixes.
1536
1537 2018-08-27 Martin Liska <mliska@suse.cz>
1538
1539 PR gcov-profile/87069
1540 * gcov.c (process_file): Record files already processed
1541 and warn about a file being processed multiple times.
1542
1543 2018-08-27 Martin Liska <mliska@suse.cz>
1544
1545 PR driver/83193
1546 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1547 Set default values for x_aarch64_*_string strings.
1548 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1549 prefix. For -mabi do not print '=ABI' in help and use
1550 <option_value> format for -msve-vector-bits and -moverride
1551 options.
1552
1553 2018-08-26 Jeff Law <law@redhat.com>
1554
1555 * config/mips/frame-header-opt.c: Include "backend.h" rather than
1556 "cfg.h"
1557
1558 2018-08-26 Marek Polacek <polacek@redhat.com>
1559
1560 PR c++/87029, Implement -Wredundant-move.
1561 * doc/invoke.texi: Document -Wredundant-move.
1562
1563 2018-08-25 Martin Sebor <msebor@redhat.com>
1564
1565 PR tree-optimization/87059
1566 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1567 to the same type as the other.
1568 * fold-const.c (fold_binary_loc): Assert expectation.
1569
1570 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1571
1572 * config/darwin.c (machopic_legitimize_pic_address): Clean up
1573 extraneous parentheses, dead code section and formatting.
1574
1575 2018-08-24 David Malcolm <dmalcolm@redhat.com>
1576
1577 PR c++/87091
1578 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1579 wide enough for jumps in the line-numbering to be visible.
1580 (layout::print_gap_in_line_numbering): New member function.
1581 (layout::calculate_line_spans): When using line numbering, merge
1582 line spans that are only 1 line apart.
1583 (diagnostic_show_locus): When printing line numbers, show gaps in
1584 line numbering directly, rather than printing headers.
1585 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1586 line-numbering with multiple line spans.
1587 (selftest::test_fixit_insert_containing_newline_2): Add test of
1588 line-numbering, in which the spans are close enough to be merged.
1589
1590 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1591
1592 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1593 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
1594 * tree-vrp.c (range_is_nonnull): Remove.
1595 (range_includes_zero_p): Accept value_range instead of min/max.
1596 (extract_range_from_binary_expr_1): Do not early bail on
1597 POINTER_PLUS_EXPR.
1598 Use range_includes_zero_p instead of range_is_nonnull.
1599 (extract_range_from_unary_expr): Use range_includes_zero_p instead
1600 of range_is_nonnull.
1601 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
1602 special case VR_ANTI_RANGE.
1603 (vrp_finalize): Same.
1604 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1605 instead of min/max.
1606 (range_is_nonnull): Remove.
1607 * vr-values.c (vrp_stmt_computes_nonzero): Use
1608 range_includes_zero_p instead of range_is_nonnull.
1609 (extract_range_basic): Pass value_range to range_includes_zero_p
1610 instead of range_is_nonnull.
1611
1612 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
1613
1614 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1615 * emit-rtl.h (rtl_data): Remove return_bnd.
1616 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1617 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1618 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1619 (POINTER_BOUNDS_MODE): Remove definition.
1620 (make_pointer_bounds_mode): Remove.
1621 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1622 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1623 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1624 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1625 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1626 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1627 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1628
1629 * config/i386/i386-modes.def (BND32, BND64): Remove.
1630 * config/i386/i386.c (dbx_register_map): Remove bound registers.
1631 (dbx64_register_map): Ditto.
1632 (svr4_dbx_register_map): Ditto.
1633 (indirect_thunk_bnd_needed): Remove.
1634 (indirect_thunks_bnd_used): Ditto.
1635 (indirect_return_bnd_needed): Ditto.
1636 (indirect_return_via_cx_bnd): Ditto.
1637 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1638 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1639 (output_indirect_thunk): Ditto. Remove need_prefix argument.
1640 (output_indirect_thunk_function): Remove handling of
1641 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1642 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1643 (ix86_save_reg): Remove handling of crtl->return_bnd.
1644 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1645 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1646 and UNSPEC_BNDLX_ADDR.
1647 (ix86_output_indirect_branch_via_reg): Remove handling of
1648 indirect_thunk_prefix_bnd.
1649 (ix86_output_indirect_branch_via_push): Ditto.
1650 (ix86_output_function_return): Ditto.
1651 (ix86_output_indirect_function_return): Ditto.
1652 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1653 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1654 (CALL_USED_REGISTERS): Ditto.
1655 (REG_ALLOC_ORDER): Update for removal of bound registers.
1656 (HI_REGISTER_NAMES): Ditto.
1657 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1658 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1659 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1660 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1661 (FIRST_PSEUDO_REG): Update.
1662 (BND): Remove mode iterator.
1663 * config/i386/predicates.md (bnd_mem_operator): Remove.
1664
1665 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1666
1667 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1668 vectors.
1669
1670 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
1671
1672 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1673 the case in which the permute needs only a single element and
1674 repeats for every vector of the result. Extend that case to
1675 handle variable-length vectors.
1676 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1677
1678 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
1679
1680 PR debug/79342
1681 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1682 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1683
1684 2018-08-24 Richard Biener <rguenther@suse.de>
1685
1686 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1687 bb_flags_allocated members.
1688 (auto_flag): New RAII class for allocating flags.
1689 (auto_edge_flag): New RAII class for allocating edge flags.
1690 (auto_bb_flag): New RAII class for allocating bb flags.
1691 * cfgloop.c (verify_loop_structure): Allocate temporary edge
1692 flag dynamically.
1693 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1694 in favor of temporarily allocated BB flag.
1695 * hsa-brig.c: Re-order includes.
1696 * hsa-dump.c: Likewise.
1697 * hsa-regalloc.c: Likewise.
1698 * print-rtl.c: Likewise.
1699 * profile-count.c: Likewise.
1700
1701 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
1702
1703 PR target/86989
1704 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1705 the TOC register.
1706
1707 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
1708
1709 PR 87073/bootstrap
1710 * wide-int-range.cc (wide_int_range_div): Do not ignore result
1711 from wide_int_range_multiplicative_op.
1712
1713 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1714
1715 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1716 "permutaion".
1717
1718 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
1719
1720 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1721 to 'expanded'.
1722
1723 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
1724
1725 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1726 full GENERIC expression used for replacement.
1727
1728 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
1729
1730 * tree-vrp.c (abs_extent_range): Remove.
1731 (extract_range_into_wide_ints): Pass wide ints by reference.
1732 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1733 Pass wide ints by reference in all calls to
1734 extract_range_into_wide_ints.
1735 * wide-int-range.cc (wide_int_range_div): New.
1736 * wide-int-range.h (wide_int_range_div): New.
1737 (wide_int_range_includes_zero_p): New.
1738 (wide_int_range_zero_p): New.
1739
1740 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
1741
1742 * config/aarch64/aarch64.md (arches): New enum.
1743 (arch): New enum attr.
1744 (arch_enabled): New attr.
1745 (enabled): Now uses arch_enabled only.
1746 (simd, sve, fp16): Removed attribute.
1747 (fp): Attr now defined in terms of 'arch'.
1748 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1749 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1750 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1751 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1752 attributes into 'arch'.
1753 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1754 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1755 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1756 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1757 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1758 'simd' attribute into 'arch'.
1759 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1760 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1761 Convert use of 'fp' attribute to 'arch'.
1762 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1763 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1764 into 'arch'.
1765 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1766 (different modes) Merge 'fp' and 'simd' into 'arch'.
1767 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1768 'simd' into 'arch'.
1769
1770 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
1771
1772 PR rtl-optimization/87026
1773 * expmed.c (canonicalize_comparison): If we can no longer create
1774 pseudoregisters, don't.
1775
1776 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
1777
1778 PR target/86951
1779 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1780 prototype.
1781 * config/arm/arm.c (speculation_barrier_libfunc): New static
1782 variable.
1783 (arm_init_libfuncs): Initialize it.
1784 (arm_emit_speculation_barrier): New function.
1785 * config/arm/arm.md (speculation_barrier): Call
1786 arm_emit_speculation_barrier for architectures that do not have
1787 DSB or ISB.
1788 (speculation_barrier_insn): Only match on Armv7 or later.
1789
1790 2018-08-23 Richard Biener <rguenther@suse.de>
1791
1792 PR middle-end/87024
1793 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1794 calls.
1795
1796 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1797
1798 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1799 of single-vector TBLs.
1800 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1801 one input is given.
1802
1803 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
1804
1805 PR target/85910
1806 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1807 aarch64_evpc_tbl guard.
1808
1809 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1810
1811 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1812 behaviour.
1813
1814 2018-08-22 Martin Sebor <msebor@redhat.com>
1815
1816 PR middle-end/87052
1817 * tree-pretty-print.c (pretty_print_string): Add argument.
1818 (dump_generic_node): Call to pretty_print_string with string size.
1819
1820 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
1821
1822 PR rtl-optimization/86771
1823 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1824 of two SETs into those two SETs, one to be placed at i2, if that SETs
1825 destination is modified between i2 and i3.
1826
1827 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1828
1829 PR tree-optimization/86725
1830 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1831 function.
1832 (vect_analyze_scalar_cycles_1): Check it.
1833
1834 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1835
1836 PR tree-optimization/86725
1837 * tree-vect-loop.c (vect_is_simple_reduction): When treating
1838 an outer loop phi as a double reduction, make sure that the
1839 single user of the phi result is an inner loop phi.
1840
1841 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1842
1843 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1844 grouped stores with gaps to a strided group.
1845
1846 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
1847
1848 * tree-vect-stmts.c (get_group_load_store_type)
1849 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1850 first statement in a group.
1851
1852 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1853
1854 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1855 the sequence used in gcc/gcc.c.
1856
1857 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1858
1859 PR other/704
1860 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1861 building it.
1862
1863 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1864
1865 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1866 Darwin10-specific unwinder-shim.
1867 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1868 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
1869 New to cater for Darwin10 Rosetta.
1870
1871 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1872
1873 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1874 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1875
1876 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
1877
1878 PR bootstrap/81033
1879 PR target/81733
1880 PR target/52795
1881 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1882 (dwarf2out_switch_text_section): Generate a local label for the
1883 second function sub-section and apply it as the second FDE start
1884 label.
1885 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1886 second sub-section start.
1887
1888 2018-08-22 Richard Biener <rguenther@suse.de>
1889
1890 PR tree-optimization/86988
1891 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1892
1893 2018-08-22 Richard Biener <rguenther@suse.de>
1894
1895 PR tree-optimization/86945
1896 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1897
1898 2018-08-22 Alexandre Oliva <oliva@adacore.com>
1899
1900 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1901 a comment about how uses of r2 for .sdata2 come about.
1902
1903 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
1904
1905 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1906
1907 2018-08-21 Marek Polacek <polacek@redhat.com>
1908
1909 PR c++/86981, Implement -Wpessimizing-move.
1910 * doc/invoke.texi: Document -Wpessimizing-move.
1911
1912 2018-08-21 Jan Hubicka <jh@suse.cz>
1913
1914 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1915 * tree.h (is_redundant_typedef): Remove.
1916 * dwarf2out.c (is_redundant_typedef): Turn into static function.
1917
1918 2018-08-21 Jan Hubicka <jh@suse.cz>
1919
1920 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1921 when possible.
1922
1923 2018-08-21 Tamar Christina <tamar.christina@arm.com>
1924
1925 * expmed.c (extract_low_bits): Reject invalid subregs early.
1926
1927 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1928
1929 PR middle-end/86121
1930 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1931 behaviour.
1932
1933 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1934
1935 * config/vxworks.h: Guard vxworks_asm_out_constructor and
1936 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1937 * config/vxworks.c: Likewise.
1938
1939 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1940
1941 * config/vxworks.c: Set targetm.have_ctors_dtors
1942 if HAVE_INITFINI_ARRAY_SUPPORT.
1943 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1944 if HAVE_INITFINI_ARRAY_SUPPORT.
1945
1946 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1947
1948 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1949 default search path for VxWorks < 7.
1950
1951 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1952
1953 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1954 (get_format_string): Refer to c_getstr.
1955
1956 2018-08-21 Tom de Vries <tdevries@suse.de>
1957
1958 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1959 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1960 (debuginfo_early_stop): Declare.
1961 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1962 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1963 (debuginfo_early_stop): New function.
1964 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1965 and debuginfo_early_stop.
1966 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1967 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1968 (general_init): Call debuginfo_early_init.
1969 (finalize): Call debuginfo_fini.
1970 (do_compile): Call debuginfo_init.
1971 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1972 -fdump-early-debug.
1973 (@item -fdump-debug, @item -fdump-earlydebug): Add.
1974
1975 2018-08-21 Tom de Vries <tdevries@suse.de>
1976
1977 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1978 flag_dump_noaddr and flag_dump_unnumbered.
1979
1980 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
1981
1982 * wide-int-range.cc (wide_int_range_abs): New.
1983 (wide_int_range_order_set): Rename from wide_int_range_min_max.
1984 * wide-int-range.h (wide_int_range_abs): New.
1985 (wide_int_range_min_max): New.
1986 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1987 case to call wide_int_range_abs.
1988 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1989 (extract_range_from_abs_expr): Delete.
1990
1991 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
1992
1993 PR target/87033
1994 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1995 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1996 for indexed loads.
1997
1998 2018-08-20 Nathan Sidwell <nathan@acm.org>
1999 Jeff Law <law@redhat.com>
2000
2001 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
2002 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
2003
2004 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2005
2006 PR other/84889
2007 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
2008 (decl_attributes): Likewise.
2009 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
2010 instance.
2011 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
2012 * diagnostic-core.h (class auto_diagnostic_group): New class.
2013 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
2014 (diagnostic_report_diagnostic): Handle the first diagnostics within
2015 a group.
2016 (emit_diagnostic): Add auto_diagnostic_group instance.
2017 (inform): Likewise.
2018 (inform_n): Likewise.
2019 (warning): Likewise.
2020 (warning_at): Likewise.
2021 (warning_n): Likewise.
2022 (pedwarn): Likewise.
2023 (permerror): Likewise.
2024 (error): Likewise.
2025 (error_n): Likewise.
2026 (error_at): Likewise.
2027 (sorry): Likewise.
2028 (fatal_error): Likewise.
2029 (internal_error): Likewise.
2030 (internal_error_no_backtrace): Likewise.
2031 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
2032 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
2033 * diagnostic.h (struct diagnostic_context): Add fields
2034 "diagnostic_group_nesting_depth",
2035 "diagnostic_group_emission_count", "begin_group_cb",
2036 "end_group_cb".
2037 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
2038 Add auto_diagnostic_group instance(s).
2039 (find_explicit_erroneous_behavior): Likewise.
2040 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
2041 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
2042 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
2043 (gimplify_va_arg_expr): Likewise.
2044 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
2045 (HSA_SORRY_AT): Likewise.
2046 * ipa-devirt.c (compare_virtual_tables): Likewise.
2047 (warn_odr): Likewise.
2048 * multiple_target.c (expand_target_clones): Likewise.
2049 * opts-common.c (cmdline_handle_error): Likewise.
2050 * reginfo.c (globalize_reg): Likewise.
2051 * substring-locations.c (format_warning_n_va): Likewise.
2052 * tree-inline.c (expand_call_inline): Likewise.
2053 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
2054 * tree-ssa-loop-niter.c
2055 (do_warn_aggressive_loop_optimizations): Likewise.
2056 * tree-ssa-uninit.c (warn_uninit): Likewise.
2057 * tree.c (warn_deprecated_use): Likewise.
2058
2059 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
2060
2061 PR target/87014
2062 * config/i386/i386.md (eh_return): Always update EH return
2063 address in word_mode.
2064
2065 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
2066
2067 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
2068 TARGET_SPLIT_COMPLEX_ARG is defined.
2069
2070 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2071
2072 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
2073
2074 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2075
2076 PR target/86984
2077 * expr.c (expand_assignment): Assert that bitpos is positive.
2078 (store_field): Likewise
2079 (expand_expr_real_1): Make sure that bitpos is positive.
2080 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
2081 integer overflow.
2082
2083 2018-08-20 Nathan Sidwell <nathan@acm.org>
2084
2085 * Makefile.in (CPP_ID_DATA_H): Delete.
2086 (CPP_INTERNAL_H): Don't add it.
2087 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
2088 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2089
2090 2018-08-20 Richard Biener <rguenther@suse.de>
2091
2092 PR tree-optimization/78655
2093 * tree-vrp.c (extract_range_from_binary_expr_1): Make
2094 pointer + offset nonnull if either operand is nonnull work.
2095
2096 2018-08-20 Tom de Vries <tdevries@suse.de>
2097
2098 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2099 unless the referenced die describes the added property using
2100 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
2101 Otherwise, add a DW_AT_location to the referenced die.
2102
2103 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
2104
2105 PR target/86994
2106 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2107 register_operand when calling ix86_set_reg_reg_cost.
2108 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2109 Set *total to 0 for operands that satisfy x86_64_immediate_operand
2110 predicate and to 1 otherwise.
2111
2112 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
2113
2114 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2115 emit a diagnostic that it is not supported and reset the option.
2116 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2117 supported and consume the option. (ASM_FINAL_SPEC): New.
2118
2119 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2120
2121 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2122 a sentence.
2123
2124 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
2125
2126 C-SKY port: Documentation
2127
2128 * doc/extend.texi (C-SKY Function Attributes): New section.
2129 * doc/invoke.texi (Option Summary): Add C-SKY options.
2130 (C-SKY Options): New section.
2131 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2132
2133 2018-08-17 Jojo <jijie_rong@c-sky.com>
2134 Huibin Wang <huibin_wang@c-sky.com>
2135 Sandra Loosemore <sandra@codesourcery.com>
2136 Chung-Lin Tang <cltang@codesourcery.com>
2137
2138 C-SKY port: Backend implementation
2139
2140 * config/csky/*: New.
2141 * common/config/csky/*: New.
2142
2143 2018-08-17 Jojo <jijie_rong@c-sky.com>
2144 Huibin Wang <huibin_wang@c-sky.com>
2145 Sandra Loosemore <sandra@codesourcery.com>
2146 Chung-Lin Tang <cltang@codesourcery.com>
2147 Andrew Jenner <andrew@codesourcery.com>
2148
2149 C-SKY port: Configury
2150
2151 * config.gcc (csky-*-*): New.
2152 * configure.ac: Add csky to targets for dwarf2 debug_line support.
2153 * configure: Regenerated.
2154
2155 2018-08-17 David Malcolm <dmalcolm@redhat.com>
2156
2157 * dump-context.h: Include "dumpfile.h".
2158 (dump_context::dump_printf_va): Convert final param from va_list
2159 to va_list *. Convert from ATTRIBUTE_PRINTF to
2160 ATTRIBUTE_GCC_DUMP_PRINTF.
2161 (dump_context::dump_printf_loc_va): Likewise.
2162 * dumpfile.c: Include "stringpool.h".
2163 (make_item_for_dump_printf_va): Delete.
2164 (make_item_for_dump_printf): Delete.
2165 (class dump_pretty_printer): New class.
2166 (dump_pretty_printer::dump_pretty_printer): New ctor.
2167 (dump_pretty_printer::emit_items): New member function.
2168 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2169 function.
2170 (dump_pretty_printer::emit_item): New member function.
2171 (dump_pretty_printer::stash_item): New member function.
2172 (dump_pretty_printer::format_decoder_cb): New member function.
2173 (dump_pretty_printer::decode_format): New member function.
2174 (dump_context::dump_printf_va): Reimplement in terms of
2175 dump_pretty_printer.
2176 (dump_context::dump_printf_loc_va): Convert final param from va_list
2177 to va_list *.
2178 (dump_context::begin_scope): Reimplement call to
2179 make_item_for_dump_printf.
2180 (dump_printf): Update for change to dump_printf_va.
2181 (dump_printf_loc): Likewise.
2182 (selftest::test_capture_of_dump_calls): Convert "stmt" from
2183 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
2184 with %T, %E, and %G.
2185 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2186 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2187 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2188 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2189 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2190 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2191 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2192 within a dump_printf_loc call to "%wu".
2193 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2194 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
2195 missing space after "=".
2196 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2197 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2198 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2199 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2200 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
2201 duplicate "vectorized" from message.
2202
2203 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2204
2205 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2206 polyNxK_t element's TYPE_STRING_FLAG.
2207
2208 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
2209
2210 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2211 (they were unnamed before). Fix comments.
2212
2213 2018-08-17 Nathan Sidwell <nathan@acm.org>
2214
2215 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2216
2217 2018-08-17 Richard Biener <rguenther@suse.de>
2218
2219 PR tree-optimization/86841
2220 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2221
2222 2018-08-17 Martin Liska <mliska@suse.cz>
2223
2224 * common.opt: Remove Warn, Init and Report for options with
2225 Ignore/Deprecated flag. Warning is done automatically for
2226 Deprecated flags.
2227 * config/i386/i386.opt: Likewise.
2228 * config/ia64/ia64.opt: Likewise.
2229 * config/rs6000/rs6000.opt: Likewise.
2230 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2231 Remove usage of flag_check_pointer_bounds.
2232 * lto-wrapper.c (merge_and_complain): Do not handle
2233 OPT_fcheck_pointer_bounds.
2234 (append_compiler_options): Likewise.
2235 * opt-functions.awk: Do not handle Deprecated.
2236 * optc-gen.awk: Check that Var, Report and Init are not
2237 used for an option with Ignore/Deprecated flag.
2238 * opts-common.c (decode_cmdline_option): Do not report
2239 CL_ERR_DEPRECATED.
2240 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2241 options.
2242 * opts.h (struct cl_option): Remove cl_deprecated flag.
2243 (CL_ERR_DEPRECATED): Remove error enum value.
2244
2245 2018-08-17 Richard Biener <rguenther@suse.de>
2246
2247 PR middle-end/86505
2248 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2249 across a va-arg-pack using call adjust its return value accordingly.
2250
2251 2018-08-16 Martin Sebor <msebor@redhat.com>
2252
2253 PR tree-optimization/86853
2254 * gimple-ssa-sprintf.c (struct format_result): Rename member.
2255 (struct fmtresult): Add member and initialize it in ctors.
2256 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
2257 (format_string): Handle %S the same as %ls. Set MAYFAIL.
2258 (format_directive): Set POSUNDER4K when MAYFAIL is set.
2259 (parse_directive): Handle %C same as %c.
2260 (sprintf_dom_walker::compute_format_length): Adjust.
2261 (is_call_safe): Adjust.
2262
2263 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2264
2265 * builtins.c (c_strlen): Add new parameter eltsize. Use it
2266 for determining how to count the elements.
2267 * builtins.h (c_strlen): Adjust prototype.
2268 * expr.c (string_constant): Add new parameter mem_size.
2269 Set *mem_size appropriately.
2270 * expr.h (string_constant): Adjust protoype.
2271 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2272 * gimple-fold.h (get_range_strlen): Adjust prototype.
2273 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2274 (format_string): Call get_string_length with eltsize.
2275
2276 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2277
2278 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2279 to emit the span, rather than setting it as the prefix.
2280
2281 2018-08-16 David Malcolm <dmalcolm@redhat.com>
2282
2283 * diagnostic-show-locus.c (layout::start_annotation_line): Add
2284 "margin_char" parameter, defaulting to space. Use it in place
2285 of pp_space for the initial part of the margin.
2286 (layout::print_leading_fixits): Use '+' when filling the margin
2287 of line-insertion fix-it hints.
2288
2289 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2290
2291 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2292 Delete.
2293
2294 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2295
2296 * config/rs6000/altivec.md: Don't set length attribute to the default
2297 value.
2298 * config/rs6000/darwin.md: Ditto.
2299 * config/rs6000/dfp.md: Ditto.
2300 * config/rs6000/htm.md: Ditto.
2301 * config/rs6000/rs6000.md: Ditto.
2302 * config/rs6000/sync.md: Ditto.
2303 * config/rs6000/vsx.md: Ditto.
2304
2305 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2306
2307 * config/rs6000/altivec.md: Don't set length attribute to the default
2308 value, for branch instructions.
2309 * config/rs6000/darwin.md: Ditto.
2310 * config/rs6000/rs6000.md: Ditto.
2311
2312 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
2313
2314 * config/rs6000/rs6000.md (length): Always define as const_int 4.
2315 (unnamed conditional branch define_insn): Set length to 4 or 8
2316 depending on offset.
2317 (<bd>_<mode>): Similar, for alternative 0.
2318 (<bd>tf_<mode>): Ditto.
2319
2320 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2321
2322 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2323
2324 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
2325
2326 * doc/rtl.texi: Replace old RTX class names with new names.
2327
2328
2329 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
2330
2331 * expmed.h (canonicalize_comparison): New declaration.
2332 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2333 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2334 * optabs.c (prepare_cmp_insn): Likewise.
2335 * rtl.h (unsigned_condition_p): New function which checks if a
2336 comparison operator is unsigned.
2337
2338 2018-08-16 Nathan Sidwell <nathan@acm.org>
2339
2340 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2341 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2342
2343 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2344
2345 PR target/84711
2346 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2347 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2348 (mov<mov>): ..this and enable unconditionally.
2349
2350 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2351
2352 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2353
2354 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
2355
2356 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2357 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2358 "Common" with "Target".
2359
2360 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2361
2362 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2363 * doc/invoke.texi (mmitigate-rop): Remove.
2364 * config/i386/i386.c: Do not include "regrename.h".
2365 (ix86_rop_should_change_byte_p, reg_encoded_number)
2366 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2367 Remove.
2368 (ix86_reorg): Remove call to ix86_mitigate_rop.
2369 * config/i386/i386.md (attr "modrm_class"): Remove.
2370 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2371 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2372 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2373
2374 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2375
2376 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2377 allow folding of mergeh() and mergel() for the float and double types.
2378 (fold_mergehl_helper): Rework to handle building a permute tree
2379 for float vectors.
2380
2381 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
2382
2383 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2384 for TARGET_SSE.
2385
2386 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2387
2388 * common.opt (fdiagnostics-show-labels): New option.
2389 * diagnostic-show-locus.c (class layout_range): Add field
2390 "m_label".
2391 (class layout): Add field "m_show_labels_p".
2392 (layout_range::layout_range): Add param "label" and use it to
2393 initialize m_label.
2394 (make_range): Pass in NULL for new "label" param of layout_range's
2395 ctor.
2396 (layout::layout): Initialize m_show_labels_p.
2397 (layout::maybe_add_location_range): Pass in loc_range->m_label
2398 when constructing layout_range instances.
2399 (struct line_label): New struct.
2400 (layout::print_any_labels): New member function.
2401 (layout::print_line): Call it if label-printing is enabled.
2402 (selftest::test_one_liner_labels): New test.
2403 (selftest::test_diagnostic_show_locus_one_liner): Call it.
2404 * diagnostic.c (diagnostic_initialize): Initialize
2405 context->show_labels_p.
2406 * diagnostic.h (struct diagnostic_context): Add field
2407 "show_labels_p".
2408 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2409 -fno-diagnostics-show-labels.
2410 * dwarf2out.c (gen_producer_string): Add
2411 OPT_fdiagnostics_show_labels to the ignored options.
2412 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2413 param.
2414 (gcc_rich_location::maybe_add_expr): Likewise.
2415 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2416 label" param, defaulting to NULL.
2417 (gcc_rich_location::add_expr): Add "label" param.
2418 (gcc_rich_location::maybe_add_expr): Likewise.
2419 (class text_range_label): New class.
2420 (class range_label_for_type_mismatch): New class.
2421 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2422 of format_warning_va.
2423 (fmtwarn_n): Likewise for new params of format_warning_n_va.
2424 * lto-wrapper.c (merge_and_complain): Add
2425 OPT_fdiagnostics_show_labels to the "pick one setting" options.
2426 (append_compiler_options): Likewise to the dropped options.
2427 (append_diag_options): Likewise to the passed-on options.
2428 * opts.c (common_handle_option): Handle the new option.
2429 * selftest-diagnostic.c
2430 (test_diagnostic_context::test_diagnostic_context): Enable
2431 show_labels_p.
2432 * substring-locations.c: Include "gcc-rich-location.h".
2433 (format_warning_n_va): Add "fmt_label" and "param_label" params
2434 and use them as appropriate.
2435 (format_warning_va): Add "fmt_label" and "param_label" params,
2436 passing them on to format_warning_n_va.
2437 (format_warning_at_substring): Likewise.
2438 (format_warning_at_substring_n): Likewise.
2439 * substring-locations.h (format_warning_va): Add "fmt_label" and
2440 "param_label" params.
2441 (format_warning_n_va): Likewise.
2442 (format_warning_at_substring): Likewise.
2443 (format_warning_at_substring_n): Likewise.
2444 * toplev.c (general_init): Initialize global_dc->show_labels_p.
2445
2446 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
2447
2448 PR testsuite/86519
2449 * builtins.c (expand_builtin_memcmp): Do not expand the call
2450 when overflow is detected.
2451
2452 2018-08-15 Martin Sebor <msebor@redhat.com>
2453
2454 PR tree-optimization/71625
2455 * config/aarch64/aarch64-builtins.c
2456 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2457
2458 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
2459
2460 * config/s390/s390.c (s390_reorg): Remove loop.
2461
2462 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2463
2464 * config/darwin.c
2465 (darwin_function_switched_text_sections): Delete.
2466 * gcc/config/darwin.h
2467 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2468
2469 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2470
2471 PR target/81685
2472 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2473 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2474 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2475
2476 2018-08-15 Martin Liska <mliska@suse.cz>
2477
2478 PR tree-optimization/86925
2479 * predict.c (expr_expected_value_1): When taking
2480 later predictor, assign also probability.
2481 Use fold_build2_initializer_loc in order to fold
2482 the expression in -frounding-math.
2483
2484 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
2485
2486 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2487 patterns.
2488 (expand_vec_perm_1): Try the new method.
2489
2490 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
2491
2492 PR target/86547
2493 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2494 Check whether lra_live_max_point is 0 before dividing.
2495
2496 2018-08-14 Martin Sebor <msebor@redhat.com>
2497
2498 PR tree-optimization/86650
2499 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2500 (vrp_prop::check_mem_ref): Same.
2501
2502 2018-08-13 Liu Hao <lh_mouse@126.com>
2503
2504 * pretty-print.c (eat_esc_sequence): Swap the foreground and
2505 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2506 and clear it thereafter, as it only works for DBCS.
2507
2508 2018-08-13 Liu Hao <lh_mouse@126.com>
2509
2510 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2511 handle returned by _get_osf_handle().
2512
2513 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2514
2515 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2516 for folding vec_perm.
2517
2518 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2519
2520 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2521 Add support for gimple-folding of vec_pack() and vec_unpack()
2522 intrinsics.
2523
2524 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
2525
2526 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2527 vec_xst variants to the list.
2528 (rs6000_gimple_fold_builtin): Add support for folding unaligned
2529 vector loads and stores.
2530
2531 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
2532
2533 * config.gcc (rs6000-ibm-aix4.x): Delete.
2534 (rs6000-ibm-aix5.1): Delete.
2535 (rs6000-ibm-aix5.2): Delete.
2536 (rs6000-ibm-aix5.3): Delete.
2537 * config/rs6000/aix43.h: Delete.
2538 * config/rs6000/aix51.h: Delete.
2539 * config/rs6000/aix52.h: Delete.
2540 * config/rs6000/t-aix43: Delete.
2541
2542 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
2543
2544 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2545 New function.
2546 (s390_decompose_address): Factor out constant pool ref
2547 decomposition.
2548
2549 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2550
2551 * config/nds32/nds32-predicates.c
2552 (nds32_can_use_bclr_p): Change return type as bool.
2553 (nds32_can_use_bset_p): Ditto.
2554 (nds32_can_use_btgl_p): Ditto.
2555 (nds32_can_use_bitci_p): Ditto.
2556 * config/nds32/nds32-protos.h
2557 (nds32_can_use_bclr_p): Change declaration.
2558 (nds32_can_use_bset_p): Ditto.
2559 (nds32_can_use_btgl_p): Ditto.
2560 (nds32_can_use_bitci_p): Ditto.
2561
2562 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2563
2564 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2565 Support -msched-prolog-epilog option.
2566 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2567
2568 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2569
2570 * common/config/nds32/nds32-common.c
2571 (nds32_option_optimization_table): Enalbe -malways-align.
2572
2573 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
2574
2575 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2576 extra_headers.
2577 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2578 OPT_misr_secure_ case.
2579 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2580 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2581 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2582 secure attribute.
2583 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2584 (nds32_isr_info): New field security_level.
2585 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2586 * config/nds32/nds32.md (return_internal): Consider critical attribute.
2587 * config/nds32/nds32.opt (misr-secure): New option.
2588 * config/nds32/nds32_init.inc: New file.
2589 * config/nds32/nds32_isr.h: New file.
2590
2591 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
2592
2593 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2594 Update comment for atomic instructions.
2595 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2596 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2597 Remove.
2598 (atomic_loaddi): Revise fence expansion to only emit fence prior to
2599 load for __ATOMIC_SEQ_CST model.
2600 (atomic_loaddi_1): Remove float register target.
2601 (atomic_storedi): Handle CONST_INT values.
2602 (atomic_storedi_1): Remove float register source. Add special case
2603 for zero value.
2604 (memory_barrier): New expander and insn.
2605
2606 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2607
2608 PR tree-optimization/86835
2609 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2610 new_stmt after def_gsi, make sure to insert new_square_stmt after
2611 that stmt, not 2 stmts before it.
2612
2613 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
2614
2615 PR target/82418
2616 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2617 instead of SWI48.
2618
2619 2018-08-10 Martin Liska <mliska@suse.cz>
2620
2621 PR target/83610
2622 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2623 function type.
2624 * builtins.c (expand_builtin_expect_with_probability):
2625 New function.
2626 (expand_builtin_expect_with_probability): New function.
2627 (build_builtin_expect_predicate): Add new argumnet probability
2628 for BUILT_IN_EXPECT_WITH_PROBABILITY.
2629 (fold_builtin_expect):
2630 (fold_builtin_2):
2631 (fold_builtin_3):
2632 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2633 * builtins.h (fold_builtin_expect): Set new argument.
2634 * doc/extend.texi: Document __builtin_expect_with_probability.
2635 * doc/invoke.texi: Likewise.
2636 * gimple-fold.c (gimple_fold_call): Pass new argument.
2637 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2638 also BUILT_IN_EXPECT_WITH_PROBABILITY.
2639 * predict.c (get_predictor_value): New function.
2640 (expr_expected_value): Add new argument probability. Assume
2641 that predictor and probability are always non-null.
2642 (expr_expected_value_1): Likewise. For __builtin_expect and
2643 __builtin_expect_with_probability set probability. Handle
2644 combination in binary expressions.
2645 (tree_predict_by_opcode): Simplify code by simply calling
2646 get_predictor_value.
2647 (pass_strip_predict_hints::execute): Add handling of
2648 BUILT_IN_EXPECT_WITH_PROBABILITY.
2649 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2650 new predictor.
2651 * tree.h (DECL_BUILT_IN_P): New function.
2652
2653 2018-08-10 Martin Liska <mliska@suse.cz>
2654
2655 PR tree-optimization/85799
2656 * passes.def: Add argument for pass_strip_predict_hints.
2657 * predict.c (class pass_strip_predict_hints): Add new argument
2658 early_p.
2659 (strip_predictor_early): New function.
2660 (pass_strip_predict_hints::execute): Call the function to
2661 strip predictors.
2662 (strip_predict_hints): New function.
2663 * predict.def: Fix comment.
2664
2665 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2666
2667 * Makefile.in: Clarify which tm.texi to copy over to assert the
2668 right to grant a GFDL license for all.
2669
2670 2018-08-09 Jeff Law <law@redhat.com>
2671
2672 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2673 unused variable.
2674
2675 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
2676
2677 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2678 prototype.
2679
2680 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2681
2682 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2683 reductions for variable-length vectors.
2684
2685 2018-08-09 David Malcolm <dmalcolm@redhat.com>
2686
2687 PR other/84889
2688 * common.opt (fdiagnostics-show-line-numbers): New option.
2689 * diagnostic-show-locus.c (class layout): Add fields
2690 "m_show_line_numbers_p" and "m_linenum_width";
2691 (num_digits): New function.
2692 (test_num_digits): New function.
2693 (layout::layout): Initialize new fields. Update m_x_offset
2694 logic to handle any left margin.
2695 (layout::print_source_line): Print line number when requested.
2696 (layout::start_annotation_line): New member function.
2697 (layout::print_annotation_line): Call it.
2698 (layout::print_leading_fixits): Likewise.
2699 (layout::print_trailing_fixits): Likewise. Update calls to
2700 move_to_column for new parameter.
2701 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2702 it to potentially call start_annotation_line.
2703 (layout::show_ruler): Call start_annotation_line.
2704 (selftest::test_line_numbers_multiline_range): New selftest.
2705 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2706 and selftest::test_line_numbers_multiline_range.
2707 * diagnostic.c (diagnostic_initialize): Initialize
2708 show_line_numbers_p.
2709 * diagnostic.h (struct diagnostic_context): Add field
2710 "show_line_numbers_p".
2711 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2712 -fno-diagnostics-show-line-numbers.
2713 * dwarf2out.c (gen_producer_string): Add
2714 OPT_fdiagnostics_show_line_numbers to the ignored options.
2715 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2716 one setting" options.
2717 (append_compiler_options): Likewise to the dropped options.
2718 (append_diag_options): Likewise to the passed-on options.
2719 * opts.c (common_handle_option): Handle the new option.
2720 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2721
2722 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
2723
2724 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2725 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
2726 third argument of type "const signed char" to descriptions of
2727 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2728 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2729 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2730 __builtin_bcdsub_ov functions.
2731
2732 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2733
2734 PR tree-optimization/86858
2735 * tree-vect-loop.c (vect_is_simple_reduction): Restore
2736 flow_bb_inside_loop_p calls.
2737
2738 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
2739
2740 PR tree-optimization/86871
2741 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2742 instead of gimple_assign_lhs.
2743
2744 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
2745
2746 PR target/86887
2747 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2748 register constraint to operand 0.
2749 (add<mode>3_carryinC): Likewise.
2750 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2751
2752 2018-08-09 Martin Liska <mliska@suse.cz>
2753
2754 PR c/86895
2755 * common.opt: Remove extra line.
2756
2757 2018-08-09 Martin Liska <mliska@suse.cz>
2758
2759 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2760 at the end of a line, make first letter capital and end up
2761 a sentence with a dot.
2762 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2763 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2764 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2765 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2766 (PARAM_MAX_ISL_OPERATIONS): Likewise.
2767 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2768 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2769 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2770 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2771 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2772 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2773 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2774 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2775 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2776 (PARAM_TREE_REASSOC_WIDTH): Likewise.
2777 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2778 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2779 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2780
2781 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
2782
2783 PR target/84332
2784 * config/s390/s390.c (s390_option_override_internal): Reduce the
2785 stack-clash-protection-probe-interval param if it would be too big
2786 for z900.
2787
2788 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
2789
2790 PR target/46179
2791 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2792 * config/m68k/m68k.c (handle_move_double): Don't call
2793 m68k_final_prescan_insn.
2794 (m68k_adjust_decorated_operand): Renamed from
2795 m68k_final_prescan_insn, remove first and third operand and
2796 simplify.
2797 (print_operand): Call it.
2798 (print_operand_address): Call it.
2799
2800 2018-08-08 Nathan Sidwell <nathan@acm.org>
2801
2802 * diagnostic.c (diagnostic_report_current_module): Use
2803 linemap_included_from & linemap_included_from_linemap.
2804
2805 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
2806
2807 * config/aarch64/aarch64-cores.def: Add phecda core.
2808 * config/aarch64/aarch64-tune.md: Regenerate.
2809 * doc/invoke.texi: Add phecda core.
2810
2811 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2812
2813 PR target/85295
2814 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2815 definitions.
2816 * config/s390/s390.md ("movti"): Add more alternatives for
2817 constant to GPR copies.
2818
2819 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
2820
2821 * config/s390/s390.c: Fix whitespace damage throughout the file.
2822 * config/s390/s390.h: Likewise.
2823 * config/s390/tpf.h: Likewise.
2824
2825 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2826
2827 * config/s390/s390.c (s390_loadrelative_operand_p):
2828 Remove TARGET_CPU_ZARCH usages.
2829 (s390_rtx_costs): Likewise.
2830 (s390_legitimate_constant_p): Likewise.
2831 (s390_cannot_force_const_mem): Likewise.
2832 (legitimate_reload_constant_p): Likewise.
2833 (s390_preferred_reload_class): Likewise.
2834 (legitimize_pic_address): Likewise.
2835 (legitimize_tls_address): Likewise.
2836 (s390_split_branches): Removed.
2837 (s390_add_execute): Removed.
2838 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2839 (s390_mainpool_start): Likewise.
2840 (s390_mainpool_finish): Likewise.
2841 (s390_mainpool_cancel): Removed.
2842 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2843 (s390_chunkify_cancel): Likewise.
2844 (s390_return_addr_rtx): Likewise.
2845 (s390_register_info): Remove split_branches_pending_p uages.
2846 (s390_optimize_register_info): Likewise.
2847 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2848 split_branches_pending_p usages.
2849 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2850 (s390_load_got): Likewise.
2851 (s390_expand_split_stack_prologue): Likewise.
2852 (output_asm_nops): Likewise.
2853 (s390_function_profiler): Likewise.
2854 (s390_emit_call): Likewise.
2855 (s390_conditional_register_usage): Likewise.
2856 (s390_optimize_prologue): Likewise.
2857 (s390_reorg): Remove TARGET_CPU_ZARCH and
2858 split_branches_pending_p usages.
2859 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2860 usages.
2861 (s390_output_indirect_thunk_function): Likewise.
2862 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2863 (TARGET_CPU_ZARCH_P): Removed.
2864 (struct machine_function): Remove split_branches_pending_p.
2865 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2866
2867 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
2868
2869 * common/config/s390/s390-common.c (processor_flags_table):
2870 Remove flags.
2871 * config.gcc: Remove with_arch/with_tune support.
2872 * config/s390/2064.md: Remove cpu attribute comparisons.
2873 * config/s390/driver-native.c (s390_host_detect_local_cpu):
2874 Remove MTN.
2875 * config/s390/linux.h (ASM_SPEC):
2876 Remove -march support.
2877 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2878 Use a table to get an arch level.
2879 * config/s390/s390-opts.h (enum processor_type):
2880 Remove enum values.
2881 * config/s390/s390.c
2882 (processor_table): Remove entries, add arch_level values.
2883 (s390_issue_rate): Remove cases.
2884 (s390_option_override): Adjust
2885 s390_option_override_internal() call.
2886 (s390_option_override_internal): Remove deprecation warning.
2887 (s390_valid_target_attribute_tree): Adjust
2888 s390_option_override_internal() call.
2889 * config/s390/s390.h (struct s390_processor):
2890 Share with s390-c.c, add arch_level field.
2891 * config/s390/s390.md:
2892 Remove occurrences in cpu attribute.
2893 * config/s390/s390.opt: Remove -march/-mtune support.
2894 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2895 * doc/invoke.texi: Remove deprecation warning.
2896
2897 2018-08-08 Luis Machado <luis.machado@linaro.org>
2898
2899 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2900 global.
2901 (qdf24xx_tunings): Set vector cost structure to
2902 qdf24xx_vector_cost.
2903
2904 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2905 <register_sextend>: Set to 3.
2906
2907 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
2908
2909 PR target/86838
2910 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2911 * config/aarch64/aarch64-simd.md
2912 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2913 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2914 (aarch64_frecpx<mode>): ...this new pattern.
2915 * config/aarch64/aarch64-simd-builtins.def: Remove comment
2916 about aarch64_frecp<FRECP:frecp_suffix><mode>.
2917
2918 2018-08-07 Martin Liska <mliska@suse.cz>
2919
2920 PR middle-end/83023
2921 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2922 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2923 * predict.def (PRED_MALLOC_NONNULL): New predictor.
2924 * doc/extend.texi: Document that malloc attribute adds
2925 hit to compiler.
2926
2927 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
2928
2929 PR target/86785
2930 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2931 Define to speculation_safe_value_not_needed.
2932
2933 2018-08-06 Jeff Law <law@redhat.com>
2934
2935 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2936 the vr_values instance to cprop_into_stmt.
2937 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2938 (cprop_operand): Also query EVRP to determine if OP is a constant.
2939
2940 2018-08-06 Nathan Sidwell <nathan@acm.org>
2941
2942 * diagnostic.c (diagnostic_report_current_module): Reroll
2943 included-at loop. Translate text.
2944
2945 2018-08-06 David Malcolm <dmalcolm@redhat.com>
2946
2947 * function-tests.c (selftest::test_expansion_to_rtl): Call
2948 free_after_compilation.
2949
2950 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2951
2952 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2953
2954 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
2955
2956 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2957 loops with memory block operations from getting unrolled.
2958
2959 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
2960
2961 PR target/86807
2962 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2963 Define to speculation_safe_value_not_needed.
2964
2965 2018-08-06 Jeff Law <law@redhat.com>
2966
2967 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2968 assert.
2969
2970 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2971
2972 PR target/86662
2973 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2974 with all enabled __intN types.
2975
2976 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2977
2978 2018-08-06 Alan Hayward <alan.hayward@arm.com>
2979
2980 * alias.c (record_set): Check for clobber high.
2981 * cfgexpand.c (expand_gimple_stmt): Likewise.
2982 * combine-stack-adj.c (single_set_for_csa): Likewise.
2983 * combine.c (find_single_use_1): Likewise.
2984 (set_nonzero_bits_and_sign_copies): Likewise.
2985 (get_combine_src_dest): Likewise.
2986 (is_parallel_of_n_reg_sets): Likewise.
2987 (try_combine): Likewise.
2988 (record_dead_and_set_regs_1): Likewise.
2989 (reg_dead_at_p_1): Likewise.
2990 (reg_dead_at_p): Likewise.
2991 * dce.c (deletable_insn_p): Likewise.
2992 (mark_nonreg_stores_1): Likewise.
2993 (mark_nonreg_stores_2): Likewise.
2994 * df-scan.c (df_find_hard_reg_defs): Likewise.
2995 (df_uses_record): Likewise.
2996 (df_get_call_refs): Likewise.
2997 * dwarf2out.c (mem_loc_descriptor): Likewise.
2998 * haifa-sched.c (haifa_classify_rtx): Likewise.
2999 * ira-build.c (create_insn_allocnos): Likewise.
3000 * ira-costs.c (scan_one_insn): Likewise.
3001 * ira.c (equiv_init_movable_p): Likewise.
3002 (rtx_moveable_p): Likewise.
3003 (interesting_dest_for_shprep): Likewise.
3004 * jump.c (mark_jump_label_1): Likewise.
3005 * postreload-gcse.c (record_opr_changes): Likewise.
3006 * postreload.c (reload_cse_simplify): Likewise.
3007 (struct reg_use): Add source expr.
3008 (reload_combine): Check for clobber high.
3009 (reload_combine_note_use): Likewise.
3010 (reload_cse_move2add): Likewise.
3011 (move2add_note_store): Likewise.
3012 * print-rtl.c (print_pattern): Likewise.
3013 * recog.c (decode_asm_operands): Likewise.
3014 (store_data_bypass_p): Likewise.
3015 (if_test_bypass_p): Likewise.
3016 * regcprop.c (kill_clobbered_value): Likewise.
3017 (kill_set_value): Likewise.
3018 * reginfo.c (reg_scan_mark_refs): Likewise.
3019 * reload1.c (maybe_fix_stack_asms): Likewise.
3020 (eliminate_regs_1): Likewise.
3021 (elimination_effects): Likewise.
3022 (mark_not_eliminable): Likewise.
3023 (scan_paradoxical_subregs): Likewise.
3024 (forget_old_reloads_1): Likewise.
3025 * reorg.c (find_end_label): Likewise.
3026 (try_merge_delay_insns): Likewise.
3027 (redundant_insn): Likewise.
3028 (own_thread_p): Likewise.
3029 (fill_simple_delay_slots): Likewise.
3030 (fill_slots_from_thread): Likewise.
3031 (dbr_schedule): Likewise.
3032 * resource.c (update_live_status): Likewise.
3033 (mark_referenced_resources): Likewise.
3034 (mark_set_resources): Likewise.
3035 * rtl.c (copy_rtx): Likewise.
3036 * rtlanal.c (reg_referenced_p): Likewise.
3037 (single_set_2): Likewise.
3038 (noop_move_p): Likewise.
3039 (note_stores): Likewise.
3040 * sched-deps.c (sched_analyze_reg): Likewise.
3041 (sched_analyze_insn): Likewise.
3042
3043 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3044
3045 * cse.c (invalidate_reg): New function extracted from...
3046 (invalidate): ...here.
3047 (canonicalize_insn): Check for clobber high.
3048 (invalidate_from_clobbers): invalidate clobber highs.
3049 (invalidate_from_sets_and_clobbers): Likewise.
3050 (count_reg_usage): Check for clobber high.
3051 (insn_live_p): Likewise.
3052 * cselib.c (cselib_expand_value_rtx_1):Likewise.
3053 (cselib_invalidate_regno): Check for clobber in setter.
3054 (cselib_invalidate_rtx): Pass through setter.
3055 (cselib_invalidate_rtx_note_stores):
3056 (cselib_process_insn): Check for clobber high.
3057 * cselib.h (cselib_invalidate_rtx): Add operand.
3058
3059 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3060
3061 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
3062 (mark_not_eliminable): Likewise.
3063 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
3064 * lra-lives.c (process_bb_lives): Check for clobber high.
3065 * lra.c (new_insn_reg): Remember clobber highs.
3066 (collect_non_operand_hard_regs): Check for clobber high.
3067 (lra_set_insn_recog_data): Likewise.
3068 (add_regs_to_insn_regno_info): Likewise.
3069 (lra_update_insn_regno_info): Likewise.
3070
3071 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3072
3073 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
3074 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
3075
3076 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3077
3078 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
3079 (copy_insn_1): Likewise.
3080 (gen_hard_reg_clobber_high): New gen function.
3081 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
3082 * genemit.c (gen_exp): Likewise.
3083 (gen_emit_seq): Pass through info.
3084 (gen_insn): Check for CLOBBER_HIGH.
3085 (gen_expand): Pass through info.
3086 (gen_split): Likewise.
3087 (output_add_clobbers): Likewise.
3088 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
3089 (remove_clobbers): Likewise.
3090 * rtl.h (gen_hard_reg_clobber_high): New declaration.
3091
3092 2018-08-06 Alan Hayward <alan.hayward@arm.com>
3093
3094 * doc/rtl.texi (clobber_high): Add.
3095 (parallel): Add in clobber high
3096 * rtl.c (rtl_check_failed_code3): Add function.
3097 * rtl.def (CLOBBER_HIGH): Add expression.
3098 * rtl.h (RTL_CHECKC3): Add macro.
3099 (rtl_check_failed_code3): Add declaration.
3100 (XC3EXP): Add macro.
3101
3102 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
3103
3104 PR target/86386
3105 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3106 cfun->machine->max_used_stack_alignment if needed.
3107
3108 2018-08-04 Martin Sebor <msebor@redhat.com>
3109
3110 PR tree-optimization/86571
3111 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3112 NaN output to 4.
3113
3114 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
3115
3116 PR target/86799
3117 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3118 Define.
3119
3120 2018-08-03 Jeff Law <law@redhat.com>
3121
3122 PR target/86795
3123 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3124 Define to speculation_safe_value_not_needed.
3125
3126 2018-08-03 David Malcolm <dmalcolm@redhat.com>
3127
3128 * doc/gcov.texi (-x): Remove duplicate "to".
3129 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3130 (-Wif-not-aligned): Remove duplicate "is".
3131 (-flto): Remove duplicate "the".
3132 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3133 duplicate "v5.00.b".
3134 (MSP430 Options): Remove duplicate "and" from the description
3135 of "-mgprel-sec=regexp".
3136 (x86 Options): Remove duplicate copies of "vmldLog102" and
3137 vmlsLog104 from description of "-mveclibabi=type".
3138
3139 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
3140
3141 * internal-fn.h (first_commutative_argument): Declare.
3142 * internal-fn.c (first_commutative_argument): New function.
3143 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3144 restrictions for pattern statements. Use first_commutative_argument
3145 to look for commutative operands in calls to internal functions.
3146
3147 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
3148
3149 * Makefile.in (wide-int-range.o): New.
3150 * tree-vrp.c: Move all the wide_int_* functions to...
3151 * wide-int-range.cc: ...here.
3152 * tree-vrp.h: Move all the wide_int_* prototypes to...
3153 * wide-int-range.h: ...here.
3154
3155 2018-08-03 Tom de Vries <tdevries@suse.de>
3156
3157 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3158 UI_NONE.
3159 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3160 * except.c (output_function_exception_table): Do early exit if
3161 targetm_common.except_unwind_info (&global_options) == UI_NONE.
3162
3163 2018-08-03 Martin Liska <mliska@suse.cz>
3164
3165 * predict.c (dump_prediction): Change to 2 digits
3166 in fraction part.
3167
3168 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3169
3170 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3171 neon_dup_q to...
3172 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3173
3174 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
3175
3176 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3177 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3178 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3179 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3180 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3181
3182 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3183
3184 * diagnostic-show-locus.c (diagnostic_show_locus): Use
3185 pp_take_prefix when saving the existing prefix.
3186 * diagnostic.c (diagnostic_append_note): Likewise.
3187 * langhooks.c (lhd_print_error_function): Likewise.
3188 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3189 param's type. Free the existing prefix.
3190 (pp_take_prefix): New function.
3191 (pretty_printer::pretty_printer): Drop the prefix parameter.
3192 Rename the length parameter to match the comment.
3193 (pretty_printer::~pretty_printer): Free the prefix.
3194 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3195 parameter.
3196 (struct pretty_printer): Drop the "const" from "prefix" field's
3197 type and clarify memory management.
3198 (pp_set_prefix): Drop the "const" from the 2nd param.
3199 (pp_take_prefix): New decl.
3200
3201 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3202
3203 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3204 for word_mode_ok here instead of passing as argument.
3205 (expand_block_compare): Change select_block_compare_mode() call.
3206 (expand_strncmp_gpr_sequence): New function.
3207 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3208
3209 2018-08-02 Jeff Law <law@redhat.com>
3210
3211 PR target/86790
3212 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3213 Define to speculation_safe_value_not_needed.
3214
3215 PR target/86784
3216 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3217 Define to speculation_safe_value_not_needed.
3218
3219 2018-08-02 Tom de Vries <tdevries@suse.de>
3220
3221 PR target/86660
3222 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3223 function. Return UI_TARGET unconditionally.
3224 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3225 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3226
3227 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3228
3229 * genemit.c (print_overload_test): Fix typo.
3230
3231 2018-08-02 Richard Biener <rguenther@suse.de>
3232
3233 PR tree-optimization/86816
3234 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3235 which checks for value availability before querying it.
3236 (gvn_uses_equal): Use it.
3237 (same_succ_hash): Likewise.
3238 (gimple_equal_p): Likewise.
3239
3240 2018-08-02 Nick Clifton <nickc@redhat.com>
3241
3242 PR target/86813
3243 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3244 Define to speculation_safe_value_not_needed.
3245
3246 PR target/86810
3247 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3248 Define to speculation_safe_value_not_needed.
3249
3250 PR target/86810
3251 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3252 Define to speculation_safe_value_not_needed.
3253
3254 PR target/86803
3255 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3256 Define to speculation_safe_value_not_needed.
3257
3258 PR target/86797
3259 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3260 Define to speculation_safe_value_not_needed.
3261
3262 PR target/86791
3263 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3264 Define to speculation_safe_value_not_needed.
3265
3266 PR target/86789
3267 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3268 Define to speculation_safe_value_not_needed.
3269
3270 PR target/86787
3271 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3272 Define to speculation_safe_value_not_needed.
3273
3274 PR target/86782
3275 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3276 speculation_safe_value_not_needed.
3277
3278 PR target/86781
3279 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3280 to speculation_safe_value_not_needed.
3281
3282 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3283
3284 * doc/md.texi: Expand the documentation of instruction names
3285 to mention port-local uses. Document '@' in pattern names.
3286 * read-md.h (overloaded_instance, overloaded_name): New structs.
3287 (mapping): Declare.
3288 (md_reader::handle_overloaded_name): New member function.
3289 (md_reader::get_overloads): Likewise.
3290 (md_reader::m_first_overload): New member variable.
3291 (md_reader::m_next_overload_ptr): Likewise.
3292 (md_reader::m_overloads_htab): Likewise.
3293 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3294 m_next_overload_ptr and m_overloads_htab.
3295 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3296 (get_mode_token, get_code_token, get_int_token): New functions.
3297 (map_attr_string): Add an optional argument that passes back
3298 the associated iterator.
3299 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3300 (md_reader::handle_overloaded_name, add_overload_instance): New
3301 functions.
3302 (apply_iterators): Handle '@' names. Report an error if '@'
3303 is used without iterators.
3304 (initialize_iterators): Initialize the new iterator_group fields.
3305 * genopinit.c (handle_overloaded_code_for)
3306 (handle_overloaded_gen): New functions.
3307 (main): Use them to print declarations of maybe_code_for_* and
3308 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3309 * genemit.c (print_overload_arguments, print_overload_test)
3310 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3311 (main): Use it to print definitions of maybe_code_for_* and
3312 maybe_gen_* functions.
3313 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3314 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3315 instead of explicit mode checks.
3316 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3317 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3318 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3319 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3320 (aarch64_expand_compare_and_swap): Likewise
3321 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3322 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3323 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3324 (aarch64_constant_pool_reload_icode): Delete.
3325 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3326 instead of aarch64_constant_pool_reload_icode. Use
3327 code_for_aarch64_reload_mov instead of explicit mode checks.
3328 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3329 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3330 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3331 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3332 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3333 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3334 (aarch64_atomic_load_op_code): Delete.
3335 (aarch64_emit_atomic_load_op): Likewise.
3336 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3337 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
3338 instead of aarch64_emit_atomic_load_op.
3339 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3340 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3341 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3342 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3343 character before the pattern name.
3344 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3345 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3346 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3347 (aarch64_frecps<mode>): Likewise.
3348 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3349 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3350 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3351 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3352 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3353
3354 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
3355
3356 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3357 Allow HFmode constants if TARGET_FP_F16INST.
3358
3359 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
3360
3361 PR target/86014
3362 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3363 No longer check last store for clobber of address register.
3364
3365 2018-08-02 Martin Liska <mliska@suse.cz>
3366
3367 PR gcov-profile/86817
3368 * gcov.c (process_all_functions): New function.
3369 (main): Call it.
3370 (process_file): Move functions processing to
3371 process_all_functions.
3372
3373 2018-08-02 David Malcolm <dmalcolm@redhat.com>
3374
3375 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3376 "const" to the "gimple *" and "rtx_insn *" parameters.
3377 * dumpfile.h (dump_user_location_t::dump_user_location_t):
3378 Likewise.
3379 (dump_location_t::dump_location_t): Likewise.
3380
3381 2018-08-01 Martin Sebor <msebor@redhat.com>
3382
3383 PR tree-optimization/86650
3384 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3385 rather than a "gcall *". Directly pass the data of interest
3386 to percent_K_format, rather than building a temporary CALL_EXPR
3387 to hold it.
3388 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3389 (gimple_fold_builtin_strncat): Adjust.
3390 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3391 gcall* argument with gimple*.
3392 * gimple-ssa-warn-restrict.c (check_call): Same.
3393 (wrestrict_dom_walker::before_dom_children): Same.
3394 (builtin_access::builtin_access): Same.
3395 (check_bounds_or_overlap): Same
3396 (maybe_diag_overlap): Same.
3397 (maybe_diag_offset_bounds): Same.
3398 * tree-diagnostic.c (default_tree_printer): Move usage of
3399 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3400 to this callsite.
3401 * tree-pretty-print.c (percent_K_format): Add argument.
3402 * tree-pretty-print.h: Add argument.
3403 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3404 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3405 (maybe_diag_stxncpy_trunc): Same.
3406 (handle_builtin_stxncpy): Same.
3407 (handle_builtin_strcat): Same.
3408
3409 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3410
3411 * match.pd: Optimise pointer range checks.
3412
3413 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3414
3415 PR tree-optimization/86758
3416 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3417 to remove pattern statements.
3418
3419 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3420
3421 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3422 result of dfs_enumerate_from when constructing stmt_vec_infos,
3423 instead of additionally calling get_loop_body.
3424
3425 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3426
3427 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3428 parameter.
3429 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3430 When creating an iv, assert that the step is not known to be zero.
3431 (vect_setup_realignment): Update call accordingly.
3432 * tree-vect-stmts.c (vectorizable_store): Likewise.
3433 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
3434
3435 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3436
3437 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3438 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3439 (vectorizable_reduction): Likewise.
3440 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3441 (vect_detect_hybrid_slp_stmts): Likewise.
3442 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3443
3444 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
3445
3446 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3447 (wide_int_set_zero_nonzero_bits): ...this.
3448 (zero_nonzero_bits_from_vr): Rename to...
3449 (vrp_set_zero_nonzero_bits): ...this.
3450 (extract_range_from_multiplicative_op_1): Abstract wide int
3451 code...
3452 (wide_int_range_multiplicative_op): ...here.
3453 (extract_range_from_binary_expr_1): Extract wide int binary
3454 operations into their own functions.
3455 (wide_int_range_lshift): New.
3456 (wide_int_range_can_optimize_bit_op): New.
3457 (wide_int_range_shift_undefined_p): New.
3458 (wide_int_range_bit_xor): New.
3459 (wide_int_range_bit_ior): New.
3460 (wide_int_range_bit_and): New.
3461 (wide_int_range_trunc_mod): New.
3462 (extract_range_into_wide_ints): New.
3463 (vrp_shift_undefined_p): New.
3464 (extract_range_from_multiplicative_op): New.
3465 (vrp_can_optimize_bit_op): New.
3466 * tree-vrp.h (value_range::dump): New.
3467 (wide_int_range_multiplicative_op): New.
3468 (wide_int_range_lshift):New.
3469 (wide_int_range_shift_undefined_p): New.
3470 (wide_int_range_bit_xor): New.
3471 (wide_int_range_bit_ior): New.
3472 (wide_int_range_bit_and): New.
3473 (wide_int_range_trunc_mod): New.
3474 (zero_nonzero_bits_from_bounds): Rename to...
3475 (wide_int_set_zero_nonzero_bits): ...this.
3476 (zero_nonzero_bits_from_vr): Rename to...
3477 (vrp_set_zero_nonzero_bits): ...this.
3478 (range_easy_mask_min_max): Rename to...
3479 (wide_int_range_can_optimize_bit_op): this.
3480 * vr-values.c (simplify_bit_ops_using_ranges): Rename
3481 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3482
3483 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3484
3485 * tree-vectorizer.h (vect_orig_stmt): New function.
3486 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3487 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3488 (vect_create_epilog_for_reduction): Likewise.
3489 (vectorizable_live_operation): Likewise.
3490 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3491 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3492 * tree-vect-stmts.c (vectorizable_call): Likewise.
3493 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3494
3495 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3496
3497 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3498 argument.
3499 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3500 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3501 (vect_transform_loop): Likewise.
3502 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3503
3504 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3505
3506 * tree-vectorizer.h (vect_schedule_slp): Return void.
3507 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3508 (vect_schedule_slp): Likewise.
3509
3510 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3511
3512 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3513 argument.
3514 (vect_transform_loop): Update calls accordingly. Schedule SLP
3515 instances before the main loop, if any exist.
3516
3517 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
3518
3519 PR tree-optimization/86749
3520 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3521 If the lhs is used in a COND_EXPR, check that it is being used
3522 as the "then" or "else" value.
3523
3524 2018-08-01 Tom de Vries <tdevries@suse.de>
3525
3526 PR target/86800
3527 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3528 speculation_safe_value_not_needed.
3529
3530 2018-08-01 Richard Biener <rguenther@suse.de>
3531
3532 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3533 as base and offset.
3534
3535 2018-08-01 Martin Liska <mliska@suse.cz>
3536
3537 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3538 format how successful transformation is dumped.
3539 (gimple_mod_pow2_value_transform): Likewise.
3540 (gimple_mod_subtract_transform): Likewise.
3541 (gimple_stringops_transform): Likewise.
3542
3543 2018-08-01 Martin Liska <mliska@suse.cz>
3544
3545 PR value-prof/35543
3546 * value-prof.c (interesting_stringop_to_profile_p):
3547 Simplify the code and add BUILT_IN_MEMMOVE.
3548 (gimple_stringops_transform): Likewise.
3549
3550 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
3551
3552 * config/aarch64/aarch64-simd.md
3553 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3554 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3555 use GPI iterator instead of SI mode.
3556
3557 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3558
3559 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3560 rs6000_speculation_barrier.
3561 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3562 new barrier pattern name.
3563
3564 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
3565
3566 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3567 (speculation_barrier): New insn.
3568
3569 2018-08-01 Richard Biener <rguenther@suse.de>
3570
3571 PR bootstrap/86724
3572 * graphite.h: Include isl/id.h and isl/space.h to allow build
3573 with ISL 0.20.
3574
3575 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3576
3577 PR target/86651
3578 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3579 mode for COFF targets.
3580 * defaults.h (TARGET_COFF): Define.
3581 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3582 TARGET_COFF): Define.
3583 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3584 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3585 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3586
3587 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3588
3589 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3590 * gimple-streamer-out.c (output_bb): Save it.
3591 * lto-streamer-in.c (input_struct_function_base): Restore
3592 instance discriminator if available. Create map on demand.
3593 * lto-streamer-out.c (output_struct_function_base): Save it if
3594 available.
3595 * final.c (decl_to_instance_map): Document LTO strategy.
3596
3597 2018-07-31 Alexandre Oliva <oliva@adacore.com>
3598 Olivier Hainque <hainque@adacore.com>
3599
3600 * debug.h (decl_to_instance_map_t): New type.
3601 (decl_to_instance_map): Declare.
3602 (maybe_create_decl_to_instance_map): New inline function.
3603 * final.c (bb_discriminator, last_bb_discriminator): New statics,
3604 to track basic block discriminators.
3605 (final_start_function_1): Initialize them.
3606 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3607 bb_discriminator.
3608 (decl_to_instance_map): New variable.
3609 (map_decl_to_instance, maybe_set_discriminator): New functions.
3610 (notice_source_line): Set discriminator.
3611
3612 2018-07-31 Ian Lance Taylor <iant@golang.org>
3613
3614 * targhooks.c (default_have_speculation_safe_value): Add
3615 ATTRIBUTE_UNUSED.
3616
3617 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3618
3619 * dump-context.h: Include "pretty-print.h".
3620 (dump_context::refresh_dumps_are_enabled): New decl.
3621 (dump_context::emit_item): New decl.
3622 (class dump_context): Add fields "m_test_pp" and
3623 "m_test_pp_flags".
3624 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3625 (temp_dump_context::get_dumped_text): New decl.
3626 (class temp_dump_context): Add field "m_pp".
3627 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3628 (dump_context::refresh_dumps_are_enabled): ...and add a test for
3629 m_test_pp.
3630 (set_dump_file): Update for above change.
3631 (set_alt_dump_file): Likewise.
3632 (dump_loc): New overload, taking a pretty_printer *.
3633 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
3634 to any test pretty-printer.
3635 (make_item_for_dump_gimple_stmt): New function, adapted from
3636 optinfo::add_gimple_stmt.
3637 (dump_context::dump_gimple_stmt): Call it, and use the result,
3638 eliminating the direct usage of dump_file and alt_dump_file in
3639 favor of indirectly using them via emit_item.
3640 (make_item_for_dump_gimple_expr): New function, adapted from
3641 optinfo::add_gimple_expr.
3642 (dump_context::dump_gimple_expr): Call it, and use the result,
3643 eliminating the direct usage of dump_file and alt_dump_file in
3644 favor of indirectly using them via emit_item.
3645 (make_item_for_dump_generic_expr): New function, adapted from
3646 optinfo::add_tree.
3647 (dump_context::dump_generic_expr): Call it, and use the result,
3648 eliminating the direct usage of dump_file and alt_dump_file in
3649 favor of indirectly using them via emit_item.
3650 (make_item_for_dump_printf_va): New function, adapted from
3651 optinfo::add_printf_va.
3652 (make_item_for_dump_printf): New function.
3653 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3654 and use the result, eliminating the direct usage of dump_file and
3655 alt_dump_file in favor of indirectly using them via emit_item.
3656 (make_item_for_dump_dec): New function.
3657 (dump_context::dump_dec): Call it, and use the result,
3658 eliminating the direct usage of dump_file and alt_dump_file in
3659 favor of indirectly using them via emit_item.
3660 (make_item_for_dump_symtab_node): New function, adapted from
3661 optinfo::add_symtab_node.
3662 (dump_context::dump_symtab_node): Call it, and use the result,
3663 eliminating the direct usage of dump_file and alt_dump_file in
3664 favor of indirectly using them via emit_item.
3665 (dump_context::begin_scope): Reimplement, avoiding direct usage
3666 of dump_file and alt_dump_file in favor of indirectly using them
3667 via emit_item.
3668 (dump_context::emit_item): New member function.
3669 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3670 Set up test pretty-printer on the underlying context. Call
3671 refresh_dumps_are_enabled.
3672 (temp_dump_context::~temp_dump_context): Call
3673 refresh_dumps_are_enabled.
3674 (temp_dump_context::get_dumped_text): New member function.
3675 (selftest::verify_dumped_text): New function.
3676 (ASSERT_DUMPED_TEXT_EQ): New macro.
3677 (selftest::test_capture_of_dump_calls): Run all tests twice, with
3678 and then without optinfo enabled. Add uses of
3679 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
3680 * dumpfile.h: Update comment for the dump_* API.
3681 * optinfo-emit-json.cc
3682 (selftest::test_building_json_from_dump_calls): Update for new
3683 param for temp_dump_context ctor.
3684 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3685 and "m_owned" field.
3686 (optinfo_item::~optinfo_item): Likewise.
3687 (optinfo::add_item): New member function.
3688 (optinfo::emit): Update comment.
3689 (optinfo::add_string): Delete.
3690 (optinfo::add_printf): Delete.
3691 (optinfo::add_printf_va): Delete.
3692 (optinfo::add_gimple_stmt): Delete.
3693 (optinfo::add_gimple_expr): Delete.
3694 (optinfo::add_tree): Delete.
3695 (optinfo::add_symtab_node): Delete.
3696 (optinfo::add_dec): Delete.
3697 * optinfo.h (class dump_context): New forward decl.
3698 (optinfo::add_item): New decl.
3699 (optinfo::add_string): Delete.
3700 (optinfo::add_printf): Delete.
3701 (optinfo::add_printf_va): Delete.
3702 (optinfo::add_gimple_stmt): Delete.
3703 (optinfo::add_gimple_expr): Delete.
3704 (optinfo::add_tree): Delete.
3705 (optinfo::add_symtab_node): Delete.
3706 (optinfo::add_dec): Delete.
3707 (optinfo::add_poly_int): Delete.
3708 (optinfo_item::optinfo_item): Remove "owned" param.
3709 (class optinfo_item): Remove field "m_owned".
3710
3711 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3712
3713 PR middle-end/86705
3714 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3715 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3716 requested variable alignment.
3717 (expand_one_ssa_partition): Likewise.
3718 (expand_one_var): Likewise.
3719
3720 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3721
3722 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3723 to speculation_safe_value_not_needed.
3724
3725 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3726
3727 * targhooks.h (speculation_safe_value_not_needed): New prototype.
3728 * targhooks.c (speculation_safe_value_not_needed): New function.
3729 * target.def (have_speculation_safe_value): Update documentation.
3730 * doc/tm.texi: Regenerated.
3731
3732 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3733
3734 * config/aarch64/iterators.md (ALLI_TI): New iterator.
3735 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3736 expand.
3737 (despeculate_copy<ALLI:mode>_insn): New insn.
3738 (despeculate_copyti_insn): New insn.
3739 (despeculate_simple<ALLI:mode>): New insn
3740 (despeculate_simpleti): New insn.
3741 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3742 function.
3743 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3744 aarch64_speculation_safe_value.
3745 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3746
3747 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3748
3749 * config/aarch64/aarch64-speculation.cc: New file.
3750 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3751 before pass_reorder_blocks.
3752 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3753 prototype.
3754 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3755 X14 and X15 when tracking speculation.
3756 * config/aarch64/aarch64.md (register name constants): Add
3757 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3758 (unspec): Add UNSPEC_SPECULATION_TRACKER.
3759 (speculation_barrier): New insn attribute.
3760 (cmp<mode>): Allow SP in comparisons.
3761 (speculation_tracker): New insn.
3762 (speculation_barrier): Add speculation_barrier attribute.
3763 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3764 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3765 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3766
3767 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3768
3769 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3770 aarch64_track_speculation is true.
3771 (tb<optab><mode>1): Likewise.
3772 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3773 generate CB[N]Z when tracking speculation.
3774 (aarch64_split_compare_and_swap): Likewise.
3775 (aarch64_split_atomic_op): Likewise.
3776
3777 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3778
3779 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3780
3781 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3782
3783 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3784 (speculation_barrier): New insn.
3785
3786 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3787
3788 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3789 * config/arm/arm.md (speculation_barrier): New expand.
3790 (speculation_barrier_insn): New pattern.
3791
3792 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3793
3794 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3795 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3796 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3797 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3798 list.
3799 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3800 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3801 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3802 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3803 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3804 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3805 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3806 * builtins.c (expand_speculation_safe_value): New function.
3807 (expand_builtin): Call it.
3808 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3809 * doc/extend.texi: Document __builtin_speculation_safe_value.
3810 * doc/md.texi: Document "speculation_barrier" pattern.
3811 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3812 TARGET_HAVE_SPECULATION_SAFE_VALUE.
3813 * doc/tm.texi: Regenerated.
3814 * target.def (have_speculation_safe_value, speculation_safe_value): New
3815 hooks.
3816 * targhooks.c (default_have_speculation_safe_value): New function.
3817 (default_speculation_safe_value): New function.
3818 * targhooks.h (default_have_speculation_safe_value): Add prototype.
3819 (default_speculation_safe_value): Add prototype.
3820
3821 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3822
3823 * dump-context.h (dump_context::dump_loc): New decl.
3824 * dumpfile.c (dump_context::dump_loc): New member function.
3825 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3826 and dump_gimple_stmt.
3827 (dump_context::dump_gimple_expr_loc): Likewise, using
3828 dump_gimple_expr.
3829 (dump_context::dump_generic_expr_loc): Likewise, using
3830 dump_generic_expr.
3831 (dump_context::dump_printf_loc_va): Likewise, using
3832 dump_printf_va.
3833 (dump_context::begin_scope): Explicitly using the global function
3834 "dump_loc", rather than the member function.
3835
3836 2018-07-31 Martin Sebor <msebor@redhat.com>
3837
3838 PR tree-optimization/86741
3839 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3840
3841 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
3842
3843 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3844 depend on whether prefetch instructions will be emitted or not.
3845 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3846 will be emitted or not.
3847 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3848 (TARGET_SETMEM_PFD): New macros.
3849
3850 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3851
3852 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3853 (NULL_STMT_VEC_INFO): Delete.
3854 (stmt_vec_info::operator*): Likewise.
3855 (stmt_vec_info::operator gimple *): Likewise.
3856 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3857 of NULL_STMT_VEC_INFO.
3858 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3859 (vect_reassociating_reduction_p): Likewise.
3860 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3861 (vectorizable_store): Likewise.
3862 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3863 (vec_info::free_stmt_vec_infos): Likewise.
3864
3865 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3866
3867 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3868 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3869
3870 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3871
3872 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3873 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3874 (vec_info::free_stmt_vec_info): New private member functions.
3875 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3876 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3877 * tree-parloops.c (gather_scalar_reductions): Remove calls to
3878 set_stmt_vec_info_vec and free_stmt_vec_infos.
3879 * tree-vect-loop.c (_loop_vec_info): Remove call to
3880 set_stmt_vec_info_vec.
3881 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3882 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3883 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3884 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3885 (vec_info::free_stmt_vec_info): ...these new functions. Remove
3886 assignments in {vec_info::,}new_stmt_vec_info that are redundant
3887 with the clearing in the xcalloc.
3888 (stmt_vec_info_vec): Delete.
3889 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3890 (vectorize_loops): Likewise.
3891 (vec_info::~vec_info): Remove argument from call to
3892 free_stmt_vec_infos.
3893 (vec_info::add_stmt): Remove vinfo argument from call to
3894 new_stmt_vec_info.
3895
3896 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3897
3898 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3899 rather than a gimple stmt.
3900 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
3901 information for pattern statements when passed the original
3902 statement; instead wait to be passed the pattern statement itself.
3903 Don't call set_vinfo_for_stmt here.
3904 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3905 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3906 stmt_vec_infos here.
3907 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3908 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3909 stmt_vec_infos entry.
3910
3911 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3912
3913 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3914 * tree-vectorizer.c (vec_info::replace_stmt): New function.
3915 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3916 * tree-vect-stmts.c (vectorizable_call): Likewise.
3917 (vectorizable_simd_clone_call): Likewise.
3918
3919 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3920
3921 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3922 * tree-vectorizer.c (vec_info::remove_stmt): New function.
3923 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3924 * tree-vect-loop.c (vect_transform_loop): Likewise.
3925 * tree-vect-slp.c (vect_schedule_slp): Likewise.
3926 * tree-vect-stmts.c (vect_remove_stores): Likewise.
3927
3928 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3929
3930 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3931 (vect_dr_stmt): Delete.
3932 * tree-vectorizer.c (vec_info::lookup_dr): New function.
3933 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3934 of DR_VECT_AUX.
3935 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3936 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3937 (vect_verify_datarefs_alignment, vect_peeling_supportable)
3938 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3939 (vect_analyze_data_refs): Likewise.
3940 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
3941 argument.
3942 (vect_find_same_alignment_drs): Likewise.
3943 (vect_slp_analyze_node_dependences): Update calls accordingly.
3944 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3945 instead of DR_VECT_AUX.
3946 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3947 of a vector data references. Use vec_info::lookup_dr instead of
3948 DR_VECT_AUX.
3949 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3950 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
3951 instead of DR_VECT_AUX.
3952
3953 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3954
3955 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3956 dr_vec_info.
3957 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3958 accordingly.
3959 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3960 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3961 (vect_gen_prolog_loop_niters): Likewise.
3962
3963 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3964
3965 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3966 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3967 (vect_known_alignment_in_bytes, vect_dr_behavior)
3968 (vect_get_scalar_dr_size): Take references as dr_vec_infos
3969 instead of data_references. Update calls to other routines for
3970 which the same change has been made.
3971 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3972 dr_vec_infos instead of stmt_vec_infos.
3973 (vect_analyze_data_ref_dependence): Update call accordingly.
3974 (vect_slp_analyze_data_ref_dependence)
3975 (vect_record_base_alignments): Use DR_VECT_AUX.
3976 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3977 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3978 (vector_alignment_reachable_p, vect_get_data_access_cost)
3979 (vect_peeling_supportable, vect_analyze_group_access_1)
3980 (vect_analyze_group_access, vect_analyze_data_ref_access)
3981 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3982 (vect_compile_time_alias, vect_small_gap_p)
3983 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3984 (vect_supportable_dr_alignment): Take references as dr_vec_infos
3985 instead of data_references. Update calls to other routines for
3986 which the same change has been made.
3987 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3988 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3989 (vect_slp_analyze_and_verify_node_alignment)
3990 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3991 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3992 (vect_setup_realignment): Use dr_vec_infos. Update calls after
3993 above changes.
3994 (_vect_peel_info::dr): Replace with...
3995 (_vect_peel_info::dr_info): ...this new field.
3996 (vect_peeling_hash_get_most_frequent)
3997 (vect_peeling_hash_choose_best_peeling): Update accordingly.
3998 (vect_peeling_hash_get_lowest_cost):
3999 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
4000 routines for which the same change has been made.
4001 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
4002 data_reference.
4003 * tree-vect-loop-manip.c (get_misalign_in_elems)
4004 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
4005 above changes.
4006 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4007 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
4008 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
4009 (get_group_load_store_type, get_negative_load_store_type)
4010 (vect_get_data_ptr_increment, vectorizable_store)
4011 (vectorizable_load): Likewise.
4012 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
4013 Update calls to other routines for which the same change has been made.
4014
4015 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4016
4017 * tree-vectorizer.h (vec_info::move_dr): New member function.
4018 (dataref_aux): Rename to...
4019 (dr_vec_info): ...this and add "dr" and "stmt" fields.
4020 (_stmt_vec_info::dr_aux): Update accordingly.
4021 (_stmt_vec_info::data_ref_info): Delete.
4022 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
4023 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
4024 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
4025 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
4026 of data_ref.
4027 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
4028 (STMT_VINFO_DR_INFO): New macro.
4029 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
4030 (set_dr_misalignment): Update after rename of dataref_aux.
4031 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
4032 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
4033 initialization of STMT_VINFO_DATA_REF.
4034 * tree-vectorizer.c (vec_info::move_dr): New function.
4035 * tree-vect-patterns.c (vect_recog_bool_pattern)
4036 (vect_recog_mask_conversion_pattern)
4037 (vect_recog_gather_scatter_pattern): Use it.
4038 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
4039 the "dr" and "stmt" fields of dr_vec_info instead of
4040 STMT_VINFO_DATA_REF.
4041
4042 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4043
4044 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
4045 (is_pattern_stmt_p): Use it.
4046 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
4047 on pattern statements.
4048
4049 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4050
4051 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
4052 original stmt as a stmt_vec_info rather than a gimple stmt.
4053 (vect_pattern_recog_1): Take the statement directly as a
4054 stmt_vec_info, rather than via a gimple_stmt_iterator.
4055 Update call to vect_mark_pattern_stmts.
4056 (vect_pattern_recog): Update calls accordingly.
4057
4058 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4059
4060 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
4061 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
4062 a vect_def_type for the first argument.
4063 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
4064 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
4065 operand if it isn't defined by a vectorized statement.
4066 (vect_build_gather_load_calls): Remove the mask_dt argument and
4067 update calls to vect_get_vec_def_for_stmt_copy.
4068 (vectorizable_bswap): Likewise the dt argument.
4069 (vectorizable_call): Update calls to vectorizable_bswap and
4070 vect_get_vec_def_for_stmt_copy.
4071 (vectorizable_simd_clone_call, vectorizable_assignment)
4072 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
4073 (vectorizable_comparison): Update calls to
4074 vect_get_vec_def_for_stmt_copy.
4075 (vectorizable_store): Likewise. Remove now-unnecessary calls to
4076 vect_is_simple_use.
4077 (vect_get_loop_based_defs): Remove dt argument and update call
4078 to vect_get_vec_def_for_stmt_copy.
4079 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
4080 and vect_get_vec_def_for_stmt_copy.
4081 (vectorizable_load): Update calls to vect_build_gather_load_calls
4082 and vect_get_vec_def_for_stmt_copy.
4083 * tree-vect-loop.c (vect_create_epilog_for_reduction)
4084 (vectorizable_reduction, vectorizable_live_operation): Update calls
4085 to vect_get_vec_def_for_stmt_copy.
4086
4087 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4088
4089 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4090 and gimple stmt arguments with a stmt_vec_info.
4091 (vect_record_base_alignments): Update calls accordingly.
4092 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4093 and gimple stmt arguments with a stmt_vec_info.
4094 (vect_build_slp_tree_1): Remove vinfo argument and update call
4095 to vect_record_max_nunits.
4096 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4097 and vect_record_max_nunits.
4098
4099 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4100
4101 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4102 file and take a stmt_vec_info instead of a gimple stmt.
4103 (supportable_widening_operation, vect_finish_replace_stmt)
4104 (vect_finish_stmt_generation, vect_get_store_rhs)
4105 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4106 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4107 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4108 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4109 (vect_create_data_ref_ptr, bump_vector_ptr)
4110 (vect_permute_store_chain, vect_setup_realignment)
4111 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4112 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4113 (vectorizable_reduction, vectorizable_induction)
4114 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4115 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4116 than gimple stmts as arguments.
4117 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4118 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4119 (can_group_stmts_p, vect_check_gather_scatter)
4120 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4121 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4122 (vect_permute_load_chain, vect_shift_permute_load_chain)
4123 (vect_transform_grouped_load)
4124 (vect_record_grouped_load_vectors): Likewise.
4125 * tree-vect-loop.c (vect_fixup_reduc_chain)
4126 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4127 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4128 (vectorizable_reduction, vectorizable_induction)
4129 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4130 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4131 (vect_get_load_store_mask): Likewise.
4132 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4133 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4134 * tree-vect-stmts.c (vect_mark_relevant)
4135 (is_simple_and_all_uses_invariant)
4136 (exist_non_indexing_operands_for_use_p, process_use)
4137 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4138 (vect_get_vec_def_for_operand, vect_get_vec_defs)
4139 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4140 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4141 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4142 (get_negative_load_store_type, get_load_store_type)
4143 (vect_check_load_store_mask, vect_check_store_rhs)
4144 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4145 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4146 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4147 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4148 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4149 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4150 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4151 (supportable_widening_operation): Likewise.
4152
4153 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4154
4155 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4156 a stmt_vec_info instead of a gcall.
4157 (vect_check_gather_scatter): Update call accordingly.
4158 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4159 of a gphi.
4160 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4161 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4162 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4163 instead of a gimple stmt.
4164 (vect_transform_loop): Update calls accordingly.
4165 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4166 stmt_vec_infos instead of gimple stmts.
4167 (vect_analyze_slp_instance): Update use accordingly.
4168 * tree-vect-stmts.c (read_vector_array, write_vector_array)
4169 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4170 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4171 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4172 (vect_gen_widened_results_half, vect_get_loop_based_defs)
4173 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4174 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4175 down to subroutines.
4176
4177 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4178
4179 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4180 of the worklist from a vector of gimple stmts to a vector of
4181 stmt_vec_infos.
4182 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4183 (vect_mark_stmts_to_be_vectorized): Likewise
4184
4185 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4186
4187 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4188 statement before passing it to vect_analyze_stmt.
4189 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4190 the chain of phi vector definitions. Track the exit phi via its
4191 stmt_vec_info.
4192 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4193 STMT_VINFO_REDUC_DEF.
4194 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4195 stmt_vec_infos to handle the statement chains.
4196 (vect_get_slp_defs): Record the first statement in the node
4197 using a stmt_vec_info.
4198 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4199 statements here and pass their stmt_vec_info down to subroutines.
4200 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4201 down to vect_finish_stmt_generation.
4202 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4203 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4204 stmt_vec_infos to subroutines.
4205 (vect_remove_stores): Use stmt_vec_infos to handle the statement
4206 chains.
4207
4208 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4209
4210 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4211 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4212 (vect_permute_store_chain, vect_setup_realignment)
4213 (vect_permute_load_chain, vect_shift_permute_load_chain)
4214 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4215 stmts internally, and when passing values to other vectorizer routines.
4216 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4217 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4218 (vect_analyze_loop_operations, get_initial_def_for_reduction)
4219 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4220 (vectorizable_reduction, vectorizable_induction)
4221 (vectorizable_live_operation, vect_transform_loop_stmt)
4222 (vect_transform_loop): Likewise.
4223 * tree-vect-patterns.c (vect_reassociating_reduction_p)
4224 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4225 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4226 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4227 (vect_slp_analyze_node_operations_1): Likewise.
4228 * tree-vect-stmts.c (vect_mark_relevant, process_use)
4229 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4230 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4231 (vect_finish_stmt_generation_1, get_group_load_store_type)
4232 (get_load_store_type, vect_build_gather_load_calls)
4233 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4234 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4235 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4236 (vectorizable_store, vectorizable_load, vectorizable_condition)
4237 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4238 (supportable_widening_operation): Likewise.
4239 (vect_get_vector_types_for_stmt): Likewise.
4240 * tree-vectorizer.h (vect_dr_behavior): Likewise.
4241
4242 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4243
4244 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4245 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4246 (vect_permute_store_chain, vect_permute_load_chain)
4247 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4248 repeated stmt_vec_info lookups.
4249 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4250 (vect_update_ivs_after_vectorizer): Likewise.
4251 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4252 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4253 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4254 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4255 (vect_bb_slp_scalar_cost): Likewise.
4256 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4257
4258 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4259
4260 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4261 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4262 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4263 to get gassigns and gcalls, rather than operating on generc gimple
4264 stmts.
4265 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4266 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4267 (vectorizable_load, vect_analyze_stmt): Likewise.
4268 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4269
4270 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4271
4272 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4273 return stmt_vec_infos rather than gimple stmts. Do not accept
4274 null arguments.
4275 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4276 of a gimple stmt.
4277 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4278 Update use of get_later_stmt.
4279 (vect_get_constant_vectors): Update call accordingly.
4280 (vect_schedule_slp_instance): Likewise
4281 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4282 (vect_slp_analyze_instance_dependence): Likewise.
4283 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4284
4285 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4286
4287 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4288 (stmt_info_for_cost::stmt_info): ...this new field.
4289 (add_stmt_costs): Update accordingly.
4290 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4291 (vect_get_known_peeling_cost): Likewise.
4292 (vect_estimate_min_profitable_iters): Likewise.
4293 * tree-vect-stmts.c (record_stmt_cost): Likewise.
4294
4295 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4296
4297 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4298 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4299 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4300 accordingly.
4301 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4302
4303 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4304
4305 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4306 a gimple stmt to a stmt_vec_info.
4307 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4308
4309 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4310
4311 * tree-vectorizer.h (vec_info::grouped_stores): Change from
4312 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4313 (_loop_vec_info::reduction_chains): Likewise.
4314 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4315 accordingly.
4316 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4317
4318 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4319
4320 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4321 a gimple stmt to a stmt_vec_info.
4322 (_stmt_vec_info::next_element): Likewise.
4323 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4324 (vect_slp_analyze_and_verify_node_alignment)
4325 (vect_analyze_group_access_1, vect_analyze_group_access)
4326 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4327 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4328 (vect_supportable_dr_alignment): Update accordingly.
4329 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4330 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4331 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4332 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4333 * tree-vect-slp.c (vect_build_slp_tree_1)
4334 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4335 (vect_split_slp_store_group, vect_analyze_slp_instance)
4336 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4337 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4338 (get_group_load_store_type, get_load_store_type)
4339 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4340 (vect_transform_stmt, vect_remove_stores): Likewise.
4341
4342 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4343
4344 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4345 than a gimple stmt.
4346 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4347 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4348 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4349 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4350 (vector_alignment_reachable_p, vect_get_data_access_cost)
4351 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4352 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4353 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4354 (vect_analyze_group_access_1, vect_analyze_group_access)
4355 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4356 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4357 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4358 result of vect_dr_stmt and use the stmt_vec_info instead of
4359 the associated gimple stmt.
4360 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4361 (vect_gen_prolog_loop_niters): Likewise.
4362 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4363
4364 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4365
4366 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4367 to a vec<stmt_vec_info>.
4368 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4369 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4370 vec<stmt_vec_info>.
4371 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4372 to a vec<stmt_vec_info>.
4373 (bst_traits::value_type, bst_traits::value_type): Likewise.
4374 (bst_traits::hash): Update accordingly.
4375 (vect_get_and_check_slp_defs): Change the stmts parameter from
4376 a vec<gimple *> to a vec<stmt_vec_info>.
4377 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4378 (vect_build_slp_tree): Likewise.
4379 (vect_build_slp_tree_2): Likewise. Update uses of
4380 SLP_TREE_SCALAR_STMTS.
4381 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4382 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4383 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4384 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4385 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4386 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4387 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4388 (vect_get_constant_vectors, vect_get_slp_defs)
4389 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4390 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4391 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4392 instead of gimple stmts.
4393 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4394 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4395 (vect_slp_analyze_instance_dependence): Update uses of
4396 SLP_TREE_SCALAR_STMTS.
4397 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4398 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4399 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4400 (get_initial_defs_for_reduction): Likewise.
4401 (vect_create_epilog_for_reduction): Likewise.
4402 (vectorize_fold_left_reduction): Likewise.
4403 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4404 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4405 (can_vectorize_live_stmts): Likewise.
4406
4407 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4408
4409 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4410 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4411 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4412 than gimple stmts.
4413 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4414 of a gimple stmt.
4415 (gather_scalar_reductions): Update after above interface changes.
4416 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4417 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4418 than gimple stmts.
4419 (vect_force_simple_reduction): Likewise.
4420 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4421 LOOP_VINFO_REDUCTIONS.
4422 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4423
4424 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4425
4426 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4427 a gimple stmt to a stmt_vec_info.
4428 * tree-vect-loop.c (vect_active_double_reduction_p)
4429 (vect_force_simple_reduction, vectorizable_reduction): Update
4430 accordingly.
4431
4432 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4433
4434 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4435 vec<gimple *> to a vec<stmt_vec_info>.
4436 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4437 the reduction_phis argument from a vec<gimple *> to a
4438 vec<stmt_vec_info>.
4439 (vectorizable_reduction): Likewise the phis local variable that
4440 is passed to vect_create_epilog_for_reduction. Update for new type
4441 of SLP_TREE_VEC_STMTS.
4442 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4443 (vectorizable_live_operation): Likewise.
4444 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4445 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4446
4447 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4448
4449 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4450 a gimple stmt to a stmt_vec_info.
4451 (vectorizable_condition, vectorizable_live_operation)
4452 (vectorizable_reduction, vectorizable_induction): Pass back the
4453 vectorized statement as a stmt_vec_info.
4454 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4455 use of STMT_VINFO_VEC_STMT.
4456 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4457 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4458 as stmt_vec_infos rather than gimple stmts.
4459 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4460 to a stmt_vec_info.
4461 (vectorizable_live_operation): Likewise.
4462 (vectorizable_reduction, vectorizable_induction): Likewise,
4463 updating use of STMT_VINFO_VEC_STMT.
4464 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4465 of STMT_VINFO_VEC_STMT.
4466 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4467 (vectorizable_simd_clone_call, vectorizable_conversion)
4468 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4469 (vectorizable_store, vectorizable_load, vectorizable_condition)
4470 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4471 from a gimple stmt to a stmt_vec_info.
4472 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
4473 pointer to a stmt_vec_info to the vectorizable_* routines.
4474
4475 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4476
4477 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4478 a gimple stmt to a stmt_vec_info.
4479 (is_pattern_stmt_p): Update accordingly.
4480 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4481 (vect_record_grouped_load_vectors): Likewise.
4482 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4483 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4484 (vect_model_reduction_cost): Likewise.
4485 (vect_create_epilog_for_reduction): Likewise.
4486 (vectorizable_reduction, vectorizable_induction): Likewise.
4487 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4488 Return the stmt_vec_info for the pattern statement.
4489 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4490 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4491 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4492 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4493 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4494 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4495 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4496 (free_stmt_vec_info, vect_is_simple_use): Likewise.
4497
4498 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4499
4500 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4501 (vect_finish_stmt_generation): Likewise.
4502 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4503 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4504 (vect_build_gather_load_calls): Use the return value of the above
4505 functions instead of a separate call to vinfo_for_stmt. Use narrow
4506 scopes for the input gimple stmt and wider scopes for the associated
4507 stmt_vec_info. Use vec_info::lookup_def when setting these
4508 stmt_vec_infos from an SSA_NAME definition.
4509 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4510 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4511 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4512 (vectorizable_store, vectorizable_load, vectorizable_condition)
4513 (vectorizable_comparison): Likewise.
4514 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4515 (vectorizable_reduction): Likewise.
4516
4517 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4518
4519 * tree-vectorizer.h (vect_is_simple_use): Add an optional
4520 stmt_vec_info * parameter before the optional gimple **.
4521 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4522 (process_use, vect_get_vec_def_for_operand_1): Update callers.
4523 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4524 * tree-vect-loop.c (vectorizable_reduction): Likewise.
4525 (vectorizable_live_operation): Likewise.
4526 * tree-vect-patterns.c (type_conversion_p): Likewise.
4527 (vect_look_through_possible_promotion): Likewise.
4528 (vect_recog_rotate_pattern): Likewise.
4529 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4530
4531 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4532
4533 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4534 a typedef to a wrapper class.
4535 (NULL_STMT_VEC_INFO): New macro.
4536 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4537 (stmt_vec_info::operator*): New function.
4538 (stmt_vec_info::operator gimple *): Likewise.
4539 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4540 (add_stmt_costs): Likewise.
4541 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4542 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4543 (vect_get_known_peeling_cost): Likewise.
4544 (vect_estimate_min_profitable_iters): Likewise.
4545 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4546 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4547 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4548 (vectorizable_store, free_stmt_vec_infos): Likewise.
4549 (new_stmt_vec_info): Change return type of xcalloc to
4550 _stmt_vec_info *.
4551
4552 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4553
4554 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4555 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4556 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4557 a single_imm_use-based sequence.
4558 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4559
4560 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4561
4562 * tree-vectorizer.h (vec_info::lookup_def): Declare.
4563 * tree-vectorizer.c (vec_info::lookup_def): New function.
4564 * tree-vect-patterns.c (vect_get_internal_def): Use it.
4565 (vect_widened_op_tree): Likewise.
4566 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4567 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4568 (vectorizable_reduction): Likewise.
4569 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4570 of a gimple *.
4571 (vect_is_slp_reduction): Update calls accordingly. Use
4572 vec_info::lookup_def.
4573 (vect_is_simple_reduction): Likewise
4574 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4575
4576 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4577
4578 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4579 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4580 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4581 of vinfo_for_stmt.
4582 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4583 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4584 (vect_update_vf_for_slp, vect_analyze_loop_operations)
4585 (vect_is_slp_reduction, vectorizable_induction)
4586 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4587 * tree-vect-patterns.c (vect_init_pattern_stmt):
4588 (vect_determine_min_output_precision_1, vect_determine_precisions)
4589 (vect_pattern_recog): Likewise.
4590 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4591 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4592 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4593 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4594 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4595 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
4596 info field from a loop to a loop_vec_info.
4597
4598 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4599
4600 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4601 (vec_info::add_stmt): Declare.
4602 * tree-vectorizer.c (vec_info::add_stmt): New function.
4603 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4604 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4605 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4606 (vectorizable_induction): Likewise.
4607 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4608 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4609 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4610 (vectorizable_load): Likewise.
4611 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4612 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4613 (vect_recog_gather_scatter_pattern): Likewise.
4614 (append_pattern_def_seq): Likewise. Remove a check that is
4615 performed by add_stmt itself.
4616
4617 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4618
4619 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4620 which make_ssa_name was called with new_stmt before new_stmt
4621 had been created.
4622
4623 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4624
4625 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4626 split out from...
4627 (vect_is_slp_reduction): ...here...
4628 (vect_is_simple_reduction): ...and here. Remove repetition of tests
4629 that are already known to be false.
4630
4631 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4632
4633 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4634 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
4635 STMT_VINFO_NUM_SLP_USES when it's true.
4636 (vect_free_slp_instance): Add a final_p parameter and pass it to
4637 vect_free_slp_tree.
4638 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4639 (vect_analyze_slp_instance): Likewise.
4640 (vect_slp_analyze_operations): Likewise.
4641 (vect_slp_analyze_bb_1): Likewise.
4642 * tree-vectorizer.c (vec_info): Likewise.
4643 * tree-vect-loop.c (vect_transform_loop): Likewise.
4644
4645 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4646
4647 * tree-vect-loop.c (vectorizable_reduction): Assert that the
4648 function is not called for second and subsequent members of
4649 a reduction group.
4650
4651 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
4652
4653 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4654 cases for nested loops from here to ...
4655 (vect_create_epilog_for_reduction): ...here. Only call
4656 vect_is_simple_use for inner-loop reductions.
4657
4658 2018-07-31 Martin Liska <mliska@suse.cz>
4659
4660 PR gcov-profile/85338
4661 PR gcov-profile/85350
4662 PR gcov-profile/85372
4663 * profile.c (struct location_triplet): New.
4664 (struct location_triplet_hash): Likewise.
4665 (output_location): Do not output a BB that
4666 is already recorded for a line.
4667 (branch_prob): Use streamed_locations.
4668
4669 2018-07-31 Martin Liska <mliska@suse.cz>
4670
4671 PR gcov-profile/85370
4672 * coverage.c (coverage_begin_function): Do not mark target
4673 clones as artificial functions.
4674
4675 2018-07-31 Martin Liska <mliska@suse.cz>
4676
4677 PR gcov-profile/83813
4678 PR gcov-profile/84758
4679 PR gcov-profile/85217
4680 PR gcov-profile/85332
4681 * profile.c (branch_prob): Do not record GOTO expressions
4682 for GIMPLE statements which locations are already streamed.
4683
4684 2018-07-31 Olivier Hainque <hainque@adacore.com>
4685
4686 * gcc.c (handle_spec_function): Accept a soft_matched_part
4687 argument, as do_spec_1. Pass it down to ...
4688 (eval_spec_function): Accept a soft_matched_part argument,
4689 and pass it down to ...
4690 (do_spec_2): Accept a soft_matched_part argument, and pass
4691 it down to do_spec_1.
4692 (do_spec_1): Pass soft_matched_part to handle_spec_function.
4693 (handle_braces): Update call to handle_spec_function.
4694 (driver::set_up_specs): Update calls to do_spec_2.
4695 (compare_debug_dump_opt_spec_function): Likewise.
4696 (compare_debug_self_opt_spec_function): Likewise.
4697
4698 2018-07-31 Olivier Hainque <hainque@adacore.com>
4699
4700 * common.opt (nolibc): New option.
4701 * doc/invoke.texi (Link Options): Document it.
4702 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4703 * config/alpha/linux.h: Likewise.
4704 * config/arc/elf.h: Likewise.
4705 * config/arm/uclinux-elf.h: Likewise.
4706 * config/arm/unknown-elf.h: Likewise.
4707 * config/avr/avrlibc.h: Likewise.
4708 * config/bfin/bfin.h: Likewise.
4709 * config/bfin/linux.h: Likewise.
4710 * config/bfin/uclinux.h: Likewise.
4711 * config/darwin.h: Likewise.
4712 * config/darwin10.h: Likewise.
4713 * config/darwin12.h: Likewise.
4714 * config/gnu-user.h: Likewise.
4715 * config/lm32/uclinux-elf.h: Likewise.
4716 * config/pa/pa-hpux11.h: Likewise.
4717 * config/pa/pa64-hpux.h: Likewise.
4718 * config/sparc/sparc.h: Likewise.
4719
4720 2018-07-31 Olivier Hainque <hainque@adacore.com>
4721
4722 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4723 undefined variables.
4724
4725 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4726
4727 PR target/86640
4728 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4729 instead of GEN_INT.
4730
4731 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4732
4733 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4734 terminated string literal.
4735
4736 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
4737
4738 PR rtl-optimization/85160
4739 * combine.c (is_just_move): New function.
4740 (try_combine): Allow combining two instructions into two if neither of
4741 the original instructions was a move.
4742
4743 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
4744
4745 PR target/86673
4746 * doc/extend.texi (Global Register Variables): Discourage use of type
4747 qualifiers.
4748 (Local Register Variables): Likewise.
4749
4750 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
4751
4752 PR tree-optimization/86506
4753 * hwint.h (ceil_log2): Resync with hwint.c implementation.
4754
4755 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
4756
4757 PR target/86547
4758 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4759 hard_regno, make sure no insn between `from` and `to` clobbers it.
4760
4761 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
4762 Tom de Vries <tdevries@suse.de>
4763
4764 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4765 (PTX_DEFAULT_RUNTIME_DIM): ... this.
4766 (nvptx_goacc_validate_dims): Set default worker and gang dims to
4767 PTX_DEFAULT_RUNTIME_DIM.
4768 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4769
4770 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
4771
4772 * config/pa/pa.c (pa_output_addr_vec): Align address table.
4773 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4774 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4775
4776 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
4777
4778 * config/rs6000/constraints.md (wG constraint): Delete, no longer
4779 used.
4780 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4781 predicate to reflect toc fusion has been deleted.
4782 (toc_fusion_mem_raw): Delete, no longer used.
4783 (toc_fusion_mem_wrapped): Likewise.
4784 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4785 fusion mask bit.
4786 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4787 Delete, no longer used.
4788 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4789 meant to be used for toc fusion.
4790 (rs6000_debug_print_mode): Delete toc fusion debugging.
4791 (rs6000_debug_reg_global): Likewise.
4792 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4793 fusion and secondary reload support that were never used.
4794 (rs6000_option_override_internal): Delete TOC fusion, that was only
4795 partially defined, and it did not work unless you also used the
4796 -mcmodel= switch.
4797 (rs6000_legitimate_address_p): Delete TOC fusion support.
4798 (rs6000_opt_masks): Likewise.
4799 (fusion_wrap_memory_address): Delete function, no longer used.
4800 (fusion_split_address); Delete TOC fusion support.
4801 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4802 longer used with toc fusion being deleted.
4803 (TARGET_TOC_FUSION_FP): Likewise.
4804 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4805 UNSPEC.
4806 (toc fusion spliter): Delete TOC fusion support.
4807 (toc_fusionload_<mode>): Likewise.
4808 (toc_fusionload_di): Likewise.
4809 (fusion_gpr_load_<mode>): Delete generator function, this insn no
4810 longer needs to be named. Rename predicate to delete TOC fusion.
4811 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4812 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4813 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4814 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4815 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4816
4817 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
4818
4819 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4820 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
4821 __int128 in built-in function prototypes.
4822 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4823 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4824
4825 2018-07-27 Martin Sebor <msebor@redhat.com>
4826
4827 PR tree-optimization/86696
4828 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4829 types, including enums.
4830 (handle_char_store): Be prepared for the above function to fail.
4831
4832 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
4833
4834 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4835 when optimization level is lower than 2 or optimize for size.
4836
4837 2018-07-26 Martin Sebor <msebor@redhat.com>
4838
4839 PR tree-optimization/86043
4840 PR tree-optimization/86042
4841 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4842 (get_string_cst_length): Rename...
4843 (get_min_string_length): ...to this. Add argument.
4844 (handle_char_store): Extend to handle multi-character stores by
4845 MEM_REF.
4846 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
4847 * tree.h (initializer_zerop): Add argument.
4848
4849 2018-07-26 Jakub Jelinek <jakub@redhat.com>
4850
4851 PR middle-end/86660
4852 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4853 declare target to variables if they have always,{to,from,tofrom} map
4854 kinds.
4855
4856 2018-07-26 Martin Liska <mliska@suse.cz>
4857
4858 PR lto/86548
4859 * lto-wrapper.c: Add linker_output as prefix
4860 for ltrans_output_file.
4861
4862 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
4863
4864 PR rtl-optimization/85805
4865 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4866 value for hard registers if that was written in the same mode.
4867
4868 2018-07-26 Martin Liska <mliska@suse.cz>
4869
4870 PR gcov-profile/86536
4871 * gcov.c (format_gcov): Use printf format %.*f directly
4872 and do not handle special values.
4873
4874 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4875
4876 * common/config/arc/arc-common.c (arc_option_optimization_table):
4877 Update default optimizations for size.
4878
4879 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4880
4881 * config/arc/arc.md (movsf_insn): Add short instruction selection.
4882 * config/arc/constraints.md (CfZ): New constraint.
4883 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4884 (subsf3_fpu): Likewise.
4885 (cmpsf_fpu): Likewise.
4886 (cmpsf_fpu_uneq): Likewise.
4887
4888 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4889
4890 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4891 accesses as well.
4892 (arc_is_uncached_mem_p): uncached applies to both the variable and
4893 the pointer.
4894
4895 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
4896
4897 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4898 register names.
4899
4900 2018-07-25 David Malcolm <dmalcolm@redhat.com>
4901
4902 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4903 field "m_scopes" from vec to auto_vec.
4904
4905 2018-07-25 Martin Liska <mliska@suse.cz>
4906
4907 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4908 return type.
4909
4910 2018-07-25 Richard Biener <rguenther@suse.de>
4911
4912 PR debug/86654
4913 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4914 special wrt context_die late.
4915 (gen_subprogram_die): Re-use DIEs in local scope.
4916
4917 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
4918
4919 PR tree-optimization/86644
4920 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
4921
4922 2018-07-25 Martin Liska <mliska@suse.cz>
4923
4924 PR middle-end/86645
4925 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4926 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4927
4928 2018-07-25 Martin Liska <mliska@suse.cz>
4929
4930 PR sanitizer/79635
4931 * params.def: Explain ASan abbreviation and provide
4932 a documentation link.
4933
4934 2018-07-24 Martin Sebor <msebor@redhat.com>
4935
4936 PR tree-optimization/86622
4937 PR tree-optimization/86532
4938 * builtins.h (string_length): Declare.
4939 * builtins.c (c_strlen): Correct handling of non-constant offsets.
4940 (check_access): Be prepared for non-constant length ranges.
4941 (string_length): Make extern.
4942 * expr.c (string_constant): Only handle the minor non-constant
4943 array index. Use string_constant to compute the length of
4944 a generic string constant.
4945
4946 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
4947
4948 PR tree-optimization/86618
4949 * tree-vect-stmts.c (vectorizable_call): Don't take the address
4950 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4951
4952 2018-07-24 David Malcolm <dmalcolm@redhat.com>
4953
4954 PR tree-optimization/86636
4955 * json.cc (json::object::set): Fix comment. Add assertions.
4956 (json::array::append): Move here from json.h. Add comment and an
4957 assertion.
4958 (json::string::string): Likewise.
4959 * json.h (json::array::append): Move to json.cc.
4960 (json::string::string): Likewise.
4961 * optinfo-emit-json.cc
4962 (optrecord_json_writer::impl_location_to_json): Assert that we
4963 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4964 wrapper around it. Expand the location once, rather than three
4965 times.
4966 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4967 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4968 wrappers.
4969 (optrecord_json_writer::optinfo_to_json): Likewise, in four
4970 places. Fix some overlong lines.
4971
4972 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
4973
4974 * config/aarch64/aarch64-simd.md
4975 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4976 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4977 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4978 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4979 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4980 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4981 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4982 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4983 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4984
4985 2018-07-24 Jakub Jelinek <jakub@redhat.com>
4986
4987 PR middle-end/86627
4988 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4989 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
4990 and abs_d == d, do the power of two handling if profitable.
4991
4992 2018-07-24 Richard Biener <rguenther@suse.de>
4993
4994 * match.pd: Add BIT_FIELD_REF canonicalizations.
4995
4996 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
4997
4998 PR c/86617
4999 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
5000
5001 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5002
5003 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
5004 terminated STRING_CST object.
5005
5006 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
5007
5008 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
5009
5010 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5011
5012 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
5013 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
5014 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
5015 the elements into a register.
5016 (rs6000_split_v4si_init_di_reg): Delete.
5017 (rs6000_split_v4si_init): Delete.
5018 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
5019 (vsx_init_v4si): Rewrite as a define_expand.
5020
5021 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
5022
5023 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
5024 zero_extend argument from memory): New.
5025
5026 2018-07-22 Martin Sebor <msebor@redhat.com>
5027
5028 PR bootstrap/86621
5029 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
5030 diagnosing calls with unknown arguments unless -Walloca-larger-than
5031 is restricted to less than PTRDIFF_MAX bytes.
5032
5033 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
5034
5035 * doc/gcov.texi (Invoking Gcov): Editorial changes.
5036
5037 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5038
5039 * pretty-print.c (text_info::set_location): Remove redundant
5040 "line_table" parameter from call to rich_location::set_range.
5041
5042 2018-07-20 Martin Sebor <msebor@redhat.com>
5043
5044 PR middle-end/82063
5045 * builtins.c (expand_builtin_alloca): Adjust.
5046 * calls.c (alloc_max_size): Simplify.
5047 * cgraphunit.c (cgraph_node::expand): Adjust.
5048 * common.opt (larger_than_size, warn_frame_larger_than): Remove
5049 variables.
5050 (frame_larger_than_size): Same.
5051 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
5052 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
5053 Initialize.
5054 * doc/invoke.texi (GCC Command Options): Document option arguments.
5055 Explain byte-size arguments and suffixes.
5056 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
5057 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
5058 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
5059 * doc/options.texi (UInteger): Expand.
5060 (Host_Wide_Int, ByteSize): Document new properties.
5061 * final.c (final_start_function_1): Include sizes in an error message.
5062 * function.c (frame_offset_overflow): Same.
5063 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
5064 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
5065 Diagnose unbounded alloca calls only for limits of less than
5066 PTRDIFF_MAX.
5067 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
5068 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
5069 for alloca(0).
5070 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
5071 only for limits of less than PTRDIFF_MAX.
5072 * langhooks-def.h (lhd_handle_option): Change function argument
5073 to HOST_WIDE_INT.
5074 * langhooks.c (lhd_handle_option): Same.
5075 * langhooks.h (handle_option): Same.
5076 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
5077 ByteSize flags.
5078 (var_type, var_type_struct): Same.
5079 (var_set): Handle ByteSize flag.
5080 * optc-gen.awk: Add comments to output to ease debugging. Make
5081 use of HOST_WIDE_INT where appropriate.
5082 * opts-gen-save.awk: Use %lx to format unsigned long.
5083 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
5084 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
5085 arguments. Parse bytes-size suffixes.
5086 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
5087 (enum_value_to_arg): Same.
5088 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
5089 (handle_option): Adjust.
5090 (generate_option): Change function argument to HOST_WIDE_INT.
5091 (cmdline_handle_error): Adjust.
5092 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5093 (set_option): Change function argument to HOST_WIDE_INT.
5094 (option_enabled): Handle cl_host_wide_int.
5095 (get_option_state): Handle CLVC_SIZE.
5096 (control_warning_option): Same.
5097 * opts.c (common_handle_option): Change function argument to
5098 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
5099 OPT_Wvla_larger_than_.
5100 * opts.h (enum cl_var_type): Add an enumerator.
5101 * stor-layout.c (layout_decl): Print a more meaningful warning.
5102 * toplev.c (output_stack_usage): Adjust.
5103
5104 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
5105
5106 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5107 call to inline_expand_builtin_string_cmp.
5108 (expand_builtin_strcmp): Likewise.
5109 (expand_builtin_strncmp): Likewise.
5110 (inline_string_cmp): Delete the last parameter, change char_type_node
5111 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5112 two operands.
5113 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5114 the inlining expansion on target where the type of the call has same or
5115 narrower precision than unsigned char.
5116
5117 2018-07-20 David Malcolm <dmalcolm@redhat.com>
5118
5119 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5120 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5121 * common.opt (fsave-optimization-record): New option.
5122 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5123 * doc/invoke.texi (-fsave-optimization-record): New option.
5124 * dumpfile.c: Include "optinfo-emit-json.h".
5125 (struct kv_pair): Move to coretypes.h.
5126 (optgroup_options): Make non-static.
5127 (dump_context::end_scope): Call
5128 optimization_records_maybe_pop_dump_scope.
5129 * dumpfile.h (optgroup_options): New decl.
5130 * json.cc: New file.
5131 * json.h: New file.
5132 * optinfo-emit-json.cc: New file.
5133 * optinfo-emit-json.h: New file.
5134 * optinfo.cc: Include "optinfo-emit-json.h".
5135 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5136 (optinfo_enabled_p): Check optimization_records_enabled_p.
5137 (optinfo_wants_inlining_info_p): Likewise.
5138 * optinfo.h: Update comment.
5139 * profile-count.c (profile_quality_as_string): New function.
5140 * profile-count.h (profile_quality_as_string): New decl.
5141 (profile_count::quality): New accessor.
5142 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5143 and optinfo_emit_json_cc_tests.
5144 * selftest.h (selftest::json_cc_tests): New decl.
5145 (selftest::optinfo_emit_json_cc_tests): New decl.
5146 * toplev.c: Include "optinfo-emit-json.h".
5147 (compile_file): Call optimization_records_finish.
5148 (do_compile): Call optimization_records_start.
5149 * tree-ssa-live.c: Include optinfo.h.
5150 (remove_unused_scope_block_p): Retain inlining information if
5151 optinfo_wants_inlining_info_p returns true.
5152
5153 2018-07-20 Richard Biener <rguenther@suse.de>
5154
5155 PR debug/86585
5156 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5157 to cover -flto-partition=none.
5158
5159 2018-07-20 Martin Liska <mliska@suse.cz>
5160
5161 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5162 (get_decl_source_range): Remove unused function.
5163
5164 2018-07-20 Richard Biener <rguenther@suse.de>
5165
5166 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5167 (struct vn_phi_s): Likewise.
5168 (struct vn_reference_s): Likewise.
5169 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5170 for searching the slot of an entry known to be in the hash itself.
5171 (vn_phi_hasher::equal): Likewise.
5172 (vn_reference_hasher::equal): Likewise.
5173 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5174 globals.
5175 (optimistic_info, current_info): Remove, keeping only valid_info.
5176 (vn_reference_lookup_1): Remove fallback lookup.
5177 (vn_reference_lookup_2): Likewise.
5178 (vn_nary_op_lookup_1): Likewise.
5179 (vn_phi_lookup): Likewise.
5180 (vn_nary_build_or_lookup_1): Make sure to not chain the built
5181 hash element.
5182 (vn_reference_insert): Adjust, chain the inserted hash element
5183 at last_inserted_ref.
5184 (vn_reference_insert_pieces): Likewise.
5185 (visit_reference_op_call): Likewise.
5186 (vn_nary_op_insert_into): Chain the inserted hash element at
5187 last_inserted_nary.
5188 (vn_nary_op_insert_pieces): Adjust.
5189 (vn_nary_op_insert): Likewise.
5190 (vn_nary_op_insert_stmt): Likewise.
5191 (vn_phi_insert): Adjust, chain the inserted hash element at
5192 last_inserted_phi.
5193 (process_scc): Remove clearing and copying the optimistic
5194 table. Instead remove elements inserted during an optimistic
5195 iteration from the single table we maintain.
5196 (init_scc_vn): Adjust.
5197 (free_scc_vn): Likewise.
5198 (sccvn_dom_walker::record_cond): Likewise.
5199 (sccvn_dom_walker::after_dom_children): Likewise.
5200
5201 2018-07-19 Martin Sebor <msebor@redhat.com>
5202
5203 PR tree-optimization/84047
5204 PR tree-optimization/83776
5205 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5206 (check_array_bounds): Call it.
5207
5208 2018-07-19 Martin Sebor <msebor@redhat.com>
5209
5210 * align.h (align_flags): Use member initialization.
5211
5212 2018-07-19 David Malcolm <dmalcolm@redhat.com>
5213
5214 * Makefile.in (OBJS): Add optinfo.o.
5215 * coretypes.h (class symtab_node): New forward decl.
5216 (struct cgraph_node): New forward decl.
5217 (class varpool_node): New forward decl.
5218 * dump-context.h: New file.
5219 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5220 "tree-pass.h".
5221 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5222 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5223 (set_alt_dump_file): Likewise.
5224 (dump_context::~dump_context): New dtor.
5225 (dump_gimple_stmt): Move implementation to...
5226 (dump_context::dump_gimple_stmt): ...this new member function.
5227 Add the stmt to any pending optinfo, creating one if need be.
5228 (dump_gimple_stmt_loc): Move implementation to...
5229 (dump_context::dump_gimple_stmt_loc): ...this new member function.
5230 Start a new optinfo and add the stmt to it.
5231 (dump_gimple_expr): Move implementation to...
5232 (dump_context::dump_gimple_expr): ...this new member function.
5233 Add the stmt to any pending optinfo, creating one if need be.
5234 (dump_gimple_expr_loc): Move implementation to...
5235 (dump_context::dump_gimple_expr_loc): ...this new member function.
5236 Start a new optinfo and add the stmt to it.
5237 (dump_generic_expr): Move implementation to...
5238 (dump_context::dump_generic_expr): ...this new member function.
5239 Add the tree to any pending optinfo, creating one if need be.
5240 (dump_generic_expr_loc): Move implementation to...
5241 (dump_context::dump_generic_expr_loc): ...this new member
5242 function. Add the tree to any pending optinfo, creating one if
5243 need be.
5244 (dump_printf): Move implementation to...
5245 (dump_context::dump_printf_va): ...this new member function. Add
5246 the text to any pending optinfo, creating one if need be.
5247 (dump_printf_loc): Move implementation to...
5248 (dump_context::dump_printf_loc_va): ...this new member function.
5249 Start a new optinfo and add the stmt to it.
5250 (dump_dec): Move implementation to...
5251 (dump_context::dump_dec): ...this new member function. Add the
5252 value to any pending optinfo, creating one if need be.
5253 (dump_context::dump_symtab_node): New member function.
5254 (dump_context::get_scope_depth): New member function.
5255 (dump_context::begin_scope): New member function.
5256 (dump_context::end_scope): New member function.
5257 (dump_context::ensure_pending_optinfo): New member function.
5258 (dump_context::begin_next_optinfo): New member function.
5259 (dump_context::end_any_optinfo): New member function.
5260 (dump_context::s_current): New global.
5261 (dump_context::s_default): New global.
5262 (dump_scope_depth): Delete global.
5263 (dumpfile_ensure_any_optinfo_are_flushed): New function.
5264 (dump_symtab_node): New function.
5265 (get_dump_scope_depth): Reimplement in terms of dump_context.
5266 (dump_begin_scope): Likewise.
5267 (dump_end_scope): Likewise.
5268 (selftest::temp_dump_context::temp_dump_context): New ctor.
5269 (selftest::temp_dump_context::~temp_dump_context): New dtor.
5270 (selftest::verify_item): New function.
5271 (ASSERT_IS_TEXT): New macro.
5272 (ASSERT_IS_TREE): New macro.
5273 (ASSERT_IS_GIMPLE): New macro.
5274 (selftest::test_capture_of_dump_calls): New test.
5275 (selftest::dumpfile_c_tests): Call it.
5276 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5277 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5278 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5279 descriptive comment.
5280 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5281 (dump_node, dump_bb): Move these unrelated decls.
5282 (class dump_manager): Add leading comment.
5283 * optinfo.cc: New file.
5284 * optinfo.h: New file.
5285
5286 2018-07-19 Michael Collison <michael.collison@arm.com>
5287 Richard Henderson <rth@redhat.com>
5288
5289 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5290 (subti): Handle op1 zero.
5291 (subvti4, usub4ti4): New.
5292 (*sub<GPI>3_compare1_imm): New.
5293 (sub<GPI>3_carryinCV): New.
5294 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5295 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5296
5297 2018-07-19 Michael Collison <michael.collison@arm.com>
5298 Richard Henderson <rth@redhat.com>
5299
5300 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5301 (addti3): Create simpler code if low part is already known to be 0.
5302 (addvti4, uaddvti4): New.
5303 (*add<GPI>3_compareC_cconly_imm): New.
5304 (*add<GPI>3_compareC_cconly): New.
5305 (*add<GPI>3_compareC_imm): New.
5306 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5307 handle constants within this pattern..
5308 (*add<GPI>3_compareV_cconly_imm): New.
5309 (*add<GPI>3_compareV_cconly): New.
5310 (*add<GPI>3_compareV_imm): New.
5311 (add<GPI>3_compareV): New.
5312 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5313 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5314 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5315 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5316 with 'comparison' operator.
5317 (*add<GPI>3_compareV_cconly_imm): Ditto.
5318 (*add<GPI>3_compareV_cconly): Ditto.
5319 (*add<GPI>3_compareV_imm): Ditto.
5320 (add<GPI>3_compareV): Ditto.
5321 (add<mode>3_carryinC): Ditto.
5322 (*add<mode>3_carryinC_zero): Ditto.
5323 (*add<mode>3_carryinC): Ditto.
5324 (add<mode>3_carryinV): Ditto.
5325 (*add<mode>3_carryinV_zero): Ditto.
5326 (*add<mode>3_carryinV): Ditto.
5327
5328 2018-07-19 Michael Collison <michael.collison@arm.com>
5329 Richard Henderson <rth@redhat.com>
5330
5331 * config/aarch64/aarch64-modes.def (CC_V): New.
5332 * config/aarch64/aarch64-protos.h
5333 (aarch64_addti_scratch_regs): Declare
5334 (aarch64_subvti_scratch_regs): Declare.
5335 (aarch64_expand_subvti): Declare.
5336 (aarch64_gen_unlikely_cbranch): Declare
5337 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5338 for signed overflow using CC_Vmode.
5339 (aarch64_get_condition_code_1): Handle CC_Vmode.
5340 (aarch64_gen_unlikely_cbranch): New function.
5341 (aarch64_addti_scratch_regs): New function.
5342 (aarch64_subvti_scratch_regs): New function.
5343 (aarch64_expand_subvti): New function.
5344
5345 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5346
5347 * config/aarch64/aarch64-option-extensions.def: New entry for profile
5348 extension.
5349 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5350 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5351 extension.
5352
5353 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5354
5355 PR target/83009
5356 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5357 address check not strict.
5358
5359 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
5360
5361 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5362 Umq with Umn.
5363 (store_pair_lanes<mode>): Likewise.
5364 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5365 enum value 'ADDR_QUERY_LDP_STP_N'.
5366 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5367 (aarch64_print_address_internal): Add declaration.
5368 (aarch64_print_ldpstp_address): Remove.
5369 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5370 (aarch64_print_operand): Change printing of 'y'.
5371 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5372 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5373 'true' rather than '1'.
5374 * config/aarch64/constraints.md (Uml): Likewise.
5375 (Uml): Rename to Umn.
5376 (Umq): Remove.
5377
5378 2018-07-19 Richard Biener <rguenther@suse.de>
5379
5380 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5381 a trailing array.
5382 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5383 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5384 (vn_reference_hasher): Likewise.
5385 (struct vn_tables_s): Remove obstack and alloc-pool members.
5386 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5387 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5388 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5389 (vn_reference_insert_pieces): Likewise.
5390 (alloc_vn_nary_op_noinit): Adjust.
5391 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5392 (vn_phi_eq): Adjust.
5393 (shared_lookup_phiargs): Remove.
5394 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5395 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5396 (visit_reference_op_call): Likewise.
5397 (copy_nary, copy_phi, copy_reference): Remove.
5398 (process_scc): Rewind the obstack when iterating. Do not
5399 copy the elements to valid_info but just move them from one
5400 hashtable to the other.
5401 (allocate_vn_table): Adjust.
5402 (free_vn_table): Likewise.
5403 (init_scc_vn): Likewise.
5404 (free_scc_vn): Likewise.
5405
5406 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
5407
5408 PR target/86560
5409 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5410 indirect_return as function type attribute.
5411 (ix86_attribute_table): Change indirect_return to function
5412 type attribute.
5413 * doc/extend.texi: Update indirect_return attribute.
5414
5415 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
5416
5417 * wide-int.h (widest2_int): New.
5418 * gimple-fold.c (arith_overflowed_p): Use it.
5419 * tree.h (widest2_int_cst): New.
5420 * tree-vrp.c (wide_int_binop_overflow): Rename from
5421 vrp_int_const_binop.
5422 Rewrite to work on trees.
5423 (extract_range_from_multiplicative_op_1): Abstract code to...
5424 (wide_int_range_min_max): ...here.
5425 (wide_int_range_cross_product): ...and here.
5426 (extract_range_from_binary_expr_1): Abstract overflow code to...
5427 (wide_int_range_mult_wrapping): ...here.
5428 * tree-vrp.h (wide_int_range_cross_product): New.
5429 (wide_int_range_mult_wrapping): New.
5430
5431 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
5432 Julia Koval <julia.koval@intel.com>
5433
5434 * config/i386/x86-tune-costs.h (skylake_memcpy,
5435 skylake_memset): Replace rep_prefix with unrolling for size 512.
5436
5437 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
5438
5439 PR middle-end/86544
5440 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5441 comparision with EQ_EXPR in last stmt.
5442
5443 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
5444
5445 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5446 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5447 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5448 previously known as "PowerPC AltiVec Built-in Functions". Move
5449 some material to new subsubsections "PowerPC AltiVec Built-in
5450 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5451 ISA 2.07".
5452 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5453 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5454 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5455 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5456
5457 2018-07-18 Richard Biener <rguenther@suse.de>
5458
5459 PR tree-optimization/86557
5460 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5461 EXACT_DIV_EXPR.
5462
5463 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
5464
5465 * config/s390/s390.c (s390_function_profiler): Generate CFI.
5466
5467 2018-07-17 Jeff Law <law@redhat.com>
5468
5469 * config/arm/arm.c (get_label_padding): Update for recent
5470 changes to label_to_alignment.
5471
5472 PR tree-optimization/86010
5473 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5474
5475 * config/mips/mips.c (vr4130_align_insns): Update for recent
5476 changes to label_to_alignment.
5477
5478 * config/frv/frv.c (frv_label_align): Update for recent changes
5479 to label_to_alignment.
5480
5481 * config/nios2/nios2.c (nios2_label_align): Update for recent
5482 changes which dropped ALIGN_LABELS_LOG.
5483
5484 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
5485
5486 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5487 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5488
5489 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
5490
5491 * config/arc/arc.c (arc_label_align): Use align_labels instead of
5492 deprecated align_labels_log.
5493
5494 2018-07-17 Richard Biener <rguenther@suse.de>
5495
5496 PR lto/86456
5497 * dwarf2out.c (init_sections_and_labels): Always generate
5498 a debug_line_str_section for early LTO debug.
5499 (dwarf2out_finish): Reset debug_line_str_hash output early.
5500 Bump counter for extra dwarf5 .debug_loc labels to not conflict
5501 with fat LTO part.
5502 (dwarf2out_early_finish): Output debug_line_str.
5503
5504 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5505
5506 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5507 index register on z196 or later.
5508
5509 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
5510
5511 * config/s390/s390.c (s390_default_align): Set default function
5512 alignment to 16.
5513 (s390_override_options_after_change): Call s390_default align.
5514 (s390_option_override_internal): Call s390_default_align.
5515 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5516
5517 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5518
5519 PR middle-end/86542
5520 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5521 to _looptemp_ clauses, other than the first two.
5522
5523 2018-07-17 Martin Liska <mliska@suse.cz>
5524
5525 * opts.c: Do not enable OPT_falign_* for -Os.
5526
5527 2018-07-17 Martin Liska <mliska@suse.cz>
5528
5529 * align.h (MAX_CODE_ALIGN): New.
5530 (MAX_CODE_ALIGN_VALUE): New.
5531 * common/config/i386/i386-common.c (ix86_handle_option):
5532 (MAX_CODE_ALIGN): Moved to align.h.
5533 * final.c (MAX_CODE_ALIGN): Likewise.
5534 * opts.c (parse_and_check_align_values):
5535 (MAX_CODE_ALIGN): Likewise.
5536 (MAX_CODE_ALIGN_VALUE): Likewise.
5537
5538 2018-07-17 Martin Liska <mliska@suse.cz>
5539
5540 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5541 in order to fulfil coding style.
5542 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5543 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5544 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5545 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5546 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5547 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5548 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5549 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5550 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5551
5552 2018-07-17 Martin Liska <mliska@suse.cz>
5553
5554 * align.h: New file.
5555 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5556 directly.
5557 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5558 align_flags of label_to_alignment.
5559 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5560 align_flags class.
5561 * config/m68k/m68k.c: Do not use removed align_labels_value and
5562 align_loops_value.
5563 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5564 (LOOP_ALIGN): Likewise.
5565 (LABEL_ALIGN): Likewise.
5566 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5567 Remove not used macro.
5568 (rs6000_loop_align): Change return type to align_flags.
5569 (rs6000_loop_align_max_skip): Remove.
5570 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5571 Change return type to align_flags.
5572 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5573 Remove not used macro.
5574 (rs6000_loop_align): Change return type to align_flags.
5575 (rs6000_loop_align_max_skip): Remove.
5576 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5577 * config/rx/rx-protos.h (rx_align_for_label): Make it
5578 static function.
5579 * config/rx/rx.c (rx_align_for_label): Change return type
5580 to align_flags.
5581 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5582 macro definitions.
5583 into align_flags class.
5584 (LABEL_ALIGN): Likewise.
5585 (LOOP_ALIGN): Likewise.
5586 * config/s390/s390.c (s390_label_align): Use align_flags
5587 class member.
5588 (s390_asm_output_function_label): Likewise.
5589 * config/sh/sh.c (sh_override_options_after_change):
5590 Use align_flags class directly without macros.
5591 (find_barrier): Likewise.
5592 (barrier_align): Likewise.
5593 (sh_loop_align): Likewise.
5594 * config/spu/spu.c (spu_option_override):
5595 Use align_flags_tuple::get_value instead of removed macros.
5596 (spu_sched_init): Likewise.
5597 * config/spu/spu.h (GTY): Likewise.
5598 * config/visium/visium.c (visium_option_override):
5599 Set "8" as default secondary alignment.
5600 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5601 in order to guarantee secondary alignment of 8.
5602 * coretypes.h: Include align.h header file.
5603 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5604 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5605 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5606 * doc/tm.texi.in: Likewise.
5607 * final.c (struct label_alignment): Remove not used structure.
5608 (LABEL_ALIGN): Change type to align_flags.
5609 (LOOP_ALIGN): Likewise.
5610 (JUMP_ALIGN): Likewise.
5611 (default_loop_align_max_skip): Remove.
5612 (default_label_align_max_skip): Likewise.
5613 (default_jump_align_max_skip): Likewise.
5614 (default_label_align_after_barrier_max_skip):
5615 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5616 (LABEL_TO_MAX_SKIP): Remove.
5617 (label_to_alignment): Return align_flags type instead of integer.
5618 (label_to_max_skip): Remove.
5619 (align_fuzz): Use align_flags type.
5620 (compute_alignments): Use align_flags type and use align_flags::max
5621 to combine multiple alignments.
5622 (grow_label_align): Grow vec instead of C array.
5623 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5624 (shorten_branches): Use align_flags type and use align_flags::max
5625 to combine multiple alignments.
5626 (final_scan_insn_1): Remove usage of secondary alignment that comes
5627 from label alignment, but instead use proper secondary alignment
5628 which is computed in grow_label_align.
5629 * flags.h (struct align_flags_tuple): Move to align.h.
5630 (struct align_flags): Likewise.
5631 (state_align_loops): Rename to align_loops.
5632 (state_align_jumps): Rename to align_jumps.
5633 (state_align_labels): Rename to align_labels.
5634 (state_align_functions): Rename to align_functions.
5635 (align_loops_log): Remove.
5636 (align_jumps_log): Remove.
5637 (align_labels_log): Remove.
5638 (align_functions_log): Remove.
5639 (align_loops_max_skip): Remove.
5640 (align_jumps_max_skip): Remove.
5641 (align_labels_max_skip): Remove.
5642 (align_functions_max_skip): Remove.
5643 (align_loops_value): Remove.
5644 (align_jumps_value): Remove.
5645 (align_labels_value): Remove.
5646 (align_functions_value): Remove.
5647 * output.h (label_to_alignment): Change return type to align_flags.
5648 (label_to_max_skip): Remove.
5649 * target.def: Remove loop_align_max_skip, label_align_max_skip,
5650 jump_align_max_skip macros.
5651 * targhooks.h (default_loop_align_max_skip): Remove.
5652 (default_label_align_max_skip): Likewise.
5653 (default_jump_align_max_skip): Likewise.
5654 (default_label_align_after_barrier_max_skip): Remove.
5655 * toplev.c (read_log_maxskip): Use ::normalize function.
5656 (parse_N_M): Remove not used argument and also call ::normalize.
5657 (parse_alignment_opts): Do not pass unused arguments.
5658 * varasm.c (assemble_start_function): Use directly align_functions
5659 instead of removed macros.
5660 * system.h: Do not poison removed macros.
5661
5662 2018-07-17 Jakub Jelinek <jakub@redhat.com>
5663
5664 PR middle-end/86539
5665 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5666 and cond temporaries don't have reference type if iterator has
5667 pointer type. For init use &for_pre_body instead of pre_p if
5668 for_pre_body is non-empty.
5669
5670 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5671
5672 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5673 double-double modes to SFmode directly directly.
5674 (trunc<mode>sf2_fprs): Delete.
5675
5676 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5677
5678 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5679 for conversions between IFmode and the decimal floating point modes.
5680 (init_float128_ieee): Use the correct names for conversions between
5681 KFmode and the decimal floating point modes.
5682
5683 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
5684
5685 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5686 for the conversions between TDmode and IFmode.
5687 (init_float128_ieee): Use more correct names for the conversions
5688 between TDmode and KFmode.
5689
5690 2018-07-16 Jakub Jelinek <jakub@redhat.com>
5691
5692 PR tree-optimization/86526
5693 * builtins.c (expand_builtin_memcmp): Formatting fixes.
5694 (inline_expand_builtin_string_cmp): Likewise.
5695 (inline_string_cmp): Likewise. Use c_readstr instead of
5696 builtin_memcpy_read_str. Add unit_mode temporary.
5697
5698 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
5699
5700 PR middle-end/86528
5701 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5702 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5703
5704 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5705
5706 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5707 Alphabetize prototypes of built-in functions, separating out
5708 built-in functions that are listed in this section but should be
5709 described elsewhere.
5710
5711 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
5712
5713 PR target/86511
5714 * expmed.c (emit_store_flag): Do not emit setcc followed by a
5715 conditional move when trapping comparison was split to a
5716 non-trapping one (and vice versa).
5717
5718 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5719
5720 * config/s390/s390.c (s390_function_profiler): Generate nops
5721 instead of profiler call sequences.
5722 * config/s390/s390.opt: Add the new option.
5723
5724 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5725
5726 * config/s390/s390.c (s390_function_profiler): Generate
5727 __mcount_loc section.
5728 * config/s390/s390.opt: Add the new option.
5729
5730 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
5731
5732 * common.opt: Add the new warning.
5733 * config/s390/s390.c (s390_function_profiler): Emit "brasl
5734 %r0,__fentry__" when -mfentry is specified.
5735 (s390_option_override_internal): Disallow -mfentry for 31-bit
5736 CPUs.
5737 * config/s390/s390.opt: Add the new option.
5738
5739 2018-07-16 Richard Biener <rguenther@suse.de>
5740
5741 PR lto/86523
5742 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5743 for function-local FUNCTION_DECL and RESULT_DECL immediately.
5744
5745 2018-07-16 Martin Liska <mliska@suse.cz>
5746
5747 PR ipa/86529
5748 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5749 to ::get_create.
5750
5751 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5752
5753 * config/arc/arcHS.md: Update ARCHS scheduling rules.
5754
5755 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
5756
5757 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5758 for ARCHS4x.
5759 * config/arc/arc-cpus.def (hs4x): New cpu.
5760 (hs4xd): Likewise.
5761 * config/arc/arc-tables.opt: Regenerate.
5762 * config/arc/arc.c (arc_sched_issue_rate): New function.
5763 (TARGET_SCHED_ISSUE_RATE): Define.
5764 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5765 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5766 fpu_cvt.
5767 (attr tune): Add ARCHS4x tune values.
5768 (attr tune_dspmpy): Define.
5769 (*tst): Correct instruction type.
5770 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5771 * config/arc/arcHS4x.md: New file.
5772 * config/arc/fpu.md: Update instruction type attributes.
5773 * config/arc/t-multilib: Regenerate.
5774
5775 2018-07-16 Tom de Vries <tdevries@suse.de>
5776
5777 PR debug/86455
5778 * var-tracking.c (vt_initialize): Fix pre_dec handling.
5779
5780 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5781
5782 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5783 early clobber.
5784
5785 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
5786
5787 PR tree-optimization/86514
5788 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5789 conversion to a boolean type from a type with greater precision.
5790
5791 2018-07-16 Tom de Vries <tdevries@suse.de>
5792
5793 * var-tracking.c (vt_initialize): Print adjusted insn slim if
5794 dump_flags request TDF_SLIM.
5795
5796 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
5797
5798 * fold-const.c (int_const_binop_1): Abstract...
5799 (wide_int_binop): ...wide int code here.
5800 (poly_int_binop): ...poly int code here.
5801 Abstract the rest of int_const_binop_1 into int_const_binop.
5802 * fold-const.h (wide_int_binop): New.
5803 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5804 Remove useless PLUS/MINUS_EXPR case.
5805 (zero_nonzero_bits_from_vr): Move wide int code...
5806 (zero_nonzero_bits_from_bounds): ...here.
5807 (extract_range_from_binary_expr_1): Move mask optimization code...
5808 (range_easy_mask_min_max): ...here.
5809 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5810 (range_easy_mask_min_max): New.
5811
5812 2018-07-15 Jeff Law <law@redhat.com>
5813
5814 PR target/85993
5815 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5816 block.
5817
5818 2018-07-14 Jim Wilson <jimw@sifive.com>
5819
5820 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5821
5822 2018-07-14 Paul Koning <ni1d@arrl.net>
5823
5824 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5825
5826 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
5827
5828 * lto-streamer-out.c (copy_function_or_variable): Dump info about
5829 copying section.
5830
5831 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
5832 Steve Munroe <munroesj52@gmail.com>
5833
5834 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5835 (_mm_andnot_si128): Likewise.
5836 (_mm_or_si128): Likewise.
5837 (_mm_xor_si128): Likewise.
5838
5839 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
5840
5841 PR middle-end/78809
5842 * builtins.c (expand_builtin_memcmp): Inline the calls first
5843 when result_eq is false.
5844 (expand_builtin_strcmp): Inline the calls first.
5845 (expand_builtin_strncmp): Likewise.
5846 (inline_string_cmp): New routine. Expand a string compare
5847 call by using a sequence of char comparison.
5848 (inline_expand_builtin_string_cmp): New routine. Inline expansion
5849 a call to str(n)cmp/memcmp.
5850 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5851 New option.
5852 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5853
5854 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
5855
5856 * config/arm/driver-arm.c: Include arm-native.h.
5857 (host_detect_local_cpu): Use auto-generated data tables.
5858 (vendors, arm_cpu_table): Delete. Move part information to ...
5859 * config/arm/arm-cpus.in: ... here.
5860 * config/arm/parsecpu.awk (gen_native): New function.
5861 (vendor, part): New CPU fields.
5862 (END): Add support for building the native CPU detection tables.
5863 * config/arm/t-arm (arm-native.h): Add build rule.
5864 (driver-arm.o): Add dependency on arm-native.h.
5865
5866 2018-07-13 Richard Biener <rguenther@suse.de>
5867
5868 PR middle-end/85974
5869 * match.pd (addr1 - addr2): Allow either of the operand to
5870 have a conversion.
5871
5872 2018-07-13 Tom de Vries <tdevries@suse.de>
5873
5874 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5875 in remap_ssa_name.
5876
5877 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
5878
5879 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5880 arrays instead of numbered variables.
5881
5882 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
5883
5884 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5885 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5886
5887 2018-07-13 Richard Biener <rguenther@suse.de>
5888
5889 PR debug/86452
5890 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5891 instead of get_context_die.
5892
5893 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
5894 Richard Biener <rguenther@suse.de>
5895
5896 PR middle-end/86489
5897 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5898 that the loop latch destination where phi is defined.
5899
5900 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
5901
5902 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5903 (riscv_expand_epilogue): Add assertion to check interrupt mode.
5904 (riscv_set_current_function): Extract getting interrupt type to new
5905 function.
5906 (riscv_get_interrupt_type): New function.
5907 (riscv_merge_decl_attributes): New function, checking interrupt type is
5908 same.
5909 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5910
5911 2018-07-12 Paul Koning <ni1d@arrl.net>
5912
5913 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5914 directive.
5915
5916 2018-07-12 Paul Koning <ni1d@arrl.net>
5917
5918 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5919 zero reference, add doloop_end instead.
5920 * doc/md.texi (decrement_and_branch_until_zero): Remove.
5921 (Looping patterns): Remove decrement_and_branch_until_zero. Add
5922 detail for doloop_end.
5923
5924 2018-07-12 Martin Sebor <msebor@redhat.com>
5925
5926 PR c/86453
5927 * attribs.c (decl_attributes): Reject conflicting attributes before
5928 calling attribute handlers.
5929
5930 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
5931
5932 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5933 parameter.
5934 (gcc::dump_manager::get_dump_file_name): likewise.
5935 (dump_begin): Likewise.
5936 * dumpfile.h (dump_begin): Update prototype.
5937 (gcc::dump_manager::get_dump_file_name,
5938 gcc::dump_manager::get_dump_file_name): Update prototype.
5939
5940 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5941
5942 * internal-fn.h (vectorizable_internal_fn_p): New function.
5943 * tree-vect-slp.c (compatible_calls_p): Likewise.
5944 (vect_build_slp_tree_1): Remove nops argument. Handle calls
5945 to internal functions.
5946 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5947
5948 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5949
5950 * fold-const.h (inverse_conditions_p): Declare.
5951 * fold-const.c (inverse_conditions_p): New function.
5952 * match.pd: Use inverse_conditions_p. Add folds of view_converts
5953 that test the inverse condition of a conditional internal function.
5954 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5955 * internal-fn.c (internal_fn_mask_index): Handle conditional
5956 internal functions.
5957 (vectorized_internal_fn_supported_p): New function.
5958 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5959 (any_pred_load_store): Replace with...
5960 (need_to_predicate): ...this new variable.
5961 (redundant_ssa_names): New variable.
5962 (ifcvt_can_use_mask_load_store): Move initial checks to...
5963 (ifcvt_can_predicate): ...this new function. Handle tree codes
5964 for which a conditional internal function exists.
5965 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5966 instead of ifcvt_can_use_mask_load_store. Update after variable
5967 name change.
5968 (predicate_load_or_store): New function, split out from
5969 predicate_mem_writes.
5970 (check_redundant_cond_expr): New function.
5971 (value_available_p): Likewise.
5972 (predicate_rhs_code): Likewise.
5973 (predicate_mem_writes): Rename to...
5974 (predicate_statements): ...this. Use predicate_load_or_store
5975 and predicate_rhs_code.
5976 (combine_blocks, tree_if_conversion): Update after above name changes.
5977 (ifcvt_local_dce): Handle redundant_ssa_names.
5978 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5979 general conditional functions.
5980 * tree-vect-stmts.c (vectorizable_call): Likewise.
5981
5982 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5983 Alan Hayward <alan.hayward@arm.com>
5984 David Sherwood <david.sherwood@arm.com>
5985
5986 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5987 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5988 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5989 plus and minus and convert them into IFN_COND_FMA-based sequences.
5990 (convert_mult_to_fma): Handle conditional plus and minus.
5991
5992 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
5993
5994 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5995 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5996 (cond_fnms_optab): New optabs.
5997 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5998 internal functions.
5999 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
6000 * internal-fn.h (get_conditional_internal_fn): Declare.
6001 (get_unconditional_internal_fn): Likewise.
6002 * internal-fn.c (cond_ternary_direct): New macro.
6003 (expand_cond_ternary_optab_fn): Likewise.
6004 (direct_cond_ternary_optab_supported_p): Likewise.
6005 (FOR_EACH_COND_FN_PAIR): Likewise.
6006 (get_conditional_internal_fn): New function.
6007 (get_unconditional_internal_fn): Likewise.
6008 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
6009 (gimple_match_op::gimple_match_op): Add a new overload for 5
6010 operands.
6011 (gimple_match_op::set_op): Likewise.
6012 (gimple_resimplify5): Declare.
6013 * genmatch.c (decision_tree::gen): Generate simplifications for
6014 5 operands.
6015 * gimple-match-head.c (gimple_simplify): Define an overload for
6016 5 operands. Handle calls with 5 arguments in the top-level overload.
6017 (convert_conditional_op): Handle conversions from unconditional
6018 internal functions to conditional ones.
6019 (gimple_resimplify5): New function.
6020 (build_call_internal): Pass a fifth operand.
6021 (maybe_push_res_to_seq): Likewise.
6022 (try_conditional_simplification): Try converting conditional
6023 internal functions to unconditional internal functions.
6024 Handle 3-operand unconditional forms.
6025 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
6026 Define ternary equivalents of the current rules for binary conditional
6027 internal functions.
6028 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
6029 ternary operations.
6030 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
6031 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
6032 (optab): Handle them.
6033 (SVE_COND_FP_TERNARY): New int iterator.
6034 (sve_fmla_op, sve_fmad_op): New int attributes.
6035 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
6036 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
6037 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
6038
6039 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
6040
6041 * target.def (preferred_else_value): New target hook.
6042 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
6043 * doc/tm.texi: Regenerate.
6044 * targhooks.h (default_preferred_else_value): Declare.
6045 * targhooks.c (default_preferred_else_value): New function.
6046 * internal-fn.h (conditional_internal_fn_code): Declare.
6047 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
6048 (get_conditional_internal_fn): Use it.
6049 (conditional_internal_fn_code): New function.
6050 * gimple-match.h (gimple_match_cond): New struct.
6051 (gimple_match_op): Add a cond member function.
6052 (gimple_match_op::gimple_match_op): Update all forms to take a
6053 gimple_match_cond.
6054 * genmatch.c (expr::gen_transform): Use the same condition as res_op
6055 for the suboperation, but don't specify a particular else_value.
6056 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
6057 (visit_nary_op, visit_reference_op_load): Pass
6058 gimple_match_cond::UNCOND to the gimple_match_op constructor.
6059 * gimple-match-head.c: Include tree-eh.h
6060 (convert_conditional_op): New function.
6061 (maybe_resimplify_conditional_op): Likewise.
6062 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
6063 (gimple_resimplify2): Likewise.
6064 (gimple_resimplify3): Likewise.
6065 (gimple_resimplify4): Likewise.
6066 (maybe_push_res_to_seq): Return null for conditional operations.
6067 (try_conditional_simplification): New function.
6068 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
6069 constructor.
6070 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
6071 IFN_COND_* call.
6072 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
6073 function.
6074 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
6075
6076 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
6077
6078 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6079 DECL_FCONTEXT
6080 (hash_tree): Do not hash DECL_FCONTEXT
6081 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
6082 Do not stream DECL_FCONTEXT.
6083 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
6084 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
6085
6086 2018-07-12 Richard Biener <rguenther@suse.de>
6087
6088 PR debug/86462
6089 * dwarf2out.c (gen_block_die): Only output blocks when they have
6090 at least one !DECL_IGNORED_P variable.
6091
6092 2018-07-12 Richard Biener <rguenther@suse.de>
6093
6094 PR target/84829
6095 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6096 Remove -mieee-fp handling.
6097
6098 2018-07-12 Richard Biener <rguenther@suse.de>
6099
6100 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6101 left-over from last patch.
6102
6103 2018-07-12 Jakub Jelinek <jakub@redhat.com>
6104
6105 PR tree-optimization/86492
6106 * gimple-ssa-store-merging.c
6107 (imm_store_chain_info::coalesce_immediate_stores): Call
6108 check_no_overlap even for the merge_overlapping case. Formatting fix.
6109
6110 2018-07-12 Richard Biener <rguenther@suse.de>
6111
6112 PR middle-end/86479
6113 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6114 move possibly trapping operations into the conditional.
6115
6116 2018-07-12 Richard Biener <rguenther@suse.de>
6117
6118 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6119 (vn_lookup_simplify_result): Remove recursion limit applied
6120 here.
6121 (vn_nary_build_or_lookup_1): Adjust.
6122 (try_to_simplify): Likewise.
6123 * gimple-match-head.c (gimple_resimplify1): Instead apply one
6124 here.
6125 (gimple_resimplify2): Likewise.
6126 (gimple_resimplify3): Likewise.
6127 (gimple_resimplify4): Likewise.
6128
6129 2018-07-11 Jakub Jelinek <jakub@redhat.com>
6130
6131 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6132 Use __mmask64 type instead of __mmask8 for __M argument.
6133 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6134 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6135 __U argument.
6136 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6137 __mmask16 for __M argument.
6138 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6139 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6140 to __mmask16 instead of __mmask8.
6141 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6142 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6143 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6144 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6145 instead of __mmask16 for __U argument.
6146 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6147 __mmask16 instead of __mmask8 for __U argument.
6148 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6149 __U argument.
6150 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6151 __mmask16.
6152 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6153 argument.
6154 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6155 __U argument.
6156 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6157 __mmask16.
6158 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6159 of __mmask16.
6160 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6161 __U argument.
6162 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6163 __U argument.
6164 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6165 __U argument.
6166 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6167 __U argument.
6168 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6169 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6170 return type as well as __M argument type and all casts from __mmask8
6171 to __mmask32.
6172 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6173 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6174 return type as well as __M argument type and all casts from __mmask8
6175 to __mmask16.
6176 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6177 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6178 return type as well as __M argument type and all casts from __mmask8
6179 to __mmask32.
6180 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6181 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6182 return type as well as __M argument type and all casts from __mmask8
6183 to __mmask16.
6184 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6185 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6186 __mmask16.
6187
6188 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
6189
6190 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6191 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6192 for __U argument.
6193
6194 2018-07-11 Paul Koning <ni1d@arrl.net>
6195
6196 * doc/md.texi (define_subst): Document how multiple occurrences of
6197 the same argument in the replacement pattern are handled.
6198
6199 2018-07-11 Paul Koning <ni1d@arrl.net>
6200
6201 * doc/extend.texi (Common Variable Attributes): Move "mode" into
6202 alphabetical order.
6203 (Common Type Attributes): Add "mode" attribute.
6204
6205 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
6206
6207 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6208 stream DECL_ORIGINAL_TYPE.
6209 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6210 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6211 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6212 Do not walk original type.
6213 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6214 external decls.
6215 (write_ts_decl_non_common_tree_pointers): Do not stream
6216 DECL_ORIGINAL_TYPE
6217 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6218 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6219
6220 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6221
6222 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6223 thread twice from the same starting edge.
6224
6225 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
6226
6227 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6228 * gimple.c (gimple_call_nonnull_result_p): ...here...
6229 (gimple_call_nonnull_arg): ...and here.
6230 * gimple.h (gimple_call_nonnull_result_p): New.
6231 (gimple_call_nonnull_arg): New.
6232
6233 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
6234
6235 * config/arm/arm-cpus.in: Move information from fpu field of each
6236 cpu definition to the isa field.
6237 * config/arm/parsecpu.awk (fpu): Delete match rule.
6238 (gen_comm_data): Don't add bits from the CPU's FPU entry.
6239
6240 2018-07-11 Richard Biener <rguenther@suse.de>
6241
6242 PR debug/86457
6243 * dwarf2out.c (init_sections_and_labels): Use
6244 output_asm_line_debug_info consistently.
6245 (dwarf2out_early_finish): Likewise.
6246 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6247 type units.
6248
6249 2018-07-11 Richard Biener <rguenther@suse.de>
6250
6251 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6252 Rework father_bb setting in a way to avoid propagating constants
6253 multiple times on a loop body.
6254
6255 2018-07-10 Mark Wielaard <mark@klomp.org>
6256
6257 PR debug/86459
6258 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6259
6260 2018-07-10 Richard Biener <rguenther@suse.de>
6261
6262 * hash-map.h (hash_map::iterator::operator*): Return
6263 references to key and value.
6264
6265 2018-07-10 Jakub Jelinek <jakub@redhat.com>
6266
6267 PR c++/86443
6268 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6269 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6270 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6271 (gimplify_omp_for): For composite loops, move outer
6272 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6273 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
6274 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
6275 TREE_LIST for both the original class iterator and the "last" helper
6276 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
6277 loop, remember has_decl_expr from outer composite loops for the
6278 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6279
6280 2018-07-09 Martin Sebor <msebor@redhat.com>
6281
6282 PR middle-end/77357
6283 PR middle-end/86428
6284 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6285 accessing implicitly initialized array elements.
6286 * expr.c (string_constant): Handle string initializers of
6287 character arrays within aggregates.
6288 * gimple-fold.c (fold_array_ctor_reference): Add argument.
6289 Store element offset. As a special case, handle zero size.
6290 (fold_nonarray_ctor_reference): Same.
6291 (fold_ctor_reference): Add argument. Store subobject offset.
6292 * gimple-fold.h (fold_ctor_reference): Add argument.
6293
6294 2018-07-09 Paul Koning <ni1d@arrl.net>
6295
6296 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6297 (pdp11_insn_cost): New function.
6298 (pdp11_md_asm_adjust): New function.
6299 (TARGET_INVALID_WITHIN_DOLOOP): Define.
6300 (pdp11_rtx_costs): Update to match machine better.
6301 (output_addr_const_pdp11): Correct format mismatch warnings.
6302 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6303 * config/pdp11/pdp11.md: General change to add base_cost and/or
6304 length attributes for use by new pdp11_insn_cost function.
6305 (MIN_BRANCH): Correct definition.
6306 (MIN_SOB): Ditto.
6307 (doloop_end): Use standard pattern name for looping pattern.
6308 (doloop_end_nocc): New.
6309 (movsf): Add another constraint alternative.
6310 (zero_extendqihi2): Add constraint alternatives for not in place
6311 extend.
6312 (zero_extendhisi2): Remove.
6313 (shift patterns): Add CC handling variants.
6314 (bswaphi2): New.
6315 (bswapsi2): New.
6316 (rothi3): New.
6317 (define_peephole2): New peephole to recognize mov that sets CC for
6318 subsequent test.
6319
6320 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6321
6322 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6323 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6324 wi::add.
6325
6326 2018-07-09 Jakub Jelinek <jakub@redhat.com>
6327
6328 PR c/86420
6329 * real.c (real_nextafter): Return true if result is denormal.
6330
6331 2018-07-09 Martin Liska <mliska@suse.cz>
6332
6333 * common.opt: Add back wrongly removed attribute.
6334
6335 2018-07-09 Richard Biener <rguenther@suse.de>
6336
6337 PR debug/86413
6338 * dwarf2out.c (gen_block_die): For an early generated DIE
6339 always output high/low PC attributes.
6340
6341 2018-07-09 Tom de Vries <tdevries@suse.de>
6342
6343 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6344 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6345 onto VAR_DECL with abstract origin.
6346
6347 2018-07-07 Jim Wilson <jimw@sifive.com>
6348
6349 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6350
6351 2018-07-07 Tom de Vries <tdevries@suse.de>
6352
6353 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6354
6355 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
6356
6357 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6358 overflow_type.
6359 (combine_bound): Use wide-int overflow calculation instead of
6360 rolling our own.
6361 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6362 overflow_type.
6363 * fold-const.c (int_const_binop_2): Same.
6364 (extract_muldiv_1): Same.
6365 (fold_div_compare): Same.
6366 (fold_abs_const): Same.
6367 * match.pd: Same.
6368 * poly-int.h (add): Same.
6369 (sub): Same.
6370 (neg): Same.
6371 (mul): Same.
6372 * predict.c (predict_iv_comparison): Same.
6373 * profile-count.c (slow_safe_scale_64bit): Same.
6374 * simplify-rtx.c (simplify_const_binary_operation): Same.
6375 * tree-chrec.c (tree_fold_binomial): Same.
6376 * tree-data-ref.c (split_constant_offset_1): Same.
6377 * tree-if-conv.c (idx_within_array_bound): Same.
6378 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6379 * tree-ssa-phiopt.c (minmax_replacement): Same.
6380 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6381 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6382 * vr-values.c (vr_values::adjust_range_with_scev): Same.
6383 * wide-int.cc (wi::add_large): Same.
6384 (wi::mul_internal): Same.
6385 (wi::sub_large): Same.
6386 (wi::divmod_internal): Same.
6387 * wide-int.h: Change overflow type to overflow_type for neg, add,
6388 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6389 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6390 mul_internal, divmod_internal.
6391 (overflow_type): New enum.
6392 (accumulate_overflow): New.
6393
6394 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6395
6396 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6397 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6398
6399 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6400
6401 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6402 argument is checked for zero before entering loop, avoid checking again.
6403
6404 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
6405
6406 * gimplify.h (generic_expr_could_trap_p): Set as global function.
6407 * gimplify.h (generic_expr_could_trap_p): Likwise.
6408 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6409
6410 2018-07-06 Jakub Jelinek <jakub@redhat.com>
6411
6412 PR tree-optimization/86401
6413 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6414 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6415 (fold_bit_and_mask): ... here. New helper function for match.pd.
6416 * fold-const.h (fold_bit_and_mask): Declare.
6417 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6418
6419 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
6420
6421 PR target/86324
6422 * target.def (translate_mode_attribute): New hook.
6423 * targhooks.h (default_translate_mode_attribute): Declare.
6424 * targhooks.c (default_translate_mode_attribute): New function.
6425 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6426 * doc/tm.texi: Regenerate.
6427 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6428 (rs6000_translate_mode_attribute): New function.
6429
6430 2018-07-06 Paul Koning <ni1d@arrl.net>
6431
6432 * doc/md.texi (define_split): Document DONE and FAIL.
6433 (define_peephole2): Ditto.
6434
6435 2018-07-05 Jeff Law <law@redhat.com>
6436
6437 PR tree-optimization/86010
6438 * tree-ssa-dse.c (compute_trims): More aggressively trim at
6439 both the head and tail of mem* and str* calls.
6440
6441 2018-07-05 Jim Wilson <jimw@sifive.com>
6442
6443 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6444
6445 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
6446
6447 * config/aarch64/aarch64-simd.md: correct flags text for
6448 MIN_EXPR replacement.
6449
6450 2018-07-05 James Clarke <jrtc27@jrtc27.com>
6451
6452 * configure: Regenerated.
6453
6454 2018-07-05 Carl Love <cel@us.ibm.com>
6455
6456 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6457 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6458 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6459 VSX_BUILTIN_DOUBLEL_V4SF.
6460
6461 2018-07-05 Martin Sebor <msebor@redhat.com>
6462
6463 PR c++/86400
6464 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6465 than its domain to compute its the upper bound of a char array.
6466
6467 2018-07-05 Nathan Sidwell <nathan@acm.org>
6468
6469 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6470 * doc/cpp.texi: Update comment.
6471 * doc/tm.texi: Rebuilt.
6472 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6473 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6474 * doc/extend.texi (Backwards Compatibility): Clarify it is system
6475 headers affected by extern "C".
6476 * system.h: Poison NO_IMPLICIT_EXTERN_C.
6477 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6478 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6479 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6480 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6481 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6482 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6483 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6484 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6485 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6486 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6487 config/sparc/sp64-elf.h, config/spu/spu.h,
6488 config/stormy16/stormy16.h, config/v850/v850.h,
6489 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6490 define NO_IMPLICIT_EXTERN_C.
6491 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6492
6493 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6494
6495 PR target/84711
6496 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6497 instead of GET_MODE_SIZE when comparing Units.
6498
6499 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6500
6501 PR target/84711
6502 * rtlanal.c (set_noop_p): Constrain on mode change,
6503 include hard-reg-set.h
6504
6505 2018-07-05 Tamar Christina <tamar.christina@arm.com>
6506
6507 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6508
6509 2018-07-05 Jakub Jelinek <jakub@redhat.com>
6510
6511 Revert
6512 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6513
6514 PR sanitizer/84250
6515 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6516 libasan.
6517 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6518
6519 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
6520
6521 PR sanitizer/84250
6522 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6523 libasan.
6524 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6525
6526 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
6527
6528 PR middle-end/86380
6529 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6530
6531 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
6532
6533 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6534 neg_*_op* variables.
6535
6536 2018-07-04 Martin Liska <mliska@suse.cz>
6537
6538 * tree-switch-conversion.c: Define
6539 max_ratio_for_speed and max_ratio_for_size constants.
6540
6541 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6542 Martin Liska <mliska@suse.cz>
6543
6544 PR middle-end/66240
6545 PR target/45996
6546 PR c/84100
6547 * common.opt: Rename align options with 'str_' prefix.
6548 * common/config/i386/i386-common.c (set_malign_value): New
6549 function.
6550 (ix86_handle_option): Use it to set -falign-* options/
6551 * config/aarch64/aarch64-protos.h (struct tune_params): Change
6552 type from int to string.
6553 * config/aarch64/aarch64.c: Update default values from int
6554 to string.
6555 * config/alpha/alpha.c (alpha_override_options_after_change):
6556 Likewise.
6557 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6558 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6559 max skip conditionally.
6560 * config/i386/freebsd.h (SUBALIGN_LOG): New.
6561 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6562 max skip conditionally.
6563 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6564 max skip conditionally.
6565 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6566 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6567 max skip conditionally.
6568 * config/i386/i386.c (struct ptt): Change type from int to
6569 string.
6570 (ix86_default_align): Set default values.
6571 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6572 max skip conditionally.
6573 * config/i386/iamcu.h (SUBALIGN_LOG): New.
6574 (ASM_OUTPUT_MAX_SKIP_ALIGN):
6575 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6576 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6577 max skip conditionally.
6578 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6579 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6580 * config/i386/x86-64.h (SUBALIGN_LOG): New.
6581 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6582 max skip conditionally.
6583 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6584 * config/ia64/ia64.c (ia64_option_override): Set default values
6585 for alignment options.
6586 * config/m68k/m68k.c: Handle new str_align_* options.
6587 * config/mips/mips.c (mips_set_compression_mode): Change
6588 type of constants.
6589 (mips_option_override): Set default values for options.
6590 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6591 Likewise.
6592 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6593 Likewise.
6594 * config/rx/rx.c (rx_option_override): Likewise.
6595 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6596 (LABEL_ALIGN): Use align_labels_log.
6597 (LOOP_ALIGN): Use align_loops_align.
6598 * config/s390/s390.c (s390_asm_output_function_label): Use new
6599 macros.
6600 * config/sh/sh.c (sh_override_options_after_change):
6601 Change type of constants.
6602 * config/spu/spu.c (spu_sched_init): Likewise.
6603 * config/sparc/sparc.c (sparc_option_override): Set default
6604 values for options.
6605 * config/visium/visium.c (visium_option_override): Likewise.
6606 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6607 emit p2align format with last argument if it's not needed.
6608 * doc/invoke.texi: Document extended format of -falign-*.
6609 * final.c: Use align_labels alignment.
6610 * flags.h (struct target_flag_state): Change type to use
6611 align_flags.
6612 (struct align_flags_tuple): New.
6613 (struct align_flags): Likewise.
6614 (align_loops_log): Redefine macro to use new types.
6615 (align_loops_max_skip): Redefine macro to use new types.
6616 (align_jumps_log): Redefine macro to use new types.
6617 (align_jumps_max_skip): Redefine macro to use new types.
6618 (align_labels_log): Redefine macro to use new types.
6619 (align_labels_max_skip): Redefine macro to use new types.
6620 (align_functions_log): Redefine macro to use new types.
6621 (align_loops): Redefine macro to use new types.
6622 (align_jumps): Redefine macro to use new types.
6623 (align_labels): Redefine macro to use new types.
6624 (align_functions): Redefine macro to use new types.
6625 (align_functions_max_skip): Redefine macro to use new types.
6626 (align_loops_value): New macro.
6627 (align_jumps_value): New macro.
6628 (align_labels_value): New macro.
6629 (align_functions_value): New macro.
6630 * function.c (invoke_set_current_function_hook): Propagate
6631 alignment values from flags to global variables default in
6632 topleev.h.
6633 * ipa-icf.c (sem_function::equals_wpa): Use
6634 cl_optimization_option_eq instead of memcmp.
6635 * lto-streamer.h (cl_optimization_stream_out): Support streaming
6636 of string types.
6637 (cl_optimization_stream_in): Likewise.
6638 * optc-save-gen.awk: Support strings in cl_optimization.
6639 * opth-gen.awk: Likewise.
6640 * opts.c (finish_options): Remove error checking of invalid
6641 value ranges.
6642 (MAX_CODE_ALIGN): Remove.
6643 (MAX_CODE_ALIGN_VALUE): Likewise.
6644 (parse_and_check_align_values): New function.
6645 (check_alignment_argument): Likewise.
6646 (common_handle_option): Use check_alignment_argument.
6647 * opts.h (parse_and_check_align_values): Declare.
6648 * toplev.c (init_alignments): Remove.
6649 (read_log_maxskip): New.
6650 (parse_N_M): Likewise.
6651 (parse_alignment_opts): Likewise.
6652 (backend_init_target): Remove usage of init_alignments.
6653 * toplev.h (parse_alignment_opts): Declare.
6654 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6655 argument.
6656 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6657 * tree.c (cl_option_hasher::equal): New.
6658 * varasm.c: Use new global macros.
6659
6660 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
6661
6662 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6663 Use a simpler align directive also if MAXSKIP = ALIGN-1.
6664 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6665 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6666 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6667 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6668 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6669 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6670 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6671 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6672 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6673 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6674 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6675
6676 2018-07-04 Martin Liska <mliska@suse.cz>
6677 Jonathan Wakely <jwakely@redhat.com>
6678
6679 * coverage.c: Use correct type.
6680 * doc/invoke.texi: Language correction.
6681
6682 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
6683
6684 PR target/85620
6685 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6686 ENDBRANCH for non-tail call which may return via indirect branch.
6687 * doc/extend.texi: Document indirect_return attribute.
6688
6689 2018-07-03 Martin Sebor <msebor@redhat.com>
6690
6691 PR tree-optimization/86274
6692 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6693 precondition.
6694 (format_floating): Correct handling of infinities and NaNs.
6695
6696 2018-07-03 Martin Sebor <msebor@redhat.com>
6697
6698 * print-tree.c (print_real_cst): New function.
6699 (print_node_brief): Call it.
6700 (print_node): Ditto.
6701
6702 2018-07-03 Jeff Law <law@redhat.com>
6703
6704 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6705 into a single pattern.
6706
6707 * config/h8300/h8300.md (ors code_iterator): New.
6708 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6709 a single pattern and single splitter.
6710 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6711 (iorqi3_1, xorqi3_1): Likewise.
6712 (iorqi3, xorqi3 expanders): Similarly.
6713
6714 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6715 (movmd_internal) into a single pattern using the P mode iterator.
6716 (movmd splitters): Similarly.
6717 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6718 (movsd splitters): Similarly.
6719
6720 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6721 ADDB, ADDW and ADDL into a single ADD attribute which selects the
6722 right table based on the size of the operand.
6723 * config/h8300/h8300.md (length_table): Corresponding changes. All
6724 references to "addb", "addw" and "addl" changed to "add".
6725 (btst patterns): Merge two variants into a single pattern.
6726 (tstqi, tsthi): Likewise.
6727 (addhi3_incdec, addsi3_incdec): Likewise.
6728 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6729 (mulhi3, mulsi3): Likewise.
6730 (udivhi3, udivsi3): Likewise.
6731 (divhi3, divsi3): Likewise.
6732 (andorqi3, andorhi3, andorsi3): Likewise.
6733
6734 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
6735
6736 PR target/85694
6737 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6738 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6739
6740 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6741
6742 PR tree-optimization/85694
6743 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6744 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6745 UNSPEC_URHADD.
6746 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6747 (<u>avg<mode>3_ceil): New patterns.
6748
6749 2018-07-03 David Malcolm <dmalcolm@redhat.com>
6750
6751 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6752 scan-tree-dump directive.
6753 * gcc.dg/vect/slp-perm-2.c: Likewise.
6754 * gcc.dg/vect/slp-perm-3.c: Likewise.
6755 * gcc.dg/vect/slp-perm-5.c: Likewise.
6756 * gcc.dg/vect/slp-perm-6.c: Likewise.
6757 * gcc.dg/vect/slp-perm-7.c: Likewise.
6758 * gcc.dg/vect/slp-perm-8.c: Likewise.
6759
6760 2018-07-03 Marek Polacek <polacek@redhat.com>
6761
6762 PR middle-end/86202
6763 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6764
6765 2018-07-03 Richard Biener <rguenther@suse.de>
6766
6767 PR ipa/86389
6768 * tree-ssa-structalias.c (find_func_clobbers): Properly
6769 handle indirect calls.
6770
6771 2018-07-03 Jeff Law <law@redhat.com>
6772
6773 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6774 (shifts): New code iterator.
6775 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6776 expander. Fix HImode handling on H8/SX.
6777 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6778 (subqi3, subhi3, subsi3 expanders): Likewise.
6779 (andqi3, andhi3, andsi3 expanders): Likewise.
6780 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6781 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6782 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6783 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6784 (zero_extendqihi2, zero_extendqisi2): Likewise.
6785 (extendqihi2, extendqisi2): Likewise.
6786 (rotlqi3, rotlhi3, rotlsi3): Likewise.
6787 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6788 (rotlqi3_1, rotlhi3_1): Likewise.
6789 (logicalhi3_sn, logicalsi3_sn): Likewise.
6790 (logicalhi3, logicalsi3): Likewise.
6791
6792 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6793
6794 * tree-vect-patterns.c (vect_recog_rotate_pattern)
6795 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6796 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6797 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6798 type to append_pattern_def_seq instead of creating a stmt_vec_info
6799 directly.
6800 (build_mask_conversion): Likewise. Remove vinfo argument.
6801 (vect_add_conversion_to_patterm): Likewise, renaming to...
6802 (vect_add_conversion_to_pattern): ...this.
6803 (vect_recog_mask_conversion_pattern): Update call to
6804 build_mask_conversion. Pass the vector type to
6805 append_pattern_def_seq here too.
6806 (vect_recog_gather_scatter_pattern): Update call to
6807 vect_add_conversion_to_pattern.
6808
6809 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6810
6811 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6812 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6813 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6814 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6815 STMT_VINFO_PATTERN_DEF_SEQ to null here.
6816 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6817 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6818 append_pattern_def_seq instead of new_pattern_def_seq.
6819 (vect_recog_divmod_pattern): Do both of the above.
6820 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6821 is null.
6822
6823 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6824
6825 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6826 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6827 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6828 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6829 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6830 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6831 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6832 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6833 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6834 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6835 parameter with a single stmt_vec_info.
6836 (vect_recog_func_ptr): Likewise.
6837 (vect_recog_gather_scatter_pattern): Likewise, folding in...
6838 (vect_try_gather_scatter_pattern): ...this.
6839 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6840 the stmt_vec_info of the statement to be matched. Don't clear
6841 STMT_VINFO_RELATED_STMT.
6842 (vect_pattern_recog): Update call accordingly.
6843
6844 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6845
6846 PR tree-optimization/85694
6847 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6848 (uavgM3_ceil): Document new optabs.
6849 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6850 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6851 functions.
6852 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6853 (savg_ceil_optab): New optabs.
6854 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6855 (vect_vect_recog_func_ptrs): Add it.
6856 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6857 constant directly from the associated lhs.
6858
6859 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6860
6861 * tree-vect-patterns.c (vect_split_statement): New function.
6862 (vect_convert_input): Use it to try to split an existing cast.
6863
6864 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6865
6866 * poly-int.h (print_hex): New function.
6867 * dumpfile.h (dump_dec, dump_hex): Declare.
6868 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6869 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6870 min_input_precision, operation_precision and operation_sign.
6871 * tree-vect-patterns.c (vect_get_range_info): New function.
6872 (vect_same_loop_or_bb_p, vect_single_imm_use)
6873 (vect_operation_fits_smaller_type): Delete.
6874 (vect_look_through_possible_promotion): Add an optional
6875 single_use_p parameter.
6876 (vect_recog_over_widening_pattern): Rewrite to use new
6877 stmt_vec_info infomration. Handle one operation at a time.
6878 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6879 (vect_truncatable_operation_p, vect_set_operation_type)
6880 (vect_set_min_input_precision): New functions.
6881 (vect_determine_min_output_precision_1): Likewise.
6882 (vect_determine_min_output_precision): Likewise.
6883 (vect_determine_precisions_from_range): Likewise.
6884 (vect_determine_precisions_from_users): Likewise.
6885 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6886 (vect_vect_recog_func_ptrs): Put over_widening first.
6887 Add cast_forwprop.
6888 (vect_pattern_recog): Call vect_determine_precisions.
6889
6890 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
6891
6892 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6893 statements that have been replaced by further pattern statements.
6894 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6895
6896 2018-07-03 Richard Biener <rguenther@suse.de>
6897
6898 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6899 always set *dt. Dump vectype in vectype overload.
6900 * dumpfile.h (dump_gimple_expr): New function.
6901 (dump_gimple_expr_loc): Likewise.
6902 * dumpfile.c (dump_gimple_expr): New function.
6903 (dump_gimple_expr_loc): Likewise.
6904
6905 2018-07-02 Jeff Law <law@redhat.com>
6906
6907 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6908 the H8/300, H8/300H and H8/S variants into a single pattern.
6909 (movhi_h8300, movqi_h8300hs): Similarly.
6910 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6911 (QHI mode iterator): New.
6912
6913 * config/h8300/h8300.md: Remove trailing whitespace.
6914
6915 2018-07-02 Jim Wilson <jimw@sifive.com>
6916
6917 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6918 instead of emit_insn for interrupt returns.
6919 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6920 (riscv_sret, riscv_uret): Likewise.
6921
6922 2018-07-02 David Malcolm <dmalcolm@redhat.com>
6923
6924 * pretty-print.c (selftest::test_pp_format): Move save and restore
6925 of quotes to class auto_fix_quotes, and add an instance.
6926 * selftest.c: Include "intl.h".
6927 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6928 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6929 * selftest.h (selftest::auto_fix_quotes): New class.
6930
6931 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
6932
6933 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6934 (aarch64_sve_prepare_conditional_op): Remove.
6935 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6936 Allow aarch64_simd_reg_or_zero as select operand; remove
6937 the aarch64_sve_prepare_conditional_op call.
6938 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6939 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6940 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6941 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6942 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6943 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6944 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6945 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6946 and a splitters to match all of the *_any patterns.
6947 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6948
6949 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6950 (SVE_COND_FP_BINARY_REV): Remove.
6951 (sve_int_op_rev, sve_fp_op_rev): New.
6952 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6953 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6954 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6955 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6956 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6957 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6958 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6959 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6960 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6961
6962 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6963 Remove match_dup 1 from the inner unspec.
6964 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6965
6966 * config/aarch64/aarch64.md (movprfx): New attr.
6967 (length): Default movprfx to 8.
6968 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6969 (*madd<SVE_I>, *msub<SVE_I): Likewise.
6970 (*<su>mul<SVE_I>3_highpart): Likewise.
6971 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6972 (*v<ASHIFT><SVE_I>3): Likewise.
6973 (*<su><MAXMIN><SVE_I>3): Likewise.
6974 (*<su><MAXMIN><SVE_F>3): Likewise.
6975 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6976 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6977 (*div<SVE_F>4): Likewise.
6978
6979 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
6980
6981 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6982 in dump string.
6983
6984 2018-07-02 Richard Biener <rguenther@suse.de>
6985
6986 PR tree-optimization/86363
6987 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6988 memset argument refers to a non-variable address.
6989
6990 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6991
6992 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6993 {PLUS,MINUS}_EXPR code to...
6994 (adjust_symbolic_bound): ...here,
6995 (combine_bound): ...here,
6996 (set_value_range_with_overflow): ...and here.
6997
6998 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
6999
7000 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
7001 code...
7002 (extract_range_from_abs_expr): ...here.
7003
7004 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
7005
7006 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
7007 -fno-omit-frame-pointer when not optimizing.
7008
7009 2018-07-02 Martin Liska <mliska@suse.cz>
7010
7011 PR ipa/86279
7012 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
7013 (propagate_nothrow): Likewise.
7014
7015 2018-07-02 Martin Liska <mliska@suse.cz>
7016
7017 PR ipa/86323
7018 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
7019
7020 2018-07-02 David Malcolm <dmalcolm@redhat.com>
7021
7022 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
7023 function in r262149, changing "loc" param from source_location to
7024 const dump_location_t &.
7025 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
7026 declaration, as above.
7027
7028 2018-07-01 Paul Koning <ni1d@arrl.net>
7029
7030 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7031 -munit-asm, -mgnu-asm, -mdec-asm.
7032 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
7033 (pdp11_output_labelref): New.
7034 (pdp11_output_def): New.
7035 (pdp11_output_addr_vec_elt): New.
7036 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
7037 %# and %@ format codes.
7038 (pdp11_option_override): New.
7039 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
7040 (pdp11_output_ident): New.
7041 (pdp11_asm_named_section): New.
7042 (pdp11_asm_init_sections): New.
7043 (pdp11_file_start): New.
7044 (pdp11_file_end): New.
7045 (output_ascii): Use .ascii/.asciz for -mdec-asm.
7046 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
7047 %o, like %c but octal.
7048 (pdp11_option_override): New.
7049 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
7050 -mdec-asm.
7051 (DATA_SECTION_ASM_OP): Ditto.
7052 (READONLY_DATA_SECTION_ASM_OP): New.
7053 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
7054 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
7055 (ASM_OUTPUT_LABELREF): Ditto.
7056 (ASM_OUTPUT_DEF): Ditto.
7057 (ASM_OUTPUT_EXTERNAL): New.
7058 (ASM_OUTPUT_SOURCE_FILENAME): New.
7059 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
7060 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
7061 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
7062 %# and %@ format codes.
7063 * config/pdp11/pdp11.opt (mgnu-asm): New.
7064 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
7065 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
7066 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
7067
7068 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
7069
7070 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
7071 dereferencing path[] beyond its length.
7072 (debug_path): New.
7073 (debug_all_paths): New.
7074 (rewire_first_differing_edge): New.
7075 (adjust_paths_after_duplication): New.
7076 (duplicate_thread_path): Call adjust_paths_after_duplication.
7077 Add new argument.
7078 (thread_through_all_blocks): Add new argument to
7079 duplicate_thread_path.
7080
7081 2018-06-30 Jim Wilson <jimw@sifive.com>
7082
7083 * config/riscv/predicates.md (p2m1_shift_operand): New.
7084 (high_mask_shift_operand): New.
7085 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
7086 pattern using p2m1_shift_operand.
7087 (lshsi3_zero_extend_3+2): New combiner pattern using
7088 high_mask_shift_operand.
7089
7090 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7091
7092 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7093 split out from...
7094 (vect_recog_rotate_pattern): ...here.
7095 (vect_convert_input): Try to insert casts of invariants in the
7096 preheader.
7097 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7098 preheader to be empty.
7099
7100 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7101
7102 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7103 vector type. If given, install it in the new statement's
7104 STMT_VINFO_VECTYPE.
7105 (vect_element_precision): New function.
7106 (vect_unpromoted_value): New struct.
7107 (vect_unpromoted_value::vect_unpromoted_value): New function.
7108 (vect_unpromoted_value::set_op): Likewise.
7109 (vect_look_through_possible_promotion): Likewise.
7110 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7111 (vect_widened_op_tree, vect_convert_input): Likewise.
7112 (vect_convert_inputs, vect_convert_output): Likewise.
7113 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7114 to handle the optional cast of the multiplication result and
7115 vect_widened_op_tree to detect the widened multiplication itself.
7116 Do not require the input and output of promotion casts to have
7117 the same sign, but base the signedness of the operation on the
7118 input rather than the result. If the pattern includes two
7119 promotions, check that those promotions have the same sign.
7120 Do not restrict the MULT_EXPR handling to a double-width result;
7121 handle quadruple-width results and wider. Use vect_convert_inputs
7122 to convert the inputs to the common type.
7123 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
7124 to handle the optional cast of the ABS result. Also allow a sign
7125 change or a sign extension between the ABS and MINUS.
7126 Use vect_widened_op_tree to detect the widened subtraction and use
7127 vect_convert_inputs to convert the inputs to the common type.
7128 (vect_handle_widen_op_by_const): Delete.
7129 (vect_recog_widen_op_pattern): New function.
7130 (vect_recog_widen_mult_pattern): Use it.
7131 (vect_recog_widen_shift_pattern): Likewise.
7132 (vect_recog_widen_sum_pattern): Use
7133 vect_look_through_possible_promotion to handle the promoted
7134 PLUS_EXPR operand.
7135
7136 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7137
7138 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7139 the containing gimple_seq *.
7140 * gimple-iterator.h (gsi_for_stmt): Declare it.
7141 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7142 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7143 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7144 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7145 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7146 checks.
7147 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7148 split out from...
7149 (vect_mark_pattern_stmts): ...here. Handle cases in which the
7150 statement being replaced is part of an existing pattern
7151 definition sequence, inserting the new pattern statements before
7152 the original one.
7153 (vect_pattern_recog_1): Don't return a bool. If the statement
7154 is already part of a pattern, instead apply pattern matching
7155 to the pattern definition statements. Don't clear the
7156 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7157 (vect_pattern_recog): Don't break after the first match;
7158 continue processing the pattern definition statements instead.
7159 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7160
7161 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7162
7163 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7164 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7165 (vect_recog_widen_sum_pattern): Use it.
7166
7167 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7168
7169 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7170 phi is not a pattern statement and has not been replaced by
7171 a pattern statement.
7172 * tree-vect-patterns.c (type_conversion_p): Don't check
7173 STMT_VINFO_IN_PATTERN_P.
7174 (vect_recog_vector_vector_shift_pattern): Likewise.
7175 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7176 the pattern statement rather than the original statement; check
7177 directly for a WIDEN_MULT_EXPR here.
7178 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7179 vect_is_simple_use to return the pattern statement rather
7180 than the original statement; use is_pattern_stmt_p to check
7181 for such a pattern statement.
7182 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7183 to return the pattern statement rather than the original statement;
7184 don't do the same transformation here.
7185 (vect_is_simple_use): If the defining statement has been replaced
7186 by a pattern statement, return the pattern statement instead.
7187 Remove the corresponding (local) transformation from the vectype
7188 overload.
7189
7190 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
7191
7192 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7193 end and default to null.
7194 * tree-vect-loop.c (vect_create_epilog_for_reduction)
7195 (vectorizable_reduction): Update calls accordingly, dropping the
7196 gimple ** argument if the passed-back statement isn't needed.
7197 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7198 (vect_recog_rotate_pattern): Likewise.
7199 (vect_recog_mask_conversion_pattern): Likewise.
7200 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7201 (vect_mask_constant_operand_p): Likewise.
7202 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7203 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7204 (get_group_load_store_type, get_load_store_type): Likewise.
7205 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7206 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7207 (vectorizable_conversion, vectorizable_assignment): Likewise.
7208 (vectorizable_shift, vectorizable_operation): Likewise.
7209 (vectorizable_store, vect_is_simple_cond): Likewise.
7210 (vectorizable_condition, vectorizable_comparison): Likewise.
7211 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7212 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7213 and move it to the end. Cope with null def_stmt_outs.
7214
7215 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7216
7217 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7218
7219 2018-06-29 Jeff Law <law@redhat.com>
7220
7221 * config/v850/v850.c (v850_legitimate_address_p): Handle large
7222 displacements for TARGET_V850E2V3 and newer.
7223 (TARGET_LRA_P): Remove. Defaults to LRA now.
7224 * config/v850/v850.md (sign23byte_load): Remove.
7225 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7226 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7227
7228 2018-06-29 Martin Liska <mliska@suse.cz>
7229
7230 PR lto/85759
7231 * coverage.c (coverage_init): Mangle full path name.
7232 * doc/invoke.texi: Document the change.
7233 * gcov-io.c (mangle_path): New.
7234 * gcov-io.h (mangle_path): Likewise.
7235 * gcov.c (mangle_name): Use mangle_path for path mangling.
7236
7237 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7238
7239 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7240 if starting source register is not even.
7241
7242 2018-06-29 Martin Liska <mliska@suse.cz>
7243
7244 PR tree-optimization/86263
7245 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7246 Make edge redirection.
7247
7248 2018-06-29 David Malcolm <dmalcolm@redhat.com>
7249
7250 * dumpfile.c (dump_loc): Add indentation based on scope depth.
7251 (dump_scope_depth): New variable.
7252 (get_dump_scope_depth): New function.
7253 (dump_begin_scope): New function.
7254 (dump_end_scope): New function.
7255 * dumpfile.h (get_dump_scope_depth): New declaration.
7256 (dump_begin_scope): New declaration.
7257 (dump_end_scope): New declaration.
7258 (class auto_dump_scope): New class.
7259 (AUTO_DUMP_SCOPE): New macro.
7260 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7261 AUTO_DUMP_SCOPE.
7262
7263 2018-06-29 Richard Biener <rguenther@suse.de>
7264
7265 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7266 compute_all_dependences succeeds.
7267 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7268 exceed --param loop-max-datarefs-for-datadeps.
7269
7270 2018-06-29 Jakub Jelinek <jakub@redhat.com>
7271
7272 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7273
7274 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
7275
7276 PR target/86348
7277 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7278 alternative 0 in preferred_for_speed attribute.
7279
7280 2018-06-28 Paul Koning <ni1d@arrl.net>
7281
7282 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7283 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7284 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7285 * config/pdp11/pdp11.md: Correct "length" attribute calculation
7286 for shift insn patterns.
7287
7288 2018-06-28 David Malcolm <dmalcolm@redhat.com>
7289
7290 * cgraph.c (cgraph_node::get_body): Replace assignments to
7291 "dump_file" with calls to set_dump_file.
7292 * dumpfile.c (alt_dump_file): Make static, and group with...
7293 (alt_flags): ...this definition.
7294 (dumps_are_enabled): New variable.
7295 (refresh_dumps_are_enabled): New function.
7296 (set_dump_file): New function.
7297 (set_alt_dump_file): New function.
7298 (gcc::dump_manager::dump_start): Replace assignments to
7299 "dump_file" and "alt_dump_file" with calls to set_dump_file and
7300 set_alt_dump_file.
7301 (gcc::dump_manager::dump_finish): Likewise.
7302 * dumpfile.h (alt_dump_file): Delete decl.
7303 (dumps_are_enabled): New variable decl.
7304 (set_dump_file): New function decl.
7305 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7306 global.
7307 * tree-nested.c (lower_nested_functions): Replace assignments to
7308 "dump_file" with calls to set_dump_file.
7309
7310 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7311
7312 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7313 goto_locus of each outgoing edge of each basic block.
7314
7315 2018-06-28 Richard Biener <rguenther@suse.de>
7316
7317 * dwarf2out.c (decl_scope_table): Remove.
7318 (push_decl_scope): Likewise.
7319 (pop_decl_scope): Likewise.
7320 (gen_type_die_for_member): Do not call push/pop_decl_scope.
7321 (gen_struct_or_union_type_die): Likewise.
7322 (gen_tagged_type_die): Likewise.
7323 (dwarf2out_init): Do not initialize decl_scope_table.
7324 (dwarf2out_c_finalize): Do not free it.
7325
7326 2018-06-28 Richard Biener <rguenther@suse.de>
7327
7328 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7329 deciding whether to not re-use a DIE.
7330
7331 2018-06-28 Richard Biener <rguenther@suse.de>
7332
7333 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7334 DW_AT_abstract_origin attribute.
7335
7336 2018-06-28 Martin Liska <mliska@suse.cz>
7337
7338 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7339 Use newly introduced constants.
7340 * tree-switch-conversion.h (struct jump_table_cluster):
7341 Define max_ratio_for_size and max_ratio_for_speed.
7342
7343 2018-06-28 Martin Liska <mliska@suse.cz>
7344
7345 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7346 Add new checking assert to catch invalid state.
7347 (jump_table_cluster::can_be_handled): Handle single case
7348 clusters.
7349 (jump_table_cluster::is_beneficial): Bail out for such case.
7350 (bit_test_cluster::find_bit_tests):
7351 Add new checking assert to catch invalid state.
7352 (bit_test_cluster::can_be_handled): Handle single case
7353 clusters.
7354 (bit_test_cluster::is_beneficial): Bail out for such case.
7355 (switch_decision_tree::analyze_switch_statement):
7356 Fix comment.
7357
7358 2018-06-28 Martin Liska <mliska@suse.cz>
7359
7360 * common.opt: Introduce -completion option.
7361 * gcc.c (driver_handle_option): Handle it.
7362 (driver::main): Print completions if completion
7363 is set.
7364 * opt-suggestions.c (option_proposer::get_completions):
7365 New function.
7366 (option_proposer::suggest_completion): Likewise.
7367 (option_proposer::find_param_completions): Likewise.
7368 (verify_autocompletions): Likewise.
7369 (test_completion_valid_options): Likewise.
7370 (test_completion_valid_params): Likewise.
7371 (in_completion_p): Likewise.
7372 (empty_completion_p): Likewise.
7373 (test_completion_partial_match): Likewise.
7374 (test_completion_garbage): Likewise.
7375 (opt_proposer_c_tests): Likewise.
7376 * opt-suggestions.h: Declare new functions.
7377 * opts.c (common_handle_option): Handle OPT__completion_.
7378 * selftest-run-tests.c (selftest::run_tests): Add
7379 opt_proposer_c_tests.
7380 * selftest.c (assert_str_startswith): New.
7381 * selftest.h (assert_str_startswith): Likewise.
7382 (opt_proposer_c_tests): New.
7383 (ASSERT_STR_STARTSWITH): Likewise.
7384
7385 2018-06-28 Martin Liska <mliska@suse.cz>
7386
7387 * Makefile.in: Add opt-suggestions.o.
7388 * gcc-main.c: Include opt-suggestions.h.
7389 * gcc.c (driver::driver): Likewise.
7390 (driver::~driver): Remove m_option_suggestions.
7391 (driver::build_option_suggestions): Moved to option_proposer.
7392 (driver::suggest_option): Likewise.
7393 (driver::handle_unrecognized_options): Use option_proposer.
7394 * gcc.h (class driver): Add new memver m_option_proposer.
7395 * opt-suggestions.c: New file.
7396 * opt-suggestions.h: New file.
7397
7398 2018-06-28 Martin Liska <mliska@suse.cz>
7399
7400 * vec.h (class auto_string_vec): New (moved from auto_argvec).
7401 (auto_string_vec::~auto_string_vec): Likewise.
7402
7403 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
7404
7405 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7406 prevent_decl_creation_for_types fields up and add reset_location field.
7407 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7408 statement if id->reset_location is true.
7409 (copy_edges_for_bb): Do not set goto_locus on the new edges if
7410 id->reset_location is true.
7411 (copy_phis_for_bb): Force input_location on the arguments if
7412 id->reset_location is true.
7413 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7414 is set on the function to be inlined.
7415
7416 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
7417
7418 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7419
7420 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
7421
7422 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7423 registers for Pmode.
7424 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7425 hard registers for the clobbered pseudo.
7426
7427 2018-06-27 Paul Koning <ni1d@arrl.net>
7428
7429 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7430 mutually exclusive options.
7431 * config/pdp11/constraints.md (h): New constraint.
7432 (O): Update definition to match shift code generation.
7433 (D): New constraint.
7434 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7435 (CCFP): Remove.
7436 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7437 function.
7438 (output_jump): Change arguments.
7439 (pdp11_fixed_cc_regs): New function.
7440 (pdp11_cc_mode): Ditto.
7441 (pdp11_expand_shift): Ditto.
7442 (pdp11_assemble_shift): Ditto.
7443 (pdp11_small_shift): Ditto.
7444 (pdp11_branch_cost): Remove.
7445 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7446 from output.
7447 (pdp11_register_move_cost): Update for CC registers.
7448 (pdp11_rtx_costs): Add case for LSHIFTRT.
7449 (pdp11_output_jump): Add CCNZ mode conditional branches.
7450 (notice_update_cc_on_set): Remove.
7451 (pdp11_cc_mode): New function.
7452 (simple_memory_operand): Correct pre/post decrement case.
7453 (no_side_effect_operand): New function.
7454 (pdp11_regno_reg_class): Add CC_REGS class.
7455 (pdp11_fixed_cc_regs): New function.
7456 (pdp11_small_shift): New function.
7457 (pdp11_expand_shift): New function to expand shift insns.
7458 (pdp11_assemble_shift): New function to output shifts.
7459 (pdp11_branch_cost): Remove.
7460 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7461 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7462 (WCHAR_TYPE): Ditto.
7463 (PTRDIFF_TYPE): Ditto.
7464 (ADJUST_INSN_LENGTH): New macro.
7465 (FIXED_REGISTERS): Add CC registers.
7466 (CALL_USED_REGISTERS): Ditto.
7467 (reg_class): Ditto.
7468 (REG_CLASS_NAMES): Ditto.
7469 (REG_CLASS_CONTENTS): Ditto.
7470 (SELECT_CC_MODE): Use new function.
7471 (TARGET_FLAGS_REGNUM): New macro.
7472 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7473 (cc0_reg_rtx): Remove.
7474 (CC_STATUS_MDEP): Remove.
7475 (CC_STATUS_MDEFP_INIT): Remove.
7476 (CC_IN_FPU): Remove.
7477 (NOTICE_UPDATE_CC): Remove.
7478 (REGISTER_NAMES): Add CC registers.
7479 (BRANCH_COST): Change to constant 1.
7480 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7481 handling.
7482 * config/pdp11/pdp11.opt (mbcopy): Remove.
7483 (mbcopy-builtin): Remove.
7484 (mbranch-cheap): Remove.
7485 (mbranch-expensive): Remove.
7486 * config/pdp11/predicates.md (expand_shift_operand): Update to
7487 match shift code generation.
7488 (ccnz_operator): New predicate.
7489 * doc/invoke.texi (PDP-11 Options): Remove deleted options
7490 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7491 Remove non-existent option -mabshi, -mno-abshi. Document mutually
7492 exclusive options.
7493 * doc/md.texi (PDP-11): Document new D and h constraints. Update
7494 description of O constraint.
7495
7496 2018-06-27 Jeff Law <law@redhat.com>
7497 Austin Law <austinklaw@gmail.com>
7498
7499 * config/v850/v850.md (addsi3_set_flags): New pattern.
7500 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7501 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7502 (zero_extendhisi2_v850_set_flags): Likewise.
7503 (zero_extendqisi2_v850_set_flags): Likewise.
7504 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7505 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7506 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7507
7508 * config/v850/v850-protos.h (notice_update_cc): Remove.
7509 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7510 (v850_print_operand): Handle 'D' and "d".
7511 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7512 Add handling of arithmetic/logical operations compared against zero.
7513 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7514 Do not look at v850_compare_op, instead get mode from last argument.
7515 (v850_gen_compare): Remove
7516 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7517 after reload for prologue insns.
7518 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7519 patterns.
7520 (construct_save_jarl): Likewise.
7521 (TARGET_FLAGS_REGNUM): Define.
7522 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7523 (NOTICE_UPDATE_CC): Remove.
7524 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7525 than cc0. Conditionalize on reload_completed.
7526 (cmpsi_insn, setfcc_insn): Likewise.
7527 (tst1 splitter): Turn into define_and_split which sets the flags
7528 after reload.
7529 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7530 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7531 (cstoresf4, cstoredf4): Clobber the flags.
7532 (cmpsi, cmpsf, cmpdf): Remove expanders.
7533 (setf_insn): Remove pattern.
7534 (addsi3): Turn into define_and_split which clobbers the flags after
7535 reload and a suitable pattern (addsi3_clobber_flags) for use after
7536 reload.
7537 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7538 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7539 (ashrsi3, ashrsi3_v850e2): Likewise.
7540 (bins): Clobber the flags.
7541 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7542 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7543 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7544 (call_value_internal_short, call_value_internal_long): Likewise.
7545 (callt_save_interrupt, callt_return_interrupt): Likewise.
7546 (save_interrupt, return_interrupt): Likewise.
7547 (callt_save_all_interrupt, save_all_interrupt): Likewise.
7548 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7549 (restore_all_interrupt, _restore_all_interrupt): Likewise.
7550 (All FP comparisons): Only allow after reload has completed.
7551 (trfsr): Likewise.
7552 (divh, divhu): Tweak output template.
7553 (branch_z_normal, branch_z_invert): Remove
7554 (branch_nz_normal, branch_nz_invert): Likewise.
7555 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7556
7557 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7558 * config/v850/v850.c (notice_update_cc): Remove.
7559 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
7560 (CC_NO_CARRY): Likewise.
7561 (NOTICE_UPDATE_CC): Define to nothing.
7562 * config/v850/v850.md: Remove block comment on cc0 handling
7563 Remove "cc" attribute from all patterns. Remove cc_status handling
7564 from all patterns. Minor formatting fixes.
7565
7566 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7567
7568 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7569 (cortex-a76.cortex-a55): Likewise.
7570 * config/aarch64/aarch64-tune.md: Regenerate.
7571 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7572 cortex-a76.cortex-a55.
7573
7574 2018-06-27 Jeff Law <law@redhat.com>
7575
7576 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7577 (MULTILIB_DIRNAMES): Similarly.
7578
7579 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
7580
7581 * gimple.h (gimple_return_retbnd): Delete.
7582 (gimple_return_set_retbnd): Likewise.
7583 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7584 gimple_return_set_retbnd.
7585 * gimple-pretty-print.c (dump_gimple_return): Remove call to
7586 gimple_return_retbnd and adjust.
7587 * tree-inline.h (struct copy_body_data): Remove retbnd field.
7588 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7589 Explicitly return NULL in a couple more cases. Move assertion
7590 on debug statements and remove unreachable code.
7591 (reset_debug_binding): Do not test id->retbnd.
7592 (expand_call_inline): Do not set it.
7593
7594 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7595
7596 * configure.ac: Add --disable-gcov option.
7597 * configure: Regenerate.
7598 * Makefile.in: Honour @enable_gcov@.
7599 * doc/install.texi: Document --disable-gcov.
7600
7601 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7602
7603 * config/arm/arm-cpus.in (cortex-a76): New entry.
7604 (cortex-a76.cortex-a55): Likewise.
7605 * config/arm/arm-tables.opt: Regenerate.
7606 * config/arm/arm-tune.md: Likewise.
7607 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7608 * doc/invoke.texi (ARM Options): Document cortex-a76 and
7609 cortex-a76.cortex-a55.
7610
7611 2018-06-27 Tamar Christina <tamar.christina@arm.com>
7612
7613 PR target/85769
7614 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7615
7616 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
7617
7618 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7619 comment.
7620 (EPILOGUE_USES): Likewise.
7621
7622 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
7623
7624 * tree-inline.c (remap_location): New function extracted from...
7625 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
7626 (copy_phis_for_bb): ...here. Call remap_location.
7627 (copy_cfg_body): Adjust call to copy_edges_for_bb.
7628
7629 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
7630
7631 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7632 unaligned vsx for 16B memset.
7633
7634 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
7635
7636 PR target/86285
7637 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7638 ieee128_float_type_node to long_double_type_node unless
7639 TARGET_LONG_DOUBLE_128 is set.
7640
7641 2018-06-26 David Malcolm <dmalcolm@redhat.com>
7642
7643 * cfgloop.c (get_loop_location): Convert return type from
7644 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7645 by implicit construction from rtx_insn *, and using
7646 dump_user_location_t::from_function_decl for the fallback case.
7647 * cfgloop.h (get_loop_location): Convert return type from
7648 location_t to dump_user_location_t.
7649 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7650 dump_printf_loc to pass in a dump_location_t rather than a
7651 location_t, via the gimple stmt.
7652 * coverage.c (get_coverage_counts): Update calls to
7653 dump_printf_loc to pass in dump_location_t rather than a
7654 location_t.
7655 * doc/optinfo.texi (Dump types): Convert example of
7656 dump_printf_loc from taking "locus" to taking "insn". Update
7657 description of the "_loc" calls to cover dump_location_t.
7658 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7659 "selftest.h".
7660 (dump_user_location_t::dump_user_location_t): New constructors,
7661 from gimple *stmt and rtx_insn *.
7662 (dump_user_location_t::from_function_decl): New function.
7663 (dump_loc): Make static.
7664 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7665 const dump_location_t &.
7666 (dump_generic_expr_loc): Delete.
7667 (dump_printf_loc): Convert param "loc" from location_t to
7668 const dump_location_t &.
7669 (selftest::test_impl_location): New function.
7670 (selftest::dumpfile_c_tests): New function.
7671 * dumpfile.h: Include "profile-count.h".
7672 (class dump_user_location_t): New class.
7673 (struct dump_impl_location_t): New struct.
7674 (class dump_location_t): New class.
7675 (dump_printf_loc): Convert 2nd param from source_location to
7676 const dump_location_t &.
7677 (dump_generic_expr_loc): Delete.
7678 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7679 const dump_location_t &.
7680 * gimple-fold.c (fold_gimple_assign): Update call to
7681 dump_printf_loc to pass in a dump_location_t rather than a
7682 location_t, via the gimple stmt.
7683 (gimple_fold_call): Likewise.
7684 * gimple-loop-interchange.cc
7685 (loop_cand::analyze_iloop_reduction_var): Update for change to
7686 check_reduction_path.
7687 (tree_loop_interchange::interchange): Update for change to
7688 find_loop_location.
7689 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7690 change in return-type of find_loop_location.
7691 (graphite_regenerate_ast_isl): Likewise.
7692 * graphite-optimize-isl.c (optimize_isl): Likewise.
7693 * graphite.c (graphite_transform_loops): Likewise.
7694 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7695 pass in a dump_location_t rather than a location_t, via the
7696 gimple stmt.
7697 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7698 * ipa.c (walk_polymorphic_call_targets): Likewise.
7699 * loop-unroll.c (report_unroll): Convert "locus" param from
7700 location_t to dump_location_t.
7701 (decide_unrolling): Update for change to get_loop_location's
7702 return type.
7703 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7704 location_t to dump_user_location_t.
7705 (grid_find_single_omp_among_assignments_1): Updates calls to
7706 dump_printf_loc to pass in a dump_location_t rather than a
7707 location_t, via the gimple stmt.
7708 (grid_parallel_clauses_gridifiable): Convert "tloc" from
7709 location_t to dump_location_t. Updates calls to dump_printf_loc
7710 to pass in a dump_location_t rather than a location_t, via the
7711 gimple stmt.
7712 (grid_inner_loop_gridifiable_p): Likewise.
7713 (grid_dist_follows_simple_pattern): Likewise.
7714 (grid_gfor_follows_tiling_pattern): Likewise.
7715 (grid_target_follows_gridifiable_pattern): Likewise.
7716 (grid_attempt_target_gridification): Convert initialization
7717 of local "grid" from memset to zero-initialization; FIXME: does
7718 this require C++11? Update call to dump_printf_loc to pass in a
7719 optinfo_location rather than a location_t, via the gimple stmt.
7720 * profile.c (read_profile_edge_counts): Updates call to
7721 dump_printf_loc to pass in a dump_location_t rather than a
7722 location_t
7723 (compute_branch_probabilities): Likewise.
7724 * selftest-run-tests.c (selftest::run_tests): Call
7725 dumpfile_c_tests.
7726 * selftest.h (dumpfile_c_tests): New decl.
7727 * tree-loop-distribution.c (pass_loop_distribution::execute):
7728 Update for change in return type of find_loop_location.
7729 * tree-parloops.c (parallelize_loops): Likewise.
7730 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7731 "locus" from location_t to dump_user_location_t.
7732 (canonicalize_loop_induction_variables): Likewise.
7733 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7734 for change in return type of find_loop_location.
7735 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7736 to dump_printf_loc to pass in a dump_location_t rather than a
7737 location_t, via the stmt.
7738 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7739 Likewise.
7740 * tree-vect-loop-manip.c (find_loop_location): Convert return
7741 type from source_location to dump_user_location_t.
7742 (vect_do_peeling): Update for above change.
7743 (vect_loop_versioning): Update for change in type of
7744 vect_location.
7745 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7746 from location_t to dump_user_location_t.
7747 (vect_estimate_min_profitable_iters): Update for change in type
7748 of vect_location.
7749 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7750 location_t to dump_location_t.
7751 (vect_slp_bb): Update for change in type of vect_location.
7752 * tree-vectorizer.c (vect_location): Convert from source_location
7753 to dump_user_location_t.
7754 (try_vectorize_loop_1): Update for change in vect_location's type.
7755 (vectorize_loops): Likewise.
7756 (increase_alignment): Likewise.
7757 * tree-vectorizer.h (vect_location): Convert from source_location
7758 to dump_user_location_t.
7759 (find_loop_location): Convert return type from source_location to
7760 dump_user_location_t.
7761 (check_reduction_path): Convert 1st param from location_t to
7762 dump_user_location_t.
7763 * value-prof.c (check_counter): Update call to dump_printf_loc to
7764 pass in a dump_user_location_t rather than a location_t; update
7765 call to error_at for change in type of "locus".
7766 (check_ic_target): Update call to dump_printf_loc to
7767 pass in a dump_user_location_t rather than a location_t, via the
7768 call_stmt.
7769
7770 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
7771
7772 * config/s390/s390.h (enum processor_flags): Do not use
7773 default tune parameter when -march was specified.
7774
7775 2018-06-26 Jakub Jelinek <jakub@redhat.com>
7776
7777 PR target/86314
7778 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7779 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7780 operands.
7781
7782 2018-06-26 Richard Biener <rguenther@suse.de>
7783
7784 PR tree-optimization/86287
7785 PR bootstrap/86316
7786 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7787 (vect_analyze_loop): Initialize n_stmts.
7788
7789 2018-06-26 Richard Biener <rguenther@suse.de>
7790
7791 PR middle-end/86271
7792 * fold-const.c (fold_convertible_p): Pointer extension
7793 isn't valid.
7794
7795 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
7796
7797 PR debug/86064
7798 * dwarf2out.c (loc_list_has_views): Adjust comments.
7799 (dw_loc_list): Split single cross-partition range with
7800 nonzero locview.
7801
7802 2018-06-25 Jeff Law <law@redhat.com>
7803
7804 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7805 on -mbig-switch by default.
7806
7807 * config/v850/predicates.md (const_float_1_operand): Fix match_code
7808 test.
7809 (const_float_0_operand): Remove unused predicate.
7810 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7811 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7812 (recipsf2): New expander. Original pattern now called
7813 (recipsf2_insn).
7814 (recipdf2, recipdf2_insn): Similarly.
7815 (rsqrtsf2, rsqrtsf2_insn): Similarly
7816 (rsqrtdf2, rsqrtdf2_insn): Similarly
7817
7818 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
7819
7820 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7821 Simplify logic for FreeBSD (twice).
7822
7823 2018-06-25 Martin Sebor <msebor@redhat.com>
7824
7825 PR tree-optimization/86204
7826 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7827 a strnlen result if it's less than the length of the string.
7828
7829 2018-06-25 Martin Sebor <msebor@redhat.com>
7830
7831 PR tree-optimization/85700
7832 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7833 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7834 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7835
7836 2018-06-25 Martin Sebor <msebor@redhat.com>
7837
7838 * doc/extend.texi (Zero-length arrays): Update and clarify.
7839
7840 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
7841
7842 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7843 added IEEE/IBM long double multilib support on PowerPC little
7844 endian Linux systems.
7845 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7846 (MULTILIB_DEFAULTS): Likewise.
7847 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7848 Likewise.
7849 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7850 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7851 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7852
7853 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
7854
7855 PR middle-end/86311
7856 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7857 (REORDER_45): Likewise.
7858
7859 2018-06-25 Jeff Law <law@redhat.com>
7860
7861 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7862 dividend to 32 bits. Adjust length.
7863 (udivmodhi4): Cleanup output template. Fix length.
7864
7865 2018-06-25 Carl Love <cel@us.ibm.com>
7866
7867 * config/rs6000/vsx.md: Change word selector to prefered location.
7868
7869 2018-06-25 Richard Biener <rguenther@suse.de>
7870
7871 PR tree-optimization/86304
7872 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7873 epilogue-if-converted loops as well.
7874
7875 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
7876
7877 * lto-section-out.c (lto_begin_section): Do not print section
7878 name for noaddr and unnumbered dumps.
7879
7880 2018-06-25 Richard Biener <rguenther@suse.de>
7881
7882 * tree-vectorizer.h (struct vec_info_shared): New structure
7883 with parts split out from struct vec_info and loop_nest from
7884 struct _loop_vec_info.
7885 (struct vec_info): Adjust accordingly.
7886 (struct _loop_vec_info): Likewise.
7887 (LOOP_VINFO_LOOP_NEST): Adjust.
7888 (LOOP_VINFO_DATAREFS): Likewise.
7889 (LOOP_VINFO_DDRS): Likewise.
7890 (struct _bb_vec_info): Likewise.
7891 (BB_VINFO_DATAREFS): Likewise.
7892 (BB_VINFO_DDRS): Likewise.
7893 (struct _stmt_vec_info): Add dr_aux member.
7894 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7895 (DR_MISALIGNMENT_UNINITIALIZED): New.
7896 (set_dr_misalignment): Adjust.
7897 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7898 (vect_analyze_loop): Adjust prototype.
7899 (vect_analyze_loop_form): Likewise.
7900 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7901 Compute dependences lazily.
7902 (vect_record_base_alignments): Use shared datarefs/ddrs.
7903 (vect_verify_datarefs_alignment): Likewise.
7904 (vect_analyze_data_refs_alignment): Likewise.
7905 (vect_analyze_data_ref_accesses): Likewise.
7906 (vect_analyze_data_refs): Likewise.
7907 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7908 constructor parameter for shared part.
7909 (vect_analyze_loop_form): Pass in shared part and adjust.
7910 (vect_analyze_loop_2): Pass in storage for the number of
7911 stmts. Move loop nest finding to the caller. Compute
7912 datarefs lazily.
7913 (vect_analyze_loop): Pass in shared part.
7914 (vect_transform_loop): Verify shared datarefs are unchanged.
7915 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7916 constructor parameter for shared part.
7917 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7918 (vect_slp_bb): Verify shared datarefs are unchanged before
7919 transform.
7920 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7921 change.
7922 (new_stmt_vec_info): Initialize DR_AUX misalignment to
7923 DR_MISALIGNMENT_UNINITIALIZED.
7924 * tree-vectorizer.c (vec_info::vec_info): Add constructor
7925 parameter for shared part.
7926 (vec_info::~vec_info): Adjust.
7927 (vec_info_shared::vec_info_shared): New.
7928 (vec_info_shared::~vec_info_shared): Likewise.
7929 (vec_info_shared::save_datarefs): Likewise.
7930 (vec_info_shared::check_datarefs): Likewise.
7931 (try_vectorize_loop_1): Construct shared part live for analyses
7932 of a single loop for multiple vector sizes.
7933 * tree-parloops.c (gather_scalar_reductions): Adjust.
7934
7935 2018-06-25 Richard Biener <rguenther@suse.de>
7936
7937 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7938 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7939 (vect_analyze_data_refs): Remove similar code from here and
7940 simplify accordingly.
7941
7942 2018-06-25 Richard Biener <rguenther@suse.de>
7943
7944 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7945 for reverse storage order accesses rather than asserting
7946 they cannot happen here.
7947
7948 2018-06-25 Tom de Vries <tdevries@suse.de>
7949
7950 PR debug/86257
7951 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7952 Use data16 instead of .byte for insn prefix.
7953
7954 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
7955
7956 PR C++/86082
7957 * parser.c (make_char_string_pack): Pass this literal chars
7958 through cpp_interpret_string.
7959 (cp_parser_userdef_numeric_literal): Check the result of
7960 make_char_string_pack.
7961
7962 2018-06-24 Maya Rashish <coypu@sdf.org>
7963
7964 * ginclude/stddef.h: Simplify conditions around avoiding
7965 re-definition of __size_t.
7966
7967 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
7968
7969 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7970 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7971
7972 2018-06-22 Maya Rashish <coypu@sdf.org>
7973
7974 * doc/invoke.texi (mno-fancy-math-387): Update for changes
7975 made to OpenBSD and NetBSD through the years.
7976
7977 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
7978
7979 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7980 behavior of vec_pack (vector double, vector double) to match
7981 behavior of vec_float2 (vector double, vector double).
7982
7983 2018-06-22 Olivier Hainque <hainque@adacore.com>
7984
7985 * gimplify.c (gimplify_function_tree): Prevent creation
7986 of a trampoline for the address of the current function
7987 passed to entry/exit instrumentation hooks.
7988
7989 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
7990
7991 PR target/86222
7992 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7993 correctly.
7994
7995 2018-06-22 Martin Liska <mliska@suse.cz>
7996
7997 PR tree-optimization/86263
7998 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7999 Bail out if is_enabled is false.
8000 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
8001 New declaration.
8002 (jump_table_cluster::is_enabled): New function.
8003
8004 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8005
8006 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8007 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
8008 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
8009 (lto_input_ts_binfo_tree_pointers): Likewise.
8010 * tree-streamer-out.c (streamer_write_tree_bitfields,
8011 write_ts_binfo_tree_pointers): Likewise.
8012 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
8013
8014 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
8015
8016 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
8017
8018 2018-06-22 Martin Liska <mliska@suse.cz>
8019
8020 * symbol-summary.h (get): Make it pure and inline move
8021 functionality from ::get function.
8022 (get): Remove and inline into ::get and ::get_create.
8023 (get_create): Move code from ::get function.
8024
8025 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8026
8027 PR target/85994
8028 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
8029 -x assembler-with-cpp.
8030
8031 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8032
8033 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
8034 _FILE_OFFSET_BITS=64 for C++.
8035
8036 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
8037
8038 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
8039 conversion insn that shows up when pr85657-3.c is compiled using
8040 IEEE 128-bit long double.
8041 (neg<mode>2_internal): Use the correct mode to check whether the
8042 mode is IBM extended.
8043 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
8044 multiply and divide external functions from being created more
8045 than once.
8046
8047 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8048
8049 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
8050 functions.
8051 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
8052 the edge can be forwarded.
8053 (cfg_layout_merge_blocks): Likewise.
8054
8055 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8056
8057 * except.c (finish_eh_generation): Commit edge insertions only after
8058 the EH edges have been redirected from post-landing to landing pads.
8059
8060 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8061
8062 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
8063 create_tmp_var_for to create the FRAME decl.
8064 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
8065
8066 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
8067
8068 * tree-inline.c (copy_edges_for_bb): Minor tweak.
8069 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
8070 debug statement when resetting its value.
8071 (expand_call_inline): Copy the locus of the call onto the assignment
8072 of the return value, if any. Use local variable in more cases.
8073
8074 2018-06-21 Martin Liska <mliska@suse.cz>
8075
8076 * ipa-pure-const.c (propagate_nothrow): Use
8077 funct_state_summaries->get.
8078 (dump_malloc_lattice): Likewise.
8079 (propagate_malloc): Likewise.
8080
8081 2018-06-21 Richard Biener <rguenther@suse.de>
8082
8083 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
8084 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
8085 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
8086 comment.
8087 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
8088 BLOCK_ABSTRACT_ORIGIN unconditionally.
8089
8090 2018-06-21 David Malcolm <dmalcolm@redhat.com>
8091
8092 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8093 deleting it.
8094 * ipa-reference.c (ipa_reference_c_finalize): Delete
8095 ipa_ref_opt_sum_summaries and set it to NULL.
8096
8097 2018-06-21 Tom de Vries <tdevries@suse.de>
8098
8099 PR tree-optimization/85859
8100 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8101 test with comment from bb_no_side_effects_p.
8102
8103 2018-06-21 Richard Biener <rguenther@suse.de>
8104
8105 PR tree-optimization/86232
8106 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8107 max for constant niter.
8108
8109 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8110
8111 * config/aarch64/aarch64-simd.md
8112 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8113
8114 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
8115
8116 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8117 Make opernads of the unspec commutative.
8118
8119 2018-06-21 Richard Biener <rguenther@suse.de>
8120
8121 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8122 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8123 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8124 (vect_analyze_data_ref_dependence): Re-order checks to deal with
8125 NULL DR_STEP.
8126 (vect_record_base_alignments): Do not record base alignment
8127 for gathers or scatters.
8128 (vect_compute_data_ref_alignment): Drop return value that is always
8129 true. Bail out early for gathers or scatters.
8130 (vect_enhance_data_refs_alignment): Bail out early for gathers
8131 or scatters.
8132 (vect_find_same_alignment_drs): Likewise.
8133 (vect_analyze_data_refs_alignment): Remove dead code.
8134 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8135 (vect_analyze_data_refs): For possible gathers or scatters do
8136 not create an alternate DR, just check their possible validity
8137 and mark them. Adjust DECL_NONALIASED handling to not rely
8138 on DR_BASE_ADDRESS.
8139 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8140 update inits of gathers or scatters.
8141 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8142 Also copy gather/scatter flag to pattern vinfo.
8143
8144 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
8145
8146 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8147 behavior of vec_packsu (vector unsigned long long, vector unsigned
8148 long long) to match behavior of vec_packs with same signature.
8149
8150 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
8151 Thomas Schwinge <thomas@codesourcery.com>
8152 Cesar Philippidis <cesar@codesourcery.com>
8153
8154 * gimplify.c (gimplify_scan_omp_clauses): Add support for
8155 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8156 (gimplify_adjust_omp_clauses): Likewise.
8157 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8158 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8159 (gimplify_omp_target_update): Update handling of acc update and
8160 enter/exit data.
8161 * omp-low.c (install_var_field): Remove unused parameter
8162 base_pointers_restrict.
8163 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8164 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8165 FINALIZE}
8166 (omp_target_base_pointers_restrict_p): Delete.
8167 (scan_omp_target): Update call to scan_sharing_clauses.
8168 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8169 FINALIZE}.
8170 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8171 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8172 (convert_local_omp_clauses): Likewise.
8173 * tree-pretty-print.c (dump_omp_clause): Likewise.
8174 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
8175 FINALIZE}.
8176 (omp_clause_code_name): Likewise.
8177
8178 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8179
8180 PR debug/86194
8181 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8182 be narrowed.
8183
8184 PR tree-optimization/86231
8185 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
8186 anti-range don't overwrite *vr0min before using it to compute *vr0max.
8187
8188 2018-06-20 Tom de Vries <tdevries@suse.de>
8189
8190 PR tree-optimization/86097
8191 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8192 iv type if signedness of iv type is not the same as that of *nit.
8193
8194 2018-06-20 Jakub Jelinek <jakub@redhat.com>
8195
8196 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
8197 EDGE_EH edges, verify they are all EDGE_EH.
8198
8199 2018-06-20 Maya Rashish <coypu@sdf.org>
8200
8201 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8202
8203 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8204
8205 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8206 * config/aarch64/aarch64.c (xgene1_tunings): Add
8207 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8208 (aarch64_mode_valid_for_sched_fusion_p):
8209 Allow 16-byte modes.
8210 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8211 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8212 128-bit modes.
8213 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8214 New pattern.
8215 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8216 * config/aarch64/iterators.md (VQ2): New mode iterator.
8217
8218 2018-06-20 Martin Liska <mliska@suse.cz>
8219
8220 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8221 Change default ratio from 10 to 8.
8222
8223 2018-06-20 Martin Liska <mliska@suse.cz>
8224
8225 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8226 New.
8227 (bit_test_cluster::find_bit_tests): Likewise.
8228 (switch_decision_tree::analyze_switch_statement): Find clusters.
8229 * tree-switch-conversion.h (struct jump_table_cluster): Document
8230 hierarchy.
8231
8232 2018-06-20 Martin Liska <mliska@suse.cz>
8233
8234 * tree-switch-conversion.c (switch_conversion::collect):
8235 Record m_uniq property.
8236 (switch_conversion::expand): Bail out for special conditions.
8237 (group_cluster::~group_cluster): New.
8238 (group_cluster::group_cluster): Likewise.
8239 (group_cluster::dump): Likewise.
8240 (jump_table_cluster::emit): New.
8241 (switch_decision_tree::fix_phi_operands_for_edges): New.
8242 (struct case_node): Remove struct.
8243 (jump_table_cluster::can_be_handled): New.
8244 (case_values_threshold): Moved to header.
8245 (reset_out_edges_aux): Likewise.
8246 (jump_table_cluster::is_beneficial): New.
8247 (bit_test_cluster::can_be_handled): Likewise.
8248 (add_case_node): Remove.
8249 (bit_test_cluster::is_beneficial): New.
8250 (case_bit_test::cmp): New.
8251 (bit_test_cluster::emit): New.
8252 (expand_switch_as_decision_tree_p): Remove.
8253 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8254 (fix_phi_operands_for_edge): Likewise.
8255 (switch_decision_tree::analyze_switch_statement): New.
8256 (compute_cases_per_edge): Move ...
8257 (switch_decision_tree::compute_cases_per_edge): ... here.
8258 (try_switch_expansion): Likewise.
8259 (switch_decision_tree::try_switch_expansion): Likewise.
8260 (record_phi_operand_mapping): Likewise.
8261 (switch_decision_tree::record_phi_operand_mapping): Likewise.
8262 (emit_case_decision_tree): Likewise.
8263 (switch_decision_tree::emit): Likewise.
8264 (balance_case_nodes): Likewise.
8265 (switch_decision_tree::balance_case_nodes): Likewise.
8266 (dump_case_nodes): Likewise.
8267 (switch_decision_tree::dump_case_nodes): Likewise.
8268 (emit_jump): Likewise.
8269 (switch_decision_tree::emit_jump): Likewise.
8270 (emit_cmp_and_jump_insns): Likewise.
8271 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8272 (emit_case_nodes): Likewise.
8273 (switch_decision_tree::emit_case_nodes): Likewise.
8274 (conditional_probability): Remove.
8275 * tree-switch-conversion.h (enum cluster_type): New.
8276 (PRINT_CASE): New.
8277 (struct cluster): Likewise.
8278 (cluster::cluster): Likewise.
8279 (struct simple_cluster): Likewise.
8280 (simple_cluster::simple_cluster): Likewise.
8281 (struct group_cluster): Likewise.
8282 (struct jump_table_cluster): Likewise.
8283 (struct bit_test_cluster): Likewise.
8284 (struct min_cluster_item): Likewise.
8285 (struct case_tree_node): Likewise.
8286 (case_tree_node::case_tree_node): Likewise.
8287 (jump_table_cluster::case_values_threshold): Likewise.
8288 (struct case_bit_test): Likewise.
8289 (struct switch_decision_tree): Likewise.
8290 (struct switch_conversion): Likewise.
8291 (switch_decision_tree::reset_out_edges_aux): Likewise.
8292
8293 2018-06-20 Martin Liska <mliska@suse.cz>
8294
8295 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8296 (hoist_edge_and_branch_if_true): Likewise.
8297 (expand_switch_using_bit_tests_p): Likewise.
8298 (struct case_bit_test): Likewise.
8299 (case_bit_test_cmp): Likewise.
8300 (emit_case_bit_tests): Likewise.
8301 (switch_conversion::switch_conversion): New class.
8302 (struct switch_conv_info): Remove old struct.
8303 (collect_switch_conv_info): More to ...
8304 (switch_conversion::collect): ... this.
8305 (check_range): Likewise.
8306 (switch_conversion::check_range): Likewise.
8307 (check_all_empty_except_final): Likewise.
8308 (switch_conversion::check_all_empty_except_final): Likewise.
8309 (check_final_bb): Likewise.
8310 (switch_conversion::check_final_bb): Likewise.
8311 (create_temp_arrays): Likewise.
8312 (switch_conversion::create_temp_arrays): Likewise.
8313 (free_temp_arrays): Likewise.
8314 (gather_default_values): Likewise.
8315 (switch_conversion::gather_default_values): Likewise.
8316 (build_constructors): Likewise.
8317 (switch_conversion::build_constructors): Likewise.
8318 (constructor_contains_same_values_p): Likewise.
8319 (switch_conversion::contains_same_values_p): Likewise.
8320 (array_value_type): Likewise.
8321 (switch_conversion::array_value_type): Likewise.
8322 (build_one_array): Likewise.
8323 (switch_conversion::build_one_array): Likewise.
8324 (build_arrays): Likewise.
8325 (switch_conversion::build_arrays): Likewise.
8326 (gen_def_assigns): Likewise.
8327 (switch_conversion::gen_def_assigns): Likewise.
8328 (prune_bbs): Likewise.
8329 (switch_conversion::prune_bbs): Likewise.
8330 (fix_phi_nodes): Likewise.
8331 (switch_conversion::fix_phi_nodes): Likewise.
8332 (gen_inbound_check): Likewise.
8333 (switch_conversion::gen_inbound_check): Likewise.
8334 (process_switch): Use the newly created class.
8335 (switch_conversion::expand): New.
8336 (switch_conversion::~switch_conversion): New.
8337 * tree-switch-conversion.h: New file.
8338
8339 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8340
8341 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8342 tree-vect-patterns.c.
8343 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8344 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
8345 (vect_recog_sad_pattern): Likewise.
8346 (vect_recog_widen_sum_pattern): Likewise.
8347 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
8348 (vect_recog_widen_shift_pattern): Remove the type_in argument.
8349 (vect_recog_rotate_pattern): Likewise.
8350 (vect_recog_mult_pattern): Likewise.
8351 (vect_recog_vector_vector_shift_pattern): Likewise.
8352 (vect_recog_divmod_pattern): Likewise.
8353 (vect_recog_mixed_size_cond_pattern): Likewise.
8354 (vect_recog_bool_pattern): Likewise.
8355 (vect_recog_mask_conversion_pattern): Likewise.
8356 (vect_try_gather_scatter_pattern): Likewise.
8357 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
8358 (vect_recog_over_widening_pattern): Likewise.
8359 (vect_recog_gather_scatter_pattern): Likewise.
8360 (vect_recog_func_ptr): Move from tree-vectorizer.h
8361 (vect_vect_recog_func_ptrs): Move further down the file.
8362 (vect_recog_func): Likewise. Remove the third argument.
8363 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8364 (vect_pattern_recog_1): Expect the pattern function to do any
8365 necessary target tests. Also expect it to provide a vector type.
8366 Remove the type_in handling.
8367
8368 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8369
8370 * tree-vect-patterns.c (vect_pattern_detected): New function.
8371 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8372 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8373 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8374 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8375 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8376 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8377 (vect_recog_mask_conversion_pattern)
8378 (vect_try_gather_scatter_pattern): Likewise.
8379
8380 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8381
8382 * tree-vect-patterns.c (vect_get_internal_def): New function.
8383 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8384 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8385 (search_type_for_mask_1): Use it.
8386
8387 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8388
8389 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8390 redundant WIDEN_SUM_EXPR handling.
8391 (vect_recog_sad_pattern): Likewise.
8392
8393 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8394
8395 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8396 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8397 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8398 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8399 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8400
8401 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8402
8403 * tree-vect-stmts.c (vectorizable_call): Make sure that we
8404 use the stmt_vec_info of the original bb statement for the
8405 new zero assignment, even if the call is part of a pattern.
8406
8407 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8408
8409 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8410 that the sequence is attached to the original statement rather
8411 than the pattern statement.
8412 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8413 PATTERN_DEF_SEQ from the original statement rather than
8414 the main pattern statement.
8415 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8416 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8417 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8418
8419 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
8420
8421 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8422 definition statements before the early exit for statements that aren't
8423 live or relevant.
8424 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8425 split out from...
8426 (vect_transform_loop): ...here. Process pattern definition
8427 statements without first checking whether the main pattern
8428 statement is live or relevant.
8429
8430 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8431
8432 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8433 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8434
8435 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
8436
8437 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8438 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8439 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8440 (expand_block_compare): Change select_block_compare_mode call.
8441 (expand_strncmp_align_check): Use new functions, fix comment.
8442 (emit_final_str_compare_gpr): New function.
8443 (expand_strn_compare): Refactor and clean up code.
8444 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8445
8446 2018-06-19 Tony Reix <tony.reix@atos.com>
8447 Damien Bergamini <damien.bergamini@atos.com>
8448 David Edelsohn <dje.gcc@gmail.com>
8449
8450 * collect2.c (static_obj): New variable.
8451 (static_libs): New variable.
8452 (is_in_list): Uncomment declaration.
8453 (main): Track AIX libraries linked statically.
8454 (is_in_list): Uncomment definition.
8455 (scan_prog_file): Don't add AIX shared libraries initializer
8456 to constructor list if linking statically.
8457
8458 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
8459
8460 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8461 constant.
8462 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8463
8464 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
8465
8466 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8467 blocks.
8468
8469 2018-06-19 Martin Liska <mliska@suse.cz>
8470
8471 * config/i386/i386.c (ix86_can_inline_p): Do not use
8472 ipa_fn_summaries::get_create.
8473 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8474 get.
8475 (devirtualization_time_bonus): Likewise.
8476 (ipcp_propagate_stage): Likewise.
8477 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8478 (edge_set_predicate): Likewise.
8479 (evaluate_conditions_for_known_args): Likewise.
8480 (evaluate_properties_for_edge): Likewise.
8481 (ipa_call_summary::reset): Tranform to ...
8482 (ipa_call_summary::~ipa_call_summary): ... this.
8483 (ipa_fn_summary::reset): Transform to ...
8484 (ipa_fn_summary::~ipa_fn_summary): ... this.
8485 (ipa_fn_summary_t::remove): Rename to ...
8486 (ipa_fn_summary_t::remove_callees): ... this.
8487 (ipa_fn_summary_t::duplicate): Use placement new
8488 instead of memory copy.
8489 (ipa_call_summary_t::duplicate): Likewise.
8490 (ipa_call_summary_t::remove): Remove.
8491 (dump_ipa_call_summary): Change get_create to get.
8492 (ipa_dump_fn_summary): Dump only when summary exists.
8493 (analyze_function_body): Use symbol_summary::get instead
8494 of get_create.
8495 (compute_fn_summary): Likewise.
8496 (estimate_edge_devirt_benefit): Likewise.
8497 (estimate_edge_size_and_time): Likewise.
8498 (inline_update_callee_summaries): Likewise.
8499 (remap_edge_change_prob): Likewise.
8500 (remap_edge_summaries): Likewise.
8501 (ipa_merge_fn_summary_after_inlining): Likewise.
8502 (write_ipa_call_summary): Likewise.
8503 (ipa_fn_summary_write): Likewise.
8504 (ipa_free_fn_summary): Likewise.
8505 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8506 (struct ipa_call_summary): Likewise.
8507 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8508 of get_create.
8509 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8510 (estimate_size_after_inlining): Likewise.
8511 (estimate_growth): Likewise.
8512 (growth_likely_positive): Likewise.
8513 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8514 (inline_call): Likewise.
8515 * ipa-inline.c (caller_growth_limits): Likewise.
8516 (can_inline_edge_p): Likewise.
8517 (can_inline_edge_by_limits_p): Likewise.
8518 (compute_uninlined_call_time): Likewise.
8519 (compute_inlined_call_time): Likewise.
8520 (want_inline_small_function_p): Likewise.
8521 (edge_badness): Likewise.
8522 (update_caller_keys): Likewise.
8523 (update_callee_keys): Likewise.
8524 (inline_small_functions): Likewise.
8525 (inline_to_all_callers_1): Likewise.
8526 (dump_overall_stats): Likewise.
8527 (early_inline_small_functions): Likewise.
8528 (early_inliner): Likewise.
8529 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8530 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8531 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8532 * ipa-split.c (execute_split_functions): Likewise.
8533 * symbol-summary.h: Likewise.
8534 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8535
8536 2018-06-19 Richard Biener <rguenther@suse.de>
8537
8538 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8539 (vectorize_loops): ... here. Fix dbgcnt handling.
8540 (try_vectorize_loop): Wrap try_vectorize_loop_1.
8541
8542 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
8543
8544 PR target/86197
8545 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8546 ieee128 argument takes up only one (vector) register, not two (floating
8547 point) registers.
8548
8549 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
8550
8551 * gimplify.c (gimplify_init_constructor): Really never clear for an
8552 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8553
8554 2018-06-19 Richard Biener <rguenther@suse.de>
8555
8556 PR tree-optimization/86179
8557 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8558 after failed recognition.
8559
8560 2018-06-18 Martin Sebor <msebor@redhat.com>
8561
8562 PR middle-end/85602
8563 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8564 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8565 Handle integer subtraction.
8566 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8567 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8568
8569 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8570
8571 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8572 param from rtx to rtx_insn *.
8573 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8574 param.
8575 (frv_ifcvt_modify_insn): Likwise.
8576 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8577 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
8578 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8579 as_a <rtx_insn *> cast to local "unprotected_region" once
8580 it's been established that it's not NULL or pc_rtx.
8581 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8582 param "sethi" from rtx to rtx_insn *.
8583 (nds32_group_float_insns): Likewise for param "insn".
8584 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8585 param.
8586 (vax_output_int_subtract): Likewise.
8587 * config/vax/vax.c (vax_output_int_add): Likewise for param
8588 "insn".
8589 (vax_output_int_subtract): Likewise.
8590 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8591 (emit_pattern_after): Likewise for param "after".
8592 (emit_insn_after): Likewise.
8593 (emit_jump_insn_after): Likewise.
8594 (emit_call_insn_after): Likewise.
8595 (emit_debug_insn_after): Likewise.
8596 (emit_pattern_before): Likewise for param "before".
8597 (emit_insn_before): Likewise.
8598 (emit_jump_insn_before): Likewise.
8599 * final.c (get_insn_template): Likewise for param "insn", removing
8600 a cast.
8601 * output.h (get_insn_template): Likewise for 2nd param.
8602 * rtl.h (emit_insn_before): Likewise.
8603 (emit_jump_insn_before): Likewise.
8604 (emit_debug_insn_before_noloc): Likewise.
8605 (emit_insn_after): Likewise.
8606 (emit_jump_insn_after): Likewise.
8607 (emit_call_insn_after): Likewise.
8608 (emit_debug_insn_after): Likewise.
8609 (set_insn_deleted): Likewise for param.
8610
8611 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
8612
8613 PR target/85358
8614 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8615 floating point modes, so that IFmode is numerically greater than
8616 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8617 to declare the ordering. This prevents IFmode from being
8618 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8619 machine. Include rs6000-modes.h to share the fractional values
8620 between genmodes* and the rest of the compiler.
8621 (IFmode): Likewise.
8622 (KFmode): Likewise.
8623 (TFmode): Likewise.
8624 * config/rs6000/rs6000-modes.h: New file.
8625 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8626 meaning of rs6000_long_double_size so that 126..128 selects an
8627 appropriate 128-bit floating point type.
8628 (rs6000_option_override_internal): Likewise.
8629 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8630 (TARGET_LONG_DOUBLE_128): Change the meaning of
8631 rs6000_long_double_size so that 126..128 selects an appropriate
8632 128-bit floating point type.
8633 (LONG_DOUBLE_TYPE_SIZE): Update comment.
8634 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8635 source and destination to match the standard usage.
8636 (truncifkf2): Likewise.
8637 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8638 ISA 2.07 to use an explicit clobber, instead of passing in a
8639 temporary.
8640 (copysign<mode>3_soft): Likewise.
8641
8642 2018-06-18 David Malcolm <dmalcolm@redhat.com>
8643
8644 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8645 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8646 (vect_slp_analyze_instance_dependence): Likewise.
8647 (vect_enhance_data_refs_alignment): Likewise.
8648 (vect_analyze_data_refs_alignment): Likewise.
8649 (vect_slp_analyze_and_verify_instance_alignment
8650 (vect_analyze_data_ref_accesses): Likewise.
8651 (vect_prune_runtime_alias_test_list): Likewise.
8652 (vect_analyze_data_refs): Likewise.
8653 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8654 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8655 (vect_analyze_scalar_cycles_1): Likewise.
8656 (vect_get_loop_niters): Likewise.
8657 (vect_analyze_loop_form_1): Likewise.
8658 (vect_update_vf_for_slp): Likewise.
8659 (vect_analyze_loop_operations): Likewise.
8660 (vect_analyze_loop): Likewise.
8661 (vectorizable_induction): Likewise.
8662 (vect_transform_loop): Likewise.
8663 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8664 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8665 (vect_make_slp_decision): Likewise.
8666 (vect_detect_hybrid_slp): Likewise.
8667 (vect_slp_analyze_operations): Likewise.
8668 (vect_slp_bb): Likewise.
8669 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8670 (vectorizable_bswap): Likewise.
8671 (vectorizable_call): Likewise.
8672 (vectorizable_simd_clone_call): Likewise.
8673 (vectorizable_conversion): Likewise.
8674 (vectorizable_assignment): Likewise.
8675 (vectorizable_shift): Likewise.
8676 (vectorizable_operation): Likewise.
8677 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8678
8679 2018-06-18 Martin Sebor <msebor@redhat.com>
8680
8681 PR tree-optimization/81384
8682 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8683 * builtins.c (expand_builtin_strnlen): New function.
8684 (expand_builtin): Call it.
8685 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8686 * builtins.def (BUILT_IN_STRNLEN): New.
8687 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8688 Warn for bounds in excess of maximum object size.
8689 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8690 single-value ranges. Handle strnlen.
8691 (handle_builtin_strlen): Handle strnlen.
8692 (strlen_check_and_optimize_stmt): Same.
8693 * doc/extend.texi (Other Builtins): Document strnlen.
8694
8695 2018-06-18 Maya Rashish <coypu@sdf.org>
8696
8697 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8698 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8699 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8700
8701 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8702 here to ...
8703 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8704
8705 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8706
8707 * tree.c (escaped_string::escape): Replace cast to char * by
8708 const_cast<char *> (unescaped).
8709
8710 2018-06-18 Nick Clifton <nickc@redhat.com>
8711
8712 PR 84195
8713 * tree.c (escaped_string): New class. Converts an unescaped
8714 string into its escaped equivalent.
8715 (warn_deprecated_use): Use the new class to convert the
8716 deprecation message, if present.
8717 (test_escaped_strings): New self test.
8718 (test_c_tests): Add test_escaped_strings.
8719 * doc/extend.texi (deprecated): Add a note that the
8720 deprecation message is affected by the -fmessage-length
8721 option, and that control characters will be escaped.
8722 (#pragma GCC error): Document this pragma.
8723 (#pragma GCC warning): Likewise.
8724 * doc/invoke.texi (-fmessage-length): Document this option's
8725 effect on the #warning and #error preprocessor directives and
8726 the deprecated attribute.
8727
8728 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
8729
8730 * tree.c (decl_value_expr_lookup): Revert latest change.
8731 (decl_value_expr_insert): Likewise.
8732
8733 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
8734
8735 * gimplify.c (nonlocal_vlas): Delete.
8736 (nonlocal_vla_vars): Likewise.
8737 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8738 referenced VLAs.
8739 (gimplify_body): Do not create and destroy nonlocal_vlas.
8740 * tree-nested.c: Include diagnostic.h.
8741 (use_pointer_in_frame): Tweak.
8742 (lookup_field_for_decl): Add assertion and declare the transformation.
8743 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8744 internal error when the reference is in a wrong context. Do not
8745 create a debug decl by default.
8746 (note_nonlocal_block_vlas): Delete.
8747 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8748 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
8749 create a debug decl by default.
8750 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8751 call is in a wrong context.
8752 (fixup_vla_decls): New function.
8753 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
8754 debug variables were created.
8755 * tree.c (decl_value_expr_lookup): Add checking assertion.
8756 (decl_value_expr_insert): Likewise.
8757
8758 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8759
8760 PR middle-end/82479
8761 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8762 * tree-scalar-evolution.c (interpret_expr): Likewise.
8763 (expression_expensive_p): Likewise.
8764 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8765 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8766 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8767 (ssa_defined_by_minus_one_stmt_p): New.
8768
8769 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
8770
8771 PR middle-end/64946
8772 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8773 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8774 * dojump.c (do_jump): Likewise.
8775 * expr.c (expand_expr_real_2): Check operand type's sign.
8776 * fold-const.c (const_unop): Handle ABSU_EXPR.
8777 (fold_abs_const): Likewise.
8778 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8779 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8780 (strip_sign_op_1): Likesise.
8781 * match.pd: Add new pattern to generate ABSU_EXPR.
8782 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8783 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8784 * tree-eh.c (operation_could_trap_helper_p): Likewise.
8785 * tree-inline.c (estimate_operator_cost): Likewise.
8786 * tree-pretty-print.c (dump_generic_node): Likewise.
8787 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8788 * tree.def (ABSU_EXPR): New.
8789
8790 2018-06-16 Jakub Jelinek <jakub@redhat.com>
8791
8792 PR middle-end/86095
8793 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8794 documented as preserved for backward compatibility only.
8795 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8796
8797 PR rtl-optimization/86108
8798 * bb-reorder.c (create_forwarder_block): Renamed to ...
8799 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
8800 jump from new landing pad to the second part.
8801 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8802 Adjust callers.
8803
8804 2018-06-15 Jakub Jelinek <jakub@redhat.com>
8805
8806 PR middle-end/85878
8807 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8808 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8809 Only call store_expr for halves if the mode is the same.
8810
8811 PR middle-end/86123
8812 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8813 Fix up comment formatting.
8814
8815 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
8816
8817 * typed-splay-tree.h (typed_splay_tree::remove): New function.
8818 (typed_splay_tree::closure,
8819 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8820 (typed_splay_tree::typed_splay_tree,
8821 typed_splay_tree::operator =): Declared private.
8822 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8823 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8824 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8825 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8826 typed_splay_tree::splay_tree_splay,
8827 typed_splay_tree::splay_tree_foreach_helper,
8828 typed_splay_tree::splay_tree_insert,
8829 typed_splay_tree::splay_tree_remove,
8830 typed_splay_tree::splay_tree_lookup,
8831 typed_splay_tree::splay_tree_predecessor,
8832 typed_splay_tree::splay_tree_successor,
8833 typed_splay_tree::splay_tree_min,
8834 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8835 (typed_splay_tree::root, typed_splay_tree::comp,
8836 typed_splay_tree::delete_key,
8837 typed_splay_tree::delete_value): New data members.
8838 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8839 typed_splay_tree::remove.
8840
8841 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
8842
8843 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8844 -mginv and -mno-ginv to the assembler.
8845 * config/mips/mips.opt (-mcrc): New option.
8846 (-mginv): Likewise.
8847 * doc/invoke.text (-mcrc): Document.
8848 (-mginv): Likewise.
8849
8850 2018-06-15 Nick Clifton <nickc@redhat.com>
8851
8852 PR 84195
8853 * tree.c (escaped_string): New class. Converts an unescaped
8854 string into its escaped equivalent.
8855 (warn_deprecated_use): Use the new class to convert the
8856 deprecation message, if present.
8857 (test_escaped_strings): New self test.
8858 (test_c_tests): Add test_escaped_strings.
8859 * doc/extend.texi (deprecated): Add a note that the
8860 deprecation message is affected by the -fmessage-length
8861 option, and that control characters will be escaped.
8862 (#pragma GCC error): Document this pragma.
8863 (#pragma GCC warning): Likewise.
8864 * doc/invoke.texi (-fmessage-length): Document this option's
8865 effect on the #warning and #error preprocessor directives and
8866 the deprecated attribute.
8867
8868 2018-06-15 Richard Biener <rguenther@suse.de>
8869
8870 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8871 here, also noting vector size used.
8872 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
8873 size used in MSG_OPTIMIZED_LOCATIONS dump.
8874 (pass_slp_vectorize::execute): Adjust.
8875
8876 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
8877
8878 PR target/85968
8879 * config/arc/arc.c (arc_return_address_register): Fix
8880 if-condition.
8881
8882 2018-06-15 Richard Biener <rguenther@suse.de>
8883
8884 PR middle-end/86159
8885 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8886 leave useless conversion stripping to force_gimple_operand_gsi.
8887 (gimplify_build2): Likewise.
8888 (gimplify_build1): Likewise.
8889
8890 2018-06-15 Richard Biener <rguenther@suse.de>
8891
8892 PR middle-end/86076
8893 * tree-cfg.c (move_stmt_op): unshare invariant addresses
8894 before adjusting their block.
8895
8896 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
8897
8898 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8899 multilibs for *-*-rtems*.
8900 * config/riscv/t-rtems: New file.
8901
8902 2018-06-14 Jakub Jelinek <jakub@redhat.com>
8903
8904 PR middle-end/86122
8905 * match.pd ((A +- CST1) +- CST2): Punt if last resort
8906 unsigned_type_for returns NULL.
8907
8908 PR target/85945
8909 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8910 subregs of multi-word pseudos unless the float mode has word size.
8911
8912 2018-06-14 Richard Biener <rguenther@suse.de>
8913
8914 PR middle-end/86139
8915 * tree-vect-generic.c (build_word_mode_vector_type): Remove
8916 duplicate and harmful type_hash_canon.
8917 * tree.c (type_hash_canon): Assert we didn't find ourselves.
8918
8919 2018-06-14 Richard Biener <rguenther@suse.de>
8920
8921 PR ipa/86124
8922 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8923 NULL cgraph_node.
8924
8925 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
8926
8927 * config/rtems.h (STDINT_LONG32): Define.
8928
8929 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
8930 Prachi Godbole <prachi.godbole@imgtec.com>
8931
8932 * config/mips/mips-cpus.def: Define P6600.
8933 * config/mips/mips-tables.opt: Regenerate.
8934 * config/mips/mips.c (mips_ucbranch_type): New enum.
8935 (mips_rtx_cost_data): Add support for P6600.
8936 (mips_issue_rate): Likewise.
8937 (mips_multipass_dfa_lookahead): Likewise.
8938 (mips_avoid_hazard): Likewise.
8939 (mips_reorg_process_insns): Likewise.
8940 (mips_classify_branch_p6600): New function.
8941 * config/mips/mips.h (TUNE_P6600): New define.
8942 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8943 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8944 * config/mips/mips.md: Include p6600.md.
8945 (processor): Add p6600.
8946 * config/mips/p6600.md: New file.
8947 * doc/invoke.texi: Add p6600 to supported architectures.
8948
8949 2018-06-13 Martin Sebor <msebor@redhat.com>
8950
8951 PR tree-optimization/86114
8952 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8953 of integer types.
8954 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8955
8956 2018-06-13 Richard Biener <rguenther@suse.de>
8957
8958 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8959 Properly set vector type of the intermediate stmt.
8960 * tree-vect-stmts.c (vectorizable_operation): The destination
8961 var always has vectype_out type.
8962
8963 2018-06-13 Jeff Law <law@redhat.com>
8964
8965 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8966 integer 0 for argument to print_rtl_with_bb.
8967 (rl78_reorg): Likewise.
8968
8969 2018-06-13 David Malcolm <dmalcolm@redhat.com>
8970
8971 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8972 from rtx to rtx_insn *.
8973 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8974 "label".
8975 (add_sched_insns_for_speculation): Likewise for local "target",
8976 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8977 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8978 from rtx_insn ** to rtx_code_label **.
8979 (reorg_emit_nops): Likewise.
8980 (c6x_reorg): Likewise for local "call_labels".
8981 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8982 rtx to rtx_insn *.
8983 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8984 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8985 the loops over LABEL_REFS.
8986 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8987 braf_label.
8988 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8989 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8990 (split_branches): Strengthen local "olabel" from rtx to
8991 rtx_insn *, adding a safe_as_a cast.
8992 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8993 to "rtx_insn *".
8994 (add_insn_after): Likewise for first two params.
8995 (add_insn_before): Likewise.
8996 (remove_insn): Likewise for param.
8997 (emit_pattern_before_noloc): Likewise for second and third params.
8998 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8999 (emit_call_insn_before_noloc): Likewise.
9000 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
9001 to "rtx_insn *".
9002 (emit_barrier_before): Likewise.
9003 (emit_label_before): Strengthen "label" param from "rtx" to
9004 "rtx_code_label *". Strengthen "before" param from "rtx" to
9005 "rtx_insn *".
9006 (emit_insn_after_1): Strengthen "after" param from "rtx" to
9007 "rtx_insn *".
9008 (emit_pattern_after_noloc): Likewise.
9009 (emit_insn_after_noloc): Likewise.
9010 (emit_jump_insn_after_noloc): Likewise.
9011 (emit_call_insn_after_noloc): Likewise.
9012 (emit_debug_insn_after_noloc): Likewise.
9013 (emit_barrier_after): Likewise.
9014 (emit_label_after): Likewise for both params.
9015 (emit_pattern_after_setloc): Likewise for "after" param. Convert
9016 "loc" param from "int" to "location_t".
9017 (emit_insn_after_setloc): Likewise.
9018 (emit_jump_insn_after_setloc): Likewise.
9019 (emit_call_insn_after_setloc): Likewise.
9020 (emit_debug_insn_after_setloc): Likewise.
9021 (emit_pattern_before_setloc): Likewise for "before" param. Convert
9022 "loc" param from "int" to "location_t".
9023 (emit_pattern_before): Convert NULL_RTX to NULL.
9024 (emit_insn_before_setloc): Convert "loc" param from "int" to
9025 "location_t".
9026 (emit_jump_insn_before_setloc): Likewise.
9027 (emit_call_insn_before_setloc): Likewise.
9028 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
9029 rtx_insn *. Convert "loc" param from "int" to "location_t".
9030 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
9031 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
9032 Convert 3rd param from "int" to "location_t".
9033 (emit_barrier_before, emit_barrier_after, next_real_insn):
9034 Strengthen param from rtx to rtx_insn *.
9035 (emit_label_before): Strengthen 1st param from "rtx" to
9036 "rtx_code_label *". Strengthen 2nd param from "rtx" to
9037 "rtx_insn *".
9038 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
9039 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
9040 Strengthen 2nd param from "rtx" to "rtx_insn *".
9041 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
9042 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
9043 Likewise. Convert 3rd param from "int" to "location_t".
9044 (emit_label_after): Strengthen 1st param from "rtx" to
9045 "rtx_code_label *".
9046 (next_real_insn, remove_insn): Strengthen param from "rtx" to
9047 "rtx_insn *".
9048 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
9049 from "rtx" to "rtx_insn *".
9050
9051 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
9052
9053 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
9054 bodies streamed in with -Q.
9055 * dumpfile.c (dump_files): Add lto-stream-out dump file.
9056 * dumpfile.h (tree_dump_index): Add lto_stream_out.
9057 * gimple-streamer-out.c: Include gimple-pretty-print.h
9058 (output_bb): Dump stmts streamed.
9059 * lto-section-out.c: Include print-tree.h
9060 (lto_begin_section): Dump sections created.
9061 (lto_output_decl_index): Dump decl encoded.
9062 * lto-streamer-out.c: Include print-tree.h
9063 (create_output_block): Dump output block created.
9064 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
9065 (output_function): Dump function output.
9066 (output_constructor): Dump constructor streamed.
9067 (write_global_stream): Output indexes encoded.
9068 (produce_asm_for_decls): Dump streams encoded.
9069 * lto-streamer.c (streamer_dump_file): New global var.
9070 * lto-streamer.h (streamer_dump_file): Declare.
9071 * passes.c (ipa_write_summaries): Initialize streamer dump.
9072 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
9073 in.
9074
9075 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
9076
9077 PR target/86048
9078 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
9079 offsets for register save directives. Emit a second batch of save
9080 directives, if need be, when the function accesses prior frames.
9081
9082 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9083
9084 * config/arc/fpu.md (fmasf4): Force operand to register.
9085 (fnmasf4): Likewise.
9086
9087 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9088
9089 * config/arc/arc-protos.h (arc_pad_return): Remove.
9090 * config/arc/arc.c (machine_function): Remove force_short_suffix
9091 and size_reason.
9092 (arc_print_operand): Adjust printing of '&'.
9093 (arc_verify_short): Remove conditional printing of short suffix.
9094 (arc_final_prescan_insn): Remove reference to size_reason.
9095 (pad_return): New function.
9096 (arc_reorg): Call pad_return.
9097 (arc_pad_return): Remove.
9098 (arc_init_machine_status): Remove reference to force_short_suffix.
9099 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9100 (attr length): When attribute iscompact is true force to 2
9101 regardless; in the case of maybe check if we want to force the
9102 instruction to have 4 bytes length.
9103 (nopv): Change it to generate 4 byte long nop as well.
9104 (blockage): New pattern.
9105 (simple_return): Remove call to arc_pad_return.
9106 (p_return_i): Likewise.
9107
9108 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9109
9110 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9111
9112 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9113
9114 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9115 ARC cores.
9116
9117 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9118
9119 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9120 for ARC700 and ARCv2.
9121
9122 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
9123
9124 PR target/86076
9125 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9126 operands[2] instead of operands[1].
9127
9128
9129 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9130
9131 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9132 case, check whether the outer register overlaps an unallocatable
9133 register, not just whether it fits the required class.
9134
9135 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
9136
9137 * poly-int.h (can_div_trunc_p): Add new overload in which all values
9138 are poly_ints.
9139 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9140 (memrefs_conflict_p): Likewise.
9141 (init_alias_analysis): Likewise.
9142 * cfgexpand.c (expand_debug_expr): Likewise.
9143 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9144 * cse.c (fold_rtx): Likewise.
9145 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9146 * expr.c (emit_block_move_hints): Likewise.
9147 (clear_storage_hints, push_block, emit_push_insn): Likewise.
9148 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9149 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9150 (emit_group_store): Likewise.
9151 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
9152 to read the PRE/POST_MODIFY increment.
9153 * calls.c (store_one_arg): Use strip_offset.
9154 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9155 poly_int_rtx_p.
9156 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9157 by a VEC_SELECT.
9158 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9159 (simplify_binary_operation_1): Extend CONST_INT handling to
9160 poly_int_rtx_p.
9161 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9162 than a HOST_WIDE_INT.
9163 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9164 poly_int64.
9165 (adjust_mems, add_stores): Update accodingly.
9166 (vt_canonicalize_addr): Track polynomial offsets.
9167 (emit_note_insn_var_location): Likewise.
9168 (vt_add_function_parameter): Likewise.
9169 (vt_initialize): Likewise.
9170
9171 2018-06-12 Jeff Law <law@redhat.com>
9172
9173 * config.gcc (alpha*-*-freebsd*): Remove.
9174 * config/alpha/freebsd.h: Remove.
9175
9176 2018-06-12 David Malcolm <dmalcolm@redhat.com>
9177
9178 PR other/69968
9179 * spellcheck-tree.c (levenshtein_distance): Rename to...
9180 (get_edit_distance): ...this, and update for underlying renaming.
9181 * spellcheck-tree.h (levenshtein_distance): Rename to...
9182 (get_edit_distance): ...this.
9183 * spellcheck.c (levenshtein_distance): Rename to...
9184 (get_edit_distance): ...this. Convert from Levenshtein distance
9185 to Damerau-Levenshtein distance by supporting transpositions of
9186 adjacent characters. Rename "v1" to "v_next" and "v0" to
9187 "v_one_ago".
9188 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9189 (selftest::test_edit_distance_unit_test_oneway): ...this, and
9190 update for underlying renaming.
9191 (selftest::levenshtein_distance_unit_test): Rename to...
9192 (selftest::test_get_edit_distance_unit): ...this, and update for
9193 underlying renaming.
9194 (selftest::test_find_closest_string): Add example from PR 69968
9195 where transposition helps
9196 (selftest::test_metric_conditions): Update for renaming.
9197 (selftest::test_metric_conditions): Likewise.
9198 (selftest::spellcheck_c_tests): Likewise.
9199 * spellcheck.h (levenshtein_distance): Rename both overloads to...
9200 (get_edit_distance): ...this.
9201 (best_match::consider): Update for renaming.
9202
9203 2018-06-12 Martin Sebor <msebor@redhat.com>
9204
9205 PR tree-optimization/85259
9206 * builtins.c (compute_objsize): Handle constant offsets.
9207 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9208 true iff a warning has been issued.
9209 * gimple.h (gimple_nonartificial_location): New function.
9210 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9211 gimple_nonartificial_location and handle -Wno-system-headers.
9212 (handle_builtin_stxncpy): Same.
9213
9214 2018-06-12 Martin Sebor <msebor@redhat.com>
9215
9216 PR c/85931
9217 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9218
9219 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
9220
9221 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9222 BUILTIN_VEC_XST entries for pointer to double and long long.
9223
9224 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
9225
9226 PR target/85990
9227 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9228 Update comments.
9229 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9230 Likewise.
9231
9232 2018-06-12 Martin Liska <mliska@suse.cz>
9233
9234 * doc/options.texi: Document IntegerRange.
9235
9236 2018-06-12 Martin Liska <mliska@suse.cz>
9237
9238 * config/i386/i386.opt: Make MPX-related options as Deprecated.
9239 * opt-functions.awk: Handle Deprecated flag.
9240 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9241 and report error.
9242 (read_cmdline_option): Report warning for a deprecated option.
9243 * opts.h (struct cl_option): Add new field cl_deprecated.
9244 (CL_ERR_DEPRECATED): New.
9245
9246 2018-06-12 Martin Liska <mliska@suse.cz>
9247
9248 * doc/options.texi: Document Deprecated option flag.
9249
9250 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9251
9252 * config/arc/arc-arch.h (arc_extras): New enum.
9253 (arc_cpu_t):Add field extra.
9254 (arc_cpu_types): Consider the extras.
9255 * config/arc/arc-cpus.def: Add extras info.
9256 * config/arc/arc-opts.h (processor_type): Consider extra field.
9257 * config/arc/arc.c (arc_override_options): Handle extra field.
9258
9259 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
9260
9261 * config/arc/arc-arch.h: Update ARC_OPTX macro.
9262 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9263 field.
9264 * config/arc/arc.c (arc_init): Update pic warning.
9265 (irq_range): Update irq range parsing warnings.
9266 (arc_override_options): Update various warning messages.
9267 (arc_handle_aux_attribute): Likewise.
9268
9269 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
9270
9271 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9272
9273 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9274
9275 * doc/sourcebuild.texi: Document usage of line number 0 in verify
9276 compiler messages directives.
9277
9278 2018-06-12 Matthew Fortune <mfortune@gmail.com>
9279
9280 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9281 * config/mips/mips-tables.opt: Regenerate.
9282 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9283 mips64r6.
9284 * doc/invoke.texi: Document -march=i6500.
9285
9286 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
9287
9288 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9289 (i6400_gpmul): Add cpu_unit.
9290 (i6400_gpdiv): Likewise.
9291 (i6400_msa_add_d): Update reservations.
9292 (i6400_msa_int_add) Likewise.
9293 (i6400_msa_short_logic3) Likewise.
9294 (i6400_msa_short_logic2) Likewise.
9295 (i6400_msa_short_logic) Likewise.
9296 (i6400_msa_move) Likewise.
9297 (i6400_msa_cmp) Likewise.
9298 (i6400_msa_short_float2) Likewise.
9299 (i6400_msa_div_d) Likewise.
9300 (i6400_msa_long_logic1) Likewise.
9301 (i6400_msa_long_logic2) Likewise.
9302 (i6400_msa_mult) Likewise.
9303 (i6400_msa_long_float2) Likewise.
9304 (i6400_msa_long_float4) Likewise.
9305 (i6400_msa_long_float5) Likewise.
9306 (i6400_msa_long_float8) Likewise.
9307 (i6400_fpu_fadd): Include frint type.
9308 (i6400_fpu_store): New define_insn_reservation.
9309 (i6400_fpu_load): Likewise.
9310 (i6400_fpu_move): Likewise.
9311 (i6400_fpu_fcmp): Likewise.
9312 (i6400_fpu_fmadd): Likewise.
9313 (i6400_int_mult): Include imul3nc type and update reservation.
9314 (i6400_int_div): Include idiv3 type and update reservation.
9315 (i6400_int_load): Update to check type not move_type.
9316 (i6400_int_store): Likewise.
9317 (i6400_int_prefetch): Set zero latency.
9318
9319 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
9320
9321 * gcc.c: Document new %@{...} sequence.
9322 (LINK_COMMAND_SPEC): Use it for the -L switches.
9323 (cpp_unique_options): Use it for the -I switches.
9324 (at_file_argbuf): New global variable.
9325 (in_at_file): Likewise.
9326 (alloc_args): Create at_file_argbuf.
9327 (clear_args): Truncate at_file_argbuf.
9328 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9329 (open_at_file): New function.
9330 (close_at_file): Likewise.
9331 (create_at_file): Delete.
9332 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9333 <'o'>: Likewise.
9334 <'@'>: New case.
9335 (validate_switches_from_spec): Deal with %@{...} sequence.
9336 (validate_switches): Likewise.
9337 (driver::finalize): Call clear_args.
9338
9339 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
9340
9341 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9342
9343 2018-06-11 Martin Sebor <msebor@redhat.com>
9344
9345 * doc/invoke.texi (-Wall): List -Wc++17-compat.
9346 (Wno-class-memaccess): Add @opindex.
9347 (Wno-templates, Wno-multiple-inheritance): Same.
9348 (Wno-virtual-inheritance, Wno-namespaces): Same.
9349 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9350 (Wno-format-overflow, Wno-format-truncation): Same.
9351 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9352 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9353 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9354 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9355 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9356 (Wno-misspelled-isr): Same.
9357
9358 2018-06-11 Martin Sebor <msebor@redhat.com>
9359
9360 * PR tree-optimization/86083
9361 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9362
9363 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
9364
9365 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9366
9367 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
9368
9369 PR target/85755
9370 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9371 on the correct operand.
9372 (*movdi_internal64): Ditto.
9373
9374 2018-06-11 Martin Liska <mliska@suse.cz>
9375
9376 PR tree-optimization/86089
9377 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9378
9379 2018-06-11 Julia Koval <julia.koval@intel.com>
9380
9381 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9382 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9383 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9384
9385 2018-06-11 Olivier Hainque <hainque@adacore.com>
9386
9387 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9388 for Ada with strict dwarf2.
9389
9390 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
9391
9392 PR target/85755
9393 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9394 addresses.
9395
9396 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
9397
9398 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9399
9400 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
9401
9402 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9403 TARGET_ELF.
9404
9405 2018-06-08 Martin Liska <mliska@suse.cz>
9406
9407 * tree-cfg.h (debug_function): Fix argument type to match
9408 implementation.
9409
9410 2018-06-08 Martin Liska <mliska@suse.cz>
9411
9412 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9413 Remove usage of MPX-related (and removed) fields.
9414 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9415
9416 2018-06-08 David Malcolm <dmalcolm@redhat.com>
9417
9418 * cfg.c (debug): Use TDF_NONE rather than 0.
9419 * cfghooks.c (debug): Likewise.
9420 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9421 (struct dump_option_value_info): Convert to...
9422 (struct kv_pair): ...this template type.
9423 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9424 rather than 0.
9425 (optinfo_verbosity_options): Likewise.
9426 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9427 OPTGROUP_NONE.
9428 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9429 than int for "optgroup_flags" param.
9430 (dump_generic_expr_loc): Use dump_flags_t rather than int for
9431 "dump_kind" param.
9432 (dump_dec): Likewise.
9433 (dump_finish): Use TDF_NONE rather than 0.
9434 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9435 rather than int for "optgroup_flags" param. Use TDF_NONE rather
9436 than 0. Update for change to option_ptr.
9437 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9438 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
9439 0. Update for changes to optinfo_verbosity_options and
9440 optgroup_options.
9441 (opt_info_switch_p): Convert optgroup_flags from int to
9442 optgroup_flags_t.
9443 (dump_basic_block): Use dump_flags_t rather than int
9444 for "dump_kind" param.
9445 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9446 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9447 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9448 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9449 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9450 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9451 TDF_NONE): Convert from macros to...
9452 (enum dump_flag): ...this new enum.
9453 (dump_flags_t): Update to use enum.
9454 (operator|, operator&, operator~, operator|=, operator&=):
9455 Implement for dump_flags_t.
9456 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9457 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9458 Convert from macros to...
9459 (enum optgroup_flag): ...this new enum.
9460 (optgroup_flags_t): New typedef.
9461 (operator|, operator|=): Implement for optgroup_flags_t.
9462 (struct dump_file_info): Convert field "alt_flags" to
9463 dump_flags_t. Convert field "optgroup_flags" to
9464 optgroup_flags_t.
9465 (dump_basic_block): Use dump_flags_t rather than int for param.
9466 (dump_generic_expr_loc): Likewise.
9467 (dump_dec): Likewise.
9468 (dump_register): Convert param "optgroup_flags" to
9469 optgroup_flags_t.
9470 (opt_info_enable_passes): Likewise.
9471 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9472 than 0.
9473 * gimple-pretty-print.c (debug): Likewise.
9474 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9475 (merged_store_group::apply_stores): Likewise.
9476 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9477 * gimple.c (verify_gimple_pp): Likewise.
9478 * graphite-poly.c (print_pbb_body): Likewise.
9479 * passes.c (pass_manager::register_one_dump_file): Convert
9480 local "optgroup_flags" to optgroup_flags_t.
9481 * print-tree.c (print_node): Use TDF_NONE rather than 0.
9482 (debug): Likewise.
9483 (debug_body): Likewise.
9484 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9485 to optgroup_flags_t.
9486 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9487 than 0.
9488 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9489 (convert_mult_to_fma): Likewise.
9490 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9491 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9492 * tree-vect-data-refs.c (dump_lower_bound): Convert param
9493 "dump_kind" to dump_flags_t.
9494
9495 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9496
9497 * config/rs6000/rs6000.c (min, max): Delete.
9498
9499 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
9500
9501 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9502 -mabi=spe and -mabi=no-spe.
9503
9504 2018-06-08 Martin Liska <mliska@suse.cz>
9505
9506 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9507 where we expect an existing summary.
9508
9509 2018-06-08 Martin Liska <mliska@suse.cz>
9510
9511 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9512 * ipa-inline.h (estimate_edge_growth): Likewise.
9513
9514 2018-06-08 Martin Liska <mliska@suse.cz>
9515
9516 * cgraph.c (function_version_hasher::hash): Use
9517 cgraph_node::get_uid ().
9518 (function_version_hasher::equal):
9519 * cgraph.h (cgraph_node::get_uid): New method.
9520 * ipa-inline.c (update_caller_keys): Use
9521 cgraph_node::get_uid ().
9522 (update_callee_keys): Likewise.
9523 * ipa-utils.c (searchc): Likewise.
9524 (ipa_reduced_postorder): Likewise.
9525 * lto-cgraph.c (input_node): Likewise.
9526 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9527 * symbol-summary.h (symtab_insertion): Likewise.
9528 (symtab_removal): Likewise.
9529 (symtab_duplication): Likewise.
9530 * tree-pretty-print.c (dump_function_header): Likewise.
9531 * tree-sra.c (convert_callers_for_node): Likewise.
9532
9533 2018-06-08 Martin Liska <mliska@suse.cz>
9534
9535 * cgraph.c (symbol_table::create_edge): Always assign a new
9536 unique number.
9537 (symbol_table::free_edge): Do not recycle numbers.
9538 * cgraph.h (cgraph_edge::get): New method.
9539 * symbol-summary.h (symtab_removal): Use it.
9540 (symtab_duplication): Likewise.
9541 (call_summary::hashable_uid): Remove.
9542
9543 2018-06-08 Martin Liska <mliska@suse.cz>
9544
9545 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9546 (initialize_growth_caches): Remove.
9547 (free_growth_caches): Likewise.
9548 (do_estimate_edge_time): Use edge_growth_cache.
9549 (do_estimate_edge_size): Likewise.
9550 (do_estimate_edge_hints): Likewise.
9551 * ipa-inline.c (reset_edge_caches): Likewise.
9552 (recursive_inlining): Likewise.
9553 (inline_small_functions): Likewise.
9554 * ipa-inline.h (initialize_growth_caches): Remove.
9555 (estimate_edge_size): Likewise.
9556 (estimate_edge_time): Likewise.
9557 (estimate_edge_hints): Likewise.
9558 (reset_edge_growth_cache): Likewise.
9559 * symbol-summary.h (call_summary::remove): New method.
9560
9561 2018-06-08 Martin Liska <mliska@suse.cz>
9562
9563 * ipa-cp.c (class edge_clone_summary): New summary.
9564 (grow_edge_clone_vectors): Remove.
9565 (ipcp_edge_duplication_hook): Remove.
9566 (class edge_clone_summary_t): New call_summary class.
9567 (ipcp_edge_removal_hook): Remove.
9568 (edge_clone_summary_t::duplicate): New function.
9569 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9570 (create_specialized_node): Likewise.
9571 (ipcp_driver): Initialize edge_clone_summaries and do not
9572 register hooks.
9573
9574 2018-06-08 Martin Liska <mliska@suse.cz>
9575
9576 * symbol-summary.h (get): New function.
9577 (call_summary::m_initialize_when_cloning): New class member.
9578
9579 2018-06-08 Martin Liska <mliska@suse.cz>
9580
9581 * cgraph.c (cgraph_node::remove): Do not recycle uid.
9582 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9583 (symbol_table::allocate_cgraph_symbol): Do not set uid.
9584 * passes.c (uid_hash_t): Record removed_nodes by their uids.
9585 (remove_cgraph_node_from_order): Use the removed_nodes set.
9586 (do_per_function_toporder): Likwise.
9587 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9588 instead of summary_uid.
9589 (symtab_removal): Likewise.
9590 (symtab_duplication): Likewise.
9591
9592 2018-06-08 Martin Liska <mliska@suse.cz>
9593
9594 * ipa-cp.c (ipcp_store_bits_results): Use
9595 ipcp_transformation_sum.
9596 (ipcp_store_vr_results): Likewise.
9597 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9598 to ...
9599 (ipcp_transformation_initialize): ... this.
9600 (ipa_set_node_agg_value_chain):
9601 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9602 (write_ipcp_transformation_info): Likewise.
9603 (read_ipcp_transformation_info): Likewise.
9604 (ipcp_update_bits): Likewise.
9605 (ipcp_update_vr): Likewise.
9606 (ipcp_transform_function): Likewise.
9607 * ipa-prop.h: Rename ipcp_transformation_summary to
9608 ipcp_transformation.
9609 (class ipcp_transformation_t): New function summary.
9610 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9611 (ipa_get_agg_replacements_for_node): Likewise.
9612
9613 2018-06-08 Martin Liska <mliska@suse.cz>
9614
9615 * ipa-pure-const.c (struct funct_state_d): Do it class instead
9616 of struct.
9617 (class funct_state_summary_t): New function_summary class.
9618 (has_function_state): Remove.
9619 (get_function_state): Likewise.
9620 (set_function_state): Likewise.
9621 (add_new_function): Likewise.
9622 (funct_state_summary_t::insert): New function.
9623 (duplicate_node_data): Remove.
9624 (remove_node_data): Remove.
9625 (funct_state_summary_t::duplicate): New function.
9626 (register_hooks): Create new funct_state_summaries.
9627 (pure_const_generate_summary): Use it.
9628 (pure_const_write_summary): Likewise.
9629 (pure_const_read_summary): Likewise.
9630 (propagate_pure_const): Likewise.
9631 (propagate_nothrow): Likewise.
9632 (dump_malloc_lattice): Likewise.
9633 (propagate_malloc): Likewise.
9634 (execute): Do not register hooks, just remove summary
9635 instead.
9636 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9637 constructor.
9638
9639 2018-06-08 Martin Liska <mliska@suse.cz>
9640
9641 * ipa-reference.c (remove_node_data): Remove.
9642 (duplicate_node_data): Likewise.
9643 (class ipa_ref_var_info_summary_t): New class.
9644 (class ipa_ref_opt_summary_t): Likewise.
9645 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9646 (get_reference_optimization_summary): Use
9647 ipa_ref_opt_sum_summaries.
9648 (set_reference_vars_info): Remove.
9649 (set_reference_optimization_summary): Likewise.
9650 (ipa_init): Create summaries.
9651 (init_function_info): Use function summary.
9652 (ipa_ref_opt_summary_t::duplicate): New function.
9653 (ipa_ref_opt_summary_t::remove): New function.
9654 (get_read_write_all_from_node): Fix GNU coding style.
9655 (propagate): Use function summary.
9656 (write_node_summary_p): Fix GNU coding style.
9657 (stream_out_bitmap): Likewise.
9658 (ipa_reference_read_optimization_summary): Use function summary.
9659 (ipa_reference_c_finalize): Do not release hooks.
9660
9661 2018-06-08 Martin Liska <mliska@suse.cz>
9662
9663 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9664 (analyze_function_body): Extract multiple calls of get_create.
9665 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9666 * ipa-inline.c (recursive_inlining): Use ::get method.
9667 * ipa-inline.h (estimate_edge_growth): Likewise.
9668
9669 2018-06-08 Martin Liska <mliska@suse.cz>
9670
9671 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9672 HSA_INVALID.
9673 (hsa_function_summary::hsa_function_summary): Use the new enum
9674 value.
9675 (hsa_gpu_implementation_p): Use hsa_summaries::get.
9676 * hsa-gen.c (hsa_get_host_function): Likewise.
9677 (get_brig_function_name): Likewise.
9678 * ipa-hsa.c (process_hsa_functions): Likewise.
9679 (ipa_hsa_write_summary): Likewise.
9680 * symbol-summary.h (symtab_duplication): Use ::get function/
9681 (get): New function.
9682
9683 2018-06-08 Martin Liska <mliska@suse.cz>
9684
9685 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9686 of get.
9687 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9688 (hsa_register_kernel): Likewise.
9689 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9690 * hsa-gen.c (hsa_get_host_function): Likewise.
9691 (get_brig_function_name): Likewise.
9692 (generate_hsa): Likewise.
9693 (pass_gen_hsail::execute): Likewise.
9694 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9695 (devirtualization_time_bonus): Likewise.
9696 (ipcp_propagate_stage): Likewise.
9697 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9698 (edge_set_predicate): Likewise.
9699 (evaluate_conditions_for_known_args): Likewise.
9700 (evaluate_properties_for_edge): Likewise.
9701 (ipa_fn_summary::reset): Likewise.
9702 (ipa_fn_summary_t::duplicate): Likewise.
9703 (dump_ipa_call_summary): Likewise.
9704 (ipa_dump_fn_summary): Likewise.
9705 (analyze_function_body): Likewise.
9706 (compute_fn_summary): Likewise.
9707 (estimate_edge_devirt_benefit): Likewise.
9708 (estimate_edge_size_and_time): Likewise.
9709 (estimate_calls_size_and_time): Likewise.
9710 (estimate_node_size_and_time): Likewise.
9711 (inline_update_callee_summaries): Likewise.
9712 (remap_edge_change_prob): Likewise.
9713 (remap_edge_summaries): Likewise.
9714 (ipa_merge_fn_summary_after_inlining): Likewise.
9715 (ipa_update_overall_fn_summary): Likewise.
9716 (read_ipa_call_summary): Likewise.
9717 (inline_read_section): Likewise.
9718 (write_ipa_call_summary): Likewise.
9719 (ipa_fn_summary_write): Likewise.
9720 (ipa_free_fn_summary): Likewise.
9721 * ipa-hsa.c (process_hsa_functions): Likewise.
9722 (ipa_hsa_write_summary): Likewise.
9723 (ipa_hsa_read_section): Likewise.
9724 * ipa-icf.c (sem_function::merge): Likewise.
9725 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9726 (do_estimate_edge_time): Likewise.
9727 (estimate_size_after_inlining): Likewise.
9728 (estimate_growth): Likewise.
9729 (growth_likely_positive): Likewise.
9730 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9731 (inline_call): Likewise.
9732 * ipa-inline.c (caller_growth_limits): Likewise.
9733 (can_inline_edge_p): Likewise.
9734 (can_inline_edge_by_limits_p): Likewise.
9735 (compute_uninlined_call_time): Likewise.
9736 (compute_inlined_call_time): Likewise.
9737 (want_inline_small_function_p): Likewise.
9738 (edge_badness): Likewise.
9739 (update_caller_keys): Likewise.
9740 (update_callee_keys): Likewise.
9741 (recursive_inlining): Likewise.
9742 (inline_small_functions): Likewise.
9743 (inline_to_all_callers_1): Likewise.
9744 (dump_overall_stats): Likewise.
9745 (early_inline_small_functions): Likewise.
9746 (early_inliner): Likewise.
9747 * ipa-inline.h (estimate_edge_growth): Likewise.
9748 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9749 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9750 * ipa-prop.h (IPA_NODE_REF): Likewise.
9751 (IPA_EDGE_REF): Likewise.
9752 * ipa-pure-const.c (malloc_candidate_p): Likewise.
9753 (propagate_malloc): Likewise.
9754 * ipa-split.c (execute_split_functions): Likewise.
9755 * symbol-summary.h: Rename get to get_create.
9756 (get): Likewise.
9757 (get_create): Likewise.
9758 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9759
9760 2018-06-08 Martin Liska <mliska@suse.cz>
9761
9762 * symbol-summary.h (release): Move definition out of class
9763 declaration.
9764 (symtab_removal): Likewise.
9765 (symtab_duplication): Likewise.
9766
9767 2018-06-08 Martin Liska <mliska@suse.cz>
9768
9769 * symbol-summary.h (function_summary): Move constructor
9770 implementation out of class declaration.
9771 (release): Likewise.
9772 (symtab_insertion): Likewise.
9773 (symtab_removal): Likewise.
9774 (symtab_duplication): Likewise.
9775 (get): Likewise.
9776
9777 2018-06-08 Martin Liska <mliska@suse.cz>
9778
9779 * Makefile.in: Remove support for MPX (macros, related functions,
9780 fields in cgraph_node, ...).
9781 * builtin-types.def (BT_BND): Likewise.
9782 (BT_FN_BND_CONST_PTR): Likewise.
9783 (BT_FN_CONST_PTR_BND): Likewise.
9784 (BT_FN_VOID_PTR_BND): Likewise.
9785 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9786 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9787 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9788 (expand_builtin_mempcpy_with_bounds): Likewise.
9789 (expand_builtin_memset_with_bounds): Likewise.
9790 (expand_builtin_memset_args): Likewise.
9791 (std_expand_builtin_va_start): Likewise.
9792 (expand_builtin): Likewise.
9793 (expand_builtin_with_bounds): Likewise.
9794 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9795 (DEF_LIB_BUILTIN_CHKP): Likewise.
9796 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9797 (DEF_CHKP_BUILTIN): Likewise.
9798 (BUILT_IN_MEMCPY): Likewise.
9799 (BUILT_IN_MEMMOVE): Likewise.
9800 (BUILT_IN_MEMPCPY): Likewise.
9801 (BUILT_IN_MEMSET): Likewise.
9802 (BUILT_IN_STPCPY): Likewise.
9803 (BUILT_IN_STRCAT): Likewise.
9804 (BUILT_IN_STRCHR): Likewise.
9805 (BUILT_IN_STRCPY): Likewise.
9806 (BUILT_IN_STRLEN): Likewise.
9807 (BUILT_IN_MEMCPY_CHK): Likewise.
9808 (BUILT_IN_MEMMOVE_CHK): Likewise.
9809 (BUILT_IN_MEMPCPY_CHK): Likewise.
9810 (BUILT_IN_MEMSET_CHK): Likewise.
9811 (BUILT_IN_STPCPY_CHK): Likewise.
9812 (BUILT_IN_STRCAT_CHK): Likewise.
9813 (BUILT_IN_STRCPY_CHK): Likewise.
9814 * calls.c (store_bounds): Likewise.
9815 (emit_call_1): Likewise.
9816 (special_function_p): Likewise.
9817 (maybe_warn_nonstring_arg): Likewise.
9818 (initialize_argument_information): Likewise.
9819 (finalize_must_preallocate): Likewise.
9820 (compute_argument_addresses): Likewise.
9821 (expand_call): Likewise.
9822 * cfgexpand.c (expand_call_stmt): Likewise.
9823 (expand_return): Likewise.
9824 (expand_gimple_stmt_1): Likewise.
9825 (pass_expand::execute): Likewise.
9826 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9827 (cgraph_node::remove): Likewise.
9828 (cgraph_node::dump): Likewise.
9829 (cgraph_node::verify_node): Likewise.
9830 * cgraph.h (chkp_function_instrumented_p): Likewise.
9831 (symtab_node::get_alias_target): Likewise.
9832 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9833 (cgraph_local_p): Likewise.
9834 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9835 (cgraph_edge::rebuild_references): Likewise.
9836 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9837 (walk_polymorphic_call_targets): Likewise.
9838 (cgraph_node::expand_thunk): Likewise.
9839 (symbol_table::output_weakrefs): Likewise.
9840 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9841 (ix86_handle_option): Likewise.
9842 * config/i386/constraints.md: Likewise.
9843 * config/i386/i386-builtin-types.def (BND): Likewise.
9844 (VOID): Likewise.
9845 (PVOID): Likewise.
9846 (ULONG): Likewise.
9847 * config/i386/i386-builtin.def (BDESC_END): Likewise.
9848 (BDESC_FIRST): Likewise.
9849 (BDESC): Likewise.
9850 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9851 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9852 * config/i386/i386.c (enum reg_class): Likewise.
9853 (ix86_target_string): Likewise.
9854 (ix86_option_override_internal): Likewise.
9855 (ix86_conditional_register_usage): Likewise.
9856 (ix86_valid_target_attribute_inner_p): Likewise.
9857 (ix86_set_indirect_branch_type): Likewise.
9858 (ix86_set_current_function): Likewise.
9859 (ix86_function_arg_regno_p): Likewise.
9860 (init_cumulative_args): Likewise.
9861 (ix86_function_arg_advance): Likewise.
9862 (ix86_function_arg): Likewise.
9863 (ix86_pass_by_reference): Likewise.
9864 (ix86_function_value_regno_p): Likewise.
9865 (ix86_function_value_1): Likewise.
9866 (ix86_function_value_bounds): Likewise.
9867 (ix86_return_in_memory): Likewise.
9868 (ix86_setup_incoming_vararg_bounds): Likewise.
9869 (ix86_va_start): Likewise.
9870 (indirect_thunk_need_prefix): Likewise.
9871 (print_reg): Likewise.
9872 (ix86_print_operand): Likewise.
9873 (ix86_expand_call): Likewise.
9874 (ix86_output_function_return): Likewise.
9875 (reg_encoded_number): Likewise.
9876 (BDESC_VERIFYS): Likewise.
9877 (ix86_init_mpx_builtins): Likewise.
9878 (ix86_init_builtins): Likewise.
9879 (ix86_emit_cmove): Likewise.
9880 (ix86_emit_move_max): Likewise.
9881 (ix86_expand_builtin): Likewise.
9882 (ix86_builtin_mpx_function): Likewise.
9883 (ix86_get_arg_address_for_bt): Likewise.
9884 (ix86_load_bounds): Likewise.
9885 (ix86_store_bounds): Likewise.
9886 (ix86_load_returned_bounds): Likewise.
9887 (ix86_store_returned_bounds): Likewise.
9888 (ix86_class_likely_spilled_p): Likewise.
9889 (ix86_hard_regno_mode_ok): Likewise.
9890 (x86_order_regs_for_local_alloc): Likewise.
9891 (ix86_mitigate_rop): Likewise.
9892 (ix86_bnd_prefixed_insn_p): Likewise.
9893 (ix86_mpx_bound_mode): Likewise.
9894 (ix86_make_bounds_constant): Likewise.
9895 (ix86_initialize_bounds): Likewise.
9896 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9897 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9898 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9899 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9900 (TARGET_CHKP_BOUND_MODE): Likewise.
9901 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9902 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9903 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9904 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9905 * config/i386/i386.h (TARGET_MPX): Likewise.
9906 (TARGET_MPX_P): Likewise.
9907 (VALID_BND_REG_MODE): Likewise.
9908 (FIRST_BND_REG): Likewise.
9909 (LAST_BND_REG): Likewise.
9910 (enum reg_class): Likewise.
9911 (BND_REG_P): Likewise.
9912 (BND_REGNO_P): Likewise.
9913 (BNDmode): Likewise.
9914 (ADJUST_INSN_LENGTH): Likewise.
9915 * config/i386/i386.md: Likewise.
9916 * config/i386/i386.opt: Likewise.
9917 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9918 (defined): Likewise.
9919 (LINK_MPX): Likewise.
9920 (MPX_SPEC): Likewise.
9921 (LIBMPX_SPEC): Likewise.
9922 (LIBMPXWRAPPERS_SPEC): Likewise.
9923 (CHKP_SPEC): Likewise.
9924 * config/i386/predicates.md: Likewise.
9925 * dbxout.c (dbxout_type): Likewise.
9926 * doc/extend.texi: Likewise.
9927 * doc/invoke.texi: Likewise.
9928 * doc/md.texi: Likewise.
9929 * doc/tm.texi: Likewise.
9930 * doc/tm.texi.in: Likewise.
9931 * dwarf2out.c (is_base_type): Likewise.
9932 (gen_formal_types_die): Likewise.
9933 (gen_subprogram_die): Likewise.
9934 (gen_type_die_with_usage): Likewise.
9935 (gen_decl_die): Likewise.
9936 (dwarf2out_late_global_decl): Likewise.
9937 * expr.c (expand_assignment): Likewise.
9938 (emit_storent_insn): Likewise.
9939 (store_expr_with_bounds): Likewise.
9940 (store_expr): Likewise.
9941 (expand_expr_real_1): Likewise.
9942 * expr.h (store_expr_with_bounds): Likewise.
9943 * function.c (use_register_for_decl): Likewise.
9944 (struct bounds_parm_data): Likewise.
9945 (assign_parms_augmented_arg_list): Likewise.
9946 (assign_parm_find_entry_rtl): Likewise.
9947 (assign_parm_is_stack_parm): Likewise.
9948 (assign_parm_load_bounds): Likewise.
9949 (assign_bounds): Likewise.
9950 (assign_parms): Likewise.
9951 (expand_function_start): Likewise.
9952 * gcc.c (CHKP_SPEC): Likewise.
9953 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9954 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9955 (wrestrict_dom_walker::check_call): Likewise.
9956 * gimple.c (gimple_build_call_from_tree): Likewise.
9957 * gimple.h (enum gf_mask): Likewise.
9958 (gimple_call_with_bounds_p): Likewise.
9959 (gimple_call_set_with_bounds): Likewise.
9960 * gimplify.c (gimplify_init_constructor): Likewise.
9961 * ipa-cp.c (initialize_node_lattices): Likewise.
9962 (propagate_constants_across_call): Likewise.
9963 (find_more_scalar_values_for_callers_subset): Likewise.
9964 * ipa-hsa.c (process_hsa_functions): Likewise.
9965 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9966 * ipa-icf.c (sem_function::merge): Likewise.
9967 * ipa-inline.c (early_inliner): Likewise.
9968 * ipa-pure-const.c (warn_function_noreturn): Likewise.
9969 (warn_function_cold): Likewise.
9970 (propagate_pure_const): Likewise.
9971 * ipa-ref.h (enum GTY): Likewise.
9972 * ipa-split.c (find_retbnd): Likewise.
9973 (consider_split): Likewise.
9974 (split_function): Likewise.
9975 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9976 * ipa.c (walk_polymorphic_call_targets): Likewise.
9977 (symbol_table::remove_unreachable_nodes): Likewise.
9978 (process_references): Likewise.
9979 (cgraph_build_static_cdtor_1): Likewise.
9980 * lto-cgraph.c (lto_output_node): Likewise.
9981 (output_refs): Likewise.
9982 (compute_ltrans_boundary): Likewise.
9983 (input_overwrite_node): Likewise.
9984 (input_node): Likewise.
9985 (input_cgraph_1): Likewise.
9986 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9987 * passes.c (pass_manager::execute_early_local_passes): Likewise.
9988 (class pass_chkp_instrumentation_passes): Likewise.
9989 (make_pass_chkp_instrumentation_passes): Likewise.
9990 * passes.def: Likewise.
9991 * rtl.h (struct GTY): Likewise.
9992 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9993 * stor-layout.c (layout_type): Likewise.
9994 * symtab.c: Likewise.
9995 * target.def: Likewise.
9996 * targhooks.c (default_chkp_bound_type): Likewise.
9997 (default_chkp_bound_mode): Likewise.
9998 (default_builtin_chkp_function): Likewise.
9999 (default_chkp_function_value_bounds): Likewise.
10000 (default_chkp_make_bounds_constant): Likewise.
10001 (default_chkp_initialize_bounds): Likewise.
10002 * targhooks.h (default_chkp_bound_type): Likewise.
10003 (default_chkp_bound_mode): Likewise.
10004 (default_builtin_chkp_function): Likewise.
10005 (default_chkp_function_value_bounds): Likewise.
10006 (default_chkp_make_bounds_constant): Likewise.
10007 (default_chkp_initialize_bounds): Likewise.
10008 * toplev.c (compile_file): Likewise.
10009 (process_options): Likewise.
10010 * tree-core.h (DEF_BUILTIN): Likewise.
10011 (DEF_BUILTIN_CHKP): Likewise.
10012 * tree-inline.c (declare_return_variable): Likewise.
10013 (remap_gimple_stmt): Likewise.
10014 (copy_bb): Likewise.
10015 (initialize_inlined_parameters): Likewise.
10016 (expand_call_inline): Likewise.
10017 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
10018 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
10019 (make_pass_ipa_chkp_produce_thunks): Likewise.
10020 (make_pass_chkp): Likewise.
10021 (make_pass_chkp_opt): Likewise.
10022 (make_pass_chkp_instrumentation_passes): Likewise.
10023 * tree-pretty-print.c (dump_generic_node): Likewise.
10024 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
10025 * tree-ssa-dce.c (propagate_necessity): Likewise.
10026 (eliminate_unnecessary_stmts): Likewise.
10027 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
10028 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
10029 * tree-ssa-sccvn.h: Likewise.
10030 * tree-ssa-strlen.c (get_string_length): Likewise.
10031 (valid_builtin_call): Likewise.
10032 (adjust_last_stmt): Likewise.
10033 (handle_builtin_strchr): Likewise.
10034 (handle_builtin_strcpy): Likewise.
10035 (handle_builtin_stxncpy): Likewise.
10036 (handle_builtin_memcpy): Likewise.
10037 (handle_builtin_strcat): Likewise.
10038 (strlen_check_and_optimize_stmt): Likewise.
10039 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
10040 * tree-streamer-in.c: Likewise.
10041 * tree-streamer.c (record_common_node): Likewise.
10042 * tree.c (tree_code_size): Likewise.
10043 (wide_int_to_tree_1): Likewise.
10044 (type_contains_placeholder_1): Likewise.
10045 (build_common_tree_nodes): Likewise.
10046 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
10047 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
10048 (POINTER_BOUNDS_P): Likewise.
10049 (BOUNDED_TYPE_P): Likewise.
10050 (BOUNDED_P): Likewise.
10051 (CALL_WITH_BOUNDS_P): Likewise.
10052 (pointer_bounds_type_node): Likewise.
10053 * value-prof.c (gimple_ic): Likewise.
10054 * var-tracking.c (vt_add_function_parameters): Likewise.
10055 * varasm.c (make_decl_rtl): Likewise.
10056 (assemble_start_function): Likewise.
10057 (output_constant): Likewise.
10058 (maybe_assemble_visibility): Likewise.
10059 * varpool.c (ctor_for_folding): Likewise.
10060 * chkp-builtins.def: Remove.
10061 * ipa-chkp.c: Remove.
10062 * ipa-chkp.h: Remove.
10063 * rtl-chkp.c: Remove.
10064 * rtl-chkp.h: Remove.
10065 * tree-chkp-opt.c: Remove.
10066 * tree-chkp.c: Remove.
10067 * tree-chkp.h: Remove.
10068
10069 2018-06-07 Carl Love <cel@us.ibm.com>
10070
10071 * config/rs6000/vsx.md (vextract_fp_from_shorth,
10072 vextract_fp_from_shortl): Add BE support.
10073
10074 2018-06-07 Paul Koning <ni1d@arrl.net>
10075
10076 * compare-elim.c (try_merge_compare): Don't merge compare if
10077 address contains a side effect.
10078 (try_eliminate_compare): Likewise.
10079
10080 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
10081
10082 * config.gcc: Support "tremont".
10083 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
10084 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10085 PROCESSOR_TREMONT.
10086 * config/i386/i386.c (m_TREMONT): Define.
10087 (processor_target_table): Add "tremont".
10088 (PTA_TREMONT): Define.
10089 (ix86_lea_outperforms): Add TARGET_TREMONT.
10090 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
10091 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10092 and M_INTEL_GOLDMONT_PLUS.
10093 (fold_builtin_cpu): Add "tremont".
10094 (ix86_add_stmt_cost): Add TARGET_TREMONT.
10095 (ix86_option_override_internal): Add "tremont".
10096 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10097 (processor_type): Add PROCESSOR_TREMONT.
10098 * config/i386/x86-tune.def: Add m_TREMONT.
10099 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10100
10101 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10102
10103 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10104 symbol defined for msp430i* devices to be lower case.
10105
10106 2018-06-07 Richard Biener <rguenther@suse.de>
10107
10108 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10109 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
10110 Properly wrap signed arithmetic if overflow wraps.
10111
10112 2018-06-07 Jakub Jelinek <jakub@redhat.com>
10113
10114 PR tree-optimization/69615
10115 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10116 of a cast from a same precision integral SSA_NAME in a bb dominated
10117 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
10118 cast to utype if rhs2 has already a compatible type.
10119
10120 2018-06-07 Richard Biener <rguenther@suse.de>
10121
10122 PR tree-optimization/85935
10123 * graphite-scop-detection.c (find_params_in_bb): Analyze
10124 condition operands with respect to the correct loop. Assert
10125 the analysis doesn't fail.
10126
10127 2018-06-04 Carl Love <cel@us.ibm.com>
10128
10129 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10130 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
10131 as it is slightly cheaper.
10132 (first_match_or_eos_index_<mode>):
10133 Calculate index using natural element order.
10134 (first_match_index_<mode>):
10135 Calculate index using natural element order.
10136 (first_match_or_eos_index_<mode>):
10137 Calculate index using natural order.
10138 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10139 for BE and LE modes.
10140 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10141 P9V_BUILTIN_VCLZLSBB_V16QI.
10142 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10143 specific.
10144
10145 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10146
10147 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10148 indentation and line wrap for many prototypes. Add missing
10149 @smallexample directives around block of prototypes for vec_xl and
10150 vec_xst.
10151
10152 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
10153
10154 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10155 track if we pass or return IEEE 128-bit floating point.
10156 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10157 C++ mangling that is compatible with GCC 8.1.
10158 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10159 (init_cumulative_args): Note if we pass or return IEEE 128-bit
10160 floating point types.
10161 (rs6000_function_arg_advance_1): Likewise.
10162 (rs6000_mangle_type): Optionally generate mangled names that match
10163 what GCC 8.1 generated for IEEE 128-bit floating point types.
10164 (rs6000_globalize_decl_name): If we have an external function that
10165 passes or returns IEEE 128-bit types, generate a weak reference
10166 from the mangled name used in GCC 8.1 to the current mangled
10167 name.
10168 (rs6000_init_builtins): Make __ibm128 use the long double type if
10169 long double is IBM extended double. Make __float128 use the long
10170 double type if long double is IEEE 128-bit.
10171
10172 PR target/85657
10173 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10174 macro for __ibm128 built-in functions.
10175 (PACK_IF): Add __ibm128 pack/unpack functions.
10176 (UNPACK_IF): Likewise.
10177 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10178 enable long double built-in functions if long double is IEEE
10179 128-bit floating point.
10180 (rs6000_invalid_builtin): Update long double built-in function
10181 error message.
10182 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10183 functions, adjust the built-in function to use the long double
10184 built-in function if __ibm128 and long double are the same type.
10185 * doc/extend.texi (PowerPC builtins): Update documention for
10186 __builtin_{,un}pack_longdouble. Add documentation for
10187 __builtin_{,un}pack_ibm128.
10188
10189 2018-06-06 Jim Wilson <jimw@sifive.com>
10190
10191 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10192 (struct machine_function): New field interrupt_mode.
10193 (riscv_handle_type_attribute): New function. Add forward declaration.
10194 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10195 (riscv_expand_epilogue): Check interrupt_mode field.
10196 (riscv_set_current_function): Check interrupt attribute args and
10197 set interrupt_mode field.
10198 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10199 (riscv_sret, riscv_uret): New.
10200 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10201 new arguments to interrupt attribute.
10202
10203 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
10204
10205 PR target/63177
10206 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10207 Don't handle -mcpu=power8 if -mpower9-vector is also used.
10208
10209 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
10210
10211 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10212 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10213 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10214 several redundant entries.
10215
10216 2018-06-06 David Malcolm <dmalcolm@redhat.com>
10217
10218 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10219 type from "rtx" to "rtx_insn *".
10220 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10221 for local "call_insn", removing cast.
10222 (ix86_expand_call): Likewise, introducing a "call_insn" local.
10223
10224 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
10225
10226 PR tree-optimization/86066
10227 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10228 for BIT_INSERT_EXPR stores.
10229
10230 2018-06-06 Richard Biener <rguenther@suse.de>
10231
10232 PR tree-optimization/86062
10233 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10234 component refs ontop
10235 of to be offsetted base.
10236
10237 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10238
10239 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10240 to be static and remove check on interrupt attribute name.
10241
10242 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
10243
10244 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10245 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10246
10247 2018-06-05 Steve Ellcey <sellcey@cavium.com>
10248
10249 PR target/79924
10250 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10251 second argument.
10252 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10253 Remove second argument, change how error is called.
10254 (aarch64_layout_arg): Remove second argument from
10255 aarch64_err_no_fpadvsimd call.
10256 (aarch64_init_cumulative_args): Ditto.
10257 (aarch64_gimplify_va_arg_expr): Ditto.
10258 * config/aarch64/aarch64.md (mov<mode>): Ditto.
10259
10260 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
10261
10262 * config/i386/i386.md (simple_return_indirect_internal): New expander.
10263 (*simple_return_indirect_internal<mode>): Rename from
10264 simple_return_indirect_internal. Use W mode iterator.
10265 (rstorssp): New expander.
10266 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
10267 (clrssbsy): New expander.
10268 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
10269
10270 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
10271
10272 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10273 __typeof__.
10274 (cmse_check_pointed_object): Likewise.
10275
10276 2018-06-05 Martin Liska <mliska@suse.cz>
10277
10278 PR gcov-profile/47618
10279 * doc/invoke.texi: Document how -fprofile-dir format
10280 is extended.
10281
10282 2018-06-05 Richard Biener <rguenther@suse.de>
10283
10284 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10285 removal pretend DOM info isn't available so we do not update
10286 it and only remove edges, not dominated blocks. Actually free
10287 DOM info in case we removed something. Remove unreachable blocks.
10288 (mfb_keep_latches): Work with either DOM info or marked backedges.
10289 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10290 first. Mark backedges if DOM info isn't available.
10291 (Re-)compute DOM info after cleanup_control_flow_pre.
10292
10293 2018-06-05 Richard Biener <rguenther@suse.de>
10294
10295 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10296 (locus_discrim_hasher::hash): Adjust.
10297 (locus_discrim_hasher::equal): Likewise.
10298 (next_discriminator_for_locus): Work on line directly.
10299 (same_line_p): Pass in expanded locus1 as well.
10300 (assign_discriminators): Avoid redundant location expansions.
10301
10302 2018-06-05 Richard Biener <rguenther@suse.de>
10303
10304 PR tree-optimization/86046
10305 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10306 if required after clearing TREE_ADDRESSABLE.
10307
10308 2018-06-05 Richard Biener <rguenther@suse.de>
10309
10310 PR tree-optimization/86047
10311 * tree-ssa-loop.c (for_each_index): Glob handling of all
10312 decls and constants and really handle all of them.
10313
10314 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10315
10316 PR target/81497
10317 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10318 qualifier_void_pointer and qualifier_const_void_pointer.
10319 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10320 (arm_init_builtins): Handle the above.
10321 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10322 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10323 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10324 void intrinsics.
10325
10326 2018-06-05 Martin Liska <mliska@suse.cz>
10327
10328 * auto-profile.c (read_autofdo_file): Do not use
10329 gcov_ctr_summary struct.
10330 (afdo_callsite_hot_enough_for_early_inline): Likewise.
10331 * coverage.c (struct counts_entry): Likewise.
10332 (read_counts_file): Read just single summary entry.
10333 (get_coverage_counts): Use gcov_summary struct.
10334 * coverage.h (get_coverage_counts): Likewise.
10335 * gcov-dump.c (dump_working_sets): Likewise.
10336 (tag_summary): Dump just single summary.
10337 * gcov-io.c (gcov_write_summary): Write just histogram
10338 summary.
10339 (gcov_read_summary): Read just single summary.
10340 (compute_working_sets): Use gcov_summary struct.
10341 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10342 of GCOV_COUNTERS_SUMMABLE.
10343 (GCOV_COUNTERS_SUMMABLE): Remove.
10344 (GCOV_FIRST_VALUE_COUNTER): Replace with
10345 GCOV_COUNTER_V_INTERVAL.
10346 (struct gcov_ctr_summary): Remove.
10347 (struct gcov_summary): Directly use fields of former
10348 gcov_ctr_summary.
10349 (compute_working_sets): Use gcov_summary struct.
10350 * gcov.c (read_count_file): Do not use ctrs fields.
10351 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10352 struct.
10353 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10354 struct.
10355 * profile.c: Likewise.
10356 * profile.h: Likewise.
10357
10358 2018-06-05 Martin Liska <mliska@suse.cz>
10359
10360 PR gcov-profile/84846
10361 * gcov.c (output_lines): Print working directory only
10362 in intermediate format.
10363
10364 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
10365
10366 * config/s390/s390-builtin-types.def: Add void function type.
10367 * config/s390/s390-builtins.def: Use the function type for the
10368 tbeginc builtin.
10369
10370 2018-06-04 Jim Wilson <jimw@sifive.com>
10371
10372 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10373 to int.
10374 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10375 and maybe_eh_return. Change regno to unsigned int. Use new args to
10376 handle EH_RETURN_DATA_REGNO registers properly.
10377 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10378 (riscv_expand_epilogue): Update comment. Change argument name and
10379 type. Update code to use new name and type. Pass new args to
10380 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
10381 EXCEPTION_RETURN.
10382 * config/riscv/riscv.md (NORMAL_RETURN): New.
10383 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10384 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10385 (eh_return): Call gen_eh_return_internal and emit barrier.
10386 (eh_return_internal): Call riscv_expand_epilogue.
10387
10388 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
10389
10390 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10391 bit_insertion field and declare can_be_merged_into method.
10392 (merged_store_group::can_be_merged_into): New method.
10393 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10394 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
10395 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10396
10397 2018-06-04 Richard Biener <rguenther@suse.de>
10398
10399 PR tree-optimization/85955
10400 * builtins.c (fold_builtin_sincos): Convert pointers to
10401 destination to appropriate type before dereferencing.
10402
10403 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
10404
10405 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10406
10407 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
10408
10409 * expr.c (expand_expr_real_1): Force the operand into memory if
10410 its TYPE_MODE is BLKmode and if there is no integer mode for
10411 the number of bits being extracted.
10412
10413 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10414
10415 PR target/85832
10416 PR target/86036
10417 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10418 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10419
10420 2018-06-04 Richard Biener <rguenther@suse.de>
10421
10422 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10423 (cleanup_tree_cfg_noloop): ... single caller. Do
10424 start_recording_case_labels later.
10425
10426 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
10427
10428 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10429 to _IMMINTRIN_H_INCLUDED.
10430 * config/i386/pconfigintrin.h: Ditto.
10431 * config/i386/waitpkgintrin.h: Ditto.
10432 * config/i386/immintrin.h: Add includes for sgxintrin.h,
10433 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10434 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10435 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10436 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10437 waitpkgintrin.h and cldemoteintrin.h.
10438
10439 2018-06-04 Richard Biener <rguenther@suse.de>
10440
10441 PR tree-optimization/86038
10442 * tracer.c (find_best_successor): Check probability for
10443 being initialized, bail out if not.
10444
10445 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
10446
10447 PR target/86003
10448 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10449 of bits to ignore when comparing architectures.
10450
10451 2018-06-04 Jakub Jelinek <jakub@redhat.com>
10452
10453 PR tree-optimization/69615
10454 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10455 maximum or minimum of the type, try to merge it also as if
10456 range1 is + [-, x - 1] or + [x + 1, -].
10457
10458 PR c++/86025
10459 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10460
10461 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
10462
10463 PR tree-optimization/86034
10464 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10465 the unsigned bitfield type in a bit insertion sequence if it does not
10466 have a larger precision than the bitfield size.
10467 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10468
10469 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
10470
10471 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10472
10473 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10474
10475 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10476 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10477 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10478 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10479
10480 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
10481
10482 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10483 Disable -fdelete-null-pointer-checks for ELF toolchain.
10484
10485 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10486 Kito Cheng <kito.cheng@gmail.com>
10487
10488 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10489 (nds32le-*-*, nds32be-*-*): Integrate checking process.
10490 (nds32*-*-*): Add glibc and uclibc conditions.
10491 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10492 (TARGET_EXCEPT_UNWIND_INFO): Define.
10493 * config/nds32/elf.h: New file.
10494 * config/nds32/linux.h: New file.
10495 * config/nds32/nds32-elf.opt: New file.
10496 * config/nds32/nds32-linux.opt: New file.
10497 * config/nds32/nds32-fp-as-gp.c
10498 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10499 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10500 TARGET_LINUX_ABI.
10501 (nds32_asm_file_end): Ditto.
10502 (nds32_print_operand): Ditto.
10503 (nds32_insert_attributes): Ditto.
10504 (nds32_init_libfuncs): New function.
10505 (TARGET_HAVE_TLS): Define.
10506 (TARGET_INIT_LIBFUNCS): Define.
10507 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10508 spec content.
10509 (TARGET_ELF): Apply different mcmodel setting.
10510 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10511 been migrated into elf.h and linux.h files.
10512 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10513 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10514 (mcmodel): The content has been migrated into nds32-elf.opt and
10515 nds32-linux.opt files.
10516 * config/nds32/t-elf: New file.
10517 * config/nds32/t-linux: New file.
10518
10519 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
10520 Shiva Chen <shiva0217@gmail.com>
10521
10522 * config/nds32/constants.md (unspec_volatile_element): Add
10523 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10524 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10525 optimization.
10526 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10527 (make_pass_nds32_fp_as_gp): Declare.
10528 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10529 optmization pass.
10530 (nds32_asm_function_end_prologue): Remove unused asm output.
10531 (nds32_asm_function_begin_epilogue): Remove unused asm output.
10532 (nds32_asm_file_start): Output necessary fp_as_gp information.
10533 (nds32_option_override): Adjust register usage.
10534 (nds32_expand_prologue): Consider fp_as_gp situation.
10535 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10536 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10537 (epilogue): Ditto.
10538 (return): Ditto.
10539 (simple_return): Ditto.
10540 (omit_fp_begin): Output special directive for fp_as_gp.
10541 (omit_fp_end): Output special directive for fp_as_gp.
10542 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10543 mforbid-fp-as-gp): New options.
10544
10545 2018-06-01 Mark Wielaard <mark@klomp.org>
10546
10547 * dwarf2out.c (dwarf2out_finish): Remove generation of
10548 DW_AT_loclists_base.
10549
10550 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
10551
10552 * gimple-ssa-store-merging.c: Include gimple-fold.h.
10553 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10554 (struct merged_store_group): Add bit_insertion field.
10555 (dump_char_array): Use standard hexadecimal format.
10556 (merged_store_group::merged_store_group): Set bit_insertion to false.
10557 (merged_store_group::apply_stores): Use optimal buffer size. Deal
10558 with BIT_INSERT_EXPR stores. Move up code updating the mask and
10559 also print the mask in the dump file.
10560 (pass_store_merging::gate): Minor tweak.
10561 (imm_store_chain_info::coalesce_immediate): Fix wrong association
10562 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
10563 stores with INTEGER_CST stores.
10564 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10565 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10566 and use it throughout. Generate bit insertion sequences if need be.
10567 (pass_store_merging::process_store): Remove redundant condition.
10568 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10569
10570 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
10571
10572 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10573 the 128-bit floating point types. Fix function comment.
10574
10575 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10576
10577 * config/aarch64/aarch64-simd.md
10578 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10579 mnemonics.
10580 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10581 mnemonics.
10582
10583 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10584
10585 PR tree-optimization/85989
10586 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10587 variable.
10588 (backprop::intersect_uses): Check it when deciding whether this
10589 is a backedge reference.
10590 (backprop::process_block): Add each phi to m_visited_phis
10591 after visiting it, then clear it at the end.
10592
10593 2018-06-01 Richard Biener <rguenther@suse.de>
10594
10595 * tree-vectorizer.h (vect_dr_stmt): New function.
10596 (vect_get_load_cost): Adjust.
10597 (vect_get_store_cost): Likewise.
10598 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10599 Use vect_dr_stmt instead of DR_SMTT.
10600 (vect_record_base_alignments): Likewise.
10601 (vect_calculate_target_alignment): Likewise.
10602 (vect_compute_data_ref_alignment): Likewise and make static.
10603 (vect_update_misalignment_for_peel): Likewise.
10604 (vect_verify_datarefs_alignment): Likewise.
10605 (vector_alignment_reachable_p): Likewise.
10606 (vect_get_data_access_cost): Likewise. Pass down
10607 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10608 (vect_get_peeling_costs_all_drs): Likewise.
10609 (vect_peeling_hash_get_lowest_cost): Likewise.
10610 (vect_enhance_data_refs_alignment): Likewise.
10611 (vect_find_same_alignment_drs): Likewise.
10612 (vect_analyze_data_refs_alignment): Likewise.
10613 (vect_analyze_group_access_1): Likewise.
10614 (vect_analyze_group_access): Likewise.
10615 (vect_analyze_data_ref_access): Likewise.
10616 (vect_analyze_data_ref_accesses): Likewise.
10617 (vect_vfa_segment_size): Likewise.
10618 (vect_small_gap_p): Likewise.
10619 (vectorizable_with_step_bound_p): Likewise.
10620 (vect_prune_runtime_alias_test_list): Likewise.
10621 (vect_analyze_data_refs): Likewise.
10622 (vect_supportable_dr_alignment): Likewise.
10623 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10624 (vect_gen_prolog_loop_niters): Likewise.
10625 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10626 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10627 modify DR_STMT.
10628 (vect_recog_mask_conversion_pattern): Likewise.
10629 (vect_try_gather_scatter_pattern): Likewise.
10630 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10631 to vect_get_store_cost.
10632 (vect_get_store_cost): Get stmt_info instead of DR.
10633 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10634 (vect_get_load_cost): Get stmt_info instead of DR.
10635
10636 2018-06-01 Richard Biener <rguenther@suse.de>
10637
10638 PR middle-end/86017
10639 * gimple-fold.c (var_decl_component_p): Also allow offsetted
10640 vars wrapped in MEM_REFs.
10641
10642 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
10643
10644 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10645 Fix subreg tests so that we only return a choice between
10646 GENERAL_REGS and FP_REGS if the original classes included both.
10647
10648 2018-06-01 Richard Biener <rguenther@suse.de>
10649
10650 PR ipa/85960
10651 * tree-ssa-structalias.c (get_function_part_constraint):
10652 Handle NULL fi->decl.
10653 (find_func_aliases_for_call): Properly handle indirect
10654 fi from direct call.
10655 (find_func_clobbers): Likewise.
10656 (ipa_pta_execute): Likewise.
10657 (create_variable_info_for): For functions that are ifunc_resolver
10658 resolve to a varinfo that contains the result of the resolver call.
10659 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10660 aliases.
10661
10662 2018-05-31 Michael Collison <michael.collison@arm.com>
10663
10664 * config/aarch64/aarch64.md:
10665 (*fix_to_zero_extenddfdi2): New pattern.
10666 * gcc.target/aarch64/fix_extend1.c: New testcase.
10667
10668 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
10669
10670 PR middle-end/78809
10671 PR middle-end/83026
10672 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10673 and BUILT_IN_STRNCMP_EQ.
10674 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10675 BUILT_IN_STRNCMP_EQ.
10676 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10677 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10678 (gimple_fold_builtin): Likewise.
10679 * tree-ssa-strlen.c (compute_string_length): New function.
10680 (determine_min_obsize): New function.
10681 (handle_builtin_string_cmp): New function to handle calls to
10682 string compare functions.
10683 (strlen_optimize_stmt): Add handling to builtin string compare
10684 calls.
10685 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10686 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10687 * tree.c (build_common_builtin_nodes): Add new defines of
10688 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10689
10690 2018-05-31 Jakub Jelinek <jakub@redhat.com>
10691
10692 PR target/85984
10693 * bb-reorder.c (pass_partition_blocks::gate): Return false for
10694 functions with naked attribute.
10695
10696 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
10697
10698 * config/i386/sse.md (avx_vec_concat<mode>):
10699 Substitute concat_tg_mode mode attribute with xtg_mode.
10700 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10701 (concat_tg_mode): Remove mode attribute.
10702
10703 2018-05-31 Martin Sebor <msebor@redhat.com>
10704
10705 PR c/82063
10706 * calls.c (alloc_max_size): Correct a logic error/typo.
10707 Treat excessive arguments as infinite. Warn for invalid arguments.
10708 * doc/invoke.texi (-Walloc-size-larger-than): Update.
10709
10710 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
10711
10712 PR target/85829
10713 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10714 and movx for Haswell.
10715
10716 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
10717 Cesar Philippidis <cesar@codesourcery.com>
10718
10719 PR middle-end/85879
10720 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10721 when emitting error on private/firstprivate reductions.
10722 * omp-low.c (lower_omp_target): Avoid reference-type processing
10723 on pointers for firstprivate clause.
10724
10725 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10726
10727 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10728 (st1x2): Likewise.
10729 (st1x3): Likewise.
10730 * config/aarch64/aarch64-simd.md
10731 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10732 (aarch64_ld1_x3_<mode>): Likewise
10733 (aarch64_st1x2<VALLDIF:mode>): Likewise
10734 (aarch64_st1_x2_<mode>): Likewise
10735 (aarch64_st1x3<VALLDIF:mode>): Likewise
10736 (aarch64_st1_x3_<mode>): Likewise
10737 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10738 (vld1_s8_x3): Likewise.
10739 (vld1_u16_x3): Likewise.
10740 (vld1_s16_x3): Likewise.
10741 (vld1_u32_x3): Likewise.
10742 (vld1_s32_x3): Likewise.
10743 (vld1_u64_x3): Likewise.
10744 (vld1_s64_x3): Likewise.
10745 (vld1_f16_x3): Likewise.
10746 (vld1_f32_x3): Likewise.
10747 (vld1_f64_x3): Likewise.
10748 (vld1_p8_x3): Likewise.
10749 (vld1_p16_x3): Likewise.
10750 (vld1_p64_x3): Likewise.
10751 (vld1q_u8_x3): Likewise.
10752 (vld1q_s8_x3): Likewise.
10753 (vld1q_u16_x3): Likewise.
10754 (vld1q_s16_x3): Likewise.
10755 (vld1q_u32_x3): Likewise.
10756 (vld1q_s32_x3): Likewise.
10757 (vld1q_u64_x3): Likewise.
10758 (vld1q_s64_x3): Likewise.
10759 (vld1q_f16_x3): Likewise.
10760 (vld1q_f32_x3): Likewise.
10761 (vld1q_f64_x3): Likewise.
10762 (vld1q_p8_x3): Likewise.
10763 (vld1q_p16_x3): Likewise.
10764 (vld1q_p64_x3): Likewise.
10765 (vst1_s64_x2): Likewise.
10766 (vst1_u64_x2): Likewise.
10767 (vst1_f64_x2): Likewise.
10768 (vst1_s8_x2): Likewise.
10769 (vst1_p8_x2): Likewise.
10770 (vst1_s16_x2): Likewise.
10771 (vst1_p16_x2): Likewise.
10772 (vst1_s32_x2): Likewise.
10773 (vst1_u8_x2): Likewise.
10774 (vst1_u16_x2): Likewise.
10775 (vst1_u32_x2): Likewise.
10776 (vst1_f16_x2): Likewise.
10777 (vst1_f32_x2): Likewise.
10778 (vst1_p64_x2): Likewise.
10779 (vst1q_s8_x2): Likewise.
10780 (vst1q_p8_x2): Likewise.
10781 (vst1q_s16_x2): Likewise.
10782 (vst1q_p16_x2): Likewise.
10783 (vst1q_s32_x2): Likewise.
10784 (vst1q_s64_x2): Likewise.
10785 (vst1q_u8_x2): Likewise.
10786 (vst1q_u16_x2): Likewise.
10787 (vst1q_u32_x2): Likewise.
10788 (vst1q_u64_x2): Likewise.
10789 (vst1q_f16_x2): Likewise.
10790 (vst1q_f32_x2): Likewise.
10791 (vst1q_f64_x2): Likewise.
10792 (vst1q_p64_x2): Likewise.
10793 (vst1_s64_x3): Likewise.
10794 (vst1_u64_x3): Likewise.
10795 (vst1_f64_x3): Likewise.
10796 (vst1_s8_x3): Likewise.
10797 (vst1_p8_x3): Likewise.
10798 (vst1_s16_x3): Likewise.
10799 (vst1_p16_x3): Likewise.
10800 (vst1_s32_x3): Likewise.
10801 (vst1_u8_x3): Likewise.
10802 (vst1_u16_x3): Likewise.
10803 (vst1_u32_x3): Likewise.
10804 (vst1_f16_x3): Likewise.
10805 (vst1_f32_x3): Likewise.
10806 (vst1_p64_x3): Likewise.
10807 (vst1q_s8_x3): Likewise.
10808 (vst1q_p8_x3): Likewise.
10809 (vst1q_s16_x3): Likewise.
10810 (vst1q_p16_x3): Likewise.
10811 (vst1q_s32_x3): Likewise.
10812 (vst1q_s64_x3): Likewise.
10813 (vst1q_u8_x3): Likewise.
10814 (vst1q_u16_x3): Likewise.
10815 (vst1q_u32_x3): Likewise.
10816 (vst1q_u64_x3): Likewise.
10817 (vst1q_f16_x3): Likewise.
10818 (vst1q_f32_x3): Likewise.
10819 (vst1q_f64_x3): Likewise.
10820 (vst1q_p64_x3): Likewise.
10821
10822 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10823
10824 * config/msp430/msp430.c (msp430_output_labelref): Prepend
10825 user_label_prefix to name.
10826
10827 * tree-core.h: Update comment about the format of NAME string
10828 passed to handler in attribute_spec.
10829
10830 * config/msp430/msp430.md: Remove erroneous subreg expression from
10831 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10832 zero_extend{q,h}isi2.
10833
10834 2018-05-30 Borislav Petkov <bp@suse.de>
10835
10836 * doc/extend.texi: Document some architecture specific
10837 constraints and sort entries.
10838
10839 2018-05-30 Martin Sebor <msebor@redhat.com>
10840
10841 PR middle-end/85369
10842 * builtins.c (expand_builtin_stpcpy_1): New function.
10843 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10844 only if the former succeeds.
10845
10846 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
10847
10848 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10849 in saphira.
10850
10851 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10852
10853 * doc/invoke.texi (-flinker-output): Document
10854
10855 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10856
10857 * passes.c (ipa_write_summaries): Only modify statements if body
10858 is in memory.
10859 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10860 incrementally linking.
10861 (ipa_passes): Likewise.
10862 * lto-cgraph.c (lto_output_node): When incrementally linking do not
10863 pass down resolution info.
10864 * common.opt (flag_incremental_link): Update info.
10865 * gcc.c (plugin specs): Turn flinker-output=* to
10866 -plugin-opt=-linker-output-known
10867 * toplev.c (compile_file): Also cut compilation when doing incremental
10868 link.
10869 * flag-types. (enum lto_partition_model): Add
10870 LTO_LINKER_OUTPUT_NOLTOREL.
10871 (invoke.texi): Add -flinker-output docs.
10872 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10873 link same way as WPA; do not stream in dead initializers.
10874
10875 * dwarf2out.c (dwarf2out_die_ref_for_decl,
10876 darf2out_register_external_decl): Support incremental link.
10877
10878 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10879
10880 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10881
10882 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
10883
10884 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10885 it down to simple_object_copy_lto_debug_sections.
10886 (run_gcc): Determine incremental LTO link time and configure
10887 lto1 into non-wpa mode, disable renaming of debug sections.
10888
10889 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
10890
10891 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10892 descriptions of various incorrectly documented functions.
10893
10894 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
10895
10896 Revert:
10897 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10898 address check not strict.
10899
10900 2018-05-30 Richard Biener <rguenther@suse.de>
10901
10902 PR tree-optimization/85964
10903 * tracer.c (better_p): Drop initialized count check, we only
10904 call the function with initialized counts now.
10905 (find_best_successor): Do find a best edge if one
10906 has uninitialized count.
10907 (find_best_predecessor): Likewise. Do BB frequency check only
10908 if count is initialized.
10909
10910 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
10911
10912 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10913 (aarch64_ldrstr_offset_compare): New.
10914 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10915 load/store orderings.
10916 (aarch64_gen_adjusted_ldpstp): Likewise.
10917
10918 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
10919
10920 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10921 Check for subset of GENERAL_REGS and FP_REGS.
10922 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10923 r=w alternative.
10924
10925 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
10926
10927 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10928 and wi::to_poly_offset. Add the current offset and then check
10929 whether the sum fits, rather than using an unchecked addition of
10930 a checked term. Check for a shwi rather than a uhwi.
10931 * expr.c (get_bit_range): Use tree_to_poly_uint64.
10932 (store_constructor): Use poly_int_tree_p.
10933 (expand_expr_real_1): Likewise.
10934 * function.c (assign_temp): Likewise.
10935 * fold-const.c (const_binop): Use poly_int_tree_p and
10936 wi::to_poly_offset.
10937 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
10938 division.
10939 * ipa-icf-gimple.c (func_checker::compare_operand): Use
10940 to_poly_offset for MEM offsets.
10941 * ipa-icf.c (sem_variable::equals): Likewise.
10942 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10943 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10944 wi::to_poly_offset for BIT_FIELD_REF offsets.
10945 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10946 wi::to_poly_offset.
10947 * var-tracking.c (emit_note_insn_var_location): Use
10948 tree_to_poly_uint64.
10949
10950 2018-05-29 Jim Wilson <jimw@sifive.com>
10951
10952 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10953
10954 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
10955
10956 PR target/85950
10957 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10958 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10959 sequence.
10960 (sse4_1_round<mode>2): Use nonimmediate_operand
10961 for operand 1 predicate.
10962
10963 2018-05-29 Martin Sebor <msebor@redhat.com>
10964 Richard Biener <rguenther@suse.de>
10965
10966 PR testsuite/85888
10967 * calls.c (get_size_range): Call determine_value_range instead
10968 of get_value_range..
10969 * tree-vrp.h (determine_value_range): Declared new function.
10970 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10971
10972 2018-05-29 Richard Biener <rguenther@suse.de>
10973
10974 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10975 sure to use non-pattern stmts for get_earlier_stmt arguments.
10976 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10977 called on pattern stmts.
10978 (get_later_stmt): Likewise.
10979
10980 2018-05-29 Martin Liska <mliska@suse.cz>
10981
10982 PR gcov-profile/85759
10983 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10984 env variables.
10985
10986 2018-05-29 Jakub Jelinek <jakub@redhat.com>
10987
10988 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10989 VEC_UNPACK_*_EXPR.
10990 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10991 VEC_PACK_*_EXPR.
10992
10993 PR target/85918
10994 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10995 VEC_PACK_FLOAT_EXPR): New tree codes.
10996 * tree-pretty-print.c (op_code_prio): Handle
10997 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10998 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10999 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11000 * tree-inline.c (estimate_operator_cost): Likewise.
11001 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
11002 * fold-const.c (const_binop): Likewise.
11003 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
11004 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
11005 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11006 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
11007 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
11008 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
11009 * expr.c (expand_expr_real_2): Likewise.
11010 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
11011 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
11012 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
11013 optabs.
11014 * optabs.c (expand_widen_pattern_expr): For
11015 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
11016 sign from result type rather than operand's type.
11017 (expand_binop_directly): For vec_packu_float_optab and
11018 vec_packs_float_optab allow result type to be different from operand's
11019 type.
11020 * optabs-tree.c (optab_for_tree_code): Handle
11021 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11022 VEC_PACK_FLOAT_EXPR. Formatting fixes.
11023 * tree-vect-generic.c (expand_vector_operations_1): Handle
11024 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
11025 VEC_PACK_FLOAT_EXPR.
11026 * tree-vect-stmts.c (supportable_widening_operation): Handle
11027 FIX_TRUNC_EXPR.
11028 (supportable_narrowing_operation): Handle FLOAT_EXPR.
11029 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
11030 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
11031 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
11032 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
11033 mode attributes.
11034 (vec_pack<floatprefix>_float_<mode>): New expander.
11035 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
11036 attributes.
11037 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
11038 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
11039 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
11040 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
11041 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
11042 Document.
11043 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
11044 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
11045 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11046 VEC_PACK_FLOAT_EXPR): Document.
11047
11048 2018-05-29 Richard Biener <rguenther@suse.de>
11049
11050 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
11051 member.
11052 (stmt_vec_info_vec): Make pointer.
11053 (init_stmt_vec_info_vec): Remove.
11054 (free_stmt_vec_info_vec): Likewise.
11055 (set_stmt_vec_info_vec): New function.
11056 (free_stmt_vec_infos): Likewise.
11057 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
11058 (set_vinfo_for_stmt): Likewise.
11059 (get_earlier_stmt): Likewise.
11060 (get_later_stmt): Likewise.
11061 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
11062 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
11063 (vec_info::~vec_info): Free stmt_vec_infos.
11064 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
11065 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
11066 (pass_slp_vectorize::execute): Likewise.
11067 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
11068 (free_stmt_vec_info_vec): Likewise.
11069 (set_stmt_vec_info_vec): New function.
11070 (free_stmt_vec_infos): Likewise.
11071 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
11072 the global stmt_vec_info_vec.
11073 * tree-parloops.c (gather_scalar_reductions): Use
11074 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
11075 vector.
11076
11077 2018-05-29 Richard Biener <rguenther@suse.de>
11078
11079 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
11080
11081 2018-05-29 Martin Liska <mliska@suse.cz>
11082 David Malcolm <dmalcolm@redhat.com>
11083
11084 * vec.c (test_reverse): New.
11085 (vec_c_tests): Add new test.
11086 * vec.h (vl_ptr>::reverse): New function.
11087
11088 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
11089
11090 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
11091
11092 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11093 and later.
11094
11095 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
11096
11097 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11098
11099 2018-05-28 Richard Biener <rguenther@suse.de>
11100
11101 PR tree-optimization/85933
11102 * tree-vect-data-refs.c (vect_record_base_alignments): Only
11103 look at stmts marked as vectorizable.
11104
11105 2018-05-28 Richard Biener <rguenther@suse.de>
11106
11107 PR tree-optimization/85934
11108 * tree-vect-generic.c (expand_vector_operations_1): Hoist
11109 vector boolean check before scalar optimization.
11110
11111 2018-05-28 Jakub Jelinek <jakub@redhat.com>
11112
11113 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11114 for armv5te.
11115
11116 2018-05-28 Mark Wielaard <mark@klomp.org>
11117
11118 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11119 if it is an expression containing a minus sign.
11120
11121 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
11122
11123 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11124
11125 2018-05-27 Paul Koning <ni1d@arrl.net>
11126
11127 * config/pdp11/pdp11.md (truncsihi2): Remove.
11128
11129 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
11130 Chung-Ju Wu <jasonwucj@gmail.com>
11131
11132 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11133 implementation.
11134 (unaligned_store_dw): Ditto.
11135 * config/nds32/nds32-memory-manipulation.c
11136 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11137 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11138 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11139 (emit_setmem_word_loop): Rename to ...
11140 (emit_setmem_doubleword_loop): ... this.
11141 (nds32_gen_dup_4_byte_to_word_value): New function.
11142 (nds32_gen_dup_8_byte_to_double_word_value): New function.
11143 (nds32_expand_setmem_loop): Refine implementation.
11144 (nds32_expand_setmem_loop_v3m): Ditto.
11145 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11146 pattern.
11147
11148 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11149
11150 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11151
11152 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
11153
11154 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11155 (nds32_init_machine_status): Initialize machine->attr_naked_p and
11156 machine->attr_no_prologue_p.
11157 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11158 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11159 (nds32_expand_epilogue): Consider attr_naked_p.
11160 (nds32_expand_epilogue_v3pop): Likewise.
11161 (nds32_can_use_return_insn): Likewise.
11162 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11163 attr_no_prologue_p fields.
11164 * config/nds32/nds32.opt (mret-in-naked-func): New option.
11165
11166 2018-05-27 Jakub Jelinek <jakub@redhat.com>
11167
11168 PR target/85918
11169 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11170 attributes.
11171 * config/i386/sse.md
11172 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11173 Rename to ...
11174 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11175 ... this.
11176 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11177 Rename to ...
11178 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11179 ... this.
11180 (*<floatsuffix>floatv2div2sf2): Rename to ...
11181 (*float<floatunssuffix>v2div2sf2): ... this.
11182 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11183 (float<floatunssuffix>v2div2sf2_mask): ... this.
11184 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11185 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11186 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11187 to ...
11188 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11189 ... this.
11190 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11191 Rename to ...
11192 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11193 ... this.
11194 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11195 Rename to ...
11196 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11197 ... this.
11198 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11199 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11200 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11201 gen_ufix_truncv8dfv8si2.
11202 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11203 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11204 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11205 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11206 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11207 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11208 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11209 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11210
11211 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11212
11213 PR target/85900
11214 PR target/85345
11215 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11216
11217 2018-05-25 Jim Wilson <jimw@sifive.com>
11218
11219 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11220 * config/riscv/riscv.c (struct machine_function): Add
11221 interrupt_handler_p and attribute_checked_p fields.
11222 (riscv_attribute_table): Add interrupt.
11223 (riscv_interrupt_type_p): New.
11224 (riscv_save_reg_p): Save extra regs for interrupt handler.
11225 (riscv_use_save_libcall): Return false for interrupt handler.
11226 (riscv_first_stack_step): Add forward declaration.
11227 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
11228 for interrupt handler with large frame. Use it for saved reg list.
11229 (riscv_expand_prologue): Move flag_stack_usage_info support to
11230 eliminate duplication.
11231 (riscv_expand_epilogue): Generate mret for interrupt handler.
11232 (riscv_epilogue_uses): New.
11233 (riscv_can_use_return_insn): Return false for interrupt handler.
11234 (riscv_function_ok_for_sibcall): Likewise.
11235 (riscv_set_current_function): Add interrupt handler support.
11236 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11237 * config/riscv/riscv.md (UNSPECV_MRET): New.
11238 (GP_REGNUM): New.
11239 (riscv_frflags, riscv_fsflags): Use tab after opcode.
11240 (riscv_mret): New.
11241 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11242
11243 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
11244
11245 PR tree-optimization/85712
11246 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11247 this candidate has already been replaced in-situ by a copy.
11248
11249 2018-05-25 Jason Merrill <jason@redhat.com>
11250
11251 PR c++/80485 - inline function non-zero address.
11252 * symtab.c (nonzero_address): Check DECL_COMDAT.
11253
11254 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
11255
11256 PR target/83628
11257 * config/alpha/alpha.md (ashlsi3): New insn pattern.
11258 (*ashlsi_se): Rename from *ashldi_se. Define as sign
11259 extension of SImode operation. Use const123_operand predicate.
11260 (*saddsi_1): Remove.
11261 (*saddl_se_1): Ditto.
11262 (*ssubsi_1): Ditto.
11263 (*ssubl_se_1): Ditto.
11264 * config/alpha/predicates.md (const123_operand): New predicate.
11265 * config/alpha/constraints.md (P): Use IN_RANGE.
11266
11267 2018-05-25 Richard Biener <rguenther@suse.de>
11268
11269 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11270 defaulted to true.
11271 (ref_maybe_used_by_stmt_p): Likewise.
11272 (stmt_may_clobber_ref_p): Likewise.
11273 (stmt_may_clobber_ref_p_1): Likewise.
11274 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11275 and pass it along.
11276 (ref_maybe_used_by_stmt_p): Likewise.
11277 (stmt_may_clobber_ref_p): Likewise.
11278 (stmt_may_clobber_ref_p_1): Likewise.
11279 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11280 the alias oracle to disambiguate DRs with stmts DR analysis
11281 couldn't handle.
11282 (vect_analyze_data_refs): Do not give up on not analyzable
11283 DRs for BB vectorization. Remove code truncating the dataref
11284 vector.
11285
11286 2018-05-25 Jakub Jelinek <jakub@redhat.com>
11287
11288 PR target/85832
11289 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11290 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
11291 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11292
11293 2018-05-25 Richard Biener <rguenther@suse.de>
11294
11295 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11296 function, combining stmt data ref gathering and fatal analysis
11297 parts.
11298 (vect_analyze_data_refs): Remove now redudnant code and simplify.
11299 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11300 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11301 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11302 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11303
11304 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11305
11306 PR tree-optimization/85720
11307 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11308 SCC if all partitions are builtins.
11309 (version_loop_by_alias_check): New parameter. Generate cancelable
11310 runtime alias check if all partitions are builtins.
11311 (distribute_loop): Update call to above function.
11312
11313 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11314
11315 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11316 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11317 (parm_default_def_partition_arg): Ditto.
11318 (set_parm_default_def_partition): Ditto.
11319 (get_parm_default_def_partitions): Ditto and make it static.
11320 (get_undefined_value_partitions): Ditto and make it static.
11321 (remove_ssa_form): Refactor call to init_var_map here.
11322 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11323 computation for loop region.
11324 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11325 (register_default_def): Delete.
11326 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11327 (parm_default_def_partition_arg): Ditto.
11328 (set_parm_default_def_partition): Ditto.
11329 (get_parm_default_def_partitions): Ditto and make it static.
11330 (get_undefined_value_partitions): Ditto and make it static.
11331 (coalesce_with_default, coalesce_with_default): Update comment.
11332 (create_coalesce_list_for_region): New func factored out from
11333 create_outofssa_var_map.
11334 (populate_coalesce_list_for_outofssa): New func factored out from
11335 create_outofssa_var_map and coalesce_ssa_name.
11336 (create_outofssa_var_map): Delete.
11337 (coalesce_ssa_name): Refactor to support live range computation.
11338 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11339 (get_parm_default_def_partitions): Delete.
11340 (get_undefined_value_partitions): Ditto.
11341 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11342 computation for loop region.
11343 (new_tree_live_info, loe_visit_block): Ditto.
11344 (live_worklist, set_var_live_on_entry): Ditto.
11345 (calculate_live_on_exit, verify_live_on_entry): Ditto.
11346 * tree-ssa-live.h (struct _var_map): New fields.
11347 (init_var_map): Change decl.
11348 (region_contains_p): New.
11349
11350 2018-05-25 Bin Cheng <bin.cheng@arm.com>
11351
11352 * tree-ssa-live.h (live_merge_and_clear): Delete.
11353
11354 2018-05-25 Richard Biener <rguenther@suse.de>
11355
11356 PR c++/85912
11357 * tree-dump.c (dequeue_and_dump): Remove access to removed
11358 operand 2 of a SWITCH_EXPR.
11359
11360 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11361
11362 * doc/sourcebuild.texi (vect_double_cond_arith): Include
11363 multiplication and division.
11364 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11365 (cond_udiv@var{m}, cond_umod@var{m}): Document.
11366 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11367 (cond_udiv_optab, cond_umod_optab): New optabs.
11368 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11369 (IFN_COND_RDIV): New internal functions.
11370 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11371 TRUNC_MOD_EXPR and RDIV_EXPR.
11372 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11373 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11374 New unspecs.
11375 (SVE_INT_BINARY): Include mult.
11376 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11377 (optab, sve_int_op): Handle mult.
11378 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11379 UNSPEC_COND_DIV.
11380 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11381 for SVE_INT_BINARY_SD.
11382
11383 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11384
11385 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11386 (optab, sve_int_op): Handle div and udiv.
11387 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11388 for SVE_INT_BINARY_SD.
11389 (*<optab><mode>3): New insn for the same.
11390
11391 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11392
11393 * tree-vect-patterns.c: Include predict.h.
11394 (vect_recog_divmod_pattern): Restrict check for division support
11395 to when optimizing for size.
11396
11397 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11398
11399 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11400 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11401 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11402 (gimple_match_op::set_op): Likewise.
11403 (gimple_resimplify4): Declare.
11404 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11405 (expr::gen_transform): Likewise.
11406 (decision_tree::gen): Generate a simplification routine for 4 operands.
11407 * gimple-match-head.c (gimple_simplify): Add an overload for
11408 4 operands. In the top-level function, handle up to 4 call
11409 arguments and call gimple_resimplify4.
11410 (gimple_resimplify4): New function.
11411 (build_call_internal): Pass a fourth operand.
11412 (maybe_push_to_seq): Likewise.
11413 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11414 Fold VEC_COND_EXPRs of an operation and a default value into
11415 an IFN_COND_* function if possible.
11416 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11417 New unspecs.
11418 (SVE_COND_FP_BINARY): Include them.
11419 (optab, sve_fp_op): Handle them.
11420 (SVE_INT_BINARY_REV): New code iterator.
11421 (SVE_COND_FP_BINARY_REV): New int iterator.
11422 (commutative): New int attribute.
11423 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11424 Declare.
11425 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11426 function.
11427 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11428 (*cond_<optab><mode>): New patterns for reversed operands.
11429
11430 2018-05-25 Richard Biener <rguenther@suse.de>
11431
11432 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11433 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11434 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11435 (STMT_VINFO_GROUPED_ACCESS): Adjust.
11436 * tree-vect-data-refs.c (everywhere): Adjust users.
11437 * tree-vect-loop.c (everywhere): Likewise.
11438 * tree-vect-slp.c (everywhere): Likewise.
11439 * tree-vect-stmts.c (everywhere): Likewise.
11440 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11441
11442 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11443
11444 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11445 Rename to...
11446 (gcc_cv_as_section_exclude): ... this.
11447 Try Solaris as #exclude syntax.
11448 * configure: Regenerate.
11449 * config.in: Regenerate.
11450 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11451 SECTION_EXCLUDE.
11452 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11453 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11454
11455 * varasm.c (default_elf_asm_named_section): Don't check if
11456 HAVE_GAS_SECTION_EXCLUDE is defined.
11457
11458 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11459
11460 * doc/md.texi: Update the documentation of the cond_* optabs
11461 to mention the new final operand. Fix GET_MODE_NUNITS call.
11462 Describe the scalar case too.
11463 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11464 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11465 instead of 2.
11466 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11467 (get_conditional_internal_fn): Update comment.
11468 * tree-vect-loop.c (vectorizable_reduction): Pass the original
11469 accumulator value as a final argument to conditional functions.
11470 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11471 a define_expand and add an "else" operand. Assert for now that
11472 the else operand is equal to operand 2. Use SVE_INT_BINARY and
11473 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11474 (*cond_<optab><mode>): New patterns.
11475 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11476 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11477 (UNSPEC_COND_EOR): Delete.
11478 (optab): Remove associated mappings.
11479 (SVE_INT_BINARY): New code iterator.
11480 (sve_int_op): Remove int attribute and add "minus" to the code
11481 attribute.
11482 (SVE_COND_INT_OP): Delete.
11483 (SVE_COND_FP_OP): Rename to...
11484 (SVE_COND_FP_BINARY): ...this.
11485
11486 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
11487
11488 * optabs.c (can_reuse_operands_p): New function.
11489 (maybe_legitimize_operands): Try to reuse the results for
11490 earlier operands.
11491
11492 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11493
11494 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11495 Add {q} suffix to insn mnemonic.
11496
11497 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11498
11499 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11500 (msp430_warn_func_return): New.
11501
11502 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
11503
11504 * fold-const.c (tree_nonzero_bits): New function.
11505 * fold-const.h (tree_nonzero_bits): Likewise.
11506 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11507 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11508
11509 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
11510
11511 PR target/85900
11512 PR target/85345
11513 * varasm.c (assemble_alias): Check ifunc_resolver only on
11514 FUNCTION_DECL.
11515
11516 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
11517
11518 PR target/85903
11519 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11520 when memory input operand is handled.
11521
11522 2018-05-24 Luis Machado <luis.machado@linaro.org>
11523
11524 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11525 global.
11526 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11527
11528 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11529
11530 * match.pd: Delay FMA folds until after vectorization.
11531
11532 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
11533
11534 PR target/83009
11535 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11536 address check not strict.
11537
11538 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
11539
11540 * gimple-match.h (gimple_match_op): New class.
11541 (mprts_hook): Replace parameters with a gimple_match_op *.
11542 (maybe_build_generic_op): Likewise.
11543 (gimple_simplified_result_is_gimple_val): Replace parameters with
11544 a const gimple_match_op *.
11545 (gimple_simplify): Replace code_helper * and tree * parameters with
11546 a gimple_match_op * parameter.
11547 (gimple_resimplify1): Replace code_helper *, tree and tree *
11548 parameters with a gimple_match_op * parameter.
11549 (gimple_resimplify2): Likewise.
11550 (gimple_resimplify3): Likewise.
11551 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11552 parameters with a gimple_match_op * parameter.
11553 * gimple-match-head.c (gimple_simplify): Change prototypes of
11554 auto-generated functions to take a gimple_match_op * instead of
11555 separate code_helper * and tree * parameters. Make the same
11556 change in the top-level overload and update calls to the
11557 gimple_resimplify routines. Update calls to the auto-generated
11558 functions and to maybe_push_res_to_seq in the publicly-facing
11559 operation-specific gimple_simplify overloads.
11560 (gimple_match_op::MAX_NUM_OPS): Define.
11561 (gimple_resimplify1): Replace rcode and ops with a single res_op
11562 parameter. Update call to gimple_simplify.
11563 (gimple_resimplify2): Likewise.
11564 (gimple_resimplify3): Likewise.
11565 (mprts_hook): Replace parameters with a gimple_match_op *.
11566 (maybe_build_generic_op): Likewise.
11567 (build_call_internal): Replace type, nargs and ops with
11568 a gimple_match_op *.
11569 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11570 with a single gimple_match_op *. Update calls to mprts_hook,
11571 build_call_internal and gimple_simplified_result_is_gimple_val.
11572 Factor out code that is common to the tree_code and combined_fn cases.
11573 * genmatch.c (expr::gen_transform): Replace tem_code and
11574 tem_ops with a gimple_match_op called tem_op. Update calls
11575 to the gimple_resimplify functions and maybe_push_res_to_seq.
11576 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11577 res_ops. Update call to the gimple_resimplify functions.
11578 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11579 (decision_tree::gen): Make the functions take a gimple_match_op *
11580 called res_op instead of separate res_code and res_ops parameters.
11581 Update call accordingly.
11582 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11583 and ops with a single res_op parameter. Update calls to
11584 maybe_build_generic_op and maybe_push_res_to_seq.
11585 (fold_stmt_1): Update calls to gimple_simplify and
11586 replace_stmt_with_simplification.
11587 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11588 and gimple_simplified_result_is_gimple_val.
11589 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11590 gimple_simplify.
11591 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11592 with a gimple_match_op *.
11593 (vn_nary_build_or_lookup): Likewise. Update call to
11594 vn_nary_build_or_lookup_1.
11595 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11596 gimple_match_op *. Update calls to the gimple_resimplify routines
11597 and to gimple_simplified_result_is_gimple_val.
11598 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11599 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11600 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11601 (visit_nary_op): Likewise.
11602 (visit_reference_op_load): Likewise.
11603
11604 2018-05-23 Luis Machado <luis.machado@linaro.org>
11605
11606 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11607 modifier for printing the step amount.
11608
11609 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
11610
11611 PR target/78849
11612 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11613 types.
11614
11615 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
11616
11617 * doc/sourcebuild.texi (Endianness): New subsubsection.
11618
11619 2018-05-23 Luis Machado <luis.machado@linaro.org>
11620
11621 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11622 <prefetch_dynamic_strides>: New const bool field.
11623 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11624 prefetch_dynamic_strides.
11625 (exynosm1_prefetch_tune): Likewise.
11626 (thunderxt88_prefetch_tune): Likewise.
11627 (thunderx_prefetch_tune): Likewise.
11628 (thunderx2t99_prefetch_tune): Likewise.
11629 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11630 false.
11631 (aarch64_override_options_internal): Update to set
11632 PARAM_PREFETCH_DYNAMIC_STRIDES.
11633 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11634 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11635 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11636 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11637 prefetch-dynamic-strides setting.
11638
11639 2018-05-23 Luis Machado <luis.machado@linaro.org>
11640
11641 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11642 <minimum_stride>: New const int field.
11643 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11644 minimum_stride field defaulting to -1.
11645 (exynosm1_prefetch_tune): Likewise.
11646 (thunderxt88_prefetch_tune): Likewise.
11647 (thunderx_prefetch_tune): Likewise.
11648 (thunderx2t99_prefetch_tune): Likewise.
11649 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11650 <default_opt_level>: Set to 3.
11651 (aarch64_override_options_internal): Update to set
11652 PARAM_PREFETCH_MINIMUM_STRIDE.
11653 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11654 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11655 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11656 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11657 stride is constant and is below the minimum stride threshold.
11658
11659 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11660
11661 * config/arm/arm-cpus.in (mode26): Delete.
11662 (armv4): Delete mode26 reference.
11663 * config/arm/arm.c (arm_configure_build_target): Delete use of
11664 isa_bit_mode26.
11665
11666 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11667
11668 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11669 New insn pattern.
11670 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11671 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
11672 for non-SSE modes.
11673 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
11674 (floatunsdidf2): Ditto.
11675
11676 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
11677
11678 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11679 (fixuns_trunc<mode>si2_avx512f): Ditto.
11680 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11681 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11682 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11683
11684 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11685
11686 PR rtl-optimization/79985
11687 * df-scan.c (df_insn_refs_collect): Remove special case for
11688 global registers and asm statements.
11689
11690 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
11691
11692 * extend.texi (Global Register Variables): Rewrite the bullet list.
11693 Note that the register is available for allocation. Note that access
11694 via inline asm must use constraints. Add note about async-signal
11695 handlers. Remove paragraph about automagic register selection.
11696
11697 2018-05-23 Richard Biener <rguenther@suse.de>
11698
11699 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11700 of fixed offset from memset VN.
11701
11702 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
11703
11704 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11705 first_interp field.
11706 (alloc_cand_and_find_basis): Initialize first_interp field.
11707 (slsr_process_mul): Modify first_interp field.
11708 (slsr_process_add): Likewise.
11709 (slsr_process_cast): Modify first_interp field for each new
11710 interpretation.
11711 (slsr_process_copy): Likewise.
11712 (dump_candidate): Dump first_interp field.
11713 (replace_mult_candidate): Process all interpretations, not just
11714 subsequent ones.
11715 (replace_rhs_if_not_dup): Likewise.
11716 (replace_one_candidate): Likewise.
11717
11718 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
11719
11720 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11721 Add new boolean.
11722 (aarch64_needs_frame_chain): New function.
11723 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11724
11725 2018-05-23 Sudakshina Das <sudi.das@arm.com>
11726
11727 PR target/84882
11728 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11729 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11730 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11731 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11732 as true for strict-align.
11733 (aarch64_can_inline_p): Perform checks even when callee has no
11734 attributes to check for strict alignment.
11735 * doc/extend.texi (AArch64 Function Attributes): Document
11736 no-strict-align.
11737 * doc/invoke.texi: (AArch64 Options): Likewise.
11738
11739 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
11740
11741 PR tree-optimization/85853
11742 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11743 the handling of the root of the node to...
11744 (vect_slp_analyze_node_operations_1): ...this new function,
11745 and run the whole thing with the child nodes' def types
11746 set according to their SLP node's def type.
11747
11748 2018-05-23 Richard Biener <rguenther@suse.de>
11749
11750 PR middle-end/85874
11751 * tree-data-ref.c (create_runtime_alias_checks): Defer
11752 and ignore overflow warnings.
11753
11754 2018-05-23 Yury Gribov <tetra2005@gmail.com>
11755
11756 PR tree-optimization/85822
11757 * tree-vrp.c (is_masked_range_test): Fix handling of negative
11758 constants.
11759
11760 2018-05-23 Richard Biener <rguenther@suse.de>
11761
11762 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11763 memset constants via native_interpret_expr.
11764
11765 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
11766
11767 PR target/85345
11768 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11769 attribute.
11770 (cgraph_node::create_alias): Likewise.
11771 (cgraph_node::get_availability): Check ifunc_resolver instead
11772 of looking up ifunc attribute.
11773 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11774 * varasm.c (do_assemble_alias): Likewise.
11775 (assemble_alias): Likewise.
11776 (default_binds_local_p_3): Likewise.
11777 * cgraph.h (cgraph_node): Add ifunc_resolver.
11778 (cgraph_node::only_called_directly_or_aliased_p): Return false
11779 for IFUNC resolver.
11780 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11781 attribute.
11782 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11783 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11784 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11785 instead of looking up ifunc attribute.
11786
11787 2018-05-22 Luis Machado <luis.machado@linaro.org>
11788
11789 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11790
11791 2018-05-22 Martin Sebor <msebor@redhat.com>
11792
11793 PR middle-end/85359
11794 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11795 only when expasion succeeds.
11796 (expand_builtin_strcmp): Same.
11797 (expand_builtin_strncmp): Same.
11798
11799 2018-05-22 Martin Sebor <msebor@redhat.com>
11800
11801 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11802
11803 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11804 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11805
11806 * config/aarch64/aarch64-ldpstp.md: Replace uses of
11807 aarch64_mem_pair_operand with memory_operand and delete operand swapping
11808 code.
11809 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11810 Add check for legitimate_address.
11811 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11812 (aarch64_swap_ldrstr_operands): New.
11813 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11814 Define prototype.
11815
11816 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
11817 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11818
11819 * config/aarch64/aarch64.md: New patterns to generate stp
11820 and ldp.
11821 (store_pair_sw, store_pair_dw): New patterns to generate stp for
11822 single words and double words.
11823 (load_pair_sw, load_pair_dw): Likewise.
11824 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11825 Delete.
11826 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11827 Delete.
11828 * config/aarch64/aarch64-ldpstp.md: Modify peephole
11829 for different mode ldpstp and add peephole for merged zero stores.
11830 Likewise for loads.
11831 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11832 Add size check.
11833 (aarch64_gen_store_pair): Rename calls to match new patterns.
11834 (aarch64_gen_load_pair): Rename calls to match new patterns.
11835 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11836 (load_pair<DREG:mode><DREG2:mode>): ... This.
11837 (store_pair<mode>): Rename to...
11838 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11839 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11840 New mode iterators.
11841 (V_INT_EQUIV): Handle SImode.
11842 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11843 New predicate.
11844
11845 2018-05-22 Martin Sebor <msebor@redhat.com>
11846
11847 PR c/85623
11848 * calls.c (maybe_warn_nonstring_arg): Use string length to set
11849 or ajust the presumed bound on an operation to avoid unnecessary
11850 warnings.
11851
11852 2018-05-22 Martin Sebor <msebor@redhat.com>
11853
11854 PR tree-optimization/85826
11855 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11856 assuming that a DECL necesarily has a constant size.
11857
11858 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
11859
11860 PR middle-end/85862
11861 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11862
11863 2018-05-22 Richard Biener <rguenther@suse.de>
11864
11865 PR tree-optimization/85834
11866 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11867 non-constant and non-zero memset arguments.
11868
11869 2018-05-22 Martin Liska <mliska@suse.cz>
11870
11871 PR ipa/85607
11872 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11873
11874 2018-05-22 Richard Biener <rguenther@suse.de>
11875
11876 PR tree-optimization/85863
11877 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11878 comparisons when vectype is specified.
11879 (vectorizable_condition): Do not specify vectype for
11880 vect_is_simple_cond when SLP vectorizing.
11881
11882 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
11883
11884 PR target/85657
11885 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11886 define __ibm128 as long double.
11887 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11888 as a distinct type when IEEE 128-bit support is enabled.
11889 (init_float128_ieee): Fix up conversions between IFmode and IEEE
11890 128-bit types to use the correct functions.
11891 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11892 convert between 128-bit floating point types that have different
11893 modes but the same representation, instead of using gen_lowpart to
11894 makean alias.
11895 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11896 KFmode.
11897 (IFKF_reg): New attributes to give the register constraints for
11898 IFmode and KFmode.
11899 (extend<mode>tf2_internal): New insns to mark an explicit
11900 conversion between 128-bit floating point types that have a
11901 different mode but share the same representation.
11902
11903 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
11904
11905 PR tree-optimization/85814
11906 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11907 a null return from get_strinfo when unsharing the next
11908 strinfo in the chain.
11909
11910 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11911
11912 PR gcc/84923
11913 * varasm.c (weak_finish): Clean up weak_decls.
11914
11915 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11916
11917 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11918 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11919 UNSPEC_UADALP values.
11920 * config/aarch64/iterators.md (ABAL): New int iterator.
11921 (ABDL2): Likewise.
11922 (ADALP): Likewise.
11923 (sur): Add mappings for the above.
11924 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11925 New define_insn.
11926 (aarch64_<sur>abal<mode>_4): Likewise.
11927 (aarch64_<sur>adalp<mode>_3): Likewise.
11928 (<sur>sadv16qi): New define_expand.
11929
11930 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
11931
11932 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11933 (*movdf_internal): Ditto.
11934 (*rcpsf2_sse): Ditto.
11935 (*rsqrtsf2_sse): Ditto.
11936 (*sqrt<mode>2_sse): Ditto.
11937
11938 2018-05-21 Tamar Christina <tamar.christina@arm.com>
11939
11940 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11941 eor3q<mode>4.
11942 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11943 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11944 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11945 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11946 vbcaxq_s64): New.
11947 * config/aarch64/arm_neon.h: Likewise.
11948 * config/aarch64/iterators.md (VQ_I): New.
11949
11950 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
11951
11952 * config.gcc: Add arc/t-multilib-linux to tmake_file for
11953 arc*-*-linux*.
11954 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11955 MULTILIB_DIRNAMES
11956
11957 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11958
11959 * config/nds32/constraints.md (S): New constraint.
11960 * config/nds32/nds32.md (call_internal): Use constraint S.
11961 (call_value_internal): Likewise.
11962 (sibcall_internal): Likewise.
11963 (sibcall_value_internal): Likewise.
11964
11965 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11966 Chung-Ju Wu <jasonwucj@gmail.com>
11967
11968 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11969 into consideration.
11970
11971 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
11972 Chung-Ju Wu <jasonwucj@gmail.com>
11973
11974 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11975 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11976 (nds32_rtx_costs_impl): Simplify.
11977 (nds32_address_cost_impl): Simplify.
11978 (nds32_init_rtx_costs): New function.
11979 (nds32_rtx_costs_speed_prefer): Likewise.
11980 (nds32_rtx_costs_size_prefer): Likewise.
11981 (nds32_address_cost_speed_prefer): Likewise.
11982 (nds32_address_cost_speed_fwprop): Likewise.
11983 (nds32_address_cost_size_prefer): Likewise.
11984 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11985 * config/nds32/nds32.c (nds32_option_override): Use
11986 nds32_init_rtx_costs function.
11987
11988 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
11989
11990 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11991 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11992 (TARGET_PIPELINE_N8): Likewise.
11993 (TARGET_PIPELINE_N10): Likewise.
11994 (TARGET_PIPELINE_N13): Likewise.
11995 (TARGET_PIPELINE_GRAYWOLF): Likewise.
11996
11997 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
11998
11999 * config/nds32/nds32-fpu.md: Update copyright year.
12000
12001 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12002
12003 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
12004
12005 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12006
12007 * config/nds32/nds32.c
12008 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
12009 * config/nds32/nds32.opt (minline-asm-r15): New option.
12010
12011 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12012
12013 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
12014 MASK_HW_ABS.
12015 * config/nds32/nds32.md (abssi2): New pattern.
12016
12017 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
12018
12019 * config/i386/i386.md (rex64namesuffix): New mode attribute.
12020 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
12021 Merge insn pattern from sse_cvtsi2ss<round_name> and
12022 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
12023 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
12024 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
12025 using SWI48 mode iterator.
12026 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
12027 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
12028 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
12029 pattern from sse_cvttss2si<round_saeonly_name>
12030 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
12031 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
12032 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
12033 using SWI48 mode iterator.
12034 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
12035 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
12036 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
12037 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
12038 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
12039 using SWI48 mode iterator.
12040 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
12041 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
12042 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
12043 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
12044 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
12045 SWI48 mode iterator.
12046 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
12047 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
12048 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
12049 pattern from sse_cvttsd2si<round_saeonly_name>
12050 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
12051
12052 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12053
12054 * config/nds32/nds32-md-auxiliary.c
12055 (nds32_valid_smw_lwm_base_p): Refine.
12056 (nds32_output_smw_single_word): Refine.
12057 (nds32_output_smw_double_word): New.
12058 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
12059
12060 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12061
12062 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
12063 (nds32_output_stack_pop): Refine.
12064 (nds32_expand_unaligned_load): Refine.
12065 (nds32_expand_unaligned_store): Refine.
12066
12067 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12068 Chung-Ju Wu <jasonwucj@gmail.com>
12069
12070 * config/nds32/constants.md: Add TP_REGNUM constant.
12071 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
12072 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
12073 UNSPEC_ADD32.
12074 * config/nds32/nds32-doubleword.md: Consider flag_pic.
12075 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
12076 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
12077 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
12078 and PIC code generation.
12079 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
12080 code generation.
12081 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
12082 optimization.
12083 * config/nds32/nds32.md: Support TLS and PIC.
12084 * config/nds32/nds32.c: Support TLS and PIC.
12085 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
12086 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
12087 predicate.
12088
12089 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
12090
12091 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12092 mode with E_ prefix.
12093
12094 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12095 Chung-Ju Wu <jasonwucj@gmail.com>
12096
12097 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12098 * config/nds32/nds32-md-auxiliary.c
12099 (symbolic_reference_mentioned_p): New.
12100 (nds32_legitimize_ict_address): New.
12101 (nds32_expand_ict_move): New.
12102 (nds32_indirect_call_referenced_p): New.
12103 (nds32_symbol_binds_local_p): Delete.
12104 (nds32_long_call_p): Modify.
12105 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12106 * config/nds32/nds32-protos.h
12107 (symbolic_reference_mentioned_p): Declare.
12108 (nds32_legitimize_ict_address): Declare.
12109 (nds32_expand_ict_move): Declare.
12110 (nds32_indirect_call_referenced_p): Declare.
12111 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12112 (nds32_relax_group): Use nds32_ict_const_p as condition.
12113 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12114 (nds32_asm_file_start): Output ict_model directive in asm code.
12115 (nds32_legitimate_address_p): Consider indirect call.
12116 (nds32_print_operand): Consider indirect call.
12117 (nds32_print_operand_address): Consider indirect call.
12118 (nds32_insert_attributes): Handle "indirect_call" attribute.
12119 (TARGET_LEGITIMATE_ADDRESS_P): Define.
12120 (TARGET_LEGITIMATE_CONSTANT_P): Define.
12121 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12122 (TARGET_DELEGITIMIZE_ADDRESS): Define.
12123 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12124 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12125 (TARGET_ICT_MODEL_SMALL): Define.
12126 (TARGET_ICT_MODEL_LARGE): Define.
12127 * config/nds32/nds32.md (movsi): Consider ict model.
12128 (call, call_value): Consider ict model.
12129 (sibcall, sibcall_value): Consider ict model.
12130 * config/nds32/nds32.opt (mict-model): New option.
12131 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12132 model.
12133
12134 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
12135 Monk Chiang <sh.chiang04@gmail.com>
12136 Jim Wilson <jimw@sifive.com>
12137
12138 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12139 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
12140 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12141 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12142 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
12143 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12144 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12145 compute save_libcall_adjustment properly.
12146 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12147 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12148 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12149 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12150 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12151 (ABI_SPEC): Handle mabi=ilp32e.
12152 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12153 (RVE): Add RVE mask.
12154 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12155 <-march>: Add rv32e as an example.
12156
12157 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
12158
12159 PR c++/82899
12160 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12161 (intra_create_variable_infos): Handle C++ constructors.
12162
12163 2018-05-18 Martin Liska <mliska@suse.cz>
12164
12165 * passes.def: Remove a redundant pass.
12166
12167 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
12168
12169 PR bootstrap/85838
12170 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12171
12172 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12173
12174 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12175 (ARMv4): Update.
12176 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12177 (ARMv6m): Update.
12178 (armv2, armv2a, armv3, armv3m): Delete architectures.
12179 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12180 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12181 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12182 Delete cpus.
12183 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12184 (*mulsidi3adddi): Likewise.
12185 (mulsidi3): Likewise.
12186 (*mulsidi3_nov6): Likewise.
12187 (umulsidi3): Likewise.
12188 (umulsidi3_nov6): Likewise.
12189 (umaddsidi4): Likewise.
12190 (*umulsidi3adddi): Likewise.
12191 (smulsi3_highpart): Likewise.
12192 (*smulsi3_highpart_nov6): Likewise.
12193 (umulsi3_highpart): Likewise.
12194 (*umulsi3_highpart_nov6): Likewise.
12195 * config/arm/arm.h (arm_arch3m): Delete.
12196 * config/arm/arm.c (arm_arch3m): Delete.
12197 (arm_option_override_internal): Update armv3-related comment.
12198 (arm_configure_build_target): Delete use of isa_bit_mode32.
12199 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12200 (arm_rtx_costs_internal): Delete check of arm_arch3m.
12201 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12202 (mulsa3): Likewise.
12203 (mulusa3): Likewise.
12204 * config/arm/arm-protos.h (arm_arch3m): Delete.
12205 * config/arm/arm-tables.opt: Regenerate.
12206 * config/arm/arm-tune.md: Likewise.
12207 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12208 deleted architectures.
12209
12210 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12211
12212 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12213 (armv5t, armv5te): New features.
12214 (ARMv5, ARMv5e): Delete fgroups.
12215 (ARMv5t, ARMv5te): Adjust for above changes.
12216 (ARMv6m): Likewise.
12217 (armv5, armv5e): Delete arches.
12218 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12219 arm_arch5.
12220 (*call_reg_arm): Likewise.
12221 (*call_value_reg_armv5): Likewise.
12222 (*call_value_reg_arm): Likewise.
12223 (*call_symbol): Likewise.
12224 (*call_value_symbol): Likewise.
12225 (*sibcall_insn): Likewise.
12226 (*sibcall_value_insn): Likewise.
12227 (clzsi2): Likewise.
12228 (prefetch): Likewise.
12229 (define_split and define_peephole2 dependent on arm_arch5):
12230 Likewise.
12231 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12232 arm_arch5e.
12233 (TARGET_ARM_QBIT): Likewise.
12234 (TARGET_DSP_MULTIPLY): Likewise.
12235 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12236 (arm_arch5, arm_arch5e): Delete.
12237 (arm_arch5t, arm_arch5te): Declare.
12238 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12239 (arm_arch5t): Declare.
12240 (arm_option_reconfigure_globals): Update for the above.
12241 (arm_options_perform_arch_sanity_checks): Update comment, replace
12242 use of arm_arch5 with arm_arch5t.
12243 (use_return_insn): Likewise.
12244 (arm_emit_call_insn): Likewise.
12245 (output_return_instruction): Likewise.
12246 (arm_final_prescan_insn): Likewise.
12247 (arm_coproc_builtin_available): Likewise.
12248 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12249 arm_arch5e with arm_arch5t and arm_arch5te.
12250 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12251 (arm_arch5t, arm_arch5te): Declare.
12252 * config/arm/arm-tables.opt: Regenerate.
12253 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12254 * config/arm/t-multilib: Likewise.
12255 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12256 instead of arm_arch5.
12257 (*call_reg_thumb1): Likewise.
12258 (*call_value_reg_thumb1_v5): Likewise.
12259 (*call_value_reg_thumb1): Likewise.
12260 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12261 unreachable path.
12262 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12263
12264 2018-05-18 Martin Liska <mliska@suse.cz>
12265
12266 PR gcov-profile/84846
12267 * doc/gcov.texi: Document -t option of gcov tool.
12268
12269 2018-05-18 Martin Liska <mliska@suse.cz>
12270
12271 PR gcov-profile/84846
12272 * gcov.c (print_usage): Add new -t option.
12273 (process_args): Handle the option.
12274 (generate_results): Use stdout as output when requested by
12275 the option.
12276
12277 2018-05-18 Martin Liska <mliska@suse.cz>
12278
12279 PR gcov-profile/84846
12280 * coverage.c (coverage_init): Write PWD to .gcno file.
12281 * doc/gcov.texi: Document how working directory is printed.
12282 * gcov-dump.c (dump_gcov_file): Print PWD.
12283 * gcov.c (output_intermediate_file): Likewise.
12284 (read_graph_file): Read PWD string.
12285 (output_lines): Print PWD.
12286
12287 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12288
12289 PR middle-end/85817
12290 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12291 for retval and return false if all args to phi are zero.
12292
12293 2018-05-18 Richard Biener <rguenther@suse.de>
12294
12295 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12296 method.
12297 (evrp_dom_walker::before_dom_children): Call it.
12298
12299 2018-05-18 Richard Biener <rguenther@suse.de>
12300
12301 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12302 results when processing array refs with variable index.
12303
12304 2018-05-18 Toon Moene <toon@moene.org>
12305
12306 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12307 directly after that of -floop-interchange. Indicate that both
12308 options are enabled by default when specifying -O3.
12309
12310 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12311
12312 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12313 iterator. Delete separate integer-mode vec_set<mode> expander.
12314 (aarch64_simd_vec_setv2di): Delete.
12315 (vec_setv2di): Delete.
12316 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12317 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
12318 the "w, r" alternative.
12319
12320 2018-05-18 Martin Liska <mliska@suse.cz>
12321
12322 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12323 * tree-pass.h (make_pass_lower_switch_O0): New function.
12324 * tree-switch-conversion.c (node_has_low_bound): Remove.
12325 (node_has_high_bound): Likewise.
12326 (node_is_bounded): Likewise.
12327 (class pass_lower_switch): Make it a template type and create
12328 two instances.
12329 (pass_lower_switch::execute): Add template argument.
12330 (make_pass_lower_switch): New function.
12331 (make_pass_lower_switch_O0): New function.
12332 (do_jump_if_equal): Remove.
12333 (emit_case_nodes): Simplify to just handle all 3 cases and leave
12334 all the hard work to tree optimization passes.
12335
12336 2018-05-18 Martin Liska <mliska@suse.cz>
12337
12338 * dbgcnt.c (limit_low): Renamed from limit.
12339 (limit_high): New variable.
12340 (dbg_cnt_is_enabled): Check for upper limit.
12341 (dbg_cnt): Adjust dumping.
12342 (dbg_cnt_set_limit_by_index): Add new argument for high
12343 value.
12344 (dbg_cnt_set_limit_by_name): Likewise.
12345 (dbg_cnt_process_single_pair): Parse new format.
12346 (dbg_cnt_process_opt): Use strtok.
12347 (dbg_cnt_list_all_counters): Remove 'value' and add
12348 'limit_high'.
12349 * doc/invoke.texi: Document changes.
12350
12351 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
12352
12353 * doc/sourcebuild.texi (scalar_all_fma): Document.
12354 * tree.def (FMA_EXPR): Delete.
12355 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12356 * internal-fn.c (ternary_direct): New macro.
12357 (expand_ternary_optab_fn): Likewise.
12358 (direct_ternary_optab_supported_p): Likewise.
12359 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12360 * builtins.c (fold_builtin_fma): Delete.
12361 (fold_builtin_3): Don't call it.
12362 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12363 * expr.c (expand_expr_real_2): Likewise.
12364 * fold-const.c (operand_equal_p): Likewise.
12365 (fold_ternary_loc): Likewise.
12366 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12367 * gimple.c (DEFTREECODE): Likewise.
12368 * gimplify.c (gimplify_expr): Likewise.
12369 * optabs-tree.c (optab_for_tree_code): Likewise.
12370 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12371 * tree-eh.c (operation_could_trap_p): Likewise.
12372 (stmt_could_throw_1_p): Likewise.
12373 * tree-inline.c (estimate_operator_cost): Likewise.
12374 * tree-pretty-print.c (dump_generic_node): Likewise.
12375 (op_code_prio): Likewise.
12376 * tree-ssa-loop-im.c (stmt_cost): Likewise.
12377 * tree-ssa-operands.c (get_expr_operands): Likewise.
12378 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12379 * fold-const-call.h (fold_fma): Delete.
12380 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12381 CFN_FNMA and CFN_FNMS.
12382 (fold_fma): Delete.
12383 * genmatch.c (combined_fn): New enum.
12384 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12385 (commutative_op): New function.
12386 (commutate): Use it. Handle more than 2 operands.
12387 (dt_operand::gen_gimple_expr): Use commutative_op.
12388 (parser::parse_expr): Allow :c to be used with non-binary
12389 operators if the commutative operand is known.
12390 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12391 CFN_FMS, CFN_FNMA and CFN_FNMS.
12392 (backprop::process_assign_use): Remove FMA_EXPR handling.
12393 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12394 (gen_hsa_fma): New function.
12395 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12396 IFN_FNMA and IFN_FNMS.
12397 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12398 * gimple-fold.h (follow_all_ssa_edges): Declare.
12399 * gimple-fold.c (follow_all_ssa_edges): New function.
12400 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12401 gimple_build interface and use follow_all_ssa_edges to fold the result.
12402 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12403 instead of checking for optabs directly.
12404 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12405 rather than FMA_EXPRs.
12406 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12407 call to IFN_FMA instead of an FMA_EXPR.
12408
12409 2018-05-17 Jim Wilson <jimw@sifive.com>
12410
12411 * expr.c (do_tablejump): When converting index to Pmode, if we have a
12412 sign extended promoted subreg, and the range does not have the sign bit
12413 set, then do a sign extend.
12414
12415 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12416 test, check for sign extended subreg and/or constant operands, and
12417 do a sign extend in that case.
12418
12419 2018-05-17 Steve Ellcey <sellcey@cavium.com>
12420
12421 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12422 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12423 Add untyped.
12424 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12425 Change logics_shift_reg to logics_shift_imm.
12426 (thunderx2t99_fp_loadpair_basic): Delete.
12427 (thunderx2t99_fp_storepair_basic): Delete.
12428 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12429 (thunderx2t99_asimd_polynomial): Delete.
12430 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12431 and neon_fp_mul_d_scalar_q.
12432 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12433 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12434 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12435 (thunderx2t99_asimd_lut): Add missing tbl types.
12436 (thunderx2t99_asimd_ext): Delete.
12437 (thunderx2t99_asimd_load1_1_mult): Delete.
12438 (thunderx2t99_asimd_load1_2_mult): Delete.
12439 (thunderx2t99_asimd_load1_ldp): New.
12440 (thunderx2t99_asimd_load1): New.
12441 (thunderx2t99_asimd_load2): Add missing *load2* types.
12442 (thunderx2t99_asimd_load3): New.
12443 (thunderx2t99_asimd_load4): New.
12444 (thunderx2t99_asimd_store1_1_mult): Delete.
12445 (thunderx2t99_asimd_store1_2_mult): Delete.
12446 (thunderx2t99_asimd_store2_mult): Delete.
12447 (thunderx2t99_asimd_store2_onelane): Delete.
12448 (thunderx2t99_asimd_store_stp): New.
12449 (thunderx2t99_asimd_store1): New.
12450 (thunderx2t99_asimd_store2): New.
12451 (thunderx2t99_asimd_store3): New.
12452 (thunderx2t99_asimd_store4): New.
12453
12454 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
12455
12456 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12457 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
12458
12459 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
12460 Segher Boessenkool <segher@kernel.crashing.org>
12461
12462 PR target/85698
12463 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12464 operand.
12465
12466 2018-05-17 Richard Biener <rguenther@suse.de>
12467
12468 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12469 for pruning loop and prune defs feeding only already visited PHIs.
12470
12471 2018-05-17 Richard Biener <rguenther@suse.de>
12472
12473 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12474
12475 2018-05-17 Bin Cheng <bin.cheng@arm.com>
12476 Richard Biener <rguenther@suse.de>
12477
12478 PR tree-optimization/85793
12479 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12480 for VMAT_ELEMENTWISE.
12481
12482 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12483
12484 * internal-fn.h (lookup_internal_fn): Declare
12485 * internal-fn.c (lookup_internal_fn): New function.
12486 * gimple.c (gimple_build_call_from_tree): Handle calls to
12487 internal functions.
12488 * gimple-pretty-print.c (dump_gimple_call): Print "." before
12489 internal function names.
12490 * tree-pretty-print.c (dump_generic_node): Likewise.
12491 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12492
12493 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
12494
12495 * gimple-fold.h (gimple_build): Make the function forms take
12496 combined_fn rather than built_in_function.
12497 (gimple_simplify): Likewise.
12498 * gimple-match-head.c (gimple_simplify): Likewise.
12499 * gimple-fold.c (gimple_build): Likewise.
12500 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12501 rather than gimple_build_call_internal.
12502 (get_initial_defs_for_reduction): Likewise.
12503 (vect_create_epilog_for_reduction): Likewise.
12504 (vectorizable_live_operation): Likewise.
12505
12506 2018-05-17 Martin Liska <mliska@suse.cz>
12507
12508 * gimple-ssa-sprintf.c (format_directive): Do not use
12509 space in between 'G_' and '('.
12510
12511 2018-05-17 Jakub Jelinek <jakub@redhat.com>
12512
12513 PR target/85323
12514 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12515 even if the mask is not all ones.
12516
12517 PR target/85323
12518 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12519 vector.
12520 (ix86_gimple_fold_builtin): Likewise.
12521
12522 PR target/85323
12523 * config/i386/i386.c: Include tree-vector-builder.h.
12524 (ix86_vector_shift_count): New function.
12525 (ix86_fold_builtin): Fold shift builtins by scalar count.
12526 (ix86_gimple_fold_builtin): Likewise.
12527
12528 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12529 _mm512_setzero): New intrinsics.
12530
12531 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
12532 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12533
12534 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12535 code generation for cases where splatting a value is not useful.
12536 * simplify-rtx.c (simplify_ternary_operation): Simplify
12537 vec_merge across a vec_duplicate and a paradoxical subreg forming
12538 a vector mode to a vec_concat.
12539
12540 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
12541
12542 * config.gcc: Support "goldmont-plus".
12543 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12544 "goldmont-plus".
12545 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12546 PROCESSOR_GOLDMONT_PLUS.
12547 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12548 (processor_target_table): Add "goldmont-plus".
12549 (PTA_GOLDMONT_PLUS): Define.
12550 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12551 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12552 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12553 (fold_builtin_cpu): Add "goldmont-plus".
12554 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12555 (ix86_option_override_internal): Add "goldmont-plus".
12556 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12557 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12558 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12559 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12560
12561 2018-05-17 Richard Biener <rguenther@suse.de>
12562
12563 PR tree-optimization/85757
12564 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12565 remove defs that only feed that PHI from further processing.
12566
12567 2018-05-16 Jim Wilson <jimw@sifive.com>
12568
12569 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12570 asterisk to name.
12571 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12572
12573 2018-05-16 Mark Wielaard <mark@klomp.org>
12574
12575 * dwarf2out.c (count_index_strings): New function.
12576 (output_indirect_strings): Call count_index_strings and generate
12577 header for dwarf_version >= 5.
12578
12579 2018-05-16 Mark Wielaard <mark@klomp.org>
12580
12581 * dwarf2out.c (dwarf_FORM): New function.
12582 (set_indirect_string): Use dwarf_FORM.
12583 (reset_indirect_string): Likewise.
12584 (size_of_die): Likewise.
12585 (value_format): Likewise.
12586 (output_die): Likewise.
12587 (add_skeleton_AT_string): Likewise.
12588 (output_macinfo_op): Likewise.
12589 (index_string): Likewise.
12590 (output_index_string_offset): Likewise.
12591 (output_index_string): Likewise.
12592 (count_index_strings): Likewise.
12593
12594 2018-05-16 Carl Love <cel@us.ibm.com>
12595
12596 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12597 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12598
12599 2018-05-16 Martin Jambor <mjambor@suse.cz>
12600
12601 * ipa-prop.c (ipa_free_all_edge_args): Remove.
12602 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12603
12604 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
12605
12606 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12607 (fnma<mode>4): Likewise.
12608 (fms<mode>4): Likewise.
12609 (fnms<mode>4): Likewise.
12610 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12611 (aarch64_fnma<mode>4): Likewise.
12612 (aarch64_fms<mode>4): Likewise.
12613 (aarch64_fnms<mode>4): Likewise.
12614 (aarch64_fnmadd<mode>4): Likewise.
12615
12616 2018-05-16 Jason Merrill <jason@redhat.com>
12617
12618 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
12619
12620 2018-05-16 Richard Biener <rguenther@suse.de>
12621
12622 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12623 (dump_stmt_cost): Declare.
12624 (add_stmt_cost): Dump cost we add.
12625 (add_stmt_costs): New function.
12626 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12627 No longer exported.
12628 (vect_analyze_stmt): Adjust prototype.
12629 (vectorizable_condition): Likewise.
12630 (vectorizable_live_operation): Likewise.
12631 (vectorizable_reduction): Likewise.
12632 (vectorizable_induction): Likewise.
12633 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12634 cost vector to pass to vectorizable_ and record afterwards.
12635 (vect_model_reduction_cost): Take cost vector argument and adjust.
12636 (vect_model_induction_cost): Likewise.
12637 (vectorizable_reduction): Likewise.
12638 (vectorizable_induction): Likewise.
12639 (vectorizable_live_operation): Likewise.
12640 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12641 SLP_TREE_NUMBER_OF_VEC_STMTS.
12642 (vect_analyze_slp_cost_1): Remove.
12643 (vect_analyze_slp_cost): Likewise.
12644 (vect_slp_analyze_node_operations): Take visited args and
12645 a target cost vector. Avoid processing already visited stmt sets.
12646 (vect_slp_analyze_operations): Use a local cost vector to gather
12647 costs and register those of non-discarded instances.
12648 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12649 (vect_schedule_slp_instance): Remove copying of
12650 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
12651 zero.
12652 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12653 adding cost. Record cost entry location.
12654 (vect_prologue_cost_for_slp_op): Function to compute cost of
12655 a constant or invariant generated for SLP vect in the prologue,
12656 split out from vect_analyze_slp_cost_1.
12657 (vect_model_simple_cost): Make static. Adjust for SLP costing.
12658 (vect_model_promotion_demotion_cost): Likewise.
12659 (vect_model_store_cost): Likewise, make static.
12660 (vect_model_load_cost): Likewise.
12661 (vectorizable_bswap): Add cost vector arg and adjust.
12662 (vectorizable_call): Likewise.
12663 (vectorizable_simd_clone_call): Likewise.
12664 (vectorizable_conversion): Likewise.
12665 (vectorizable_assignment): Likewise.
12666 (vectorizable_shift): Likewise.
12667 (vectorizable_operation): Likewise.
12668 (vectorizable_store): Likewise.
12669 (vectorizable_load): Likewise.
12670 (vectorizable_condition): Likewise.
12671 (vectorizable_comparison): Likewise.
12672 (can_vectorize_live_stmts): Likewise.
12673 (vect_analyze_stmt): Likewise.
12674 (vect_transform_stmt): Adjust calls to vectorizable_*.
12675 * tree-vectorizer.c: Include gimple-pretty-print.h.
12676 (dump_stmt_cost): New function.
12677
12678 2018-05-16 Richard Biener <rguenther@suse.de>
12679
12680 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12681 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12682 * tree-ssa-dse.c: Include tree-ssa-loop.h.
12683 (check_name): New callback.
12684 (dse_classify_store): Track cycles via a visited bitmap of PHI
12685 defs and simplify handling of in-loop and across loop dead stores
12686 and properly fail for loop-variant refs. Handle byte-tracking with
12687 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12688 limiting the walk.
12689
12690 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
12691
12692 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12693 (vect_get_mask_type_for_stmt): Likewise.
12694 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12695 split out from...
12696 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
12697 to determine the statement's vector type and the vector type that
12698 should be used for calculating nunits. Deal with cases in which
12699 the type has to be deferred.
12700 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12701 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12702 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12703 (vect_determine_vf_for_stmt): New functions, split out from...
12704 (vect_determine_vectorization_factor): ...here.
12705 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12706 (vect_get_mask_type_for_stmt): New functions, split out from
12707 vect_determine_vectorization_factor.
12708
12709 2018-05-16 Richard Biener <rguenther@suse.de>
12710
12711 * tree-cfg.c (verify_gimple_assign_ternary): Properly
12712 verify the [VEC_]COND_EXPR embedded comparison.
12713
12714 2018-05-15 Martin Sebor <msebor@redhat.com>
12715
12716 PR tree-optimization/85753
12717 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12718 RECORD_TYPE in addition to ARRAY_TYPE.
12719
12720 2018-05-15 Martin Sebor <msebor@redhat.com>
12721
12722 PR middle-end/85643
12723 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12724
12725 2018-05-15 Richard Biener <rguenther@suse.de>
12726
12727 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12728 add by_clobber_p one. Change algorithm to collect all defs
12729 representing uses we need to walk and try reducing them to
12730 a single one before failing.
12731 (dse_dom_walker::dse_optimize_stmt): Adjust.
12732
12733 2018-05-13 Mark Wielaard <mark@klomp.org>
12734
12735 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12736 (size_of_loc_descr): Likewise.
12737 (output_loc_operands): Likewise.
12738 (output_loc_operands_raw): Likewise.
12739 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12740 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12741 (hash_loc_operands): Likewise.
12742 (compare_loc_operands): Likewise.
12743
12744 2018-05-14 Mark Wielaard <mark@klomp.org>
12745
12746 * dwarf2out.c (count_index_addrs): New function.
12747 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12748
12749 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12750
12751 PR tree-optimization/83648
12752 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12753 return value as malloc candidate.
12754
12755 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12756
12757 PR ipa/85734
12758 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12759 param as true in call to suggest_attribute.
12760
12761 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
12762
12763 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12764 -mreadonly-in-sdata.
12765
12766 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12767
12768 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12769 New pattern.
12770 (aarch64_crypto_aesd_fused): Likewise.
12771
12772 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
12773
12774 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12775 (movsi_aarch64): Likewise.
12776 (load_pairsi): Likewise.
12777 (load_pairdi): Likewise.
12778 (store_pairsi): Likewise.
12779 (store_pairdi): Likewise.
12780 (load_pairsf): Likewise.
12781 (load_pairdf): Likewise.
12782 (store_pairsf): Likewise.
12783 (store_pairdf): Likewise.
12784 (zero_extend): Likewise.
12785 (trunc): Swap alternatives.
12786 (fcvt_target): Add '?' to prefer w over r.
12787
12788 2018-05-14 Jakub Jelinek <jakub@redhat.com>
12789
12790 PR target/85756
12791 * config/i386/i386.md: Disallow non-commutative arithmetics in
12792 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12793 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
12794 in the peephole2 before it.
12795
12796 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
12797
12798 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12799 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12800 (ix86_handle_option): Handle -mcldemote.
12801 * config.gcc: New header.
12802 * config/i386/cldemoteintrin.h: New file.
12803 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12804 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12805 -mcldemote.
12806 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12807 OPTION_MASK_ISA_CLDEMOTE.
12808 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12809 (ix86_valid_target_attribute_inner_p): Ditto.
12810 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12811 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12812 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12813 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12814 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12815 (cldemote): New.
12816 * config/i386/i386.opt: Add -mcldemote.
12817 * config/i386/x86intrin.h: New header.
12818 * doc/invoke.texi: Add -mcldemote.
12819
12820 2018-05-14 Richard Biener <rguenther@suse.de>
12821
12822 * doc/match-and-simplify.texi: Adjust :s documentation.
12823
12824 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
12825
12826 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12827 intended memcpy size.
12828 (REORDER_45): Likewise.
12829
12830 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
12831
12832 * sort.cc: New file.
12833 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12834 * vec.c (qsort_chk): Use gcc_qsort.
12835 * Makefile.in (OBJS-libcommon): Add sort.o.
12836 (build/sort.o): New target. Use it...
12837 (BUILD_RTL): ... here, and...
12838 (build/gencfn-macros): ... here, and...
12839 (build/genmatch): ... here.
12840
12841 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12842 Chung-Ju Wu <jasonwucj@gmail.com>
12843
12844 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12845 * config/nds32/nds32-graywolf.md: New file.
12846 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12847 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12848 pipeline.
12849 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12850 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12851 * config/nds32/nds32.md (pipeline_model): Add graywolf.
12852 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12853 * config/nds32/pipelines.md: Include n15 settings.
12854
12855 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12856 Chung-Ju Wu <jasonwucj@gmail.com>
12857
12858 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12859 * config/nds32/nds32-n13.md: New file.
12860 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12861 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12862 pipeline.
12863 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12864 * config/nds32/nds32.md (pipeline_model): Add n13.
12865 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12866 * config/nds32/pipelines.md: Include n13 settings.
12867
12868 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
12869 Chung-Ju Wu <jasonwucj@gmail.com>
12870
12871 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12872 * config/nds32/nds32-n10.md: New file.
12873 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12874 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12875 pipeline.
12876 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12877 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12878 * config/nds32/nds32.md (pipeline_model): Add n10.
12879 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12880 * config/nds32/pipelines.md: Include n10 settings.
12881
12882 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
12883 Kito Cheng <kito.cheng@gmail.com>
12884 Chung-Ju Wu <jasonwucj@gmail.com>
12885
12886 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12887 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12888 Add enum values for DSP extension instructions.
12889 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12890 New constraints.
12891 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12892 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12893 New code iterators.
12894 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12895 * config/nds32/nds32-dspext.md: New file for DSP implementation.
12896 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12897 * config/nds32/nds32-intrinsic.md: Likewise.
12898 * config/nds32/nds32_intrinsic.h: Likewise.
12899 * config/nds32/nds32-md-auxiliary.c: Likewise.
12900 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12901 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12902 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12903 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12904 * config/nds32/nds32-protos.h: New declarations for DSP extension.
12905 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12906 TYPE_DMAC in switch statement.
12907 * config/nds32/nds32.c: New checking and implementation for DSP
12908 extension instructions.
12909 * config/nds32/nds32.h: Likewise.
12910 * config/nds32/nds32.md: Likewise.
12911 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12912 * config/nds32/predicates.md: Implement new predicates for DSP
12913 extension.
12914
12915 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12916
12917 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12918 Reformat alternatives and attributes so it is easier to identify
12919 which constraints/attributes go with which instruction.
12920 (mov<mode>_hardfloat32, FMOVE64): Likewise.
12921 (mov<mode>_softfloat32, FMOVE64): Likewise.
12922 (mov<mode>_hardfloat64, FMOVE64): Likewise.
12923 (mov<mode>_softfloat64, FMOVE64): Likewise.
12924
12925 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
12926
12927 * doc/extend.texi (PowerPC Built-in Functions): Rename this
12928 subsection.
12929 (Basic PowerPC Built-in Functions): The new name of the
12930 subsection previously known as "PowerPC Built-in Functions".
12931 (Basic PowerPC Built-in Functions Available on all Configurations):
12932 New subsubsection.
12933 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12934 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12935 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12936 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12937
12938 2018-05-11 Martin Jambor <mjambor@suse.cz>
12939
12940 PR ipa/85655
12941 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12942 single const.
12943
12944 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12945
12946 PR target/85733
12947 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12948
12949 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
12950
12951 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12952 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12953 (ix86_handle_option): Handle -mwaitpkg.
12954 * config.gcc: New header.
12955 * config/i386/cpuid.h (bit_WAITPKG): New bit.
12956 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12957 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12958 function type.
12959 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12960 OPTION_MASK_ISA_WAITPKG.
12961 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12962 (ix86_option_override_internal): Add PTA_WAITPKG.
12963 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12964 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12965 IX86_BUILTIN_TPAUSE.
12966 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12967 __builtin_ia32_umwait and __builtin_ia32_tpause.
12968 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12969 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12970 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12971 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12972 UNSPECV_TPAUSE): New.
12973 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12974 * config/i386/i386.opt: Add -mwaitpkg.
12975 * config/i386/waitpkgintrin.h: New file.
12976 * config/i386/x86intrin.h: New header.
12977 * doc/invoke.texi: Add -mwaitpkg.
12978
12979 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
12980
12981 PR target/85606
12982 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12983 equivalent.
12984 (cortex-m0): Use armv6s-m isa.
12985 (cortex-m0plus): Likewise.
12986 (cortex-m1): Likewise.
12987 (cortex-m0.small-multiply): Likewise.
12988 (cortex-m0plus.small-multiply): Likewise.
12989 (cortex-m1.small-multiply): Likewise.
12990
12991 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
12992 Jakub Jelinek <jakub@redhat.com>
12993
12994 PR tree-optimization/85692
12995 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12996 source permute as well.
12997
12998 2018-05-11 Martin Liska <mliska@suse.cz>
12999
13000 PR sanitizer/85556
13001 * doc/extend.texi: Document LLVM style format for no_sanitize
13002 attribute.
13003
13004 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13005
13006 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
13007 mode_supports_vsx_dform_quad to mode_supports_dq_form.
13008 (mode_supports_vsx_dform_quad): Likewise.
13009 (mode_supports_vmx_dform): Move these functions to be next to the
13010 other mode_supports functions.
13011 (mode_supports_dq_form): Likewise.
13012 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
13013 mode_supports_dq_form.
13014 (reg_offset_addressing_ok_p): Likewise.
13015 (offsettable_ok_by_alignment): Likewise.
13016 (rs6000_legitimate_offset_address_p): Likewise.
13017 (legitimate_lo_sum_address_p): Likewise.
13018 (rs6000_legitimize_address): Likewise.
13019 (rs6000_legitimize_reload_address): Likewise.
13020 (rs6000_secondary_reload_inner): Likewise.
13021 (rs6000_preferred_reload_class): Likewise.
13022 (rs6000_output_move_128bit): Likewise.
13023
13024 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13025
13026 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
13027 Generate SImode target register for null target.
13028 <case IX86_BUILTIN_XGETBV>: Ditto.
13029 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
13030 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
13031
13032 2018-05-10 Carl Love <cel@us.ibm.com>
13033
13034 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
13035 dcbtt and dcbtstt if operands[2] is 0.
13036
13037 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
13038
13039 PR target/85693
13040 * config/i386/sse.md (usadv64qi): New expander.
13041
13042 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
13043
13044 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
13045 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
13046 -maltivec=be support.
13047 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
13048 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
13049 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
13050 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
13051 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
13052 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
13053 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
13054 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
13055 altivec_vsumsws): Adjust.
13056 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
13057 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
13058 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
13059 support.
13060 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
13061 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
13062 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
13063 (altivec_lve<VI_char>x): Delete expand.
13064 (*altivec_lve<VI_char>x_internal): Rename to...
13065 (altivec_lve<VI_char>x): ... this.
13066 (altivec_lvxl_<mode>): Delete expand.
13067 (*altivec_lvxl_<mode>_internal): Rename to ...
13068 (altivec_lvxl_<mode>): ... this.
13069 (altivec_stvxl_<mode>): Delete expand.
13070 (*altivec_stvxl_<mode>_internal): Rename to ...
13071 (altivec_stvxl_<mode>): ... this.
13072 (altivec_stve<VI_char>x): Delete expand.
13073 (*altivec_stve<VI_char>x_internal): Rename to ...
13074 (altivec_stve<VI_char>x): ... this.
13075 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
13076 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
13077 reduc_plus_scal_<mode>): Adjust.
13078 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
13079 comment.
13080 (rs6000_cpu_cpp_builtins): Adjust.
13081 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
13082 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
13083 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
13084 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
13085 -maltivec=be support.
13086 (rs6000_split_vec_extract_var): Adjust.
13087 (rs6000_split_v4si_init): Adjust.
13088 (swap_selector_for_mode): Delete.
13089 (altivec_expand_lvx_be, altivec_expand_stvx_be,
13090 altivec_expand_stvex_be): Delete.
13091 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13092 -maltivec=be support.
13093 (rs6000_gimple_fold_builtin): Ditto.
13094 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13095 Adjust.
13096 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13097 (TARGET_DIRECT_MOVE_64BIT): Adjust.
13098 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13099 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13100 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13101 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13102 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13103 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13104 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13105 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13106 anonymous split): Adjust.
13107 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13108 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13109
13110 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
13111
13112 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13113 when --with-gxx-include-dir is also specified.
13114 * configure: Regenerate.
13115
13116 2018-05-09 Jim Wilson <jimw@sifive.com>
13117
13118 PR target/84797
13119 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13120 * config/riscv/t-withmultilib: New.
13121 * config/riscv/withmultilib.h: New.
13122 * doc/install.texi: Document RISC-V --with-multilib-list support.
13123
13124 2018-05-09 Richard Biener <rguenther@suse.de>
13125
13126 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13127 vector.
13128 (vect_bb_vectorization_profitable_p): Adjust. Compute
13129 actual scalar cost using the cost vector and the add_stmt_cost
13130 machinery.
13131
13132 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13133
13134 PR rtl-optimization/85645
13135 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13136 in the REG_CFA_REGISTER note for LR, don't leave it empty.
13137
13138 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13139
13140 PR rtl-optimization/85645
13141 * shrink-wrap.c (spread_components): Return a boolean saying if
13142 anything was changed.
13143 (try_shrink_wrapping_separate): Iterate spread_components until
13144 nothing changes anymore.
13145
13146 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13147
13148 PR rtl-optimization/85645
13149 * regrename.c (build_def_use): Also kill the chains that include the
13150 destination of a REG_CFA_REGISTER note.
13151
13152 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
13153
13154 PR rtl-optimization/85645
13155 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13156 insn that has a REG_CFA_REGISTER note.
13157
13158 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
13159
13160 * cfgexpand.c (expand_clobber): New function.
13161 (expand_gimple_stmt_1): Use it.
13162 * tree-vect-stmts.c (vect_clobber_variable): New function,
13163 split out from...
13164 (vectorizable_simd_clone_call): ...here.
13165 (vectorizable_store): Emit a clobber either side of an
13166 IFN_STORE_LANES sequence.
13167 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13168
13169 2018-05-09 Tom de Vries <tom@codesourcery.com>
13170
13171 PR target/85626
13172 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13173 (define_insn "trap_if_false"): Add exit after trap.
13174
13175 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
13176
13177 PR rtl-optimization/85638
13178 * bb-reorder.c: Include common/common-target.h.
13179 (create_forwarder_block): New function extracted from...
13180 (fix_up_crossing_landing_pad): ...here. Rename into...
13181 (dw2_fix_up_crossing_landing_pad): ...this.
13182 (sjlj_fix_up_crossing_landing_pad): New function.
13183 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13184 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13185 from both partitions and exit the loop after one iteration.
13186
13187 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13188
13189 Revert:
13190 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13191 subsection.
13192 (Basic PowerPC Built-in Functions): The new name of the
13193 subsection previously known as "PowerPC Built-in Functions".
13194 (Basic PowerPC Built-in Functions Available on all Configurations):
13195 New subsubsection.
13196 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13197 subsubsection.
13198 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13199 subsubsection.
13200 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13201 subsubsection.
13202 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13203 subsubsection.
13204
13205 2018-05-08 Jim Wilson <jimw@sifive.com>
13206
13207 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13208 (LD_EMUL_SUFFIX): New.
13209 (LINK_SPEC): Use it.
13210
13211 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
13212
13213 * doc/extend.texi (PowerPC Built-in Functions): Rename this
13214 subsection.
13215 (Basic PowerPC Built-in Functions): The new name of the
13216 subsection previously known as "PowerPC Built-in Functions".
13217 (Basic PowerPC Built-in Functions Available on all Configurations):
13218 New subsubsection.
13219 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13220 subsubsection.
13221 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13222 subsubsection.
13223 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13224 subsubsection.
13225 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13226 subsubsection.
13227
13228 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13229
13230 PR target/85683
13231 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13232 after cmpelim optimization.
13233
13234 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
13235
13236 * config.gcc: Support "goldmont".
13237 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13238 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13239 PROCESSOR_GOLDMONT.
13240 * config/i386/i386.c (m_GOLDMONT): Define.
13241 (processor_target_table): Add "goldmont".
13242 (PTA_GOLDMONT): Define.
13243 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13244 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13245 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13246 (fold_builtin_cpu): Add "goldmont".
13247 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13248 (ix86_option_override_internal): Add "goldmont".
13249 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13250 (processor_type): Add PROCESSOR_GOLDMONT.
13251 * config/i386/i386.md: Add CPU "glm".
13252 * config/i386/glm.md: New file.
13253 * config/i386/x86-tune.def: Add m_GOLDMONT.
13254 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13255
13256 2018-05-08 Jakub Jelinek <jakub@redhat.com>
13257
13258 PR target/85572
13259 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13260 E_V4DImode.
13261 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13262 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
13263 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
13264
13265 PR target/85317
13266 * config/i386/i386.c (ix86_fold_builtin): Handle
13267 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13268
13269 PR target/85480
13270 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13271 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13272
13273 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
13274
13275 PR target/85658
13276 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13277 (check_arch): Likewise.
13278 (check_fpu): Return the result rather than printing it.
13279 (end arch): Fix operator precedence.
13280 (end cpu): Likewise.
13281 (END): Print the result from check_fpu.
13282
13283 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13284 Alan Hayward <alan.hayward@arm.com>
13285 David Sherwood <david.sherwood@arm.com>
13286
13287 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13288 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13289 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13290 (*fcmuo<mode>_and): New patterns.
13291
13292 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
13293
13294 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13295 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13296 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13297 (cmp_op, sve_imm_con): New code attributes.
13298 (SVE_COND_INT_CMP, imm_con): Delete.
13299 (cmp_op): Remove above unspecs from int attribute.
13300 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13301 to...
13302 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
13303 comparison-specific unspecs.
13304 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13305 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13306 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13307 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13308 (*vec_fcm<cmp_op><mode>): Rename to...
13309 (*fcm<cmp_op><mode>): ...this and adjust likewise.
13310 (*vec_fcmuo<mode>): Rename to...
13311 (*fcmuo<mode>): ...this and adjust likewise.
13312 (*pred_fcm<cmp_op><mode>): New pattern.
13313 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13314 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13315 functions.
13316 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13317 and UNORDERED.
13318 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13319 (aarch64_emit_sve_predicated_cond): New function.
13320 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13321 (aarch64_emit_unspec_cond_or): Replace with...
13322 (aarch64_emit_sve_or_conds): ...this new function. Use
13323 aarch64_emit_sve_ptrue_op for the individual comparisons and
13324 aarch64_emit_binop to OR them together.
13325 (aarch64_emit_inverted_unspec_cond): Replace with...
13326 (aarch64_emit_sve_inverted_cond): ...this new function. Use
13327 aarch64_emit_sve_ptrue_op for the comparison and
13328 aarch64_emit_unop to invert the result.
13329 (aarch64_expand_sve_vec_cmp_float): Update after the above
13330 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
13331
13332 2018-05-07 Nathan Sidwell <nathan@acm.org>
13333
13334 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13335 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13336 (Backwards Compatibility): Likewise.
13337
13338 2018-05-07 Luis Machado <luis.machado@linaro.org>
13339
13340 PR bootstrap/85681
13341 Revert:
13342 2018-05-07 Luis Machado <luis.machado@linaro.org>
13343
13344 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13345 <prefetch_dynamic_strides>: New const bool field.
13346 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13347 prefetch_dynamic_strides.
13348 (exynosm1_prefetch_tune): Likewise.
13349 (thunderxt88_prefetch_tune): Likewise.
13350 (thunderx_prefetch_tune): Likewise.
13351 (thunderx2t99_prefetch_tune): Likewise.
13352 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13353 to false.
13354 (aarch64_override_options_internal): Update to set
13355 PARAM_PREFETCH_DYNAMIC_STRIDES.
13356 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13357 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13358 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13359 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13360 prefetch-dynamic-strides setting.
13361
13362 2018-05-07 Luis Machado <luis.machado@linaro.org>
13363
13364 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13365 <minimum_stride>: New const int field.
13366 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13367 minimum_stride field.
13368 (exynosm1_prefetch_tune): Likewise.
13369 (thunderxt88_prefetch_tune): Likewise.
13370 (thunderx_prefetch_tune): Likewise.
13371 (thunderx2t99_prefetch_tune): Likewise.
13372 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13373 (aarch64_override_options_internal): Update to set
13374 PARAM_PREFETCH_MINIMUM_STRIDE.
13375 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13376 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13377 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13378 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13379 stride is constant and is below the minimum stride threshold.
13380
13381 2018-05-07 Luis Machado <luis.machado@linaro.org>
13382
13383 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13384 to 512.
13385
13386 2018-05-07 Luis Machado <luis.machado@linaro.org>
13387
13388 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13389 <prefetch_dynamic_strides>: New const bool field.
13390 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13391 prefetch_dynamic_strides.
13392 (exynosm1_prefetch_tune): Likewise.
13393 (thunderxt88_prefetch_tune): Likewise.
13394 (thunderx_prefetch_tune): Likewise.
13395 (thunderx2t99_prefetch_tune): Likewise.
13396 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13397 to false.
13398 (aarch64_override_options_internal): Update to set
13399 PARAM_PREFETCH_DYNAMIC_STRIDES.
13400 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13401 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13402 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13403 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13404 prefetch-dynamic-strides setting.
13405
13406 2018-05-07 Luis Machado <luis.machado@linaro.org>
13407
13408 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13409 <minimum_stride>: New const int field.
13410 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13411 minimum_stride field.
13412 (exynosm1_prefetch_tune): Likewise.
13413 (thunderxt88_prefetch_tune): Likewise.
13414 (thunderx_prefetch_tune): Likewise.
13415 (thunderx2t99_prefetch_tune): Likewise.
13416 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13417 (aarch64_override_options_internal): Update to set
13418 PARAM_PREFETCH_MINIMUM_STRIDE.
13419 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13420 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13421 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13422 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13423 stride is constant and is below the minimum stride threshold.
13424
13425 2018-05-06 Jakub Jelinek <jakub@redhat.com>
13426
13427 PR c++/85659
13428 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13429 the type is addressable. Don't force op into register if it has
13430 BLKmode.
13431
13432 2018-05-05 Roland McGrath <mcgrathr@google.com>
13433
13434 PR other/77609
13435 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13436 any section for which we don't know a specific type it should have,
13437 regardless of name. Previously this was done only for the exact
13438 names ".init_array", ".fini_array", and ".preinit_array".
13439 (default_elf_asm_named_section): Add comment about
13440 relationship with default_section_type_flags and SECTION_NOTYPE.
13441 (get_section): Don't consider it a type conflict if one side has
13442 SECTION_NOTYPE and the other doesn't, as long as neither has the
13443 SECTION_BSS et al used in the default_section_type_flags logic.
13444
13445 2018-05-05 Tom de Vries <tom@codesourcery.com>
13446
13447 PR target/85653
13448 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13449 (workaround_barsyncs): New function.
13450 (nvptx_reorg): Use workaround_barsyncs.
13451 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13452 (define_expand "nvptx_membar_cta"): New define_expand.
13453 (define_insn "*nvptx_membar_cta"): New insn.
13454
13455 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
13456
13457 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13458 To improve optimization opportunities.
13459 * builtin-types.def: The new needed builtin types for the above.
13460
13461 2018-05-04 Richard Biener <rguenther@suse.de>
13462
13463 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13464 * gimple-ssa-store-merging.c
13465 (imm_store_chain_info::output_merged_store): Remove redundant create,
13466 release split_store vector contents on failure.
13467 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13468 scalar stmt vector on cache hit.
13469
13470 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
13471
13472 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13473 Xilinx FP support.
13474 * config.gcc (powerpc-xilinx-eabi*): Remove.
13475 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13476 support.
13477 (fusion_addis_mem_combo_load): Ditto.
13478 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13479 FP support.
13480 (rs6000_cpu_cpp_builtins): Ditto.
13481 * config/rs6000/rs6000-linux.c
13482 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13483 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13484 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13485 support.
13486 (rs6000_setup_reg_addr_masks): Ditto.
13487 (rs6000_init_hard_regno_mode_ok): Ditto.
13488 (rs6000_option_override_internal): Ditto.
13489 (legitimate_lo_sum_address_p): Ditto.
13490 (rs6000_legitimize_address): Ditto.
13491 (rs6000_legitimize_reload_address): Ditto.
13492 (rs6000_legitimate_address_p): Ditto.
13493 (abi_v4_pass_in_fpr): Ditto.
13494 (setup_incoming_varargs): Ditto.
13495 (rs6000_gimplify_va_arg): Ditto.
13496 (rs6000_split_multireg_move): Ditto.
13497 (rs6000_savres_strategy): Ditto.
13498 (rs6000_emit_prologue_components): Ditto.
13499 (rs6000_emit_epilogue_components): Ditto.
13500 (rs6000_emit_prologue): Ditto.
13501 (rs6000_emit_epilogue): Ditto.
13502 (rs6000_elf_file_end): Ditto.
13503 (rs6000_function_value): Ditto.
13504 (rs6000_libcall_value): Ditto.
13505 * config/rs6000/rs6000.h: Ditto.
13506 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13507 (TARGET_MINMAX): ... this. New.
13508 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13509 * config/rs6000/rs6000.md: Remove Xilinx FP support.
13510 (*movsi_internal1_single): Delete.
13511 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13512 mfpu=, mxilinx-fpu): Delete.
13513 * config/rs6000/singlefp.h: Delete.
13514 * config/rs6000/sysv4.h: Remove Xilinx FP support.
13515 * config/rs6000/t-rs6000: Ditto.
13516 * config/rs6000/t-xilinx: Delete.
13517 * config/rs6000/titan.md: Adjust for fp_type removal.
13518 * config/rs6000/vsx.md: Remove Xilinx FP support.
13519 (VStype_simple): Delete.
13520 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13521 * config/rs6000/xfpu.h: Delete.
13522 * config/rs6000/xfpu.md: Delete.
13523 * config/rs6000/xilinx.h: Delete.
13524 * config/rs6000/xilinx.opt: Delete.
13525 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13526 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13527
13528 2018-05-04 Tom de Vries <tom@codesourcery.com>
13529
13530 PR libgomp/85639
13531 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13532 if ignore == 0.
13533
13534 2018-05-04 Richard Biener <rguenther@suse.de>
13535
13536 PR middle-end/85627
13537 * tree-complex.c (update_complex_assignment): We are always in SSA form.
13538 (expand_complex_div_wide): Likewise.
13539 (expand_complex_operations_1): Likewise.
13540 (expand_complex_libcall): Preserve EH info of the original stmt.
13541 (tree_lower_complex): Handle removed blocks.
13542 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13543 on complex multiplication and division libcall builtins.
13544
13545 2018-05-04 Richard Biener <rguenther@suse.de>
13546
13547 PR middle-end/85574
13548 * fold-const.c (negate_expr_p): Restrict negation of operand
13549 zero of a division to when we know that can happen without
13550 overflow.
13551 (fold_negate_expr_1): Likewise.
13552
13553 2018-05-04 Jakub Jelinek <jakub@redhat.com>
13554
13555 PR libstdc++/85466
13556 * real.h (real_nextafter): Declare.
13557 * real.c (real_nextafter): New function.
13558 * fold-const-call.c (fold_const_nextafter): New function.
13559 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13560 CASE_CFN_NEXTTOWARD.
13561 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13562 even when arg1_mode is different from arg0_mode.
13563
13564 2018-05-03 Nathan Sidwell <nathan@acm.org>
13565
13566 * doc/extend.texi (Deprecated Features): Remove
13567 -ffriend-injection.
13568 (Backwards Compatibility): Likewise.
13569 * doc/invoke.texi (C++ Language Options): Likewise.
13570 (C++ Dialect Options): Likewise.
13571
13572 2018-05-03 Jakub Jelinek <jakub@redhat.com>
13573
13574 PR target/85530
13575 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13576 _mm512_mask_mullox_epi64): New intrinsics.
13577
13578 2018-05-03 Tom de Vries <tom@codesourcery.com>
13579
13580 PR testsuite/85106
13581 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13582 dump files): Add offload-tree.
13583
13584 2018-05-03 Richard Biener <rguenther@suse.de>
13585
13586 PR tree-optimization/85615
13587 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13588 to loops not nested in BBs loop father to avoid creating multi-entry
13589 loops.
13590
13591 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13592
13593 PR tree-optimization/70291
13594 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13595 arguments. Change return type to tree. Emit libcall as a new
13596 statement rather than replacing existing one when inplace_p is true.
13597 (expand_complex_multiplication_components): New function.
13598 (expand_complex_multiplication): Expand floating-point complex
13599 multiplication using the above.
13600 (expand_complex_division): Rename inner_type parameter to type.
13601 Update expand_complex_libcall call-site.
13602 (expand_complex_operations_1): Update expand_complex_multiplication
13603 and expand_complex_division call-sites.
13604
13605 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13606
13607 PR target/85582
13608 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13609 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13610 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13611 the highest significant bit of the shift count mask is clear. In
13612 check whether and[sq]i3 is needed verify that all significant bits
13613 of the shift count other than the highest are set.
13614
13615 2018-05-02 Tom de Vries <tom@codesourcery.com>
13616
13617 PR libgomp/82428
13618 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13619 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13620 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13621 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13622 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13623 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13624 __builtin_goacc_parlevel_size.
13625
13626 2018-05-02 Richard Biener <rguenther@suse.de>
13627
13628 PR tree-optimization/85597
13629 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13630 do not use split vect_get_vec_defs call but call vect_get_slp_defs
13631 directly.
13632
13633 2018-05-02 Tom de Vries <tom@codesourcery.com>
13634
13635 PR testsuite/85106
13636 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13637 dump files): Add ltrans-tree.
13638
13639 2018-05-02 Tom de Vries <tom@codesourcery.com>
13640
13641 PR testsuite/85106
13642 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13643 dump files): Add wpa-ipa.
13644
13645 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
13646
13647 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
13648 powerpc*-*-linux*paired* target.
13649 * config/rs6000/750cl.h: Delete.
13650 * config/rs6000/paired.h: Delete.
13651 * config/rs6000/paired.md: Delete.
13652 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13653 float support.
13654 * config/rs6000/rs6000-builtin.def: Remove paired float support.
13655 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13656 comment. Remove paired float support.
13657 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13658 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13659 VECTOR_PAIRED.
13660 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13661 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13662 declarations.
13663 * config/rs6000/rs6000.c: Remove paired float support.
13664 (paired_expand_vector_init, paired_expand_vector_move,
13665 paired_emit_vector_compare, paired_emit_vector_cond_expr,
13666 (paired_expand_lv_builtin, paired_expand_stv_builtin,
13667 paired_expand_builtin, paired_expand_predicate_builtin,
13668 paired_init_builtins): Delete.
13669 * config/rs6000/rs6000.h: Remove paired float support.
13670 * config/rs6000/rs6000.md: Remove paired float support.
13671 (move_from_CR_ov_bit): Delete.
13672 * config/rs6000/rs6000.opt (mpaired): Delete.
13673 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13674 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13675
13676 2018-05-02 Richard Biener <rguenther@suse.de>
13677
13678 PR middle-end/85567
13679 * gimplify.c (gimplify_save_expr): When in SSA form allow
13680 SAVE_EXPRs to compute to SSA vars.
13681
13682 2018-05-02 Jakub Jelinek <jakub@redhat.com>
13683
13684 PR target/85582
13685 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13686 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13687 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13688 clobber operands[2], instead use a new pseudo. Formatting fixes.
13689
13690 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
13691
13692 PR tree-optimization/85586
13693 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13694 exit early for statements in the same group if the accesses are
13695 not strided.
13696
13697 2018-05-02 Tom de Vries <tom@codesourcery.com>
13698
13699 PR lto/85451
13700 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13701 error message.
13702
13703 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
13704
13705 PR tree-optimization/85143
13706 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13707
13708 2018-05-01 Tom de Vries <tom@codesourcery.com>
13709
13710 PR lto/85451
13711 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13712 not found" error message.
13713
13714 2018-05-01 Tom de Vries <tom@codesourcery.com>
13715
13716 PR other/83786
13717 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13718 * vec.c (test_ordered_remove_if): New function.
13719 (vec_c_tests): Call test_ordered_remove_if.
13720 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13721 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13722 * tree-vect-patterns.c (vect_pattern_recog_1): Use
13723 VEC_ORDERED_REMOVE_IF.
13724
13725 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13726
13727 PR tree-optimization/82665
13728 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13729 pointer subtraction where arguments come from a memchr call.
13730
13731 2018-05-01 Jakub Jelinek <jakub@redhat.com>
13732
13733 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13734 --push-state --as-needed and --pop-state instead of --as-needed and
13735 --no-as-needed if ld supports it.
13736 * configure: Regenerated.
13737
13738 PR web/85578
13739 * doc/install.texi2html: Replace _002d with - and _002a with * in
13740 generated html files using sed.
13741
13742 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13743
13744 PR c++/85523
13745 * gcc-rich-location.c (blank_line_before_p): New function.
13746 (use_new_line): New function.
13747 (gcc_rich_location::add_fixit_insert_formatted): New function.
13748 * gcc-rich-location.h
13749 (gcc_rich_location::add_fixit_insert_formatted): New function.
13750
13751 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13752
13753 * selftest.c (assert_streq): Rename "expected" and "actual" to
13754 "val1" and "val2". Extend NULL-handling to cover both inputs
13755 symmetrically, while still requiring both to be non-NULL for a pass.
13756 * selftest.h (assert_streq): Rename "expected" and "actual" to
13757 "val1" and "val2".
13758 (ASSERT_EQ): Likewise.
13759 (ASSERT_EQ_AT): Likewise.
13760 (ASSERT_KNOWN_EQ): Likewise.
13761 (ASSERT_KNOWN_EQ_AT): Likewise.
13762 (ASSERT_NE): Likewise.
13763 (ASSERT_MAYBE_NE): Likewise.
13764 (ASSERT_MAYBE_NE_AT): Likewise.
13765 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
13766 the assertion to pass.
13767 (ASSERT_STREQ_AT): Likewise.
13768
13769 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13770
13771 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13772 interaction with -pie.
13773
13774 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13775
13776 * selftest.h: Fix alphabetization of per-source-file selftest
13777 declarations.
13778
13779 2018-04-30 Jason Merrill <jason@redhat.com>
13780
13781 PR c++/61982 - dead stores to destroyed objects.
13782 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13783 of clobber.
13784
13785 2018-04-30 Jason Merrill <jason@redhat.com>
13786
13787 * tree.c (build_clobber): New.
13788 * tree.h: Declare it.
13789 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13790
13791 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13792
13793 * diagnostic-show-locus.c (layout::layout): Update for
13794 location_get_source_line returning a char_span.
13795 (struct char_span): Move to input.h.
13796 (struct correction): Update for fields in char_span becoming
13797 private.
13798 (struct source_line): Update for location_get_source_line
13799 returning a char_span.
13800 (layout::print_line): Likewise.
13801 * edit-context.c (edited_file::print_content): Likewise.
13802 (edited_file::print_diff_hunk): Likewise.
13803 (edited_file::print_run_of_changed_lines): Likewise.
13804 (edited_file::get_num_lines): Likewise.
13805 (edited_line::edited_line): Likewise.
13806 * final.c (asm_show_source): Likewise.
13807 * input.c (location_get_source_line): Convert return type
13808 from const char * to char_span, losing the final "line_len"
13809 param.
13810 (dump_location_info): Update for the above.
13811 (get_substring_ranges_for_loc): Likewise. Use a char_span
13812 when handling the literal within the line.
13813 (test_reading_source_line): Update for location_get_source_line
13814 returning a char_span.
13815 * input.h (class char_span): Move here from
13816 diagnostic-show-locus.c, converting from a struct to a class.
13817 Make data members private.
13818 (char_span::operator bool): New.
13819 (char_span::length): New.
13820 (char_span::get_buffer): New.
13821 (char_span::operator[]): New.
13822 (char_span::subspan): Make const.
13823 (char_span::xstrdup): New.
13824 (location_get_source_line): Convert return type from const char *
13825 to char_span, losing the final "line_size" param.
13826
13827 2018-04-30 Jan Hubicka <jh@suse.cz>
13828
13829 * lto-wrapper.c (ltrans_priorities): New static var.
13830 (cmp_priority): New.
13831 (run_gcc): Read priorities and if doing parallel build order
13832 the Makefile by them.
13833
13834 2018-04-30 David Malcolm <dmalcolm@redhat.com>
13835
13836 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13837
13838 2018-04-30 Richard Biener <rguenther@suse.de>
13839
13840 * tree-cfg.c (verify_address): Remove base argument, add
13841 flag whether to check TREE_ADDRESSABLE and do that.
13842 (verify_expr): Remove.
13843 (verify_types_in_gimple_reference): Add pieces from verify_expr.
13844 (verify_gimple_assign_single): Likewise.
13845 (verify_gimple_switch): Likewise.
13846 (verify_expr_location_1): Dereference tp once. Add (disabled)
13847 piece from verify_expr.
13848 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13849
13850 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13851
13852 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13853
13854 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13855
13856 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13857 (small_data_pattern): Likewise.
13858 (arc_rewrite_small_data): Likewise.
13859 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13860 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13861 (get_symbol_alignment): New function.
13862 (legitimate_small_data_address_p): Likewise.
13863 (legitimate_scaled_address): Update, call
13864 legitimate_small_data_address_p.
13865 (output_sdata): New static variable.
13866 (arc_print_operand): Update how we handle small data operands.
13867 (arc_print_operand_address): Likewise.
13868 (arc_legitimate_address_p): Update, use
13869 legitimate_small_data_address_p.
13870 (arc_rewrite_small_data_p): Remove.
13871 (arc_rewrite_small_data_1): Likewise.
13872 (arc_rewrite_small_data): Likewise.
13873 (small_data_pattern): Likewise.
13874 (compact_sda_memory_operand): Update to use
13875 legitimate_small_data_address_p and get_symbol_alignment.
13876 (prepare_move_operands): Don't rewite sdata pattern.
13877 (prepare_extend_operands): Remove.
13878 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13879 pattern.
13880 (zero_extendqisi2): Likewise.
13881 (zero_extendhisi2): Likewise.
13882 (extendqihi2): Likewise.
13883 (extendqisi2): Likewise.
13884 (extendhisi2): Likewise.
13885 (addsi3): Likewise.
13886 (subsi3): Likewise.
13887 (andsi3): Likewise.
13888 * config/arc/constraints.md (Usd): Change it to memory constraint.
13889
13890 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
13891
13892 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13893 as source of std instructions.
13894 * config/arc/arc.md (movsi_insn): Update pattern predicate to
13895 allow 6-bit constants as source for store instructions.
13896 (movdi_insn): Update instruction pattern to allow 6-bit constants
13897 as source for store instructions.
13898
13899 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
13900
13901 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13902
13903 2018-04-30 Nathan Sidwell <nathan@acm.org>
13904 Sandra Loosemore <sandra@codesourcery.com>
13905
13906 * dumpfile.c (dump_open): Allow '-' for stdout.
13907 * doc/invoke.texi (Developer Options): Document dump filename
13908 determination early. Document stdin/stdout selection.
13909
13910 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
13911
13912 Microblaze Target: PIC data text relative
13913
13914 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13915 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13916 Add declaration.
13917 * config/microblaze/microblaze.h (microblaze_constant_address_p):
13918 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13919 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13920 New addressing mode for data-text relative position indepenedent code.
13921 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13922 'ADDRESS_SYMBOLIC_TXT_REL'.
13923 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13924 (microblaze_legitimate_pic_operand): Exclude function calls from
13925 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13926 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13927 addresses cases.
13928 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13929 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13930 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13931 for 'address + offset'.
13932 (microblaze_expand_prologue): Add new function prologue call for
13933 'r20' assignation.
13934 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13935 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13936 table in case of TARGET_PIC_DATA_TEXT_REL.
13937 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13938 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13939 Add new macros 'UNSPEC_TEXT',
13940 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13941 + exclude function calls from 'UNSPEC_PLT' in case of data text
13942 relative mode.
13943 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13944 new target hook for generating address diff vector tables in case of
13945 flag_pic.
13946 * doc/tm.texi : Regenerate.
13947 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13948 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13949 of addr diff vector generation.
13950 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13951 target hook definition.
13952 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13953 Add default function for generate_pic_addr_diff_vec -> flag_pic.
13954 * doc/invoke.texi (Add new pic option): Add new microblaze pic
13955 option for data text relative.
13956
13957 2018-04-30 Richard Biener <rguenther@suse.de>
13958
13959 * tree-chrec.h (evolution_function_is_constant_p): Remove
13960 redundant check.
13961 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13962
13963 2018-04-30 Richard Biener <rguenther@suse.de>
13964
13965 PR bootstrap/85571
13966 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13967
13968 2018-04-30 Richard Biener <rguenther@suse.de>
13969
13970 PR tree-optimization/28364
13971 PR tree-optimization/85275
13972 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13973 copying first exit test.
13974
13975 2018-04-28 Mark Wielaard <mark@klomp.org>
13976
13977 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13978 dwarf_version >= 5.
13979 (dwarf_AT): Handle DW_AT_addr_base.
13980 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13981
13982 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
13983
13984 PR target/84431
13985 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13986 (*ashl<dwi>3_doubleword_mask_1): Ditto.
13987 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13988 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13989
13990 2018-04-28 Richard Biener <rguenther@suse.de>
13991
13992 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13993 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13994 to reflect use. Only add interesting stmts.
13995
13996 2018-04-27 Martin Jambor <mjambor@suse.cz>
13997
13998 PR ipa/85549
13999 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
14000 the jump function allows for passing through aggregate values.
14001
14002 2018-04-27 David Malcolm <dmalcolm@redhat.com>
14003
14004 * input.h (in_system_header_at): Convert from macro to inline
14005 function.
14006 (from_macro_expansion_at): Likewise.
14007 (from_macro_definition_at): Likewise.
14008
14009 2018-04-27 Jeff Law <law@redhat.com>
14010
14011 * config.gcc: Mark tile* targets as deprecated/obsolete.
14012
14013 2018-04-27 Richard Biener <rguenther@suse.de>
14014
14015 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
14016 fix for ILP32.
14017
14018 2018-04-27 Richard Biener <rguenther@suse.de>
14019
14020 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
14021
14022 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
14023
14024 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
14025 with Yd constraint. Set "preferred_for_speed" attribute from
14026 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
14027 with Yd constraint.
14028 (*movdi_internal): Ditto.
14029 (movti_interunit splitters): Remove
14030 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
14031 (movdi_interunit splitters): Ditto.
14032 * config/i386/constraints.md (Ye): Remove.
14033 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
14034
14035 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14036
14037 PR target/85512
14038 * config/aarch64/constraints.md (Usg): Limit to 31.
14039 (Usj): Limit to 63.
14040
14041 2018-04-27 Jakub Jelinek <jakub@redhat.com>
14042
14043 PR tree-optimization/85529
14044 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
14045 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
14046 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
14047 zero extension or masking of the MSB bit.
14048 (optimize_range_tests): Add FIRST_BB argument, pass it through
14049 to optimize_range_tests_var_bound.
14050 (maybe_optimize_range_tests, reassociate_bb): Adjust
14051 optimize_range_tests callers.
14052
14053 2018-04-26 Richard Biener <rguenther@suse.de>
14054 Jakub Jelinek <jakub@redhat.com>
14055
14056 * cgraph.h (symbol_table): Just declare debug method here.
14057 * symtab.c (symbol_table::debug): Define.
14058
14059 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
14060
14061 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
14062
14063 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
14064
14065 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
14066 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
14067 (*movdi_internal): Substitute Yi and Yj constraint with x
14068 and Ym and Yn constraint with y constraint. Update "isa"
14069 attribute and set "preferred_for_speed" attribute from
14070 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
14071 (*movsi_internal): Ditto.
14072 (*movdf_internal): Ditto.
14073 (*movsf_internal): Ditto.
14074 (*zero_extendsidi2): Ditto.
14075 * config/i386/sse.md (vec_set<mode>_0): Ditto.
14076 (sse2_loadld): Ditto.
14077 (*vec_extract<ssevecmodelower>_0): Ditto.
14078 (*vec_extractv4si_0_zext_sse4): Ditto.
14079 (vec_concatv2di): Ditto.
14080 (*vec_dup<mode>): Ditto.
14081 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
14082 * config/i386/constraints.md (Yi): Remove.
14083 (Yj): Remove.
14084 (Ym): Remove.
14085 (Yn): Remove.
14086
14087 2018-04-26 Nathan Sidwell <nathan@acm.org>
14088
14089 * dumpfile.c (dump_open): New.
14090 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
14091 (dump_finish): Detect stdio/stderr by value not name.
14092
14093 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
14094
14095 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14096
14097 2018-04-26 Tom de Vries <tom@codesourcery.com>
14098
14099 PR target/84952
14100 * config/nvptx/nvptx.c (verify_neutering_jumps)
14101 (verify_neutering_labels): New function
14102 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14103
14104 2018-04-26 Tom de Vries <tom@codesourcery.com>
14105
14106 PR target/84025
14107 * config/nvptx/nvptx.c (needs_neutering_p): New function.
14108 (nvptx_single): Use needs_neutering_p to skip over insns that do not
14109 need neutering.
14110
14111 2018-04-26 Richard Biener <rguenther@suse.de>
14112 Tom de Vries <tom@codesourcery.com>
14113
14114 PR lto/85422
14115 * lto-streamer-out.c (output_function): Fixup loops if required to match
14116 discovery done in the reader.
14117
14118 2018-04-26 Richard Biener <rguenther@suse.de>
14119
14120 PR tree-optimization/85116
14121 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14122 have a loop exit from the single latch predecessor. Remove
14123 case of header with just condition.
14124 (ch_base::copy_headers): Exclude infinite loops from any
14125 processing.
14126 (pass_ch::execute): Record exits.
14127
14128 2018-04-26 Richard Biener <rguenther@suse.de>
14129
14130 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14131 prologue cost vector and pass it to vect_get_load_cost.
14132 (vect_get_peeling_costs_all_drs): Likewise.
14133 (vect_peeling_hash_get_lowest_cost): Likewise.
14134 (vect_enhance_data_refs_alignment): Likewise.
14135
14136 2018-04-26 Richard Biener <rguenther@suse.de>
14137
14138 PR middle-end/85450
14139 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14140 checking of integer<->pointer conversions.
14141 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14142 sign-/zero-extending pointer types.
14143 (expand_omp_for_static_chunk): Likewise.
14144
14145 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
14146 Jean Lee <xiaoyur347@gmail.com>
14147
14148 * config/mips/mips.c (mips_asan_shadow_offset): New function.
14149 (TARGET_ASAN_SHADOW_OFFSET): Define.
14150 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14151 true for -fsanitize=address.
14152
14153 2018-04-25 Mark Wielaard <mark@klomp.org>
14154
14155 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14156 shorter ones.
14157
14158 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14159
14160 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14161 than "alu", remove explicit "memory" and "imm_disp" attributes.
14162 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14163
14164 PR middle-end/85414
14165 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14166 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14167 gen_lowpart_no_emit.
14168
14169 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
14170
14171 PR target/85473
14172 * config/i386/i386.c (ix86_expand_builtin): Change memory
14173 operand to XI, extend p0 to Pmode.
14174 * config/i386/i386.md: Change unspec volatile and operand
14175 1 mode to XI, change operand 0 mode to P.
14176
14177 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14178
14179 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14180 GET_MODE_MASK before any checking.
14181 (nds32_can_use_bset_p): Likewise.
14182 (nds32_can_use_btgl_p): Likewise.
14183
14184 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14185
14186 * config/nds32/nds32-doubleword.md: New define_split pattern for
14187 illegal register number.
14188
14189 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14190
14191 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14192
14193 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
14194
14195 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14196
14197 2018-04-25 Richard Biener <rguenther@suse.de>
14198
14199 * lto-streamer.h (LTO_major_version): Bump to 8.
14200
14201 2018-04-25 Jakub Jelinek <jakub@redhat.com>
14202
14203 * BASE-VER: Set to 9.0.0.
14204
14205 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
14206
14207 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14208 in __abskf2 and __powikf2.
14209
14210 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14211
14212 PR target/85512
14213 * config/aarch64/constraints.md (Usg, Usj): New constraints.
14214 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14215 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14216 Use the above on operand 2. Reindent.
14217 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14218
14219 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14220
14221 PR target/85485
14222 * common/config/i386/i386-common.c (ix86_handle_option): Don't
14223 handle OPT_mcet.
14224 * config/i386/i386.opt (mcet): Removed.
14225 * doc/install.texi: Remove -mcet documentation.
14226 * doc/invoke.texi: Likewise.
14227
14228 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
14229
14230 PR target/85485
14231 * doc/install.texi: Remove -mcet from bootstrap-cet.
14232
14233 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14234
14235 PR target/85511
14236 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14237 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14238 if TARGET_64BIT.
14239
14240 PR target/85503
14241 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14242 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14243 containing a CONST_VECTOR.
14244
14245 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
14246
14247 * doc/install.texi: Update newlib dependency for nvptx.
14248
14249 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14250
14251 PR target/85508
14252 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14253 instead of INTVAL when shifting x left.
14254
14255 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
14256
14257 PR tree-optimization/85478
14258 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14259 vect_grouped_store_supported for single element vectors.
14260
14261 2018-04-24 Richard Biener <rguenther@suse.de>
14262
14263 PR target/85491
14264 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14265 load cost increase to the case of non-constant step.
14266
14267 2018-04-24 Jakub Jelinek <jakub@redhat.com>
14268
14269 PR target/84828
14270 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14271 destination if any_malformed_asm.
14272
14273 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
14274
14275 PR middle-end/85496
14276 * expr.c (store_field): In the bitfield case, if the value comes from
14277 a function call and is returned in registers by means of a PARALLEL,
14278 do not change the mode of the temporary unless BLKmode and VOIDmode.
14279
14280 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
14281
14282 PR rtl-optimization/85423
14283 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14284 dependencies to debug insns when the previous insn is non-debug.
14285
14286 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14287
14288 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14289 enums into a single definition.
14290 (fls): Fix predicates and printing.
14291 (seti): Likewise.
14292
14293 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
14294
14295 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14296 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14297 and short u6 immediate.
14298 (check_if_valid_sleep_operand): Remove.
14299 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14300
14301 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14302
14303 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14304 flag_always_save_lp condition.
14305 * config/nds32/nds32.opt (malways-save-lp): New option.
14306
14307 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14308
14309 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14310 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14311 * config/nds32/nds32.h
14312 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14313 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14314
14315 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14316
14317 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14318 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14319
14320 2018-04-22 Shiva Chen <shiva0217@gmail.com>
14321 Chung-Ju Wu <jasonwucj@gmail.com>
14322
14323 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14324 Declare.
14325 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14326 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14327
14328 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14329
14330 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14331
14332 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14333
14334 * config/nds32/nds32-protos.h (nds32_data_alignment,
14335 nds32_local_alignment): Declare.
14336 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14337 nds32_local_alignment): New functions.
14338 (TARGET_CONSTANT_ALIGNMENT): Define.
14339 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14340
14341 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14342
14343 * config/nds32/nds32.c
14344 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14345 (TARGET_MODES_TIEABLE_P): Likewise.
14346
14347 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
14348
14349 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14350 level Ofast and Og.
14351
14352 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
14353 Chung-Ju Wu <jasonwucj@gmail.com>
14354
14355 * config/nds32/constants.md (unspec_volatile_element): Add enum values
14356 for unaligned access.
14357 * config/nds32/nds32-intrinsic.c: Implementation of expanding
14358 unaligned access.
14359 * config/nds32/nds32-intrinsic.md: Likewise.
14360 * config/nds32/nds32_intrinsic.h: Likewise.
14361 * config/nds32/nds32.h (nds32_builtins): Likewise.
14362 * config/nds32/nds32.opt (munaligned-access): New option.
14363 * config/nds32/nds32.c (nds32_asm_file_start): Display
14364 flag_unaligned_access status.
14365
14366 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14367
14368 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14369 -mno-relax is present.
14370 * config/riscv/linux.h (LINK_SPEC): Ditto.
14371
14372 2018-04-20 Martin Sebor <msebor@redhat.com>
14373
14374 PR c/85365
14375 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14376 for null pointers.
14377 (gimple_fold_builtin_stxcpy_chk): Same.
14378 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14379
14380 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
14381
14382 PR target/85456
14383 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14384 __powikf2 when long double is IEEE 128-bit.
14385
14386 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
14387
14388 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14389 step to make sure stack always aligned.
14390
14391 2018-04-20 Carl Love <cel@us.ibm.com>
14392
14393 PR target/83402
14394 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14395 size check for arg0.
14396
14397 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
14398 Tom de Vries <tom@codesourcery.com>
14399
14400 PR target/85445
14401 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14402 Emit insns for calls too.
14403 (nvptx_find_par): Always look for worker-level predecessor insn.
14404 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
14405 calls.
14406 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14407 (nvptx_process_pars): Propagate frames for calls.
14408
14409 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
14410
14411 PR target/85469
14412 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14413 Removed.
14414 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14415 (ix86_handle_option): Don't handle OPT_mibt.
14416 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14417 __SHSTK__.
14418 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14419 has_ibt and ibt.
14420 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14421 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14422 (ix86_target_macros): Define __CET__ with flag_cf_protection
14423 for -fcf-protection.
14424 * config/i386/i386.c (isa2_opts): Remove -mibt.
14425 * config/i386/i386.h (TARGET_IBT): Removed.
14426 (TARGET_IBT_P): Likewise.
14427 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14428 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14429 * config/i386/i386.opt (mcet): Update help message.
14430 (mshstk): Likewise.
14431 (mibt): Removed.
14432 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
14433 -mcet as an alias for -mshstk.
14434
14435 2018-04-20 Richard Biener <rguenther@suse.de>
14436
14437 PR middle-end/85475
14438 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14439 complexity by forcing a single use of the multiply operand.
14440
14441 2018-04-20 Martin Jambor <mjambor@suse.cz>
14442
14443 ipa/85449
14444 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14445 recursion dependency to only apply to non-clones.
14446
14447 2018-04-20 Martin Jambor <mjambor@suse.cz>
14448
14449 ipa/85447
14450 * ipa-cp.c (create_specialized_node): Check that clones of
14451 self-recursive edges exist during IPA-CP.
14452
14453 2018-04-19 Toon Moene <toon@moene.org>
14454
14455 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14456 by -O3.
14457
14458 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14459
14460 PR tree-optimization/85467
14461 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14462 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
14463 VECTOR_CST element to type.
14464
14465 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14466
14467 PR target/85397
14468 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14469 * config/i386/i386.md (builtin_setjmp_setup): Removed.
14470 (builtin_longjmp): Likewise.
14471 (save_stack_nonlocal): New pattern.
14472 (restore_stack_nonlocal): Likewise.
14473
14474 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14475
14476 PR target/85404
14477 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14478 Replace ASM_OUTPUT_LABEL with fprintf.
14479
14480 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
14481
14482 PR target/85417
14483 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14484 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14485 * config/i386/i386-c.c (ix86_target_macros_internal): Also
14486 define __IBT__ and __SHSTK__ for -fcf-protection.
14487 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14488 TARGET_IBT.
14489 (ix86_trampoline_init): Likewise.
14490 (x86_output_mi_thunk): Likewise.
14491 (ix86_notrack_prefixed_insn_p): Likewise.
14492 (ix86_option_override_internal): Don't disallow -fcf-protection.
14493 * config/i386/i386.md (rdssp<mode>): Also enable for
14494 -fcf-protection.
14495 (incssp<mode>): Likewise.
14496 (nop_endbr): Likewise.
14497 * config/i386/i386.opt (mcet): Change help message to built-in
14498 functions only.
14499 (mibt): Likewise.
14500 (mshstk): Likewise.
14501 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14502 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
14503 enable CET built-in functions.
14504
14505 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
14506
14507 * common/config/i386/i386-common.c
14508 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14509 OPTION_MASK_ISA_MOVDIRI_UNSET,
14510 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14511 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14512 * config.gcc (movdirintrin.h): New header.
14513 * config/i386/cpuid.h (bit_MOVDIRI,
14514 bit_MOVDIR64B): New bits.
14515 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14516 and -mmvodir64b.
14517 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14518 (VOID, PVOID, PCVOID)): New function types.
14519 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14520 __builtin_ia32_directstoreu_u64,
14521 __builtin_ia32_movdir64b): New builtins.
14522 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14523 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14524 and -mmovdiri.
14525 (ix86_valid_target_attribute_inner_p): Ditto.
14526 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14527 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14528 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14529 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14530 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14531 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14532 (movdiri<mode>, movdir64b_<mode>): New.
14533 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14534 * config/i386/immintrin.h: Include movdirintrin.h.
14535 * config/i386/movdirintrin.h: New file.
14536 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14537
14538 2018-04-19 Richard Biener <rguenther@suse.de>
14539
14540 PR middle-end/85455
14541 * cfg.c (clear_bb_flags): When loop state says we have
14542 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14543
14544 2018-04-19 Richard Biener <rguenther@suse.de>
14545
14546 PR tree-optimization/84737
14547 * tree-vect-data-refs.c (vect_copy_ref_info): New function
14548 copying restrict info.
14549 (vect_setup_realignment): Use it.
14550 * tree-vectorizer.h (vect_copy_ref_info): Declare.
14551 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14552 the first DR to all generated stores.
14553 (vectorizable_load): Likewise for loads.
14554
14555 2018-04-19 Jakub Jelinek <jakub@redhat.com>
14556
14557 PR tree-optimization/85446
14558 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14559 the integral and pointer types to have the same precision.
14560
14561 * doc/install.texi: Document --disable-cet being the default and
14562 --enable-cet=auto.
14563
14564 2018-04-18 Martin Liska <mliska@suse.cz>
14565
14566 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14567 style.
14568
14569 2018-04-18 Martin Liska <mliska@suse.cz>
14570
14571 Revert
14572 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
14573
14574 PR ipa/83983
14575 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14576 arguments if they are comparable.
14577
14578 2018-04-18 Martin Liska <mliska@suse.cz>
14579
14580 Revert
14581 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
14582
14583 PR lto/84805
14584 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14585 incomplete types.
14586
14587 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
14588
14589 PR target/85388
14590 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14591 ENDBR after calling __morestack.
14592
14593 2018-04-18 David Malcolm <dmalcolm@redhat.com>
14594
14595 PR jit/85384
14596 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14597 by using gcc_base_ver to generate a gcc_driver_version, and use
14598 it when generating GCC_DRIVER_NAME.
14599 * configure: Regenerate.
14600
14601 2018-04-18 Jakub Jelinek <jakub@redhat.com>
14602
14603 PR target/81084
14604 * config.gcc: Obsolete powerpc*-*-*spe*.
14605
14606 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14607
14608 PR debug/84637
14609 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14610 (stabstr_D): Change type of unum from unsigned int to
14611 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
14612 type.
14613
14614 2018-04-17 Jim Wilson <jimw@sifive.com>
14615
14616 PR 84856
14617 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14618 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14619 Set arg_pointer_offset after using pretend_args_size.
14620
14621 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14622
14623 PR rtl-optimization/85431
14624 * dse.c (record_store): Ignore zero width stores.
14625
14626 PR sanitizer/85230
14627 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
14628 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14629 __builtin_stack_restore rather than after it.
14630 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14631 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14632 argument instead of virtual_dynamic_stack_rtx.
14633
14634 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
14635
14636 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14637 New prototype.
14638 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14639 Add note to error message to explain internal mapping of overloaded
14640 built-in function name to non-overloaded built-in function name.
14641 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14642 function.
14643
14644 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14645
14646 PR target/85424
14647 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14648 where the inputs overlap with the output.
14649
14650 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14651
14652 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14653 (=v, v) alternative and explicit "memory" attribute.
14654 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
14655 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14656 attributes.
14657 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14658 "sselog1" type instead of "sselog".
14659 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14660 "sselog". Remove explicit "memory" attribute.
14661 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14662 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14663 attributes.
14664 (vec_extract_hi_v32hi): Merge all alternatives into one, use
14665 "sselog1" type instead of "sselog". Remove explicit "memory"
14666 attribute.
14667 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14668 use "sselog1" type instead of "sselog". Remove explicit "memory"
14669 attribute.
14670 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14671 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14672 attributes.
14673 (vec_extract_hi_v64qi): Merge all alternatives into one, use
14674 "sselog1" type instead of "sselog". Remove explicit "memory"
14675 attribute.
14676 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14677 use "sselog1" type instead of "sselog". Remove explicit "memory"
14678 attribute.
14679
14680 PR target/85430
14681 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14682
14683 PR middle-end/85414
14684 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14685 on a SUBREG.
14686
14687 2018-04-17 Martin Jambor <mjambor@suse.cz>
14688
14689 PR ipa/85421
14690 * ipa-cp.c (create_specialized_node): Call
14691 expand_all_artificial_thunks if necessary.
14692
14693 2018-04-17 Martin Liska <mliska@suse.cz>
14694
14695 PR lto/85405
14696 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14697 in message, remote space in between '_G' and '('.
14698
14699 2018-04-17 Jakub Jelinek <jakub@redhat.com>
14700
14701 PR target/85281
14702 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14703 avx512f_vmcmp<mode>3<round_saeonly_name>,
14704 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14705 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14706 avx512f_rndscale<mode><round_saeonly_name>,
14707 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14708 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14709 Use %<iptr>2 instead of %2 for -masm=intel.
14710 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14711 avx512f_vcvttss2usi<round_saeonly_name>,
14712 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14713 -masm=intel.
14714 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14715 avx512f_vcvttsd2usi<round_saeonly_name>,
14716 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14717 Use %q1 instead of %1 for -masm=intel.
14718 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14719 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14720 of %3 for -masm=intel.
14721 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14722 -masm=intel.
14723 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14724 -masm=intel.
14725 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14726 -masm=intel.
14727 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14728 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14729 %g1.
14730 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14731 -masm=intel.
14732 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14733 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14734 %g1 and one with %0 and %1.
14735 (avx512er_vmrcp28<mode><round_saeonly_name>,
14736 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14737 %1 for -masm=intel.
14738 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14739 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14740 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14741 of %0 and %{%4%} for -masm=intel.
14742 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14743 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14744 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14745 order of %0 and %{%5%}%{z%} for -masm=intel.
14746
14747 2018-04-17 Jan Hubicka <jh@suse.cz>
14748
14749 PR lto/85405
14750 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14751
14752 2018-04-17 Martin Liska <mliska@suse.cz>
14753
14754 PR ipa/85329
14755 * multiple_target.c (create_dispatcher_calls): Set apostrophes
14756 for target_clone error message. Make default implementation
14757 clone to be a local declaration.
14758 (separate_attrs): Add new argument and check for an empty
14759 string.
14760 (expand_target_clones): Handle it.
14761 (ipa_target_clone): Make redirection just for target_clones
14762 functions.
14763
14764 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
14765 Tom de Vries <tom@codesourcery.com>
14766
14767 PR middle-end/84955
14768 * omp-expand.c (expand_oacc_for): Add dummy false branch for
14769 tiled basic blocks without omp continue statements.
14770
14771 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
14772
14773 PR target/83660
14774 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14775 vec_extract expression as having side effects to make sure it gets
14776 a cleanup point.
14777
14778 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
14779
14780 PR target/85403
14781 * config/i386/i386.c (get_builtin_code_for_version): Check
14782 error_mark_node.
14783
14784 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
14785
14786 PR target/84331
14787 * config.gcc: Support "skylake".
14788 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14789 PROCESSOR_SKYLAKE.
14790 * config/i386/i386.c (m_SKYLAKE): Define.
14791 (processor_target_table): Add "skylake".
14792 (ix86_option_override_internal): Add "skylake".
14793 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14794 PROCESSOR_CANNONLAKE.
14795 (get_builtin_code_for_version): Fix priority for
14796 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14797 PROCESSOR_SKYLAKE-AVX512.
14798 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14799 (processor_type): Add PROCESSOR_SKYLAKE.
14800
14801 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
14802 Jason Merrill <jason@redhat.com>
14803
14804 PR c++/85112
14805 * convert.c (convert_to_integer_1): Use direct recursion for
14806 enumeral types and types with a precision less than the number
14807 of bits in their mode.
14808
14809 2018-04-16 Julia Koval <julia.koval@intel.com>
14810
14811 PR target/84413
14812 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14813 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14814
14815 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
14816
14817 PR target/85293
14818 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14819 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14820 and -mno-direct-move.
14821
14822 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
14823
14824 PR target/83402
14825 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14826 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14827 Ensure negative shifts result in {0}.
14828
14829 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
14830
14831 PR rtl-optimization/79916
14832 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14833 regs (if any) to define how to gnerate SD moves when LRA is in
14834 progress.
14835
14836 2018-04-13 Jakub Jelinek <jakub@redhat.com>
14837
14838 PR rtl-optimization/85393
14839 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14840 * except.c (expand_dw2_landing_pad_for_region): Make static.
14841 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14842 a label and unconditional jump to old_bb, rather than
14843 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14844 basic block.
14845
14846 PR rtl-optimization/85376
14847 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14848 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14849 instead of a specific value.
14850
14851 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14852 Bin Cheng <bin.cheng@arm.com>
14853
14854 PR tree-optimization/82965
14855 PR tree-optimization/83991
14856 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14857 by_profile_only parameter.
14858 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14859 information if the loop was predicted to iterate too many times.
14860 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14861
14862 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
14863
14864 PR lto/71991
14865 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14866 always inline.
14867
14868 2018-04-13 Martin Liska <mliska@suse.cz>
14869 Jakub Jelinek <jakub@redhat.com>
14870
14871 PR middle-end/81657
14872 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14873 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14874 * builtins.c (expand_builtin_memory_copy_args): Use
14875 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14876 handle dest_addr == pc_rtx.
14877
14878 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
14879
14880 PR target/85291
14881 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14882 asked to not generate direct moves.
14883 (fix_trunc<mode>si2_stfiwx): Similar.
14884 (fix_trunc<mode>si2_internal): Similar.
14885
14886 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14887
14888 PR debug/83157
14889 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14890 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14891 lookup if dest in some wider mode is known to be const0_rtx and
14892 if so, record permanent equivalence for it to be ZERO_EXTEND of
14893 the narrower mode destination.
14894
14895 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14896
14897 * lto-streamer-out.c (output_function): Revert 259346.
14898 * omp-expand.c (expand_oacc_for): Likewise.
14899
14900 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
14901
14902 PR rtl-optimization/85354
14903 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14904 * sel-sched.c (sel_global_init): ... here.
14905
14906 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
14907
14908 PR target/85238
14909 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14910 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14911 mode for PE-COFF targets.
14912 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14913 (i386_pe_asm_lto_end): Likewise.
14914 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14915 (TARGET_ASM_LTO_END): Likewise.
14916 * config/i386/winnt.c (saved_debug_info_level): New static variable.
14917 (i386_pe_asm_lto_start): New function.
14918 (i386_pe_asm_lto_end): Likewise.
14919
14920 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
14921 Richard Biener <rguenther@suse.de>
14922
14923 PR middle-end/84955
14924 * lto-streamer-out.c (output_function): Fix CFG loop state before
14925 streaming out.
14926 * omp-expand.c (expand_oacc_for): Handle calls to internal
14927 functions like regular functions.
14928
14929 2018-04-12 Richard Biener <rguenther@suse.de>
14930
14931 PR lto/85371
14932 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14933 for the early LTO debug to properly generate references to it
14934 during DIE emission. Do not re-use that for the skeleton for
14935 split-dwarf.
14936 (dwarf2out_early_finish): Likewise.
14937
14938 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14939
14940 PR target/85328
14941 * config/i386/sse.md
14942 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14943 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14944 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14945 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14946 and output is a reg, avoid creating invalid lowpart subreg, but
14947 instead split into a 512-bit move. Don't split if not AVX512VL,
14948 input is xmm16+ reg and output is a mem.
14949 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14950 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14951 xmm16+ reg and output is a mem.
14952
14953 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14954
14955 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14956 also for flag_dwarf2_cfi_asm.
14957
14958 2018-04-12 Jakub Jelinek <jakub@redhat.com>
14959
14960 PR rtl-optimization/85342
14961 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14962 a bool scalar var inside of the loop instead. Don't try to update
14963 recog_data.operand after failed apply_change_group.
14964
14965 2018-04-12 Tom de Vries <tom@codesourcery.com>
14966
14967 PR target/85296
14968 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14969 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
14970 array with flexible array member as array without given dimension.
14971 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14972 argument for undefined param to true.
14973
14974 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
14975
14976 PR target/85321
14977 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14978 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14979 from PowerPC section.
14980 * config/rs6000/sysv4.opt (mcall-): Improve help text.
14981 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14982 help text that is too long.
14983 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14984 help text that is too long.
14985 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14986 help text that is too long.
14987
14988 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
14989
14990 * config/alpha/alpha.md (stack_probe_internal): Rename
14991 from "probe_stack". Update all callers.
14992
14993 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
14994
14995 PR rtl-optimization/84566
14996 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14997 sched_macro_fuse_insns.
14998
14999 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15000
15001 PR target/84301
15002 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
15003 (compute_block_dependences): ... from here.
15004
15005 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15006
15007 PR tree-optimization/85331
15008 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
15009 from int to HOST_WIDE_INT.
15010
15011 2018-04-11 Martin Jambor <mjambor@suse.cz>
15012
15013 PR ipa/84149
15014 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
15015 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
15016 not the same as the source val.
15017 (cgraph_edge_brings_value_p): New parameter.
15018 (gather_edges_for_value): Pass destination value to
15019 cgraph_edge_brings_value_p.
15020 (perhaps_add_new_callers): Likewise.
15021 (get_info_about_necessary_edges): Likewise and exclude values brought
15022 only by self-recursive edges.
15023 (create_specialized_node): Redirect only clones of self-calling edges.
15024 (+self_recursive_pass_through_p): New function.
15025 (find_more_scalar_values_for_callers_subset): Use it.
15026 (find_aggregate_values_for_callers_subset): Likewise.
15027 (known_aggs_to_agg_replacement_list): Removed.
15028 (decide_whether_version_node): Re-calculate known constants for all
15029 remaining context clones.
15030
15031 2018-04-11 Richard Biener <rguenther@suse.de>
15032
15033 PR lto/85339
15034 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
15035 from early DWARF output.
15036 (dwarf2out_early_finish): Output line info unconditionally into
15037 early DWARF and add reference to it.
15038
15039 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15040
15041 PR target/85281
15042 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
15043 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
15044 other than V2DFmode using iptr mode attribute.
15045 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
15046
15047 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
15048
15049 PR rtl-optimization/84659
15050 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
15051
15052 2018-04-11 Jakub Jelinek <jakub@redhat.com>
15053
15054 PR debug/85302
15055 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
15056 SIZEP is NULL.
15057 (output_loc_list): Pass address of a dummy size variable even in the
15058 locview handling loop.
15059 (index_location_lists): Add comment on why skip_loc_list_entry can't
15060 call size_of_locs.
15061
15062 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
15063
15064 PR target/85261
15065 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
15066 into register.
15067
15068 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
15069
15070 PR target/85321
15071 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15072 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
15073 and -mstring-compare-inline-limit.
15074
15075 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15076
15077 PR target/85287
15078 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
15079 for stack clash protection in a register whenever we need it to be in
15080 a register.
15081
15082 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15083
15084 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
15085 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
15086
15087 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
15088
15089 PR target/85321
15090 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
15091 the help text.
15092 (mlong-double-): Ditto.
15093 * config/rs6000/sysv4.opt (msdata=): Ditto.
15094 (mtls-size=): Ditto.
15095
15096 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15097
15098 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15099 erroneous entries for
15100 "vector int vec_ldl (int, long int *)", and
15101 "vector unsigned int vec_ldl (int, unsigned long int *)".
15102 Add comments and entries for
15103 "vector bool char vec_ldl (int, bool char *)",
15104 "vector bool short vec_ldl (int, bool short *)",
15105 "vector bool int vec_ldl (int, bool int *)",
15106 "vector bool long long vec_ldl (int, bool long long *)",
15107 "vector pixel vec_ldl (int, pixel *)",
15108 "vector long long vec_ldl (int, long long *)",
15109 "vector unsigned long long vec_ldl (int, unsigned long long *)".
15110 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15111 type tree bool_long_long_type_node and correct definition of
15112 bool_V2DI_type_node to make reference to this new type tree.
15113 (rs6000_mangle_type): Replace erroneous reference to
15114 bool_long_type_node with bool_long_long_type_node.
15115 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15116 comments to emphasize sign distinctions for char and int types and
15117 replace RS6000_BTI_bool_long constant with
15118 RS6000_BTI_bool_long_long constant. Also add comment to restrict
15119 use of RS6000_BTI_pixel.
15120 (bool_long_type_node): Remove this macro definition.
15121 (bool_long_long_type_node): New macro definition
15122
15123 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15124
15125 PR rtl-optimization/85300
15126 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15127 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15128 simplify_unary_operation fails.
15129
15130 2018-04-10 Martin Liska <mliska@suse.cz>
15131
15132 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15133 cgraph_edge and ipa_ref.
15134
15135 2018-04-10 Jakub Jelinek <jakub@redhat.com>
15136
15137 PR target/85177
15138 PR target/85255
15139 * config/i386/sse.md
15140 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15141 computation of the VEC_MERGE selector from mask.
15142 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15143 Fix decoding of the VEC_MERGE selector into mask.
15144
15145 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15146
15147 PR tree-optimization/85286
15148 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15149
15150 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
15151
15152 * final.c (final_1): Set insn_last_address as well as
15153 insn_current_address.
15154
15155 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15156
15157 PR target/85173
15158 * explow.c (emit_stack_probe): Call validize_mem on memory location
15159 before passing it to gen_probe_stack. Create address operand and
15160 legitimize it for the probe_stack_address case.
15161
15162 2018-04-09 Jan Hubicka <jh@suse.cz>
15163
15164 PR lto/85078
15165 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15166 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15167 * tree.c (free_lang_data_in_type): Fix handling of binfos;
15168 walk basetypes.
15169 (free_lang_data): Rebuild type inheritance graph.
15170
15171 2018-04-09 Martin Sebor <msebor@redhat.com>
15172
15173 * invoke.texi (-finline-small-functions): Mention other optimization
15174 options.
15175 (-findirect-inlining, -fpartial-inlining): Same.
15176 (-finline-functions-called-once): Same.
15177 (-freorder-blocks-and-partition): Same.
15178
15179 2018-04-09 Jan Hubicka <jh@suse.cz>
15180
15181 PR rtl/84058
15182 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15183 jumps; choose last target that matches the criteria (i.e.
15184 no partition changes for non-crossing jumps).
15185 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15186 support for redirecting crossing jumps to non-crossing.
15187
15188 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
15189
15190 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15191 also for naked functions.
15192
15193 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
15194
15195 * config/arc/arc.md (add_shift): New pattern.
15196 (add_shift2): Likewise.
15197 (sub_shift): Likewise.
15198 (sub_shift_cmp0_noout): Likewise.
15199 (compare_si_ashiftsi): Likewise.
15200 (xbfu_cmp0_noout): New combine pattern.
15201 (xbfu_cmp0"): Likewise.
15202 (movsi_set_cc_insn): Place the predicable variant first.
15203 (commutative_binary_cmp0_noout): Remove clobber.
15204 (commutative_binary_cmp0): New pattern.
15205 (noncommutative_binary_cmp0): Likewise.
15206 (noncommutative_binary_cmp0_noout): Likewise.
15207 (noncommutative_binary_comparison_result_used): Removed.
15208 (rsub_cmp0): New pattern.
15209 (rsub_cmp0_noout): Likewise.
15210 (extzvsi): Changed, keep only meaningful variants.
15211 (SQH, SEZ): New iterators.
15212 (SQH_postfix): New mode attribute.
15213 (SEZ_prefix): New code attribute.
15214 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15215 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15216 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15217 of numerical value.
15218 (noncommutative_operator): Check the availability of barrel
15219 shifter option.
15220
15221 2018-04-09 Richard Biener <rguenther@suse.de>
15222
15223 PR tree-optimization/85284
15224 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15225 Only use the niter constraining form of simple_iv when the exit
15226 is always executed.
15227
15228 2018-04-09 Tom de Vries <tom@codesourcery.com>
15229
15230 PR target/84041
15231 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15232 (define_expand "*memory_barrier"): New define_expand.
15233 (define_insn "memory_barrier"): New insn.
15234
15235 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15236
15237 PR rtl-optimization/80463
15238 PR rtl-optimization/83972
15239 PR rtl-optimization/83480
15240
15241 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15242 correct producer for the insn.
15243 (tidy_control_flow): Fixup seqnos in case of debug insns.
15244
15245 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15246
15247 PR rtl-optimization/83913
15248
15249 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15250 different sched-times when merging exprs.
15251
15252 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15253
15254 PR rtl-optimization/83962
15255
15256 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15257 tidy_fallthru_edge and tidy_control_flow.
15258
15259 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
15260
15261 PR rtl-optimization/83530
15262
15263 * sel-sched.c (force_next_insn): New global variable.
15264 (remove_insn_for_debug): When force_next_insn is true, also leave only
15265 next insn in the ready list.
15266 (sel_sched_region): When the region wasn't scheduled, make another pass
15267 over it with force_next_insn set to 1.
15268
15269 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15270
15271 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15272 into tm_file.
15273 * config/nds32/constants.md (unspec_volatile_element): Add enum values
15274 for interrupt control.
15275 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15276 functions for interrupt control.
15277 * config/nds32/nds32-intrinsic.md: Likewise.
15278 * config/nds32/nds32_intrinsic.h: Likewise.
15279 * config/nds32/nds32.h (nds32_builtins): Likewise.
15280
15281 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15282
15283 * config/nds32/nds32.c (nds32_init_machine_status,
15284 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15285 strict_aligned_p field.
15286 (nds32_expand_to_rtl_hook): New function.
15287 (TARGET_EXPAND_TO_RTL_HOOK): Define.
15288 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15289
15290 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15291 Chung-Ju Wu <jasonwucj@gmail.com>
15292
15293 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15294 * config/nds32/nds32-n7.md: New file.
15295 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15296 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15297 pipeline.
15298 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15299 * config/nds32/nds32.md (pipeline_model): Add n7.
15300 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15301 * config/nds32/pipelines.md: Include n7 settings.
15302
15303 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15304 Chung-Ju Wu <jasonwucj@gmail.com>
15305
15306 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15307 * config/nds32/nds32-e8.md: New file.
15308 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15309 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15310 pipeline.
15311 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15312 * config/nds32/nds32.md (pipeline_model): Add e8.
15313 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15314 * config/nds32/pipelines.md: Include e8 settings.
15315
15316 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15317 Chung-Ju Wu <jasonwucj@gmail.com>
15318
15319 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15320 * config/nds32/nds32-n8.md: New file.
15321 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15322 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15323 pipeline.
15324 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15325 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15326 * config/nds32/nds32.md (pipeline_model): Add n8.
15327 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15328 * config/nds32/pipelines.md: Include n8 settings.
15329
15330 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
15331 Chung-Ju Wu <jasonwucj@gmail.com>
15332
15333 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15334 * config/nds32/nds32-n9-2r1w.md: New file.
15335 * config/nds32/nds32-n9-3r2w.md: New file.
15336 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15337 nds32_register_ports): New or modify for cpu n9.
15338 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15339 pipeline.
15340 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15341 * config/nds32/nds32-utils.c: New file.
15342 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15343 TARGET_MUL_SLOW): Define.
15344 * config/nds32/nds32.md (pipeline_model): New attribute.
15345 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15346 New options that support cpu n9.
15347 * config/nds32/pipelines.md: Include n9 settings.
15348 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15349
15350 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
15351
15352 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15353 information if necessary.
15354 (output_cond_branch_compare_zero): Likewise.
15355 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15356 (nds32_target_alignment): Refine for alignment.
15357 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15358 (FUNCTION_BOUNDARY): Modify.
15359 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15360 align case.
15361 * config/nds32/nds32.opt (malways-align, malign-functions): New.
15362
15363 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
15364
15365 * config/nds32/constants.md (unspec_volatile_element): Add values for
15366 TLB operation and data prefetch.
15367 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15368 functions for TLB operation and data prefetch.
15369 * config/nds32/nds32-intrinsic.md: Likewise.
15370 * config/nds32/nds32_intrinsic.h: Likewise.
15371 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15372 (nds32_print_operand): Likewise.
15373 * config/nds32/nds32.h (nds32_builtins): Likewise.
15374
15375 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
15376 Andrew Pinski <pinsika@gcc.gnu.org>
15377
15378 PR middle-end/82976
15379 * match.pd: Use constant_boolean_node of correct type instead of
15380 boolean_true_node or boolean_false_node for simplifying
15381 pointer comparisons to zero.
15382
15383 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15384
15385 PR tree-optimization/80021
15386 * tree.c (verify_type_variant): Make error call in verify_variant_match
15387 translatable and remove final full stop.
15388
15389 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15390
15391 * config/nds32/constants.md (unspec_volatile_element): Add
15392 UNSPEC_VOLATILE_EH_RETURN.
15393 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15394 nds32_output_stack_pop): Support dwarf exception handling process.
15395 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15396 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15397 exception handling process.
15398 (nds32_compute_stack_frame): Likewise.
15399 (nds32_return_addr_rtx): Likewise.
15400 (nds32_initial_elimination_offset): Likewise.
15401 (nds32_expand_prologue): Likewise.
15402 (nds32_expand_epilogue): Likewise.
15403 (nds32_dynamic_chain_address): New function.
15404 * config/nds32/nds32.h (machine_function): Add fields for dwarf
15405 exception handling.
15406 (DYNAMIC_CHAIN_ADDRESS): Define.
15407 (EH_RETURN_DATA_REGNO): Define.
15408 (EH_RETURN_STACKADJ_RTX): Define.
15409 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15410 patterns for dwarf exception handling.
15411
15412 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15413
15414 * config/nds32/nds32.h: Clean up obsolete macros.
15415
15416 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15417
15418 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15419 Add enum values for particular instructions.
15420 * config/nds32/nds32-intrinsic.c: Implementation of expanding
15421 particular intrinsic functions.
15422 * config/nds32/nds32-intrinsic.md: Likewise.
15423 * config/nds32/nds32_intrinsic.h: Likewise.
15424 * config/nds32/nds32.h (nds32_builtins): Likewise.
15425 * config/nds32/nds32.md (type): Add pbsad and pbsada.
15426 (btst, ave): New patterns for particular instructions.
15427
15428 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15429
15430 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15431 Add enum values for atomic load/store and memory sync.
15432 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15433 and memory sync.
15434 * config/nds32/nds32-intrinsic.md: Likewise.
15435 * config/nds32/nds32_intrinsic.h: Likewise.
15436 * config/nds32/nds32.h (nds32_builtins): Likewise.
15437
15438 2018-04-07 Jakub Jelinek <jakub@redhat.com>
15439
15440 PR tree-optimization/85257
15441 * fold-const.c (native_encode_vector): If not all elts could fit
15442 and off is -1, return 0 rather than offset.
15443 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15444 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15445 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
15446 adjust buffer in native_interpret_expr call.
15447
15448 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15449
15450 * config/nds32/constants.md (unspec_volatile_element): Add cache
15451 control enum values.
15452 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15453 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15454 * config/nds32/nds32.c (nds32_cctl_names): New.
15455 (nds32_print_operand): Handle cache control register names.
15456 * config/nds32/nds32.h (nds32_builtins): New enum values.
15457 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15458 macros.
15459 * config/nds32/nds32.md (type): Add mmu.
15460 * config/nds32/pipelines.md (simple_insn): Add mmu.
15461
15462 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15463
15464 * config/nds32/nds32.md (type): Remove call.
15465 * config/nds32/pipelines.md (simple_insn): Likewise.
15466
15467 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15468
15469 * config/nds32/constants.md (unspec_volatile_element): Add
15470 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15471 UNSPEC_VOLATILE_FMFCFG.
15472 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15473 description for fmfcfg and fmfcsr.
15474 (bdesc_1arg): Add fmtcsr.
15475 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15476 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15477 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15478 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15479 unspec_fmfcfg): New patterns.
15480 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15481 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15482 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15483 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15484 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15485 __nds32__fmfcfg): Define.
15486
15487 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
15488
15489 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15490 intrinsic register names.
15491 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15492 intrinsic register enum values and macros.
15493
15494 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
15495
15496 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15497 for load/store addressing form.
15498 (nds32_print_operand_address): Likewise.
15499
15500 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
15501
15502 PR target/85196
15503 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15504 based on LABEL_REF. Remove useless assertion.
15505 (pic_address_needs_scratch): Fix formatting.
15506 (sparc_legitimize_pic_address): Minor tweaks.
15507 (sparc_delegitimize_address): Adjust assertion accordingly.
15508 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15509 into symbolic_operand.
15510 (movsi_high_pic_label_ref): Likewise.
15511 (movsi_lo_sum_pic_label_ref): Likewise.
15512 (movdi_pic_label_ref): Likewise.
15513 (movdi_high_pic_label_ref): Likewise.
15514 (movdi_lo_sum_pic_label_ref): Likewise.
15515
15516 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
15517
15518 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15519 custom LIB_SPEC setup.
15520
15521 2018-04-06 Ruslan Bukin <br@bsdpad.com>
15522 Kito Cheng <kito.cheng@gmail.com>
15523
15524 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15525 * config/riscv/freebsd.h: New.
15526
15527 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15528
15529 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15530 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15531 file.
15532
15533 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15534 Kito Cheng <kito.cheng@gmail.com>
15535
15536 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15537 nds32_output_call, nds32_symbol_binds_local_p): New functions.
15538 * config/nds32/nds32-protos.h (nds32_output_call,
15539 nds32_output_return): Declare.
15540 * config/nds32/nds32.md: Refine all the call and return patterns.
15541
15542 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15543
15544 PR debug/85252
15545 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15546 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15547
15548 PR rtl-optimization/84872
15549 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15550 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15551 EDGE_CROSSING edge.
15552
15553 2018-04-06 Tamar Christina <tamar.christina@arm.com>
15554
15555 * expr.c (copy_blkmode_to_reg): Revert 254862.
15556 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15557
15558 2018-04-06 Richard Biener <rguenther@suse.de>
15559
15560 PR middle-end/85244
15561 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15562 after seeing a component reference with an adjacent field. Treat
15563 refs to arrays at struct end of external decls similar to
15564 refs to unconstrained commons.
15565
15566 2018-04-06 Jakub Jelinek <jakub@redhat.com>
15567
15568 PR sanitizer/85213
15569 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15570 look through SAVE_EXPRs with non-side-effects argument. Adjust
15571 recursive calls.
15572 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15573 save_p here.
15574
15575 2018-04-06 Richard Biener <rguenther@suse.de>
15576
15577 PR middle-end/85180
15578 * alias.c (find_base_term): New wrapper around find_base_term
15579 unwinding CSELIB_VAL_PTR changes.
15580 (find_base_term): Do not restore CSELIB_VAL_PTR during the
15581 recursion.
15582
15583 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15584
15585 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15586 instructions.
15587 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15588 constant definitions.
15589 ("nop"): lr 0,0 -> nopr r0
15590 ("nop_lr0", "nop_lr1"): New insn definitions.
15591
15592 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
15593
15594 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15595 NDS32_V3PUSH_AVAILABLE_P macro.
15596
15597 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
15598 Chung-Ju Wu <jasonwucj@gmail.com>
15599
15600 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15601 (nds32*-*-*): Add float and fpu_config into supported_defaults.
15602 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15603 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15604 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15605 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15606 * config/nds32/constraints.md: New constraints and checking for hard
15607 float configuration.
15608 * config/nds32/iterators.md: New mode iterator and attribute for hard
15609 float configuration.
15610 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15611 patterns.
15612 * config/nds32/nds32-fpu.md: New file.
15613 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15614 deal with hard float code generation.
15615 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15616 ARCH_V3S.
15617 (abi_type, float_reg_number): New enum type.
15618 * config/nds32/nds32-predicates.c: New predicates for hard float.
15619 * config/nds32/nds32-protos.h: Declare functions for hard float.
15620 * config/nds32/nds32.c: Implementation for hard float configuration.
15621 * config/nds32/nds32.h: Definitions for hard float configuration.
15622 * config/nds32/nds32.md: Include hard float machine description and
15623 modify patterns for hard float configuration.
15624 * config/nds32/nds32.opt: New options for hard float configuration.
15625 * config/nds32/predicates.md: New predicates for hard float
15626 configuration.
15627
15628 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15629
15630 * common/config/nds32/nds32-common.c
15631 (nds32_option_optimization_table): Enable -mreleax-hint by default.
15632
15633 2018-04-05 Jakub Jelinek <jakub@redhat.com>
15634
15635 PR middle-end/85195
15636 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15637 CONSTRUCTOR_ELT (ctor, ...)->value.
15638
15639 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
15640
15641 PR target/85193
15642 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15643
15644 2018-04-05 Tom de Vries <tom@codesourcery.com>
15645
15646 PR target/85204
15647 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15648 cond jump.
15649
15650 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15651 Kito Cheng <kito.cheng@gmail.com>
15652
15653 * config/nds32/constraints.md (U33): Fine-tune checking condition.
15654 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15655 * config/nds32/nds32.h (nds32_16bit_address_type): Add
15656 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15657
15658 2018-04-05 Shiva Chen <shiva0217@gmail.com>
15659 Kito Cheng <kito.cheng@gmail.com>
15660
15661 * config/nds32/constraints.md (Ufe): New memory constraint.
15662 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15663 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15664 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15665 operands.
15666 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15667 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15668
15669 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15670
15671 * config/nds32/nds32.md: Use optimize_size in the condition for
15672 alu-shift instructions.
15673
15674 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15675
15676 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15677
15678 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15679
15680 * config/nds32/nds32.md (negsi2): Refine pattern.
15681
15682 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15683 Chung-Ju Wu <jasonwucj@gmail.com>
15684
15685 * config/nds32/iterators.md (shift_rotate): New code iterator.
15686 (shift): New code attribute.
15687 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15688 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15689 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15690 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15691 bit-wise operations.
15692 (andsi3, *andsi3): Ditto.
15693 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15694 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15695 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15696 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15697 nds32_ior_operand, nds32_xor_operand): New predicates.
15698
15699 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15700
15701 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15702 (addsi3, subsi3): ... this.
15703
15704 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15705
15706 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15707
15708 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15709
15710 * config/nds32/nds32.md: Adjust indention.
15711
15712 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
15713
15714 * config/nds32/nds32.md (feature): New attribute.
15715
15716 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
15717
15718 * config/nds32/nds32.md (subtype): New attribute.
15719
15720 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
15721
15722 PR target/85203
15723 * config/arm/arm-builtins.c (arm_expand_builtin): Change
15724 expansion to perform a bitwise AND of the argument followed by a
15725 boolean negation of the result.
15726
15727 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
15728
15729 PR rtl-optimization/84878
15730 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15731 the basic block. Assert the use reference is not artificial and that
15732 it has an associated insn.
15733
15734 2018-04-04 Michael Matz <matz@suse.de>
15735
15736 * builtins.c (compute_objsize): Pass correct operand
15737 to array_at_struct_end_p.
15738
15739 2018-04-04 Richard Biener <rguenther@suse.de>
15740
15741 PR lto/85176
15742 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15743 from contexts for DINFO_LEVEL_TERSE and below.
15744
15745 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15746
15747 * config/nds32/nds32-doubleword.md (move_<mode>): Require
15748 resiter_operand condition.
15749 * config/nds32/nds32.md (*move<mode>): Ditto.
15750
15751 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15752 Monk Chiang <sh.chiang04@gmail.com>
15753
15754 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15755
15756 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15757
15758 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15759
15760 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15761 Kito Cheng <kito.cheng@gmail.com>
15762
15763 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15764 nds32_cond_code_str, output_cond_branch,
15765 output_cond_branch_compare_zero, nds32_expand_cbranch,
15766 nds32_expand_cstore, nds32_expand_movcc,
15767 nds32_output_cbranchsi4_equality_zero,
15768 nds32_output_cbranchsi4_equality_reg,
15769 nds32_output_cbranchsi4_equality_reg_or_const_int,
15770 nds32_output_cbranchsi4_greater_less_zero: New functions.
15771 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15772 nds32_expand_cstore, nds32_expand_movcc,
15773 nds32_output_cbranchsi4_equality_zero,
15774 nds32_output_cbranchsi4_equality_reg,
15775 nds32_output_cbranchsi4_equality_reg_or_const_int,
15776 nds32_output_cbranchsi4_greater_less_zero): Declare.
15777 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15778 nds32_rimm11s_operand): New predicates.
15779 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15780 * config/nds32/nds32.md: Rewrite all the branch and conditional move
15781 patterns.
15782
15783 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
15784
15785 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15786 * config/nds32/nds32.md: Ditto.
15787 * config/nds32/pipelines.md: Ditto.
15788
15789 2018-04-04 Richard Biener <rguenther@suse.de>
15790
15791 PR tree-optimization/85168
15792 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15793 propagating abnormals.
15794
15795 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15796
15797 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15798
15799 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
15800 Kito Cheng <kito.cheng@gmail.com>
15801
15802 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15803 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15804 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15805 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15806 * config/nds32/nds32.md (sibcall_internal): New.
15807 (sibcall_register): Remove.
15808 (sibcall_immediate): Remove.
15809 (sibcall_value_internal): New.
15810 (sibcall_value_register): Remove.
15811 (sibcall_value_immediate): Remove.
15812 * config/nds32/predicates.md (nds32_general_register_operand): New.
15813 (nds32_call_address_operand): New.
15814
15815 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15816
15817 PR rtl-optimization/85167
15818 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15819 bb_defs if *split_p, instead preinitialize it to NULL.
15820
15821 PR tree-optimization/85156
15822 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15823 evaluating the argument multiple times.
15824
15825 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
15826
15827 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15828 than vector.
15829 (_mm_cvtpd_ps): Likewise.
15830 (_mm_cvttpd_epi32): Likewise.
15831 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15832 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15833 vector, pixel, and bool following altivec.h include.
15834
15835 2018-04-03 Martin Sebor <msebor@redhat.com>
15836
15837 * doc/extend.texi (Common Function Attributes): Clarify.
15838 (const attribute): Likewise.
15839 (pure attribute): Likewise.
15840
15841 2018-04-03 Jakub Jelinek <jakub@redhat.com>
15842
15843 PR target/85169
15844 * config/i386/i386.c (ix86_expand_vector_set): Use
15845 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
15846
15847 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
15848
15849 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15850 instructions when changing rounding bits to preserve precision bits
15851 in the x87 control word.
15852
15853 2018-04-03 Martin Liska <mliska@suse.cz>
15854
15855 PR tree-optimization/82491
15856 * rtl.h (strip_offset_and_add): Replace += suboffset with
15857 poly_uint64 () + suboffset.
15858
15859 2018-03-29 Martin Liska <mliska@suse.cz>
15860 Martin Jambor <mjambor@suse.cz>
15861
15862 PR ipa/84947
15863 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15864 param_type is not an integral or pointer type.
15865
15866 2018-04-03 Richard Biener <rguenther@suse.de>
15867
15868 * sese.h (recompute_all_dominators): Remove.
15869
15870 2018-04-02 Martin Sebor <msebor@redhat.com>
15871
15872 * doc/invoke.texi (-Wrestrict): Fix typos.
15873
15874 2018-04-02 Jim Wilson <jimw@sifive.com>
15875
15876 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15877 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15878 (<optab>di3, <optab>si3_extend): Likewise.
15879 (<optab>si3_mask, <optab>si3_mask_1): New.
15880 (<optab>di3_mask, <optab>di3_mask_1): New.
15881 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15882 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15883 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15884
15885 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
15886
15887 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15888 example.
15889
15890 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
15891
15892 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15893 (nds32_canonicalize_comparison): New function.
15894
15895 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15896 Kito Cheng <kito.cheng@gmail.com>
15897 Kuan-Lin Chen <kuanlinchentw@gmail.com>
15898
15899 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15900 * config/nds32/constants.md (unspec_volatile_element): Add
15901 UNSPEC_VOLATILE_RELAX_GROUP.
15902 * config/nds32/nds32-relax-opt.c: New file.
15903 * config/nds32/nds32-predicates.c
15904 (nds32_symbol_load_store_p): New function.
15905 * config/nds32/nds32-protos.h
15906 (nds32_symbol_load_store_p): Declare function.
15907 (make_pass_nds32_relax_opt): Declare new rtl pass function.
15908 * config/nds32/nds32.c
15909 (nds32_register_pass): New function to register pass.
15910 (nds32_register_passes): New function to register passes.
15911 * config/nds32/nds32.md (relax_group): New pattern.
15912 * config/nds32/nds32.opt (mrelax-hint): New option.
15913 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15914
15915 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
15916
15917 * config/nds32/t-nds32: Modify files dependency.
15918
15919 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15920
15921 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15922 (PROFILE_HOOK): Define its implementation.
15923
15924 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
15925
15926 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15927 type and 32-bit size.
15928
15929 2018-04-01 Jakub Jelinek <jakub@redhat.com>
15930
15931 PR middle-end/85090
15932 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15933 (V_128_256): New mode iterator.
15934 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15935 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15936 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15937 of V.
15938 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15939 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15940
15941 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
15942
15943 PR target/83315
15944 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15945 NaN inputs correctly.
15946
15947 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
15948
15949 PR target/80546
15950 * config/rs6000/vsx.md (??r): New mode attribute.
15951 (*vsx_mov<mode>_64bit): Use it.
15952 (*vsx_mov<mode>_32bit): Likewise.
15953
15954 2018-03-30 Martin Sebor <msebor@redhat.com>
15955
15956 PR tree-optimization/84818
15957 * builtins.c (check_access): Use warning_n.
15958
15959 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15960
15961 PR target/83822
15962 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15963 condition.
15964 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15965 condition.
15966
15967 2018-03-30 Julia Koval <julia.koval@intel.com>
15968
15969 PR target/84413
15970 * x86-tune.def (movx, partial_reg_dependency): Enable for
15971 m_SKYLAKE_AVX512.
15972
15973 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
15974
15975 PR inline-asm/84985
15976 * lra-constraints.c (process_alt_operands): Move setting
15977 this_alternative_matches below.
15978
15979 2018-03-29 Martin Liska <mliska@suse.cz>
15980
15981 PR lto/84995.
15982 * doc/invoke.texi: Document how LTO works with debug info.
15983 Describe auto-load support of binutils. Mention 'x86-64'
15984 as valid option value of -march option.
15985
15986 2018-03-29 Jakub Jelinek <jakub@redhat.com>
15987
15988 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15989
15990 PR c/85094
15991 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15992 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15993 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15994 checking.
15995
15996 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
15997
15998 PR target/84912
15999 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
16000 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
16001 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
16002 for RS6000_BTM_POWERPC64.
16003 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
16004 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
16005 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
16006 definition.
16007 (DIVDE): Use it.
16008 (DIVDEU): Likewise.
16009
16010 2018-03-28 Carl Love <cel@us.ibm.com>
16011
16012 Revert
16013 2017-09-27 Carl Love <cel@us.ibm.com>
16014
16015 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
16016 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
16017 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
16018 fctiw instruction.
16019
16020 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16021
16022 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
16023 instead of __vector bool.
16024 (_mm_max_pu8): Likewise.
16025 (_mm_min_pi16): Likewise.
16026
16027 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
16028
16029 PR target/84912
16030 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
16031 (DIVWEUO): Likewise.
16032 (DIVDEO): Likewise.
16033 (DIVDEUO): Likewise.
16034 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
16035 DIVWEUO and DIVDEUO.
16036 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
16037 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
16038 (div_extend): Likewise.
16039 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
16040 builtin function.
16041 (__builtin_divweuo): Likewise.
16042 (__builtin_divdeo): Likewise.
16043 (__builtin_divdeuo): Likewise.
16044
16045 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16046
16047 PR target/85095
16048 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
16049 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
16050
16051 PR tree-optimization/82004
16052 * gimple-match-head.c (optimize_pow_to_exp): New function.
16053 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
16054 Don't fold to exp if optimize_pow_to_exp is false.
16055
16056 2018-03-28 Martin Liska <mliska@suse.cz>
16057
16058 PR other/84819
16059 * calls.c (initialize_argument_information): Fix trailing space.
16060 * common.opt: Fix typo and provide better explanation for
16061 -fsanitize-coverage option.
16062 * config/i386/i386.opt: Fix typo.
16063
16064 2018-03-28 Jakub Jelinek <jakub@redhat.com>
16065 Martin Liska <mliska@suse.cz>
16066
16067 PR sanitizer/85081
16068 * gimplify.c (asan_poison_variable): Don't do the check for
16069 gimplify_omp_ctxp here.
16070 (gimplify_decl_expr): Do it here.
16071 (gimplify_target_expr): Likewise.
16072
16073 2018-03-28 Martin Liska <mliska@suse.cz>
16074
16075 PR target/84988
16076 * config/i386/i386.c (ix86_function_arg_advance): Do not call
16077 chkp_type_bounds_count if MPX is not enabled.
16078
16079 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
16080
16081 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
16082
16083 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
16084
16085 PR target/84914
16086 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
16087 function to create the function decl for complex long double
16088 multiply and divide for -mabi=ieeelongdouble.
16089 (init_float128_ieee): Call it.
16090
16091 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
16092
16093 PR target/85044
16094 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16095 -fcf-protection=branch -mibt.
16096 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16097
16098 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16099
16100 PR target/81863
16101 * config/arm/arm.c (arm_valid_symbolic_address): Handle
16102 arm_word_relocations.
16103
16104 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
16105
16106 PR target/85056
16107 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16108 extern array declarations.
16109
16110 2018-03-27 Richard Biener <rguenther@suse.de>
16111
16112 PR middle-end/84067
16113 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16114 explicit single_use checks.
16115
16116 2018-03-27 Richard Biener <rguenther@suse.de>
16117
16118 PR tree-optimization/85082
16119 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16120 Valueize the VUSE.
16121
16122 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16123
16124 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16125 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16126 Turn on fasynchronous-unwind-tables and funwind-tables.
16127
16128 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
16129
16130 PR target/85073
16131 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16132 (*bmi_blsr_<mode>_ccz): Ditto.
16133
16134 2018-03-26 Tom de Vries <tom@codesourcery.com>
16135
16136 PR tree-optimization/85063
16137 * omp-general.c (offloading_function_p): New function. Factor out
16138 of ...
16139 * omp-offload.c (pass_omp_target_link::gate): ... here.
16140 * omp-general.h (offloading_function_p): Declare.
16141 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16142 with attribute omp declare target for offloading functions.
16143
16144 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
16145
16146 PR tree-optimization/84005
16147 * tree-data-ref.h (get_base_for_alignment): Declare.
16148 * tree-data-ref.c (get_base_for_alignment_1): New function.
16149 (get_base_for_alignment): Likewise.
16150 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16151 get_base_for_alignment to find a suitable base object, instead
16152 of always using drb->base_address.
16153
16154 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16155
16156 PR inline-asm/85022
16157 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16158 known size by default.
16159
16160 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
16161
16162 PR inline-asm/85030
16163 * lra-constraints.c (process_alt_operands): Don't match BLKmode
16164 and non BLKmode operands.
16165
16166 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16167
16168 PR target/85026
16169 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16170 Clean up attributes.
16171
16172 2018-03-23 Richard Biener <rguenther@suse.de>
16173
16174 PR debug/85020
16175 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16176 we are going to emit early debug for LTO.
16177
16178 2018-03-23 Jakub Jelinek <jakub@redhat.com>
16179
16180 PR inline-asm/85034
16181 * function.c (match_asm_constraints_1): Don't optimize if input
16182 doesn't satisfy general_operand predicate for output's mode.
16183
16184 PR inline-asm/85022
16185 * alias.c (write_dependence_p): Don't require for x_canonicalized
16186 non-VOIDmode if x has VOIDmode.
16187
16188 PR sanitizer/85029
16189 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16190 just don't try to optimize it rather than assert it never happens.
16191
16192 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16193
16194 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16195 macro expansions for definition of ST_INTERNAL_<mode> and
16196 LD_INTERNAL_<mode> builtins.
16197 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16198 Remove prototype.
16199 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16200 function.
16201 (altivec_expand_st_builtin): Likewise.
16202 (altivec_expand_builtin): Remove calls to deleted functions.
16203 (rs6000_address_for_altivec): Delete this function.
16204 * config/rs6000/vector.md: Remove expands for
16205 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16206
16207 2018-03-22 Sudakshina Das <sudi.das@arm.com>
16208
16209 PR target/84826
16210 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16211 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16212 re-computing once computed.
16213 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16214 (arm_init_machine_status): Initialize
16215 machine->static_chain_stack_bytes.
16216
16217 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16218
16219 PR target/84760
16220 * doc/extend.texi: Add four new prototypes for vec_ld.
16221 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16222 definitions for more logical presentation.
16223 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16224 entries for V1TI variants of __builtin_altivec_ld builtin.
16225 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16226 handling of V1TI variant of LVX icode pattern.
16227 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16228 (rs6000_gimple_fold_builtin): Likewise.
16229 (altivec_init_builtins): Add code to define
16230 __builtin_altivec_lvx_v1ti function.
16231
16232 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16233
16234 PR inline-asm/84941
16235 * function.c (match_asm_constraints_1): Don't do the optimization
16236 if input isn't a REG, SUBREG, MEM or constant.
16237
16238 2018-03-22 Tom de Vries <tom@codesourcery.com>
16239
16240 PR tree-optimization/84956
16241 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16242 bb_has_abnormal_pred.
16243
16244 2018-03-22 Jakub Jelinek <jakub@redhat.com>
16245
16246 PR sanitizer/85018
16247 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16248 DECL_INITIAL (decl) to decl at the end.
16249 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16250 adjust the comment.
16251
16252 2018-03-21 Joseph Myers <joseph@codesourcery.com>
16253
16254 * doc/extend.texi (__builtin_tgmath): Document when complex
16255 integer types are treated as _Complex _Float64.
16256
16257 2018-03-21 Tom de Vries <tom@codesourcery.com>
16258
16259 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16260
16261 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16262
16263 PR tree-optimization/84960
16264 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16265 if it is ENTRY block, move them into single succ of ENTRY in that case.
16266
16267 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
16268
16269 PR tree-optimization/84811
16270 * poly-int.h (poly_span_traits): Remove the T3 parameter and
16271 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16272 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16273 (known_subrange_p): Update accordingly. Cast each value involved
16274 in the size comparison, rather than casting the result of the
16275 subtraction.
16276
16277 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16278
16279 PR tree-optimization/84982
16280 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16281 by flipping the least significant bit rather than all bits from
16282 bitpos to bitpos + bitsize - 1.
16283
16284 2018-03-21 Nathan Sidwell <nathan@acm.org>
16285
16286 * doc/extend.texi (Deprecated Features): Remove mention of
16287 long-deleted deprecations.
16288
16289 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16290
16291 PR jit/84288
16292 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16293 * configure: Regenerate.
16294
16295 2018-03-21 Tom de Vries <tom@codesourcery.com>
16296
16297 PR tree-optimization/83126
16298 * tree-parloops.c (num_phis): New function.
16299 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16300
16301 2018-03-21 Nathan Sidwell <nathan@acm.org>
16302
16303 * doc/extend.texi (Deprecated Features): Update deprecated flags,
16304 mention anon-struct/union members and trailing attributes.
16305
16306 2018-03-21 Bin Cheng <bin.cheng@arm.com>
16307
16308 PR tree-optimization/84969
16309 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16310 builtin memset partitions if they set different rhs values.
16311
16312 2018-03-21 Jakub Jelinek <jakub@redhat.com>
16313
16314 PR rtl-optimization/84989
16315 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16316 VEC_DUPLICATE with scalar result mode.
16317
16318 2018-03-21 Martin Liska <mliska@suse.cz>
16319
16320 PR ipa/84963
16321 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16322 not intended return statement.
16323
16324 2018-03-21 Martin Liska <mliska@suse.cz>
16325
16326 PR target/84988
16327 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16328 (chkp_find_bound_slots_1): Limit number of iterations.
16329
16330 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
16331
16332 PR target/84838
16333 * Minor grammar fixes for x86 options.
16334
16335 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16336
16337 PR debug/84875
16338 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16339 holding REG_CFA_RESTORE notes, instead turn them into a USE.
16340
16341 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
16342
16343 PR target/83789
16344 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16345 (altivec_lvx_<mode>_1op): Likewise.
16346 (altivec_stvx_<mode>_2op): Likewise.
16347 (altivec_stvx_<mode>_1op): Likewise.
16348 (altivec_lvx_<VM2:mode>): New define_expand.
16349 (altivec_stvx_<VM2:mode>): Likewise.
16350 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16351 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16352 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16353 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16354 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16355 (rs6000_gen_lvx): Likewise.
16356 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16357 (altivec_expand_stv_builtin): Likewise.
16358 (altivec_expand_builtin): Likewise.
16359 * config/rs6000/vector.md: Likewise.
16360
16361 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16362
16363 PR target/82518
16364 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16365 BYTES_BIG_ENDIAN.
16366
16367 2018-03-20 Richard Biener <rguenther@suse.de>
16368
16369 PR target/84986
16370 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16371 sign-conversions as zero, fall back to standard scalar_stmt
16372 cost for the rest.
16373
16374 2018-03-20 Martin Liska <mliska@suse.cz>
16375
16376 PR ipa/84825
16377 * predict.c (rebuild_frequencies): Handle case when we have
16378 PROFILE_ABSENT, but flag_guess_branch_prob is false.
16379
16380 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16381
16382 PR target/84990
16383 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16384 flag_section_anchors.
16385 * varasm.c (use_blocks_for_decl_p): Remove hack for
16386 dw2_force_const_mem.
16387
16388 PR target/84845
16389 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16390 to ...
16391 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
16392 be created, use lowpart_subreg of operands[0] rather than operands[0]
16393 itself.
16394 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16395 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16396 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16397 and n constraint instead of aarch64_shift_imm_di and Usd.
16398 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16399 (*aarch64_<optab>_reg_minus<mode>3): ... this.
16400
16401 2018-03-20 Sudakshina Das <sudi.das@arm.com>
16402
16403 PR target/82989
16404 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16405 to favor GPR over NEON registers.
16406 (<shift>di3_neon): Likewise.
16407
16408 2018-03-20 Tom de Vries <tom@codesourcery.com>
16409
16410 PR target/84952
16411 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16412 (nvptx_process_pars): Emit bar.sync asap and alap.
16413
16414 2018-03-20 Tom de Vries <tom@codesourcery.com>
16415
16416 PR target/84954
16417 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16418 seen_label if seen_label is already set.
16419
16420 2018-03-20 Jakub Jelinek <jakub@redhat.com>
16421
16422 PR target/84945
16423 * config/i386/i386.c (fold_builtin_cpu): For features above 31
16424 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16425 Use 1U instead of 1. Formatting fixes.
16426
16427 PR c/84953
16428 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16429 instead of TREE_TYPE (s1) for the return value.
16430
16431 2018-03-19 Jakub Jelinek <jakub@redhat.com>
16432
16433 PR tree-optimization/84946
16434 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16435 bitsize + bitsize in poly_uint64 rather than poly_int64.
16436
16437 PR sanitizer/78651
16438 * dwarf2asm.c: Include fold-const.c.
16439 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16440 of decl rather than decl itself.
16441
16442 PR rtl-optimization/84643
16443 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16444
16445 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
16446
16447 PR sanitizer/78651
16448 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16449 calling assemble_variable.
16450
16451 2018-03-19 Sudakshina Das <sudi.das@arm.com>
16452
16453 PR target/81647
16454 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16455 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16456
16457 2018-03-19 Jim Wilson <jimw@sifive.com>
16458
16459 PR bootstrap/84856
16460 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16461 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16462 (riscv_first_stack_step): Likewise.
16463 (riscv_option_override): Use STACK_BOUNDARY instead of
16464 MIN_STACK_BOUNDARY.
16465 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16466 MIN_STACK_BOUNDARY.
16467 (BIGGEST_ALIGNMENT): Set to 128.
16468 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16469 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16470 STACK_BOUNDARY.
16471
16472 2018-03-19 Richard Biener <rguenther@suse.de>
16473
16474 PR tree-optimization/84933
16475 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16476 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16477
16478 2018-03-19 Richard Biener <rguenther@suse.de>
16479
16480 PR tree-optimization/84859
16481 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16482 (cond_if_else_store_replacement): Perform sinking operation on
16483 single-store BBs regardless of MAX_STORES_TO_SINK setting.
16484 Generalize what a BB with a single eligible store is.
16485
16486 2018-03-19 Richard Biener <rguenther@suse.de>
16487
16488 PR tree-optimization/84929
16489 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16490 chrec_is_positive against non-chrec arg.
16491
16492 2018-03-19 Tamar Christina <tamar.christina@arm.com>
16493
16494 PR target/84711
16495 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16496
16497 2018-03-18 Martin Liska <mliska@suse.cz>
16498
16499 PR rtl-optimization/84635
16500 * regrename.c (build_def_use): Use matches_mode only when
16501 matches >= 0.
16502
16503 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
16504
16505 PR tree-optimization/84913
16506 * tree-vect-loop.c (vectorizable_reduction): Don't try to
16507 vectorize chains of COND_EXPRs.
16508
16509 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16510
16511 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16512
16513 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16514
16515 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16516
16517 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
16518
16519 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16520
16521 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16522 Kito Cheng <kito.cheng@gmail.com>
16523
16524 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16525 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16526 (nds32_adjust_reg_alloc_order): New function.
16527 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16528
16529 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
16530
16531 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16532 nds32_print_operand, nds32_print_operand_address): Use
16533 HOST_WIDE_INT_PRINT_DEC instead.
16534
16535 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
16536
16537 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16538
16539 2018-03-17 Jakub Jelinek <jakub@redhat.com>
16540
16541 PR target/84902
16542 * config/i386/i386.c (initial_ix86_tune_features,
16543 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16544 unsigned long long.
16545 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16546 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16547 rather than 1u << ix86_tune. Formatting fix.
16548 (ix86_option_override_internal): Change ix86_arch_mask from
16549 unsigned int to unsigned HOST_WIDE_INT, initialize to
16550 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16551 (ix86_function_specific_restore): Likewise.
16552
16553 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16554
16555 PR target/84899
16556 * postreload.c (reload_combine_recognize_pattern): Perform
16557 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16558 truncate_int_for_mode the result for the destination's mode.
16559
16560 PR c/84909
16561 * hsa-gen.c (mem_type_for_type): Fix comment typo.
16562 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16563 Likewise.
16564 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16565 Likewise.
16566
16567 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
16568
16569 PR target/84876
16570 * lra-assigns.c (lra_split_hard_reg_for): Don't use
16571 regno_allocno_class_array and sorted_pseudos.
16572 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16573 insns where regno is used.
16574
16575 2018-03-16 Martin Liska <mliska@suse.cz>
16576
16577 PR ipa/84833
16578 * multiple_target.c (create_dispatcher_calls): Redirect
16579 reference in the symbol table.
16580
16581 2018-03-16 Martin Liska <mliska@suse.cz>
16582
16583 PR ipa/84722
16584 * multiple_target.c (create_dispatcher_calls): Redirect also
16585 an alias.
16586
16587 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16588
16589 PR c++/79937
16590 PR c++/82410
16591 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16592 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16593 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16594
16595 2018-03-16 Julia Koval <julia.koval@intel.com>
16596
16597 * doc/invoke.texi (Skylake Server): Add CLWB.
16598 Cannonlake): Remove CLWB.
16599
16600 2018-03-16 Jakub Jelinek <jakub@redhat.com>
16601
16602 PR tree-optimization/84841
16603 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16604 1 << 3.
16605 (FLOAT_ONE_CONST_TYPE): Define.
16606 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16607 (sort_by_operand_rank): Put entries with higher constant_type last
16608 rather than first to match comments.
16609
16610 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
16611
16612 * config/nios2/nios2.md (movsi_internal): Fix thinko in
16613 split predicate.
16614
16615 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16616
16617 PR c++/79085
16618 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16619 check and use address of target always.
16620
16621 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
16622
16623 PR target/84574
16624 * config/i386/i386.c (indirect_thunk_needed): Update comments.
16625 (indirect_thunk_bnd_needed): Likewise.
16626 (indirect_thunks_used): Likewise.
16627 (indirect_thunks_bnd_used): Likewise.
16628 (indirect_return_needed): New.
16629 (indirect_return_bnd_needed): Likewise.
16630 (output_indirect_thunk_function): Add a bool argument for
16631 function return.
16632 (output_indirect_thunk_function): Don't generate alias for
16633 function return thunk.
16634 (ix86_code_end): Call output_indirect_thunk_function to generate
16635 function return thunks.
16636 (ix86_output_function_return): Set indirect_return_bnd_needed
16637 and indirect_return_needed instead of indirect_thunk_bnd_needed
16638 and indirect_thunk_needed.
16639
16640 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
16641
16642 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16643 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16644 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16645
16646 2018-03-15 David Malcolm <dmalcolm@redhat.com>
16647 Paul Hua <paul.hua.gm@gmail.com>
16648
16649 PR c/84852
16650 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16651
16652 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
16653
16654 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16655 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16656 resp. SFmode cases.
16657
16658 2018-03-15 Tamar Christina <tamar.christina@arm.com>
16659
16660 PR target/84711
16661 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16662 instead of GET_MODE_SIZE when comparing Units.
16663
16664 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16665
16666 PR target/68256
16667 * varasm.c (hash_section): Return an unchangeble hash value
16668 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16669 Return !aarch64_can_use_per_function_literal_pools_p ().
16670
16671 2018-03-15 Jakub Jelinek <jakub@redhat.com>
16672
16673 PR target/84860
16674 * optabs.c (emit_conditional_move): Pass address of cmode's copy
16675 rather than address of cmode as last argument to prepare_cmp_insn.
16676
16677 2018-03-15 Julia Koval <julia.koval@intel.com>
16678
16679 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16680 F_AVX512VNNI, F_AVX512BITALG): New.
16681
16682 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
16683
16684 PR target/83451
16685 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
16686 insn for floating-point loads and stores.
16687
16688 2018-03-14 Carl Love <cel@us.ibm.com>
16689
16690 * config/rs6000/rs6000-c.c: Add macro definitions for
16691 ALTIVEC_BUILTIN_VEC_PERMXOR.
16692 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16693 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16694 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16695 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16696 UNSPEC_VPERMXOR.
16697 * config/doc/extend.texi: Add prototypes for vec_permxor.
16698
16699 2018-03-14 David Malcolm <dmalcolm@redhat.com>
16700
16701 PR c/84852
16702 * diagnostic-show-locus.c (class layout_point): Convert m_line
16703 from int to linenum_type.
16704 (line_span::comparator): Use linenum "compare" function when
16705 comparing line numbers.
16706 (test_line_span): New function.
16707 (layout_range::contains_point): Convert param "row" from int to
16708 linenum_type.
16709 (layout_range::intersects_line_p): Likewise.
16710 (layout::will_show_line_p): Likewise.
16711 (layout::print_source_line): Likewise.
16712 (layout::should_print_annotation_line_p): Likewise.
16713 (layout::print_annotation_line): Likewise.
16714 (layout::print_leading_fixits): Likewise.
16715 (layout::annotation_line_showed_range_p): Likewise.
16716 (struct line_corrections): Likewise for field m_row.
16717 (line_corrections::line_corrections): Likewise for param "row".
16718 (layout::print_trailing_fixits): Likewise.
16719 (layout::get_state_at_point): Likewise.
16720 (layout::get_x_bound_for_row): Likewise.
16721 (layout::print_line): Likewise.
16722 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16723 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16724 * input.c (selftest::test_linenum_comparisons): New function.
16725 (selftest::input_c_tests): Call it.
16726 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16727 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16728 * selftest.h (ASSERT_GT): New macro.
16729 (ASSERT_GT_AT): New macro.
16730 (ASSERT_LT): New macro.
16731 (ASSERT_LT_AT): New macro.
16732
16733 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
16734
16735 PR rtl-optimization/84780
16736 * combine.c (distribute_links): Don't make a link based on pc_rtx.
16737
16738 2018-03-14 Martin Liska <mliska@suse.cz>
16739
16740 * tree.c (record_node_allocation_statistics): Use
16741 get_stats_node_kind.
16742 (get_stats_node_kind): New function extracted from
16743 record_node_allocation_statistics.
16744 (free_node): Use get_stats_node_kind.
16745
16746 2018-03-14 Richard Biener <rguenther@suse.de>
16747
16748 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16749 that the value-set of ANTIC_IN doesn't grow.
16750
16751 Revert
16752 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16753 member.
16754 (BB_VISITED_WITH_VISITED_SUCCS): New define.
16755 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16756
16757 2018-03-14 Julia Koval <julia.koval@intel.com>
16758
16759 * config.gcc (icelake-client, icelake-server): New.
16760 (icelake): Remove.
16761 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16762 (initial_ix86_arch_features): Ditto.
16763 (PTA_SKYLAKE): Add SGX.
16764 (PTA_ICELAKE): Remove.
16765 (PTA_ICELAKE_CLIENT): New.
16766 (PTA_ICELAKE_SERVER): New.
16767 (ix86_option_override_internal): Split up icelake on icelake client and
16768 icelake server.
16769 (get_builtin_code_for_version): Ditto.
16770 (fold_builtin_cpu): Ditto.
16771 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16772 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16773 * config/i386/i386.h (processor_type): Ditto.
16774 * doc/invoke.texi: Ditto.
16775
16776 2018-03-14 Jakub Jelinek <jakub@redhat.com>
16777
16778 PR sanitizer/83392
16779 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16780 INTEGER_CST offset, add it together with bitpos / 8 and
16781 sign extend based on POINTER_SIZE.
16782
16783 PR target/84844
16784 Revert
16785 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
16786
16787 PR target/78090
16788 * config/i386/constraints.md (Yc): New register constraint.
16789 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16790 Use Yc constraint for alternative 2 of operand 0. Remove
16791 preferred_for_speed attribute.
16792
16793 2018-03-14 Richard Biener <rguenther@suse.de>
16794
16795 PR tree-optimization/84830
16796 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16797 with the old one to avoid oscillations.
16798
16799 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
16800
16801 PR target/83712
16802 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16803 pseudos.
16804 (assign_by_spills): Return a flag of reload assignment failure.
16805 Do not process the reload assignment failures. Do not spill other
16806 reload pseudos if they has the same reg class. Update n if
16807 necessary.
16808 (lra_assign): Add a return arg. Set up from the result of
16809 assign_by_spills call.
16810 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16811 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
16812 usage_insns if it is not NULL.
16813 (spill_hard_reg_in_range): New function.
16814 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16815 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16816 function prototypes.
16817 (lra_assign): Change prototype.
16818 * lra.c (lra): Add code to deal with fails by splitting hard reg
16819 live ranges.
16820
16821 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
16822
16823 * config/riscv/riscv.opt (mrelax): New option.
16824 * config/riscv/riscv.c (riscv_file_start): Emit ".option
16825 "norelax" when riscv_mrelax is disabled.
16826 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16827
16828 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16829
16830 PR target/84743
16831 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16832 reassociation for int modes.
16833
16834 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16835
16836 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16837 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16838 for big-endian.
16839 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16840 * config/aarch64/aarch64-sve.md
16841 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16842 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16843 (*extend<mode><Vwide>2): Rename to...
16844 (aarch64_sve_extend<mode><Vwide>2): ...this.
16845 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16846 renaming the old pattern to...
16847 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
16848 unsigned packs.
16849 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16850 define_expand, renaming the old pattern to...
16851 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16852 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16853 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16854 account when deciding which SVE instruction the optab should use.
16855 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16856
16857 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16858
16859 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16860 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16861 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16862 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16863 (tlsdesc_small_<mode>): Turn a define_expand and use
16864 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
16865 (tlsdesc_small_advsimd_<mode>): ...this.
16866 (tlsdesc_small_sve_<mode>): New pattern.
16867
16868 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
16869
16870 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16871 (UNSPEC_UMUL_HIGHPART): New constants.
16872 (MUL_HIGHPART): New int iteraor.
16873 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16874 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16875 define_expand.
16876 (*<su>mul<mode>3_highpart): New define_insn.
16877
16878 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16879
16880 PR lto/84805
16881 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16882 incomplete types.
16883
16884 2018-03-13 Martin Liska <mliska@suse.cz>
16885
16886 PR ipa/84658.
16887 * (sem_item_optimizer::sem_item_optimizer): Initialize new
16888 vector.
16889 (sem_item_optimizer::~sem_item_optimizer): Release it.
16890 (sem_item_optimizer::merge_classes): Register variable aliases.
16891 (sem_item_optimizer::fixup_pt_set): New function.
16892 (sem_item_optimizer::fixup_points_to_sets): Likewise.
16893 * ipa-icf.h: Declare new variables and functions.
16894
16895 2018-03-13 Jakub Jelinek <jakub@redhat.com>
16896
16897 PR middle-end/84834
16898 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16899 integer_pow2p@2 and test integer_pow2p in condition.
16900 (A < 0 ? C : 0): Similarly for @1.
16901
16902 PR middle-end/84831
16903 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16904 characters starting at p contain '\0' character, don't look beyond
16905 that.
16906
16907 PR target/84827
16908 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16909 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16910
16911 PR target/84828
16912 * reg-stack.c (change_stack): Change update_end var from int to
16913 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16914 also call set_block_for_insn on the newly added insns and rescan.
16915
16916 PR target/84786
16917 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16918 on the last operand.
16919
16920 PR c++/84704
16921 * tree.c (stabilize_reference_1): Return save_expr (e) for
16922 STATEMENT_LIST even if it doesn't have side-effects.
16923
16924 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
16925
16926 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16927
16928 2018-03-12 Renlin Li <renlin.li@arm.com>
16929
16930 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16931 aarch64_output_scalar_simd_mov_immediate.
16932
16933 2018-03-12 Martin Sebor <msebor@redhat.com>
16934
16935 PR tree-optimization/83456
16936 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16937 for perfectly overlapping calls to memcpy.
16938 (gimple_fold_builtin_memory_chk): Same.
16939 (gimple_fold_builtin_strcpy): Handle no-warning.
16940 (gimple_fold_builtin_stxcpy_chk): Same.
16941 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16942
16943 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16944
16945 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16946 parameter. Use it for SFmode.
16947 (rs6000_function_arg_advance_1): Adjust.
16948 (rs6000_function_arg): Adjust.
16949 (rs6000_gimplify_va_arg): Pass false for that new parameter.
16950
16951 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
16952
16953 PR rtl-optimization/84169
16954 PR rtl-optimization/84780
16955 * combine.c (can_combine_p): Check for a 2-insn combination whether
16956 the destination register is used between the two insns, too.
16957
16958 2018-03-12 Richard Biener <rguenther@suse.de>
16959
16960 PR tree-optimization/84803
16961 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16962 for refs DR analysis didn't process.
16963
16964 2018-03-12 Richard Biener <rguenther@suse.de>
16965
16966 PR tree-optimization/84777
16967 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16968 force-vectorize loops ignore whether we are optimizing for size.
16969
16970 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
16971
16972 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16973 (TARGET_MD_ASM_ADJUST): Define.
16974
16975 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
16976 Kito Cheng <kito.cheng@gmail.com>
16977 Chung-Ju Wu <jasonwucj@gmail.com>
16978
16979 * config/nds32/nds32.c (nds32_compute_stack_frame,
16980 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16981 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16982 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16983 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16984 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16985 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16986 * config/nds32/nds32.md (prologue, epilogue): Use macro
16987 NDS32_V3PUSH_AVAILABLE_P to do checking.
16988
16989 2018-03-11 Jakub Jelinek <jakub@redhat.com>
16990
16991 PR debug/58150
16992 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16993 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16994 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
16995 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
16996 addition of most attributes on !orig_type_die or the attribute not
16997 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16998
16999 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17000 Chung-Ju Wu <jasonwucj@gmail.com>
17001
17002 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
17003 __NDS32_VH__ macro.
17004 * config/nds32/nds32.opt (mvh): New option.
17005
17006 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17007 Chung-Ju Wu <jasonwucj@gmail.com>
17008
17009 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
17010 function.
17011 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
17012 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
17013 definition.
17014
17015 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
17016 Chung-Ju Wu <jasonwucj@gmail.com>
17017
17018 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
17019 function.
17020 * config/nds32/nds32-multiple.md (strlensi): New pattern.
17021 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
17022
17023 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
17024 Kito Cheng <kito.cheng@gmail.com>
17025 Chung-Ju Wu <jasonwucj@gmail.com>
17026
17027 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
17028 UNSPEC_FFMISM and UNSPEC_FLMISM.
17029 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
17030 for ffb, ffmism and flmism.
17031 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
17032 (unspec_ffmism): Ditto.
17033 (unspec_flmism): Ditto.
17034 (nds32_expand_builtin_impl): Check if string extension is available.
17035 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
17036 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
17037
17038 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
17039
17040 Reverting patch:
17041 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17042
17043 PR target/83712
17044 * lra-assigns.c (assign_by_spills): Return a flag of reload
17045 assignment failure. Do not process the reload assignment
17046 failures. Do not spill other reload pseudos if they has the same
17047 reg class.
17048 (lra_assign): Add a return arg. Set up from the result of
17049 assign_by_spills call.
17050 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17051 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17052 usage_insns if it is not NULL.
17053 (spill_hard_reg_in_range): New function.
17054 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17055 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17056 function prototypes.
17057 (lra_assign): Change prototype.
17058 * lra.c (lra): Add code to deal with fails by splitting hard reg
17059 live ranges.
17060
17061 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
17062
17063 PR target/84807
17064 * config/i386/i386.opt: Replace Enforcment with Enforcement.
17065
17066 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
17067
17068 PR debug/84620
17069 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
17070 (dw_val_node): Add val_symbolic_view.
17071 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
17072 (symview_upper_bound): New.
17073 (new_line_info_table): Initialize symviews_since_reset.
17074 (dwarf2out_source_line): Count symviews_since_reset and set
17075 symview_upper_bound.
17076 (dw_val_equal_p): Handle symview.
17077 (add_AT_symview): New.
17078 (print_dw_val): Handle symview.
17079 (attr_checksum, attr_checksum_ordered): Likewise.
17080 (same_dw_val_p, size_of_die): Likewise.
17081 (value_format, output_die): Likewise.
17082 (add_high_low_attributes): Use add_AT_symview for entry_view.
17083 (dwarf2out_finish): Reset symview_upper_bound, clear
17084 zero_view_p.
17085
17086 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
17087
17088 PR target/83969
17089 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
17090 Add strict argument and use it.
17091 (rs6000_split_multireg_move): Update for new strict argument.
17092 (mem_operand_gpr): Disallow all non-offsettable addresses.
17093 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17094
17095 2018-03-09 Jakub Jelinek <jakub@redhat.com>
17096
17097 PR target/84772
17098 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17099 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17100 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17101
17102 PR c++/84767
17103 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17104 decl, use remap_type if we want to use the type.
17105
17106 2018-03-09 Martin Sebor <msebor@redhat.com>
17107
17108 PR tree-optimization/84526
17109 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17110 Remove dead code.
17111 (builtin_access::generic_overlap): Be prepared to handle non-array
17112 base objects.
17113
17114 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
17115
17116 PR rtl-optimization/84682
17117 * lra-constraints.c (process_address_1): Check is_address flag
17118 for address constraints.
17119 (process_alt_operands): Likewise.
17120 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17121 preprocess_constraints.
17122 * recog.h (preprocess_constraints): Add oploc parameter.
17123 Adjust callers.
17124 * recog.c (preprocess_constraints): Test address_operand for
17125 CT_ADDRESS constraints.
17126
17127 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
17128
17129 PR target/83712
17130 * lra-assigns.c (assign_by_spills): Return a flag of reload
17131 assignment failure. Do not process the reload assignment
17132 failures. Do not spill other reload pseudos if they has the same
17133 reg class.
17134 (lra_assign): Add a return arg. Set up from the result of
17135 assign_by_spills call.
17136 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17137 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
17138 usage_insns if it is not NULL.
17139 (spill_hard_reg_in_range): New function.
17140 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17141 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17142 function prototypes.
17143 (lra_assign): Change prototype.
17144 * lra.c (lra): Add code to deal with fails by splitting hard reg
17145 live ranges.
17146
17147 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17148
17149 PR target/83193
17150 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17151 Accept complain bool parameter. Only emit errors if it is true.
17152 (arm_parse_cpu_option_name): Likewise.
17153 (arm_target_thumb_only): Adjust callers of the above.
17154 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17155 prototype to take a default true bool parameter.
17156 (arm_parse_arch_option_name): Likewise.
17157
17158 2018-03-09 David Malcolm <dmalcolm@redhat.com>
17159 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
17160
17161 PR jit/64089
17162 PR jit/84288
17163 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17164 * configure: Regenerate.
17165 * configure.ac ("linker --version-script option"): New.
17166 ("linker soname option"): New.
17167
17168 2018-03-09 Richard Biener <rguenther@suse.de>
17169
17170 PR tree-optimization/84775
17171 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17172 immediate uses of predicate stmts and mark them modified.
17173
17174 Revert
17175 PR tree-optimization/84178
17176 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17177 to caller.
17178 (version_loop_for_if_conversion): Delay update_ssa call.
17179 (tree_if_conversion): Delay update_ssa until after predicate
17180 insertion.
17181
17182 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
17183
17184 PR target/84763
17185 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17186 when the function accesses prior frames.
17187
17188 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17189
17190 PR debug/84456
17191 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17192 gen_llsym, otherwise call maybe_gen_llsym.
17193
17194 PR inline-asm/84742
17195 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17196 has ',' character inside of it.
17197
17198 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17199
17200 PR target/84748
17201 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17202 as clobbering CC_REGNUM.
17203
17204 2018-03-08 Richard Biener <rguenther@suse.de>
17205
17206 PR middle-end/84552
17207 * tree-scalar-evolution.c: Include tree-into-ssa.h.
17208 (follow_copies_to_constant): Do not follow SSA names registered
17209 for update.
17210
17211 2018-03-08 Richard Biener <rguenther@suse.de>
17212
17213 PR tree-optimization/84178
17214 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17215 to caller.
17216 (version_loop_for_if_conversion): Delay update_ssa call.
17217 (tree_if_conversion): Delay update_ssa until after predicate
17218 insertion.
17219
17220 2018-03-08 David Malcolm <dmalcolm@redhat.com>
17221
17222 PR tree-optimization/84178
17223 * tree-if-conv.c (release_bb_predicate): Remove the
17224 the assertion that the stmts have NULL use_ops.
17225 Discard the statements, asserting that they haven't
17226 yet been added to a BB.
17227
17228 2018-03-08 Richard Biener <rguenther@suse.de>
17229
17230 PR tree-optimization/84746
17231 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17232 (phi_translate): Pass in destination ANTIC_OUT set.
17233 (phi_translate_1): Likewise. For a simplified result lookup
17234 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17235 (phi_translate_set): Adjust.
17236 (do_pre_regular_insertion): Likewise.
17237 (do_pre_partial_partial_insertion): Likewise.
17238
17239 2018-03-08 Martin Liska <mliska@suse.cz>
17240
17241 PR gcov-profile/84735
17242 * doc/gcov.texi: Document usage of profile files.
17243 * gcov-io.h: Document changes in the format.
17244
17245 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
17246
17247 PR debug/84404
17248 PR debug/84408
17249 * dwarf2out.c (struct dw_line_info_table): Update comments for
17250 view == -1.
17251 (FORCE_RESET_NEXT_VIEW): New.
17252 (FORCE_RESETTING_VIEW_P): New.
17253 (RESETTING_VIEW_P): Check for -1 too.
17254 (ZERO_VIEW_P): Likewise.
17255 (new_line_info_table): Force-reset next view.
17256 (dwarf2out_begin_function): Likewise.
17257 (dwarf2out_source_line): Simplify zero_view_p initialization.
17258 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17259 view directly. Omit view when omitting .loc at line 0.
17260
17261 2018-03-08 Jakub Jelinek <jakub@redhat.com>
17262
17263 PR tree-optimization/84740
17264 * tree-switch-conversion.c (process_switch): Call build_constructors
17265 only if info.phi_count is non-zero.
17266
17267 PR tree-optimization/84739
17268 * tree-tailcall.c (find_tail_calls): Check call arguments against
17269 DECL_ARGUMENTS (current_function_decl) rather than
17270 DECL_ARGUMENTS (func) when checking for tail recursion.
17271
17272 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17273
17274 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17275 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17276 Volker Reichelt's entry and add entries for people that perform
17277 GCC fuzzy testing and report numerous bugs.
17278
17279 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
17280
17281 PR target/82411
17282 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17283 readonly data in sdata, if that is disabled.
17284 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17285 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17286 -mreadonly-in-sdata option.
17287
17288 2018-03-07 Martin Sebor <msebor@redhat.com>
17289
17290 PR tree-optimization/84468
17291 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17292 basic block when looking for nul assignment.
17293
17294 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
17295
17296 PR target/84277
17297 * except.h (output_function_exception_table): Adjust prototype.
17298 * except.c (output_function_exception_table): Remove FNNAME parameter
17299 and add SECTION parameter. Ouput one part of the table at a time.
17300 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17301 the first part of the exception table and emit unwind directives.
17302 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17303 (i386_pe_seh_cold_init): Likewise.
17304 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17305 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17306 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17307 (ix86_output_call_insn): Emit a nop in one more case for SEH.
17308 * config/i386/winnt.c: Include except.h.
17309 (struct seh_frame_state): Add reg_offset, after_prologue and
17310 in_cold_section fields.
17311 (i386_pe_seh_end_prologue): Set seh->after_prologue.
17312 (i386_pe_seh_cold_init): New function.
17313 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17314 to seh->in_cold_section.
17315 (seh_emit_push): Record the offset of the push.
17316 (seh_emit_save): Record the offet of the save.
17317 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17318 Test seh->after_prologue to disregard the epilogue.
17319 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17320 (i386_pe_end_cold_function): New function.
17321
17322 2018-03-07 Jakub Jelinek <jakub@redhat.com>
17323
17324 PR fortran/84565
17325 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17326 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17327
17328 PR c++/84704
17329 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17330 on tmp_var.
17331 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17332 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17333
17334 PR middle-end/84723
17335 * multiple_target.c: Include tree-inline.h and intl.h.
17336 (expand_target_clones): Diagnose and fail if node->definition and
17337 !tree_versionable_function_p (node->decl).
17338
17339 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
17340
17341 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17342 sprint_ul.
17343 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17344 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17345 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17346
17347 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17348
17349 PR target/84710
17350 * combine.c (try_combine): Use reg_or_subregno instead of handling
17351 just paradoxical SUBREGs and REGs.
17352
17353 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
17354
17355 * config/arc/arc.c (arc_finalize_pic): Remove function.
17356 (arc_must_save_register): We use single base PIC register, remove
17357 checks to save/restore the PIC register.
17358 (arc_expand_prologue): Likewise.
17359 * config/arc/arc-protos.h (arc_set_default_type_attributes):
17360 Remove.
17361 (arc_verify_short): Likewise.
17362 (arc_attr_type): Likewise.
17363 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17364 (walk_stores): Likewise.
17365 (arc_address_cost): Make it static.
17366 (arc_verify_short): Likewise.
17367 (branch_dest): Likewise.
17368 (arc_attr_type): Likewise.
17369 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17370 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17371 (arc_final_prescan_insn): Remove inserting the nops due to
17372 hardware hazards. It is done in reorg step.
17373 (insn_length_variant_t): Remove.
17374 (insn_length_parameters_t): Likewise.
17375 (arc_insn_length_parameters): Likewise.
17376 (arc_get_insn_variants): Likewise.
17377 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17378
17379 2018-03-06 Jakub Jelinek <jakub@redhat.com>
17380
17381 PR inline-asm/84683
17382 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17383 assertion failure.
17384
17385 PR tree-optimization/84687
17386 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17387 on new_node->decl.
17388 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17389
17390 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17391
17392 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17393 Rename to ppc_speculation_barrier.
17394 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17395 __builtin_ppc_speculation_barrier.
17396
17397 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17398
17399 PR target/84700
17400 * combine.c (combine_simplify_rtx): Don't try to simplify if
17401 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17402 are equal to x.
17403
17404 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
17405
17406 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17407 to 32 bytes when compiling for POWER9.
17408
17409 2018-03-05 Jakub Jelinek <jakub@redhat.com>
17410
17411 PR target/84564
17412 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17413 regparm >= 3 with no arg reg available also for calls with
17414 flag_force_indirect_call. Pass decl to ix86_function_regparm.
17415
17416 PR target/84524
17417 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17418 orig,vex.
17419 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
17420
17421 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
17422
17423 PR target/84264
17424 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17425
17426 2018-03-05 Richard Biener <rguenther@suse.de>
17427
17428 PR tree-optimization/84486
17429 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17430 When inserting a __builtin_assume_aligned call set the LHS
17431 SSA name alignment info accordingly.
17432
17433 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
17434
17435 PR tree-optimization/84114
17436 * config/aarch64/aarch64.c (aarch64_reassociation_width)
17437 Avoid reassociation of FLOAT_MODE addition.
17438
17439 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
17440
17441 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17442 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17443 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17444 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17445 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17446 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17447 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17448 and -mwbnoinvd.
17449 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17450 __builtin_ia32_wbinvd): New builtins.
17451 (SPECIAL_ARGS2): New.
17452 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17453 (SPECIAL_ARGS2): New.
17454 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17455 (ix86_valid_target_attribute_inner_p): Ditto.
17456 (ix86_init_mmx_sse_builtins): Add special_args2.
17457 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17458 TARGET_WBNOINVD_P): New.
17459 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17460 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17461 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17462 * config/i386/immintrin.h (_wbinvd): New intrinsic.
17463 * config/i386/pconfigintrin.h: New file.
17464 * config/i386/wbnoinvdintrin.h: Ditto.
17465 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17466 wbnoinvdintrin.h.
17467 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17468
17469 2018-03-05 Richard Biener <rguenther@suse.de>
17470
17471 PR tree-optimization/84670
17472 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17473 member.
17474 (BB_VISITED_WITH_VISITED_SUCCS): New define.
17475 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17476 (compute_antic_aux): Only assert the number of values in ANTIC_IN
17477 doesn't grow if all successors (recursively) were visited at least
17478 once.
17479
17480 2018-03-05 Richard Biener <rguenther@suse.de>
17481
17482 PR tree-optimization/84650
17483 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17484 if executed in the loop pipeline.
17485
17486 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
17487
17488 * doc/configfiles.texi (Configuration Files): Move info about
17489 conditionalizing $target-protos.h to...
17490 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
17491 differs from $target-protos.h.
17492
17493 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
17494 Chung-Ju Wu <jasonwucj@gmail.com>
17495
17496 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17497 * config/nds32/nds32-multiple.md (setmemsi): Define.
17498 * config/nds32/nds32-memory-manipulation.c
17499 (nds32_gen_dup_4_byte_to_word_value): New.
17500 (emit_setmem_word_loop): New.
17501 (emit_setmem_byte_loop): New.
17502 (nds32_expand_setmem_loop): New.
17503 (nds32_expand_setmem_loop_v3m): New.
17504 (nds32_expand_setmem_unroll): New.
17505 (nds32_expand_setmem): New.
17506
17507 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17508 Chung-Ju Wu <jasonwucj@gmail.com>
17509
17510 * config/nds32/nds32-memory-manipulation.c
17511 (nds32_emit_load_store): New.
17512 (nds32_emit_post_inc_load_store): New.
17513 (nds32_emit_mem_move): New.
17514 (nds32_emit_mem_move_block): New.
17515 (nds32_expand_movmemsi_loop_unknown_size): New.
17516 (nds32_expand_movmemsi_loop_known_size): New.
17517 (nds32_expand_movmemsi_loop): New.
17518 (nds32_expand_movmemsi_unroll): New.
17519 (nds32_expand_movmemqi): Rename ...
17520 (nds32_expand_movmemsi): ... to this.
17521 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17522 (movmemsi): ... to this.
17523 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17524 (nds32_expand_movmemsi): ... to this.
17525
17526 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17527 Monk Chiang <sh.chiang04@gmail.com>
17528 Chung-Ju Wu <jasonwucj@gmail.com>
17529
17530 * config/nds32/nds32-protos.h
17531 (nds32_expand_load_multiple): New arguments.
17532 (nds32_expand_store_multiple): Ditto.
17533 (nds32_valid_multiple_load_store): Rename ...
17534 (nds32_valid_multiple_load_store_p): ... to this.
17535 * config/nds32/nds32-memory-manipulation.c
17536 (nds32_expand_load_multiple): Refine implementation.
17537 (nds32_expand_store_multiple): Ditto.
17538 * config/nds32/nds32-multiple.md
17539 (load_multiple): Update nds32_expand_load_multiple interface.
17540 (store_multiple): Update nds32_expand_store_multiple interface.
17541 * config/nds32/nds32-predicates.c
17542 (nds32_valid_multiple_load_store): Rename ...
17543 (nds32_valid_multiple_load_store_p): ... to this and refine
17544 implementation.
17545 * config/nds32/predicates.md
17546 (nds32_load_multiple_and_update_address_operation): New predicate.
17547 (nds32_store_multiple_and_update_address_operation): New predicate.
17548
17549 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
17550 Chung-Ju Wu <jasonwucj@gmail.com>
17551
17552 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17553 (combo): New attribute.
17554 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17555
17556 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
17557
17558 * config/nds32/nds32.opt: Change -mcmodel= default value.
17559
17560 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
17561 Monk Chiang <sh.chiang04@gmail.com>
17562 Chung-Ju Wu <jasonwucj@gmail.com>
17563
17564 * config/nds32/constants.md (unspec_element): New enum.
17565 * config/nds32/constraints.md (Umw): New constraint.
17566 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17567 * config/nds32/nds32-intrinsic.md: Likewise.
17568 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17569 (nds32_valid_smw_lwm_base_p): New.
17570 (nds32_output_smw_single_word): New.
17571 (nds32_output_lmw_single_word): New.
17572 (nds32_expand_unaligned_load): New.
17573 (nds32_expand_unaligned_store): New.
17574 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17575 (nds32_output_smw_single_word): Declare.
17576 (nds32_output_lmw_single_word): Declare.
17577 (nds32_expand_unaligned_load): Declare.
17578 (nds32_expand_unaligned_store): Declare.
17579 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17580 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17581 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17582 NDS32_BUILTIN_UASTORE_DW.
17583 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17584 predicate.
17585
17586 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
17587 Kito Cheng <kito.cheng@gmail.com>
17588 Chung-Ju Wu <jasonwucj@gmail.com>
17589
17590 * config/nds32/nds32-intrinsic.c
17591 (nds32_expand_builtin_null_ftype_reg): Delete.
17592 (nds32_expand_builtin_reg_ftype_imm): Ditto.
17593 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17594 (nds32_read_argument): New.
17595 (nds32_legitimize_target): Ditto.
17596 (nds32_legitimize_argument): Ditto.
17597 (nds32_check_constant_argument): Ditto.
17598 (nds32_expand_unop_builtin): Ditto.
17599 (nds32_expand_unopimm_builtin): Ditto.
17600 (nds32_expand_binop_builtin): Ditto.
17601 (nds32_builtin_decl_impl): Ditto.
17602 (builtin_description): Ditto.
17603 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17604 (nds32_init_builtins_impl): Ditto.
17605 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17606 (nds32_builtin_decl): New.
17607 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17608 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17609
17610 2018-03-02 Jeff Law <law@redhat.com>
17611
17612 * reorg.c (stop_search_p): Handle DEBUG_INSN.
17613 (redundant_insn, fill_simple_delay_slots): Likewise.
17614 (fill_slots_from_thread): Likewise.
17615 * resource.c (mark_referenced_resources): Likewise.
17616 (mark_set_resources, find_dead_or_set_registers): Likewise.
17617
17618 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17619
17620 * substring-locations.h (format_warning_va): Formatting fix for
17621 ATTRIBUTE_GCC_DIAG.
17622 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17623 argument.
17624 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17625 * substring-locations.c: Include intl.h.
17626 (format_warning_va): Turned into small wrapper around
17627 format_warning_n_va, renamed to ...
17628 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17629 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17630 use ngettext.
17631 (format_warning_at_substring_n): New function.
17632 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17633 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
17634 format_warning_at_substring with just a shorter name instead of
17635 const function pointer.
17636 (fmtwarn_n): New function.
17637 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17638 appropriate, get rid of all the fmtstr temporaries, move conditionals
17639 with G_() wrapped string literals directly into fmtwarn arguments,
17640 cast dir.len to (int), formatting fixes.
17641
17642 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
17643
17644 * doc/invoke.texi: Remove "Cilk Plus" references.
17645
17646 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17647 Richard Biener <rguenther@suse.de>
17648
17649 PR ipa/84628
17650 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17651 for error or warning attributes if CALL_FROM_THUNK_P is set.
17652 Formatting fixes.
17653
17654 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17655
17656 PR target/56540
17657 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17658 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17659
17660 PR target/56540
17661 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17662 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17663
17664 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17665 instead of -1U in last predictors element's probability member.
17666
17667 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17668
17669 PR ipa/83983
17670 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17671 arguments if they are comparable.
17672
17673 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17674
17675 PR tree-optimization/84634
17676 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17677 masks and masked_loop_p with a single loop_masks, making sure it's
17678 null for bb vectorization.
17679
17680 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
17681
17682 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17683 (vect_analyze_data_ref_access): Use loop->safe_len rather than
17684 loop->force_vectorize to check whether there is no alias.
17685
17686 2018-03-02 Jakub Jelinek <jakub@redhat.com>
17687
17688 PR target/84614
17689 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17690 prototypes.
17691 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17692 comments.
17693 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17694 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17695 instead of a loop around prev_real_insn.
17696 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17697 prev_real_insn.
17698
17699 PR inline-asm/84625
17700 * config/i386/i386.c (ix86_print_operand): Use conditional
17701 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17702 zero vector.
17703
17704 2018-03-02 Richard Biener <rguenther@suse.de>
17705
17706 PR tree-optimization/84427
17707 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17708 (bitmap_set_subtract_values): Rewrite to handle multiple
17709 exprs per value.
17710 (clean): Likewise.
17711 (prune_clobbered_mems): Likewise.
17712 (phi_translate): Take edge instead of pred/phiblock.
17713 (phi_translate_1): Likewise.
17714 (phi_translate_set): Likewise. Insert all translated
17715 exprs for a value into the set, keeping possibly multiple
17716 expressions per value.
17717 (compute_antic_aux): Adjust for phi_translate changes.
17718 When intersecting union the expressions and prune those
17719 not in the final value set, keeping possibly multiple
17720 expressions per value. Do not use value-insertion
17721 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17722 all expressions. Add verification that the value-sets
17723 only shrink during iteration.
17724 (compute_partial_antic_aux): Adjust for the phi_translate changes.
17725 (do_pre_regular_insertion): Likewise.
17726 (do_pre_partial_partial_insertion): Likewise.
17727
17728 2018-03-02 Richard Biener <rguenther@suse.de>
17729
17730 PR target/82005
17731 * config/darwin.c (saved_debug_info_level): New static global.
17732 (darwin_asm_lto_start): Disable debug info generation for LTO out.
17733 (darwin_asm_lto_end): Restore debug info generation settings.
17734
17735 2018-03-01 Martin Liska <mliska@suse.cz>
17736
17737 PR sanitizer/82484
17738 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17739 volatile arguments.
17740
17741 2018-03-01 Richard Biener <rguenther@suse.de>
17742
17743 PR debug/84645
17744 * dwarf2out.c (gen_variable_die): Properly handle late VLA
17745 type annotation with LTO when debug was disabled at compile-time.
17746
17747 2018-03-01 Matthew Fortune <mfortune@gmail.com>
17748
17749 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17750 XINT with INTVAL.
17751 (mips_final_postscan_insn): Likewise.
17752
17753 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
17754
17755 PR rtl-optimization/84528
17756 * alias.c (init_alias_target): Add commentary.
17757 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17758 a unique base value if the frame pointer is not eliminated
17759 to the stack pointer.
17760
17761 2018-03-01 Tom de Vries <tom@codesourcery.com>
17762
17763 PR rtl-optimization/83327
17764 * lra-int.h (hard_regs_spilled_into): Declare.
17765 * lra.c (hard_regs_spilled_into): Define.
17766 (init_reg_info): Init hard_regs_spilled_into.
17767 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17768 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17769 (process_bb_lives): Handle hard_regs_spilled_into.
17770 (lra_create_live_ranges_1): Before doing liveness propagation, clear
17771 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17772
17773 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
17774
17775 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17776 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17777 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17778 * config/rs6000/aix72.h: New file.
17779
17780 2018-02-28 Jakub Jelinek <jakub@redhat.com>
17781
17782 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17783 instead of warning_at with conditional singular and plural messages
17784 where possible.
17785
17786 PR target/52991
17787 * stor-layout.c (update_alignment_for_field): For
17788 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17789 && !DECL_PACKED (field), do the alignment update, just use
17790 only desired_align instead of MAX (type_align, desired_align)
17791 as the alignment.
17792 (place_field): Don't do known_align < desired_align handling
17793 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17794 is non-NULL, instead do it after rli->prev_field handling and
17795 only if not within a bitfield word. For DECL_PACKED (field)
17796 use type_align of BITS_PER_UNIT.
17797
17798 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
17799
17800 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17801 superfluous parentheses and trailing spaces.
17802
17803 2018-02-28 Richard Biener <rguenther@suse.de>
17804
17805 PR tree-optimization/84584
17806 * graphite-scop-detection.c (scop_detection::add_scop): Discard
17807 SCoPs with fake exit edge.
17808
17809 2018-02-28 Martin Liska <mliska@suse.cz>
17810
17811 PR testsuite/84597
17812 * timevar.c (timer::print): Fix format to properly print 100%
17813 values.
17814
17815 2018-02-28 Richard Biener <rguenther@suse.de>
17816
17817 PR middle-end/84607
17818 * genmatch.c (capture_info::walk_match): Do not mark
17819 captured expressions without operands as expr_p given
17820 they act more like predicates and should be subject to
17821 "lost tail" side-effect preserving.
17822
17823 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
17824
17825 PR rtl-optimization/81611
17826 * auto-inc-dec.c (attempt_change): Move dead note from
17827 mem_insn if it's the next use of regno
17828 (find_address): Take address use of reg holding
17829 non-incremented value. Add parm to limit search to the named
17830 reg only.
17831 (merge_in_block): Attempt to use a mem insn that is the next
17832 use of the original regno.
17833
17834 2018-02-27 Martin Sebor <msebor@redhat.com>
17835
17836 PR c++/83871
17837 * doc/invoke.texi (-Wmissing-attributes): New option.
17838 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17839
17840 2018-02-27 Martin Sebor <msebor@redhat.com>
17841
17842 PR translation/84207
17843 * diagnostic-core.h (warning_n, error_n, inform_n): Change
17844 n argument to unsigned HOST_WIDE_INT.
17845 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17846 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
17847 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17848 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17849
17850 2018-02-27 Richard Biener <rguenther@suse.de>
17851
17852 PR tree-optimization/84512
17853 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17854 Do not use the estimate returned from record_stmt_cost for
17855 the scalar iteration cost but sum properly using add_stmt_cost.
17856
17857 2018-02-27 Richard Biener <rguenther@suse.de>
17858
17859 PR tree-optimization/84466
17860 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17861 Adjust last change to less strictly validate use operands.
17862
17863 2018-02-27 Martin Liska <mliska@suse.cz>
17864
17865 PR gcov-profile/84548
17866 * gcov.c (process_file): Allow partial overlap and consider it
17867 also as group functions.
17868 (output_lines): Properly calculate range of lines for a group.
17869
17870 2018-02-27 Martin Liska <mliska@suse.cz>
17871
17872 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17873 'ggc' suffixes. Change first column width.
17874 (timer::print): Fix formatting of the column.
17875
17876 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
17877
17878 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17879 preserve inline entry blocks for the sake of debug inline
17880 entry point markers alone.
17881 (remove_unused_locals): Suggest in comments a better place to
17882 force the preservation of inline entry blocks that are
17883 otherwise unused, but do not preserve them.
17884
17885 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17886
17887 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17888
17889 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17890
17891 PR target/84039
17892 * config/i386/constraints.md (Bs): Replace
17893 ix86_indirect_branch_register with
17894 TARGET_INDIRECT_BRANCH_REGISTER.
17895 (Bw): Likewise.
17896 * config/i386/i386.md (indirect_jump): Likewise.
17897 (tablejump): Likewise.
17898 (*sibcall_memory): Likewise.
17899 (*sibcall_value_memory): Likewise.
17900 Peepholes of indirect call and jump via memory: Likewise.
17901 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17902 (*sibcall_value_GOT_32): Likewise.
17903 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17904 (GOT_memory_operand): Likewise.
17905 (call_insn_operand): Likewise.
17906 (sibcall_insn_operand): Likewise.
17907 (GOT32_symbol_operand): Likewise.
17908 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17909
17910 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17911
17912 PR rtl-optimization/83496
17913 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17914 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
17915 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17916 redundant insn, if any.
17917 (relax_delay_slots): Likewise.
17918 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17919
17920 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
17921
17922 PR tree-optimization/83965
17923 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17924 that grouped statements are part of a reduction chain. Return
17925 true if the statement is not marked as a reduction itself but
17926 is part of a group.
17927 (vect_recog_dot_prod_pattern): Don't check whether the statement
17928 is part of a group here.
17929 (vect_recog_sad_pattern): Likewise.
17930 (vect_recog_widen_sum_pattern): Likewise.
17931
17932 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
17933
17934 PR debug/84545
17935 * final.c (rest_of_clean_state): Also look for calls inside sequences.
17936
17937 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
17938
17939 PR target/84530
17940 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17941 the bool argument.
17942 (ix86_output_indirect_function_return): New prototype.
17943 (ix86_split_simple_return_pop_internal): Likewise.
17944 * config/i386/i386.c (indirect_return_via_cx): New.
17945 (indirect_return_via_cx_bnd): Likewise.
17946 (indirect_thunk_name): Handle return va CX_REG.
17947 (output_indirect_thunk_function): Create alias for
17948 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17949 (ix86_output_indirect_jmp): Remove the bool argument.
17950 (ix86_output_indirect_function_return): New function.
17951 (ix86_split_simple_return_pop_internal): Likewise.
17952 * config/i386/i386.md (*indirect_jump): Don't pass false
17953 to ix86_output_indirect_jmp.
17954 (*tablejump_1): Likewise.
17955 (simple_return_pop_internal): Change it to define_insn_and_split.
17956 Call ix86_split_simple_return_pop_internal to split it for
17957 -mfunction-return=.
17958 (simple_return_indirect_internal): Call
17959 ix86_output_indirect_function_return instead of
17960 ix86_output_indirect_jmp.
17961
17962 2018-02-26 Jakub Jelinek <jakub@redhat.com>
17963
17964 PR bootstrap/84405
17965 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17966 memset and value initialization afterwards.
17967
17968 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
17969
17970 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17971
17972 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
17973
17974 PR target/84521
17975 * common/config/aarch64/aarch64-common.c
17976 (aarch_option_optimization_table[]): Switch
17977 off fomit-frame-pointer
17978
17979 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17980 Chung-Ju Wu <jasonwucj@gmail.com>
17981
17982 * config/nds32/nds32-multiple.md (load_multiple): Disallow
17983 volatile memory.
17984 (store_multiple): Ditto.
17985
17986 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
17987
17988 * config.gcc: Add --with-cpu support for nds32 target.
17989 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17990 * config/nds32/nds32.opt: Add -mcpu= option.
17991
17992 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
17993
17994 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17995 isel=yes): Warn for these deprecated options.
17996
17997 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
17998
17999 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
18000 ISA_2_5_MASKS_EMBEDDED.
18001
18002 2018-02-23 Jakub Jelinek <jakub@redhat.com>
18003
18004 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
18005 p->max as pointers rather than using iterative_hash_expr.
18006
18007 2018-02-23 Carl Love <cel@us.ibm.com>
18008
18009 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
18010 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
18011 BU_P8V_OVERLOAD_2.
18012 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
18013 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
18014 P8V_BUILTIN_VEC_VUNSIGNED2.
18015
18016 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
18017
18018 PR target/81572
18019 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
18020 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
18021 LRA_UNKNOWN_ALT.
18022 * lra-constraints.c (curr_insn_transform): Set up
18023 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
18024 LRA_UNKNOWN_ALT.
18025 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
18026 * lra-eliminations.c (spill_pseudos): Ditto.
18027 (process_insn_for_elimination): Ditto.
18028 * lra-lives.c (reg_early_clobber_p): Use the new macros.
18029 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
18030 LRA_NON_CLOBBERED_ALT.
18031
18032 2018-02-22 Martin Sebor <msebor@redhat.com>
18033
18034 PR tree-optimization/84480
18035 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
18036 to maybe_diag_stxncpy_trunc. Call it.
18037 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
18038 from gimple_fold_builtin_strcpy. Print inlining stack.
18039 (handle_builtin_stxncpy): Print inlining stack.
18040 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
18041
18042 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
18043
18044 PR target/84176
18045 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
18046 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
18047 and -fcheck-pointer-bounds are used together.
18048 (indirect_thunk_prefix): New enum.
18049 (indirect_thunk_need_prefix): New function.
18050 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
18051 "_nt" instead of "_bnd" for NOTRACK prefix.
18052 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
18053 (output_indirect_thunk_function): Likewise.
18054 (): Likewise.
18055 (ix86_code_end): Update output_indirect_thunk_function calls.
18056 (ix86_output_indirect_branch_via_reg): Replace
18057 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
18058 (ix86_output_indirect_branch_via_push): Likewise.
18059 (ix86_output_function_return): Likewise.
18060 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
18061 incompatible with -fcf-protection=branch and
18062 -fcheck-pointer-bounds.
18063
18064 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18065
18066 PR target/83335
18067 * config/aarch64/aarch64.c (aarch64_print_address_internal):
18068 Change gcc_assert call to output_operand_lossage.
18069
18070 2018-02-22 Steve Ellcey <sellcey@cavium.com>
18071
18072 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
18073
18074 2018-02-22 DJ Delorie <dj@redhat.com>
18075 Sebastian Perta <sebastian.perta@renesas.com>
18076 Oleg Endo <olegendo@gcc.gnu.org>
18077
18078 * config/rx/rx.c (rx_rtx_costs): New function.
18079 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
18080
18081 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
18082
18083 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
18084
18085 2018-02-22 Martin Liska <mliska@suse.cz>
18086
18087 PR driver/83193
18088 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
18089 Add "native" as a possible value.
18090
18091 2018-02-22 Martin Liska <mliska@suse.cz>
18092
18093 PR driver/83193
18094 * config/i386/i386.c (ix86_option_override_internal):
18095 Add "native" as a possible value for -march and -mtune.
18096
18097 2018-02-22 Jakub Jelinek <jakub@redhat.com>
18098
18099 PR target/84502
18100 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18101 to all type variants.
18102
18103 PR tree-optimization/84503
18104 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18105 width as info->bitpos + info->bitsize - start.
18106 (merged_store_group::merge_overlapping): Simplify width computation.
18107 (check_no_overlap): New function.
18108 (imm_store_chain_info::try_coalesce_bswap): Compute expected
18109 start + width and last_order of the group, fail if check_no_overlap
18110 fails.
18111 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18112 to group if check_no_overlap fails.
18113
18114 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18115
18116 * config/rs6000/altivec.md: Delete contraint arguments to
18117 define_expand, define_split, and define_peephole2, and in
18118 define_insn_and_split if always unused.
18119 * config/rs6000/darwin.md: Ditto.
18120 * config/rs6000/dfp.md: Ditto.
18121 * config/rs6000/rs6000.md: Ditto.
18122 * config/rs6000/sync.md: Ditto.
18123 * config/rs6000/vector.md: Ditto.
18124 * config/rs6000/vsx.md: Ditto.
18125
18126 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
18127
18128 * config/rs6000/altivec.md: Write output control strings as braced
18129 blocks instead of double-quoted strings.
18130 * config/rs6000/darwin.md: Ditto.
18131 * config/rs6000/rs6000.md: Ditto.
18132 * config/rs6000/vector.md: Ditto.
18133 * config/rs6000/vsx.md: Ditto.
18134
18135 2018-02-21 Jason Merrill <jason@redhat.com>
18136
18137 PR c++/84314 - ICE with templates and fastcall attribute.
18138 * attribs.c (build_type_attribute_qual_variant): Remove assert.
18139
18140 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18141
18142 * ipa-cp.c (determine_versionability): Fix comment typos.
18143
18144 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
18145
18146 PR c/84229
18147 * ipa-cp.c (determine_versionability): Do not version functions caling
18148 va_arg_pack.
18149
18150 2018-02-21 Martin Liska <mliska@suse.cz>
18151
18152 PR driver/83193
18153 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18154 Add "native" as a possible value.
18155 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
18156 the macro when native cpu detection is available.
18157
18158 2018-02-21 Martin Liska <mliska@suse.cz>
18159
18160 PR driver/83193
18161 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18162 Add "native" as a possible value.
18163 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18164 when native cpu detection is available.
18165
18166 2018-02-21 Jakub Jelinek <jakub@redhat.com>
18167 Martin Sebor <msebor@redhat.com>
18168
18169 PR tree-optimization/84478
18170 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18171 false.
18172 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18173 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18174 support which is conservatively correct, for 2 only stay conservative
18175 for maxlen. Formatting and comment capitalization fixes. Add STRICT
18176 argument to the 2 argument get_range_strlen, adjust 6 arg
18177 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18178 false.
18179 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18180 (gimple_fold_builtin_strlen): Pass true as last argument to
18181 get_range_strlen.
18182
18183 2018-02-20 Martin Sebor <msebor@redhat.com>
18184
18185 PR middle-end/84095
18186 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18187 (builtin_memref::set_base_and_offset): Same. Handle inner references.
18188 (builtin_memref::builtin_memref): Factor out parts into
18189 set_base_and_offset and call it.
18190
18191 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18192
18193 PR middle-end/84406
18194 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18195 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18196 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
18197 search at the associated MODE_INT.
18198
18199 2018-02-20 Jeff Law <law@redhat.com>
18200
18201 PR middle-end/82123
18202 PR tree-optimization/81592
18203 PR middle-end/79257
18204 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18205 for range data rather than using global data.
18206 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18207 range data rather than using global data.
18208 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18209 pass it to children as needed.
18210 (struct directive::fmtresult): Similarly.
18211 (struct directive::set_width): Similarly.
18212 (struct directive::set_precision): Similarly.
18213 (format_integer, format_directive, parse_directive): Similarly.
18214 (format_none): Accept unnamed vr_values parameter.
18215 (format_percent, format_floating, format_character): Similarly.
18216 (format_string, format_plain): Similarly.
18217 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18218 the EVRP range analyzer for range data rather than using global data.
18219 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18220 gimple-ssa-evrp-analyze.h
18221 (class sprintf_dom_walker): Add after_dom_children member function.
18222 Add evrp_range_analyzer member.
18223 (sprintf_dom_walker::before_dom_children): Call into the EVRP
18224 range analyzer as needed.
18225 (sprintf_dom_walker::after_dom_children): New member function.
18226 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18227 if not optimizing.
18228 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18229 (evrp_range_analyzer::pop_to_marker): Likewise.
18230
18231 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
18232
18233 PR tree-optimization/84419
18234 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18235 with the required type if its current type is compatible but
18236 different.
18237
18238 2018-02-20 Jakub Jelinek <jakub@redhat.com>
18239
18240 PR middle-end/82004
18241 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18242 after vectorization.
18243
18244 2018-02-20 Martin Liska <mliska@suse.cz>
18245
18246 PR driver/83193
18247 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18248 possible values if we don't have a hint.
18249
18250 2018-02-20 Martin Liska <mliska@suse.cz>
18251
18252 PR c/84310
18253 PR target/79747
18254 * final.c (shorten_branches): Build align_tab array with one
18255 more element.
18256 * opts.c (finish_options): Add alignment option limit check.
18257 (MAX_CODE_ALIGN): Likewise.
18258 (MAX_CODE_ALIGN_VALUE): Likewise.
18259 * doc/invoke.texi: Document maximum allowed option value for
18260 all -falign-* options.
18261
18262 2018-02-19 Jakub Jelinek <jakub@redhat.com>
18263
18264 PR target/84146
18265 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18266 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18267 * var-tracking.c (emit_note_insn_var_location): Remove all references
18268 to NOTE_INSN_CALL_ARG_LOCATION.
18269 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18270 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18271 Use copy_rtx_if_shared.
18272 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18273 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18274 (dwarf2out_var_location): Remove handling of
18275 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18276 on call_insn.
18277 * final.c (final_scan_insn): Remove all references to
18278 NOTE_INSN_CALL_ARG_LOCATION.
18279 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
18280 before dumping final insns.
18281 * except.c (emit_note_eh_region_end): Remove all references to
18282 NOTE_INSN_CALL_ARG_LOCATION.
18283 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18284 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18285 * config/arc/arc.c (hwloop_optimize): Likewise.
18286 * config/arm/arm.c (create_fix_barrier): Likewise.
18287 * config/s390/s390.c (s390_chunkify_start): Likewise.
18288 * config/sh/sh.c (find_barrier): Likewise.
18289 * config/i386/i386.c (rest_of_insert_endbranch,
18290 ix86_seh_fixup_eh_fallthru): Likewise.
18291 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18292 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18293 * config/frv/frv.c (frv_function_prologue): Likewise.
18294 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
18295 reg note.
18296 (note_outside_basic_block_p): Remove all references to
18297 NOTE_INSN_CALL_ARG_LOCATION.
18298 * gengtype.c (adjust_field_rtx_def): Likewise.
18299 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18300 Likewise.
18301 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18302 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18303
18304 PR c++/84444
18305 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18306 is ADDR_EXPR.
18307
18308 PR tree-optimization/84452
18309 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18310 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18311 is NULL.
18312
18313 2018-02-19 Martin Liska <mliska@suse.cz>
18314
18315 PR sanitizer/82183
18316 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18317
18318 2018-02-19 Martin Liska <mliska@suse.cz>
18319 Richard Sandiford <richard.sandiford@linaro.org>
18320
18321 PR tree-optimization/82491
18322 * gimple-fold.c (get_base_constructor): Make earlier bail out
18323 to prevent ubsan.
18324
18325 2018-02-19 Carl Love <cel@us.ibm.com>
18326
18327 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18328 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18329 BU_P8V_OVERLOAD_1.
18330 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18331 P8V_BUILTIN_VEC_NEG.
18332
18333 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
18334
18335 * config/rl78/rl78.md (movdf): New define expand.
18336
18337 2018-02-19 Martin Liska <mliska@suse.cz>
18338
18339 PR other/80589
18340 * doc/invoke.texi: Fix typo.
18341 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18342
18343 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
18344
18345 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18346 handle rs6000_single_float and rs6000_double_float specially for
18347 e500 family CPUs.
18348
18349 2018-02-16 Jeff Law <law@redhat.com>
18350
18351 * config/rx/rx.c (add_pop_cfi_notes): New function.;
18352 (pop_regs): Use it.
18353
18354 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18355
18356 PR ipa/84425
18357 * ipa-inline.c (inline_small_functions): Fix a typo.
18358
18359 2018-02-16 Nathan Sidwell <nathan@acm.org>
18360
18361 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18362
18363 2018-02-16 Carl Love <cel@us.ibm.com>
18364
18365 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18366 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18367 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18368 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18369 expansion to P8V_BUILTIN_VEC_FLOAT2.
18370
18371 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
18372
18373 PR rtl-optimization/70023
18374 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18375 src_regno into account.
18376
18377 2018-02-16 Carl Love <cel@us.ibm.com>
18378
18379 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18380 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18381 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18382 * config/rs6000/rs6000.c: Remove case statements for
18383 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18384 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18385 and P9V_BUILTIN_VEC_VINSERT4B.
18386 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18387 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18388 * config/rs6000/vsx.md:
18389 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18390 vec_insert4b.
18391
18392 2018-02-16 Carl Love <cel@us.ibm.com>
18393
18394 * config/rs6000/altivec.h: Add builtin names vec_extract4b
18395 vec_insert4b.
18396 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18397 definitions.
18398 * config/rs6000/rs6000-c.c: Add the definitions for
18399 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18400 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18401 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18402 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
18403 definition for insert4b and define insn *insert3b_internal.
18404 * doc/extend.texi: Add documentation for vec_extract4b.
18405
18406 2018-02-16 Nathan Sidwell <nathan@acm.org>
18407
18408 * doc/extend.texi (Backwards Compatibility): Mention friend
18409 injection. Note for-scope is deprecated.
18410 * doc/invoke.texi (-ffriend-injection): Deprecate.
18411
18412 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
18413
18414 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18415 that moved to I2, also allow destinations that are a paradoxical
18416 subreg (instead of a normal reg).
18417
18418 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
18419
18420 PR target/83831
18421 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18422 to QImode.
18423
18424 2018-02-16 Richard Biener <rguenther@suse.de>
18425
18426 PR tree-optimization/84037
18427 PR tree-optimization/84016
18428 PR target/82862
18429 * config/i386/i386.c (ix86_builtin_vectorization_cost):
18430 Adjust vec_construct for the fact we need additional higher latency
18431 128bit inserts for AVX256 and AVX512 vector builds.
18432 (ix86_add_stmt_cost): Scale vector construction cost for
18433 elementwise loads.
18434
18435 2018-02-16 Richard Biener <rguenther@suse.de>
18436
18437 PR tree-optimization/84417
18438 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18439 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18440 (non_rewritable_lvalue_p): Likewise, use poly-ints.
18441
18442 2018-02-16 Martin Liska <mliska@suse.cz>
18443
18444 PR sanitizer/84307
18445 * internal-fn.def (ASAN_CHECK): Set proper flags.
18446 (ASAN_MARK): Likewise.
18447
18448 2018-02-16 Julia Koval <julia.koval@intel.com>
18449
18450 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18451 from PTA_CANNONLAKE.
18452
18453 2018-02-16 Jakub Jelinek <jakub@redhat.com>
18454
18455 PR target/84272
18456 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18457 Use ++iter rather than iter++ for std::list iterators.
18458 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
18459 defer deleting them until all nodes in the forest are processed. Do
18460 free even leaf nodes. Change to_process into auto_vec.
18461
18462 PR bootstrap/84405
18463 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18464 * vec.h (vec_default_construct): Use memset instead of placement new
18465 if BROKEN_VALUE_INITIALIZATION is defined.
18466 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18467 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18468 is defined.
18469
18470 PR rtl-optimization/83723
18471 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18472 * lra.c (lra_substitute_pseudo): Likewise. If true, use
18473 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
18474 recursive calls.
18475 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18476 callers.
18477 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18478
18479 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
18480
18481 PR rtl-optimization/81443
18482 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18483 from inner REGs to paradoxical SUBREGs.
18484
18485 2018-02-16 Richard Biener <rguenther@suse.de>
18486
18487 PR tree-optimization/84399
18488 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18489 For operands we can analyze at their definition make sure we can
18490 analyze them at each use as well.
18491
18492 2018-02-16 Richard Biener <rguenther@suse.de>
18493
18494 PR tree-optimization/84190
18495 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18496 volatile accesses if the decl isn't volatile.
18497
18498 2018-02-15 Jason Merrill <jason@redhat.com>
18499
18500 PR c++/84314 - ICE with templates and fastcall attribute.
18501 * attribs.c (build_type_attribute_qual_variant): Don't clobber
18502 TYPE_CANONICAL on an existing type.
18503
18504 2018-02-15 Jakub Jelinek <jakub@redhat.com>
18505
18506 PR tree-optimization/84383
18507 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18508 dstoff nor call operand_equal_p if dstbase is NULL.
18509
18510 PR tree-optimization/84334
18511 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18512 also a CONSTANT_CLASS_P, punt.
18513
18514 2018-02-14 Jim Wilson <jimw@sifive.com>
18515
18516 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18517 first SMALL_OPERAND check. New local min_second_step. Move assert
18518 to where locals are set. Add TARGET_RVC support.
18519 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18520
18521 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
18522
18523 * doc/invoke.texi: Correct -Wformat-overflow code sample.
18524
18525 2018-02-14 Martin Sebor <msebor@redhat.com>
18526
18527 PR tree-optimization/83698
18528 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18529 arrays constrain the offset range to their bounds.
18530 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18531 (builtin_access::overlap): Avoid setting the size of overlap if it's
18532 already been set.
18533 (maybe_diag_overlap): Also consider arrays when deciding what values
18534 of offsets to include in diagnostics.
18535
18536 2018-02-14 Martin Sebor <msebor@redhat.com>
18537
18538 PR c/84108
18539 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18540 that correspond to the kind of a declaration.
18541
18542 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
18543
18544 PR target/83984
18545 * config/pa/pa.md: Load address of PIC label using the linkage table
18546 if the label is nonlocal.
18547
18548 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
18549
18550 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18551 warning message if user requests -maltivec=be.
18552 * doc/invoke.texi: Document deprecation of -maltivec=be.
18553
18554 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
18555
18556 PR target/84220
18557 * config/rs6000/rs6000-c.c: Update definitions for
18558 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18559 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18560
18561 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18562
18563 PR target/84239
18564 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18565 add _get_ssp intrinsics. Remove argument from
18566 __builtin_ia32_rdssp[d|q].
18567 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18568 * config/i386/i386-builtin.def: Remove argument from
18569 __builtin_ia32_rdssp[d|q].
18570 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18571 ix86_expand_special_args_builtin for _rdssp[d|q].
18572 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18573 Clear register before usage.
18574 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18575 Add documentation for new _get_ssp and _inc_ssp intrinsics.
18576
18577 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
18578
18579 PR tree-optimization/84357
18580 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18581 operand 1 of an ARRAY_REF too.
18582
18583 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
18584
18585 PR target/83831
18586 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18587 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18588 declarations.
18589 (set_of_reg): New struct.
18590 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18591 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18592 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18593 functions.
18594 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18595 Split into bitclr, bitset, bitinvert patterns if appropriate.
18596 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18597 use rx_fuse_in_memory_bitop.
18598 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18599 to named insn, correct maximum insn length.
18600
18601 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
18602
18603 PR target/79242
18604 * machmode.def: Define a complex mode for PARTIAL_INT.
18605 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18606 MODE_PARTIAL_INT.
18607 * doc/rtl.texi: Document CSPImode.
18608 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18609 handling.
18610 (msp430_hard_regno_nregs_with_padding): Likewise.
18611
18612 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
18613
18614 PR target/84279
18615 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18616
18617 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
18618
18619 PR rtl-optimization/84169
18620 * combine.c (try_combine): New variable split_i2i3. Set it to true if
18621 we generated a parallel as new i3 and we split that to new i2 and i3
18622 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
18623 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
18624 those to i2, not i1. Partially rewrite this scan code.
18625
18626 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18627
18628 PR c/82210
18629 * stor-layout.c (place_field): For variable length fields, adjust
18630 offset_align afterwards not just based on the field's alignment,
18631 but also on the size.
18632
18633 PR middle-end/84309
18634 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18635 of exps and logs in the use_exp2 case.
18636
18637 2018-02-13 Jeff Law <law@redhat.com>
18638
18639 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18640 entry for "vector".
18641
18642 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18643 ARGS as unused.
18644
18645 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
18646
18647 PR debug/84342
18648 PR debug/84319
18649 * common.opt (gas-loc-support, gas-locview-support): New.
18650 (ginline-points, ginternal-reset-location-views): New.
18651 * doc/invoke.texi: Document them. Use @itemx where intended.
18652 (gvariable-location-views): Adjust.
18653 * target.def (reset_location_view): New.
18654 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18655 (TARGET_RESET_LOCATION_VIEW): New.
18656 * doc/tm.texi: Rebuilt.
18657 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18658 (dwarf2out_default_as_locview_support): New.
18659 (output_asm_line_debug_info): Use option variables.
18660 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18661 (output_loc_list): Likewise.
18662 (add_high_low_attributes): Check option variables.
18663 Don't output entry view attribute in strict mode.
18664 (gen_inlined_subroutine_die): Check option variables.
18665 (dwarf2out_inline_entry): Likewise.
18666 (init_sections_and_labels): Likewise.
18667 (dwarf2out_early_finish): Likewise.
18668 (maybe_reset_location_view): New, from...
18669 (dwarf2out_var_location): ... here. Call it.
18670 * debug.h (dwarf2out_default_as_loc_support): Declare.
18671 (dwarf2out_default_as_locview_support): Declare.
18672 * hooks.c (hook_int_rtx_insn_0): New.
18673 * hooks.h (hook_int_rtx_insn_0): Declare.
18674 * toplev.c (process_options): Take -gas-loc-support and
18675 -gas-locview-support from dwarf2out. Enable
18676 -gvariable-location-views by default only with locview
18677 assembler support. Enable -ginternal-reset-location-views by
18678 default only if the target defines the corresponding hook.
18679 Enable -ginline-points by default if location views are
18680 enabled; force it disabled if statement frontiers are
18681 disabled.
18682 * tree-inline.c (expand_call_inline): Check option variables.
18683 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18684
18685 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
18686
18687 PR tree-optimization/84321
18688 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18689 handling. Also check whether the anti-range contains any values
18690 that satisfy the mask; switch to a VR_RANGE if not.
18691
18692 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
18693
18694 PR sanitizer/84340
18695 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18696
18697 2018-02-13 Martin Jambor <mjambor@suse.cz>
18698
18699 PR c++/83990
18700 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18701 of call statements, also set location of a load to a temporary.
18702
18703 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
18704
18705 * config/rl78/rl78.c (add_vector_labels): New function.
18706 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18707 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18708 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18709 which checks that no arguments are passed.
18710 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18711 * doc/extend.texi: Documentation for the new attribute.
18712
18713 2018-02-13 Andreas Schwab <schwab@suse.de>
18714
18715 * config/riscv/linux.h (CPP_SPEC): Define.
18716
18717 2018-02-13 Jakub Jelinek <jakub@redhat.com>
18718
18719 PR target/84335
18720 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18721 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18722 OPTION_MASK_ISA_AES as first argument to def_builtin_const
18723 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18724 instead of OPTION_MASK_ISA_PCLMUL as first argument to
18725 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18726 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18727 temporarily for AES and PCLMUL builtins.
18728
18729 PR tree-optimization/84339
18730 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18731 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18732 Formatting fixes.
18733
18734 PR middle-end/84309
18735 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18736 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18737 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18738 inline function.
18739 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18740 inline function.
18741 * omp-simd-clone.h: New file.
18742 * omp-simd-clone.c: Include omp-simd-clone.h.
18743 (expand_simd_clones): No longer static.
18744 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18745 cgraph.h and omp-simd-clone.h.
18746 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18747 (vect_recog_widen_shift_pattern): Formatting fix.
18748 (vect_pattern_recog_1): Don't check optab for calls.
18749
18750 PR target/84336
18751 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18752 operands[2] into a REG before using gen_lowpart on it.
18753
18754 2018-02-12 Jeff Law <law@redhat.com>
18755
18756 PR target/83760
18757 * config/sh/sh.c (find_barrier): Consider a sibling call
18758 a barrier as well.
18759
18760 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18761 successfully back substituting a reg.
18762
18763 2018-02-12 Richard Biener <rguenther@suse.de>
18764
18765 PR tree-optimization/84037
18766 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18767 parameter, move visited init to caller.
18768 (vect_slp_analyze_operations): Separate cost from validity
18769 check, initialize visited once for all instances.
18770 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18771 for all instances.
18772 * tree-vect-stmts.c (vect_model_simple_cost): Make early
18773 out an assert.
18774 (vect_model_promotion_demotion_cost): Likewise.
18775 (vectorizable_bswap): Guard cost modeling with !slp_node
18776 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18777 SLP stmts.
18778 (vectorizable_call): Likewise.
18779 (vectorizable_conversion): Likewise.
18780 (vectorizable_assignment): Likewise.
18781 (vectorizable_shift): Likewise.
18782 (vectorizable_operation): Likewise.
18783 (vectorizable_store): Likewise.
18784 (vectorizable_load): Likewise.
18785 (vectorizable_condition): Likewise.
18786 (vectorizable_comparison): Likewise.
18787
18788 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
18789
18790 PR sanitizer/84307
18791 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18792 (ASAN_MARK): Fix fnspec to account for return value, change pointer
18793 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18794
18795 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
18796
18797 PR middle-end/83665
18798 * params.def (inline-min-speedup): Increase from 8 to 15.
18799 (max-inline-insns-auto): Decrease from 40 to 30.
18800 * ipa-split.c (consider_split): Add some buffer for function to
18801 be considered inlining candidate.
18802 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18803 default values.
18804
18805 2018-02-12 Richard Biener <rguenther@suse.de>
18806
18807 PR tree-optimization/84037
18808 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18809 matched stmts if we cannot swap the non-matched ones.
18810
18811 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18812
18813 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18814 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18815 _mm_maskz_scalef_round_ss): New intrinsics.
18816 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18817 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18818 __builtin_ia32_scalefss_round): Remove.
18819 (__builtin_ia32_scalefsd_mask_round,
18820 __builtin_ia32_scalefss_mask_round): New intrinsics.
18821 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18822 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18823 ((match_operand:VF_128 2 "<round_nimm_predicate>"
18824 "<round_constraint>")): Changed to ...
18825 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18826 "<round_scalar_constraint>")): ... this.
18827 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18828 %0, %1, %2<round_op3>}"): Changed to ...
18829 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18830 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18831 %2<round_scalar_mask_op3>}"): ... this.
18832 * config/i386/subst.md (round_scalar_nimm_predicate): New.
18833
18834 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
18835
18836 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18837 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18838 (_mm_maskz_sqrt_round_ss): New intrinsics.
18839 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18840 (__builtin_ia32_sqrtsd_mask_round)
18841 (__builtin_ia32_sqrtss_mask_round): New builtins.
18842 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18843 (__builtin_ia32_sqrtss_round): Remove.
18844 (__builtin_ia32_sqrtsd_mask_round)
18845 (__builtin_ia32_sqrtss_mask_round): New builtins.
18846 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18847 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18848 ((match_operand:VF_128 1 "vector_operand"
18849 "xBm,<round_constraint>")): Changed to ...
18850 ((match_operand:VF_128 1 "vector_operand"
18851 "xBm,<round_scalar_constraint>")): ... this.
18852 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18853 %0, %2, %<iptr>1<round_op3>}): Changed to ...
18854 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18855 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18856 %<iptr>1<round_scalar_mask_op3>}): ... this.
18857 ((set_attr "prefix" "<round_prefix>")): Changed to ...
18858 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18859
18860 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
18861
18862 PR target/84266
18863 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18864 Cast vec_cmpeq result to correct type.
18865 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18866 Cast vec_cmpgt result to correct type.
18867
18868 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
18869
18870 * final.c (final_scan_insn_1): Renamed from...
18871 (final_scan_insn): ... this. New wrapper, to recover
18872 seen from the outermost call in recursive ones.
18873 * config/sparc/sparc.c (output_return): Drop seen from call.
18874 (output_sibcall): Likewise.
18875 * config/visium/visium.c (output_branch): Likewise.
18876
18877 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
18878
18879 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18880 function label.
18881
18882 2018-02-10 Alan Modra <amodra@gmail.com>
18883
18884 PR target/84300
18885 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18886 Specify LR as an input.
18887
18888 2018-02-10 Jakub Jelinek <jakub@redhat.com>
18889
18890 PR sanitizer/83987
18891 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18892 remove_member_access_dummy_vars): New functions.
18893 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18894 lower_omp_1, execute_lower_omp): Use them.
18895
18896 PR rtl-optimization/84308
18897 * shrink-wrap.c (spread_components): Release todo vector.
18898
18899 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
18900
18901 PR rtl-optimization/57193
18902 * ira-color.c (struct allocno_color_data): Add member
18903 conflict_allocno_hard_prefs.
18904 (update_conflict_allocno_hard_prefs): New.
18905 (bucket_allocno_compare_func): Add a preference based on
18906 conflict_allocno_hard_prefs.
18907 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18908 (color_allocnos): Remove a dead code. Initiate
18909 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
18910
18911 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18912
18913 PR target/84226
18914 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18915 constraint from =wa to wa. Avoid a subreg on the output operand,
18916 instead use a pseudo and subreg it in a move.
18917 (p9_xxbrd_<mode>): Changed to ...
18918 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18919 (p9_xxbrd_v2df): New expander.
18920 (p9_xxbrw_<mode>): Changed to ...
18921 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18922 (p9_xxbrw_v4sf): New expander.
18923
18924 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18925
18926 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18927
18928 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
18929
18930 PR target/83926
18931 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18932 multiply in 32-bit mode.
18933 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18934 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18935 mode.
18936
18937 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
18938
18939 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18940 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18941 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18942 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18943
18944 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
18945
18946 PR lto/84213
18947 * dwarf2out.c (is_trivial_indirect_ref): New function.
18948 (dwarf2out_late_global_decl): Do not generate a location
18949 attribute for variables that have a non-trivial DECL_VALUE_EXPR
18950 and that are not defined in the current unit.
18951
18952 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18953
18954 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18955 instead of a libcall for UNORDERED.
18956
18957 2018-02-09 Tamar Christina <tamar.christina@arm.com>
18958
18959 PR target/82641
18960 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18961 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18962
18963 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18964
18965 PR target/PR84295
18966 * config/s390/s390.c (s390_set_current_function): Invoke
18967 s390_indirect_branch_settings also if fndecl didn't change.
18968
18969 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
18970
18971 * config/rs6000/rs6000.md (blockage): Set length to zero.
18972
18973 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
18974
18975 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18976
18977 2018-02-09 Jakub Jelinek <jakub@redhat.com>
18978
18979 PR sanitizer/84285
18980 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18981 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18982 -static-lib*san.
18983
18984 PR debug/84252
18985 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18986 PARALLEL incoming that failed vt_get_decl_and_offset check.
18987
18988 PR middle-end/84237
18989 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18990 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18991 TREE_READONLY bit.
18992 (get_variable_section): For decls in named .bss* sections pass true as
18993 second argument to bss_initializer_p.
18994
18995 2018-02-09 Marek Polacek <polacek@redhat.com>
18996 Jakub Jelinek <jakub@redhat.com>
18997
18998 PR c++/83659
18999 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
19000 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
19001 Sync some changes from cxx_fold_indirect_ref.
19002
19003 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
19004
19005 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
19006 markers.
19007 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
19008 (BLOCK_INLINE_ENTRY_LABEL): New.
19009 (dwarf2out_var_location): Disregard inline entry markers.
19010 (inline_entry_data): New struct.
19011 (inline_entry_data_hasher): New hashtable type.
19012 (inline_entry_data_hasher::hash): New.
19013 (inline_entry_data_hasher::equal): New.
19014 (inline_entry_data_table): New variable.
19015 (add_high_low_attributes): Add DW_AT_entry_pc and
19016 DW_AT_GNU_entry_view attributes if a pending entry is found
19017 in inline_entry_data_table. Add old entry_pc attribute only
19018 if debug nonbinding markers are disabled.
19019 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
19020 markers are enabled.
19021 (block_within_block_p, dwarf2out_inline_entry): New.
19022 (dwarf2out_finish): Check that no entries remained in
19023 inline_entry_data_table.
19024 * final.c (reemit_insn_block_notes): Handle inline entry notes.
19025 (final_scan_insn, notice_source_line): Likewise.
19026 (rest_of_clean_state): Skip inline entry markers.
19027 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
19028 markers.
19029 * gimple.c (gimple_build_debug_inline_entry): New.
19030 * gimple.h (enum gimple_debug_subcode): Add
19031 GIMPLE_DEBUG_INLINE_ENTRY.
19032 (gimple_build_debug_inline_entry): Declare.
19033 (gimple_debug_inline_entry_p): New.
19034 (gimple_debug_nonbind_marker_p): Adjust.
19035 * insn-notes.def (INLINE_ENTRY): New.
19036 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
19037 inline entry marker notes.
19038 (print_insn): Likewise.
19039 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
19040 (INSN_DEBUG_MARKER_KIND): Likewise.
19041 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
19042 * tree-inline.c (expand_call_inline): Build and insert
19043 debug_inline_entry stmt.
19044 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
19045 inline entry blocks early, if nonbind markers are enabled.
19046 (dump_scope_block): Dump fragment info.
19047 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
19048 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
19049 (gimple_build_debug_inline_entry): New.
19050 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
19051 Enable/disable inline entry points too.
19052 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
19053 (DEBUG_INSN): Describe inline entry markers.
19054
19055 * common.opt (gvariable-location-views): New.
19056 (gvariable-location-views=incompat5): New.
19057 * config.in: Rebuilt.
19058 * configure: Rebuilt.
19059 * configure.ac: Test assembler for view support.
19060 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
19061 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
19062 * dwarf2out.c (var_loc_view): New typedef.
19063 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
19064 (dwarf2out_locviews_in_attribute): New.
19065 (dwarf2out_locviews_in_loclist): New.
19066 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
19067 (enum dw_line_info_opcode): Add LI_adv_address.
19068 (struct dw_line_info_table): Add view.
19069 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
19070 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
19071 (zero_view_p): New variable.
19072 (ZERO_VIEW_P): New macro.
19073 (output_asm_line_debug_info): New.
19074 (struct var_loc_node): Add view.
19075 (add_AT_view_list, AT_loc_list): New.
19076 (add_var_loc_to_decl): Add view param. Test it against last.
19077 (new_loc_list): Add view params. Record them.
19078 (AT_loc_list_ptr): Handle loc and view lists.
19079 (view_list_to_loc_list_val_node): New.
19080 (print_dw_val): Handle dw_val_class_view_list.
19081 (size_of_die): Likewise.
19082 (value_format): Likewise.
19083 (loc_list_has_views): New.
19084 (gen_llsym): Set vl_symbol too.
19085 (maybe_gen_llsym, skip_loc_list_entry): New.
19086 (dwarf2out_maybe_output_loclist_view_pair): New.
19087 (output_loc_list): Output view list or entries too.
19088 (output_view_list_offset): New.
19089 (output_die): Handle dw_val_class_view_list.
19090 (output_dwarf_version): New.
19091 (output_compilation_unit_header): Use it.
19092 (output_skeleton_debug_sections): Likewise.
19093 (output_rnglists, output_line_info): Likewise.
19094 (output_pubnames, output_aranges): Update version comments.
19095 (output_one_line_info_table): Output view numbers in asm comments.
19096 (dw_loc_list): Determine current endview, pass it to new_loc_list.
19097 Call maybe_gen_llsym.
19098 (loc_list_from_tree_1): Adjust.
19099 (add_AT_location_description): Create view list attribute if
19100 needed, check it's absent otherwise.
19101 (convert_cfa_to_fb_loc_list): Adjust.
19102 (maybe_emit_file): Call output_asm_line_debug_info for test.
19103 (dwarf2out_var_location): Reset views as needed. Precompute
19104 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
19105 attribute. Set view.
19106 (new_line_info_table): Reset next view.
19107 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19108 (dwarf2out_source_line): Likewise. Output view resets and labels to
19109 the assembler, or select appropriate line info opcodes.
19110 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19111 (optimize_string_length): Catch it. Adjust.
19112 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
19113 dw_val_class_view_list, and remove it if no longer needed.
19114 (hash_loc_list): Hash view numbers.
19115 (loc_list_hasher::equal): Compare them.
19116 (optimize_location_lists): Check whether a view list symbol is
19117 needed, and whether the locview attribute is present, and
19118 whether they match. Remove the locview attribute if no longer
19119 needed.
19120 (index_location_lists): Call skip_loc_list_entry for test.
19121 (dwarf2out_finish): Call output_asm_line_debug_info for test.
19122 Use output_dwarf_version.
19123 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19124 (struct dw_val_node): Add val_view_list.
19125 * final.c (SEEN_NEXT_VIEW): New.
19126 (set_next_view_needed): New.
19127 (clear_next_view_needed): New.
19128 (maybe_output_next_view): New.
19129 (final_start_function): Rename to...
19130 (final_start_function_1): ... this. Take pointer to FIRST,
19131 add SEEN parameter. Emit param bindings in the initial view.
19132 (final_start_function): Reintroduce SEEN-less interface.
19133 (final): Rename to...
19134 (final_1): ... this. Take SEEN parameter. Output final pending
19135 next view at the end.
19136 (final): Reintroduce seen-less interface.
19137 (final_scan_insn): Output pending next view before switching
19138 sections or ending a block. Mark the next view as needed when
19139 outputting variable locations. Notify debug backend of section
19140 changes, and of location view changes.
19141 (rest_of_handle_final): Adjust.
19142 * toplev.c (process_options): Autodetect value for debug variable
19143 location views option. Warn on incompat5 without -gdwarf-5.
19144 * doc/invoke.texi (gvariable-location-views): New.
19145 (gvariable-location-views=incompat5): New.
19146 (gno-variable-location-views): New.
19147
19148 2018-02-08 David Malcolm <dmalcolm@redhat.com>
19149
19150 PR tree-optimization/84136
19151 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19152 that the result of find_edge is non-NULL.
19153
19154 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19155
19156 PR target/83008
19157 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19158 storing integer register in SImode. Fix cost of 256 and 512
19159 byte aligned SSE register store.
19160
19161 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
19162
19163 * config/i386/i386.c (ix86_multiplication_cost): Fix
19164 multiplication cost for TARGET_AVX512DQ.
19165
19166 2018-02-08 Marek Polacek <polacek@redhat.com>
19167
19168 PR tree-optimization/84238
19169 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19170 get_range_strlen.
19171
19172 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19173
19174 PR tree-optimization/84265
19175 * tree-vect-stmts.c (vectorizable_store): Don't treat
19176 VMAT_CONTIGUOUS accesses as grouped.
19177 (vectorizable_load): Likewise.
19178
19179 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19180
19181 PR tree-optimization/81635
19182 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19183 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19184 (test_round_for_mask): New functions.
19185 (wide_int_cc_tests): Call test_round_for_mask.
19186 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19187 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19188 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19189 range returned by get_range_info.
19190
19191 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
19192
19193 PR ipa/81360
19194 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19195 * symtab.c: Include builtins.h
19196 (symtab_node::output_to_lto_symbol_table_p): Move here
19197 from lto-streamer-out.c:output_symbol_p.
19198 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19199 (output_symbol_p): Move all logic to symtab.c
19200 (produce_symtab): Update.
19201
19202 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19203
19204 * config/s390/s390-opts.h (enum indirect_branch): Define.
19205 * config/s390/s390-protos.h (s390_return_addr_from_memory)
19206 (s390_indirect_branch_via_thunk)
19207 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19208 (enum s390_indirect_branch_type): Define.
19209 * config/s390/s390.c (struct s390_frame_layout, struct
19210 machine_function): Remove.
19211 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19212 (indirect_branch_table_label_no, indirect_branch_table_name):
19213 Define variables.
19214 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19215 (enum s390_indirect_branch_option): Define.
19216 (s390_return_addr_from_memory): New function.
19217 (s390_handle_string_attribute): New function.
19218 (s390_attribute_table): Add new attribute handler.
19219 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19220 (s390_indirect_branch_via_thunk): New function.
19221 (s390_indirect_branch_via_inline_thunk): New function.
19222 (s390_function_ok_for_sibcall): When jumping via thunk disallow
19223 sibling call optimization for non z10 compiles.
19224 (s390_emit_call): Force indirect branch target to be a single
19225 register. Add r1 clobber for non-z10 compiles.
19226 (s390_emit_epilogue): Emit return jump via return_use expander.
19227 (s390_reorg): Handle JUMP_INSNs as execute targets.
19228 (s390_option_override_internal): Perform validity checks for the
19229 new command line options.
19230 (s390_indirect_branch_attrvalue): New function.
19231 (s390_indirect_branch_settings): New function.
19232 (s390_set_current_function): Invoke s390_indirect_branch_settings.
19233 (s390_output_indirect_thunk_function): New function.
19234 (s390_code_end): Implement target hook.
19235 (s390_case_values_threshold): Implement target hook.
19236 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19237 macros.
19238 * config/s390/s390.h (struct s390_frame_layout)
19239 (struct machine_function): Move here from s390.c.
19240 (TARGET_INDIRECT_BRANCH_NOBP_RET)
19241 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19242 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19243 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19244 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19245 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19246 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19247 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19248 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19249 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19250 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19251 (mnemonic attribute): Add values which aren't recognized
19252 automatically.
19253 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19254 pattern for branch conversion. Fix mnemonic attribute.
19255 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19256 indirect branch via thunk if requested.
19257 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19258 ("*indirect_jump"): Disable for branch conversion using out of
19259 line thunks.
19260 ("indirect_jump_via_thunk<mode>_z10")
19261 ("indirect_jump_via_thunk<mode>")
19262 ("indirect_jump_via_inlinethunk<mode>_z10")
19263 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19264 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19265 ("casesi_jump_via_inlinethunk<mode>_z10")
19266 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19267 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19268 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19269 ("*indirect2_jump"): Disable for branch conversion.
19270 ("casesi_jump"): Turn into expander and expand patterns for branch
19271 conversion.
19272 ("return_use"): New expander.
19273 ("*return"): Emit return via thunk and rename it to ...
19274 ("*return<mode>"): ... this one.
19275 * config/s390/s390.opt: Add new options and and enum for the
19276 option values.
19277
19278 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
19279
19280 * lra-constraints.c (match_reload): Unconditionally use
19281 gen_lowpart_SUBREG, rather than selecting between that
19282 and equivalent gen_rtx_SUBREG code.
19283
19284 2018-02-08 Richard Biener <rguenther@suse.de>
19285
19286 PR tree-optimization/84233
19287 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19288 changed flag instead of boguously re-using phi_inserted.
19289
19290 2018-02-08 Martin Jambor <mjambor@suse.cz>
19291
19292 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19293 static local variables.
19294
19295 2018-02-08 Richard Biener <rguenther@suse.de>
19296
19297 PR tree-optimization/84278
19298 * tree-vect-stmts.c (vectorizable_store): When looking for
19299 smaller vector types to perform grouped strided loads/stores
19300 make sure the mode is supported by the target.
19301 (vectorizable_load): Likewise.
19302
19303 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19304
19305 * config/aarch64/aarch64.c (aarch64_components_for_bb):
19306 Increase LDP/STP opportunities by adding adjacent callee-saves.
19307
19308 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
19309
19310 PR rtl-optimization/84068
19311 PR rtl-optimization/83459
19312 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19313
19314 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
19315
19316 PR tree-optimization/84224
19317 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19318 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19319 non-zero arguments.
19320
19321 2018-02-07 Iain Sandoe <iain@codesourcery.com>
19322
19323 PR target/84113
19324 * config/rs6000/altivec.md (*restore_world): Remove LR use.
19325 * config/rs6000/predicates.md (restore_world_operation): Adjust op
19326 count, remove one USE.
19327
19328 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19329
19330 * doc/install.texi (Configuration): Document the
19331 --with-long-double-format={ibm,ieee} PowerPC configuration
19332 options.
19333
19334 PR target/84154
19335 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19336 Convert from define_expand to be define_insn_and_split. Rework
19337 float/double/_Float128 conversions to QI/HI/SImode to work with
19338 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
19339 conversions to QI/HImode types did a store and then a load to
19340 truncate the value. For conversions to VSX registers, don't split
19341 the insn, instead emit the code directly. Use the code iterator
19342 any_fix to combine signed and unsigned conversions.
19343 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19344 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19345 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19346 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19347 (fix_<mode>di2_hw): Likewise.
19348 (fixuns_<mode>di2_hw): Likewise.
19349 (fix_<mode>si2_hw): Likewise.
19350 (fixuns_<mode>si2_hw): Likewise.
19351 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19352 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19353 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19354 fix<uns>_trunc<SFDF:mode>si2_p8.
19355 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19356 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19357 (fix<uns>_<mode>_mem): Likewise.
19358 (fctiw<u>z_<mode>_mem): Likewise.
19359 (fix<uns>_<mode>_mem): Likewise.
19360 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19361 the register allocator from doing a direct move to the GPRs to do
19362 a store, and instead use the ISA 3.0 store byte/half-word from
19363 vector register instruction. For IEEE 128-bit floating point,
19364 also optimize stores of 32-bit ints.
19365 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19366
19367 2018-02-07 Alan Hayward <alan.hayward@arm.com>
19368
19369 * genextract.c (push_pathstr_operand): New function to support
19370 [a-zA-Z].
19371 (walk_rtx): Call push_pathstr_operand.
19372 (print_path): Support [a-zA-Z].
19373
19374 2018-02-07 Richard Biener <rguenther@suse.de>
19375
19376 PR tree-optimization/84037
19377 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19378 (cse_and_gimplify_to_preheader): Declare.
19379 (vect_get_place_in_interleaving_chain): Likewise.
19380 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19381 ivexpr_map.
19382 (_loop_vec_info::~_loop_vec_info): Delete it.
19383 (cse_and_gimplify_to_preheader): New function.
19384 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19385 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19386 (vectorizable_load): Likewise. For grouped stores always base
19387 the IV on the first element.
19388 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19389 condition before gimplifying.
19390
19391 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19392
19393 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19394 *DIV_EXPR and *MOD_EXPR.
19395
19396 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
19397
19398 PR target/84248
19399 * config/i386/i386.c (ix86_option_override_internal): Mask out
19400 the CF_SET bit when checking -fcf-protection.
19401
19402 2018-02-07 Tom de Vries <tom@codesourcery.com>
19403
19404 PR libgomp/84217
19405 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19406 enough.
19407
19408 2018-02-07 Richard Biener <rguenther@suse.de>
19409
19410 PR tree-optimization/84204
19411 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19412 this place.
19413
19414 PR tree-optimization/84205
19415 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19416 special-case isl_ast_op_zdiv_r.
19417
19418 PR tree-optimization/84223
19419 * graphite-scop-detection.c (gather_bbs::before_dom_children):
19420 Only add conditions from within the region.
19421 (gather_bbs::after_dom_children): Adjust.
19422
19423 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
19424
19425 PR target/84209
19426 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19427 * config/avr/avr.md: Only post-reload split REG-REG moves if
19428 either register is GENERAL_REG_P.
19429
19430 2018-02-07 Jakub Jelinek <jakub@redhat.com>
19431
19432 PR tree-optimization/84235
19433 * tree-ssa-scopedtables.c
19434 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19435 if the subtraction is performed in floating point type where NaNs are
19436 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19437 build 1. Formatting fix.
19438
19439 2018-02-06 Jakub Jelinek <jakub@redhat.com>
19440
19441 PR target/84146
19442 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19443 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19444 and skip it regardless of bb boundaries. Use CALL_P macro,
19445 don't test INSN_P (insn) together with CALL_P or JUMP_P check
19446 unnecessarily, formatting fix.
19447
19448 2018-02-06 Michael Collison <michael.collison@arm.com>
19449
19450 * config/arm/thumb2.md:
19451 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19452 (*thumb_mov_notscc): Ditto.
19453
19454 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
19455
19456 PR target/84154
19457 * config/rs6000/rs6000.md (su code attribute): Use "u" for
19458 unsigned_fix, not "s".
19459
19460 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19461
19462 * configure.ac (gcc_fn_eh_frame_ro): New function.
19463 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19464 correct .eh_frame permissions.
19465 * configure: Regenerate.
19466
19467 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
19468
19469 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19470 irrelevant options.
19471
19472 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19473
19474 * config/rs6000/rs6000.c (rs6000_option_override_internal):
19475 Display warning message for -mno-speculate-indirect-jumps.
19476
19477 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
19478
19479 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19480 Undocumented.
19481 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19482
19483 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
19484
19485 PR tree-optimization/84225
19486 * tree-eh.c (find_trapping_overflow): Only call
19487 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19488
19489 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19490
19491 PR target/84145
19492 * config/i386/i386.c: Reimplement the check of possible options
19493 -mibt/-mshstk conbination. Change error messages.
19494 * doc/invoke.texi: Fix a typo: remove extra '='.
19495
19496 2018-02-06 Marek Polacek <polacek@redhat.com>
19497
19498 PR tree-optimization/84228
19499 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19500
19501 2018-02-06 Tamar Christina <tamar.christina@arm.com>
19502
19503 PR target/82641
19504 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19505 emitted arch directives.
19506 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19507 __ARM_FEATURE_COPROC before changing architectures.
19508
19509 2018-02-06 Richard Biener <rguenther@suse.de>
19510
19511 * config/i386/i386.c (print_reg): Fix typo.
19512 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19513
19514 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
19515
19516 * configure: Regenerate.
19517
19518 2018-02-05 Martin Sebor <msebor@redhat.com>
19519
19520 PR tree-optimization/83369
19521 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19522 inlining context.
19523
19524 2018-02-05 Martin Liska <mliska@suse.cz>
19525
19526 * doc/invoke.texi: Cherry-pick upstream r323995.
19527
19528 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
19529
19530 * ira.c (ira_init_register_move_cost): Adjust comment.
19531
19532 2018-02-05 Martin Liska <mliska@suse.cz>
19533
19534 PR gcov-profile/84137
19535 * doc/gcov.texi: Fix typo in documentation.
19536
19537 2018-02-05 Martin Liska <mliska@suse.cz>
19538
19539 PR gcov-profile/83879
19540 * doc/gcov.texi: Document necessity of --dynamic-list-data when
19541 using dlopen functionality.
19542
19543 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
19544
19545 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19546 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19547 _mm_maskz_range_ss, _mm_mask_range_round_ss,
19548 _mm_maskz_range_round_ss): New intrinsics.
19549 (__builtin_ia32_rangesd128_round)
19550 (__builtin_ia32_rangess128_round): Remove.
19551 (__builtin_ia32_rangesd128_mask_round,
19552 __builtin_ia32_rangess128_mask_round): New builtins.
19553 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19554 __builtin_ia32_rangess128_round): Remove.
19555 (__builtin_ia32_rangesd128_mask_round,
19556 __builtin_ia32_rangess128_mask_round): New builtins.
19557 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19558 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19559 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19560 "<round_saeonly_constraint>")): Changed to ...
19561 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19562 "<round_saeonly_scalar_constraint>")): ... this.
19563 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19564 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19565 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19566 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19567 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19568
19569 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
19570
19571 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19572 options.
19573 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19574 Remove all values except native, 8540 and 8548.
19575
19576 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
19577
19578 * config/i386/i386.c (ix86_output_function_return): Pass
19579 INVALID_REGNUM, instead of -1, as invalid register number to
19580 indirect_thunk_name and output_indirect_thunk.
19581
19582 2018-02-02 Julia Koval <julia.koval@intel.com>
19583
19584 * config.gcc: Add -march=icelake.
19585 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19586 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19587 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19588 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19589 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19590 (processor_target_table): Add icelake.
19591 (ix86_option_override_internal): Handle new PTAs.
19592 (get_builtin_code_for_version): Handle icelake.
19593 (M_INTEL_COREI7_ICELAKE): New.
19594 (fold_builtin_cpu): Handle icelake.
19595 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19596 * doc/invoke.texi: Add -march=icelake.
19597
19598 2018-02-02 Julia Koval <julia.koval@intel.com>
19599
19600 * config/i386/i386.c (ix86_option_override_internal): Change flags type
19601 to wide_int_bitmask.
19602 * wide-int-bitmask.h: New.
19603
19604 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
19605
19606 PR target/84066
19607 * config/i386/i386.md: Replace Pmode with word_mode in
19608 builtin_setjmp_setup and builtin_longjmp to support x32.
19609
19610 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
19611
19612 PR target/56010
19613 PR target/83743
19614 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19615 #include "opts.h".
19616 (rs6000_supported_cpu_names): New static variable.
19617 (linux_cpu_translation_table): Likewise.
19618 (elf_platform) <cpu>: Define new static variable and use it.
19619 Translate kernel AT_PLATFORM name to canonical name if needed.
19620 Error if platform name is unknown.
19621
19622 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
19623
19624 PR target/84089
19625 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19626
19627 2018-02-01 Jeff Law <law@redhat.com>
19628
19629 PR target/84128
19630 * config/i386/i386.c (release_scratch_register_on_entry): Add new
19631 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
19632 the scratch if RELEASE_VIA_POP is false.
19633 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19634 If we have to save a temporary register, decrement SIZE appropriately.
19635 Pass new arguments to release_scratch_register_on_entry.
19636 (ix86_adjust_stack_and_probe): Likewise.
19637 (ix86_emit_probe_stack_range): Pass new arguments to
19638 release_scratch_register_on_entry.
19639
19640 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
19641
19642 PR rtl-optimization/84157
19643 * combine.c (change_zero_ext): Use REG_P predicate in
19644 front of HARD_REGISTER_P predicate.
19645
19646 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
19647
19648 * config/avr/avr.c (avr_option_override): Move disabling of
19649 -fdelete-null-pointer-checks to...
19650 * common/config/avr/avr-common.c (avr_option_optimization_table):
19651 ...here.
19652
19653 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19654
19655 PR tree-optimization/81635
19656 * tree-data-ref.c (split_constant_offset_1): For types that
19657 wrap on overflow, try to use range info to prove that wrapping
19658 cannot occur.
19659
19660 2018-02-01 Renlin Li <renlin.li@arm.com>
19661
19662 PR target/83370
19663 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19664 TAILCALL_ADDR_REGS.
19665 (aarch64_register_move_cost): Likewise.
19666 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19667 TAILCALL_ADDR_REGS.
19668 (REG_CLASS_NAMES): Likewise.
19669 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19670 TAILCALL_ADDR_REGS. Remove IP registers.
19671 * config/aarch64/aarch64.md (Ucs): Update register constraint.
19672
19673 2018-02-01 Richard Biener <rguenther@suse.de>
19674
19675 * domwalk.h (dom_walker::dom_walker): Add additional constructor
19676 for specifying RPO order and allow NULL for that.
19677 * domwalk.c (dom_walker::dom_walker): Likewise.
19678 (dom_walker::walk): Handle NULL RPO order.
19679 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19680 in RPO order.
19681 (rewrite_update_dom_walker): Likewise.
19682 (mark_def_dom_walker): Likewise.
19683
19684 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19685
19686 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19687 (aarch64_maybe_expand_sve_subreg_move): Declare.
19688 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19689 * config/aarch64/predicates.md (aarch64_any_register_operand): New
19690 predicate.
19691 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19692 that are semantically a reverse operation.
19693 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19694 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19695 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19696 functions.
19697 (aarch64_can_change_mode_class): For big-endian, forbid changes
19698 between two SVE modes if they have different element sizes.
19699
19700 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19701
19702 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19703 the TImode handling for big-endian targets.
19704
19705 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19706
19707 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19708 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
19709 not just bytes.
19710 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19711 Remove BSWAP handing for big-endian targets and use the form of
19712 LD1RQ appropariate for the mode.
19713
19714 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19715
19716 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19717 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19718 duplicated element.
19719
19720 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
19721
19722 PR tearget/83845
19723 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19724 check for operands that need to go through aarch64_sve_reload_be.
19725
19726 2018-02-01 Jakub Jelinek <jakub@redhat.com>
19727
19728 PR tree-optimization/81661
19729 PR tree-optimization/84117
19730 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19731 * tree-eh.c: Include gimplify.h.
19732 (find_trapping_overflow, replace_trapping_overflow,
19733 rewrite_to_non_trapping_overflow): New functions.
19734 * tree-vect-loop.c: Include tree-eh.h.
19735 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19736 * tree-data-ref.c: Include tree-eh.h.
19737 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19738
19739 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
19740
19741 PR rtl-optimization/84123
19742 * combine.c (change_zero_ext): Check if hard register satisfies
19743 can_change_dest_mode before calling gen_lowpart_SUBREG.
19744
19745 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
19746
19747 PR target/82444
19748 * ira.c (ira_init_register_move_cost): Remove assert.
19749
19750 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19751
19752 PR rtl-optimization/84071
19753 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19754 * doc/tm.texi: Regenerate.
19755
19756 2018-01-31 Richard Biener <rguenther@suse.de>
19757
19758 PR tree-optimization/84132
19759 * tree-data-ref.c (analyze_miv_subscript): Properly
19760 check whether evolution_function_is_affine_multivariate_p
19761 before calling gcd_of_steps_may_divide_p.
19762
19763 2018-01-31 Julia Koval <julia.koval@intel.com>
19764
19765 PR target/83618
19766 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19767 * config/i386/i386.md (rdpid_rex64) New.
19768 (rdpid): Make 32bit only.
19769
19770 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
19771
19772 PR lto/84105
19773 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19774 an IDENTIFIER_NODE for FUNCTION_TYPE's.
19775
19776 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19777
19778 Revert
19779 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
19780
19781 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19782
19783 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
19784
19785 PR rtl-optimization/84071
19786 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19787 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19788
19789 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19790
19791 * config/arc/arc.c (arc_handle_aux_attribute): New function.
19792 (arc_attribute_table): Add 'aux' attribute.
19793 (arc_in_small_data_p): Consider aux like variables.
19794 (arc_is_aux_reg_p): New function.
19795 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19796 (arc_get_aux_arg): New function.
19797 (prepare_move_operands): Handle aux-register access.
19798 (arc_handle_aux_attribute): New function.
19799 * doc/extend.texi (ARC Variable attributes): Add subsection.
19800
19801 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
19802
19803 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19804 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19805 (arc_attribute_table): Add 'uncached' attribute.
19806 (arc_print_operand): Print '.di' flag for uncached memory
19807 accesses.
19808 (arc_in_small_data_p): Do not consider for small data the uncached
19809 types.
19810 (arc_is_uncached_mem_p): New function.
19811 * config/arc/predicates.md (compact_store_memory_operand): Check
19812 for uncached memory accesses.
19813 (nonvol_nonimm_operand): Likewise.
19814 * doc/extend.texi (ARC Type Attribute): New subsection.
19815
19816 2018-01-31 Jakub Jelinek <jakub@redhat.com>
19817
19818 PR c/84100
19819 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19820 falign-loops=): Add Optimization flag.
19821
19822 2018-01-30 Jeff Law <law@redhat.com>
19823
19824 PR target/84064
19825 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19826 INT_REGISTERS_SAVED. Check it prior to calling
19827 get_scratch_register_on_entry.
19828 (ix86_adjust_stack_and_probe): Similarly.
19829 (ix86_emit_probe_stack_range): Similarly.
19830 (ix86_expand_prologue): Corresponding changes.
19831
19832 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19833
19834 PR target/40411
19835 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19836 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19837
19838 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
19839
19840 PR target/84112
19841 * lra-constraints.c (curr_insn_transform): Process AND in the
19842 address.
19843
19844 2018-01-30 Jakub Jelinek <jakub@redhat.com>
19845
19846 PR rtl-optimization/83986
19847 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19848 dependence against last_pending_memory_flush in addition to
19849 pending_jump_insns.
19850
19851 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
19852
19853 PR tree-optimization/81611
19854 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19855 copies.
19856
19857 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19858
19859 PR target/83758
19860 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19861 a reg rtx.
19862
19863 2018-01-30 Richard Biener <rguenther@suse.de>
19864 Jakub Jelinek <jakub@redhat.com>
19865
19866 PR tree-optimization/84111
19867 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19868 inner loops added during recursion, as they don't have up-to-date
19869 SSA form.
19870
19871 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19872
19873 PR ipa/81360
19874 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19875 (can_inline_edge_by_limits_p): ... here.
19876 (can_early_inline_edge_p, check_callers,
19877 update_caller_keys, update_callee_keys, recursive_inlining,
19878 add_new_edges_to_heap, speculation_useful_p,
19879 inline_small_functions,
19880 inline_small_functions, flatten_function,
19881 inline_to_all_callers_1): Update.
19882
19883 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
19884
19885 * profile-count.c (profile_count::combine_with_ipa_count): Handle
19886 zeros correctly.
19887
19888 2018-01-30 Richard Biener <rguenther@suse.de>
19889
19890 PR tree-optimization/83008
19891 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19892 invariant and constant vector uses in stmts when they need
19893 more than one stmt.
19894
19895 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19896
19897 PR bootstrap/84017
19898 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19899 * configure: Regenerate.
19900
19901 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19902
19903 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19904 pattern.
19905 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19906 Use gen_rtx_REG rather than gen_lowpart.
19907
19908 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19909
19910 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19911 rather than 0 when creating partial subregs.
19912
19913 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
19914
19915 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19916 of usage.
19917
19918 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
19919
19920 PR target/81550
19921 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19922 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19923 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19924 flags. This restores the settings used before the 2017-07-24.
19925 Turning off pre increment/decrement/modify allows IVOPTS to
19926 optimize DF/SF loops where the index is an int.
19927
19928 2018-01-29 Richard Biener <rguenther@suse.de>
19929 Kelvin Nilsen <kelvin@gcc.gnu.org>
19930
19931 PR bootstrap/80867
19932 * tree-vect-stmts.c (vectorizable_call): Don't call
19933 targetm.vectorize_builtin_md_vectorized_function if callee is
19934 NULL.
19935
19936 2018-01-22 Carl Love <cel@us.ibm.com>
19937
19938 * doc/extend.tex: Fix typo in second arg in
19939 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19940
19941 2018-01-29 Richard Biener <rguenther@suse.de>
19942
19943 PR tree-optimization/84086
19944 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19945 (flush_ssaname_freelist): When SSA names were released reset
19946 the SCEV hash table.
19947
19948 2018-01-29 Richard Biener <rguenther@suse.de>
19949
19950 PR tree-optimization/84057
19951 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19952 removed paths when removing edges.
19953
19954 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
19955
19956 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19957 -mfunction-return=@var{choice}.
19958
19959 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
19960
19961 PR diagnostic/84034
19962 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19963 Handle CR like TAB.
19964 (layout::print_source_line): Likewise.
19965 (test_get_line_width_without_trailing_whitespace): Add test cases.
19966
19967 2018-01-27 Jakub Jelinek <jakub@redhat.com>
19968
19969 PR middle-end/84040
19970 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19971 debug insns.
19972
19973 2018-01-26 Jim Wilson <jimw@sifive.com>
19974
19975 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19976
19977 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19978 specified.
19979
19980 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19981
19982 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19983 and CMP + SUB-immediate -> SUBS.
19984
19985 2018-01-26 Martin Sebor <msebor@redhat.com>
19986
19987 PR tree-optimization/83896
19988 * tree-ssa-strlen.c (get_string_len): Rename...
19989 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
19990 Avoid assuming length is constant.
19991 (handle_char_store): Use HOST_WIDE_INT for string length.
19992
19993 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
19994
19995 PR target/81763
19996 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19997 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19998
19999 2018-01-26 Richard Biener <rguenther@suse.de>
20000
20001 PR rtl-optimization/84003
20002 * dse.c (record_store): Only record redundant stores when
20003 the earlier store aliases at least all accesses the later one does.
20004
20005 2018-01-26 Jakub Jelinek <jakub@redhat.com>
20006
20007 PR rtl-optimization/83985
20008 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
20009 REG_CFA_RESTORE insns.
20010 (delete_unmarked_insns): Don't ignore separate shrink wrapping
20011 REG_CFA_RESTORE insns here.
20012
20013 PR c/83989
20014 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
20015 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
20016
20017 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20018
20019 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
20020 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
20021 (arc_init): Likewise.
20022 (arc_override_options): Likewise.
20023 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
20024 value.
20025 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
20026 support.
20027 * config/arc/arc.h (TARGET_DBNZ): Define.
20028 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
20029 properly set the tune attribute.
20030 (dbnz): Use TARGET_DBNZ guard.
20031 * config/arc/arc.opt (mtune): Add core3 option.
20032
20033 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20034
20035 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
20036 recognize new pic like addresses.
20037 (arc_delegitimize_address): Clean up.
20038
20039 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20040
20041 * config/arc/arc-arches.def: Option mrf16 valid for all
20042 architectures.
20043 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
20044 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
20045 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
20046 * config/arc/arc-tables.opt: Regenerate.
20047 * config/arc/arc.c (arc_conditional_register_usage): Handle
20048 reduced register file case.
20049 (arc_file_start): Set must have build attributes.
20050 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
20051 mrf16 option value.
20052 * config/arc/arc.opt (mrf16): Add new option.
20053 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
20054 * config/arc/genmultilib.awk: Handle new mrf16 option.
20055 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
20056 * config/arc/t-multilib: Regenerate.
20057 * doc/invoke.texi (ARC Options): Document mrf16 option.
20058
20059 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20060
20061 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
20062 * config/arc/arc.c (arc_handle_secure_attribute): New function.
20063 (arc_attribute_table): Add 'secure_call' attribute.
20064 (arc_print_operand): Print secure call operand.
20065 (arc_function_ok_for_sibcall): Don't optimize tail calls when
20066 secure.
20067 (arc_is_secure_call_p): New function. * config/arc/arc.md
20068 (call_i): Add support for sjli instruction.
20069 (call_value_i): Likewise.
20070 * config/arc/constraints.md (Csc): New constraint.
20071
20072 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
20073 John Eric Martin <John.Martin@emmicro-us.com>
20074
20075 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
20076 * config/arc/arc.c (_arc_jli_section): New struct.
20077 (arc_jli_section): New type.
20078 (rc_jli_sections): New static variable.
20079 (arc_handle_jli_attribute): New function.
20080 (arc_attribute_table): Add jli_always and jli_fixed attribute.
20081 (arc_file_end): New function.
20082 (TARGET_ASM_FILE_END): Define.
20083 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
20084 (arc_add_jli_section): New function.
20085 (jli_call_scan): Likewise.
20086 (arc_reorg): Call jli_call_scan.
20087 (arc_output_addsi): Remove 'S' from printing asm operand.
20088 (arc_is_jli_call_p): New function.
20089 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
20090 operand.
20091 (movhi_insn): Likewise.
20092 (movsi_insn): Likewise.
20093 (movsi_set_cc_insn): Likewise.
20094 (loadqi_update): Likewise.
20095 (load_zeroextendqisi_update): Likewise.
20096 (load_signextendqisi_update): Likewise.
20097 (loadhi_update): Likewise.
20098 (load_zeroextendhisi_update): Likewise.
20099 (load_signextendhisi_update): Likewise.
20100 (loadsi_update): Likewise.
20101 (loadsf_update): Likewise.
20102 (movsicc_insn): Likewise.
20103 (bset_insn): Likewise.
20104 (bxor_insn): Likewise.
20105 (bclr_insn): Likewise.
20106 (bmsk_insn): Likewise.
20107 (bicsi3_insn): Likewise.
20108 (cmpsi_cc_c_insn): Likewise.
20109 (movsi_ne): Likewise.
20110 (movsi_cond_exec): Likewise.
20111 (clrsbsi2): Likewise.
20112 (norm_f): Likewise.
20113 (normw): Likewise.
20114 (swap): Likewise.
20115 (divaw): Likewise.
20116 (flag): Likewise.
20117 (sr): Likewise.
20118 (kflag): Likewise.
20119 (ffs): Likewise.
20120 (ffs_f): Likewise.
20121 (fls): Likewise.
20122 (call_i): Remove 'S' asm letter, add jli instruction.
20123 (call_value_i): Likewise.
20124 * config/arc/arc.op (mjli-always): New option.
20125 * config/arc/constraints.md (Cji): New constraint.
20126 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20127 operand.
20128 (subsf3_fpx): Likewise.
20129 (mulsf3_fpx): Likewise.
20130 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20131 asm operand.
20132 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20133 function attrbutes.
20134 * doc/invoke.texi (ARC): Document mjli-always option.
20135
20136 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
20137
20138 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20139 avoid addition with 0 and use incw and decw where possible.
20140
20141 2018-01-26 Richard Biener <rguenther@suse.de>
20142
20143 PR tree-optimization/81082
20144 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20145 association if it requires casting to unsigned.
20146 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20147 from fold_plusminus_mult_expr to catch important cases late when
20148 range info is available.
20149
20150 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20151
20152 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20153 * configure.ac (hidden_linkonce): New test.
20154 * configure: Regenerate.
20155 * config.in: Regenerate.
20156
20157 2018-01-26 Julia Koval <julia.koval@intel.com>
20158
20159 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20160 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20161 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20162 _mm_mask_bitshuffle_epi64_mask): Fix type.
20163 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20164 USI_FTYPE_V4DI_V4DI_USI): Remove.
20165 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20166 __builtin_ia32_vpshufbitqmb256_mask,
20167 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20168 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20169 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20170
20171 2018-01-26 Alan Modra <amodra@gmail.com>
20172
20173 PR target/84033
20174 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20175 UNSPEC_VBPERMQ. Sort other unspecs.
20176
20177 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
20178
20179 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20180
20181 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
20182
20183 PR middle-end/83055
20184 * predict.c (drop_profile): Do not push/pop cfun; update also
20185 node->count.
20186 (handle_missing_profiles): Fix logic looking for zero profiles.
20187
20188 2018-01-25 Jakub Jelinek <jakub@redhat.com>
20189
20190 PR middle-end/83977
20191 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20192 on functions with #pragma omp declare simd or functions with simd
20193 attribute.
20194 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20195 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20196 Remove trailing \n from warning_at calls.
20197
20198 2018-01-25 Tom de Vries <tom@codesourcery.com>
20199
20200 PR target/84028
20201 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20202 for neutered workers.
20203
20204 2018-01-24 Joseph Myers <joseph@codesourcery.com>
20205
20206 PR target/68467
20207 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20208 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20209
20210 2018-01-24 Jeff Law <law@redhat.com>
20211
20212 PR target/83994
20213 * i386.c (get_probe_interval): Move to earlier point.
20214 (ix86_compute_frame_layout): If -fstack-clash-protection and
20215 the frame is larger than the probe interval, then use pushes
20216 to save registers rather than reg->mem moves.
20217 (ix86_expand_prologue): Remove conditional for int_registers_saved
20218 assertion.
20219
20220 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
20221
20222 PR target/84014
20223 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20224 min/max for never referenced object.
20225
20226 2018-01-24 Jakub Jelinek <jakub@redhat.com>
20227
20228 PR middle-end/83977
20229 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20230 here.
20231 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20232 attributes from DECL_ATTRIBUTES (decl) without affecting
20233 DECL_ATTRIBUTES (current_function_decl).
20234 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20235 functions with non-NULL DECL_ABSTRACT_ORIGIN.
20236
20237 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
20238
20239 PR tree-optimization/83979
20240 * fold-const.c (fold_comparison): Use constant_boolean_node
20241 instead of boolean_{true,false}_node.
20242
20243 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
20244
20245 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20246 with zero counts.
20247
20248 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20249
20250 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20251 Simplify the clause that sets the length attribute.
20252 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20253 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20254 clause that sets the length attribute.
20255 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20256
20257 2018-01-24 Tom de Vries <tom@codesourcery.com>
20258
20259 PR target/83589
20260 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20261 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20262 Add strict parameter.
20263 (prevent_branch_around_nothing): Insert dummy insn between branch to
20264 label and label with no ptx insn inbetween.
20265 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20266
20267 2018-01-24 Tom de Vries <tom@codesourcery.com>
20268
20269 PR target/81352
20270 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20271 for neutered threads in warp.
20272 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20273
20274 2018-01-24 Richard Biener <rguenther@suse.de>
20275
20276 PR tree-optimization/83176
20277 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20278 operands.
20279
20280 2018-01-24 Richard Biener <rguenther@suse.de>
20281
20282 PR tree-optimization/82819
20283 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20284 code generating pluses that are no-ops in the target precision.
20285
20286 2018-01-24 Richard Biener <rguenther@suse.de>
20287
20288 PR middle-end/84000
20289 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20290
20291 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20292
20293 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20294 to merge probabilities.
20295 * predict.c (probably_never_executed): Also mark as cold functions
20296 with global 0 profile and guessed local profile.
20297 * profile-count.c (profile_probability::combine_with_count): New
20298 member function.
20299 * profile-count.h (profile_probability::operator*,
20300 profile_probability::operator*=, profile_probability::operator/,
20301 profile_probability::operator/=): Reduce precision to adjusted
20302 and set value to guessed on contradictory divisions.
20303 (profile_probability::combine_with_freq): Remove.
20304 (profile_probability::combine_wiht_count): Declare.
20305 (profile_count::force_nonzero):: Set to adjusted.
20306 (profile_count::probability_in):: Set quality to adjusted.
20307 * tree-ssa-tail-merge.c (replace_block_by): Use
20308 combine_with_count.
20309
20310 2018-01-23 Andrew Waterman <andrew@sifive.com>
20311 Jim Wilson <jimw@sifive.com>
20312
20313 * config/riscv/riscv.c (riscv_stack_boundary): New.
20314 (riscv_option_override): Set riscv_stack_boundary. Handle
20315 riscv_preferred_stack_boundary_arg.
20316 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20317 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20318 (STACK_BOUNDARY): Set to riscv_stack_boundary.
20319 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20320 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20321 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20322
20323 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
20324
20325 PR target/83905
20326 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20327 of struct ix86_frame.
20328 (ix86_expand_epilogue): Likewise. Add a local variable for
20329 the reg_save_offset field in struct ix86_frame.
20330
20331 2018-01-23 Bin Cheng <bin.cheng@arm.com>
20332
20333 PR tree-optimization/82604
20334 * tree-loop-distribution.c (enum partition_kind): New enum item
20335 PKIND_PARTIAL_MEMSET.
20336 (partition_builtin_p): Support above new enum item.
20337 (generate_code_for_partition): Ditto.
20338 (compute_access_range): Differentiate cases that equality can be
20339 proven at all loops, the innermost loops or no loops.
20340 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20341 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
20342 (finalize_partitions, distribute_loop): Don't fuse partition of
20343 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20344 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20345 parloop is enabled.
20346
20347 2018-01-23 Martin Liska <mliska@suse.cz>
20348
20349 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20350 order to ignore the predictor.
20351 (PRED_POLYMORPHIC_CALL): Likewise.
20352 (PRED_RECURSIVE_CALL): Likewise.
20353
20354 2018-01-23 Martin Liska <mliska@suse.cz>
20355
20356 * tree-profile.c (tree_profiling): Print function header to
20357 aware reader which function we are working on.
20358 * value-prof.c (gimple_find_values_to_profile): Do not print
20359 not interesting value histograms.
20360
20361 2018-01-23 Martin Liska <mliska@suse.cz>
20362
20363 * profile-count.h (enum profile_quality): Add
20364 profile_uninitialized as the first value. Do not number values
20365 as they are zero based.
20366 (profile_count::verify): Update sanity check.
20367 (profile_probability::verify): Likewise.
20368
20369 2018-01-23 Nathan Sidwell <nathan@acm.org>
20370
20371 * doc/invoke.texi (ffor-scope): Deprecate.
20372
20373 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20374
20375 PR tree-optimization/83510
20376 * domwalk.c (set_all_edges_as_executable): New function.
20377 (dom_walker::dom_walker): Convert bool param
20378 "skip_unreachable_blocks" to enum reachability. Move setup of
20379 edge flags to set_all_edges_as_executable and only do it when
20380 reachability is REACHABLE_BLOCKS.
20381 * domwalk.h (enum dom_walker::reachability): New enum.
20382 (dom_walker::dom_walker): Convert bool param
20383 "skip_unreachable_blocks" to enum reachability.
20384 (set_all_edges_as_executable): New decl.
20385 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
20386 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20387 "reachability".
20388 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20389 but converting true to REACHABLE_BLOCKS.
20390 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20391 * tree-vrp.c
20392 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20393 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20394 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20395 REACHABLE_BLOCKS.
20396 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20397 if check_all_array_refs will be called.
20398
20399 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20400
20401 * tree.c (selftest::test_location_wrappers): Add more test
20402 coverage.
20403
20404 2018-01-23 David Malcolm <dmalcolm@redhat.com>
20405
20406 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20407 (selftest::test_bit_in_range): Likewise.
20408
20409 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20410
20411 PR testsuite/83888
20412 * doc/sourcebuild.texi (vect_float): Say that the selector
20413 only describes the situation when -funsafe-math-optimizations is on.
20414 (vect_float_strict): Document.
20415
20416 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
20417
20418 PR tree-optimization/83965
20419 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20420 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20421 instead of checking only for a reduction.
20422 (vect_recog_widen_sum_pattern): Likewise.
20423
20424 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20425
20426 * predict.c (probably_never_executed): Only use precise profile info.
20427 (compute_function_frequency): Skip after inlining hack since we now
20428 have quality checking.
20429
20430 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
20431
20432 * profile-count.h (profile_probability::very_unlikely,
20433 profile_probability::unlikely, profile_probability::even): Set
20434 precision to guessed.
20435
20436 2018-01-23 Richard Biener <rguenther@suse.de>
20437
20438 PR tree-optimization/83963
20439 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20440 Properly terminate dominator walk when crossing the exit edge not
20441 when visiting its source block.
20442
20443 2018-01-23 Jakub Jelinek <jakub@redhat.com>
20444
20445 PR c++/83918
20446 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20447 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20448
20449 2018-01-22 Jakub Jelinek <jakub@redhat.com>
20450
20451 PR tree-optimization/83957
20452 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
20453 semicolon after for body surrounded by braces.
20454
20455 PR tree-optimization/83081
20456 * profile-count.h (profile_probability::split): New method.
20457 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20458 Use profile_probability::split.
20459 (do_compare_rtx_and_jump): Fix adjustment of probabilities
20460 when splitting a single conditional jump into 2.
20461
20462 2018-01-22 David Malcolm <dmalcolm@redhat.com>
20463
20464 PR tree-optimization/69452
20465 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20466 decl.
20467
20468 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20469
20470 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20471 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20472 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20473
20474 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20475
20476 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20477 declaration.
20478 * config/rl78/rl78.md (movdi): New define_expand.
20479 * config/rl78/rl78.c (rl78_split_movdi): New function.
20480
20481 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
20482
20483 PR target/83862
20484 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20485 no longer used.
20486 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20487 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20488 128-bit to produce an UNSPEC move to get the double word with the
20489 signbit and then a shift directly to do signbit.
20490 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20491 implementation with a new version that just does either a direct
20492 move or a regular move. Move memory interface to separate insns.
20493 Move insns so they are next to the expander.
20494 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20495 with signbit move. Split big and little endian case.
20496 (signbit<mode>2_dm_mem_le): Likewise.
20497 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20498 (signbit<mode>2_dm2): Likewise.
20499
20500 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20501
20502 * config/rl78/rl78.md (anddi3): New define_expand.
20503
20504 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20505
20506 * config/rl78/rl78.md (umindi3): New define_expand.
20507
20508 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20509
20510 * config/rl78/rl78.md (smindi3): New define_expand.
20511
20512 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20513
20514 * config/rl78/rl78.md (smaxdi3): New define_expand.
20515
20516 2018-01-22 Carl Love <cel@us.ibm.com>
20517
20518 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20519 LVX_V1TI): Add macro expansion.
20520 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20521 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20522 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20523 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20524 Change check to determine if the instruction is a byte reversing
20525 entry. Fix typo in comment.
20526 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20527 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20528 Add def_builtin calls for new builtins.
20529 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20530 Add define_insn expansion.
20531
20532 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20533
20534 * config/rl78/rl78.md (umaxdi3): New define_expand.
20535
20536 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
20537
20538 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20539 for non-QImode registers.
20540
20541 2018-01-22 Richard Biener <rguenther@suse.de>
20542
20543 PR tree-optimization/83963
20544 * graphite-scop-detection.c (scop_detection::get_sese): Delay
20545 including the loop exit block.
20546 (scop_detection::merge_sese): Likewise.
20547 (scop_detection::add_scop): Do it here instead.
20548
20549 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20550
20551 * doc/sourcebuild.texi (arm_softfloat): Document.
20552
20553 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
20554
20555 PR gcc/77734
20556 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20557 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20558 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20559
20560 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20561 David Edelsohn <dje.gcc@gmail.com>
20562
20563 PR target/83946
20564 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20565 Change "crset eq" to "crset 2".
20566 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20567 (*call_indirect_aix<mode>_nospec): Likewise.
20568 (*call_value_indirect_aix<mode>_nospec): Likewise.
20569 (*call_indirect_elfv2<mode>_nospec): Likewise.
20570 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20571 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20572 change assembly output from . to $.
20573 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20574 (indirect_jump<mode>_nospec): Change assembly output from . to $.
20575 (*tablejump<mode>_internal1_nospec): Likewise.
20576
20577 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
20578
20579 PR target/80870
20580 * config/sh/sh_optimize_sett_clrt.cc:
20581 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20582
20583 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
20584
20585 PR tree-optimization/83940
20586 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20587 offset_dt to vect_constant_def rather than vect_unknown_def_type.
20588 (vect_check_load_store_mask): Add a mask_dt_out parameter and
20589 use it to pass back the definition type.
20590 (vect_check_store_rhs): Likewise rhs_dt_out.
20591 (vect_build_gather_load_calls): Add a mask_dt argument and use
20592 it instead of a call to vect_is_simple_use.
20593 (vectorizable_store): Update calls to vect_check_load_store_mask
20594 and vect_check_store_rhs. Use the dt returned by the latter instead
20595 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
20596 instead of calls to vect_is_simple_use. Pass the scalar rather
20597 than the vector operand to vect_is_simple_use when handling
20598 second and subsequent copies of an rhs value.
20599 (vectorizable_load): Update calls to vect_check_load_store_mask
20600 and vect_build_gather_load_calls. Use the cached mask_dt and
20601 gs_info.offset_dt instead of calls to vect_is_simple_use.
20602
20603 2018-01-20 Jakub Jelinek <jakub@redhat.com>
20604
20605 PR middle-end/83945
20606 * tree-emutls.c: Include gimplify.h.
20607 (lower_emutls_2): New function.
20608 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20609 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20610 it before further processing.
20611
20612 PR target/83930
20613 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20614 UINTVAL (trueop1) instead of INTVAL (op1).
20615
20616 2018-01-19 Jakub Jelinek <jakub@redhat.com>
20617
20618 PR debug/81570
20619 PR debug/83728
20620 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20621 INCOMING_FRAME_SP_OFFSET if not defined.
20622 (scan_trace): Add ENTRY argument. If true and
20623 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20624 emit a note to adjust the CFA offset.
20625 (create_cfi_notes): Adjust scan_trace callers.
20626 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20627 INCOMING_FRAME_SP_OFFSET in the CIE.
20628 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20629 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20630 Likewise.
20631 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20632 * doc/tm.texi: Regenerated.
20633
20634 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20635
20636 PR rtl-optimization/83147
20637 * lra-constraints.c (remove_inheritance_pseudos): Use
20638 lra_substitute_pseudo_within_insn.
20639
20640 2018-01-19 Tom de Vries <tom@codesourcery.com>
20641 Cesar Philippidis <cesar@codesourcery.com>
20642
20643 PR target/83920
20644 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20645
20646 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
20647
20648 PR target/83790
20649 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20650 spaces for function labels.
20651
20652 2018-01-19 Martin Liska <mliska@suse.cz>
20653
20654 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20655 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20656 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20657 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20658 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20659 (PRED_CONST_RETURN): Change from 69 to 65.
20660 (PRED_NULL_RETURN): Change from 91 to 71.
20661 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20662 (PRED_LOOP_GUARD): Change from 66 to 73.
20663
20664 2018-01-19 Martin Liska <mliska@suse.cz>
20665
20666 * predict.c (predict_insn_def): Add new assert.
20667 (struct branch_predictor): Change type to signed integer.
20668 (test_prediction_value_range): Amend test to cover
20669 PROB_UNINITIALIZED.
20670 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20671 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20672 (PRED_LOOP_ITERATIONS_MAX): Likewise.
20673 (PRED_LOOP_IV_COMPARE): Likewise.
20674 * predict.h (PROB_UNINITIALIZED): Define new constant.
20675
20676 2018-01-19 Martin Liska <mliska@suse.cz>
20677
20678 * predict.c (dump_prediction): Add new format for
20679 analyze_brprob.py script which is enabled with -details
20680 suboption.
20681 * profile-count.h (precise_p): New function.
20682
20683 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20684
20685 PR tree-optimization/83922
20686 * tree-vect-loop.c (vect_verify_full_masking): Return false if
20687 there are no statements that need masking.
20688 (vect_active_double_reduction_p): New function.
20689 (vect_analyze_loop_operations): Use it when handling phis that
20690 are not in the loop header.
20691
20692 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
20693
20694 PR tree-optimization/83914
20695 * tree-vect-loop.c (vectorizable_induction): Don't convert
20696 init_expr or apply the peeling adjustment for inductions
20697 that are nested within the vectorized loop.
20698
20699 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20700
20701 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20702 instead of NEG.
20703
20704 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20705
20706 PR sanitizer/81715
20707 PR testsuite/83882
20708 * function.h (gimplify_parameters): Add gimple_seq * argument.
20709 * function.c: Include gimple.h and options.h.
20710 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20711 for the added local temporaries if needed.
20712 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20713 if there are any parameter cleanups, wrap whole body into a
20714 try/finally with the cleanups.
20715
20716 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
20717
20718 PR target/82964
20719 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20720 Use GET_MODE_CLASS for scalar floating point.
20721
20722 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20723
20724 PR ipa/82256
20725 patch by PaX Team
20726 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20727 Fix call of call_cgraph_insertion_hooks.
20728
20729 2018-01-18 Martin Sebor <msebor@redhat.com>
20730
20731 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20732
20733 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
20734
20735 PR ipa/83619
20736 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20737 frequencies.
20738
20739 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
20740
20741 PR other/70268
20742 * common.opt: (-ffile-prefix-map): New option.
20743 * opts.c (common_handle_option): Defer it.
20744 * opts-global.c (handle_common_deferred_options): Handle it.
20745 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20746 * file-prefix-map.h: New file.
20747 (remap_debug_filename, add_debug_prefix_map): ...here.
20748 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20749 * final.c (debug_prefix_map, add_debug_prefix_map
20750 remap_debug_filename): Move to...
20751 * file-prefix-map.c: New file.
20752 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20753 generalize, get rid of alloca(), use strrchr() instead of strchr().
20754 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20755 Implement in terms of add_prefix_map().
20756 (remap_macro_filename, remap_debug_filename): Implement in term of
20757 remap_filename().
20758 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20759 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20760 * dbxout.c: Include file-prefix-map.h.
20761 * varasm.c: Likewise.
20762 * vmsdbgout.c: Likewise.
20763 * xcoffout.c: Likewise.
20764 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20765 * doc/cppopts.texi (-fmacro-prefix-map): Document.
20766 * doc/invoke.texi (-ffile-prefix-map): Document.
20767 (-fdebug-prefix-map): Update description.
20768
20769 2018-01-18 Martin Liska <mliska@suse.cz>
20770
20771 * config/i386/i386.c (indirect_thunk_name): Document that also
20772 lfence is emitted.
20773 (output_indirect_thunk): Document why both instructions
20774 (pause and lfence) are generated.
20775
20776 2018-01-18 Richard Biener <rguenther@suse.de>
20777
20778 PR tree-optimization/83887
20779 * graphite-scop-detection.c
20780 (scop_detection::get_nearest_dom_with_single_entry): Remove.
20781 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20782 (scop_detection::merge_sese): Re-implement with a flood-fill
20783 algorithm that properly finds a SESE region if it exists.
20784
20785 2018-01-18 Jakub Jelinek <jakub@redhat.com>
20786
20787 PR c/61240
20788 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20789 pointer_diff optimizations use view_convert instead of convert.
20790
20791 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20792
20793 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20794 Generate different code for -mno-speculate-indirect-jumps.
20795 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20796 (*call_indirect_aix<mode>): Disable for
20797 -mno-speculate-indirect-jumps.
20798 (*call_indirect_aix<mode>_nospec): New define_insn.
20799 (*call_value_indirect_aix<mode>): Disable for
20800 -mno-speculate-indirect-jumps.
20801 (*call_value_indirect_aix<mode>_nospec): New define_insn.
20802 (*sibcall_nonlocal_sysv<mode>): Generate different code for
20803 -mno-speculate-indirect-jumps.
20804 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20805
20806 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20807
20808 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20809 long double type, set the flags for noting the default long double
20810 type, even if we don't pass or return a long double type.
20811
20812 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
20813
20814 PR ipa/83051
20815 * ipa-inline.c (flatten_function): Do not overwrite final inlining
20816 failure.
20817
20818 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
20819
20820 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20821 support for merge[hl].
20822 (fold_mergehl_helper): New helper function.
20823 (tree-vector-builder.h): New #include for tree_vector_builder usage.
20824 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20825 (altivec_vmrglw_direct): Add xxmrglw insn.
20826
20827 2018-01-17 Andrew Waterman <andrew@sifive.com>
20828
20829 * config/riscv/riscv.c (riscv_conditional_register_usage): If
20830 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20831
20832 2018-01-17 David Malcolm <dmalcolm@redhat.com>
20833
20834 PR lto/83121
20835 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20836 call the lto_location_cache before reading the
20837 DECL_SOURCE_LOCATION of the types.
20838
20839 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
20840 Richard Sandiford <richard.sandiford@linaro.org>
20841
20842 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20843 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20844 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20845 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20846 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20847 Add declaration.
20848 * config/aarch64/constraints.md (aarch64_movti_operand):
20849 Limit immediates.
20850 * config/aarch64/predicates.md (Uti): Add new constraint.
20851
20852 2018-01-17 Carl Love <cel@us.ibm.com>
20853
20854 * config/rs6000/vsx.md (define_expand xl_len_r,
20855 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20856 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20857 lxvll.
20858 (define_expand, define_insn): Move the shift left from the
20859 define_insn to the define_expand for lxvl and stxvl instructions.
20860 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20861 and XL_LEN_R definitions to PURE.
20862
20863 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
20864
20865 * config/i386/i386.c (indirect_thunk_name): Declare regno
20866 as unsigned int. Compare regno with INVALID_REGNUM.
20867 (output_indirect_thunk): Ditto.
20868 (output_indirect_thunk_function): Ditto.
20869 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
20870 in the call to output_indirect_thunk_function.
20871
20872 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
20873
20874 PR middle-end/83884
20875 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20876 rather than the size of inner_type to determine the stack slot size
20877 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20878
20879 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
20880
20881 PR target/83546
20882 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20883 to PTA_SILVERMONT.
20884
20885 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
20886
20887 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20888 endian Linux systems to optionally enable multilibs for selecting
20889 the long double type if the user configured an explicit type.
20890 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20891 have no long double multilibs if not defined.
20892 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20893 warn if the user used -mabi={ieee,ibm}longdouble and we built
20894 multilibs for long double.
20895 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20896 appropriate multilib option.
20897 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20898 multilib options.
20899 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20900 for building long double multilibs.
20901 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20902
20903 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
20904
20905 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20906 copies.
20907
20908 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20909 64 bits.
20910 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20911 128 bits.
20912
20913 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20914 variables.
20915
20916 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20917 return value.
20918
20919 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20920
20921 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20922 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20923
20924 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
20925
20926 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20927 different rtl trees depending on TARGET_64BIT.
20928 (rs6000_gen_lvx): Likewise.
20929
20930 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
20931
20932 * config/visium/visium.md (nop): Tweak comment.
20933 (hazard_nop): Likewise.
20934
20935 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20936
20937 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20938 -mspeculate-indirect-jumps.
20939 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20940 for -mno-speculate-indirect-jumps.
20941 (*call_indirect_elfv2<mode>_nospec): New define_insn.
20942 (*call_value_indirect_elfv2<mode>): Disable for
20943 -mno-speculate-indirect-jumps.
20944 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20945 (indirect_jump): Emit different RTL for
20946 -mno-speculate-indirect-jumps.
20947 (*indirect_jump<mode>): Disable for
20948 -mno-speculate-indirect-jumps.
20949 (*indirect_jump<mode>_nospec): New define_insn.
20950 (tablejump): Emit different RTL for
20951 -mno-speculate-indirect-jumps.
20952 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20953 (tablejumpsi_nospec): New define_expand.
20954 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20955 (tablejumpdi_nospec): New define_expand.
20956 (*tablejump<mode>_internal1): Disable for
20957 -mno-speculate-indirect-jumps.
20958 (*tablejump<mode>_internal1_nospec): New define_insn.
20959 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20960 option.
20961
20962 2018-01-16 Artyom Skrobov tyomitch@gmail.com
20963
20964 * caller-save.c (insert_save): Drop unnecessary parameter. All
20965 callers updated.
20966
20967 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20968 Richard Biener <rguenth@suse.de>
20969
20970 PR libgomp/83590
20971 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20972 return early, inline manually is_gimple_sizepos. Make sure if we
20973 call gimplify_expr we don't end up with a gimple constant.
20974 * tree.c (variably_modified_type_p): Don't return true for
20975 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
20976 * gimplify.h (is_gimple_sizepos): Remove.
20977
20978 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
20979
20980 PR tree-optimization/83857
20981 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20982 vectorizable_live_operation for pure SLP statements.
20983 (vectorizable_live_operation): Handle PHIs.
20984
20985 2018-01-16 Richard Biener <rguenther@suse.de>
20986
20987 PR tree-optimization/83867
20988 * tree-vect-stmts.c (vect_transform_stmt): Precompute
20989 nested_in_vect_loop_p since the scalar stmt may get invalidated.
20990
20991 2018-01-16 Jakub Jelinek <jakub@redhat.com>
20992
20993 PR c/83844
20994 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20995 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20996 If off is not INTEGER_CST, issue a may not be aligned warning
20997 rather than isn't aligned. Use isn%'t rather than isn't.
20998 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20999 into MULT_EXPR.
21000 <case MULT_EXPR>: Improve the case when bottom and one of the
21001 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
21002 operand, in that case check if the other operand is multiple of
21003 bottom divided by the INTEGER_CST operand.
21004
21005 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21006
21007 PR target/83858
21008 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
21009 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
21010 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
21011 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
21012 * config/pa/pa.c (pa_function_arg_advance): Likewise.
21013 (pa_function_arg, pa_arg_partial_bytes): Likewise.
21014 (pa_function_arg_size): New function.
21015
21016 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21017
21018 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
21019 in a separate statement.
21020
21021 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
21022
21023 PR tree-optimization/83847
21024 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
21025 group gathers and scatters.
21026
21027 2018-01-16 Jakub Jelinek <jakub@redhat.com>
21028
21029 PR rtl-optimization/86620
21030 * params.def (max-sched-ready-insns): Bump minimum value to 1.
21031
21032 PR rtl-optimization/83213
21033 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
21034 to last if both are JUMP_INSNs.
21035
21036 PR tree-optimization/83843
21037 * gimple-ssa-store-merging.c
21038 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
21039 store_immediate_info for bswap/nop orig_stores.
21040
21041 2018-01-15 Andrew Waterman <andrew@sifive.com>
21042
21043 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
21044 !TARGET_MUL.
21045 <UDIV>: Increase cost if !TARGET_DIV.
21046
21047 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
21048
21049 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
21050 (define_attr "cr_logical_3op"): New.
21051 (cceq_ior_compare): Adjust.
21052 (cceq_ior_compare_complement): Adjust.
21053 (*cceq_rev_compare): Adjust.
21054 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
21055 (is_cracked_insn): Adjust.
21056 (insn_must_be_first_in_group): Adjust.
21057 * config/rs6000/40x.md: Adjust.
21058 * config/rs6000/440.md: Adjust.
21059 * config/rs6000/476.md: Adjust.
21060 * config/rs6000/601.md: Adjust.
21061 * config/rs6000/603.md: Adjust.
21062 * config/rs6000/6xx.md: Adjust.
21063 * config/rs6000/7450.md: Adjust.
21064 * config/rs6000/7xx.md: Adjust.
21065 * config/rs6000/8540.md: Adjust.
21066 * config/rs6000/cell.md: Adjust.
21067 * config/rs6000/e300c2c3.md: Adjust.
21068 * config/rs6000/e500mc.md: Adjust.
21069 * config/rs6000/e500mc64.md: Adjust.
21070 * config/rs6000/e5500.md: Adjust.
21071 * config/rs6000/e6500.md: Adjust.
21072 * config/rs6000/mpc.md: Adjust.
21073 * config/rs6000/power4.md: Adjust.
21074 * config/rs6000/power5.md: Adjust.
21075 * config/rs6000/power6.md: Adjust.
21076 * config/rs6000/power7.md: Adjust.
21077 * config/rs6000/power8.md: Adjust.
21078 * config/rs6000/power9.md: Adjust.
21079 * config/rs6000/rs64.md: Adjust.
21080 * config/rs6000/titan.md: Adjust.
21081
21082 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21083
21084 * config/i386/predicates.md (indirect_branch_operand): Rewrite
21085 ix86_indirect_branch_register logic.
21086
21087 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21088
21089 * config/i386/constraints.md (Bs): Update
21090 ix86_indirect_branch_register check. Don't check
21091 ix86_indirect_branch_register with GOT_memory_operand.
21092 (Bw): Likewise.
21093 * config/i386/predicates.md (GOT_memory_operand): Don't check
21094 ix86_indirect_branch_register here.
21095 (GOT32_symbol_operand): Likewise.
21096
21097 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21098
21099 * config/i386/predicates.md (constant_call_address_operand):
21100 Rewrite ix86_indirect_branch_register logic.
21101 (sibcall_insn_operand): Likewise.
21102
21103 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21104
21105 * config/i386/constraints.md (Bs): Replace
21106 ix86_indirect_branch_thunk_register with
21107 ix86_indirect_branch_register.
21108 (Bw): Likewise.
21109 * config/i386/i386.md (indirect_jump): Likewise.
21110 (tablejump): Likewise.
21111 (*sibcall_memory): Likewise.
21112 (*sibcall_value_memory): Likewise.
21113 Peepholes of indirect call and jump via memory: Likewise.
21114 * config/i386/i386.opt: Likewise.
21115 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21116 (GOT_memory_operand): Likewise.
21117 (call_insn_operand): Likewise.
21118 (sibcall_insn_operand): Likewise.
21119 (GOT32_symbol_operand): Likewise.
21120
21121 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21122
21123 PR middle-end/83837
21124 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21125 type rather than type addr's type points to.
21126 (expand_omp_atomic_mutex): Likewise.
21127 (expand_omp_atomic): Likewise.
21128
21129 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
21130
21131 PR target/83839
21132 * config/i386/i386.c (output_indirect_thunk_function): Use
21133 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21134 for __x86_return_thunk.
21135
21136 2018-01-15 Richard Biener <rguenther@suse.de>
21137
21138 PR middle-end/83850
21139 * expmed.c (extract_bit_field_1): Fix typo.
21140
21141 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21142
21143 PR target/83687
21144 * config/arm/iterators.md (VF): New mode iterator.
21145 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21146 Remove integer-related logic from pattern.
21147 (neon_vabd<mode>_3): Likewise.
21148
21149 2018-01-15 Jakub Jelinek <jakub@redhat.com>
21150
21151 PR middle-end/82694
21152 * common.opt (fstrict-overflow): No longer an alias.
21153 (fwrapv-pointer): New option.
21154 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21155 also for pointer types based on flag_wrapv_pointer.
21156 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21157 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21158 opts->x_flag_wrapv got set.
21159 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21160 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21161 POINTER_TYPE_OVERFLOW_UNDEFINED.
21162 * match.pd: Likewise in address comparison pattern.
21163 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21164
21165 2018-01-15 Richard Biener <rguenther@suse.de>
21166
21167 PR lto/83804
21168 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21169 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
21170 Reset type names to their identifier if their TYPE_DECL doesn't
21171 have linkage (and thus is used for ODR and devirt).
21172 (save_debug_info_for_decl): Remove.
21173 (save_debug_info_for_type): Likewise.
21174 (add_tree_to_fld_list): Adjust.
21175 * tree-pretty-print.c (dump_generic_node): Make dumping of
21176 type names more robust.
21177
21178 2018-01-15 Richard Biener <rguenther@suse.de>
21179
21180 * BASE-VER: Bump to 8.0.1.
21181
21182 2018-01-14 Martin Sebor <msebor@redhat.com>
21183
21184 PR other/83508
21185 * builtins.c (check_access): Avoid warning when the no-warning bit
21186 is set.
21187
21188 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
21189
21190 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21191 * ira-color (allocno_hard_regs_compare): Likewise.
21192
21193 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
21194
21195 PR target/83013
21196 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21197 Use .pushsection/.popsection.
21198
21199 2018-01-14 Martin Sebor <msebor@redhat.com>
21200
21201 PR c++/81327
21202 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21203
21204 2018-01-14 Jakub Jelinek <jakub@redhat.com>
21205
21206 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21207 entry from extra_headers.
21208 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21209 extra_headers, make the list bitwise identical to the i?86-*-* one.
21210
21211 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21212
21213 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21214 -mcmodel=large with -mindirect-branch=thunk,
21215 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21216 -mfunction-return=thunk-extern.
21217 * doc/invoke.texi: Document -mcmodel=large is incompatible with
21218 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21219 -mfunction-return=thunk and -mfunction-return=thunk-extern.
21220
21221 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21222
21223 * config/i386/i386.c (print_reg): Print the name of the full
21224 integer register without '%'.
21225 (ix86_print_operand): Handle 'V'.
21226 * doc/extend.texi: Document 'V' modifier.
21227
21228 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21229
21230 * config/i386/constraints.md (Bs): Disallow memory operand for
21231 -mindirect-branch-register.
21232 (Bw): Likewise.
21233 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21234 (GOT_memory_operand): Likewise.
21235 (call_insn_operand): Likewise.
21236 (sibcall_insn_operand): Likewise.
21237 (GOT32_symbol_operand): Likewise.
21238 * config/i386/i386.md (indirect_jump): Call convert_memory_address
21239 for -mindirect-branch-register.
21240 (tablejump): Likewise.
21241 (*sibcall_memory): Likewise.
21242 (*sibcall_value_memory): Likewise.
21243 Disallow peepholes of indirect call and jump via memory for
21244 -mindirect-branch-register.
21245 (*call_pop): Replace m with Bw.
21246 (*call_value_pop): Likewise.
21247 (*sibcall_pop_memory): Replace m with Bs.
21248 * config/i386/i386.opt (mindirect-branch-register): New option.
21249 * doc/invoke.texi: Document -mindirect-branch-register option.
21250
21251 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21252
21253 * config/i386/i386-protos.h (ix86_output_function_return): New.
21254 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21255 set function_return_type.
21256 (indirect_thunk_name): Add ret_p to indicate thunk for function
21257 return.
21258 (output_indirect_thunk_function): Pass false to
21259 indirect_thunk_name.
21260 (ix86_output_indirect_branch_via_reg): Likewise.
21261 (ix86_output_indirect_branch_via_push): Likewise.
21262 (output_indirect_thunk_function): Create alias for function
21263 return thunk if regno < 0.
21264 (ix86_output_function_return): New function.
21265 (ix86_handle_fndecl_attribute): Handle function_return.
21266 (ix86_attribute_table): Add function_return.
21267 * config/i386/i386.h (machine_function): Add
21268 function_return_type.
21269 * config/i386/i386.md (simple_return_internal): Use
21270 ix86_output_function_return.
21271 (simple_return_internal_long): Likewise.
21272 * config/i386/i386.opt (mfunction-return=): New option.
21273 (indirect_branch): Mention -mfunction-return=.
21274 * doc/extend.texi: Document function_return function attribute.
21275 * doc/invoke.texi: Document -mfunction-return= option.
21276
21277 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
21278
21279 * config/i386/i386-opts.h (indirect_branch): New.
21280 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21281 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21282 with local indirect jump when converting indirect call and jump.
21283 (ix86_set_indirect_branch_type): New.
21284 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21285 (indirectlabelno): New.
21286 (indirect_thunk_needed): Likewise.
21287 (indirect_thunk_bnd_needed): Likewise.
21288 (indirect_thunks_used): Likewise.
21289 (indirect_thunks_bnd_used): Likewise.
21290 (INDIRECT_LABEL): Likewise.
21291 (indirect_thunk_name): Likewise.
21292 (output_indirect_thunk): Likewise.
21293 (output_indirect_thunk_function): Likewise.
21294 (ix86_output_indirect_branch_via_reg): Likewise.
21295 (ix86_output_indirect_branch_via_push): Likewise.
21296 (ix86_output_indirect_branch): Likewise.
21297 (ix86_output_indirect_jmp): Likewise.
21298 (ix86_code_end): Call output_indirect_thunk_function if needed.
21299 (ix86_output_call_insn): Call ix86_output_indirect_branch if
21300 needed.
21301 (ix86_handle_fndecl_attribute): Handle indirect_branch.
21302 (ix86_attribute_table): Add indirect_branch.
21303 * config/i386/i386.h (machine_function): Add indirect_branch_type
21304 and has_local_indirect_jump.
21305 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21306 to true.
21307 (tablejump): Likewise.
21308 (*indirect_jump): Use ix86_output_indirect_jmp.
21309 (*tablejump_1): Likewise.
21310 (simple_return_indirect_internal): Likewise.
21311 * config/i386/i386.opt (mindirect-branch=): New option.
21312 (indirect_branch): New.
21313 (keep): Likewise.
21314 (thunk): Likewise.
21315 (thunk-inline): Likewise.
21316 (thunk-extern): Likewise.
21317 * doc/extend.texi: Document indirect_branch function attribute.
21318 * doc/invoke.texi: Document -mindirect-branch= option.
21319
21320 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
21321
21322 PR ipa/83051
21323 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21324
21325 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
21326
21327 * ipa-inline.c (want_inline_small_function_p): Return false if
21328 inlining has already failed with CIF_FINAL_ERROR.
21329 (update_caller_keys): Call want_inline_small_function_p before
21330 can_inline_edge_p.
21331 (update_callee_keys): Likewise.
21332
21333 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21334
21335 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21336 New function.
21337 (rs6000_quadword_masked_address_p): Likewise.
21338 (quad_aligned_load_p): Likewise.
21339 (quad_aligned_store_p): Likewise.
21340 (const_load_sequence_p): Add comment to describe the outer-most loop.
21341 (mimic_memory_attributes_and_flags): New function.
21342 (rs6000_gen_stvx): Likewise.
21343 (replace_swapped_aligned_store): Likewise.
21344 (rs6000_gen_lvx): Likewise.
21345 (replace_swapped_aligned_load): Likewise.
21346 (replace_swapped_load_constant): Capitalize argument name in
21347 comment describing this function.
21348 (rs6000_analyze_swaps): Add a third pass to search for vector loads
21349 and stores that access quad-word aligned addresses and replace
21350 with stvx or lvx instructions when appropriate.
21351 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21352 New function prototype.
21353 (rs6000_quadword_masked_address_p): Likewise.
21354 (rs6000_gen_lvx): Likewise.
21355 (rs6000_gen_stvx): Likewise.
21356 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21357 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21358 when memory address is aligned.
21359 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21360 this split to select lvx instruction when memory address is aligned.
21361 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21362 instruction when memory address is aligned.
21363 (*vsx_le_perm_load_v16qi): Likewise.
21364 (four unnamed splitters): Modify to select the stvx instruction
21365 when memory is aligned.
21366
21367 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
21368
21369 * predict.c (determine_unlikely_bbs): Handle correctly BBs
21370 which appears in the queue multiple times.
21371
21372 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21373 Alan Hayward <alan.hayward@arm.com>
21374 David Sherwood <david.sherwood@arm.com>
21375
21376 * tree-vectorizer.h (vec_lower_bound): New structure.
21377 (_loop_vec_info): Add check_nonzero and lower_bounds.
21378 (LOOP_VINFO_CHECK_NONZERO): New macro.
21379 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21380 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21381 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21382 fields. Make seg_len the distance travelled, not including the
21383 access size.
21384 (dr_direction_indicator): Declare.
21385 (dr_zero_step_indicator): Likewise.
21386 (dr_known_forward_stride_p): Likewise.
21387 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21388 tree-ssanames.h.
21389 (runtime_alias_check_p): Allow runtime alias checks with
21390 variable strides.
21391 (operator ==): Compare access_size and align.
21392 (prune_runtime_alias_test_list): Rework for new distinction between
21393 the access_size and seg_len.
21394 (create_intersect_range_checks_index): Likewise. Cope with polynomial
21395 segment lengths.
21396 (get_segment_min_max): New function.
21397 (create_intersect_range_checks): Use it.
21398 (dr_step_indicator): New function.
21399 (dr_direction_indicator): Likewise.
21400 (dr_zero_step_indicator): Likewise.
21401 (dr_known_forward_stride_p): Likewise.
21402 * tree-loop-distribution.c (data_ref_segment_size): Return
21403 DR_STEP * (niters - 1).
21404 (compute_alias_check_pairs): Update call to the dr_with_seg_len
21405 constructor.
21406 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21407 (vect_preserves_scalar_order_p): New function, split out from...
21408 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
21409 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21410 (vect_vfa_access_size): New function.
21411 (vect_vfa_align): Likewise.
21412 (vect_compile_time_alias): Take access_size_a and access_b arguments.
21413 (dump_lower_bound): New function.
21414 (vect_check_lower_bound): Likewise.
21415 (vect_small_gap_p): Likewise.
21416 (vectorizable_with_step_bound_p): Likewise.
21417 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21418 depencies if the vectorization factor is 1. Convert the checks
21419 for nonzero steps into checks on the bounds of DR_STEP. Try using
21420 a bunds check for variable steps if the minimum required step is
21421 relatively small. Update calls to the dr_with_seg_len
21422 constructor and to vect_compile_time_alias.
21423 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21424 function.
21425 (vect_loop_versioning): Call it.
21426 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21427 when retrying.
21428 (vect_estimate_min_profitable_iters): Account for any bounds checks.
21429
21430 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21431 Alan Hayward <alan.hayward@arm.com>
21432 David Sherwood <david.sherwood@arm.com>
21433
21434 * doc/sourcebuild.texi (vect_scatter_store): Document.
21435 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21436 optabs.
21437 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21438 Document.
21439 * genopinit.c (main): Add supports_vec_scatter_store and
21440 supports_vec_scatter_store_cached to target_optabs.
21441 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21442 IFN_MASK_SCATTER_STORE.
21443 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21444 functions.
21445 * internal-fn.h (internal_store_fn_p): Declare.
21446 (internal_fn_stored_value_index): Likewise.
21447 * internal-fn.c (scatter_store_direct): New macro.
21448 (expand_scatter_store_optab_fn): New function.
21449 (direct_scatter_store_optab_supported_p): New macro.
21450 (internal_store_fn_p): New function.
21451 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21452 IFN_MASK_SCATTER_STORE.
21453 (internal_fn_mask_index): Likewise.
21454 (internal_fn_stored_value_index): New function.
21455 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21456 for scatter stores.
21457 * optabs-query.h (supports_vec_scatter_store_p): Declare.
21458 * optabs-query.c (supports_vec_scatter_store_p): New function.
21459 * tree-vectorizer.h (vect_get_store_rhs): Declare.
21460 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21461 true for scatter stores.
21462 (vect_gather_scatter_fn_p): Handle scatter stores too.
21463 (vect_check_gather_scatter): Consider using scatter stores if
21464 supports_vec_scatter_store_p.
21465 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21466 scatter stores too.
21467 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21468 internal_fn_stored_value_index.
21469 (check_load_store_masking): Handle scatter stores too.
21470 (vect_get_store_rhs): Make public.
21471 (vectorizable_call): Use internal_store_fn_p.
21472 (vectorizable_store): Handle scatter store internal functions.
21473 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21474 when deciding whether the end of the group has been reached.
21475 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21476 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21477 (mask_scatter_store<mode>): New insns.
21478
21479 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21480 Alan Hayward <alan.hayward@arm.com>
21481 David Sherwood <david.sherwood@arm.com>
21482
21483 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21484 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21485 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21486 function.
21487 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21488 Use vect_truncate_gather_scatter_offset if we can't treat the
21489 operation as a normal gather load or scatter store.
21490 (get_group_load_store_type): Take the gather_scatter_info
21491 as argument. Try using a gather load or scatter store for
21492 single-element groups.
21493 (get_load_store_type): Update calls to get_group_load_store_type
21494 and vect_use_strided_gather_scatters_p.
21495
21496 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21497 Alan Hayward <alan.hayward@arm.com>
21498 David Sherwood <david.sherwood@arm.com>
21499
21500 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21501 optional tree argument.
21502 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21503 null target hooks.
21504 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21505 but continue to use the current value as a fallback.
21506 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21507 to compare the updates.
21508 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21509 (get_load_store_type): Use it when handling a strided access.
21510 (vect_get_strided_load_store_ops): New function.
21511 (vect_get_data_ptr_increment): Likewise.
21512 (vectorizable_load): Handle strided gather loads. Always pass
21513 a step to vect_create_data_ref_ptr and bump_vector_ptr.
21514
21515 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21516 Alan Hayward <alan.hayward@arm.com>
21517 David Sherwood <david.sherwood@arm.com>
21518
21519 * doc/md.texi (gather_load@var{m}): Document.
21520 (mask_gather_load@var{m}): Likewise.
21521 * genopinit.c (main): Add supports_vec_gather_load and
21522 supports_vec_gather_load_cached to target_optabs.
21523 * optabs-tree.c (init_tree_optimization_optabs): Use
21524 ggc_cleared_alloc to allocate target_optabs.
21525 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21526 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21527 functions.
21528 * internal-fn.h (internal_load_fn_p): Declare.
21529 (internal_gather_scatter_fn_p): Likewise.
21530 (internal_fn_mask_index): Likewise.
21531 (internal_gather_scatter_fn_supported_p): Likewise.
21532 * internal-fn.c (gather_load_direct): New macro.
21533 (expand_gather_load_optab_fn): New function.
21534 (direct_gather_load_optab_supported_p): New macro.
21535 (direct_internal_fn_optab): New function.
21536 (internal_load_fn_p): Likewise.
21537 (internal_gather_scatter_fn_p): Likewise.
21538 (internal_fn_mask_index): Likewise.
21539 (internal_gather_scatter_fn_supported_p): Likewise.
21540 * optabs-query.c (supports_at_least_one_mode_p): New function.
21541 (supports_vec_gather_load_p): Likewise.
21542 * optabs-query.h (supports_vec_gather_load_p): Declare.
21543 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21544 and memory_type field.
21545 (NUM_PATTERNS): Bump to 15.
21546 * tree-vect-data-refs.c: Include internal-fn.h.
21547 (vect_gather_scatter_fn_p): New function.
21548 (vect_describe_gather_scatter_call): Likewise.
21549 (vect_check_gather_scatter): Try using internal functions for
21550 gather loads. Recognize existing calls to a gather load function.
21551 (vect_analyze_data_refs): Consider using gather loads if
21552 supports_vec_gather_load_p.
21553 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21554 (vect_get_gather_scatter_offset_type): Likewise.
21555 (vect_convert_mask_for_vectype): Likewise.
21556 (vect_add_conversion_to_patterm): Likewise.
21557 (vect_try_gather_scatter_pattern): Likewise.
21558 (vect_recog_gather_scatter_pattern): New pattern recognizer.
21559 (vect_vect_recog_func_ptrs): Add it.
21560 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21561 internal_fn_mask_index and internal_gather_scatter_fn_p.
21562 (check_load_store_masking): Take the gather_scatter_info as an
21563 argument and handle gather loads.
21564 (vect_get_gather_scatter_ops): New function.
21565 (vectorizable_call): Check internal_load_fn_p.
21566 (vectorizable_load): Likewise. Handle gather load internal
21567 functions.
21568 (vectorizable_store): Update call to check_load_store_masking.
21569 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21570 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21571 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21572 (aarch64_gather_scale_operand_d): New predicates.
21573 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21574 (mask_gather_load<mode>): New insns.
21575
21576 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21577 Alan Hayward <alan.hayward@arm.com>
21578 David Sherwood <david.sherwood@arm.com>
21579
21580 * optabs.def (fold_left_plus_optab): New optab.
21581 * doc/md.texi (fold_left_plus_@var{m}): Document.
21582 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21583 * internal-fn.c (fold_left_direct): Define.
21584 (expand_fold_left_optab_fn): Likewise.
21585 (direct_fold_left_optab_supported_p): Likewise.
21586 * fold-const-call.c (fold_const_fold_left): New function.
21587 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21588 * tree-parloops.c (valid_reduction_p): New function.
21589 (gather_scalar_reductions): Use it.
21590 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21591 (vect_finish_replace_stmt): Declare.
21592 * tree-vect-loop.c (fold_left_reduction_fn): New function.
21593 (needs_fold_left_reduction_p): New function, split out from...
21594 (vect_is_simple_reduction): ...here. Accept reductions that
21595 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21596 (vect_force_simple_reduction): Also store the reduction type in
21597 the assignment's STMT_VINFO_REDUC_TYPE.
21598 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21599 (merge_with_identity): New function.
21600 (vect_expand_fold_left): Likewise.
21601 (vectorize_fold_left_reduction): Likewise.
21602 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
21603 scalar phi in place for it. Check for target support and reject
21604 cases that would reassociate the operation. Defer the transform
21605 phase to vectorize_fold_left_reduction.
21606 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21607 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21608 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21609
21610 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21611
21612 * tree-if-conv.c (predicate_mem_writes): Remove redundant
21613 call to ifc_temp_var.
21614
21615 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21616 Alan Hayward <alan.hayward@arm.com>
21617 David Sherwood <david.sherwood@arm.com>
21618
21619 * target.def (legitimize_address_displacement): Take the original
21620 offset as a poly_int.
21621 * targhooks.h (default_legitimize_address_displacement): Update
21622 accordingly.
21623 * targhooks.c (default_legitimize_address_displacement): Likewise.
21624 * doc/tm.texi: Regenerate.
21625 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21626 as an argument, moving assert of ad->disp == ad->disp_term to...
21627 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
21628 Try calling targetm.legitimize_address_displacement before expanding
21629 the address rather than afterwards, and adjust for the new interface.
21630 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21631 Match the new hook interface. Handle SVE addresses.
21632 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21633 new hook interface.
21634
21635 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21636
21637 * Makefile.in (OBJS): Add early-remat.o.
21638 * target.def (select_early_remat_modes): New hook.
21639 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21640 * doc/tm.texi: Regenerate.
21641 * targhooks.h (default_select_early_remat_modes): Declare.
21642 * targhooks.c (default_select_early_remat_modes): New function.
21643 * timevar.def (TV_EARLY_REMAT): New timevar.
21644 * passes.def (pass_early_remat): New pass.
21645 * tree-pass.h (make_pass_early_remat): Declare.
21646 * early-remat.c: New file.
21647 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21648 function.
21649 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21650
21651 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21652 Alan Hayward <alan.hayward@arm.com>
21653 David Sherwood <david.sherwood@arm.com>
21654
21655 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21656 vfm1 with a bound_epilog parameter.
21657 (vect_do_peeling): Update calls accordingly, and move the prologue
21658 call earlier in the function. Treat the base bound_epilog as 0 for
21659 fully-masked loops and retain vf - 1 for other loops. Add 1 to
21660 this base when peeling for gaps.
21661 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21662 with fully-masked loops.
21663 (vect_estimate_min_profitable_iters): Handle the single peeled
21664 iteration in that case.
21665
21666 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21667 Alan Hayward <alan.hayward@arm.com>
21668 David Sherwood <david.sherwood@arm.com>
21669
21670 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21671 single-element interleaving even if the size is not a power of 2.
21672 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21673 accesses for single-element interleaving if the group size is
21674 not a power of 2.
21675
21676 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21677 Alan Hayward <alan.hayward@arm.com>
21678 David Sherwood <david.sherwood@arm.com>
21679
21680 * doc/md.texi (fold_extract_last_@var{m}): Document.
21681 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21682 * optabs.def (fold_extract_last_optab): New optab.
21683 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21684 * internal-fn.c (fold_extract_direct): New macro.
21685 (expand_fold_extract_optab_fn): Likewise.
21686 (direct_fold_extract_optab_supported_p): Likewise.
21687 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21688 * tree-vect-loop.c (vect_model_reduction_cost): Handle
21689 EXTRACT_LAST_REDUCTION.
21690 (get_initial_def_for_reduction): Do not create an initial vector
21691 for EXTRACT_LAST_REDUCTION reductions.
21692 (vectorizable_reduction): Leave the scalar phi in place for
21693 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
21694 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
21695 epilogue code for EXTRACT_LAST_REDUCTION and defer the
21696 transform phase to vectorizable_condition.
21697 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21698 split out from...
21699 (vect_finish_stmt_generation): ...here.
21700 (vect_finish_replace_stmt): New function.
21701 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21702 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21703 pattern.
21704 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21705
21706 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21707 Alan Hayward <alan.hayward@arm.com>
21708 David Sherwood <david.sherwood@arm.com>
21709
21710 * doc/md.texi (extract_last_@var{m}): Document.
21711 * optabs.def (extract_last_optab): New optab.
21712 * internal-fn.def (EXTRACT_LAST): New internal function.
21713 * internal-fn.c (cond_unary_direct): New macro.
21714 (expand_cond_unary_optab_fn): Likewise.
21715 (direct_cond_unary_optab_supported_p): Likewise.
21716 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21717 loops using EXTRACT_LAST.
21718 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21719 (extract_last_<mode>): ...this optab.
21720 (vec_extract<mode><Vel>): Update accordingly.
21721
21722 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21723 Alan Hayward <alan.hayward@arm.com>
21724 David Sherwood <david.sherwood@arm.com>
21725
21726 * target.def (empty_mask_is_expensive): New hook.
21727 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21728 * doc/tm.texi: Regenerate.
21729 * targhooks.h (default_empty_mask_is_expensive): Declare.
21730 * targhooks.c (default_empty_mask_is_expensive): New function.
21731 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21732 if the target says that empty masks are expensive.
21733 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21734 New function.
21735 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21736
21737 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21738 Alan Hayward <alan.hayward@arm.com>
21739 David Sherwood <david.sherwood@arm.com>
21740
21741 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21742 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21743 (vect_use_loop_mask_for_alignment_p): New function.
21744 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21745 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21746 niters_skip argument. Make sure that the first niters_skip elements
21747 of the first iteration are inactive.
21748 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21749 Update call to vect_set_loop_masks_directly.
21750 (get_misalign_in_elems): New function, split out from...
21751 (vect_gen_prolog_loop_niters): ...here.
21752 (vect_update_init_of_dr): Take a code argument that specifies whether
21753 the adjustment should be added or subtracted.
21754 (vect_update_init_of_drs): Likewise.
21755 (vect_prepare_for_masked_peels): New function.
21756 (vect_do_peeling): Skip prologue peeling if we're using a mask
21757 instead. Update call to vect_update_inits_of_drs.
21758 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21759 mask_skip_niters.
21760 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21761 alignment. Do not include the number of peeled iterations in
21762 the minimum threshold in that case.
21763 (vectorizable_induction): Adjust the start value down by
21764 LOOP_VINFO_MASK_SKIP_NITERS iterations.
21765 (vect_transform_loop): Call vect_prepare_for_masked_peels.
21766 Take the number of skipped iterations into account when calculating
21767 the loop bounds.
21768 * tree-vect-stmts.c (vect_gen_while_not): New function.
21769
21770 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21771 Alan Hayward <alan.hayward@arm.com>
21772 David Sherwood <david.sherwood@arm.com>
21773
21774 * doc/sourcebuild.texi (vect_fully_masked): Document.
21775 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21776 default value to 0.
21777 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21778 split out from...
21779 (vect_analyze_loop_2): ...here. Don't check the vectorization
21780 factor against the number of loop iterations if the loop is
21781 fully-masked.
21782
21783 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21784 Alan Hayward <alan.hayward@arm.com>
21785 David Sherwood <david.sherwood@arm.com>
21786
21787 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21788 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21789 (dump_groups): Update accordingly.
21790 (iv_use::mem_type): New member variable.
21791 (address_p): New function.
21792 (record_use): Add a mem_type argument and initialize the new
21793 mem_type field.
21794 (record_group_use): Add a mem_type argument. Use address_p.
21795 Remove obsolete null checks of base_object. Update call to record_use.
21796 (find_interesting_uses_op): Update call to record_group_use.
21797 (find_interesting_uses_cond): Likewise.
21798 (find_interesting_uses_address): Likewise.
21799 (get_mem_type_for_internal_fn): New function.
21800 (find_address_like_use): Likewise.
21801 (find_interesting_uses_stmt): Try find_address_like_use before
21802 calling find_interesting_uses_op.
21803 (addr_offset_valid_p): Use the iv mem_type field as the type
21804 of the addressed memory.
21805 (add_autoinc_candidates): Likewise.
21806 (get_address_cost): Likewise.
21807 (split_small_address_groups_p): Use address_p.
21808 (split_address_groups): Likewise.
21809 (add_iv_candidate_for_use): Likewise.
21810 (autoinc_possible_for_pair): Likewise.
21811 (rewrite_groups): Likewise.
21812 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21813 (determine_group_iv_cost): Update after split of USE_ADDRESS.
21814 (get_alias_ptr_type_for_ptr_address): New function.
21815 (rewrite_use_address): Rewrite address uses in calls that were
21816 identified by find_address_like_use.
21817
21818 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21819 Alan Hayward <alan.hayward@arm.com>
21820 David Sherwood <david.sherwood@arm.com>
21821
21822 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21823 TARGET_MEM_REFs.
21824 * gimple-expr.h (is_gimple_addressable: Likewise.
21825 * gimple-expr.c (is_gimple_address): Likewise.
21826 * internal-fn.c (expand_call_mem_ref): New function.
21827 (expand_mask_load_optab_fn): Use it.
21828 (expand_mask_store_optab_fn): Likewise.
21829
21830 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21831 Alan Hayward <alan.hayward@arm.com>
21832 David Sherwood <david.sherwood@arm.com>
21833
21834 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21835 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21836 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21837 (cond_umax@var{mode}): Document.
21838 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21839 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21840 (cond_umin_optab, cond_umax_optab): New optabs.
21841 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21842 (COND_IOR, COND_XOR): New internal functions.
21843 * internal-fn.h (get_conditional_internal_fn): Declare.
21844 * internal-fn.c (cond_binary_direct): New macro.
21845 (expand_cond_binary_optab_fn): Likewise.
21846 (direct_cond_binary_optab_supported_p): Likewise.
21847 (get_conditional_internal_fn): New function.
21848 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21849 Cope with reduction statements that are vectorized as calls rather
21850 than assignments.
21851 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21852 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21853 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21854 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21855 (UNSPEC_COND_EOR): New unspecs.
21856 (optab): Add mappings for them.
21857 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21858 (sve_int_op, sve_fp_op): New int attributes.
21859
21860 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21861 Alan Hayward <alan.hayward@arm.com>
21862 David Sherwood <david.sherwood@arm.com>
21863
21864 * optabs.def (while_ult_optab): New optab.
21865 * doc/md.texi (while_ult@var{m}@var{n}): Document.
21866 * internal-fn.def (WHILE_ULT): New internal function.
21867 * internal-fn.h (direct_internal_fn_supported_p): New override
21868 that takes two types as argument.
21869 * internal-fn.c (while_direct): New macro.
21870 (expand_while_optab_fn): New function.
21871 (convert_optab_supported_p): Likewise.
21872 (direct_while_optab_supported_p): New macro.
21873 * wide-int.h (wi::udiv_ceil): New function.
21874 * tree-vectorizer.h (rgroup_masks): New structure.
21875 (vec_loop_masks): New typedef.
21876 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21877 and fully_masked_p.
21878 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21879 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21880 (vect_max_vf): New function.
21881 (slpeel_make_loop_iterate_ntimes): Delete.
21882 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21883 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21884 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21885 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21886 internal-fn.h, stor-layout.h and optabs-query.h.
21887 (vect_set_loop_mask): New function.
21888 (add_preheader_seq): Likewise.
21889 (add_header_seq): Likewise.
21890 (interleave_supported_p): Likewise.
21891 (vect_maybe_permute_loop_masks): Likewise.
21892 (vect_set_loop_masks_directly): Likewise.
21893 (vect_set_loop_condition_masked): Likewise.
21894 (vect_set_loop_condition_unmasked): New function, split out from
21895 slpeel_make_loop_iterate_ntimes.
21896 (slpeel_make_loop_iterate_ntimes): Rename to..
21897 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
21898 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21899 (vect_do_peeling): Update call accordingly.
21900 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21901 loops.
21902 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21903 mask_compare_type, can_fully_mask_p and fully_masked_p.
21904 (release_vec_loop_masks): New function.
21905 (_loop_vec_info): Use it to free the loop masks.
21906 (can_produce_all_loop_masks_p): New function.
21907 (vect_get_max_nscalars_per_iter): Likewise.
21908 (vect_verify_full_masking): Likewise.
21909 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21910 retries, and free the mask rgroups before retrying. Check loop-wide
21911 reasons for disallowing fully-masked loops. Make the final decision
21912 about whether use a fully-masked loop or not.
21913 (vect_estimate_min_profitable_iters): Do not assume that peeling
21914 for the number of iterations will be needed for fully-masked loops.
21915 (vectorizable_reduction): Disable fully-masked loops.
21916 (vectorizable_live_operation): Likewise.
21917 (vect_halve_mask_nunits): New function.
21918 (vect_double_mask_nunits): Likewise.
21919 (vect_record_loop_mask): Likewise.
21920 (vect_get_loop_mask): Likewise.
21921 (vect_transform_loop): Handle the case in which the final loop
21922 iteration might handle a partial vector. Call vect_set_loop_condition
21923 instead of slpeel_make_loop_iterate_ntimes.
21924 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21925 (check_load_store_masking): New function.
21926 (prepare_load_store_mask): Likewise.
21927 (vectorizable_store): Handle fully-masked loops.
21928 (vectorizable_load): Likewise.
21929 (supportable_widening_operation): Use vect_halve_mask_nunits for
21930 booleans.
21931 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21932 (vect_gen_while): New function.
21933 * config/aarch64/aarch64.md (umax<mode>3): New expander.
21934 (aarch64_uqdec<mode>): New insn.
21935
21936 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21937 Alan Hayward <alan.hayward@arm.com>
21938 David Sherwood <david.sherwood@arm.com>
21939
21940 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21941 (reduc_xor_scal_optab): New optabs.
21942 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21943 (reduc_xor_scal_@var{m}): Document.
21944 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21945 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21946 internal functions.
21947 * fold-const-call.c (fold_const_call): Handle them.
21948 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21949 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21950 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21951 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21952 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21953 (UNSPEC_XORV): New unspecs.
21954 (optab): Add entries for them.
21955 (BITWISEV): New int iterator.
21956 (bit_reduc_op): New int attributes.
21957
21958 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
21959 Alan Hayward <alan.hayward@arm.com>
21960 David Sherwood <david.sherwood@arm.com>
21961
21962 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21963 * internal-fn.def (VEC_SHL_INSERT): New internal function.
21964 * optabs.def (vec_shl_insert_optab): New optab.
21965 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21966 (duplicate_and_interleave): Likewise.
21967 * tree-vect-loop.c: Include internal-fn.h.
21968 (neutral_op_for_slp_reduction): New function, split out from
21969 get_initial_defs_for_reduction.
21970 (get_initial_def_for_reduction): Handle option 2 for variable-length
21971 vectors by loading the neutral value into a vector and then shifting
21972 the initial value into element 0.
21973 (get_initial_defs_for_reduction): Replace the code argument with
21974 the neutral value calculated by neutral_op_for_slp_reduction.
21975 Use gimple_build_vector for constant-length vectors.
21976 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21977 but the first group_size elements have a neutral value.
21978 Use duplicate_and_interleave otherwise.
21979 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21980 Update call to get_initial_defs_for_reduction. Handle SLP
21981 reductions for variable-length vectors by creating one vector
21982 result for each scalar result, with the elements associated
21983 with other scalar results stubbed out with the neutral value.
21984 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21985 Require IFN_VEC_SHL_INSERT for double reductions on
21986 variable-length vectors, or SLP reductions that have
21987 a neutral value. Require can_duplicate_and_interleave_p
21988 support for variable-length unchained SLP reductions if there
21989 is no neutral value, such as for MIN/MAX reductions. Also require
21990 the number of vector elements to be a multiple of the number of
21991 SLP statements when doing variable-length unchained SLP reductions.
21992 Update call to vect_create_epilog_for_reduction.
21993 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21994 and remove initial values.
21995 (duplicate_and_interleave): Make public.
21996 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21997 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21998
21999 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22000 Alan Hayward <alan.hayward@arm.com>
22001 David Sherwood <david.sherwood@arm.com>
22002
22003 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
22004 (can_duplicate_and_interleave_p): New function.
22005 (vect_get_and_check_slp_defs): Take the vector of statements
22006 rather than just the current one. Remove excess parentheses.
22007 Restriction rejectinon of vect_constant_def and vect_external_def
22008 for variable-length vectors to boolean types, or types for which
22009 can_duplicate_and_interleave_p is false.
22010 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
22011 (duplicate_and_interleave): New function.
22012 (vect_get_constant_vectors): Use gimple_build_vector for
22013 constant-length vectors and suitable variable-length constant
22014 vectors. Use duplicate_and_interleave for other variable-length
22015 vectors. Don't defer the update when inserting new statements.
22016
22017 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22018 Alan Hayward <alan.hayward@arm.com>
22019 David Sherwood <david.sherwood@arm.com>
22020
22021 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
22022 min_profitable_iters doesn't go negative.
22023
22024 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22025 Alan Hayward <alan.hayward@arm.com>
22026 David Sherwood <david.sherwood@arm.com>
22027
22028 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
22029 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
22030 * optabs.def (vec_mask_load_lanes_optab): New optab.
22031 (vec_mask_store_lanes_optab): Likewise.
22032 * internal-fn.def (MASK_LOAD_LANES): New internal function.
22033 (MASK_STORE_LANES): Likewise.
22034 * internal-fn.c (mask_load_lanes_direct): New macro.
22035 (mask_store_lanes_direct): Likewise.
22036 (expand_mask_load_optab_fn): Handle masked operations.
22037 (expand_mask_load_lanes_optab_fn): New macro.
22038 (expand_mask_store_optab_fn): Handle masked operations.
22039 (expand_mask_store_lanes_optab_fn): New macro.
22040 (direct_mask_load_lanes_optab_supported_p): Likewise.
22041 (direct_mask_store_lanes_optab_supported_p): Likewise.
22042 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
22043 parameter.
22044 (vect_load_lanes_supported): Likewise.
22045 * tree-vect-data-refs.c (strip_conversion): New function.
22046 (can_group_stmts_p): Likewise.
22047 (vect_analyze_data_ref_accesses): Use it instead of checking
22048 for a pair of assignments.
22049 (vect_store_lanes_supported): Take a masked_p parameter.
22050 (vect_load_lanes_supported): Likewise.
22051 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
22052 vect_store_lanes_supported and vect_load_lanes_supported.
22053 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
22054 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
22055 parameter. Don't allow gaps for masked accesses.
22056 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
22057 and vect_load_lanes_supported.
22058 (get_load_store_type): Take a masked_p parameter and update
22059 call to get_group_load_store_type.
22060 (vectorizable_store): Update call to get_load_store_type.
22061 Handle IFN_MASK_STORE_LANES.
22062 (vectorizable_load): Update call to get_load_store_type.
22063 Handle IFN_MASK_LOAD_LANES.
22064
22065 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22066 Alan Hayward <alan.hayward@arm.com>
22067 David Sherwood <david.sherwood@arm.com>
22068
22069 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
22070 modes for SVE.
22071 * config/aarch64/aarch64-protos.h
22072 (aarch64_sve_struct_memory_operand_p): Declare.
22073 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
22074 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
22075 (VPRED, vpred): Handle SVE structure modes.
22076 * config/aarch64/constraints.md (Utx): New constraint.
22077 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
22078 (aarch64_sve_struct_nonimmediate_operand): New predicates.
22079 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
22080 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
22081 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
22082 structure modes. Split into pieces after RA.
22083 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
22084 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
22085 New patterns.
22086 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
22087 SVE structure modes.
22088 (aarch64_classify_address): Likewise.
22089 (sizetochar): Move earlier in file.
22090 (aarch64_print_operand): Handle SVE register lists.
22091 (aarch64_array_mode): New function.
22092 (aarch64_sve_struct_memory_operand_p): Likewise.
22093 (TARGET_ARRAY_MODE): Redefine.
22094
22095 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22096 Alan Hayward <alan.hayward@arm.com>
22097 David Sherwood <david.sherwood@arm.com>
22098
22099 * target.def (array_mode): New target hook.
22100 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22101 * doc/tm.texi: Regenerate.
22102 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22103 * hooks.c (hook_optmode_mode_uhwi_none): New function.
22104 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22105 targetm.array_mode.
22106 * stor-layout.c (mode_for_array): Likewise. Support polynomial
22107 type sizes.
22108
22109 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22110 Alan Hayward <alan.hayward@arm.com>
22111 David Sherwood <david.sherwood@arm.com>
22112
22113 * fold-const.c (fold_binary_loc): Check the argument types
22114 rather than the result type when testing for a vector operation.
22115
22116 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22117
22118 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22119 * doc/tm.texi: Regenerate.
22120
22121 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22122 Alan Hayward <alan.hayward@arm.com>
22123 David Sherwood <david.sherwood@arm.com>
22124
22125 * doc/invoke.texi (-msve-vector-bits=): Document new option.
22126 (sve): Document new AArch64 extension.
22127 * doc/md.texi (w): Extend the description of the AArch64
22128 constraint to include SVE vectors.
22129 (Upl, Upa): Document new AArch64 predicate constraints.
22130 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22131 enum.
22132 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22133 (msve-vector-bits=): New option.
22134 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22135 SVE when these are disabled.
22136 (sve): New extension.
22137 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22138 modes. Adjust their number of units based on aarch64_sve_vg.
22139 (MAX_BITSIZE_MODE_ANY_MODE): Define.
22140 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22141 aarch64_addr_query_type.
22142 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22143 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22144 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22145 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22146 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22147 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22148 (aarch64_simd_imm_zero_p): Delete.
22149 (aarch64_check_zero_based_sve_index_immediate): Declare.
22150 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22151 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22152 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22153 (aarch64_sve_float_mul_immediate_p): Likewise.
22154 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22155 rather than an rtx.
22156 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22157 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22158 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22159 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22160 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22161 (aarch64_regmode_natural_size): Likewise.
22162 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22163 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22164 left one place.
22165 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22166 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22167 for VG and the SVE predicate registers.
22168 (V_ALIASES): Add a "z"-prefixed alias.
22169 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22170 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22171 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22172 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22173 (REG_CLASS_NAMES): Add entries for them.
22174 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
22175 and the predicate registers.
22176 (aarch64_sve_vg): Declare.
22177 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22178 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22179 (REGMODE_NATURAL_SIZE): Define.
22180 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22181 SVE macros.
22182 * config/aarch64/aarch64.c: Include cfgrtl.h.
22183 (simd_immediate_info): Add a constructor for series vectors,
22184 and an associated step field.
22185 (aarch64_sve_vg): New variable.
22186 (aarch64_dbx_register_number): Handle VG and the predicate registers.
22187 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22188 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22189 (VEC_ANY_DATA, VEC_STRUCT): New constants.
22190 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22191 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22192 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22193 (aarch64_get_mask_mode): New functions.
22194 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22195 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22196 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
22197 predicate modes and predicate registers. Explicitly restrict
22198 GPRs to modes of 16 bytes or smaller. Only allow FP registers
22199 to store a vector mode if it is recognized by
22200 aarch64_classify_vector_mode.
22201 (aarch64_regmode_natural_size): New function.
22202 (aarch64_hard_regno_caller_save_mode): Return the original mode
22203 for predicates.
22204 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22205 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22206 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22207 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22208 functions.
22209 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
22210 does not overlap dest if the function is frame-related. Handle
22211 SVE constants.
22212 (aarch64_split_add_offset): New function.
22213 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22214 them aarch64_add_offset.
22215 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22216 and update call to aarch64_sub_sp.
22217 (aarch64_add_cfa_expression): New function.
22218 (aarch64_expand_prologue): Pass extra temporary registers to the
22219 functions above. Handle the case in which we need to emit new
22220 DW_CFA_expressions for registers that were originally saved
22221 relative to the stack pointer, but now have to be expressed
22222 relative to the frame pointer.
22223 (aarch64_output_mi_thunk): Pass extra temporary registers to the
22224 functions above.
22225 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
22226 IP0 and IP1 values for SVE frames.
22227 (aarch64_expand_vec_series): New function.
22228 (aarch64_expand_sve_widened_duplicate): Likewise.
22229 (aarch64_expand_sve_const_vector): Likewise.
22230 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22231 Handle SVE constants. Use emit_move_insn to move a force_const_mem
22232 into the register, rather than emitting a SET directly.
22233 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22234 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22235 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22236 (offset_9bit_signed_scaled_p): New functions.
22237 (aarch64_replicate_bitmask_imm): New function.
22238 (aarch64_bitmask_imm): Use it.
22239 (aarch64_cannot_force_const_mem): Reject expressions involving
22240 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
22241 (aarch64_classify_index): Handle SVE indices, by requiring
22242 a plain register index with a scale that matches the element size.
22243 (aarch64_classify_address): Handle SVE addresses. Assert that
22244 the mode of the address is VOIDmode or an integer mode.
22245 Update call to aarch64_classify_symbol.
22246 (aarch64_classify_symbolic_expression): Update call to
22247 aarch64_classify_symbol.
22248 (aarch64_const_vec_all_in_range_p): New function.
22249 (aarch64_print_vector_float_operand): Likewise.
22250 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
22251 "vN" for FP registers with SVE modes. Handle (const ...) vectors
22252 and the FP immediates 1.0 and 0.5.
22253 (aarch64_print_address_internal): Handle SVE addresses.
22254 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22255 (aarch64_regno_regclass): Handle predicate registers.
22256 (aarch64_secondary_reload): Handle big-endian reloads of SVE
22257 data modes.
22258 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22259 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22260 (aarch64_convert_sve_vector_bits): New function.
22261 (aarch64_override_options): Use it to handle -msve-vector-bits=.
22262 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22263 rather than an rtx.
22264 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22265 Handle SVE vector and predicate modes. Accept VL-based constants
22266 that need only one temporary register, and VL offsets that require
22267 no temporary registers.
22268 (aarch64_conditional_register_usage): Mark the predicate registers
22269 as fixed if SVE isn't available.
22270 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22271 Return true for SVE vector and predicate modes.
22272 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22273 rather than an unsigned int. Handle SVE modes.
22274 (aarch64_preferred_simd_mode): Update call accordingly. Handle
22275 SVE modes.
22276 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22277 if SVE is enabled.
22278 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22279 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22280 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22281 (aarch64_sve_float_mul_immediate_p): New functions.
22282 (aarch64_sve_valid_immediate): New function.
22283 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22284 Explicitly reject structure modes. Check for INDEX constants.
22285 Handle PTRUE and PFALSE constants.
22286 (aarch64_check_zero_based_sve_index_immediate): New function.
22287 (aarch64_simd_imm_zero_p): Delete.
22288 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22289 vector modes. Accept constants in the range of CNT[BHWD].
22290 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22291 ask for an Advanced SIMD mode.
22292 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22293 (aarch64_simd_vector_alignment): Handle SVE predicates.
22294 (aarch64_vectorize_preferred_vector_alignment): New function.
22295 (aarch64_simd_vector_alignment_reachable): Use it instead of
22296 the vector size.
22297 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22298 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22299 functions.
22300 (MAX_VECT_LEN): Delete.
22301 (expand_vec_perm_d): Add a vec_flags field.
22302 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22303 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22304 (aarch64_evpc_ext): Don't apply a big-endian lane correction
22305 for SVE modes.
22306 (aarch64_evpc_rev): Rename to...
22307 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
22308 (aarch64_evpc_rev_global): New function.
22309 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22310 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22311 MAX_VECT_LEN.
22312 (aarch64_evpc_sve_tbl): New function.
22313 (aarch64_expand_vec_perm_const_1): Update after rename of
22314 aarch64_evpc_rev. Handle SVE permutes too, trying
22315 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22316 than aarch64_evpc_tbl.
22317 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22318 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22319 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22320 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22321 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22322 (aarch64_expand_sve_vcond): New functions.
22323 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22324 of aarch64_vector_mode_p.
22325 (aarch64_dwarf_poly_indeterminate_value): New function.
22326 (aarch64_compute_pressure_classes): Likewise.
22327 (aarch64_can_change_mode_class): Likewise.
22328 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22329 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22330 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22331 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22332 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22333 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22334 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22335 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22336 constraints.
22337 (Dn, Dl, Dr): Accept const as well as const_vector.
22338 (Dz): Likewise. Compare against CONST0_RTX.
22339 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22340 of "vector" where appropriate.
22341 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22342 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22343 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22344 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22345 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22346 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22347 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22348 (v_int_equiv): Extend to SVE modes.
22349 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22350 mode attributes.
22351 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22352 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22353 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22354 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22355 (SVE_COND_FP_CMP): New int iterators.
22356 (perm_hilo): Handle the new unpack unspecs.
22357 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22358 attributes.
22359 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22360 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22361 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22362 (aarch64_equality_operator, aarch64_constant_vector_operand)
22363 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22364 (aarch64_sve_nonimmediate_operand): Likewise.
22365 (aarch64_sve_general_operand): Likewise.
22366 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22367 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22368 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22369 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22370 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22371 (aarch64_sve_float_arith_immediate): Likewise.
22372 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22373 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22374 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22375 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22376 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22377 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22378 (aarch64_sve_float_arith_operand): Likewise.
22379 (aarch64_sve_float_arith_with_sub_operand): Likewise.
22380 (aarch64_sve_float_mul_operand): Likewise.
22381 (aarch64_sve_vec_perm_operand): Likewise.
22382 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22383 (aarch64_mov_operand): Accept const_poly_int and const_vector.
22384 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22385 as well as const_vector.
22386 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22387 in file. Use CONST0_RTX and CONSTM1_RTX.
22388 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
22389 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22390 Use aarch64_simd_imm_zero.
22391 * config/aarch64/aarch64-sve.md: New file.
22392 * config/aarch64/aarch64.md: Include it.
22393 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22394 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22395 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22396 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22397 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22398 (sve): New attribute.
22399 (enabled): Disable instructions with the sve attribute unless
22400 TARGET_SVE.
22401 (movqi, movhi): Pass CONST_POLY_INT operaneds through
22402 aarch64_expand_mov_immediate.
22403 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22404 CNT[BHSD] immediates.
22405 (movti): Split CONST_POLY_INT moves into two halves.
22406 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22407 Split additions that need a temporary here if the destination
22408 is the stack pointer.
22409 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22410 (*add<mode>3_poly_1): New instruction.
22411 (set_clobber_cc): New expander.
22412
22413 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22414
22415 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22416 parameter and use it instead of GET_MODE_SIZE (innermode). Use
22417 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22418 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22419 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
22420 Change innermode from fixed_mode_size to machine_mode.
22421 (simplify_subreg): Update call accordingly. Handle a constant-sized
22422 subreg of a variable-length CONST_VECTOR.
22423
22424 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
22425 Alan Hayward <alan.hayward@arm.com>
22426 David Sherwood <david.sherwood@arm.com>
22427
22428 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22429 (add_offset_to_base): New function, split out from...
22430 (create_mem_ref): ...here. When handling a scale other than 1,
22431 check first whether the address is valid without the offset.
22432 Add it into the base if so, leaving the index and scale as-is.
22433
22434 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22435
22436 PR c++/83778
22437 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22438 fold_for_warn before checking if arg2 is INTEGER_CST.
22439
22440 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
22441
22442 * config/rs6000/predicates.md (load_multiple_operation): Delete.
22443 (store_multiple_operation): Delete.
22444 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22445 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22446 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22447 guarded by TARGET_STRING.
22448 (rs6000_output_load_multiple): Delete.
22449 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22450 OPTION_MASK_STRING / TARGET_STRING handling.
22451 (print_operand) <'N', 'O'>: Add comment that these are unused now.
22452 (const rs6000_opt_masks) <"string">: Change mask to 0.
22453 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22454 (MASK_STRING): Delete.
22455 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22456 parts. Simplify.
22457 (load_multiple): Delete.
22458 (*ldmsi8): Delete.
22459 (*ldmsi7): Delete.
22460 (*ldmsi6): Delete.
22461 (*ldmsi5): Delete.
22462 (*ldmsi4): Delete.
22463 (*ldmsi3): Delete.
22464 (store_multiple): Delete.
22465 (*stmsi8): Delete.
22466 (*stmsi7): Delete.
22467 (*stmsi6): Delete.
22468 (*stmsi5): Delete.
22469 (*stmsi4): Delete.
22470 (*stmsi3): Delete.
22471 (movmemsi_8reg): Delete.
22472 (corresponding unnamed define_insn): Delete.
22473 (movmemsi_6reg): Delete.
22474 (corresponding unnamed define_insn): Delete.
22475 (movmemsi_4reg): Delete.
22476 (corresponding unnamed define_insn): Delete.
22477 (movmemsi_2reg): Delete.
22478 (corresponding unnamed define_insn): Delete.
22479 (movmemsi_1reg): Delete.
22480 (corresponding unnamed define_insn): Delete.
22481 * config/rs6000/rs6000.opt (mno-string): New.
22482 (mstring): Replace by deprecation warning stub.
22483 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22484
22485 2018-01-12 Jakub Jelinek <jakub@redhat.com>
22486
22487 * regrename.c (regrename_do_replace): If replacing the same
22488 reg multiple times, try to reuse last created gen_raw_REG.
22489
22490 PR debug/81155
22491 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22492 main to workaround a bug in GDB.
22493
22494 2018-01-12 Tom de Vries <tom@codesourcery.com>
22495
22496 PR target/83737
22497 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22498
22499 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
22500
22501 PR rtl-optimization/80481
22502 * ira-color.c (get_cap_member): New function.
22503 (allocnos_conflict_by_live_ranges_p): Use it.
22504 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22505 (setup_slot_coalesced_allocno_live_ranges): Ditto.
22506
22507 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
22508
22509 PR target/83628
22510 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22511 (*saddl_se_1): Ditto.
22512 (*ssubsi_1): Ditto.
22513 (*ssubl_se_1): Ditto.
22514
22515 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22516
22517 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22518 rather than wi::to_widest for DR_INITs.
22519 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22520 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22521 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22522 INTEGER_CSTs.
22523 (vect_analyze_group_access_1): Note that here.
22524
22525 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22526
22527 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22528 polynomial type sizes.
22529
22530 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
22531
22532 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22533 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22534 (gimple_add_tmp_var): Likewise.
22535
22536 2018-01-12 Martin Liska <mliska@suse.cz>
22537
22538 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22539 (gimple_alloc_sizes): Likewise.
22540 (dump_gimple_statistics): Use PRIu64 in printf format.
22541 * gimple.h: Change uint64_t to int.
22542
22543 2018-01-12 Martin Liska <mliska@suse.cz>
22544
22545 * tree-core.h: Use uint64_t instead of int.
22546 * tree.c (tree_node_counts): Likewise.
22547 (tree_node_sizes): Likewise.
22548 (dump_tree_statistics): Use PRIu64 in printf format.
22549
22550 2018-01-12 Martin Liska <mliska@suse.cz>
22551
22552 * Makefile.in: As qsort_chk is implemented in vec.c, add
22553 vec.o to linkage of gencfn-macros.
22554 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22555 passing the info to record_node_allocation_statistics.
22556 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22557 and pass the info.
22558 * ggc-common.c (struct ggc_usage): Add operator== and use
22559 it in operator< and compare function.
22560 * mem-stats.h (struct mem_usage): Likewise.
22561 * vec.c (struct vec_usage): Remove operator< and compare
22562 function. Can be simply inherited.
22563
22564 2018-01-12 Martin Jambor <mjambor@suse.cz>
22565
22566 PR target/81616
22567 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22568 * tree-ssa-math-opts.c: Include domwalk.h.
22569 (convert_mult_to_fma_1): New function.
22570 (fma_transformation_info): New type.
22571 (fma_deferring_state): Likewise.
22572 (cancel_fma_deferring): New function.
22573 (result_of_phi): Likewise.
22574 (last_fma_candidate_feeds_initial_phi): Likewise.
22575 (convert_mult_to_fma): Added deferring logic, split actual
22576 transformation to convert_mult_to_fma_1.
22577 (math_opts_dom_walker): New type.
22578 (math_opts_dom_walker::after_dom_children): New method, body moved
22579 here from pass_optimize_widening_mul::execute, added deferring logic
22580 bits.
22581 (pass_optimize_widening_mul::execute): Moved most of code to
22582 math_opts_dom_walker::after_dom_children.
22583 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22584 * config/i386/i386.c (ix86_option_override_internal): Added
22585 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22586
22587 2018-01-12 Richard Biener <rguenther@suse.de>
22588
22589 PR debug/83157
22590 * dwarf2out.c (gen_variable_die): Do not reset old_die for
22591 inline instance vars.
22592
22593 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
22594
22595 PR target/81819
22596 * config/rx/rx.c (rx_is_restricted_memory_address):
22597 Handle SUBREG case.
22598
22599 2018-01-12 Richard Biener <rguenther@suse.de>
22600
22601 PR tree-optimization/80846
22602 * target.def (split_reduction): New target hook.
22603 * targhooks.c (default_split_reduction): New function.
22604 * targhooks.h (default_split_reduction): Declare.
22605 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22606 target requests first reduce vectors by combining low and high
22607 parts.
22608 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22609 (get_vectype_for_scalar_type_and_size): Export.
22610 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22611 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22612 * doc/tm.texi: Regenerate.
22613 * config/i386/i386.c (ix86_split_reduction): Implement
22614 TARGET_VECTORIZE_SPLIT_REDUCTION.
22615
22616 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22617
22618 PR target/83368
22619 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22620 in PIC mode except for TARGET_VXWORKS_RTP.
22621 * config/sparc/sparc.c: Include cfgrtl.h.
22622 (TARGET_INIT_PIC_REG): Define.
22623 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22624 (sparc_pic_register_p): New predicate.
22625 (sparc_legitimate_address_p): Use it.
22626 (sparc_legitimize_pic_address): Likewise.
22627 (sparc_delegitimize_address): Likewise.
22628 (sparc_mode_dependent_address_p): Likewise.
22629 (gen_load_pcrel_sym): Remove 4th parameter.
22630 (load_got_register): Adjust call to above. Remove obsolete stuff.
22631 (sparc_expand_prologue): Do not call load_got_register here.
22632 (sparc_flat_expand_prologue): Likewise.
22633 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22634 (sparc_use_pseudo_pic_reg): New function.
22635 (sparc_init_pic_reg): Likewise.
22636 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22637 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22638
22639 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
22640
22641 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22642 Add item for branch_cost.
22643
22644 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22645
22646 PR rtl-optimization/83565
22647 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22648 not extend the result to a larger mode for rotate operations.
22649 (num_sign_bit_copies1): Likewise.
22650
22651 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22652
22653 PR target/40411
22654 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22655 -symbolic.
22656 Use values-Xc.o for -pedantic.
22657 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22658
22659 2018-01-12 Martin Liska <mliska@suse.cz>
22660
22661 PR ipa/83054
22662 * ipa-devirt.c (final_warning_record::grow_type_warnings):
22663 New function.
22664 (possible_polymorphic_call_targets): Use it.
22665 (ipa_devirt): Likewise.
22666
22667 2018-01-12 Martin Liska <mliska@suse.cz>
22668
22669 * profile-count.h (enum profile_quality): Use 0 as invalid
22670 enum value of profile_quality.
22671
22672 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
22673
22674 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22675 -mext-string options.
22676
22677 2018-01-12 Richard Biener <rguenther@suse.de>
22678
22679 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22680 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22681 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22682 Likewise.
22683 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22684
22685 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
22686
22687 * configure.ac (--with-long-double-format): Add support for the
22688 configuration option to change the default long double format on
22689 PowerPC systems.
22690 * config.gcc (powerpc*-linux*-*): Likewise.
22691 * configure: Regenerate.
22692 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22693 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22694 used without modification.
22695
22696 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22697
22698 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22699 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22700 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22701 MISC_BUILTIN_SPEC_BARRIER.
22702 (rs6000_init_builtins): Likewise.
22703 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22704 enum value.
22705 (speculation_barrier): New define_insn.
22706 * doc/extend.texi: Document __builtin_speculation_barrier.
22707
22708 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22709
22710 PR target/83203
22711 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22712 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22713 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22714 iterators.
22715 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
22716 integral modes instead of "ss" and "sd".
22717 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22718 vectors with 32-bit and 64-bit elements.
22719 (vecdupssescalarmodesuffix): New mode attribute.
22720 (vec_dup<mode>): Use it.
22721
22722 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
22723
22724 PR target/83330
22725 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22726 frame if argument is passed on stack.
22727
22728 2018-01-11 Jakub Jelinek <jakub@redhat.com>
22729
22730 PR target/82682
22731 * ree.c (combine_reaching_defs): Optimize also
22732 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22733 reg2=any_extend(exp); reg1=reg2;, formatting fix.
22734
22735 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22736
22737 PR middle-end/83189
22738 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22739
22740 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
22741
22742 PR middle-end/83718
22743 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22744 after they are computed.
22745
22746 2018-01-11 Bin Cheng <bin.cheng@arm.com>
22747
22748 PR tree-optimization/83695
22749 * gimple-loop-linterchange.cc
22750 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22751 reset cached scev information after interchange.
22752 (pass_linterchange::execute): Remove call to scev_reset_htab.
22753
22754 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22755
22756 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22757 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22758 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22759 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22760 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22761 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22762 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22763 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22764 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22765 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22766 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22767 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22768 (V_lane_reg): Likewise.
22769 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22770 New define_expand.
22771 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22772 (vfmal_lane_low<mode>_intrinsic,
22773 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22774 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22775 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22776 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22777 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22778 vfmsl_lane_high<mode>_intrinsic): New define_insns.
22779
22780 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22781
22782 * config/arm/arm-cpus.in (fp16fml): New feature.
22783 (ALL_SIMD): Add fp16fml.
22784 (armv8.2-a): Add fp16fml as an option.
22785 (armv8.3-a): Likewise.
22786 (armv8.4-a): Add fp16fml as part of fp16.
22787 * config/arm/arm.h (TARGET_FP16FML): Define.
22788 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22789 when appropriate.
22790 * config/arm/arm-modes.def (V2HF): Define.
22791 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22792 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22793 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22794 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22795 vfmsl_low, vfmsl_high): New set of builtins.
22796 * config/arm/iterators.md (PLUSMINUS): New code iterator.
22797 (vfml_op): New code attribute.
22798 (VFMLHALVES): New int iterator.
22799 (VFML, VFMLSEL): New mode attributes.
22800 (V_reg): Define mapping for V2HF.
22801 (V_hi, V_lo): New mode attributes.
22802 (VF_constraint): Likewise.
22803 (vfml_half, vfml_half_selector): New int attributes.
22804 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22805 define_expand.
22806 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22807 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22808 New define_insn.
22809 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22810 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22811 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22812 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
22813 documentation.
22814 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22815 Document new effective target and option set.
22816
22817 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22818
22819 * config/arm/arm-cpus.in (armv8_4): New feature.
22820 (ARMv8_4a): New fgroup.
22821 (armv8.4-a): New arch.
22822 * config/arm/arm-tables.opt: Regenerate.
22823 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22824 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22825 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22826 Add matching rules for -march=armv8.4-a and extensions.
22827 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22828
22829 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
22830
22831 PR target/81821
22832 * config/rx/rx.md (BW): New mode attribute.
22833 (sync_lock_test_and_setsi): Add mode suffix to insn output.
22834
22835 2018-01-11 Richard Biener <rguenther@suse.de>
22836
22837 PR tree-optimization/83435
22838 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22839 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22840 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22841
22842 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22843 Alan Hayward <alan.hayward@arm.com>
22844 David Sherwood <david.sherwood@arm.com>
22845
22846 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22847 field.
22848 (aarch64_classify_address): Initialize it. Track polynomial offsets.
22849 (aarch64_print_address_internal): Use it to check for a zero offset.
22850
22851 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22852 Alan Hayward <alan.hayward@arm.com>
22853 David Sherwood <david.sherwood@arm.com>
22854
22855 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22856 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22857 Return a poly_int64 rather than a HOST_WIDE_INT.
22858 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22859 rather than a HOST_WIDE_INT.
22860 * config/aarch64/aarch64.h (aarch64_frame): Protect with
22861 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
22862 hard_fp_offset, frame_size, initial_adjust, callee_offset and
22863 final_offset from HOST_WIDE_INT to poly_int64.
22864 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22865 to_constant when getting the number of units in an Advanced SIMD
22866 mode.
22867 (aarch64_builtin_vectorized_function): Check for a constant number
22868 of units.
22869 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22870 GET_MODE_SIZE.
22871 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22872 attribute instead of GET_MODE_NUNITS.
22873 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22874 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22875 GET_MODE_SIZE for fixed-size registers.
22876 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22877 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22878 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22879 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22880 (aarch64_print_operand, aarch64_print_address_internal)
22881 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22882 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22883 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22884 Handle polynomial GET_MODE_SIZE.
22885 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
22886 wider than SImode without modification.
22887 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22888 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22889 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22890 passing and returning SVE modes.
22891 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22892 rather than GEN_INT.
22893 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22894 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22895 (aarch64_allocate_and_probe_stack_space): Likewise.
22896 (aarch64_layout_frame): Cope with polynomial offsets.
22897 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22898 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
22899 polynomial offsets.
22900 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22901 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22902 poly_int64 rather than a HOST_WIDE_INT.
22903 (aarch64_get_separate_components, aarch64_process_components)
22904 (aarch64_expand_prologue, aarch64_expand_epilogue)
22905 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22906 (aarch64_anchor_offset): New function, split out from...
22907 (aarch64_legitimize_address): ...here.
22908 (aarch64_builtin_vectorization_cost): Handle polynomial
22909 TYPE_VECTOR_SUBPARTS.
22910 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22911 GET_MODE_NUNITS.
22912 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22913 number of elements from the PARALLEL rather than the mode.
22914 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22915 rather than GET_MODE_BITSIZE.
22916 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22917 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22918 (aarch64_expand_vec_perm_const_1): Handle polynomial
22919 d->perm.length () and d->perm elements.
22920 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
22921 Apply to_constant to d->perm elements.
22922 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22923 polynomial CONST_VECTOR_NUNITS.
22924 (aarch64_move_pointer): Take amount as a poly_int64 rather
22925 than an int.
22926 (aarch64_progress_pointer): Avoid temporary variable.
22927 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22928 the mode attribute instead of GET_MODE.
22929
22930 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22931 Alan Hayward <alan.hayward@arm.com>
22932 David Sherwood <david.sherwood@arm.com>
22933
22934 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22935 x exists before using it.
22936 (aarch64_add_constant_internal): Rename to...
22937 (aarch64_add_offset_1): ...this. Replace regnum with separate
22938 src and dest rtxes. Handle the case in which they're different,
22939 including when the offset is zero. Replace scratchreg with an rtx.
22940 Use 2 additions if there is no spare register into which we can
22941 move a 16-bit constant.
22942 (aarch64_add_constant): Delete.
22943 (aarch64_add_offset): Replace reg with separate src and dest
22944 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
22945 Use aarch64_add_offset_1.
22946 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22947 an rtx rather than an int. Take the delta as a poly_int64
22948 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
22949 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22950 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22951 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22952 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22953 and aarch64_add_sp.
22954 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22955 aarch64_add_constant.
22956
22957 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22958
22959 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22960 Use scalar_float_mode.
22961
22962 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22963
22964 * config/aarch64/aarch64-simd.md
22965 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22966 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22967 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22968 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22969 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22970 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22971 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22972 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22973 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22974 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22975
22976 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22977
22978 PR target/83514
22979 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22980 targ_options->x_arm_arch_string is non NULL.
22981
22982 2018-01-11 Tamar Christina <tamar.christina@arm.com>
22983
22984 * config/aarch64/aarch64.h
22985 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
22986
22987 2018-01-11 Sudakshina Das <sudi.das@arm.com>
22988
22989 PR target/82096
22990 * expmed.c (emit_store_flag_force): Swap if const op0
22991 and change VOIDmode to mode of op0.
22992
22993 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
22994
22995 PR rtl-optimization/83761
22996 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22997 than bytes to mode_for_size.
22998
22999 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23000
23001 PR middle-end/83189
23002 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
23003 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
23004 profile.
23005
23006 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23007
23008 PR middle-end/83575
23009 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
23010 when in layout mode.
23011 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
23012 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
23013 partition fixup.
23014
23015 2018-01-10 Michael Collison <michael.collison@arm.com>
23016
23017 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
23018 * config/aarch64/aarch64-option-extension.def: Add
23019 AARCH64_OPT_EXTENSION of 'fp16fml'.
23020 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23021 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
23022 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
23023 * config/aarch64/constraints.md (Ui7): New constraint.
23024 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
23025 (VFMLA_SEL_W): Ditto.
23026 (f16quad): Ditto.
23027 (f16mac1): Ditto.
23028 (VFMLA16_LOW): New int iterator.
23029 (VFMLA16_HIGH): Ditto.
23030 (UNSPEC_FMLAL): New unspec.
23031 (UNSPEC_FMLSL): Ditto.
23032 (UNSPEC_FMLAL2): Ditto.
23033 (UNSPEC_FMLSL2): Ditto.
23034 (f16mac): New code attribute.
23035 * config/aarch64/aarch64-simd-builtins.def
23036 (aarch64_fmlal_lowv2sf): Ditto.
23037 (aarch64_fmlsl_lowv2sf): Ditto.
23038 (aarch64_fmlalq_lowv4sf): Ditto.
23039 (aarch64_fmlslq_lowv4sf): Ditto.
23040 (aarch64_fmlal_highv2sf): Ditto.
23041 (aarch64_fmlsl_highv2sf): Ditto.
23042 (aarch64_fmlalq_highv4sf): Ditto.
23043 (aarch64_fmlslq_highv4sf): Ditto.
23044 (aarch64_fmlal_lane_lowv2sf): Ditto.
23045 (aarch64_fmlsl_lane_lowv2sf): Ditto.
23046 (aarch64_fmlal_laneq_lowv2sf): Ditto.
23047 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
23048 (aarch64_fmlalq_lane_lowv4sf): Ditto.
23049 (aarch64_fmlsl_lane_lowv4sf): Ditto.
23050 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
23051 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
23052 (aarch64_fmlal_lane_highv2sf): Ditto.
23053 (aarch64_fmlsl_lane_highv2sf): Ditto.
23054 (aarch64_fmlal_laneq_highv2sf): Ditto.
23055 (aarch64_fmlsl_laneq_highv2sf): Ditto.
23056 (aarch64_fmlalq_lane_highv4sf): Ditto.
23057 (aarch64_fmlsl_lane_highv4sf): Ditto.
23058 (aarch64_fmlalq_laneq_highv4sf): Ditto.
23059 (aarch64_fmlsl_laneq_highv4sf): Ditto.
23060 * config/aarch64/aarch64-simd.md:
23061 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
23062 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23063 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
23064 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23065 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
23066 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
23067 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
23068 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
23069 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
23070 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
23071 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
23072 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
23073 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
23074 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
23075 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
23076 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
23077 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
23078 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
23079 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
23080 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
23081 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
23082 (vfmlsl_low_u32): Ditto.
23083 (vfmlalq_low_u32): Ditto.
23084 (vfmlslq_low_u32): Ditto.
23085 (vfmlal_high_u32): Ditto.
23086 (vfmlsl_high_u32): Ditto.
23087 (vfmlalq_high_u32): Ditto.
23088 (vfmlslq_high_u32): Ditto.
23089 (vfmlal_lane_low_u32): Ditto.
23090 (vfmlsl_lane_low_u32): Ditto.
23091 (vfmlal_laneq_low_u32): Ditto.
23092 (vfmlsl_laneq_low_u32): Ditto.
23093 (vfmlalq_lane_low_u32): Ditto.
23094 (vfmlslq_lane_low_u32): Ditto.
23095 (vfmlalq_laneq_low_u32): Ditto.
23096 (vfmlslq_laneq_low_u32): Ditto.
23097 (vfmlal_lane_high_u32): Ditto.
23098 (vfmlsl_lane_high_u32): Ditto.
23099 (vfmlal_laneq_high_u32): Ditto.
23100 (vfmlsl_laneq_high_u32): Ditto.
23101 (vfmlalq_lane_high_u32): Ditto.
23102 (vfmlslq_lane_high_u32): Ditto.
23103 (vfmlalq_laneq_high_u32): Ditto.
23104 (vfmlslq_laneq_high_u32): Ditto.
23105 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23106 (AARCH64_FL_FOR_ARCH8_4): New.
23107 (AARCH64_ISA_F16FML): New ISA flag.
23108 (TARGET_F16FML): New feature flag for fp16fml.
23109 (doc/invoke.texi): Document new fp16fml option.
23110
23111 2018-01-10 Michael Collison <michael.collison@arm.com>
23112
23113 * config/aarch64/aarch64-builtins.c:
23114 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23115 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23116 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23117 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23118 (AARCH64_ISA_SHA3): New ISA flag.
23119 (TARGET_SHA3): New feature flag for sha3.
23120 * config/aarch64/iterators.md (sha512_op): New int attribute.
23121 (CRYPTO_SHA512): New int iterator.
23122 (UNSPEC_SHA512H): New unspec.
23123 (UNSPEC_SHA512H2): Ditto.
23124 (UNSPEC_SHA512SU0): Ditto.
23125 (UNSPEC_SHA512SU1): Ditto.
23126 * config/aarch64/aarch64-simd-builtins.def
23127 (aarch64_crypto_sha512hqv2di): New builtin.
23128 (aarch64_crypto_sha512h2qv2di): Ditto.
23129 (aarch64_crypto_sha512su0qv2di): Ditto.
23130 (aarch64_crypto_sha512su1qv2di): Ditto.
23131 (aarch64_eor3qv8hi): Ditto.
23132 (aarch64_rax1qv2di): Ditto.
23133 (aarch64_xarqv2di): Ditto.
23134 (aarch64_bcaxqv8hi): Ditto.
23135 * config/aarch64/aarch64-simd.md:
23136 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23137 (aarch64_crypto_sha512su0qv2di): Ditto.
23138 (aarch64_crypto_sha512su1qv2di): Ditto.
23139 (aarch64_eor3qv8hi): Ditto.
23140 (aarch64_rax1qv2di): Ditto.
23141 (aarch64_xarqv2di): Ditto.
23142 (aarch64_bcaxqv8hi): Ditto.
23143 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23144 (vsha512h2q_u64): Ditto.
23145 (vsha512su0q_u64): Ditto.
23146 (vsha512su1q_u64): Ditto.
23147 (veor3q_u16): Ditto.
23148 (vrax1q_u64): Ditto.
23149 (vxarq_u64): Ditto.
23150 (vbcaxq_u16): Ditto.
23151 * config/arm/types.md (crypto_sha512): New type attribute.
23152 (crypto_sha3): Ditto.
23153 (doc/invoke.texi): Document new sha3 option.
23154
23155 2018-01-10 Michael Collison <michael.collison@arm.com>
23156
23157 * config/aarch64/aarch64-builtins.c:
23158 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23159 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23160 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23161 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23162 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23163 (AARCH64_ISA_SM4): New ISA flag.
23164 (TARGET_SM4): New feature flag for sm4.
23165 * config/aarch64/aarch64-simd-builtins.def
23166 (aarch64_sm3ss1qv4si): Ditto.
23167 (aarch64_sm3tt1aq4si): Ditto.
23168 (aarch64_sm3tt1bq4si): Ditto.
23169 (aarch64_sm3tt2aq4si): Ditto.
23170 (aarch64_sm3tt2bq4si): Ditto.
23171 (aarch64_sm3partw1qv4si): Ditto.
23172 (aarch64_sm3partw2qv4si): Ditto.
23173 (aarch64_sm4eqv4si): Ditto.
23174 (aarch64_sm4ekeyqv4si): Ditto.
23175 * config/aarch64/aarch64-simd.md:
23176 (aarch64_sm3ss1qv4si): Ditto.
23177 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23178 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23179 (aarch64_sm4eqv4si): Ditto.
23180 (aarch64_sm4ekeyqv4si): Ditto.
23181 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23182 (sm3part_op): Ditto.
23183 (CRYPTO_SM3TT): Ditto.
23184 (CRYPTO_SM3PART): Ditto.
23185 (UNSPEC_SM3SS1): New unspec.
23186 (UNSPEC_SM3TT1A): Ditto.
23187 (UNSPEC_SM3TT1B): Ditto.
23188 (UNSPEC_SM3TT2A): Ditto.
23189 (UNSPEC_SM3TT2B): Ditto.
23190 (UNSPEC_SM3PARTW1): Ditto.
23191 (UNSPEC_SM3PARTW2): Ditto.
23192 (UNSPEC_SM4E): Ditto.
23193 (UNSPEC_SM4EKEY): Ditto.
23194 * config/aarch64/constraints.md (Ui2): New constraint.
23195 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23196 * config/arm/types.md (crypto_sm3): New type attribute.
23197 (crypto_sm4): Ditto.
23198 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23199 (vsm3tt1aq_u32): Ditto.
23200 (vsm3tt1bq_u32): Ditto.
23201 (vsm3tt2aq_u32): Ditto.
23202 (vsm3tt2bq_u32): Ditto.
23203 (vsm3partw1q_u32): Ditto.
23204 (vsm3partw2q_u32): Ditto.
23205 (vsm4eq_u32): Ditto.
23206 (vsm4ekeyq_u32): Ditto.
23207 (doc/invoke.texi): Document new sm4 option.
23208
23209 2018-01-10 Michael Collison <michael.collison@arm.com>
23210
23211 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23212 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23213 (AARCH64_FL_FOR_ARCH8_4): New.
23214 (AARCH64_FL_V8_4): New flag.
23215 (doc/invoke.texi): Document new armv8.4-a option.
23216
23217 2018-01-10 Michael Collison <michael.collison@arm.com>
23218
23219 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23220 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23221 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23222 * config/aarch64/aarch64-option-extension.def: Add
23223 AARCH64_OPT_EXTENSION of 'sha2'.
23224 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23225 (crypto): Disable sha2 and aes if crypto disabled.
23226 (crypto): Enable aes and sha2 if enabled.
23227 (simd): Disable sha2 and aes if simd disabled.
23228 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23229 New flags.
23230 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23231 (TARGET_SHA2): New feature flag for sha2.
23232 (TARGET_AES): New feature flag for aes.
23233 * config/aarch64/aarch64-simd.md:
23234 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23235 conditional on TARGET_AES.
23236 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23237 (aarch64_crypto_sha1hsi): Make pattern conditional
23238 on TARGET_SHA2.
23239 (aarch64_crypto_sha1hv4si): Ditto.
23240 (aarch64_be_crypto_sha1hv4si): Ditto.
23241 (aarch64_crypto_sha1su1v4si): Ditto.
23242 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23243 (aarch64_crypto_sha1su0v4si): Ditto.
23244 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23245 (aarch64_crypto_sha256su0v4si): Ditto.
23246 (aarch64_crypto_sha256su1v4si): Ditto.
23247 (doc/invoke.texi): Document new aes and sha2 options.
23248
23249 2018-01-10 Martin Sebor <msebor@redhat.com>
23250
23251 PR tree-optimization/83781
23252 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23253 as string arrays.
23254
23255 2018-01-11 Martin Sebor <msebor@gmail.com>
23256 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
23257
23258 PR tree-optimization/83501
23259 PR tree-optimization/81703
23260
23261 * tree-ssa-strlen.c (get_string_cst): Rename...
23262 (get_string_len): ...to this. Handle global constants.
23263 (handle_char_store): Adjust.
23264
23265 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
23266 Jim Wilson <jimw@sifive.com>
23267
23268 * config/riscv/riscv-protos.h (riscv_output_return): New.
23269 * config/riscv/riscv.c (struct machine_function): New naked_p field.
23270 (riscv_attribute_table, riscv_output_return),
23271 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23272 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23273 (riscv_compute_frame_info): Only compute frame->mask if not a naked
23274 function.
23275 (riscv_expand_prologue): Add early return for naked function.
23276 (riscv_expand_epilogue): Likewise.
23277 (riscv_function_ok_for_sibcall): Return false for naked function.
23278 (riscv_set_current_function): New.
23279 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23280 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23281 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23282 * doc/extend.texi (RISC-V Function Attributes): New.
23283
23284 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
23285
23286 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23287 check for 128-bit long double before checking TCmode.
23288 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23289 128-bit long doubles before checking TFmode or TCmode.
23290 (FLOAT128_IBM_P): Likewise.
23291
23292 2018-01-10 Martin Sebor <msebor@redhat.com>
23293
23294 PR tree-optimization/83671
23295 * builtins.c (c_strlen): Unconditionally return zero for the empty
23296 string.
23297 Use -Warray-bounds for warnings.
23298 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23299 for non-constant array indices with COMPONENT_REF, arrays of
23300 arrays, and pointers to arrays.
23301 (gimple_fold_builtin_strlen): Determine and set length range for
23302 non-constant character arrays.
23303
23304 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
23305
23306 PR middle-end/81897
23307 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23308 empty blocks.
23309
23310 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
23311
23312 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23313
23314 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23315
23316 PR target/83399
23317 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23318 VECTOR_MEM_ALTIVEC_OR_VSX_P.
23319 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23320 indexed_or_indirect_operand predicate.
23321 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23322 (*vsx_le_perm_load_v8hi): Likewise.
23323 (*vsx_le_perm_load_v16qi): Likewise.
23324 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23325 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23326 (*vsx_le_perm_store_v8hi): Likewise.
23327 (*vsx_le_perm_store_v16qi): Likewise.
23328 (eight unnamed splitters): Likewise.
23329
23330 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
23331
23332 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23333 * config/rs6000/emmintrin.h: Likewise.
23334 * config/rs6000/mmintrin.h: Likewise.
23335 * config/rs6000/xmmintrin.h: Likewise.
23336
23337 2018-01-10 David Malcolm <dmalcolm@redhat.com>
23338
23339 PR c++/43486
23340 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23341 "public_flag".
23342 * tree.c (tree_nop_conversion): Return true for location wrapper
23343 nodes.
23344 (maybe_wrap_with_location): New function.
23345 (selftest::check_strip_nops): New function.
23346 (selftest::test_location_wrappers): New function.
23347 (selftest::tree_c_tests): Call it.
23348 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23349 (maybe_wrap_with_location): New decl.
23350 (EXPR_LOCATION_WRAPPER_P): New macro.
23351 (location_wrapper_p): New inline function.
23352 (tree_strip_any_location_wrapper): New inline function.
23353
23354 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
23355
23356 PR target/83735
23357 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23358 stack_realign_offset for the largest alignment of stack slot
23359 actually used.
23360 (ix86_find_max_used_stack_alignment): New function.
23361 (ix86_finalize_stack_frame_flags): Use it. Set
23362 max_used_stack_alignment if we don't realign stack.
23363 * config/i386/i386.h (machine_function): Add
23364 max_used_stack_alignment.
23365
23366 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
23367
23368 * config/arm/arm.opt (-mbranch-cost): New option.
23369 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23370 account.
23371
23372 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
23373
23374 PR target/83629
23375 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23376 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23377
23378 2018-01-10 Richard Biener <rguenther@suse.de>
23379
23380 PR debug/83765
23381 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23382 early out so it also covers the case where we have a non-NULL
23383 origin.
23384
23385 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23386
23387 PR tree-optimization/83753
23388 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23389 for non-strided grouped accesses if the number of elements is 1.
23390
23391 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
23392
23393 PR target/81616
23394 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23395 * i386.h (TARGET_USE_GATHER): Define.
23396 * x86-tune.def (X86_TUNE_USE_GATHER): New.
23397
23398 2018-01-10 Martin Liska <mliska@suse.cz>
23399
23400 PR bootstrap/82831
23401 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23402 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23403 partitioning.
23404 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23405 CLEANUP_NO_PARTITIONING is not set.
23406
23407 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
23408
23409 * doc/rtl.texi: Remove documentation of (const ...) wrappers
23410 for vectors, as a partial revert of r254296.
23411 * rtl.h (const_vec_p): Delete.
23412 (const_vec_duplicate_p): Don't test for vector CONSTs.
23413 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23414 * expmed.c (make_tree): Likewise.
23415
23416 Revert:
23417 * common.md (E, F): Use CONSTANT_P instead of checking for
23418 CONST_VECTOR.
23419 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23420 checking for CONST_VECTOR.
23421
23422 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23423
23424 PR middle-end/83575
23425 * predict.c (force_edge_cold): Handle in more sane way edges
23426 with no prediction.
23427
23428 2018-01-09 Carl Love <cel@us.ibm.com>
23429
23430 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23431 V4SI, V4SF types.
23432 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23433 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23434 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23435 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
23436 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23437 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
23438 * config/rs6000/rs6000-protos.h: Add extern defition for
23439 rs6000_generate_float2_double_code.
23440 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23441 function.
23442 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23443 (float2_v2df): Add define_expand.
23444
23445 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
23446
23447 PR target/83628
23448 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23449 op_mode in the force_to_mode call.
23450
23451 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23452
23453 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23454 instead of checking each element individually.
23455 (aarch64_evpc_uzp): Likewise.
23456 (aarch64_evpc_zip): Likewise.
23457 (aarch64_evpc_ext): Likewise.
23458 (aarch64_evpc_rev): Likewise.
23459 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23460 instead of checking each element individually. Return true without
23461 generating rtl if
23462 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23463 whether all selected elements come from the same input, instead of
23464 checking each element individually. Remove calls to gen_rtx_REG,
23465 start_sequence and end_sequence and instead assert that no rtl is
23466 generated.
23467
23468 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23469
23470 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23471 order of HIGH and CONST checks.
23472
23473 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
23474
23475 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23476 if the destination isn't an SSA_NAME.
23477
23478 2018-01-09 Richard Biener <rguenther@suse.de>
23479
23480 PR tree-optimization/83668
23481 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23482 move prologue...
23483 (canonicalize_loop_form): ... here, renamed from ...
23484 (canonicalize_loop_closed_ssa_form): ... this and amended to
23485 swap successor edges for loop exit blocks to make us use
23486 the RPO order we need for initial schedule generation.
23487
23488 2018-01-09 Joseph Myers <joseph@codesourcery.com>
23489
23490 PR tree-optimization/64811
23491 * match.pd: When optimizing comparisons with Inf, avoid
23492 introducing or losing exceptions from comparisons with NaN.
23493
23494 2018-01-09 Martin Liska <mliska@suse.cz>
23495
23496 PR sanitizer/82517
23497 * asan.c (shadow_mem_size): Add gcc_assert.
23498
23499 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
23500
23501 Don't save registers in main().
23502
23503 PR target/83738
23504 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23505 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23506 * config/avr/avr.c (avr_set_current_function): Don't error if
23507 naked, OS_task or OS_main are specified at the same time.
23508 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23509 OS_main.
23510 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23511 attribute.
23512 * common/config/avr/avr-common.c (avr_option_optimization_table):
23513 Switch on -mmain-is-OS_task for optimizing compilations.
23514
23515 2018-01-09 Richard Biener <rguenther@suse.de>
23516
23517 PR tree-optimization/83572
23518 * graphite.c: Include cfganal.h.
23519 (graphite_transform_loops): Connect infinite loops to exit
23520 and remove fake edges at the end.
23521
23522 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23523
23524 * ipa-inline.c (edge_badness): Revert accidental checkin.
23525
23526 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
23527
23528 PR ipa/80763
23529 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23530 symbols; not inline clones.
23531
23532 2018-01-09 Jakub Jelinek <jakub@redhat.com>
23533
23534 PR target/83507
23535 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23536 hard registers. Formatting fixes.
23537
23538 PR preprocessor/83722
23539 * gcc.c (try_generate_repro): Pass
23540 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23541 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23542 do_report_bug.
23543
23544 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
23545 Kito Cheng <kito.cheng@gmail.com>
23546
23547 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23548 (riscv_leaf_function_p): Delete.
23549 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23550
23551 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23552
23553 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23554 function.
23555 (do_ifelse): New function.
23556 (do_isel): New function.
23557 (do_sub3): New function.
23558 (do_add3): New function.
23559 (do_load_mask_compare): New function.
23560 (do_overlap_load_compare): New function.
23561 (expand_compare_loop): New function.
23562 (expand_block_compare): Call expand_compare_loop() when appropriate.
23563 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23564 option description.
23565 (-mblock-compare-inline-loop-limit): New option.
23566
23567 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23568
23569 PR target/83677
23570 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23571 Reverse order of second and third operands in first alternative.
23572 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23573 of first and second elements in UNSPEC_VPERMR vector.
23574 (altivec_expand_vec_perm_le): Likewise.
23575
23576 2018-01-08 Jeff Law <law@redhat.com>
23577
23578 PR rtl-optimizatin/81308
23579 * tree-switch-conversion.c (cfg_altered): New file scoped static.
23580 (process_switch): If group_case_labels makes a change, then set
23581 cfg_altered.
23582 (pass_convert_switch::execute): If a switch is converted, then
23583 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
23584
23585 PR rtl-optimization/81308
23586 * recog.c (split_all_insns): Conditionally cleanup the CFG after
23587 splitting insns.
23588
23589 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
23590
23591 PR target/83663 - Revert r255946
23592 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23593 generation for cases where splatting a value is not useful.
23594 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23595 across a vec_duplicate and a paradoxical subreg forming a vector
23596 mode to a vec_concat.
23597
23598 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23599
23600 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23601 -march=armv8.3-a variants.
23602 * config/arm/t-multilib: Likewise.
23603 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
23604
23605 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23606
23607 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23608 to generate rtl.
23609 (cceq_ior_compare_complement): Give it a name so I can use it, and
23610 change boolean_or_operator predicate to boolean_operator so it can
23611 be used to generate a crand.
23612 (eqne): New code iterator.
23613 (bd/bd_neg): New code_attrs.
23614 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23615 a single define_insn.
23616 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23617 decrement (bdnzt/bdnzf/bdzt/bdzf).
23618 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23619 with the new names of the branch decrement patterns, and added the
23620 names of the branch decrement conditional patterns.
23621
23622 2018-01-08 Richard Biener <rguenther@suse.de>
23623
23624 PR tree-optimization/83563
23625 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23626 cache.
23627
23628 2018-01-08 Richard Biener <rguenther@suse.de>
23629
23630 PR middle-end/83713
23631 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23632
23633 2018-01-08 Richard Biener <rguenther@suse.de>
23634
23635 PR tree-optimization/83685
23636 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23637 references to abnormals.
23638
23639 2018-01-08 Richard Biener <rguenther@suse.de>
23640
23641 PR lto/83719
23642 * dwarf2out.c (output_indirect_strings): Handle empty
23643 skeleton_debug_str_hash.
23644 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23645
23646 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23647
23648 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23649 (emit_store_direct): Likewise.
23650 (arc_trampoline_adjust_address): Likewise.
23651 (arc_asm_trampoline_template): New function.
23652 (arc_initialize_trampoline): Use asm_trampoline_template.
23653 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23654 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23655 * config/arc/arc.md (flush_icache): Delete pattern.
23656
23657 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
23658
23659 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23660 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23661 munaligned-access.
23662
23663 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23664
23665 PR target/83681
23666 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23667 by not USED_FOR_TARGET.
23668 (make_pass_resolve_sw_modes): Likewise.
23669
23670 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
23671
23672 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23673 USED_FOR_TARGET.
23674
23675 2018-01-08 Richard Biener <rguenther@suse.de>
23676
23677 PR middle-end/83580
23678 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23679
23680 2018-01-08 Richard Biener <rguenther@suse.de>
23681
23682 PR middle-end/83517
23683 * match.pd ((t * 2) / 2) -> t): Add missing :c.
23684
23685 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
23686
23687 PR middle-end/81897
23688 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23689 basic blocks with a small number of successors.
23690 (convert_control_dep_chain_into_preds): Improve handling of
23691 forwarder blocks.
23692 (dump_predicates): Split apart into...
23693 (dump_pred_chain): ...here...
23694 (dump_pred_info): ...and here.
23695 (can_one_predicate_be_invalidated_p): Add debugging printfs.
23696 (can_chain_union_be_invalidated_p): Improve check for invalidation
23697 of paths.
23698 (uninit_uses_cannot_happen): Avoid unnecessary if
23699 convert_control_dep_chain_into_preds yielded nothing.
23700
23701 2018-01-06 Martin Sebor <msebor@redhat.com>
23702
23703 PR tree-optimization/83640
23704 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23705 subtracting negative offset from size.
23706 (builtin_access::overlap): Adjust offset bounds of the access to fall
23707 within the size of the object if possible.
23708
23709 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
23710
23711 PR rtl-optimization/83699
23712 * expmed.c (extract_bit_field_1): Restrict the vector usage of
23713 extract_bit_field_as_subreg to cases in which the extracted
23714 value is also a vector.
23715
23716 * lra-constraints.c (process_alt_operands): Test for the equivalence
23717 substitutions when detecting a possible reload cycle.
23718
23719 2018-01-06 Jakub Jelinek <jakub@redhat.com>
23720
23721 PR debug/83480
23722 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23723 by default if flag_selective_schedling{,2}. Formatting fixes.
23724
23725 PR rtl-optimization/83682
23726 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23727 if it has non-VECTOR_MODE element mode.
23728 (vec_duplicate_p): Likewise.
23729
23730 PR middle-end/83694
23731 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23732 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23733
23734 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23735
23736 PR target/83604
23737 * config/i386/i386-builtin.def
23738 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23739 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23740 Require also OPTION_MASK_ISA_AVX512F in addition to
23741 OPTION_MASK_ISA_GFNI.
23742 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23743 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23744 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23745 to OPTION_MASK_ISA_GFNI.
23746 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23747 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23748 OPTION_MASK_ISA_AVX512BW.
23749 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23750 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23751 addition to OPTION_MASK_ISA_GFNI.
23752 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23753 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23754 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23755 to OPTION_MASK_ISA_GFNI.
23756 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23757 a requirement for all ISAs rather than any of them with a few
23758 exceptions.
23759 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23760 processing.
23761 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23762 bitmasks to be enabled with 3 exceptions, instead of requiring any
23763 enabled ISA with lots of exceptions.
23764 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23765 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23766 Change avx512bw in isa attribute to avx512f.
23767 * config/i386/sgxintrin.h: Add license boilerplate.
23768 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
23769 to __AVX512F__ and __AVX512VL to __AVX512VL__.
23770 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23771 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23772 defined.
23773 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23774 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23775 temporarily sse2 rather than sse if not enabled already.
23776
23777 PR target/83604
23778 * config/i386/sse.md (VI248_VLBW): Rename to ...
23779 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
23780 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23781 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23782 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23783 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23784 mode iterator instead of VI248_VLBW.
23785
23786 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
23787
23788 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23789 (record_modified): Skip clobbers; add debug output.
23790 (param_change_prob): Use sreal frequencies.
23791
23792 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23793
23794 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23795 punt for user-aligned variables.
23796
23797 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
23798
23799 * tree-chrec.c (chrec_contains_symbols): Return true for
23800 POLY_INT_CST.
23801
23802 2018-01-05 Sudakshina Das <sudi.das@arm.com>
23803
23804 PR target/82439
23805 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23806 of (x|y) == x for BICS pattern.
23807
23808 2018-01-05 Jakub Jelinek <jakub@redhat.com>
23809
23810 PR tree-optimization/83605
23811 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23812 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23813 can throw.
23814
23815 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
23816
23817 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23818 * config/epiphany/rtems.h: New file.
23819
23820 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23821 Uros Bizjak <ubizjak@gmail.com>
23822
23823 PR target/83554
23824 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23825 QIreg_operand instead of register_operand predicate.
23826 * config/i386/i386.c (ix86_rop_should_change_byte_p,
23827 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23828 comments instead of -fmitigate[-_]rop.
23829
23830 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23831
23832 PR bootstrap/81926
23833 * cgraphunit.c (symbol_table::compile): Switch to text_section
23834 before calling assembly_start debug hook.
23835 * run-rtl-passes.c (run_rtl_passes): Likewise.
23836 Include output.h.
23837
23838 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23839
23840 * tree-vrp.c (extract_range_from_binary_expr_1): Check
23841 range_int_cst_p rather than !symbolic_range_p before calling
23842 extract_range_from_multiplicative_op_1.
23843
23844 2018-01-04 Jeff Law <law@redhat.com>
23845
23846 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23847 redundant test in assertion.
23848
23849 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23850
23851 * doc/rtl.texi: Document machine_mode wrapper classes.
23852
23853 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23854
23855 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23856 using tree_to_uhwi.
23857
23858 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23859
23860 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23861 the VEC_PERM_EXPR fold to fail.
23862
23863 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23864
23865 PR debug/83585
23866 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23867 to switched_sections.
23868
23869 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23870
23871 PR target/83680
23872 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23873 test for d.testing.
23874
23875 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
23876
23877 PR target/83387
23878 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23879 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23880
23881 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23882
23883 PR debug/83666
23884 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23885 is BLKmode and bitpos not zero or mode change is needed.
23886
23887 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
23888
23889 PR target/83675
23890 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23891 TARGET_VIS2.
23892
23893 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
23894
23895 PR target/83628
23896 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23897 instead of MULT rtx. Update all corresponding splitters.
23898 (*saddl_se): Ditto.
23899 (*ssub<modesuffix>): Ditto.
23900 (*ssubl_se): Ditto.
23901 (*cmp_sadd_di): Update split patterns.
23902 (*cmp_sadd_si): Ditto.
23903 (*cmp_sadd_sidi): Ditto.
23904 (*cmp_ssub_di): Ditto.
23905 (*cmp_ssub_si): Ditto.
23906 (*cmp_ssub_sidi): Ditto.
23907 * config/alpha/predicates.md (const23_operand): New predicate.
23908 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23909 Look for ASHIFT, not MULT inner operand.
23910 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23911
23912 2018-01-04 Martin Liska <mliska@suse.cz>
23913
23914 PR gcov-profile/83669
23915 * gcov.c (output_intermediate_file): Add version to intermediate
23916 gcov file.
23917 * doc/gcov.texi: Document new field 'version' in intermediate
23918 file format. Fix location of '-k' option of gcov command.
23919
23920 2018-01-04 Martin Liska <mliska@suse.cz>
23921
23922 PR ipa/82352
23923 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23924
23925 2018-01-04 Jakub Jelinek <jakub@redhat.com>
23926
23927 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23928
23929 2018-01-03 Martin Sebor <msebor@redhat.com>
23930
23931 PR tree-optimization/83655
23932 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23933 checking calls with invalid arguments.
23934
23935 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23936
23937 * tree-vect-stmts.c (vect_get_store_rhs): New function.
23938 (vectorizable_mask_load_store): Delete.
23939 (vectorizable_call): Return false for masked loads and stores.
23940 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
23941 instead of gimple_assign_rhs1.
23942 (vectorizable_load): Handle IFN_MASK_LOAD.
23943 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23944
23945 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23946
23947 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23948 split out from..,
23949 (vectorizable_mask_load_store): ...here.
23950 (vectorizable_load): ...and here.
23951
23952 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23953
23954 * tree-vect-stmts.c (vect_build_all_ones_mask)
23955 (vect_build_zero_merge_argument): New functions, split out from...
23956 (vectorizable_load): ...here.
23957
23958 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23959
23960 * tree-vect-stmts.c (vect_check_store_rhs): New function,
23961 split out from...
23962 (vectorizable_mask_load_store): ...here.
23963 (vectorizable_store): ...and here.
23964
23965 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23966
23967 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23968 split out from...
23969 (vectorizable_mask_load_store): ...here.
23970
23971 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23972
23973 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23974 (vect_model_store_cost): Take a vec_load_store_type instead of a
23975 vect_def_type.
23976 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23977 (vect_model_store_cost): Take a vec_load_store_type instead of a
23978 vect_def_type.
23979 (vectorizable_mask_load_store): Update accordingly.
23980 (vectorizable_store): Likewise.
23981 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23982
23983 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23984
23985 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23986 IFN_MASK_LOAD calls here rather than...
23987 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23988
23989 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23990 Alan Hayward <alan.hayward@arm.com>
23991 David Sherwood <david.sherwood@arm.com>
23992
23993 * expmed.c (extract_bit_field_1): For vector extracts,
23994 fall back to extract_bit_field_as_subreg if vec_extract
23995 isn't available.
23996
23997 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23998 Alan Hayward <alan.hayward@arm.com>
23999 David Sherwood <david.sherwood@arm.com>
24000
24001 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
24002 they are variable or constant sized.
24003 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
24004 slots for constant-sized data.
24005
24006 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24007 Alan Hayward <alan.hayward@arm.com>
24008 David Sherwood <david.sherwood@arm.com>
24009
24010 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
24011 handling COND_EXPRs with boolean comparisons, try to find a better
24012 basis for the mask type than the boolean itself.
24013
24014 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24015
24016 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
24017 is calculated and how it can be overridden.
24018 * genmodes.c (max_bitsize_mode_any_mode): New variable.
24019 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
24020 if defined.
24021 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
24022 if nonzero.
24023
24024 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24025 Alan Hayward <alan.hayward@arm.com>
24026 David Sherwood <david.sherwood@arm.com>
24027
24028 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
24029 Remove the mode argument.
24030 (aarch64_simd_valid_immediate): Remove the mode and inverse
24031 arguments.
24032 * config/aarch64/iterators.md (bitsize): New iterator.
24033 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
24034 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
24035 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
24036 aarch64_simd_valid_immediate.
24037 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
24038 (aarch64_reg_or_bic_imm): Likewise.
24039 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
24040 with an insn_type enum and msl with a modifier_type enum.
24041 Replace element_width with a scalar_mode. Change the shift
24042 to unsigned int. Add constructors for scalar_float_mode and
24043 scalar_int_mode elements.
24044 (aarch64_vect_float_const_representable_p): Delete.
24045 (aarch64_can_const_movi_rtx_p)
24046 (aarch64_simd_scalar_immediate_valid_for_move)
24047 (aarch64_simd_make_constant): Update call to
24048 aarch64_simd_valid_immediate.
24049 (aarch64_advsimd_valid_immediate_hs): New function.
24050 (aarch64_advsimd_valid_immediate): Likewise.
24051 (aarch64_simd_valid_immediate): Remove mode and inverse
24052 arguments. Rewrite to use the above. Use const_vec_duplicate_p
24053 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
24054 and aarch64_float_const_representable_p on the result.
24055 (aarch64_output_simd_mov_immediate): Remove mode argument.
24056 Update call to aarch64_simd_valid_immediate and use of
24057 simd_immediate_info.
24058 (aarch64_output_scalar_simd_mov_immediate): Update call
24059 accordingly.
24060
24061 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24062 Alan Hayward <alan.hayward@arm.com>
24063 David Sherwood <david.sherwood@arm.com>
24064
24065 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
24066 (mode_nunits): Likewise CONST_MODE_NUNITS.
24067 * machmode.def (ADJUST_NUNITS): Document.
24068 * genmodes.c (mode_data::need_nunits_adj): New field.
24069 (blank_mode): Update accordingly.
24070 (adj_nunits): New variable.
24071 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
24072 parameter.
24073 (emit_mode_size_inline): Set need_bytesize_adj for all modes
24074 listed in adj_nunits.
24075 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
24076 listed in adj_nunits. Don't emit case statements for such modes.
24077 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
24078 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
24079 nothing if adj_nunits is nonnull.
24080 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
24081 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
24082 (emit_mode_fbit): Update use of print_maybe_const_decl.
24083 (emit_move_size): Likewise. Treat the array as non-const
24084 if adj_nunits.
24085 (emit_mode_adjustments): Handle adj_nunits.
24086
24087 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24088
24089 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
24090 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
24091 (VECTOR_MODES): Use it.
24092 (make_vector_modes): Take the prefix as an argument.
24093
24094 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24095 Alan Hayward <alan.hayward@arm.com>
24096 David Sherwood <david.sherwood@arm.com>
24097
24098 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24099 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24100 for MODE_VECTOR_BOOL.
24101 * machmode.def (VECTOR_BOOL_MODE): Document.
24102 * genmodes.c (VECTOR_BOOL_MODE): New macro.
24103 (make_vector_bool_mode): New function.
24104 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24105 MODE_VECTOR_BOOL.
24106 * lto-streamer-in.c (lto_input_mode_table): Likewise.
24107 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24108 Likewise.
24109 * stor-layout.c (int_mode_for_mode): Likewise.
24110 * tree.c (build_vector_type_for_mode): Likewise.
24111 * varasm.c (output_constant_pool_2): Likewise.
24112 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24113 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
24114 for MODE_VECTOR_BOOL.
24115 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24116 of mode class checks.
24117 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24118 instead of a list of mode class checks.
24119 (expand_vector_scalar_condition): Likewise.
24120 (type_for_widest_vector_mode): Handle BImode as an inner mode.
24121
24122 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24123 Alan Hayward <alan.hayward@arm.com>
24124 David Sherwood <david.sherwood@arm.com>
24125
24126 * machmode.h (mode_size): Change from unsigned short to
24127 poly_uint16_pod.
24128 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24129 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24130 or if measurement_type is not polynomial.
24131 (fixed_size_mode::includes_p): Check for constant-sized modes.
24132 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24133 return a poly_uint16 rather than an unsigned short.
24134 (emit_mode_size): Change the type of mode_size from unsigned short
24135 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
24136 (emit_mode_adjustments): Cope with polynomial vector sizes.
24137 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24138 for GET_MODE_SIZE.
24139 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24140 for GET_MODE_SIZE.
24141 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24142 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24143 * caller-save.c (setup_save_areas): Likewise.
24144 (replace_reg_with_saved_mem): Likewise.
24145 * calls.c (emit_library_call_value_1): Likewise.
24146 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24147 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24148 (gen_lowpart_for_combine): Likewise.
24149 * convert.c (convert_to_integer_1): Likewise.
24150 * cse.c (equiv_constant, cse_insn): Likewise.
24151 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24152 (cselib_subst_to_values): Likewise.
24153 * dce.c (word_dce_process_block): Likewise.
24154 * df-problems.c (df_word_lr_mark_ref): Likewise.
24155 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24156 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24157 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24158 (rtl_for_decl_location): Likewise.
24159 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24160 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24161 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24162 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24163 (expand_expr_real_1): Likewise.
24164 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24165 (pad_below): Likewise.
24166 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24167 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24168 * ira.c (get_subreg_tracking_sizes): Likewise.
24169 * ira-build.c (ira_create_allocno_objects): Likewise.
24170 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24171 (ira_sort_regnos_for_alter_reg): Likewise.
24172 * ira-costs.c (record_operand_costs): Likewise.
24173 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24174 (resolve_simple_move): Likewise.
24175 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24176 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24177 (lra_constraints): Likewise.
24178 (CONST_POOL_OK_P): Reject variable-sized modes.
24179 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24180 (add_pseudo_to_slot, lra_spill): Likewise.
24181 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24182 * optabs-query.c (get_best_extraction_insn): Likewise.
24183 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24184 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24185 (expand_mult_highpart, valid_multiword_target_p): Likewise.
24186 * recog.c (offsettable_address_addr_space_p): Likewise.
24187 * regcprop.c (maybe_mode_change): Likewise.
24188 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24189 * regrename.c (build_def_use): Likewise.
24190 * regstat.c (dump_reg_info): Likewise.
24191 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24192 (find_reloads, find_reloads_subreg_address): Likewise.
24193 * reload1.c (eliminate_regs_1): Likewise.
24194 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24195 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24196 (simplify_binary_operation_1, simplify_subreg): Likewise.
24197 * targhooks.c (default_function_arg_padding): Likewise.
24198 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24199 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24200 (verify_gimple_assign_ternary): Likewise.
24201 * tree-inline.c (estimate_move_cost): Likewise.
24202 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24203 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24204 (get_address_cost_ainc): Likewise.
24205 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24206 (vect_supportable_dr_alignment): Likewise.
24207 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24208 (vectorizable_reduction): Likewise.
24209 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24210 (vectorizable_operation, vectorizable_load): Likewise.
24211 * tree.c (build_same_sized_truth_vector_type): Likewise.
24212 * valtrack.c (cleanup_auto_inc_dec): Likewise.
24213 * var-tracking.c (emit_note_insn_var_location): Likewise.
24214 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24215 (ADDR_VEC_ALIGN): Likewise.
24216
24217 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24218 Alan Hayward <alan.hayward@arm.com>
24219 David Sherwood <david.sherwood@arm.com>
24220
24221 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24222 unsigned short.
24223 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24224 or if measurement_type is polynomial.
24225 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24226 * combine.c (make_extraction): Likewise.
24227 * dse.c (find_shift_sequence): Likewise.
24228 * dwarf2out.c (mem_loc_descriptor): Likewise.
24229 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24230 (extract_bit_field, extract_low_bits): Likewise.
24231 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24232 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24233 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24234 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24235 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24236 * reload.c (find_reloads): Likewise.
24237 * reload1.c (alter_reg): Likewise.
24238 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24239 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24240 * tree-if-conv.c (predicate_mem_writes): Likewise.
24241 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24242 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24243 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24244 * valtrack.c (dead_debug_insert_temp): Likewise.
24245 * varasm.c (mergeable_constant_section): Likewise.
24246 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24247
24248 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24249 Alan Hayward <alan.hayward@arm.com>
24250 David Sherwood <david.sherwood@arm.com>
24251
24252 * expr.c (expand_assignment): Cope with polynomial mode sizes
24253 when assigning to a CONCAT.
24254
24255 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24256 Alan Hayward <alan.hayward@arm.com>
24257 David Sherwood <david.sherwood@arm.com>
24258
24259 * machmode.h (mode_precision): Change from unsigned short to
24260 poly_uint16_pod.
24261 (mode_to_precision): Return a poly_uint16 rather than an unsigned
24262 short.
24263 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24264 or if measurement_type is not polynomial.
24265 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
24266 in which the mode is already known to be a scalar_int_mode.
24267 * genmodes.c (emit_mode_precision): Change the type of mode_precision
24268 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
24269 initializer.
24270 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24271 for GET_MODE_PRECISION.
24272 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24273 for GET_MODE_PRECISION.
24274 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24275 as polynomial.
24276 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24277 (expand_field_assignment, make_extraction): Likewise.
24278 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24279 (get_last_value): Likewise.
24280 * convert.c (convert_to_integer_1): Likewise.
24281 * cse.c (cse_insn): Likewise.
24282 * expr.c (expand_expr_real_1): Likewise.
24283 * lra-constraints.c (simplify_operand_subreg): Likewise.
24284 * optabs-query.c (can_atomic_load_p): Likewise.
24285 * optabs.c (expand_atomic_load): Likewise.
24286 (expand_atomic_store): Likewise.
24287 * ree.c (combine_reaching_defs): Likewise.
24288 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24289 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24290 * tree.h (type_has_mode_precision_p): Likewise.
24291 * ubsan.c (instrument_si_overflow): Likewise.
24292
24293 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24294 Alan Hayward <alan.hayward@arm.com>
24295 David Sherwood <david.sherwood@arm.com>
24296
24297 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24298 polynomial numbers of units.
24299 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24300 (valid_vector_subparts_p): New function.
24301 (build_vector_type): Remove temporary shim and take the number
24302 of units as a poly_uint64 rather than an int.
24303 (build_opaque_vector_type): Take the number of units as a
24304 poly_uint64 rather than an int.
24305 * tree.c (build_vector_from_ctor): Handle polynomial
24306 TYPE_VECTOR_SUBPARTS.
24307 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24308 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24309 (build_vector_from_val): If the number of units is variable,
24310 use build_vec_duplicate_cst for constant operands and
24311 VEC_DUPLICATE_EXPR otherwise.
24312 (make_vector_type): Remove temporary is_constant ().
24313 (build_vector_type, build_opaque_vector_type): Take the number of
24314 units as a poly_uint64 rather than an int.
24315 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24316 VECTOR_CST_NELTS.
24317 * cfgexpand.c (expand_debug_expr): Likewise.
24318 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24319 (store_constructor, expand_expr_real_1): Likewise.
24320 (const_scalar_mask_from_tree): Likewise.
24321 * fold-const-call.c (fold_const_reduction): Likewise.
24322 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24323 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24324 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24325 (fold_relational_const): Likewise.
24326 (native_interpret_vector): Likewise. Change the size from an
24327 int to an unsigned int.
24328 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24329 TYPE_VECTOR_SUBPARTS.
24330 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24331 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24332 duplicating a non-constant operand into a variable-length vector.
24333 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24334 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24335 * ipa-icf.c (sem_variable::equals): Likewise.
24336 * match.pd: Likewise.
24337 * omp-simd-clone.c (simd_clone_subparts): Likewise.
24338 * print-tree.c (print_node): Likewise.
24339 * stor-layout.c (layout_type): Likewise.
24340 * targhooks.c (default_builtin_vectorization_cost): Likewise.
24341 * tree-cfg.c (verify_gimple_comparison): Likewise.
24342 (verify_gimple_assign_binary): Likewise.
24343 (verify_gimple_assign_ternary): Likewise.
24344 (verify_gimple_assign_single): Likewise.
24345 * tree-pretty-print.c (dump_generic_node): Likewise.
24346 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24347 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24348 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24349 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24350 (vect_shift_permute_load_chain): Likewise.
24351 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24352 (expand_vector_condition, optimize_vector_constructor): Likewise.
24353 (lower_vec_perm, get_compute_type): Likewise.
24354 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24355 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24356 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24357 (vect_recog_mask_conversion_pattern): Likewise.
24358 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24359 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24360 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24361 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24362 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24363 (vectorizable_shift, vectorizable_operation, vectorizable_store)
24364 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24365 (supportable_widening_operation): Likewise.
24366 (supportable_narrowing_operation): Likewise.
24367 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24368 Likewise.
24369 * varasm.c (output_constant): Likewise.
24370
24371 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24372 Alan Hayward <alan.hayward@arm.com>
24373 David Sherwood <david.sherwood@arm.com>
24374
24375 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24376 so that both the length == 3 and length != 3 cases set up their
24377 own permute vectors. Add comments explaining why we know the
24378 number of elements is constant.
24379 (vect_permute_load_chain): Likewise.
24380
24381 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24382 Alan Hayward <alan.hayward@arm.com>
24383 David Sherwood <david.sherwood@arm.com>
24384
24385 * machmode.h (mode_nunits): Change from unsigned char to
24386 poly_uint16_pod.
24387 (ONLY_FIXED_SIZE_MODES): New macro.
24388 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24389 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24390 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24391 New typedefs.
24392 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24393 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24394 or if measurement_type is not polynomial.
24395 * genmodes.c (ZERO_COEFFS): New macro.
24396 (emit_mode_nunits_inline): Make mode_nunits_inline return a
24397 poly_uint16.
24398 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24399 Use ZERO_COEFFS when emitting initializers.
24400 * data-streamer.h (bp_pack_poly_value): New function.
24401 (bp_unpack_poly_value): Likewise.
24402 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24403 for GET_MODE_NUNITS.
24404 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24405 for GET_MODE_NUNITS.
24406 * tree.c (make_vector_type): Remove temporary shim and make
24407 the real function take the number of units as a poly_uint64
24408 rather than an int.
24409 (build_vector_type_for_mode): Handle polynomial nunits.
24410 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24411 * emit-rtl.c (const_vec_series_p_1): Likewise.
24412 (gen_rtx_CONST_VECTOR): Likewise.
24413 * fold-const.c (test_vec_duplicate_folding): Likewise.
24414 * genrecog.c (validate_pattern): Likewise.
24415 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24416 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24417 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24418 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24419 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24420 * rtlanal.c (subreg_get_info): Likewise.
24421 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24422 (vect_grouped_load_supported): Likewise.
24423 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24424 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24425 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24426 (simplify_const_unary_operation, simplify_binary_operation_1)
24427 (simplify_const_binary_operation, simplify_ternary_operation)
24428 (test_vector_ops_duplicate, test_vector_ops): Likewise.
24429 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24430 instead of CONST_VECTOR_NUNITS.
24431 * varasm.c (output_constant_pool_2): Likewise.
24432 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24433 explicit-encoded elements in the XVEC for variable-length vectors.
24434
24435 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24436
24437 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24438
24439 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24440 Alan Hayward <alan.hayward@arm.com>
24441 David Sherwood <david.sherwood@arm.com>
24442
24443 * coretypes.h (fixed_size_mode): Declare.
24444 (fixed_size_mode_pod): New typedef.
24445 * builtins.h (target_builtins::x_apply_args_mode)
24446 (target_builtins::x_apply_result_mode): Change type to
24447 fixed_size_mode_pod.
24448 * builtins.c (apply_args_size, apply_result_size, result_vector)
24449 (expand_builtin_apply_args_1, expand_builtin_apply)
24450 (expand_builtin_return): Update accordingly.
24451
24452 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24453
24454 * cse.c (hash_rtx_cb): Hash only the encoded elements.
24455 * cselib.c (cselib_hash_rtx): Likewise.
24456 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24457 CONST_VECTOR encoding.
24458
24459 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24460 Jeff Law <law@redhat.com>
24461
24462 PR target/83641
24463 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24464 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24465 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24466 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24467
24468 PR target/83641
24469 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24470 explicitly probe *sp in a noreturn function if there were any callee
24471 register saves or frame pointer is needed.
24472
24473 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24474
24475 PR debug/83621
24476 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24477 BLKmode for ternary, binary or unary expressions.
24478
24479 PR debug/83645
24480 * var-tracking.c (delete_vta_debug_insn): New inline function.
24481 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24482 insns from get_insns () to NULL instead of each bb separately.
24483 Use delete_vta_debug_insn. No longer static.
24484 (vt_debug_insns_local, variable_tracking_main_1): Adjust
24485 delete_vta_debug_insns callers.
24486 * rtl.h (delete_vta_debug_insns): Declare.
24487 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24488 instead of variable_tracking_main.
24489
24490 2018-01-03 Martin Sebor <msebor@redhat.com>
24491
24492 PR tree-optimization/83603
24493 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24494 arguments past the endof the argument list in functions declared
24495 without a prototype.
24496 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24497 Avoid checking when arguments are null.
24498
24499 2018-01-03 Martin Sebor <msebor@redhat.com>
24500
24501 PR c/83559
24502 * doc/extend.texi (attribute const): Fix a typo.
24503 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24504 issuing -Wsuggest-attribute for void functions.
24505
24506 2018-01-03 Martin Sebor <msebor@redhat.com>
24507
24508 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24509 offset_int::from instead of wide_int::to_shwi.
24510 (maybe_diag_overlap): Remove assertion.
24511 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24512 * gimple-ssa-sprintf.c (format_directive): Same.
24513 (parse_directive): Same.
24514 (sprintf_dom_walker::compute_format_length): Same.
24515 (try_substitute_return_value): Same.
24516
24517 2018-01-03 Jeff Law <law@redhat.com>
24518
24519 PR middle-end/83654
24520 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24521 non-constant residual for zero at runtime and avoid probing in
24522 that case. Reorganize code for trailing problem to mirror handling
24523 of the residual.
24524
24525 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
24526
24527 PR tree-optimization/83501
24528 * tree-ssa-strlen.c (get_string_cst): New.
24529 (handle_char_store): Call get_string_cst.
24530
24531 2018-01-03 Martin Liska <mliska@suse.cz>
24532
24533 PR tree-optimization/83593
24534 * tree-ssa-strlen.c: Include tree-cfg.h.
24535 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24536 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24537 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24538 to false.
24539 (strlen_dom_walker::before_dom_children): Call
24540 gimple_purge_dead_eh_edges. Dump tranformation with details
24541 dump flags.
24542 (strlen_dom_walker::before_dom_children): Update call by adding
24543 new argument cleanup_eh.
24544 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24545
24546 2018-01-03 Martin Liska <mliska@suse.cz>
24547
24548 PR ipa/83549
24549 * cif-code.def (VARIADIC_THUNK): New enum value.
24550 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24551 thunks.
24552
24553 2018-01-03 Jan Beulich <jbeulich@suse.com>
24554
24555 * sse.md (mov<mode>_internal): Tighten condition for when to use
24556 vmovdqu<ssescalarsize> for TI and OI modes.
24557
24558 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24559
24560 Update copyright years.
24561
24562 2018-01-03 Martin Liska <mliska@suse.cz>
24563
24564 PR ipa/83594
24565 * ipa-visibility.c (function_and_variable_visibility): Skip
24566 functions with noipa attribure.
24567
24568 2018-01-03 Jakub Jelinek <jakub@redhat.com>
24569
24570 * gcc.c (process_command): Update copyright notice dates.
24571 * gcov-dump.c (print_version): Ditto.
24572 * gcov.c (print_version): Ditto.
24573 * gcov-tool.c (print_version): Ditto.
24574 * gengtype.c (create_file): Ditto.
24575 * doc/cpp.texi: Bump @copying's copyright year.
24576 * doc/cppinternals.texi: Ditto.
24577 * doc/gcc.texi: Ditto.
24578 * doc/gccint.texi: Ditto.
24579 * doc/gcov.texi: Ditto.
24580 * doc/install.texi: Ditto.
24581 * doc/invoke.texi: Ditto.
24582
24583 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24584
24585 * vector-builder.h (vector_builder::m_full_nelts): Change from
24586 unsigned int to poly_uint64.
24587 (vector_builder::full_nelts): Update prototype accordingly.
24588 (vector_builder::new_vector): Likewise.
24589 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24590 (vector_builder::operator ==): Likewise.
24591 (vector_builder::finalize): Likewise.
24592 * int-vector-builder.h (int_vector_builder::int_vector_builder):
24593 Take the number of elements as a poly_uint64 rather than an
24594 unsigned int.
24595 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24596 from unsigned int to poly_uint64.
24597 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24598 (vec_perm_indices::new_vector): Likewise.
24599 (vec_perm_indices::length): Likewise.
24600 (vec_perm_indices::nelts_per_input): Likewise.
24601 (vec_perm_indices::input_nelts): Likewise.
24602 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24603 number of elements per input as a poly_uint64 rather than an
24604 unsigned int. Use the original encoding for variable-length
24605 vectors, rather than clamping each individual element.
24606 For the second and subsequent elements in each pattern,
24607 clamp the step and base before clamping their sum.
24608 (vec_perm_indices::series_p): Handle polynomial element counts.
24609 (vec_perm_indices::all_in_range_p): Likewise.
24610 (vec_perm_indices_to_tree): Likewise.
24611 (vec_perm_indices_to_rtx): Likewise.
24612 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24613 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24614 (tree_vector_builder::new_binary_operation): Handle polynomial
24615 element counts. Return false if we need to know the number
24616 of elements at compile time.
24617 * fold-const.c (fold_vec_perm): Punt if the number of elements
24618 isn't known at compile time.
24619
24620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24621
24622 * vec-perm-indices.h (vec_perm_builder): Change element type
24623 from HOST_WIDE_INT to poly_int64.
24624 (vec_perm_indices::element_type): Update accordingly.
24625 (vec_perm_indices::clamp): Handle polynomial element_types.
24626 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24627 (vec_perm_indices::all_in_range_p): Likewise.
24628 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24629 than shwi trees.
24630 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24631 polynomial vec_perm_indices element types.
24632 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24633 * fold-const.c (fold_vec_perm): Likewise.
24634 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24635 * tree-vect-generic.c (lower_vec_perm): Likewise.
24636 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24637 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24638 element type to HOST_WIDE_INT.
24639
24640 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24641 Alan Hayward <alan.hayward@arm.com>
24642 David Sherwood <david.sherwood@arm.com>
24643
24644 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24645 rather than an int. Use plus_constant.
24646 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24647 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24648
24649 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24650 Alan Hayward <alan.hayward@arm.com>
24651 David Sherwood <david.sherwood@arm.com>
24652
24653 * calls.c (emit_call_1, expand_call): Change struct_value_size from
24654 a HOST_WIDE_INT to a poly_int64.
24655
24656 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24657 Alan Hayward <alan.hayward@arm.com>
24658 David Sherwood <david.sherwood@arm.com>
24659
24660 * calls.c (load_register_parameters): Cope with polynomial
24661 mode sizes. Require a constant size for BLKmode parameters
24662 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
24663 forces a parameter to be padded at the lsb end in order to
24664 fill a complete number of words, require the parameter size
24665 to be ordered wrt UNITS_PER_WORD.
24666
24667 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24668 Alan Hayward <alan.hayward@arm.com>
24669 David Sherwood <david.sherwood@arm.com>
24670
24671 * reload1.c (spill_stack_slot_width): Change element type
24672 from unsigned int to poly_uint64_pod.
24673 (alter_reg): Treat mode sizes as polynomial.
24674
24675 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24676 Alan Hayward <alan.hayward@arm.com>
24677 David Sherwood <david.sherwood@arm.com>
24678
24679 * reload.c (complex_word_subreg_p): New function.
24680 (reload_inner_reg_of_subreg, push_reload): Use it.
24681
24682 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24683 Alan Hayward <alan.hayward@arm.com>
24684 David Sherwood <david.sherwood@arm.com>
24685
24686 * lra-constraints.c (process_alt_operands): Reject matched
24687 operands whose sizes aren't ordered.
24688 (match_reload): Refer to this check here.
24689
24690 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24691 Alan Hayward <alan.hayward@arm.com>
24692 David Sherwood <david.sherwood@arm.com>
24693
24694 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24695 that the mode size is in the set {1, 2, 4, 8, 16}.
24696
24697 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24698 Alan Hayward <alan.hayward@arm.com>
24699 David Sherwood <david.sherwood@arm.com>
24700
24701 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24702 Use plus_constant instead of gen_rtx_PLUS.
24703
24704 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24705 Alan Hayward <alan.hayward@arm.com>
24706 David Sherwood <david.sherwood@arm.com>
24707
24708 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24709 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24710 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24711 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24712 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24713 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24714 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24715 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24716 * config/i386/i386.c (ix86_push_rounding): ...this new function.
24717 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24718 a poly_int64.
24719 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24720 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24721 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24722 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24723 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24724 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24725 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24726 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24727 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24728 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24729 function.
24730 * expr.c (emit_move_resolve_push): Treat the input and result
24731 of PUSH_ROUNDING as a poly_int64.
24732 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24733 (emit_push_insn): Likewise.
24734 * lra-eliminations.c (mark_not_eliminable): Likewise.
24735 * recog.c (push_operand): Likewise.
24736 * reload1.c (elimination_effects): Likewise.
24737 * rtlanal.c (nonzero_bits1): Likewise.
24738 * calls.c (store_one_arg): Likewise. Require the padding to be
24739 known at compile time.
24740
24741 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24742 Alan Hayward <alan.hayward@arm.com>
24743 David Sherwood <david.sherwood@arm.com>
24744
24745 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24746 Use plus_constant instead of gen_rtx_PLUS.
24747
24748 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24749 Alan Hayward <alan.hayward@arm.com>
24750 David Sherwood <david.sherwood@arm.com>
24751
24752 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24753 rather than an int.
24754
24755 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24756 Alan Hayward <alan.hayward@arm.com>
24757 David Sherwood <david.sherwood@arm.com>
24758
24759 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24760 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24761 via stack temporaries. Treat the mode size as polynomial too.
24762
24763 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24764 Alan Hayward <alan.hayward@arm.com>
24765 David Sherwood <david.sherwood@arm.com>
24766
24767 * expr.c (expand_expr_real_2): When handling conversions involving
24768 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24769 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
24770 as a poly_uint64 too.
24771
24772 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24773 Alan Hayward <alan.hayward@arm.com>
24774 David Sherwood <david.sherwood@arm.com>
24775
24776 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24777
24778 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24779 Alan Hayward <alan.hayward@arm.com>
24780 David Sherwood <david.sherwood@arm.com>
24781
24782 * combine.c (can_change_dest_mode): Handle polynomial
24783 REGMODE_NATURAL_SIZE.
24784 * expmed.c (store_bit_field_1): Likewise.
24785 * expr.c (store_constructor): Likewise.
24786 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24787 and polynomial REGMODE_NATURAL_SIZE.
24788 (gen_lowpart_common): Likewise.
24789 * reginfo.c (record_subregs_of_mode): Likewise.
24790 * rtlanal.c (read_modify_subreg_p): Likewise.
24791
24792 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24793 Alan Hayward <alan.hayward@arm.com>
24794 David Sherwood <david.sherwood@arm.com>
24795
24796 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24797 numbers of elements.
24798
24799 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24800 Alan Hayward <alan.hayward@arm.com>
24801 David Sherwood <david.sherwood@arm.com>
24802
24803 * match.pd: Cope with polynomial numbers of vector elements.
24804
24805 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24806 Alan Hayward <alan.hayward@arm.com>
24807 David Sherwood <david.sherwood@arm.com>
24808
24809 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24810 in a POINTER_PLUS_EXPR.
24811
24812 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24813 Alan Hayward <alan.hayward@arm.com>
24814 David Sherwood <david.sherwood@arm.com>
24815
24816 * omp-simd-clone.c (simd_clone_subparts): New function.
24817 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24818 (ipa_simd_modify_function_body): Likewise.
24819
24820 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24821 Alan Hayward <alan.hayward@arm.com>
24822 David Sherwood <david.sherwood@arm.com>
24823
24824 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24825 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24826 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24827 (expand_vector_condition, vector_element): Likewise.
24828 (subparts_gt): New function.
24829 (get_compute_type): Use subparts_gt.
24830 (count_type_subparts): Delete.
24831 (expand_vector_operations_1): Use subparts_gt instead of
24832 count_type_subparts.
24833
24834 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24835 Alan Hayward <alan.hayward@arm.com>
24836 David Sherwood <david.sherwood@arm.com>
24837
24838 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24839 (vect_compile_time_alias): ...this new function. Do the calculation
24840 on poly_ints rather than trees.
24841 (vect_prune_runtime_alias_test_list): Update call accordingly.
24842
24843 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24844 Alan Hayward <alan.hayward@arm.com>
24845 David Sherwood <david.sherwood@arm.com>
24846
24847 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24848 numbers of units.
24849 (vect_schedule_slp_instance): Likewise.
24850
24851 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24852 Alan Hayward <alan.hayward@arm.com>
24853 David Sherwood <david.sherwood@arm.com>
24854
24855 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24856 constant and extern definitions for variable-length vectors.
24857 (vect_get_constant_vectors): Note that the number of units
24858 is known to be constant.
24859
24860 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24861 Alan Hayward <alan.hayward@arm.com>
24862 David Sherwood <david.sherwood@arm.com>
24863
24864 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24865 of units as polynomial. Choose between WIDE and NARROW based
24866 on multiple_p.
24867
24868 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24869 Alan Hayward <alan.hayward@arm.com>
24870 David Sherwood <david.sherwood@arm.com>
24871
24872 * tree-vect-stmts.c (simd_clone_subparts): New function.
24873 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24874
24875 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24876 Alan Hayward <alan.hayward@arm.com>
24877 David Sherwood <david.sherwood@arm.com>
24878
24879 * tree-vect-stmts.c (vectorizable_call): Treat the number of
24880 vectors as polynomial. Use build_index_vector for
24881 IFN_GOMP_SIMD_LANE.
24882
24883 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24884 Alan Hayward <alan.hayward@arm.com>
24885 David Sherwood <david.sherwood@arm.com>
24886
24887 * tree-vect-stmts.c (get_load_store_type): Treat the number of
24888 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24889 for variable-length vectors.
24890 (vectorizable_mask_load_store): Treat the number of units as
24891 polynomial, asserting that it is constant if the condition has
24892 already been enforced.
24893 (vectorizable_store, vectorizable_load): Likewise.
24894
24895 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24896 Alan Hayward <alan.hayward@arm.com>
24897 David Sherwood <david.sherwood@arm.com>
24898
24899 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24900 of units as polynomial. Punt if we can't tell at compile time
24901 which vector contains the final result.
24902
24903 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24904 Alan Hayward <alan.hayward@arm.com>
24905 David Sherwood <david.sherwood@arm.com>
24906
24907 * tree-vect-loop.c (vectorizable_induction): Treat the number
24908 of units as polynomial. Punt on SLP inductions. Use an integer
24909 VEC_SERIES_EXPR for variable-length integer reductions. Use a
24910 cast of such a series for variable-length floating-point
24911 reductions.
24912
24913 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24914 Alan Hayward <alan.hayward@arm.com>
24915 David Sherwood <david.sherwood@arm.com>
24916
24917 * tree.h (build_index_vector): Declare.
24918 * tree.c (build_index_vector): New function.
24919 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24920 of units as polynomial, forcibly converting it to a constant if
24921 vectorizable_reduction has already enforced the condition.
24922 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
24923 to create a {1,2,3,...} vector.
24924 (vectorizable_reduction): Treat the number of units as polynomial.
24925 Choose vectype_in based on the largest scalar element size rather
24926 than the smallest number of units. Enforce the restrictions
24927 relied on above.
24928
24929 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24930 Alan Hayward <alan.hayward@arm.com>
24931 David Sherwood <david.sherwood@arm.com>
24932
24933 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24934 number of units as polynomial.
24935
24936 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24937 Alan Hayward <alan.hayward@arm.com>
24938 David Sherwood <david.sherwood@arm.com>
24939
24940 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24941 * target.def (autovectorize_vector_sizes): Return the vector sizes
24942 by pointer, using vector_sizes rather than a bitmask.
24943 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24944 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24945 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24946 Likewise.
24947 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24948 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24949 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24950 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24951 * omp-general.c (omp_max_vf): Likewise.
24952 * omp-low.c (omp_clause_aligned_alignment): Likewise.
24953 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24954 * tree-vect-loop.c (vect_analyze_loop): Likewise.
24955 * tree-vect-slp.c (vect_slp_bb): Likewise.
24956 * doc/tm.texi: Regenerate.
24957 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24958 to a poly_uint64.
24959 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24960 the vector size as a poly_uint64 rather than an unsigned int.
24961 (current_vector_size): Change from an unsigned int to a poly_uint64.
24962 (get_vectype_for_scalar_type): Update accordingly.
24963 * tree.h (build_truth_vector_type): Take the size and number of
24964 units as a poly_uint64 rather than an unsigned int.
24965 (build_vector_type): Add a temporary overload that takes
24966 the number of units as a poly_uint64 rather than an unsigned int.
24967 * tree.c (make_vector_type): Likewise.
24968 (build_truth_vector_type): Take the number of units as a poly_uint64
24969 rather than an unsigned int.
24970
24971 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24972 Alan Hayward <alan.hayward@arm.com>
24973 David Sherwood <david.sherwood@arm.com>
24974
24975 * target.def (get_mask_mode): Take the number of units and length
24976 as poly_uint64s rather than unsigned ints.
24977 * targhooks.h (default_get_mask_mode): Update accordingly.
24978 * targhooks.c (default_get_mask_mode): Likewise.
24979 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24980 * doc/tm.texi: Regenerate.
24981
24982 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24983 Alan Hayward <alan.hayward@arm.com>
24984 David Sherwood <david.sherwood@arm.com>
24985
24986 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24987 * omp-general.c (omp_max_vf): Likewise.
24988 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24989 (expand_omp_simd): Handle polynomial safelen.
24990 * omp-low.c (omplow_simd_context): Add a default constructor.
24991 (omplow_simd_context::max_vf): Change from int to poly_uint64.
24992 (lower_rec_simd_input_clauses): Update accordingly.
24993 (lower_rec_input_clauses): Likewise.
24994
24995 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
24996 Alan Hayward <alan.hayward@arm.com>
24997 David Sherwood <david.sherwood@arm.com>
24998
24999 * tree-vectorizer.h (vect_nunits_for_cost): New function.
25000 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
25001 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
25002 (vect_analyze_slp_cost): Likewise.
25003 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
25004 (vect_model_load_cost): Likewise.
25005
25006 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25007 Alan Hayward <alan.hayward@arm.com>
25008 David Sherwood <david.sherwood@arm.com>
25009
25010 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
25011 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
25012 from an unsigned int * to a poly_uint64_pod *.
25013 (calculate_unrolling_factor): New function.
25014 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
25015
25016 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25017 Alan Hayward <alan.hayward@arm.com>
25018 David Sherwood <david.sherwood@arm.com>
25019
25020 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
25021 from an unsigned int to a poly_uint64.
25022 (_loop_vec_info::slp_unrolling_factor): Likewise.
25023 (_loop_vec_info::vectorization_factor): Change from an int
25024 to a poly_uint64.
25025 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
25026 (vect_get_num_vectors): New function.
25027 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
25028 (vect_get_num_copies): Use vect_get_num_vectors.
25029 (vect_analyze_data_ref_dependences): Change max_vf from an int *
25030 to an unsigned int *.
25031 (vect_analyze_data_refs): Change min_vf from an int * to a
25032 poly_uint64 *.
25033 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25034 than an unsigned HOST_WIDE_INT.
25035 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
25036 (vect_analyze_data_ref_dependence): Change max_vf from an int *
25037 to an unsigned int *.
25038 (vect_analyze_data_ref_dependences): Likewise.
25039 (vect_compute_data_ref_alignment): Handle polynomial vf.
25040 (vect_enhance_data_refs_alignment): Likewise.
25041 (vect_prune_runtime_alias_test_list): Likewise.
25042 (vect_shift_permute_load_chain): Likewise.
25043 (vect_supportable_dr_alignment): Likewise.
25044 (dependence_distance_ge_vf): Take the vectorization factor as a
25045 poly_uint64 rather than an unsigned HOST_WIDE_INT.
25046 (vect_analyze_data_refs): Change min_vf from an int * to a
25047 poly_uint64 *.
25048 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
25049 vfm1 as a poly_uint64 rather than an int. Make the same change
25050 for the returned bound_scalar.
25051 (vect_gen_vector_loop_niters): Handle polynomial vf.
25052 (vect_do_peeling): Likewise. Update call to
25053 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
25054 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
25055 be constant.
25056 * tree-vect-loop.c (vect_determine_vectorization_factor)
25057 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
25058 (vect_get_known_peeling_cost): Likewise.
25059 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
25060 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
25061 (vect_transform_loop): Likewise. Use the lowest possible VF when
25062 updating the upper bounds of the loop.
25063 (vect_min_worthwhile_factor): Make static. Return an unsigned int
25064 rather than an int.
25065 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
25066 polynomial unroll factors.
25067 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
25068 (vect_make_slp_decision): Likewise.
25069 (vect_supported_load_permutation_p): Likewise, and polynomial
25070 vf too.
25071 (vect_analyze_slp_cost): Handle polynomial vf.
25072 (vect_slp_analyze_node_operations): Likewise.
25073 (vect_slp_analyze_bb_1): Likewise.
25074 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25075 than an unsigned HOST_WIDE_INT.
25076 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
25077 (vectorizable_load): Handle polynomial vf.
25078 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
25079 a poly_uint64.
25080 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
25081
25082 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25083 Alan Hayward <alan.hayward@arm.com>
25084 David Sherwood <david.sherwood@arm.com>
25085
25086 * match.pd: Handle bit operations involving three constants
25087 and try to fold one pair.
25088
25089 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
25090
25091 * tree-vect-loop-manip.c: Include gimple-fold.h.
25092 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25093 niters_maybe_zero parameters. Handle other cases besides a step of 1.
25094 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25095 Add a path that uses a step of VF instead of 1, but disable it
25096 for now.
25097 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25098 and niters_no_overflow parameters. Update calls to
25099 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25100 Create a new SSA name if the latter choses to use a ste other
25101 than zero, and return it via niters_vector_mult_vf_var.
25102 * tree-vect-loop.c (vect_transform_loop): Update calls to
25103 vect_do_peeling, vect_gen_vector_loop_niters and
25104 slpeel_make_loop_iterate_ntimes.
25105 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25106 (vect_gen_vector_loop_niters): Update declarations after above changes.
25107
25108 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
25109
25110 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25111 128-bit round to integer instructions.
25112 (ceil<mode>2): Likewise.
25113 (btrunc<mode>2): Likewise.
25114 (round<mode>2): Likewise.
25115
25116 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25117
25118 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25119 unaligned VSX load/store on P8/P9.
25120 (expand_block_clear): Allow the use of unaligned VSX
25121 load/store on P8/P9.
25122
25123 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25124
25125 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25126 New function.
25127 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25128 swap associated with both a load and a store.
25129
25130 2018-01-02 Andrew Waterman <andrew@sifive.com>
25131
25132 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25133 * config/riscv/riscv.md (clear_cache): Use it.
25134
25135 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
25136
25137 * web.c: Remove out-of-date comment.
25138
25139 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25140
25141 * expr.c (fixup_args_size_notes): Check that any existing
25142 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25143 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25144 (emit_single_push_insn): ...here.
25145
25146 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25147
25148 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25149 (const_vector_encoded_nelts): New function.
25150 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25151 (const_vector_int_elt, const_vector_elt): Declare.
25152 * emit-rtl.c (const_vector_int_elt_1): New function.
25153 (const_vector_elt): Likewise.
25154 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25155 of CONST_VECTOR_ELT.
25156
25157 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25158
25159 * expr.c: Include rtx-vector-builder.h.
25160 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25161 directly on the tree encoding.
25162 (const_vector_from_tree): Likewise.
25163 * optabs.c: Include rtx-vector-builder.h.
25164 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25165 sequence of "u" values.
25166 * vec-perm-indices.c: Include rtx-vector-builder.h.
25167 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25168 directly on the vec_perm_indices encoding.
25169
25170 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25171
25172 * doc/rtl.texi (const_vector): Describe new encoding scheme.
25173 * Makefile.in (OBJS): Add rtx-vector-builder.o.
25174 * rtx-vector-builder.h: New file.
25175 * rtx-vector-builder.c: Likewise.
25176 * rtl.h (rtx_def::u2): Add a const_vector field.
25177 (CONST_VECTOR_NPATTERNS): New macro.
25178 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25179 (CONST_VECTOR_DUPLICATE_P): Likewise.
25180 (CONST_VECTOR_STEPPED_P): Likewise.
25181 (CONST_VECTOR_ENCODED_ELT): Likewise.
25182 (const_vec_duplicate_p): Check for a duplicated vector encoding.
25183 (unwrap_const_vec_duplicate): Likewise.
25184 (const_vec_series_p): Check for a non-duplicated vector encoding.
25185 Say that the function only returns true for integer vectors.
25186 * emit-rtl.c: Include rtx-vector-builder.h.
25187 (gen_const_vec_duplicate_1): Delete.
25188 (gen_const_vector): Call gen_const_vec_duplicate instead of
25189 gen_const_vec_duplicate_1.
25190 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25191 (gen_const_vec_duplicate): Use rtx_vector_builder.
25192 (gen_const_vec_series): Likewise.
25193 (gen_rtx_CONST_VECTOR): Likewise.
25194 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25195 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25196 Build a new vector rather than modifying a CONST_VECTOR in-place.
25197 (handle_special_swappables): Update call accordingly.
25198 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25199 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25200 Build a new vector rather than modifying a CONST_VECTOR in-place.
25201 (handle_special_swappables): Update call accordingly.
25202
25203 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25204
25205 * simplify-rtx.c (simplify_const_binary_operation): Use
25206 CONST_VECTOR_ELT instead of XVECEXP.
25207
25208 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25209
25210 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25211 the selector elements to be different from the data elements
25212 if the selector is a VECTOR_CST.
25213 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25214 ssizetype for the selector.
25215
25216 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25217
25218 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25219 before testing each element individually.
25220 * tree-vect-generic.c (lower_vec_perm): Likewise.
25221
25222 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25223
25224 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25225 * selftest-run-tests.c (selftest::run_tests): Call it.
25226 * vector-builder.h (vector_builder::operator ==): New function.
25227 (vector_builder::operator !=): Likewise.
25228 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25229 (vec_perm_indices::all_from_input_p): New function.
25230 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25231 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25232 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25233 instead of reading the VECTOR_CST directly. Detect whether both
25234 vector inputs are the same before constructing the vec_perm_indices,
25235 and update the number of inputs argument accordingly. Use the
25236 utility functions added above. Only construct sel2 if we need to.
25237
25238 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25239
25240 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25241 the broadcast of the low byte.
25242 (expand_mult_highpart): Use an explicit encoding for the permutes.
25243 * optabs-query.c (can_mult_highpart_p): Likewise.
25244 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25245 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25246 (vectorizable_bswap): Likewise.
25247 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25248 explicit encoding for the power-of-2 permutes.
25249 (vect_permute_store_chain): Likewise.
25250 (vect_grouped_load_supported): Likewise.
25251 (vect_permute_load_chain): Likewise.
25252
25253 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25254
25255 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25256 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25257 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25258 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25259 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25260 (vect_gen_perm_mask_any): Likewise.
25261
25262 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25263
25264 * int-vector-builder.h: New file.
25265 * vec-perm-indices.h: Include int-vector-builder.h.
25266 (vec_perm_indices): Redefine as an int_vector_builder.
25267 (auto_vec_perm_indices): Delete.
25268 (vec_perm_builder): Redefine as a stand-alone class.
25269 (vec_perm_indices::vec_perm_indices): New function.
25270 (vec_perm_indices::clamp): Likewise.
25271 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25272 (vec_perm_indices::new_vector): New function.
25273 (vec_perm_indices::new_expanded_vector): Update for new
25274 vec_perm_indices class.
25275 (vec_perm_indices::rotate_inputs): New function.
25276 (vec_perm_indices::all_in_range_p): Operate directly on the
25277 encoded form, without computing elided elements.
25278 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25279 encoding. Update for new vec_perm_indices class.
25280 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25281 the given vec_perm_builder.
25282 (expand_vec_perm_var): Update vec_perm_builder constructor.
25283 (expand_mult_highpart): Use vec_perm_builder instead of
25284 auto_vec_perm_indices.
25285 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25286 vec_perm_indices instead of auto_vec_perm_indices. Use a single
25287 or double series encoding as appropriate.
25288 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25289 vec_perm_indices instead of auto_vec_perm_indices.
25290 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25291 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25292 (vect_permute_store_chain): Likewise.
25293 (vect_grouped_load_supported): Likewise.
25294 (vect_permute_load_chain): Likewise.
25295 (vect_shift_permute_load_chain): Likewise.
25296 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25297 (vect_transform_slp_perm_load): Likewise.
25298 (vect_schedule_slp_instance): Likewise.
25299 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25300 (vectorizable_mask_load_store): Likewise.
25301 (vectorizable_bswap): Likewise.
25302 (vectorizable_store): Likewise.
25303 (vectorizable_load): Likewise.
25304 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25305 vec_perm_indices instead of auto_vec_perm_indices. Use
25306 tree_to_vec_perm_builder to read the vector from a tree.
25307 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25308 vec_perm_builder instead of a vec_perm_indices.
25309 (have_whole_vector_shift): Use vec_perm_builder and
25310 vec_perm_indices instead of auto_vec_perm_indices. Leave the
25311 truncation to calc_vec_perm_mask_for_shift.
25312 (vect_create_epilog_for_reduction): Likewise.
25313 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25314 from auto_vec_perm_indices to vec_perm_indices.
25315 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25316 instead of changing individual elements.
25317 (aarch64_vectorize_vec_perm_const): Use new_vector to install
25318 the vector in d.perm.
25319 * config/arm/arm.c (expand_vec_perm_d::perm): Change
25320 from auto_vec_perm_indices to vec_perm_indices.
25321 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25322 instead of changing individual elements.
25323 (arm_vectorize_vec_perm_const): Use new_vector to install
25324 the vector in d.perm.
25325 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25326 Update vec_perm_builder constructor.
25327 (rs6000_expand_interleave): Likewise.
25328 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25329 (rs6000_expand_interleave): Likewise.
25330
25331 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25332
25333 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25334 to qimode could truncate the indices.
25335 * optabs.c (expand_vec_perm_var): Likewise.
25336
25337 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25338
25339 * Makefile.in (OBJS): Add vec-perm-indices.o.
25340 * vec-perm-indices.h: New file.
25341 * vec-perm-indices.c: Likewise.
25342 * target.h (vec_perm_indices): Replace with a forward class
25343 declaration.
25344 (auto_vec_perm_indices): Move to vec-perm-indices.h.
25345 * optabs.h: Include vec-perm-indices.h.
25346 (expand_vec_perm): Delete.
25347 (selector_fits_mode_p, expand_vec_perm_var): Declare.
25348 (expand_vec_perm_const): Declare.
25349 * target.def (vec_perm_const_ok): Replace with...
25350 (vec_perm_const): ...this new hook.
25351 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25352 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25353 * doc/tm.texi: Regenerate.
25354 * optabs.def (vec_perm_const): Delete.
25355 * doc/md.texi (vec_perm_const): Likewise.
25356 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25357 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25358 expand_vec_perm for constant permutation vectors. Assert that
25359 the mode of variable permutation vectors is the integer equivalent
25360 of the mode that is being permuted.
25361 * optabs-query.h (selector_fits_mode_p): Declare.
25362 * optabs-query.c: Include vec-perm-indices.h.
25363 (selector_fits_mode_p): New function.
25364 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25365 is defined, instead of checking whether the vec_perm_const_optab
25366 exists. Use targetm.vectorize.vec_perm_const instead of
25367 targetm.vectorize.vec_perm_const_ok. Check whether the indices
25368 fit in the vector mode before using a variable permute.
25369 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25370 vec_perm_indices instead of an rtx.
25371 (expand_vec_perm): Replace with...
25372 (expand_vec_perm_const): ...this new function. Take the selector
25373 as a vec_perm_indices rather than an rtx. Also take the mode of
25374 the selector. Update call to shift_amt_for_vec_perm_mask.
25375 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25376 Use vec_perm_indices::new_expanded_vector to expand the original
25377 selector into bytes. Check whether the indices fit in the vector
25378 mode before using a variable permute.
25379 (expand_vec_perm_var): Make global.
25380 (expand_mult_highpart): Use expand_vec_perm_const.
25381 * fold-const.c: Includes vec-perm-indices.h.
25382 * tree-ssa-forwprop.c: Likewise.
25383 * tree-vect-data-refs.c: Likewise.
25384 * tree-vect-generic.c: Likewise.
25385 * tree-vect-loop.c: Likewise.
25386 * tree-vect-slp.c: Likewise.
25387 * tree-vect-stmts.c: Likewise.
25388 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25389 Delete.
25390 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25391 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25392 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25393 (aarch64_vectorize_vec_perm_const): ...this new function.
25394 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25395 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25396 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25397 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25398 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25399 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25400 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25401 into...
25402 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
25403 check for NEON modes.
25404 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25405 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25406 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25407 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25408 into...
25409 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
25410 the old VEC_PERM_CONST conditions.
25411 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25412 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25413 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25414 (ia64_vectorize_vec_perm_const_ok): Merge into...
25415 (ia64_vectorize_vec_perm_const): ...this new function.
25416 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25417 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25418 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25419 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25420 * config/mips/mips.c (mips_expand_vec_perm_const)
25421 (mips_vectorize_vec_perm_const_ok): Merge into...
25422 (mips_vectorize_vec_perm_const): ...this new function.
25423 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25424 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25425 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25426 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25427 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25428 (rs6000_expand_vec_perm_const): Delete.
25429 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25430 Delete.
25431 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25432 (altivec_expand_vec_perm_const_le): Take each operand individually.
25433 Operate on constant selectors rather than rtxes.
25434 (altivec_expand_vec_perm_const): Likewise. Update call to
25435 altivec_expand_vec_perm_const_le.
25436 (rs6000_expand_vec_perm_const): Delete.
25437 (rs6000_vectorize_vec_perm_const_ok): Delete.
25438 (rs6000_vectorize_vec_perm_const): New function.
25439 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25440 an element count and rtx array.
25441 (rs6000_expand_extract_even): Update call accordingly.
25442 (rs6000_expand_interleave): Likewise.
25443 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25444 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25445 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25446 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25447 (rs6000_expand_vec_perm_const): Delete.
25448 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25449 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25450 (altivec_expand_vec_perm_const_le): Take each operand individually.
25451 Operate on constant selectors rather than rtxes.
25452 (altivec_expand_vec_perm_const): Likewise. Update call to
25453 altivec_expand_vec_perm_const_le.
25454 (rs6000_expand_vec_perm_const): Delete.
25455 (rs6000_vectorize_vec_perm_const_ok): Delete.
25456 (rs6000_vectorize_vec_perm_const): New function. Remove stray
25457 reference to the SPE evmerge intructions.
25458 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25459 an element count and rtx array.
25460 (rs6000_expand_extract_even): Update call accordingly.
25461 (rs6000_expand_interleave): Likewise.
25462 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25463 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25464 new function.
25465 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25466
25467 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25468
25469 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25470 vector mode and that that mode matches the mode of the data
25471 being permuted.
25472 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25473 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
25474 directly using expand_vec_perm_1 when forcing selectors into
25475 registers.
25476 (expand_vec_perm_var): New function, split out from expand_vec_perm.
25477
25478 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25479
25480 * optabs-query.h (can_vec_perm_p): Delete.
25481 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25482 * optabs-query.c (can_vec_perm_p): Split into...
25483 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25484 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25485 particular selector is valid.
25486 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25487 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25488 (vect_grouped_load_supported): Likewise.
25489 (vect_shift_permute_load_chain): Likewise.
25490 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25491 (vect_transform_slp_perm_load): Likewise.
25492 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25493 (vectorizable_bswap): Likewise.
25494 (vect_gen_perm_mask_checked): Likewise.
25495 * fold-const.c (fold_ternary_loc): Likewise. Don't take
25496 implementations of variable permutation vectors into account
25497 when deciding which selector to use.
25498 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25499 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25500 with a false third argument.
25501 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25502 to test whether the constant selector is valid and can_vec_perm_var_p
25503 to test whether a variable selector is valid.
25504
25505 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25506
25507 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25508 * optabs-query.c (can_vec_perm_p): Likewise.
25509 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25510 instead of vec_perm_indices.
25511 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25512 (vect_gen_perm_mask_checked): Likewise,
25513 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25514 (vect_gen_perm_mask_checked): Likewise,
25515
25516 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
25517
25518 * optabs-query.h (qimode_for_vec_perm): Declare.
25519 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25520 (qimode_for_vec_perm): ...this new function.
25521 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25522
25523 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25524
25525 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25526 does not have a conditional at the top.
25527
25528 2018-01-02 Richard Biener <rguenther@suse.de>
25529
25530 * ipa-inline.c (big_speedup_p): Fix expression.
25531
25532 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25533
25534 PR target/81616
25535 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25536 for generic 4->6.
25537
25538 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
25539
25540 PR target/81616
25541 Generic tuning.
25542 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25543 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25544 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25545 cond_taken_branch_cost 3->4.
25546
25547 2018-01-01 Jakub Jelinek <jakub@redhat.com>
25548
25549 PR tree-optimization/83581
25550 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25551 TODO_cleanup_cfg if any changes have been made.
25552
25553 PR middle-end/83608
25554 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25555 convert_modes if target mode has the right side, but different mode
25556 class.
25557
25558 PR middle-end/83609
25559 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25560 last argument when extracting from CONCAT. If either from_real or
25561 from_imag is NULL, use expansion through memory. If result is not
25562 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25563 the parts directly to inner mode, if even that fails, use expansion
25564 through memory.
25565
25566 PR middle-end/83623
25567 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25568 check for bswap in mode rather than HImode and use that in expand_unop
25569 too.
25570 \f
25571 Copyright (C) 2018 Free Software Foundation, Inc.
25572
25573 Copying and distribution of this file, with or without modification,
25574 are permitted in any medium without royalty provided the copyright
25575 notice and this notice are preserved.