1 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3 PR tree-optimization/85694
4 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
5 (uavgM3_ceil): Document new optabs.
6 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
7 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
9 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
10 (savg_ceil_optab): New optabs.
11 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
12 (vect_vect_recog_func_ptrs): Add it.
13 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
14 constant directly from the associated lhs.
16 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
18 * tree-vect-patterns.c (vect_split_statement): New function.
19 (vect_convert_input): Use it to try to split an existing cast.
21 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
23 * poly-int.h (print_hex): New function.
24 * dumpfile.h (dump_dec, dump_hex): Declare.
25 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
26 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
27 min_input_precision, operation_precision and operation_sign.
28 * tree-vect-patterns.c (vect_get_range_info): New function.
29 (vect_same_loop_or_bb_p, vect_single_imm_use)
30 (vect_operation_fits_smaller_type): Delete.
31 (vect_look_through_possible_promotion): Add an optional
32 single_use_p parameter.
33 (vect_recog_over_widening_pattern): Rewrite to use new
34 stmt_vec_info infomration. Handle one operation at a time.
35 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
36 (vect_truncatable_operation_p, vect_set_operation_type)
37 (vect_set_min_input_precision): New functions.
38 (vect_determine_min_output_precision_1): Likewise.
39 (vect_determine_min_output_precision): Likewise.
40 (vect_determine_precisions_from_range): Likewise.
41 (vect_determine_precisions_from_users): Likewise.
42 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
43 (vect_vect_recog_func_ptrs): Put over_widening first.
45 (vect_pattern_recog): Call vect_determine_precisions.
47 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
49 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
50 statements that have been replaced by further pattern statements.
51 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
53 2018-07-03 Richard Biener <rguenther@suse.de>
55 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
56 always set *dt. Dump vectype in vectype overload.
57 * dumpfile.h (dump_gimple_expr): New function.
58 (dump_gimple_expr_loc): Likewise.
59 * dumpfile.c (dump_gimple_expr): New function.
60 (dump_gimple_expr_loc): Likewise.
62 2018-07-02 Jeff Law <law@redhat.com>
64 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
65 the H8/300, H8/300H and H8/S variants into a single pattern.
66 (movhi_h8300, movqi_h8300hs): Similarly.
67 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
68 (QHI mode iterator): New.
70 * config/h8300/h8300.md: Remove trailing whitespace.
72 2018-07-02 Jim Wilson <jimw@sifive.com>
74 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
75 instead of emit_insn for interrupt returns.
76 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
77 (riscv_sret, riscv_uret): Likewise.
79 2018-07-02 David Malcolm <dmalcolm@redhat.com>
81 * pretty-print.c (selftest::test_pp_format): Move save and restore
82 of quotes to class auto_fix_quotes, and add an instance.
83 * selftest.c: Include "intl.h".
84 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
85 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
86 * selftest.h (selftest::auto_fix_quotes): New class.
88 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
90 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
91 (aarch64_sve_prepare_conditional_op): Remove.
92 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
93 Allow aarch64_simd_reg_or_zero as select operand; remove
94 the aarch64_sve_prepare_conditional_op call.
95 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
96 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
97 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
98 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
99 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
100 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
101 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
102 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
103 and a splitters to match all of the *_any patterns.
104 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
106 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
107 (SVE_COND_FP_BINARY_REV): Remove.
108 (sve_int_op_rev, sve_fp_op_rev): New.
109 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
110 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
111 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
112 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
113 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
114 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
115 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
116 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
117 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
119 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
120 Remove match_dup 1 from the inner unspec.
121 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
123 * config/aarch64/aarch64.md (movprfx): New attr.
124 (length): Default movprfx to 8.
125 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
126 (*madd<SVE_I>, *msub<SVE_I): Likewise.
127 (*<su>mul<SVE_I>3_highpart): Likewise.
128 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
129 (*v<ASHIFT><SVE_I>3): Likewise.
130 (*<su><MAXMIN><SVE_I>3): Likewise.
131 (*<su><MAXMIN><SVE_F>3): Likewise.
132 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
133 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
134 (*div<SVE_F>4): Likewise.
136 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
138 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
141 2018-07-02 Richard Biener <rguenther@suse.de>
143 PR tree-optimization/86363
144 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
145 memset argument refers to a non-variable address.
147 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
149 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
150 {PLUS,MINUS}_EXPR code to...
151 (adjust_symbolic_bound): ...here,
152 (combine_bound): ...here,
153 (set_value_range_with_overflow): ...and here.
155 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
157 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
159 (extract_range_from_abs_expr): ...here.
161 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
163 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
164 -fno-omit-frame-pointer when not optimizing.
166 2018-07-02 Martin Liska <mliska@suse.cz>
169 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
170 (propagate_nothrow): Likewise.
172 2018-07-02 Martin Liska <mliska@suse.cz>
175 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
177 2018-07-02 David Malcolm <dmalcolm@redhat.com>
179 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
180 function in r262149, changing "loc" param from source_location to
181 const dump_location_t &.
182 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
183 declaration, as above.
185 2018-07-01 Paul Koning <ni1d@arrl.net>
187 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
188 -munit-asm, -mgnu-asm, -mdec-asm.
189 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
190 (pdp11_output_labelref): New.
191 (pdp11_output_def): New.
192 (pdp11_output_addr_vec_elt): New.
193 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
194 %# and %@ format codes.
195 (pdp11_option_override): New.
196 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
197 (pdp11_output_ident): New.
198 (pdp11_asm_named_section): New.
199 (pdp11_asm_init_sections): New.
200 (pdp11_file_start): New.
201 (pdp11_file_end): New.
202 (output_ascii): Use .ascii/.asciz for -mdec-asm.
203 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
204 %o, like %c but octal.
205 (pdp11_option_override): New.
206 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
208 (DATA_SECTION_ASM_OP): Ditto.
209 (READONLY_DATA_SECTION_ASM_OP): New.
210 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
211 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
212 (ASM_OUTPUT_LABELREF): Ditto.
213 (ASM_OUTPUT_DEF): Ditto.
214 (ASM_OUTPUT_EXTERNAL): New.
215 (ASM_OUTPUT_SOURCE_FILENAME): New.
216 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
217 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
218 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
219 %# and %@ format codes.
220 * config/pdp11/pdp11.opt (mgnu-asm): New.
221 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
222 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
223 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
225 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
227 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
228 dereferencing path[] beyond its length.
230 (debug_all_paths): New.
231 (rewire_first_differing_edge): New.
232 (adjust_paths_after_duplication): New.
233 (duplicate_thread_path): Call adjust_paths_after_duplication.
235 (thread_through_all_blocks): Add new argument to
236 duplicate_thread_path.
238 2018-06-30 Jim Wilson <jimw@sifive.com>
240 * config/riscv/predicates.md (p2m1_shift_operand): New.
241 (high_mask_shift_operand): New.
242 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
243 pattern using p2m1_shift_operand.
244 (lshsi3_zero_extend_3+2): New combiner pattern using
245 high_mask_shift_operand.
247 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
249 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
251 (vect_recog_rotate_pattern): ...here.
252 (vect_convert_input): Try to insert casts of invariants in the
254 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
255 preheader to be empty.
257 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
259 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
260 vector type. If given, install it in the new statement's
262 (vect_element_precision): New function.
263 (vect_unpromoted_value): New struct.
264 (vect_unpromoted_value::vect_unpromoted_value): New function.
265 (vect_unpromoted_value::set_op): Likewise.
266 (vect_look_through_possible_promotion): Likewise.
267 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
268 (vect_widened_op_tree, vect_convert_input): Likewise.
269 (vect_convert_inputs, vect_convert_output): Likewise.
270 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
271 to handle the optional cast of the multiplication result and
272 vect_widened_op_tree to detect the widened multiplication itself.
273 Do not require the input and output of promotion casts to have
274 the same sign, but base the signedness of the operation on the
275 input rather than the result. If the pattern includes two
276 promotions, check that those promotions have the same sign.
277 Do not restrict the MULT_EXPR handling to a double-width result;
278 handle quadruple-width results and wider. Use vect_convert_inputs
279 to convert the inputs to the common type.
280 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
281 to handle the optional cast of the ABS result. Also allow a sign
282 change or a sign extension between the ABS and MINUS.
283 Use vect_widened_op_tree to detect the widened subtraction and use
284 vect_convert_inputs to convert the inputs to the common type.
285 (vect_handle_widen_op_by_const): Delete.
286 (vect_recog_widen_op_pattern): New function.
287 (vect_recog_widen_mult_pattern): Use it.
288 (vect_recog_widen_shift_pattern): Likewise.
289 (vect_recog_widen_sum_pattern): Use
290 vect_look_through_possible_promotion to handle the promoted
293 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
295 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
296 the containing gimple_seq *.
297 * gimple-iterator.h (gsi_for_stmt): Declare it.
298 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
299 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
300 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
301 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
302 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
304 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
306 (vect_mark_pattern_stmts): ...here. Handle cases in which the
307 statement being replaced is part of an existing pattern
308 definition sequence, inserting the new pattern statements before
310 (vect_pattern_recog_1): Don't return a bool. If the statement
311 is already part of a pattern, instead apply pattern matching
312 to the pattern definition statements. Don't clear the
313 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
314 (vect_pattern_recog): Don't break after the first match;
315 continue processing the pattern definition statements instead.
316 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
318 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
320 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
321 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
322 (vect_recog_widen_sum_pattern): Use it.
324 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
326 * tree-vect-loop.c (vectorizable_reduction): Assert that the
327 phi is not a pattern statement and has not been replaced by
329 * tree-vect-patterns.c (type_conversion_p): Don't check
330 STMT_VINFO_IN_PATTERN_P.
331 (vect_recog_vector_vector_shift_pattern): Likewise.
332 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
333 the pattern statement rather than the original statement; check
334 directly for a WIDEN_MULT_EXPR here.
335 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
336 vect_is_simple_use to return the pattern statement rather
337 than the original statement; use is_pattern_stmt_p to check
338 for such a pattern statement.
339 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
340 to return the pattern statement rather than the original statement;
341 don't do the same transformation here.
342 (vect_is_simple_use): If the defining statement has been replaced
343 by a pattern statement, return the pattern statement instead.
344 Remove the corresponding (local) transformation from the vectype
347 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
349 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
350 end and default to null.
351 * tree-vect-loop.c (vect_create_epilog_for_reduction)
352 (vectorizable_reduction): Update calls accordingly, dropping the
353 gimple ** argument if the passed-back statement isn't needed.
354 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
355 (vect_recog_rotate_pattern): Likewise.
356 (vect_recog_mask_conversion_pattern): Likewise.
357 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
358 (vect_mask_constant_operand_p): Likewise.
359 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
360 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
361 (get_group_load_store_type, get_load_store_type): Likewise.
362 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
363 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
364 (vectorizable_conversion, vectorizable_assignment): Likewise.
365 (vectorizable_shift, vectorizable_operation): Likewise.
366 (vectorizable_store, vect_is_simple_cond): Likewise.
367 (vectorizable_condition, vectorizable_comparison): Likewise.
368 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
369 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
370 and move it to the end. Cope with null def_stmt_outs.
372 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
374 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
376 2018-06-29 Jeff Law <law@redhat.com>
378 * config/v850/v850.c (v850_legitimate_address_p): Handle large
379 displacements for TARGET_V850E2V3 and newer.
380 (TARGET_LRA_P): Remove. Defaults to LRA now.
381 * config/v850/v850.md (sign23byte_load): Remove.
382 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
383 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
385 2018-06-29 Martin Liska <mliska@suse.cz>
388 * coverage.c (coverage_init): Mangle full path name.
389 * doc/invoke.texi: Document the change.
390 * gcov-io.c (mangle_path): New.
391 * gcov-io.h (mangle_path): Likewise.
392 * gcov.c (mangle_name): Use mangle_path for path mangling.
394 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
396 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
397 if starting source register is not even.
399 2018-06-29 Martin Liska <mliska@suse.cz>
401 PR tree-optimization/86263
402 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
403 Make edge redirection.
405 2018-06-29 David Malcolm <dmalcolm@redhat.com>
407 * dumpfile.c (dump_loc): Add indentation based on scope depth.
408 (dump_scope_depth): New variable.
409 (get_dump_scope_depth): New function.
410 (dump_begin_scope): New function.
411 (dump_end_scope): New function.
412 * dumpfile.h (get_dump_scope_depth): New declaration.
413 (dump_begin_scope): New declaration.
414 (dump_end_scope): New declaration.
415 (class auto_dump_scope): New class.
416 (AUTO_DUMP_SCOPE): New macro.
417 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
420 2018-06-29 Richard Biener <rguenther@suse.de>
422 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
423 compute_all_dependences succeeds.
424 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
425 exceed --param loop-max-datarefs-for-datadeps.
427 2018-06-29 Jakub Jelinek <jakub@redhat.com>
429 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
431 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
434 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
435 alternative 0 in preferred_for_speed attribute.
437 2018-06-28 Paul Koning <ni1d@arrl.net>
439 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
440 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
441 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
442 * config/pdp11/pdp11.md: Correct "length" attribute calculation
443 for shift insn patterns.
445 2018-06-28 David Malcolm <dmalcolm@redhat.com>
447 * cgraph.c (cgraph_node::get_body): Replace assignments to
448 "dump_file" with calls to set_dump_file.
449 * dumpfile.c (alt_dump_file): Make static, and group with...
450 (alt_flags): ...this definition.
451 (dumps_are_enabled): New variable.
452 (refresh_dumps_are_enabled): New function.
453 (set_dump_file): New function.
454 (set_alt_dump_file): New function.
455 (gcc::dump_manager::dump_start): Replace assignments to
456 "dump_file" and "alt_dump_file" with calls to set_dump_file and
458 (gcc::dump_manager::dump_finish): Likewise.
459 * dumpfile.h (alt_dump_file): Delete decl.
460 (dumps_are_enabled): New variable decl.
461 (set_dump_file): New function decl.
462 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
464 * tree-nested.c (lower_nested_functions): Replace assignments to
465 "dump_file" with calls to set_dump_file.
467 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
469 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
470 goto_locus of each outgoing edge of each basic block.
472 2018-06-28 Richard Biener <rguenther@suse.de>
474 * dwarf2out.c (decl_scope_table): Remove.
475 (push_decl_scope): Likewise.
476 (pop_decl_scope): Likewise.
477 (gen_type_die_for_member): Do not call push/pop_decl_scope.
478 (gen_struct_or_union_type_die): Likewise.
479 (gen_tagged_type_die): Likewise.
480 (dwarf2out_init): Do not initialize decl_scope_table.
481 (dwarf2out_c_finalize): Do not free it.
483 2018-06-28 Richard Biener <rguenther@suse.de>
485 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
486 deciding whether to not re-use a DIE.
488 2018-06-28 Richard Biener <rguenther@suse.de>
490 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
491 DW_AT_abstract_origin attribute.
493 2018-06-28 Martin Liska <mliska@suse.cz>
495 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
496 Use newly introduced constants.
497 * tree-switch-conversion.h (struct jump_table_cluster):
498 Define max_ratio_for_size and max_ratio_for_speed.
500 2018-06-28 Martin Liska <mliska@suse.cz>
502 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
503 Add new checking assert to catch invalid state.
504 (jump_table_cluster::can_be_handled): Handle single case
506 (jump_table_cluster::is_beneficial): Bail out for such case.
507 (bit_test_cluster::find_bit_tests):
508 Add new checking assert to catch invalid state.
509 (bit_test_cluster::can_be_handled): Handle single case
511 (bit_test_cluster::is_beneficial): Bail out for such case.
512 (switch_decision_tree::analyze_switch_statement):
515 2018-06-28 Martin Liska <mliska@suse.cz>
517 * common.opt: Introduce -completion option.
518 * gcc.c (driver_handle_option): Handle it.
519 (driver::main): Print completions if completion
521 * opt-suggestions.c (option_proposer::get_completions):
523 (option_proposer::suggest_completion): Likewise.
524 (option_proposer::find_param_completions): Likewise.
525 (verify_autocompletions): Likewise.
526 (test_completion_valid_options): Likewise.
527 (test_completion_valid_params): Likewise.
528 (in_completion_p): Likewise.
529 (empty_completion_p): Likewise.
530 (test_completion_partial_match): Likewise.
531 (test_completion_garbage): Likewise.
532 (opt_proposer_c_tests): Likewise.
533 * opt-suggestions.h: Declare new functions.
534 * opts.c (common_handle_option): Handle OPT__completion_.
535 * selftest-run-tests.c (selftest::run_tests): Add
536 opt_proposer_c_tests.
537 * selftest.c (assert_str_startswith): New.
538 * selftest.h (assert_str_startswith): Likewise.
539 (opt_proposer_c_tests): New.
540 (ASSERT_STR_STARTSWITH): Likewise.
542 2018-06-28 Martin Liska <mliska@suse.cz>
544 * Makefile.in: Add opt-suggestions.o.
545 * gcc-main.c: Include opt-suggestions.h.
546 * gcc.c (driver::driver): Likewise.
547 (driver::~driver): Remove m_option_suggestions.
548 (driver::build_option_suggestions): Moved to option_proposer.
549 (driver::suggest_option): Likewise.
550 (driver::handle_unrecognized_options): Use option_proposer.
551 * gcc.h (class driver): Add new memver m_option_proposer.
552 * opt-suggestions.c: New file.
553 * opt-suggestions.h: New file.
555 2018-06-28 Martin Liska <mliska@suse.cz>
557 * vec.h (class auto_string_vec): New (moved from auto_argvec).
558 (auto_string_vec::~auto_string_vec): Likewise.
560 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
562 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
563 prevent_decl_creation_for_types fields up and add reset_location field.
564 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
565 statement if id->reset_location is true.
566 (copy_edges_for_bb): Do not set goto_locus on the new edges if
567 id->reset_location is true.
568 (copy_phis_for_bb): Force input_location on the arguments if
569 id->reset_location is true.
570 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
571 is set on the function to be inlined.
573 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
575 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
577 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
579 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
581 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
582 hard registers for the clobbered pseudo.
584 2018-06-27 Paul Koning <ni1d@arrl.net>
586 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
587 mutually exclusive options.
588 * config/pdp11/constraints.md (h): New constraint.
589 (O): Update definition to match shift code generation.
591 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
593 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
595 (output_jump): Change arguments.
596 (pdp11_fixed_cc_regs): New function.
597 (pdp11_cc_mode): Ditto.
598 (pdp11_expand_shift): Ditto.
599 (pdp11_assemble_shift): Ditto.
600 (pdp11_small_shift): Ditto.
601 (pdp11_branch_cost): Remove.
602 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
604 (pdp11_register_move_cost): Update for CC registers.
605 (pdp11_rtx_costs): Add case for LSHIFTRT.
606 (pdp11_output_jump): Add CCNZ mode conditional branches.
607 (notice_update_cc_on_set): Remove.
608 (pdp11_cc_mode): New function.
609 (simple_memory_operand): Correct pre/post decrement case.
610 (no_side_effect_operand): New function.
611 (pdp11_regno_reg_class): Add CC_REGS class.
612 (pdp11_fixed_cc_regs): New function.
613 (pdp11_small_shift): New function.
614 (pdp11_expand_shift): New function to expand shift insns.
615 (pdp11_assemble_shift): New function to output shifts.
616 (pdp11_branch_cost): Remove.
617 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
618 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
620 (PTRDIFF_TYPE): Ditto.
621 (ADJUST_INSN_LENGTH): New macro.
622 (FIXED_REGISTERS): Add CC registers.
623 (CALL_USED_REGISTERS): Ditto.
625 (REG_CLASS_NAMES): Ditto.
626 (REG_CLASS_CONTENTS): Ditto.
627 (SELECT_CC_MODE): Use new function.
628 (TARGET_FLAGS_REGNUM): New macro.
629 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
630 (cc0_reg_rtx): Remove.
631 (CC_STATUS_MDEP): Remove.
632 (CC_STATUS_MDEFP_INIT): Remove.
634 (NOTICE_UPDATE_CC): Remove.
635 (REGISTER_NAMES): Add CC registers.
636 (BRANCH_COST): Change to constant 1.
637 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
639 * config/pdp11/pdp11.opt (mbcopy): Remove.
640 (mbcopy-builtin): Remove.
641 (mbranch-cheap): Remove.
642 (mbranch-expensive): Remove.
643 * config/pdp11/predicates.md (expand_shift_operand): Update to
644 match shift code generation.
645 (ccnz_operator): New predicate.
646 * doc/invoke.texi (PDP-11 Options): Remove deleted options
647 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
648 Remove non-existent option -mabshi, -mno-abshi. Document mutually
650 * doc/md.texi (PDP-11): Document new D and h constraints. Update
651 description of O constraint.
653 2018-06-27 Jeff Law <law@redhat.com>
654 Austin Law <austinklaw@gmail.com>
656 * config/v850/v850.md (addsi3_set_flags): New pattern.
657 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
658 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
659 (zero_extendhisi2_v850_set_flags): Likewise.
660 (zero_extendqisi2_v850_set_flags): Likewise.
661 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
662 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
663 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
665 * config/v850/v850-protos.h (notice_update_cc): Remove.
666 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
667 (v850_print_operand): Handle 'D' and "d".
668 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
669 Add handling of arithmetic/logical operations compared against zero.
670 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
671 Do not look at v850_compare_op, instead get mode from last argument.
672 (v850_gen_compare): Remove
673 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
674 after reload for prologue insns.
675 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
677 (construct_save_jarl): Likewise.
678 (TARGET_FLAGS_REGNUM): Define.
679 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
680 (NOTICE_UPDATE_CC): Remove.
681 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
682 than cc0. Conditionalize on reload_completed.
683 (cmpsi_insn, setfcc_insn): Likewise.
684 (tst1 splitter): Turn into define_and_split which sets the flags
686 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
687 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
688 (cstoresf4, cstoredf4): Clobber the flags.
689 (cmpsi, cmpsf, cmpdf): Remove expanders.
690 (setf_insn): Remove pattern.
691 (addsi3): Turn into define_and_split which clobbers the flags after
692 reload and a suitable pattern (addsi3_clobber_flags) for use after
694 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
695 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
696 (ashrsi3, ashrsi3_v850e2): Likewise.
697 (bins): Clobber the flags.
698 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
699 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
700 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
701 (call_value_internal_short, call_value_internal_long): Likewise.
702 (callt_save_interrupt, callt_return_interrupt): Likewise.
703 (save_interrupt, return_interrupt): Likewise.
704 (callt_save_all_interrupt, save_all_interrupt): Likewise.
705 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
706 (restore_all_interrupt, _restore_all_interrupt): Likewise.
707 (All FP comparisons): Only allow after reload has completed.
709 (divh, divhu): Tweak output template.
710 (branch_z_normal, branch_z_invert): Remove
711 (branch_nz_normal, branch_nz_invert): Likewise.
712 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
714 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
715 * config/v850/v850.c (notice_update_cc): Remove.
716 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
717 (CC_NO_CARRY): Likewise.
718 (NOTICE_UPDATE_CC): Define to nothing.
719 * config/v850/v850.md: Remove block comment on cc0 handling
720 Remove "cc" attribute from all patterns. Remove cc_status handling
721 from all patterns. Minor formatting fixes.
723 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
725 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
726 (cortex-a76.cortex-a55): Likewise.
727 * config/aarch64/aarch64-tune.md: Regenerate.
728 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
729 cortex-a76.cortex-a55.
731 2018-06-27 Jeff Law <law@redhat.com>
733 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
734 (MULTILIB_DIRNAMES): Similarly.
736 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
738 * gimple.h (gimple_return_retbnd): Delete.
739 (gimple_return_set_retbnd): Likewise.
740 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
741 gimple_return_set_retbnd.
742 * gimple-pretty-print.c (dump_gimple_return): Remove call to
743 gimple_return_retbnd and adjust.
744 * tree-inline.h (struct copy_body_data): Remove retbnd field.
745 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
746 Explicitly return NULL in a couple more cases. Move assertion
747 on debug statements and remove unreachable code.
748 (reset_debug_binding): Do not test id->retbnd.
749 (expand_call_inline): Do not set it.
751 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
753 * configure.ac: Add --disable-gcov option.
754 * configure: Regenerate.
755 * Makefile.in: Honour @enable_gcov@.
756 * doc/install.texi: Document --disable-gcov.
758 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
760 * config/arm/arm-cpus.in (cortex-a76): New entry.
761 (cortex-a76.cortex-a55): Likewise.
762 * config/arm/arm-tables.opt: Regenerate.
763 * config/arm/arm-tune.md: Likewise.
764 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
765 * doc/invoke.texi (ARM Options): Document cortex-a76 and
766 cortex-a76.cortex-a55.
768 2018-06-27 Tamar Christina <tamar.christina@arm.com>
771 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
773 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
775 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
777 (EPILOGUE_USES): Likewise.
779 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
781 * tree-inline.c (remap_location): New function extracted from...
782 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
783 (copy_phis_for_bb): ...here. Call remap_location.
784 (copy_cfg_body): Adjust call to copy_edges_for_bb.
786 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
788 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
789 unaligned vsx for 16B memset.
791 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
794 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
795 ieee128_float_type_node to long_double_type_node unless
796 TARGET_LONG_DOUBLE_128 is set.
798 2018-06-26 David Malcolm <dmalcolm@redhat.com>
800 * cfgloop.c (get_loop_location): Convert return type from
801 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
802 by implicit construction from rtx_insn *, and using
803 dump_user_location_t::from_function_decl for the fallback case.
804 * cfgloop.h (get_loop_location): Convert return type from
805 location_t to dump_user_location_t.
806 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
807 dump_printf_loc to pass in a dump_location_t rather than a
808 location_t, via the gimple stmt.
809 * coverage.c (get_coverage_counts): Update calls to
810 dump_printf_loc to pass in dump_location_t rather than a
812 * doc/optinfo.texi (Dump types): Convert example of
813 dump_printf_loc from taking "locus" to taking "insn". Update
814 description of the "_loc" calls to cover dump_location_t.
815 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
817 (dump_user_location_t::dump_user_location_t): New constructors,
818 from gimple *stmt and rtx_insn *.
819 (dump_user_location_t::from_function_decl): New function.
820 (dump_loc): Make static.
821 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
822 const dump_location_t &.
823 (dump_generic_expr_loc): Delete.
824 (dump_printf_loc): Convert param "loc" from location_t to
825 const dump_location_t &.
826 (selftest::test_impl_location): New function.
827 (selftest::dumpfile_c_tests): New function.
828 * dumpfile.h: Include "profile-count.h".
829 (class dump_user_location_t): New class.
830 (struct dump_impl_location_t): New struct.
831 (class dump_location_t): New class.
832 (dump_printf_loc): Convert 2nd param from source_location to
833 const dump_location_t &.
834 (dump_generic_expr_loc): Delete.
835 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
836 const dump_location_t &.
837 * gimple-fold.c (fold_gimple_assign): Update call to
838 dump_printf_loc to pass in a dump_location_t rather than a
839 location_t, via the gimple stmt.
840 (gimple_fold_call): Likewise.
841 * gimple-loop-interchange.cc
842 (loop_cand::analyze_iloop_reduction_var): Update for change to
843 check_reduction_path.
844 (tree_loop_interchange::interchange): Update for change to
846 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
847 change in return-type of find_loop_location.
848 (graphite_regenerate_ast_isl): Likewise.
849 * graphite-optimize-isl.c (optimize_isl): Likewise.
850 * graphite.c (graphite_transform_loops): Likewise.
851 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
852 pass in a dump_location_t rather than a location_t, via the
854 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
855 * ipa.c (walk_polymorphic_call_targets): Likewise.
856 * loop-unroll.c (report_unroll): Convert "locus" param from
857 location_t to dump_location_t.
858 (decide_unrolling): Update for change to get_loop_location's
860 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
861 location_t to dump_user_location_t.
862 (grid_find_single_omp_among_assignments_1): Updates calls to
863 dump_printf_loc to pass in a dump_location_t rather than a
864 location_t, via the gimple stmt.
865 (grid_parallel_clauses_gridifiable): Convert "tloc" from
866 location_t to dump_location_t. Updates calls to dump_printf_loc
867 to pass in a dump_location_t rather than a location_t, via the
869 (grid_inner_loop_gridifiable_p): Likewise.
870 (grid_dist_follows_simple_pattern): Likewise.
871 (grid_gfor_follows_tiling_pattern): Likewise.
872 (grid_target_follows_gridifiable_pattern): Likewise.
873 (grid_attempt_target_gridification): Convert initialization
874 of local "grid" from memset to zero-initialization; FIXME: does
875 this require C++11? Update call to dump_printf_loc to pass in a
876 optinfo_location rather than a location_t, via the gimple stmt.
877 * profile.c (read_profile_edge_counts): Updates call to
878 dump_printf_loc to pass in a dump_location_t rather than a
880 (compute_branch_probabilities): Likewise.
881 * selftest-run-tests.c (selftest::run_tests): Call
883 * selftest.h (dumpfile_c_tests): New decl.
884 * tree-loop-distribution.c (pass_loop_distribution::execute):
885 Update for change in return type of find_loop_location.
886 * tree-parloops.c (parallelize_loops): Likewise.
887 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
888 "locus" from location_t to dump_user_location_t.
889 (canonicalize_loop_induction_variables): Likewise.
890 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
891 for change in return type of find_loop_location.
892 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
893 to dump_printf_loc to pass in a dump_location_t rather than a
894 location_t, via the stmt.
895 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
897 * tree-vect-loop-manip.c (find_loop_location): Convert return
898 type from source_location to dump_user_location_t.
899 (vect_do_peeling): Update for above change.
900 (vect_loop_versioning): Update for change in type of
902 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
903 from location_t to dump_user_location_t.
904 (vect_estimate_min_profitable_iters): Update for change in type
906 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
907 location_t to dump_location_t.
908 (vect_slp_bb): Update for change in type of vect_location.
909 * tree-vectorizer.c (vect_location): Convert from source_location
910 to dump_user_location_t.
911 (try_vectorize_loop_1): Update for change in vect_location's type.
912 (vectorize_loops): Likewise.
913 (increase_alignment): Likewise.
914 * tree-vectorizer.h (vect_location): Convert from source_location
915 to dump_user_location_t.
916 (find_loop_location): Convert return type from source_location to
917 dump_user_location_t.
918 (check_reduction_path): Convert 1st param from location_t to
919 dump_user_location_t.
920 * value-prof.c (check_counter): Update call to dump_printf_loc to
921 pass in a dump_user_location_t rather than a location_t; update
922 call to error_at for change in type of "locus".
923 (check_ic_target): Update call to dump_printf_loc to
924 pass in a dump_user_location_t rather than a location_t, via the
927 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
929 * config/s390/s390.h (enum processor_flags): Do not use
930 default tune parameter when -march was specified.
932 2018-06-26 Jakub Jelinek <jakub@redhat.com>
935 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
936 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
939 2018-06-26 Richard Biener <rguenther@suse.de>
941 PR tree-optimization/86287
943 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
944 (vect_analyze_loop): Initialize n_stmts.
946 2018-06-26 Richard Biener <rguenther@suse.de>
949 * fold-const.c (fold_convertible_p): Pointer extension
952 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
955 * dwarf2out.c (loc_list_has_views): Adjust comments.
956 (dw_loc_list): Split single cross-partition range with
959 2018-06-25 Jeff Law <law@redhat.com>
961 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
962 on -mbig-switch by default.
964 * config/v850/predicates.md (const_float_1_operand): Fix match_code
966 (const_float_0_operand): Remove unused predicate.
967 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
968 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
969 (recipsf2): New expander. Original pattern now called
971 (recipdf2, recipdf2_insn): Similarly.
972 (rsqrtsf2, rsqrtsf2_insn): Similarly
973 (rsqrtdf2, rsqrtdf2_insn): Similarly
975 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
977 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
978 Simplify logic for FreeBSD (twice).
980 2018-06-25 Martin Sebor <msebor@redhat.com>
982 PR tree-optimization/86204
983 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
984 a strnlen result if it's less than the length of the string.
986 2018-06-25 Martin Sebor <msebor@redhat.com>
988 PR tree-optimization/85700
989 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
990 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
991 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
993 2018-06-25 Martin Sebor <msebor@redhat.com>
995 * doc/extend.texi (Zero-length arrays): Update and clarify.
997 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
999 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
1000 added IEEE/IBM long double multilib support on PowerPC little
1001 endian Linux systems.
1002 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
1003 (MULTILIB_DEFAULTS): Likewise.
1004 * config/rs6000/rs6000.c (rs6000_option_override_internal):
1006 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
1007 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
1008 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
1010 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
1013 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
1014 (REORDER_45): Likewise.
1016 2018-06-25 Jeff Law <law@redhat.com>
1018 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
1019 dividend to 32 bits. Adjust length.
1020 (udivmodhi4): Cleanup output template. Fix length.
1022 2018-06-25 Carl Love <cel@us.ibm.com>
1024 * config/rs6000/vsx.md: Change word selector to prefered location.
1026 2018-06-25 Richard Biener <rguenther@suse.de>
1028 PR tree-optimization/86304
1029 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
1030 epilogue-if-converted loops as well.
1032 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
1034 * lto-section-out.c (lto_begin_section): Do not print section
1035 name for noaddr and unnumbered dumps.
1037 2018-06-25 Richard Biener <rguenther@suse.de>
1039 * tree-vectorizer.h (struct vec_info_shared): New structure
1040 with parts split out from struct vec_info and loop_nest from
1041 struct _loop_vec_info.
1042 (struct vec_info): Adjust accordingly.
1043 (struct _loop_vec_info): Likewise.
1044 (LOOP_VINFO_LOOP_NEST): Adjust.
1045 (LOOP_VINFO_DATAREFS): Likewise.
1046 (LOOP_VINFO_DDRS): Likewise.
1047 (struct _bb_vec_info): Likewise.
1048 (BB_VINFO_DATAREFS): Likewise.
1049 (BB_VINFO_DDRS): Likewise.
1050 (struct _stmt_vec_info): Add dr_aux member.
1051 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
1052 (DR_MISALIGNMENT_UNINITIALIZED): New.
1053 (set_dr_misalignment): Adjust.
1054 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
1055 (vect_analyze_loop): Adjust prototype.
1056 (vect_analyze_loop_form): Likewise.
1057 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
1058 Compute dependences lazily.
1059 (vect_record_base_alignments): Use shared datarefs/ddrs.
1060 (vect_verify_datarefs_alignment): Likewise.
1061 (vect_analyze_data_refs_alignment): Likewise.
1062 (vect_analyze_data_ref_accesses): Likewise.
1063 (vect_analyze_data_refs): Likewise.
1064 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
1065 constructor parameter for shared part.
1066 (vect_analyze_loop_form): Pass in shared part and adjust.
1067 (vect_analyze_loop_2): Pass in storage for the number of
1068 stmts. Move loop nest finding to the caller. Compute
1070 (vect_analyze_loop): Pass in shared part.
1071 (vect_transform_loop): Verify shared datarefs are unchanged.
1072 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
1073 constructor parameter for shared part.
1074 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
1075 (vect_slp_bb): Verify shared datarefs are unchanged before
1077 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
1079 (new_stmt_vec_info): Initialize DR_AUX misalignment to
1080 DR_MISALIGNMENT_UNINITIALIZED.
1081 * tree-vectorizer.c (vec_info::vec_info): Add constructor
1082 parameter for shared part.
1083 (vec_info::~vec_info): Adjust.
1084 (vec_info_shared::vec_info_shared): New.
1085 (vec_info_shared::~vec_info_shared): Likewise.
1086 (vec_info_shared::save_datarefs): Likewise.
1087 (vec_info_shared::check_datarefs): Likewise.
1088 (try_vectorize_loop_1): Construct shared part live for analyses
1089 of a single loop for multiple vector sizes.
1090 * tree-parloops.c (gather_scalar_reductions): Adjust.
1092 2018-06-25 Richard Biener <rguenther@suse.de>
1094 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
1095 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
1096 (vect_analyze_data_refs): Remove similar code from here and
1097 simplify accordingly.
1099 2018-06-25 Richard Biener <rguenther@suse.de>
1101 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
1102 for reverse storage order accesses rather than asserting
1103 they cannot happen here.
1105 2018-06-25 Tom de Vries <tdevries@suse.de>
1108 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
1109 Use data16 instead of .byte for insn prefix.
1111 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
1114 * parser.c (make_char_string_pack): Pass this literal chars
1115 through cpp_interpret_string.
1116 (cp_parser_userdef_numeric_literal): Check the result of
1117 make_char_string_pack.
1119 2018-06-24 Maya Rashish <coypu@sdf.org>
1121 * ginclude/stddef.h: Simplify conditions around avoiding
1122 re-definition of __size_t.
1124 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
1126 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
1127 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
1129 2018-06-22 Maya Rashish <coypu@sdf.org>
1131 * doc/invoke.texi (mno-fancy-math-387): Update for changes
1132 made to OpenBSD and NetBSD through the years.
1134 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
1136 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
1137 behavior of vec_pack (vector double, vector double) to match
1138 behavior of vec_float2 (vector double, vector double).
1140 2018-06-22 Olivier Hainque <hainque@adacore.com>
1142 * gimplify.c (gimplify_function_tree): Prevent creation
1143 of a trampoline for the address of the current function
1144 passed to entry/exit instrumentation hooks.
1146 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
1149 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
1152 2018-06-22 Martin Liska <mliska@suse.cz>
1154 PR tree-optimization/86263
1155 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1156 Bail out if is_enabled is false.
1157 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
1159 (jump_table_cluster::is_enabled): New function.
1161 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
1163 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1164 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
1165 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
1166 (lto_input_ts_binfo_tree_pointers): Likewise.
1167 * tree-streamer-out.c (streamer_write_tree_bitfields,
1168 write_ts_binfo_tree_pointers): Likewise.
1169 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
1171 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
1173 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
1175 2018-06-22 Martin Liska <mliska@suse.cz>
1177 * symbol-summary.h (get): Make it pure and inline move
1178 functionality from ::get function.
1179 (get): Remove and inline into ::get and ::get_create.
1180 (get_create): Move code from ::get function.
1182 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1185 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
1186 -x assembler-with-cpp.
1188 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1190 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
1191 _FILE_OFFSET_BITS=64 for C++.
1193 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
1195 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
1196 conversion insn that shows up when pr85657-3.c is compiled using
1197 IEEE 128-bit long double.
1198 (neg<mode>2_internal): Use the correct mode to check whether the
1199 mode is IBM extended.
1200 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
1201 multiply and divide external functions from being created more
1204 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
1206 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
1208 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
1209 the edge can be forwarded.
1210 (cfg_layout_merge_blocks): Likewise.
1212 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
1214 * except.c (finish_eh_generation): Commit edge insertions only after
1215 the EH edges have been redirected from post-landing to landing pads.
1217 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
1219 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
1220 create_tmp_var_for to create the FRAME decl.
1221 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
1223 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
1225 * tree-inline.c (copy_edges_for_bb): Minor tweak.
1226 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
1227 debug statement when resetting its value.
1228 (expand_call_inline): Copy the locus of the call onto the assignment
1229 of the return value, if any. Use local variable in more cases.
1231 2018-06-21 Martin Liska <mliska@suse.cz>
1233 * ipa-pure-const.c (propagate_nothrow): Use
1234 funct_state_summaries->get.
1235 (dump_malloc_lattice): Likewise.
1236 (propagate_malloc): Likewise.
1238 2018-06-21 Richard Biener <rguenther@suse.de>
1240 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
1241 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
1242 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
1244 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
1245 BLOCK_ABSTRACT_ORIGIN unconditionally.
1247 2018-06-21 David Malcolm <dmalcolm@redhat.com>
1249 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
1251 * ipa-reference.c (ipa_reference_c_finalize): Delete
1252 ipa_ref_opt_sum_summaries and set it to NULL.
1254 2018-06-21 Tom de Vries <tdevries@suse.de>
1256 PR tree-optimization/85859
1257 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
1258 test with comment from bb_no_side_effects_p.
1260 2018-06-21 Richard Biener <rguenther@suse.de>
1262 PR tree-optimization/86232
1263 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
1264 max for constant niter.
1266 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1268 * config/aarch64/aarch64-simd.md
1269 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
1271 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1273 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
1274 Make opernads of the unspec commutative.
1276 2018-06-21 Richard Biener <rguenther@suse.de>
1278 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
1279 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
1280 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
1281 (vect_analyze_data_ref_dependence): Re-order checks to deal with
1283 (vect_record_base_alignments): Do not record base alignment
1284 for gathers or scatters.
1285 (vect_compute_data_ref_alignment): Drop return value that is always
1286 true. Bail out early for gathers or scatters.
1287 (vect_enhance_data_refs_alignment): Bail out early for gathers
1289 (vect_find_same_alignment_drs): Likewise.
1290 (vect_analyze_data_refs_alignment): Remove dead code.
1291 (vect_slp_analyze_and_verify_node_alignment): Likewise.
1292 (vect_analyze_data_refs): For possible gathers or scatters do
1293 not create an alternate DR, just check their possible validity
1294 and mark them. Adjust DECL_NONALIASED handling to not rely
1296 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
1297 update inits of gathers or scatters.
1298 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
1299 Also copy gather/scatter flag to pattern vinfo.
1301 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
1303 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
1304 behavior of vec_packsu (vector unsigned long long, vector unsigned
1305 long long) to match behavior of vec_packs with same signature.
1307 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1308 Thomas Schwinge <thomas@codesourcery.com>
1309 Cesar Philippidis <cesar@codesourcery.com>
1311 * gimplify.c (gimplify_scan_omp_clauses): Add support for
1312 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1313 (gimplify_adjust_omp_clauses): Likewise.
1314 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
1315 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
1316 (gimplify_omp_target_update): Update handling of acc update and
1318 * omp-low.c (install_var_field): Remove unused parameter
1319 base_pointers_restrict.
1320 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
1321 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
1323 (omp_target_base_pointers_restrict_p): Delete.
1324 (scan_omp_target): Update call to scan_sharing_clauses.
1325 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
1327 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1328 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1329 (convert_local_omp_clauses): Likewise.
1330 * tree-pretty-print.c (dump_omp_clause): Likewise.
1331 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
1333 (omp_clause_code_name): Likewise.
1335 2018-06-20 Jakub Jelinek <jakub@redhat.com>
1338 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
1341 PR tree-optimization/86231
1342 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
1343 anti-range don't overwrite *vr0min before using it to compute *vr0max.
1345 2018-06-20 Tom de Vries <tdevries@suse.de>
1347 PR tree-optimization/86097
1348 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
1349 iv type if signedness of iv type is not the same as that of *nit.
1351 2018-06-20 Jakub Jelinek <jakub@redhat.com>
1353 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
1354 EDGE_EH edges, verify they are all EDGE_EH.
1356 2018-06-20 Maya Rashish <coypu@sdf.org>
1358 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
1360 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1362 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
1363 * config/aarch64/aarch64.c (xgene1_tunings): Add
1364 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
1365 (aarch64_mode_valid_for_sched_fusion_p):
1366 Allow 16-byte modes.
1367 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
1368 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
1370 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
1372 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
1373 * config/aarch64/iterators.md (VQ2): New mode iterator.
1375 2018-06-20 Martin Liska <mliska@suse.cz>
1377 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1378 Change default ratio from 10 to 8.
1380 2018-06-20 Martin Liska <mliska@suse.cz>
1382 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1384 (bit_test_cluster::find_bit_tests): Likewise.
1385 (switch_decision_tree::analyze_switch_statement): Find clusters.
1386 * tree-switch-conversion.h (struct jump_table_cluster): Document
1389 2018-06-20 Martin Liska <mliska@suse.cz>
1391 * tree-switch-conversion.c (switch_conversion::collect):
1392 Record m_uniq property.
1393 (switch_conversion::expand): Bail out for special conditions.
1394 (group_cluster::~group_cluster): New.
1395 (group_cluster::group_cluster): Likewise.
1396 (group_cluster::dump): Likewise.
1397 (jump_table_cluster::emit): New.
1398 (switch_decision_tree::fix_phi_operands_for_edges): New.
1399 (struct case_node): Remove struct.
1400 (jump_table_cluster::can_be_handled): New.
1401 (case_values_threshold): Moved to header.
1402 (reset_out_edges_aux): Likewise.
1403 (jump_table_cluster::is_beneficial): New.
1404 (bit_test_cluster::can_be_handled): Likewise.
1405 (add_case_node): Remove.
1406 (bit_test_cluster::is_beneficial): New.
1407 (case_bit_test::cmp): New.
1408 (bit_test_cluster::emit): New.
1409 (expand_switch_as_decision_tree_p): Remove.
1410 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
1411 (fix_phi_operands_for_edge): Likewise.
1412 (switch_decision_tree::analyze_switch_statement): New.
1413 (compute_cases_per_edge): Move ...
1414 (switch_decision_tree::compute_cases_per_edge): ... here.
1415 (try_switch_expansion): Likewise.
1416 (switch_decision_tree::try_switch_expansion): Likewise.
1417 (record_phi_operand_mapping): Likewise.
1418 (switch_decision_tree::record_phi_operand_mapping): Likewise.
1419 (emit_case_decision_tree): Likewise.
1420 (switch_decision_tree::emit): Likewise.
1421 (balance_case_nodes): Likewise.
1422 (switch_decision_tree::balance_case_nodes): Likewise.
1423 (dump_case_nodes): Likewise.
1424 (switch_decision_tree::dump_case_nodes): Likewise.
1425 (emit_jump): Likewise.
1426 (switch_decision_tree::emit_jump): Likewise.
1427 (emit_cmp_and_jump_insns): Likewise.
1428 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
1429 (emit_case_nodes): Likewise.
1430 (switch_decision_tree::emit_case_nodes): Likewise.
1431 (conditional_probability): Remove.
1432 * tree-switch-conversion.h (enum cluster_type): New.
1434 (struct cluster): Likewise.
1435 (cluster::cluster): Likewise.
1436 (struct simple_cluster): Likewise.
1437 (simple_cluster::simple_cluster): Likewise.
1438 (struct group_cluster): Likewise.
1439 (struct jump_table_cluster): Likewise.
1440 (struct bit_test_cluster): Likewise.
1441 (struct min_cluster_item): Likewise.
1442 (struct case_tree_node): Likewise.
1443 (case_tree_node::case_tree_node): Likewise.
1444 (jump_table_cluster::case_values_threshold): Likewise.
1445 (struct case_bit_test): Likewise.
1446 (struct switch_decision_tree): Likewise.
1447 (struct switch_conversion): Likewise.
1448 (switch_decision_tree::reset_out_edges_aux): Likewise.
1450 2018-06-20 Martin Liska <mliska@suse.cz>
1452 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
1453 (hoist_edge_and_branch_if_true): Likewise.
1454 (expand_switch_using_bit_tests_p): Likewise.
1455 (struct case_bit_test): Likewise.
1456 (case_bit_test_cmp): Likewise.
1457 (emit_case_bit_tests): Likewise.
1458 (switch_conversion::switch_conversion): New class.
1459 (struct switch_conv_info): Remove old struct.
1460 (collect_switch_conv_info): More to ...
1461 (switch_conversion::collect): ... this.
1462 (check_range): Likewise.
1463 (switch_conversion::check_range): Likewise.
1464 (check_all_empty_except_final): Likewise.
1465 (switch_conversion::check_all_empty_except_final): Likewise.
1466 (check_final_bb): Likewise.
1467 (switch_conversion::check_final_bb): Likewise.
1468 (create_temp_arrays): Likewise.
1469 (switch_conversion::create_temp_arrays): Likewise.
1470 (free_temp_arrays): Likewise.
1471 (gather_default_values): Likewise.
1472 (switch_conversion::gather_default_values): Likewise.
1473 (build_constructors): Likewise.
1474 (switch_conversion::build_constructors): Likewise.
1475 (constructor_contains_same_values_p): Likewise.
1476 (switch_conversion::contains_same_values_p): Likewise.
1477 (array_value_type): Likewise.
1478 (switch_conversion::array_value_type): Likewise.
1479 (build_one_array): Likewise.
1480 (switch_conversion::build_one_array): Likewise.
1481 (build_arrays): Likewise.
1482 (switch_conversion::build_arrays): Likewise.
1483 (gen_def_assigns): Likewise.
1484 (switch_conversion::gen_def_assigns): Likewise.
1485 (prune_bbs): Likewise.
1486 (switch_conversion::prune_bbs): Likewise.
1487 (fix_phi_nodes): Likewise.
1488 (switch_conversion::fix_phi_nodes): Likewise.
1489 (gen_inbound_check): Likewise.
1490 (switch_conversion::gen_inbound_check): Likewise.
1491 (process_switch): Use the newly created class.
1492 (switch_conversion::expand): New.
1493 (switch_conversion::~switch_conversion): New.
1494 * tree-switch-conversion.h: New file.
1496 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1498 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
1499 tree-vect-patterns.c.
1500 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
1501 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
1502 (vect_recog_sad_pattern): Likewise.
1503 (vect_recog_widen_sum_pattern): Likewise.
1504 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
1505 (vect_recog_widen_shift_pattern): Remove the type_in argument.
1506 (vect_recog_rotate_pattern): Likewise.
1507 (vect_recog_mult_pattern): Likewise.
1508 (vect_recog_vector_vector_shift_pattern): Likewise.
1509 (vect_recog_divmod_pattern): Likewise.
1510 (vect_recog_mixed_size_cond_pattern): Likewise.
1511 (vect_recog_bool_pattern): Likewise.
1512 (vect_recog_mask_conversion_pattern): Likewise.
1513 (vect_try_gather_scatter_pattern): Likewise.
1514 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
1515 (vect_recog_over_widening_pattern): Likewise.
1516 (vect_recog_gather_scatter_pattern): Likewise.
1517 (vect_recog_func_ptr): Move from tree-vectorizer.h
1518 (vect_vect_recog_func_ptrs): Move further down the file.
1519 (vect_recog_func): Likewise. Remove the third argument.
1520 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
1521 (vect_pattern_recog_1): Expect the pattern function to do any
1522 necessary target tests. Also expect it to provide a vector type.
1523 Remove the type_in handling.
1525 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1527 * tree-vect-patterns.c (vect_pattern_detected): New function.
1528 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
1529 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
1530 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
1531 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
1532 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1533 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1534 (vect_recog_mask_conversion_pattern)
1535 (vect_try_gather_scatter_pattern): Likewise.
1537 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1539 * tree-vect-patterns.c (vect_get_internal_def): New function.
1540 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1541 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
1542 (search_type_for_mask_1): Use it.
1544 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1546 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
1547 redundant WIDEN_SUM_EXPR handling.
1548 (vect_recog_sad_pattern): Likewise.
1550 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1552 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
1553 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
1554 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
1555 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
1556 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
1558 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1560 * tree-vect-stmts.c (vectorizable_call): Make sure that we
1561 use the stmt_vec_info of the original bb statement for the
1562 new zero assignment, even if the call is part of a pattern.
1564 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1566 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
1567 that the sequence is attached to the original statement rather
1568 than the pattern statement.
1569 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
1570 PATTERN_DEF_SEQ from the original statement rather than
1571 the main pattern statement.
1572 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
1573 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
1574 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
1576 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
1578 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
1579 definition statements before the early exit for statements that aren't
1581 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
1583 (vect_transform_loop): ...here. Process pattern definition
1584 statements without first checking whether the main pattern
1585 statement is live or relevant.
1587 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
1589 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
1590 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
1592 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
1594 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
1595 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
1596 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
1597 (expand_block_compare): Change select_block_compare_mode call.
1598 (expand_strncmp_align_check): Use new functions, fix comment.
1599 (emit_final_str_compare_gpr): New function.
1600 (expand_strn_compare): Refactor and clean up code.
1601 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
1603 2018-06-19 Tony Reix <tony.reix@atos.com>
1604 Damien Bergamini <damien.bergamini@atos.com>
1605 David Edelsohn <dje.gcc@gmail.com>
1607 * collect2.c (static_obj): New variable.
1608 (static_libs): New variable.
1609 (is_in_list): Uncomment declaration.
1610 (main): Track AIX libraries linked statically.
1611 (is_in_list): Uncomment definition.
1612 (scan_prog_file): Don't add AIX shared libraries initializer
1613 to constructor list if linking statically.
1615 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
1617 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
1619 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
1621 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
1623 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
1626 2018-06-19 Martin Liska <mliska@suse.cz>
1628 * config/i386/i386.c (ix86_can_inline_p): Do not use
1629 ipa_fn_summaries::get_create.
1630 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
1632 (devirtualization_time_bonus): Likewise.
1633 (ipcp_propagate_stage): Likewise.
1634 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
1635 (edge_set_predicate): Likewise.
1636 (evaluate_conditions_for_known_args): Likewise.
1637 (evaluate_properties_for_edge): Likewise.
1638 (ipa_call_summary::reset): Tranform to ...
1639 (ipa_call_summary::~ipa_call_summary): ... this.
1640 (ipa_fn_summary::reset): Transform to ...
1641 (ipa_fn_summary::~ipa_fn_summary): ... this.
1642 (ipa_fn_summary_t::remove): Rename to ...
1643 (ipa_fn_summary_t::remove_callees): ... this.
1644 (ipa_fn_summary_t::duplicate): Use placement new
1645 instead of memory copy.
1646 (ipa_call_summary_t::duplicate): Likewise.
1647 (ipa_call_summary_t::remove): Remove.
1648 (dump_ipa_call_summary): Change get_create to get.
1649 (ipa_dump_fn_summary): Dump only when summary exists.
1650 (analyze_function_body): Use symbol_summary::get instead
1652 (compute_fn_summary): Likewise.
1653 (estimate_edge_devirt_benefit): Likewise.
1654 (estimate_edge_size_and_time): Likewise.
1655 (inline_update_callee_summaries): Likewise.
1656 (remap_edge_change_prob): Likewise.
1657 (remap_edge_summaries): Likewise.
1658 (ipa_merge_fn_summary_after_inlining): Likewise.
1659 (write_ipa_call_summary): Likewise.
1660 (ipa_fn_summary_write): Likewise.
1661 (ipa_free_fn_summary): Likewise.
1662 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
1663 (struct ipa_call_summary): Likewise.
1664 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
1666 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
1667 (estimate_size_after_inlining): Likewise.
1668 (estimate_growth): Likewise.
1669 (growth_likely_positive): Likewise.
1670 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
1671 (inline_call): Likewise.
1672 * ipa-inline.c (caller_growth_limits): Likewise.
1673 (can_inline_edge_p): Likewise.
1674 (can_inline_edge_by_limits_p): Likewise.
1675 (compute_uninlined_call_time): Likewise.
1676 (compute_inlined_call_time): Likewise.
1677 (want_inline_small_function_p): Likewise.
1678 (edge_badness): Likewise.
1679 (update_caller_keys): Likewise.
1680 (update_callee_keys): Likewise.
1681 (inline_small_functions): Likewise.
1682 (inline_to_all_callers_1): Likewise.
1683 (dump_overall_stats): Likewise.
1684 (early_inline_small_functions): Likewise.
1685 (early_inliner): Likewise.
1686 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
1687 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1688 * ipa-pure-const.c (malloc_candidate_p): Likewise.
1689 * ipa-split.c (execute_split_functions): Likewise.
1690 * symbol-summary.h: Likewise.
1691 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
1693 2018-06-19 Richard Biener <rguenther@suse.de>
1695 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
1696 (vectorize_loops): ... here. Fix dbgcnt handling.
1697 (try_vectorize_loop): Wrap try_vectorize_loop_1.
1699 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
1702 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
1703 ieee128 argument takes up only one (vector) register, not two (floating
1706 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
1708 * gimplify.c (gimplify_init_constructor): Really never clear for an
1709 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
1711 2018-06-19 Richard Biener <rguenther@suse.de>
1713 PR tree-optimization/86179
1714 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
1715 after failed recognition.
1717 2018-06-18 Martin Sebor <msebor@redhat.com>
1720 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
1721 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
1722 Handle integer subtraction.
1723 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
1724 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
1726 2018-06-18 David Malcolm <dmalcolm@redhat.com>
1728 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
1729 param from rtx to rtx_insn *.
1730 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
1732 (frv_ifcvt_modify_insn): Likwise.
1733 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
1734 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
1735 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
1736 as_a <rtx_insn *> cast to local "unprotected_region" once
1737 it's been established that it's not NULL or pc_rtx.
1738 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
1739 param "sethi" from rtx to rtx_insn *.
1740 (nds32_group_float_insns): Likewise for param "insn".
1741 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
1743 (vax_output_int_subtract): Likewise.
1744 * config/vax/vax.c (vax_output_int_add): Likewise for param
1746 (vax_output_int_subtract): Likewise.
1747 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
1748 (emit_pattern_after): Likewise for param "after".
1749 (emit_insn_after): Likewise.
1750 (emit_jump_insn_after): Likewise.
1751 (emit_call_insn_after): Likewise.
1752 (emit_debug_insn_after): Likewise.
1753 (emit_pattern_before): Likewise for param "before".
1754 (emit_insn_before): Likewise.
1755 (emit_jump_insn_before): Likewise.
1756 * final.c (get_insn_template): Likewise for param "insn", removing
1758 * output.h (get_insn_template): Likewise for 2nd param.
1759 * rtl.h (emit_insn_before): Likewise.
1760 (emit_jump_insn_before): Likewise.
1761 (emit_debug_insn_before_noloc): Likewise.
1762 (emit_insn_after): Likewise.
1763 (emit_jump_insn_after): Likewise.
1764 (emit_call_insn_after): Likewise.
1765 (emit_debug_insn_after): Likewise.
1766 (set_insn_deleted): Likewise for param.
1768 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
1771 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
1772 floating point modes, so that IFmode is numerically greater than
1773 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
1774 to declare the ordering. This prevents IFmode from being
1775 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
1776 machine. Include rs6000-modes.h to share the fractional values
1777 between genmodes* and the rest of the compiler.
1781 * config/rs6000/rs6000-modes.h: New file.
1782 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
1783 meaning of rs6000_long_double_size so that 126..128 selects an
1784 appropriate 128-bit floating point type.
1785 (rs6000_option_override_internal): Likewise.
1786 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
1787 (TARGET_LONG_DOUBLE_128): Change the meaning of
1788 rs6000_long_double_size so that 126..128 selects an appropriate
1789 128-bit floating point type.
1790 (LONG_DOUBLE_TYPE_SIZE): Update comment.
1791 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
1792 source and destination to match the standard usage.
1793 (truncifkf2): Likewise.
1794 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
1795 ISA 2.07 to use an explicit clobber, instead of passing in a
1797 (copysign<mode>3_soft): Likewise.
1799 2018-06-18 David Malcolm <dmalcolm@redhat.com>
1801 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
1802 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
1803 (vect_slp_analyze_instance_dependence): Likewise.
1804 (vect_enhance_data_refs_alignment): Likewise.
1805 (vect_analyze_data_refs_alignment): Likewise.
1806 (vect_slp_analyze_and_verify_instance_alignment
1807 (vect_analyze_data_ref_accesses): Likewise.
1808 (vect_prune_runtime_alias_test_list): Likewise.
1809 (vect_analyze_data_refs): Likewise.
1810 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
1811 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
1812 (vect_analyze_scalar_cycles_1): Likewise.
1813 (vect_get_loop_niters): Likewise.
1814 (vect_analyze_loop_form_1): Likewise.
1815 (vect_update_vf_for_slp): Likewise.
1816 (vect_analyze_loop_operations): Likewise.
1817 (vect_analyze_loop): Likewise.
1818 (vectorizable_induction): Likewise.
1819 (vect_transform_loop): Likewise.
1820 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
1821 * tree-vect-slp.c (vect_analyze_slp): Likewise.
1822 (vect_make_slp_decision): Likewise.
1823 (vect_detect_hybrid_slp): Likewise.
1824 (vect_slp_analyze_operations): Likewise.
1825 (vect_slp_bb): Likewise.
1826 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
1827 (vectorizable_bswap): Likewise.
1828 (vectorizable_call): Likewise.
1829 (vectorizable_simd_clone_call): Likewise.
1830 (vectorizable_conversion): Likewise.
1831 (vectorizable_assignment): Likewise.
1832 (vectorizable_shift): Likewise.
1833 (vectorizable_operation): Likewise.
1834 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
1836 2018-06-18 Martin Sebor <msebor@redhat.com>
1838 PR tree-optimization/81384
1839 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
1840 * builtins.c (expand_builtin_strnlen): New function.
1841 (expand_builtin): Call it.
1842 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
1843 * builtins.def (BUILT_IN_STRNLEN): New.
1844 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
1845 Warn for bounds in excess of maximum object size.
1846 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
1847 single-value ranges. Handle strnlen.
1848 (handle_builtin_strlen): Handle strnlen.
1849 (strlen_check_and_optimize_stmt): Same.
1850 * doc/extend.texi (Other Builtins): Document strnlen.
1852 2018-06-18 Maya Rashish <coypu@sdf.org>
1854 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
1855 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
1856 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
1858 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
1860 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
1862 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1864 * tree.c (escaped_string::escape): Replace cast to char * by
1865 const_cast<char *> (unescaped).
1867 2018-06-18 Nick Clifton <nickc@redhat.com>
1870 * tree.c (escaped_string): New class. Converts an unescaped
1871 string into its escaped equivalent.
1872 (warn_deprecated_use): Use the new class to convert the
1873 deprecation message, if present.
1874 (test_escaped_strings): New self test.
1875 (test_c_tests): Add test_escaped_strings.
1876 * doc/extend.texi (deprecated): Add a note that the
1877 deprecation message is affected by the -fmessage-length
1878 option, and that control characters will be escaped.
1879 (#pragma GCC error): Document this pragma.
1880 (#pragma GCC warning): Likewise.
1881 * doc/invoke.texi (-fmessage-length): Document this option's
1882 effect on the #warning and #error preprocessor directives and
1883 the deprecated attribute.
1885 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
1887 * tree.c (decl_value_expr_lookup): Revert latest change.
1888 (decl_value_expr_insert): Likewise.
1890 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
1892 * gimplify.c (nonlocal_vlas): Delete.
1893 (nonlocal_vla_vars): Likewise.
1894 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
1896 (gimplify_body): Do not create and destroy nonlocal_vlas.
1897 * tree-nested.c: Include diagnostic.h.
1898 (use_pointer_in_frame): Tweak.
1899 (lookup_field_for_decl): Add assertion and declare the transformation.
1900 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
1901 internal error when the reference is in a wrong context. Do not
1902 create a debug decl by default.
1903 (note_nonlocal_block_vlas): Delete.
1904 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
1905 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
1906 create a debug decl by default.
1907 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
1908 call is in a wrong context.
1909 (fixup_vla_decls): New function.
1910 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
1911 debug variables were created.
1912 * tree.c (decl_value_expr_lookup): Add checking assertion.
1913 (decl_value_expr_insert): Likewise.
1915 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1918 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
1919 * tree-scalar-evolution.c (interpret_expr): Likewise.
1920 (expression_expensive_p): Likewise.
1921 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
1922 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
1923 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
1924 (ssa_defined_by_minus_one_stmt_p): New.
1926 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1929 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
1930 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
1931 * dojump.c (do_jump): Likewise.
1932 * expr.c (expand_expr_real_2): Check operand type's sign.
1933 * fold-const.c (const_unop): Handle ABSU_EXPR.
1934 (fold_abs_const): Likewise.
1935 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
1936 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
1937 (strip_sign_op_1): Likesise.
1938 * match.pd: Add new pattern to generate ABSU_EXPR.
1939 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
1940 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
1941 * tree-eh.c (operation_could_trap_helper_p): Likewise.
1942 * tree-inline.c (estimate_operator_cost): Likewise.
1943 * tree-pretty-print.c (dump_generic_node): Likewise.
1944 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
1945 * tree.def (ABSU_EXPR): New.
1947 2018-06-16 Jakub Jelinek <jakub@redhat.com>
1950 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
1951 documented as preserved for backward compatibility only.
1952 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
1954 PR rtl-optimization/86108
1955 * bb-reorder.c (create_forwarder_block): Renamed to ...
1956 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
1957 jump from new landing pad to the second part.
1958 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
1961 2018-06-15 Jakub Jelinek <jakub@redhat.com>
1964 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
1965 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
1966 Only call store_expr for halves if the mode is the same.
1969 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
1970 Fix up comment formatting.
1972 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
1974 * typed-splay-tree.h (typed_splay_tree::remove): New function.
1975 (typed_splay_tree::closure,
1976 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
1977 (typed_splay_tree::typed_splay_tree,
1978 typed_splay_tree::operator =): Declared private.
1979 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
1980 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
1981 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
1982 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
1983 typed_splay_tree::splay_tree_splay,
1984 typed_splay_tree::splay_tree_foreach_helper,
1985 typed_splay_tree::splay_tree_insert,
1986 typed_splay_tree::splay_tree_remove,
1987 typed_splay_tree::splay_tree_lookup,
1988 typed_splay_tree::splay_tree_predecessor,
1989 typed_splay_tree::splay_tree_successor,
1990 typed_splay_tree::splay_tree_min,
1991 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
1992 (typed_splay_tree::root, typed_splay_tree::comp,
1993 typed_splay_tree::delete_key,
1994 typed_splay_tree::delete_value): New data members.
1995 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
1996 typed_splay_tree::remove.
1998 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
2000 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
2001 -mginv and -mno-ginv to the assembler.
2002 * config/mips/mips.opt (-mcrc): New option.
2004 * doc/invoke.text (-mcrc): Document.
2007 2018-06-15 Nick Clifton <nickc@redhat.com>
2010 * tree.c (escaped_string): New class. Converts an unescaped
2011 string into its escaped equivalent.
2012 (warn_deprecated_use): Use the new class to convert the
2013 deprecation message, if present.
2014 (test_escaped_strings): New self test.
2015 (test_c_tests): Add test_escaped_strings.
2016 * doc/extend.texi (deprecated): Add a note that the
2017 deprecation message is affected by the -fmessage-length
2018 option, and that control characters will be escaped.
2019 (#pragma GCC error): Document this pragma.
2020 (#pragma GCC warning): Likewise.
2021 * doc/invoke.texi (-fmessage-length): Document this option's
2022 effect on the #warning and #error preprocessor directives and
2023 the deprecated attribute.
2025 2018-06-15 Richard Biener <rguenther@suse.de>
2027 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
2028 here, also noting vector size used.
2029 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
2030 size used in MSG_OPTIMIZED_LOCATIONS dump.
2031 (pass_slp_vectorize::execute): Adjust.
2033 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
2036 * config/arc/arc.c (arc_return_address_register): Fix
2039 2018-06-15 Richard Biener <rguenther@suse.de>
2042 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
2043 leave useless conversion stripping to force_gimple_operand_gsi.
2044 (gimplify_build2): Likewise.
2045 (gimplify_build1): Likewise.
2047 2018-06-15 Richard Biener <rguenther@suse.de>
2050 * tree-cfg.c (move_stmt_op): unshare invariant addresses
2051 before adjusting their block.
2053 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
2055 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
2056 multilibs for *-*-rtems*.
2057 * config/riscv/t-rtems: New file.
2059 2018-06-14 Jakub Jelinek <jakub@redhat.com>
2062 * match.pd ((A +- CST1) +- CST2): Punt if last resort
2063 unsigned_type_for returns NULL.
2066 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
2067 subregs of multi-word pseudos unless the float mode has word size.
2069 2018-06-14 Richard Biener <rguenther@suse.de>
2072 * tree-vect-generic.c (build_word_mode_vector_type): Remove
2073 duplicate and harmful type_hash_canon.
2074 * tree.c (type_hash_canon): Assert we didn't find ourselves.
2076 2018-06-14 Richard Biener <rguenther@suse.de>
2079 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
2082 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2084 * config/rtems.h (STDINT_LONG32): Define.
2086 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
2087 Prachi Godbole <prachi.godbole@imgtec.com>
2089 * config/mips/mips-cpus.def: Define P6600.
2090 * config/mips/mips-tables.opt: Regenerate.
2091 * config/mips/mips.c (mips_ucbranch_type): New enum.
2092 (mips_rtx_cost_data): Add support for P6600.
2093 (mips_issue_rate): Likewise.
2094 (mips_multipass_dfa_lookahead): Likewise.
2095 (mips_avoid_hazard): Likewise.
2096 (mips_reorg_process_insns): Likewise.
2097 (mips_classify_branch_p6600): New function.
2098 * config/mips/mips.h (TUNE_P6600): New define.
2099 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
2100 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
2101 * config/mips/mips.md: Include p6600.md.
2102 (processor): Add p6600.
2103 * config/mips/p6600.md: New file.
2104 * doc/invoke.texi: Add p6600 to supported architectures.
2106 2018-06-13 Martin Sebor <msebor@redhat.com>
2108 PR tree-optimization/86114
2109 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
2111 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
2113 2018-06-13 Richard Biener <rguenther@suse.de>
2115 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
2116 Properly set vector type of the intermediate stmt.
2117 * tree-vect-stmts.c (vectorizable_operation): The destination
2118 var always has vectype_out type.
2120 2018-06-13 Jeff Law <law@redhat.com>
2122 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
2123 integer 0 for argument to print_rtl_with_bb.
2124 (rl78_reorg): Likewise.
2126 2018-06-13 David Malcolm <dmalcolm@redhat.com>
2128 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
2129 from rtx to rtx_insn *.
2130 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
2132 (add_sched_insns_for_speculation): Likewise for local "target",
2133 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
2134 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
2135 from rtx_insn ** to rtx_code_label **.
2136 (reorg_emit_nops): Likewise.
2137 (c6x_reorg): Likewise for local "call_labels".
2138 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
2140 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
2141 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
2142 the loops over LABEL_REFS.
2143 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
2145 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
2146 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
2147 (split_branches): Strengthen local "olabel" from rtx to
2148 rtx_insn *, adding a safe_as_a cast.
2149 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
2151 (add_insn_after): Likewise for first two params.
2152 (add_insn_before): Likewise.
2153 (remove_insn): Likewise for param.
2154 (emit_pattern_before_noloc): Likewise for second and third params.
2155 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
2156 (emit_call_insn_before_noloc): Likewise.
2157 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
2159 (emit_barrier_before): Likewise.
2160 (emit_label_before): Strengthen "label" param from "rtx" to
2161 "rtx_code_label *". Strengthen "before" param from "rtx" to
2163 (emit_insn_after_1): Strengthen "after" param from "rtx" to
2165 (emit_pattern_after_noloc): Likewise.
2166 (emit_insn_after_noloc): Likewise.
2167 (emit_jump_insn_after_noloc): Likewise.
2168 (emit_call_insn_after_noloc): Likewise.
2169 (emit_debug_insn_after_noloc): Likewise.
2170 (emit_barrier_after): Likewise.
2171 (emit_label_after): Likewise for both params.
2172 (emit_pattern_after_setloc): Likewise for "after" param. Convert
2173 "loc" param from "int" to "location_t".
2174 (emit_insn_after_setloc): Likewise.
2175 (emit_jump_insn_after_setloc): Likewise.
2176 (emit_call_insn_after_setloc): Likewise.
2177 (emit_debug_insn_after_setloc): Likewise.
2178 (emit_pattern_before_setloc): Likewise for "before" param. Convert
2179 "loc" param from "int" to "location_t".
2180 (emit_pattern_before): Convert NULL_RTX to NULL.
2181 (emit_insn_before_setloc): Convert "loc" param from "int" to
2183 (emit_jump_insn_before_setloc): Likewise.
2184 (emit_call_insn_before_setloc): Likewise.
2185 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
2186 rtx_insn *. Convert "loc" param from "int" to "location_t".
2187 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
2188 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
2189 Convert 3rd param from "int" to "location_t".
2190 (emit_barrier_before, emit_barrier_after, next_real_insn):
2191 Strengthen param from rtx to rtx_insn *.
2192 (emit_label_before): Strengthen 1st param from "rtx" to
2193 "rtx_code_label *". Strengthen 2nd param from "rtx" to
2195 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
2196 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
2197 Strengthen 2nd param from "rtx" to "rtx_insn *".
2198 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
2199 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
2200 Likewise. Convert 3rd param from "int" to "location_t".
2201 (emit_label_after): Strengthen 1st param from "rtx" to
2203 (next_real_insn, remove_insn): Strengthen param from "rtx" to
2205 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
2206 from "rtx" to "rtx_insn *".
2208 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
2210 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
2211 bodies streamed in with -Q.
2212 * dumpfile.c (dump_files): Add lto-stream-out dump file.
2213 * dumpfile.h (tree_dump_index): Add lto_stream_out.
2214 * gimple-streamer-out.c: Include gimple-pretty-print.h
2215 (output_bb): Dump stmts streamed.
2216 * lto-section-out.c: Include print-tree.h
2217 (lto_begin_section): Dump sections created.
2218 (lto_output_decl_index): Dump decl encoded.
2219 * lto-streamer-out.c: Include print-tree.h
2220 (create_output_block): Dump output block created.
2221 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
2222 (output_function): Dump function output.
2223 (output_constructor): Dump constructor streamed.
2224 (write_global_stream): Output indexes encoded.
2225 (produce_asm_for_decls): Dump streams encoded.
2226 * lto-streamer.c (streamer_dump_file): New global var.
2227 * lto-streamer.h (streamer_dump_file): Declare.
2228 * passes.c (ipa_write_summaries): Initialize streamer dump.
2229 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
2232 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
2235 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
2236 offsets for register save directives. Emit a second batch of save
2237 directives, if need be, when the function accesses prior frames.
2239 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2241 * config/arc/fpu.md (fmasf4): Force operand to register.
2242 (fnmasf4): Likewise.
2244 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2246 * config/arc/arc-protos.h (arc_pad_return): Remove.
2247 * config/arc/arc.c (machine_function): Remove force_short_suffix
2249 (arc_print_operand): Adjust printing of '&'.
2250 (arc_verify_short): Remove conditional printing of short suffix.
2251 (arc_final_prescan_insn): Remove reference to size_reason.
2252 (pad_return): New function.
2253 (arc_reorg): Call pad_return.
2254 (arc_pad_return): Remove.
2255 (arc_init_machine_status): Remove reference to force_short_suffix.
2256 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
2257 (attr length): When attribute iscompact is true force to 2
2258 regardless; in the case of maybe check if we want to force the
2259 instruction to have 4 bytes length.
2260 (nopv): Change it to generate 4 byte long nop as well.
2261 (blockage): New pattern.
2262 (simple_return): Remove call to arc_pad_return.
2263 (p_return_i): Likewise.
2265 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2267 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
2269 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2271 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
2274 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2276 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
2277 for ARC700 and ARCv2.
2279 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
2282 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
2283 operands[2] instead of operands[1].
2286 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
2288 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
2289 case, check whether the outer register overlaps an unallocatable
2290 register, not just whether it fits the required class.
2292 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
2294 * poly-int.h (can_div_trunc_p): Add new overload in which all values
2296 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
2297 (memrefs_conflict_p): Likewise.
2298 (init_alias_analysis): Likewise.
2299 * cfgexpand.c (expand_debug_expr): Likewise.
2300 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
2301 * cse.c (fold_rtx): Likewise.
2302 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
2303 * expr.c (emit_block_move_hints): Likewise.
2304 (clear_storage_hints, push_block, emit_push_insn): Likewise.
2305 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
2306 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
2307 (emit_group_store): Likewise.
2308 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
2309 to read the PRE/POST_MODIFY increment.
2310 * calls.c (store_one_arg): Use strip_offset.
2311 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
2313 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
2315 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
2316 (simplify_binary_operation_1): Extend CONST_INT handling to
2318 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
2319 than a HOST_WIDE_INT.
2320 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
2322 (adjust_mems, add_stores): Update accodingly.
2323 (vt_canonicalize_addr): Track polynomial offsets.
2324 (emit_note_insn_var_location): Likewise.
2325 (vt_add_function_parameter): Likewise.
2326 (vt_initialize): Likewise.
2328 2018-06-12 Jeff Law <law@redhat.com>
2330 * config.gcc (alpha*-*-freebsd*): Remove.
2331 * config/alpha/freebsd.h: Remove.
2333 2018-06-12 David Malcolm <dmalcolm@redhat.com>
2336 * spellcheck-tree.c (levenshtein_distance): Rename to...
2337 (get_edit_distance): ...this, and update for underlying renaming.
2338 * spellcheck-tree.h (levenshtein_distance): Rename to...
2339 (get_edit_distance): ...this.
2340 * spellcheck.c (levenshtein_distance): Rename to...
2341 (get_edit_distance): ...this. Convert from Levenshtein distance
2342 to Damerau-Levenshtein distance by supporting transpositions of
2343 adjacent characters. Rename "v1" to "v_next" and "v0" to
2345 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
2346 (selftest::test_edit_distance_unit_test_oneway): ...this, and
2347 update for underlying renaming.
2348 (selftest::levenshtein_distance_unit_test): Rename to...
2349 (selftest::test_get_edit_distance_unit): ...this, and update for
2350 underlying renaming.
2351 (selftest::test_find_closest_string): Add example from PR 69968
2352 where transposition helps
2353 (selftest::test_metric_conditions): Update for renaming.
2354 (selftest::test_metric_conditions): Likewise.
2355 (selftest::spellcheck_c_tests): Likewise.
2356 * spellcheck.h (levenshtein_distance): Rename both overloads to...
2357 (get_edit_distance): ...this.
2358 (best_match::consider): Update for renaming.
2360 2018-06-12 Martin Sebor <msebor@redhat.com>
2362 PR tree-optimization/85259
2363 * builtins.c (compute_objsize): Handle constant offsets.
2364 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
2365 true iff a warning has been issued.
2366 * gimple.h (gimple_nonartificial_location): New function.
2367 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
2368 gimple_nonartificial_location and handle -Wno-system-headers.
2369 (handle_builtin_stxncpy): Same.
2371 2018-06-12 Martin Sebor <msebor@redhat.com>
2374 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
2376 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
2378 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
2379 BUILTIN_VEC_XST entries for pointer to double and long long.
2381 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
2384 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
2386 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
2389 2018-06-12 Martin Liska <mliska@suse.cz>
2391 * doc/options.texi: Document IntegerRange.
2393 2018-06-12 Martin Liska <mliska@suse.cz>
2395 * config/i386/i386.opt: Make MPX-related options as Deprecated.
2396 * opt-functions.awk: Handle Deprecated flag.
2397 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
2399 (read_cmdline_option): Report warning for a deprecated option.
2400 * opts.h (struct cl_option): Add new field cl_deprecated.
2401 (CL_ERR_DEPRECATED): New.
2403 2018-06-12 Martin Liska <mliska@suse.cz>
2405 * doc/options.texi: Document Deprecated option flag.
2407 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2409 * config/arc/arc-arch.h (arc_extras): New enum.
2410 (arc_cpu_t):Add field extra.
2411 (arc_cpu_types): Consider the extras.
2412 * config/arc/arc-cpus.def: Add extras info.
2413 * config/arc/arc-opts.h (processor_type): Consider extra field.
2414 * config/arc/arc.c (arc_override_options): Handle extra field.
2416 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2418 * config/arc/arc-arch.h: Update ARC_OPTX macro.
2419 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
2421 * config/arc/arc.c (arc_init): Update pic warning.
2422 (irq_range): Update irq range parsing warnings.
2423 (arc_override_options): Update various warning messages.
2424 (arc_handle_aux_attribute): Likewise.
2426 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
2428 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
2430 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2432 * doc/sourcebuild.texi: Document usage of line number 0 in verify
2433 compiler messages directives.
2435 2018-06-12 Matthew Fortune <mfortune@gmail.com>
2437 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
2438 * config/mips/mips-tables.opt: Regenerate.
2439 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
2441 * doc/invoke.texi: Document -march=i6500.
2443 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
2445 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
2446 (i6400_gpmul): Add cpu_unit.
2447 (i6400_gpdiv): Likewise.
2448 (i6400_msa_add_d): Update reservations.
2449 (i6400_msa_int_add) Likewise.
2450 (i6400_msa_short_logic3) Likewise.
2451 (i6400_msa_short_logic2) Likewise.
2452 (i6400_msa_short_logic) Likewise.
2453 (i6400_msa_move) Likewise.
2454 (i6400_msa_cmp) Likewise.
2455 (i6400_msa_short_float2) Likewise.
2456 (i6400_msa_div_d) Likewise.
2457 (i6400_msa_long_logic1) Likewise.
2458 (i6400_msa_long_logic2) Likewise.
2459 (i6400_msa_mult) Likewise.
2460 (i6400_msa_long_float2) Likewise.
2461 (i6400_msa_long_float4) Likewise.
2462 (i6400_msa_long_float5) Likewise.
2463 (i6400_msa_long_float8) Likewise.
2464 (i6400_fpu_fadd): Include frint type.
2465 (i6400_fpu_store): New define_insn_reservation.
2466 (i6400_fpu_load): Likewise.
2467 (i6400_fpu_move): Likewise.
2468 (i6400_fpu_fcmp): Likewise.
2469 (i6400_fpu_fmadd): Likewise.
2470 (i6400_int_mult): Include imul3nc type and update reservation.
2471 (i6400_int_div): Include idiv3 type and update reservation.
2472 (i6400_int_load): Update to check type not move_type.
2473 (i6400_int_store): Likewise.
2474 (i6400_int_prefetch): Set zero latency.
2476 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
2478 * gcc.c: Document new %@{...} sequence.
2479 (LINK_COMMAND_SPEC): Use it for the -L switches.
2480 (cpp_unique_options): Use it for the -I switches.
2481 (at_file_argbuf): New global variable.
2482 (in_at_file): Likewise.
2483 (alloc_args): Create at_file_argbuf.
2484 (clear_args): Truncate at_file_argbuf.
2485 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
2486 (open_at_file): New function.
2487 (close_at_file): Likewise.
2488 (create_at_file): Delete.
2489 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
2492 (validate_switches_from_spec): Deal with %@{...} sequence.
2493 (validate_switches): Likewise.
2494 (driver::finalize): Call clear_args.
2496 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2498 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
2500 2018-06-11 Martin Sebor <msebor@redhat.com>
2502 * doc/invoke.texi (-Wall): List -Wc++17-compat.
2503 (Wno-class-memaccess): Add @opindex.
2504 (Wno-templates, Wno-multiple-inheritance): Same.
2505 (Wno-virtual-inheritance, Wno-namespaces): Same.
2506 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
2507 (Wno-format-overflow, Wno-format-truncation): Same.
2508 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
2509 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
2510 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
2511 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
2512 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
2513 (Wno-misspelled-isr): Same.
2515 2018-06-11 Martin Sebor <msebor@redhat.com>
2517 * PR tree-optimization/86083
2518 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
2520 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
2522 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
2524 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
2527 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
2528 on the correct operand.
2529 (*movdi_internal64): Ditto.
2531 2018-06-11 Martin Liska <mliska@suse.cz>
2533 PR tree-optimization/86089
2534 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
2536 2018-06-11 Julia Koval <julia.koval@intel.com>
2538 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
2539 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
2540 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
2542 2018-06-11 Olivier Hainque <hainque@adacore.com>
2544 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
2545 for Ada with strict dwarf2.
2547 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
2550 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
2553 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
2555 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
2557 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
2559 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
2562 2018-06-08 Martin Liska <mliska@suse.cz>
2564 * tree-cfg.h (debug_function): Fix argument type to match
2567 2018-06-08 Martin Liska <mliska@suse.cz>
2569 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
2570 Remove usage of MPX-related (and removed) fields.
2571 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
2573 2018-06-08 David Malcolm <dmalcolm@redhat.com>
2575 * cfg.c (debug): Use TDF_NONE rather than 0.
2576 * cfghooks.c (debug): Likewise.
2577 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
2578 (struct dump_option_value_info): Convert to...
2579 (struct kv_pair): ...this template type.
2580 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
2582 (optinfo_verbosity_options): Likewise.
2583 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
2585 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
2586 than int for "optgroup_flags" param.
2587 (dump_generic_expr_loc): Use dump_flags_t rather than int for
2589 (dump_dec): Likewise.
2590 (dump_finish): Use TDF_NONE rather than 0.
2591 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
2592 rather than int for "optgroup_flags" param. Use TDF_NONE rather
2593 than 0. Update for change to option_ptr.
2594 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
2595 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
2596 0. Update for changes to optinfo_verbosity_options and
2598 (opt_info_switch_p): Convert optgroup_flags from int to
2600 (dump_basic_block): Use dump_flags_t rather than int
2601 for "dump_kind" param.
2602 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
2603 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
2604 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
2605 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
2606 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
2607 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
2608 TDF_NONE): Convert from macros to...
2609 (enum dump_flag): ...this new enum.
2610 (dump_flags_t): Update to use enum.
2611 (operator|, operator&, operator~, operator|=, operator&=):
2612 Implement for dump_flags_t.
2613 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
2614 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
2615 Convert from macros to...
2616 (enum optgroup_flag): ...this new enum.
2617 (optgroup_flags_t): New typedef.
2618 (operator|, operator|=): Implement for optgroup_flags_t.
2619 (struct dump_file_info): Convert field "alt_flags" to
2620 dump_flags_t. Convert field "optgroup_flags" to
2622 (dump_basic_block): Use dump_flags_t rather than int for param.
2623 (dump_generic_expr_loc): Likewise.
2624 (dump_dec): Likewise.
2625 (dump_register): Convert param "optgroup_flags" to
2627 (opt_info_enable_passes): Likewise.
2628 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
2630 * gimple-pretty-print.c (debug): Likewise.
2631 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
2632 (merged_store_group::apply_stores): Likewise.
2633 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
2634 * gimple.c (verify_gimple_pp): Likewise.
2635 * graphite-poly.c (print_pbb_body): Likewise.
2636 * passes.c (pass_manager::register_one_dump_file): Convert
2637 local "optgroup_flags" to optgroup_flags_t.
2638 * print-tree.c (print_node): Use TDF_NONE rather than 0.
2640 (debug_body): Likewise.
2641 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
2642 to optgroup_flags_t.
2643 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
2645 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
2646 (convert_mult_to_fma): Likewise.
2647 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
2648 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
2649 * tree-vect-data-refs.c (dump_lower_bound): Convert param
2650 "dump_kind" to dump_flags_t.
2652 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
2654 * config/rs6000/rs6000.c (min, max): Delete.
2656 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
2658 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
2659 -mabi=spe and -mabi=no-spe.
2661 2018-06-08 Martin Liska <mliska@suse.cz>
2663 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
2664 where we expect an existing summary.
2666 2018-06-08 Martin Liska <mliska@suse.cz>
2668 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
2669 * ipa-inline.h (estimate_edge_growth): Likewise.
2671 2018-06-08 Martin Liska <mliska@suse.cz>
2673 * cgraph.c (function_version_hasher::hash): Use
2674 cgraph_node::get_uid ().
2675 (function_version_hasher::equal):
2676 * cgraph.h (cgraph_node::get_uid): New method.
2677 * ipa-inline.c (update_caller_keys): Use
2678 cgraph_node::get_uid ().
2679 (update_callee_keys): Likewise.
2680 * ipa-utils.c (searchc): Likewise.
2681 (ipa_reduced_postorder): Likewise.
2682 * lto-cgraph.c (input_node): Likewise.
2683 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
2684 * symbol-summary.h (symtab_insertion): Likewise.
2685 (symtab_removal): Likewise.
2686 (symtab_duplication): Likewise.
2687 * tree-pretty-print.c (dump_function_header): Likewise.
2688 * tree-sra.c (convert_callers_for_node): Likewise.
2690 2018-06-08 Martin Liska <mliska@suse.cz>
2692 * cgraph.c (symbol_table::create_edge): Always assign a new
2694 (symbol_table::free_edge): Do not recycle numbers.
2695 * cgraph.h (cgraph_edge::get): New method.
2696 * symbol-summary.h (symtab_removal): Use it.
2697 (symtab_duplication): Likewise.
2698 (call_summary::hashable_uid): Remove.
2700 2018-06-08 Martin Liska <mliska@suse.cz>
2702 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
2703 (initialize_growth_caches): Remove.
2704 (free_growth_caches): Likewise.
2705 (do_estimate_edge_time): Use edge_growth_cache.
2706 (do_estimate_edge_size): Likewise.
2707 (do_estimate_edge_hints): Likewise.
2708 * ipa-inline.c (reset_edge_caches): Likewise.
2709 (recursive_inlining): Likewise.
2710 (inline_small_functions): Likewise.
2711 * ipa-inline.h (initialize_growth_caches): Remove.
2712 (estimate_edge_size): Likewise.
2713 (estimate_edge_time): Likewise.
2714 (estimate_edge_hints): Likewise.
2715 (reset_edge_growth_cache): Likewise.
2716 * symbol-summary.h (call_summary::remove): New method.
2718 2018-06-08 Martin Liska <mliska@suse.cz>
2720 * ipa-cp.c (class edge_clone_summary): New summary.
2721 (grow_edge_clone_vectors): Remove.
2722 (ipcp_edge_duplication_hook): Remove.
2723 (class edge_clone_summary_t): New call_summary class.
2724 (ipcp_edge_removal_hook): Remove.
2725 (edge_clone_summary_t::duplicate): New function.
2726 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
2727 (create_specialized_node): Likewise.
2728 (ipcp_driver): Initialize edge_clone_summaries and do not
2731 2018-06-08 Martin Liska <mliska@suse.cz>
2733 * symbol-summary.h (get): New function.
2734 (call_summary::m_initialize_when_cloning): New class member.
2736 2018-06-08 Martin Liska <mliska@suse.cz>
2738 * cgraph.c (cgraph_node::remove): Do not recycle uid.
2739 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
2740 (symbol_table::allocate_cgraph_symbol): Do not set uid.
2741 * passes.c (uid_hash_t): Record removed_nodes by their uids.
2742 (remove_cgraph_node_from_order): Use the removed_nodes set.
2743 (do_per_function_toporder): Likwise.
2744 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
2745 instead of summary_uid.
2746 (symtab_removal): Likewise.
2747 (symtab_duplication): Likewise.
2749 2018-06-08 Martin Liska <mliska@suse.cz>
2751 * ipa-cp.c (ipcp_store_bits_results): Use
2752 ipcp_transformation_sum.
2753 (ipcp_store_vr_results): Likewise.
2754 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
2756 (ipcp_transformation_initialize): ... this.
2757 (ipa_set_node_agg_value_chain):
2758 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
2759 (write_ipcp_transformation_info): Likewise.
2760 (read_ipcp_transformation_info): Likewise.
2761 (ipcp_update_bits): Likewise.
2762 (ipcp_update_vr): Likewise.
2763 (ipcp_transform_function): Likewise.
2764 * ipa-prop.h: Rename ipcp_transformation_summary to
2765 ipcp_transformation.
2766 (class ipcp_transformation_t): New function summary.
2767 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
2768 (ipa_get_agg_replacements_for_node): Likewise.
2770 2018-06-08 Martin Liska <mliska@suse.cz>
2772 * ipa-pure-const.c (struct funct_state_d): Do it class instead
2774 (class funct_state_summary_t): New function_summary class.
2775 (has_function_state): Remove.
2776 (get_function_state): Likewise.
2777 (set_function_state): Likewise.
2778 (add_new_function): Likewise.
2779 (funct_state_summary_t::insert): New function.
2780 (duplicate_node_data): Remove.
2781 (remove_node_data): Remove.
2782 (funct_state_summary_t::duplicate): New function.
2783 (register_hooks): Create new funct_state_summaries.
2784 (pure_const_generate_summary): Use it.
2785 (pure_const_write_summary): Likewise.
2786 (pure_const_read_summary): Likewise.
2787 (propagate_pure_const): Likewise.
2788 (propagate_nothrow): Likewise.
2789 (dump_malloc_lattice): Likewise.
2790 (propagate_malloc): Likewise.
2791 (execute): Do not register hooks, just remove summary
2793 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
2796 2018-06-08 Martin Liska <mliska@suse.cz>
2798 * ipa-reference.c (remove_node_data): Remove.
2799 (duplicate_node_data): Likewise.
2800 (class ipa_ref_var_info_summary_t): New class.
2801 (class ipa_ref_opt_summary_t): Likewise.
2802 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
2803 (get_reference_optimization_summary): Use
2804 ipa_ref_opt_sum_summaries.
2805 (set_reference_vars_info): Remove.
2806 (set_reference_optimization_summary): Likewise.
2807 (ipa_init): Create summaries.
2808 (init_function_info): Use function summary.
2809 (ipa_ref_opt_summary_t::duplicate): New function.
2810 (ipa_ref_opt_summary_t::remove): New function.
2811 (get_read_write_all_from_node): Fix GNU coding style.
2812 (propagate): Use function summary.
2813 (write_node_summary_p): Fix GNU coding style.
2814 (stream_out_bitmap): Likewise.
2815 (ipa_reference_read_optimization_summary): Use function summary.
2816 (ipa_reference_c_finalize): Do not release hooks.
2818 2018-06-08 Martin Liska <mliska@suse.cz>
2820 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
2821 (analyze_function_body): Extract multiple calls of get_create.
2822 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
2823 * ipa-inline.c (recursive_inlining): Use ::get method.
2824 * ipa-inline.h (estimate_edge_growth): Likewise.
2826 2018-06-08 Martin Liska <mliska@suse.cz>
2828 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
2830 (hsa_function_summary::hsa_function_summary): Use the new enum
2832 (hsa_gpu_implementation_p): Use hsa_summaries::get.
2833 * hsa-gen.c (hsa_get_host_function): Likewise.
2834 (get_brig_function_name): Likewise.
2835 * ipa-hsa.c (process_hsa_functions): Likewise.
2836 (ipa_hsa_write_summary): Likewise.
2837 * symbol-summary.h (symtab_duplication): Use ::get function/
2838 (get): New function.
2840 2018-06-08 Martin Liska <mliska@suse.cz>
2842 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
2844 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
2845 (hsa_register_kernel): Likewise.
2846 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
2847 * hsa-gen.c (hsa_get_host_function): Likewise.
2848 (get_brig_function_name): Likewise.
2849 (generate_hsa): Likewise.
2850 (pass_gen_hsail::execute): Likewise.
2851 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
2852 (devirtualization_time_bonus): Likewise.
2853 (ipcp_propagate_stage): Likewise.
2854 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2855 (edge_set_predicate): Likewise.
2856 (evaluate_conditions_for_known_args): Likewise.
2857 (evaluate_properties_for_edge): Likewise.
2858 (ipa_fn_summary::reset): Likewise.
2859 (ipa_fn_summary_t::duplicate): Likewise.
2860 (dump_ipa_call_summary): Likewise.
2861 (ipa_dump_fn_summary): Likewise.
2862 (analyze_function_body): Likewise.
2863 (compute_fn_summary): Likewise.
2864 (estimate_edge_devirt_benefit): Likewise.
2865 (estimate_edge_size_and_time): Likewise.
2866 (estimate_calls_size_and_time): Likewise.
2867 (estimate_node_size_and_time): Likewise.
2868 (inline_update_callee_summaries): Likewise.
2869 (remap_edge_change_prob): Likewise.
2870 (remap_edge_summaries): Likewise.
2871 (ipa_merge_fn_summary_after_inlining): Likewise.
2872 (ipa_update_overall_fn_summary): Likewise.
2873 (read_ipa_call_summary): Likewise.
2874 (inline_read_section): Likewise.
2875 (write_ipa_call_summary): Likewise.
2876 (ipa_fn_summary_write): Likewise.
2877 (ipa_free_fn_summary): Likewise.
2878 * ipa-hsa.c (process_hsa_functions): Likewise.
2879 (ipa_hsa_write_summary): Likewise.
2880 (ipa_hsa_read_section): Likewise.
2881 * ipa-icf.c (sem_function::merge): Likewise.
2882 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
2883 (do_estimate_edge_time): Likewise.
2884 (estimate_size_after_inlining): Likewise.
2885 (estimate_growth): Likewise.
2886 (growth_likely_positive): Likewise.
2887 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
2888 (inline_call): Likewise.
2889 * ipa-inline.c (caller_growth_limits): Likewise.
2890 (can_inline_edge_p): Likewise.
2891 (can_inline_edge_by_limits_p): Likewise.
2892 (compute_uninlined_call_time): Likewise.
2893 (compute_inlined_call_time): Likewise.
2894 (want_inline_small_function_p): Likewise.
2895 (edge_badness): Likewise.
2896 (update_caller_keys): Likewise.
2897 (update_callee_keys): Likewise.
2898 (recursive_inlining): Likewise.
2899 (inline_small_functions): Likewise.
2900 (inline_to_all_callers_1): Likewise.
2901 (dump_overall_stats): Likewise.
2902 (early_inline_small_functions): Likewise.
2903 (early_inliner): Likewise.
2904 * ipa-inline.h (estimate_edge_growth): Likewise.
2905 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
2906 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2907 * ipa-prop.h (IPA_NODE_REF): Likewise.
2908 (IPA_EDGE_REF): Likewise.
2909 * ipa-pure-const.c (malloc_candidate_p): Likewise.
2910 (propagate_malloc): Likewise.
2911 * ipa-split.c (execute_split_functions): Likewise.
2912 * symbol-summary.h: Rename get to get_create.
2914 (get_create): Likewise.
2915 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2917 2018-06-08 Martin Liska <mliska@suse.cz>
2919 * symbol-summary.h (release): Move definition out of class
2921 (symtab_removal): Likewise.
2922 (symtab_duplication): Likewise.
2924 2018-06-08 Martin Liska <mliska@suse.cz>
2926 * symbol-summary.h (function_summary): Move constructor
2927 implementation out of class declaration.
2928 (release): Likewise.
2929 (symtab_insertion): Likewise.
2930 (symtab_removal): Likewise.
2931 (symtab_duplication): Likewise.
2934 2018-06-08 Martin Liska <mliska@suse.cz>
2936 * Makefile.in: Remove support for MPX (macros, related functions,
2937 fields in cgraph_node, ...).
2938 * builtin-types.def (BT_BND): Likewise.
2939 (BT_FN_BND_CONST_PTR): Likewise.
2940 (BT_FN_CONST_PTR_BND): Likewise.
2941 (BT_FN_VOID_PTR_BND): Likewise.
2942 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
2943 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
2944 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
2945 (expand_builtin_mempcpy_with_bounds): Likewise.
2946 (expand_builtin_memset_with_bounds): Likewise.
2947 (expand_builtin_memset_args): Likewise.
2948 (std_expand_builtin_va_start): Likewise.
2949 (expand_builtin): Likewise.
2950 (expand_builtin_with_bounds): Likewise.
2951 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
2952 (DEF_LIB_BUILTIN_CHKP): Likewise.
2953 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
2954 (DEF_CHKP_BUILTIN): Likewise.
2955 (BUILT_IN_MEMCPY): Likewise.
2956 (BUILT_IN_MEMMOVE): Likewise.
2957 (BUILT_IN_MEMPCPY): Likewise.
2958 (BUILT_IN_MEMSET): Likewise.
2959 (BUILT_IN_STPCPY): Likewise.
2960 (BUILT_IN_STRCAT): Likewise.
2961 (BUILT_IN_STRCHR): Likewise.
2962 (BUILT_IN_STRCPY): Likewise.
2963 (BUILT_IN_STRLEN): Likewise.
2964 (BUILT_IN_MEMCPY_CHK): Likewise.
2965 (BUILT_IN_MEMMOVE_CHK): Likewise.
2966 (BUILT_IN_MEMPCPY_CHK): Likewise.
2967 (BUILT_IN_MEMSET_CHK): Likewise.
2968 (BUILT_IN_STPCPY_CHK): Likewise.
2969 (BUILT_IN_STRCAT_CHK): Likewise.
2970 (BUILT_IN_STRCPY_CHK): Likewise.
2971 * calls.c (store_bounds): Likewise.
2972 (emit_call_1): Likewise.
2973 (special_function_p): Likewise.
2974 (maybe_warn_nonstring_arg): Likewise.
2975 (initialize_argument_information): Likewise.
2976 (finalize_must_preallocate): Likewise.
2977 (compute_argument_addresses): Likewise.
2978 (expand_call): Likewise.
2979 * cfgexpand.c (expand_call_stmt): Likewise.
2980 (expand_return): Likewise.
2981 (expand_gimple_stmt_1): Likewise.
2982 (pass_expand::execute): Likewise.
2983 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
2984 (cgraph_node::remove): Likewise.
2985 (cgraph_node::dump): Likewise.
2986 (cgraph_node::verify_node): Likewise.
2987 * cgraph.h (chkp_function_instrumented_p): Likewise.
2988 (symtab_node::get_alias_target): Likewise.
2989 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
2990 (cgraph_local_p): Likewise.
2991 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
2992 (cgraph_edge::rebuild_references): Likewise.
2993 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
2994 (walk_polymorphic_call_targets): Likewise.
2995 (cgraph_node::expand_thunk): Likewise.
2996 (symbol_table::output_weakrefs): Likewise.
2997 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
2998 (ix86_handle_option): Likewise.
2999 * config/i386/constraints.md: Likewise.
3000 * config/i386/i386-builtin-types.def (BND): Likewise.
3004 * config/i386/i386-builtin.def (BDESC_END): Likewise.
3005 (BDESC_FIRST): Likewise.
3007 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
3008 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
3009 * config/i386/i386.c (enum reg_class): Likewise.
3010 (ix86_target_string): Likewise.
3011 (ix86_option_override_internal): Likewise.
3012 (ix86_conditional_register_usage): Likewise.
3013 (ix86_valid_target_attribute_inner_p): Likewise.
3014 (ix86_set_indirect_branch_type): Likewise.
3015 (ix86_set_current_function): Likewise.
3016 (ix86_function_arg_regno_p): Likewise.
3017 (init_cumulative_args): Likewise.
3018 (ix86_function_arg_advance): Likewise.
3019 (ix86_function_arg): Likewise.
3020 (ix86_pass_by_reference): Likewise.
3021 (ix86_function_value_regno_p): Likewise.
3022 (ix86_function_value_1): Likewise.
3023 (ix86_function_value_bounds): Likewise.
3024 (ix86_return_in_memory): Likewise.
3025 (ix86_setup_incoming_vararg_bounds): Likewise.
3026 (ix86_va_start): Likewise.
3027 (indirect_thunk_need_prefix): Likewise.
3028 (print_reg): Likewise.
3029 (ix86_print_operand): Likewise.
3030 (ix86_expand_call): Likewise.
3031 (ix86_output_function_return): Likewise.
3032 (reg_encoded_number): Likewise.
3033 (BDESC_VERIFYS): Likewise.
3034 (ix86_init_mpx_builtins): Likewise.
3035 (ix86_init_builtins): Likewise.
3036 (ix86_emit_cmove): Likewise.
3037 (ix86_emit_move_max): Likewise.
3038 (ix86_expand_builtin): Likewise.
3039 (ix86_builtin_mpx_function): Likewise.
3040 (ix86_get_arg_address_for_bt): Likewise.
3041 (ix86_load_bounds): Likewise.
3042 (ix86_store_bounds): Likewise.
3043 (ix86_load_returned_bounds): Likewise.
3044 (ix86_store_returned_bounds): Likewise.
3045 (ix86_class_likely_spilled_p): Likewise.
3046 (ix86_hard_regno_mode_ok): Likewise.
3047 (x86_order_regs_for_local_alloc): Likewise.
3048 (ix86_mitigate_rop): Likewise.
3049 (ix86_bnd_prefixed_insn_p): Likewise.
3050 (ix86_mpx_bound_mode): Likewise.
3051 (ix86_make_bounds_constant): Likewise.
3052 (ix86_initialize_bounds): Likewise.
3053 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
3054 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
3055 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
3056 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
3057 (TARGET_CHKP_BOUND_MODE): Likewise.
3058 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
3059 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
3060 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
3061 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
3062 * config/i386/i386.h (TARGET_MPX): Likewise.
3063 (TARGET_MPX_P): Likewise.
3064 (VALID_BND_REG_MODE): Likewise.
3065 (FIRST_BND_REG): Likewise.
3066 (LAST_BND_REG): Likewise.
3067 (enum reg_class): Likewise.
3068 (BND_REG_P): Likewise.
3069 (BND_REGNO_P): Likewise.
3070 (BNDmode): Likewise.
3071 (ADJUST_INSN_LENGTH): Likewise.
3072 * config/i386/i386.md: Likewise.
3073 * config/i386/i386.opt: Likewise.
3074 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
3075 (defined): Likewise.
3076 (LINK_MPX): Likewise.
3077 (MPX_SPEC): Likewise.
3078 (LIBMPX_SPEC): Likewise.
3079 (LIBMPXWRAPPERS_SPEC): Likewise.
3080 (CHKP_SPEC): Likewise.
3081 * config/i386/predicates.md: Likewise.
3082 * dbxout.c (dbxout_type): Likewise.
3083 * doc/extend.texi: Likewise.
3084 * doc/invoke.texi: Likewise.
3085 * doc/md.texi: Likewise.
3086 * doc/tm.texi: Likewise.
3087 * doc/tm.texi.in: Likewise.
3088 * dwarf2out.c (is_base_type): Likewise.
3089 (gen_formal_types_die): Likewise.
3090 (gen_subprogram_die): Likewise.
3091 (gen_type_die_with_usage): Likewise.
3092 (gen_decl_die): Likewise.
3093 (dwarf2out_late_global_decl): Likewise.
3094 * expr.c (expand_assignment): Likewise.
3095 (emit_storent_insn): Likewise.
3096 (store_expr_with_bounds): Likewise.
3097 (store_expr): Likewise.
3098 (expand_expr_real_1): Likewise.
3099 * expr.h (store_expr_with_bounds): Likewise.
3100 * function.c (use_register_for_decl): Likewise.
3101 (struct bounds_parm_data): Likewise.
3102 (assign_parms_augmented_arg_list): Likewise.
3103 (assign_parm_find_entry_rtl): Likewise.
3104 (assign_parm_is_stack_parm): Likewise.
3105 (assign_parm_load_bounds): Likewise.
3106 (assign_bounds): Likewise.
3107 (assign_parms): Likewise.
3108 (expand_function_start): Likewise.
3109 * gcc.c (CHKP_SPEC): Likewise.
3110 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
3111 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
3112 (wrestrict_dom_walker::check_call): Likewise.
3113 * gimple.c (gimple_build_call_from_tree): Likewise.
3114 * gimple.h (enum gf_mask): Likewise.
3115 (gimple_call_with_bounds_p): Likewise.
3116 (gimple_call_set_with_bounds): Likewise.
3117 * gimplify.c (gimplify_init_constructor): Likewise.
3118 * ipa-cp.c (initialize_node_lattices): Likewise.
3119 (propagate_constants_across_call): Likewise.
3120 (find_more_scalar_values_for_callers_subset): Likewise.
3121 * ipa-hsa.c (process_hsa_functions): Likewise.
3122 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
3123 * ipa-icf.c (sem_function::merge): Likewise.
3124 * ipa-inline.c (early_inliner): Likewise.
3125 * ipa-pure-const.c (warn_function_noreturn): Likewise.
3126 (warn_function_cold): Likewise.
3127 (propagate_pure_const): Likewise.
3128 * ipa-ref.h (enum GTY): Likewise.
3129 * ipa-split.c (find_retbnd): Likewise.
3130 (consider_split): Likewise.
3131 (split_function): Likewise.
3132 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3133 * ipa.c (walk_polymorphic_call_targets): Likewise.
3134 (symbol_table::remove_unreachable_nodes): Likewise.
3135 (process_references): Likewise.
3136 (cgraph_build_static_cdtor_1): Likewise.
3137 * lto-cgraph.c (lto_output_node): Likewise.
3138 (output_refs): Likewise.
3139 (compute_ltrans_boundary): Likewise.
3140 (input_overwrite_node): Likewise.
3141 (input_node): Likewise.
3142 (input_cgraph_1): Likewise.
3143 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
3144 * passes.c (pass_manager::execute_early_local_passes): Likewise.
3145 (class pass_chkp_instrumentation_passes): Likewise.
3146 (make_pass_chkp_instrumentation_passes): Likewise.
3147 * passes.def: Likewise.
3148 * rtl.h (struct GTY): Likewise.
3149 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
3150 * stor-layout.c (layout_type): Likewise.
3151 * symtab.c: Likewise.
3152 * target.def: Likewise.
3153 * targhooks.c (default_chkp_bound_type): Likewise.
3154 (default_chkp_bound_mode): Likewise.
3155 (default_builtin_chkp_function): Likewise.
3156 (default_chkp_function_value_bounds): Likewise.
3157 (default_chkp_make_bounds_constant): Likewise.
3158 (default_chkp_initialize_bounds): Likewise.
3159 * targhooks.h (default_chkp_bound_type): Likewise.
3160 (default_chkp_bound_mode): Likewise.
3161 (default_builtin_chkp_function): Likewise.
3162 (default_chkp_function_value_bounds): Likewise.
3163 (default_chkp_make_bounds_constant): Likewise.
3164 (default_chkp_initialize_bounds): Likewise.
3165 * toplev.c (compile_file): Likewise.
3166 (process_options): Likewise.
3167 * tree-core.h (DEF_BUILTIN): Likewise.
3168 (DEF_BUILTIN_CHKP): Likewise.
3169 * tree-inline.c (declare_return_variable): Likewise.
3170 (remap_gimple_stmt): Likewise.
3171 (copy_bb): Likewise.
3172 (initialize_inlined_parameters): Likewise.
3173 (expand_call_inline): Likewise.
3174 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
3175 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
3176 (make_pass_ipa_chkp_produce_thunks): Likewise.
3177 (make_pass_chkp): Likewise.
3178 (make_pass_chkp_opt): Likewise.
3179 (make_pass_chkp_instrumentation_passes): Likewise.
3180 * tree-pretty-print.c (dump_generic_node): Likewise.
3181 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
3182 * tree-ssa-dce.c (propagate_necessity): Likewise.
3183 (eliminate_unnecessary_stmts): Likewise.
3184 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
3185 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3186 * tree-ssa-sccvn.h: Likewise.
3187 * tree-ssa-strlen.c (get_string_length): Likewise.
3188 (valid_builtin_call): Likewise.
3189 (adjust_last_stmt): Likewise.
3190 (handle_builtin_strchr): Likewise.
3191 (handle_builtin_strcpy): Likewise.
3192 (handle_builtin_stxncpy): Likewise.
3193 (handle_builtin_memcpy): Likewise.
3194 (handle_builtin_strcat): Likewise.
3195 (strlen_check_and_optimize_stmt): Likewise.
3196 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
3197 * tree-streamer-in.c: Likewise.
3198 * tree-streamer.c (record_common_node): Likewise.
3199 * tree.c (tree_code_size): Likewise.
3200 (wide_int_to_tree_1): Likewise.
3201 (type_contains_placeholder_1): Likewise.
3202 (build_common_tree_nodes): Likewise.
3203 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
3204 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
3205 (POINTER_BOUNDS_P): Likewise.
3206 (BOUNDED_TYPE_P): Likewise.
3207 (BOUNDED_P): Likewise.
3208 (CALL_WITH_BOUNDS_P): Likewise.
3209 (pointer_bounds_type_node): Likewise.
3210 * value-prof.c (gimple_ic): Likewise.
3211 * var-tracking.c (vt_add_function_parameters): Likewise.
3212 * varasm.c (make_decl_rtl): Likewise.
3213 (assemble_start_function): Likewise.
3214 (output_constant): Likewise.
3215 (maybe_assemble_visibility): Likewise.
3216 * varpool.c (ctor_for_folding): Likewise.
3217 * chkp-builtins.def: Remove.
3218 * ipa-chkp.c: Remove.
3219 * ipa-chkp.h: Remove.
3220 * rtl-chkp.c: Remove.
3221 * rtl-chkp.h: Remove.
3222 * tree-chkp-opt.c: Remove.
3223 * tree-chkp.c: Remove.
3224 * tree-chkp.h: Remove.
3226 2018-06-07 Carl Love <cel@us.ibm.com>
3228 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
3229 vextract_fp_from_shortl): Add BE support.
3231 2018-06-07 Paul Koning <ni1d@arrl.net>
3233 * compare-elim.c (try_merge_compare): Don't merge compare if
3234 address contains a side effect.
3235 (try_eliminate_compare): Likewise.
3237 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
3239 * config.gcc: Support "tremont".
3240 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
3241 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3243 * config/i386/i386.c (m_TREMONT): Define.
3244 (processor_target_table): Add "tremont".
3245 (PTA_TREMONT): Define.
3246 (ix86_lea_outperforms): Add TARGET_TREMONT.
3247 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
3248 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
3249 and M_INTEL_GOLDMONT_PLUS.
3250 (fold_builtin_cpu): Add "tremont".
3251 (ix86_add_stmt_cost): Add TARGET_TREMONT.
3252 (ix86_option_override_internal): Add "tremont".
3253 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
3254 (processor_type): Add PROCESSOR_TREMONT.
3255 * config/i386/x86-tune.def: Add m_TREMONT.
3256 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
3258 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3260 * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
3261 symbol defined for msp430i* devices to be lower case.
3263 gcc/testsuite/gcc.target/msp430/
3264 * msp430i-device-symbol.c: New test.
3265 * msp430f-device-symbol.c: New test.
3266 * msp430.h: New test header file.
3268 2018-06-07 Richard Biener <rguenther@suse.de>
3270 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
3271 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
3272 Properly wrap signed arithmetic if overflow wraps.
3274 2018-06-07 Jakub Jelinek <jakub@redhat.com>
3276 PR tree-optimization/69615
3277 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
3278 of a cast from a same precision integral SSA_NAME in a bb dominated
3279 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
3280 cast to utype if rhs2 has already a compatible type.
3282 2018-06-07 Richard Biener <rguenther@suse.de>
3284 PR tree-optimization/85935
3285 * graphite-scop-detection.c (find_params_in_bb): Analyze
3286 condition operands with respect to the correct loop. Assert
3287 the analysis doesn't fail.
3289 2018-06-04 Carl Love <cel@us.ibm.com>
3291 * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
3292 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
3293 as it is slightly cheaper.
3294 (first_match_or_eos_index_<mode>):
3295 Calculate index using natural element order.
3296 (first_match_index_<mode>):
3297 Calculate index using natural element order.
3298 (first_match_or_eos_index_<mode>):
3299 Calculate index using natural order.
3300 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
3301 for BE and LE modes.
3302 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
3303 P9V_BUILTIN_VCLZLSBB_V16QI.
3304 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
3307 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
3309 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
3310 indentation and line wrap for many prototypes. Add missing
3311 @smallexample directives around block of prototypes for vec_xl and
3314 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
3316 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
3317 track if we pass or return IEEE 128-bit floating point.
3318 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
3319 C++ mangling that is compatible with GCC 8.1.
3320 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
3321 (init_cumulative_args): Note if we pass or return IEEE 128-bit
3322 floating point types.
3323 (rs6000_function_arg_advance_1): Likewise.
3324 (rs6000_mangle_type): Optionally generate mangled names that match
3325 what GCC 8.1 generated for IEEE 128-bit floating point types.
3326 (rs6000_globalize_decl_name): If we have an external function that
3327 passes or returns IEEE 128-bit types, generate a weak reference
3328 from the mangled name used in GCC 8.1 to the current mangled
3330 (rs6000_init_builtins): Make __ibm128 use the long double type if
3331 long double is IBM extended double. Make __float128 use the long
3332 double type if long double is IEEE 128-bit.
3335 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
3336 macro for __ibm128 built-in functions.
3337 (PACK_IF): Add __ibm128 pack/unpack functions.
3338 (UNPACK_IF): Likewise.
3339 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
3340 enable long double built-in functions if long double is IEEE
3341 128-bit floating point.
3342 (rs6000_invalid_builtin): Update long double built-in function
3344 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
3345 functions, adjust the built-in function to use the long double
3346 built-in function if __ibm128 and long double are the same type.
3347 * doc/extend.texi (PowerPC builtins): Update documention for
3348 __builtin_{,un}pack_longdouble. Add documentation for
3349 __builtin_{,un}pack_ibm128.
3351 2018-06-06 Jim Wilson <jimw@sifive.com>
3353 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
3354 (struct machine_function): New field interrupt_mode.
3355 (riscv_handle_type_attribute): New function. Add forward declaration.
3356 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
3357 (riscv_expand_epilogue): Check interrupt_mode field.
3358 (riscv_set_current_function): Check interrupt attribute args and
3359 set interrupt_mode field.
3360 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
3361 (riscv_sret, riscv_uret): New.
3362 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
3363 new arguments to interrupt attribute.
3365 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
3368 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
3369 Don't handle -mcpu=power8 if -mpower9-vector is also used.
3371 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
3373 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
3374 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
3375 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
3376 several redundant entries.
3378 2018-06-06 David Malcolm <dmalcolm@redhat.com>
3380 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
3381 type from "rtx" to "rtx_insn *".
3382 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
3383 for local "call_insn", removing cast.
3384 (ix86_expand_call): Likewise, introducing a "call_insn" local.
3386 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
3388 PR tree-optimization/86066
3389 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
3390 for BIT_INSERT_EXPR stores.
3392 2018-06-06 Richard Biener <rguenther@suse.de>
3394 PR tree-optimization/86062
3395 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
3396 component refs ontop
3397 of to be offsetted base.
3399 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3401 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
3402 to be static and remove check on interrupt attribute name.
3404 gcc/testsuite/gcc.target/msp430/
3405 * function-attributes-4.c: New test.
3406 * static-interrupts.c: New test.
3408 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
3410 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
3411 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
3413 2018-06-05 Steve Ellcey <sellcey@cavium.com>
3416 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
3418 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
3419 Remove second argument, change how error is called.
3420 (aarch64_layout_arg): Remove second argument from
3421 aarch64_err_no_fpadvsimd call.
3422 (aarch64_init_cumulative_args): Ditto.
3423 (aarch64_gimplify_va_arg_expr): Ditto.
3424 * config/aarch64/aarch64.md (mov<mode>): Ditto.
3426 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
3428 * config/i386/i386.md (simple_return_indirect_internal): New expander.
3429 (*simple_return_indirect_internal<mode>): Rename from
3430 simple_return_indirect_internal. Use W mode iterator.
3431 (rstorssp): New expander.
3432 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
3433 (clrssbsy): New expander.
3434 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
3436 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
3438 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
3440 (cmse_check_pointed_object): Likewise.
3442 2018-06-05 Martin Liska <mliska@suse.cz>
3444 PR gcov-profile/47618
3445 * doc/invoke.texi: Document how -fprofile-dir format
3448 2018-06-05 Richard Biener <rguenther@suse.de>
3450 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
3451 removal pretend DOM info isn't available so we do not update
3452 it and only remove edges, not dominated blocks. Actually free
3453 DOM info in case we removed something. Remove unreachable blocks.
3454 (mfb_keep_latches): Work with either DOM info or marked backedges.
3455 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
3456 first. Mark backedges if DOM info isn't available.
3457 (Re-)compute DOM info after cleanup_control_flow_pre.
3459 2018-06-05 Richard Biener <rguenther@suse.de>
3461 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
3462 (locus_discrim_hasher::hash): Adjust.
3463 (locus_discrim_hasher::equal): Likewise.
3464 (next_discriminator_for_locus): Work on line directly.
3465 (same_line_p): Pass in expanded locus1 as well.
3466 (assign_discriminators): Avoid redundant location expansions.
3468 2018-06-05 Richard Biener <rguenther@suse.de>
3470 PR tree-optimization/86046
3471 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
3472 if required after clearing TREE_ADDRESSABLE.
3474 2018-06-05 Richard Biener <rguenther@suse.de>
3476 PR tree-optimization/86047
3477 * tree-ssa-loop.c (for_each_index): Glob handling of all
3478 decls and constants and really handle all of them.
3480 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3483 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
3484 qualifier_void_pointer and qualifier_const_void_pointer.
3485 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
3486 (arm_init_builtins): Handle the above.
3487 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
3488 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
3489 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
3492 2018-06-05 Martin Liska <mliska@suse.cz>
3494 * auto-profile.c (read_autofdo_file): Do not use
3495 gcov_ctr_summary struct.
3496 (afdo_callsite_hot_enough_for_early_inline): Likewise.
3497 * coverage.c (struct counts_entry): Likewise.
3498 (read_counts_file): Read just single summary entry.
3499 (get_coverage_counts): Use gcov_summary struct.
3500 * coverage.h (get_coverage_counts): Likewise.
3501 * gcov-dump.c (dump_working_sets): Likewise.
3502 (tag_summary): Dump just single summary.
3503 * gcov-io.c (gcov_write_summary): Write just histogram
3505 (gcov_read_summary): Read just single summary.
3506 (compute_working_sets): Use gcov_summary struct.
3507 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
3508 of GCOV_COUNTERS_SUMMABLE.
3509 (GCOV_COUNTERS_SUMMABLE): Remove.
3510 (GCOV_FIRST_VALUE_COUNTER): Replace with
3511 GCOV_COUNTER_V_INTERVAL.
3512 (struct gcov_ctr_summary): Remove.
3513 (struct gcov_summary): Directly use fields of former
3515 (compute_working_sets): Use gcov_summary struct.
3516 * gcov.c (read_count_file): Do not use ctrs fields.
3517 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
3519 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
3521 * profile.c: Likewise.
3522 * profile.h: Likewise.
3524 2018-06-05 Martin Liska <mliska@suse.cz>
3526 PR gcov-profile/84846
3527 * gcov.c (output_lines): Print working directory only
3528 in intermediate format.
3530 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
3532 * config/s390/s390-builtin-types.def: Add void function type.
3533 * config/s390/s390-builtins.def: Use the function type for the
3536 2018-06-04 Jim Wilson <jimw@sifive.com>
3538 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
3540 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
3541 and maybe_eh_return. Change regno to unsigned int. Use new args to
3542 handle EH_RETURN_DATA_REGNO registers properly.
3543 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
3544 (riscv_expand_epilogue): Update comment. Change argument name and
3545 type. Update code to use new name and type. Pass new args to
3546 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
3548 * config/riscv/riscv.md (NORMAL_RETURN): New.
3549 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
3550 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
3551 (eh_return): Call gen_eh_return_internal and emit barrier.
3552 (eh_return_internal): Call riscv_expand_epilogue.
3554 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
3556 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
3557 bit_insertion field and declare can_be_merged_into method.
3558 (merged_store_group::can_be_merged_into): New method.
3559 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
3560 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
3561 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
3563 2018-06-04 Richard Biener <rguenther@suse.de>
3565 PR tree-optimization/85955
3566 * builtins.c (fold_builtin_sincos): Convert pointers to
3567 destination to appropriate type before dereferencing.
3569 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
3571 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
3573 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
3575 * expr.c (expand_expr_real_1): Force the operand into memory if
3576 its TYPE_MODE is BLKmode and if there is no integer mode for
3577 the number of bits being extracted.
3579 2018-06-04 Jakub Jelinek <jakub@redhat.com>
3583 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
3584 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
3586 2018-06-04 Richard Biener <rguenther@suse.de>
3588 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
3589 (cleanup_tree_cfg_noloop): ... single caller. Do
3590 start_recording_case_labels later.
3592 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
3594 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
3595 to _IMMINTRIN_H_INCLUDED.
3596 * config/i386/pconfigintrin.h: Ditto.
3597 * config/i386/waitpkgintrin.h: Ditto.
3598 * config/i386/immintrin.h: Add includes for sgxintrin.h,
3599 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
3600 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
3601 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
3602 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
3603 waitpkgintrin.h and cldemoteintrin.h.
3605 2018-06-04 Richard Biener <rguenther@suse.de>
3607 PR tree-optimization/86038
3608 * tracer.c (find_best_successor): Check probability for
3609 being initialized, bail out if not.
3611 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
3614 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
3615 of bits to ignore when comparing architectures.
3617 2018-06-04 Jakub Jelinek <jakub@redhat.com>
3619 PR tree-optimization/69615
3620 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
3621 maximum or minimum of the type, try to merge it also as if
3622 range1 is + [-, x - 1] or + [x + 1, -].
3625 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
3627 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
3629 PR tree-optimization/86034
3630 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
3631 the unsigned bitfield type in a bit insertion sequence if it does not
3632 have a larger precision than the bitfield size.
3633 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
3635 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
3637 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
3639 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
3641 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
3642 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
3643 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
3644 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
3646 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
3648 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
3649 Disable -fdelete-null-pointer-checks for ELF toolchain.
3651 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
3652 Kito Cheng <kito.cheng@gmail.com>
3654 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
3655 (nds32le-*-*, nds32be-*-*): Integrate checking process.
3656 (nds32*-*-*): Add glibc and uclibc conditions.
3657 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
3658 (TARGET_EXCEPT_UNWIND_INFO): Define.
3659 * config/nds32/elf.h: New file.
3660 * config/nds32/linux.h: New file.
3661 * config/nds32/nds32-elf.opt: New file.
3662 * config/nds32/nds32-linux.opt: New file.
3663 * config/nds32/nds32-fp-as-gp.c
3664 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
3665 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
3667 (nds32_asm_file_end): Ditto.
3668 (nds32_print_operand): Ditto.
3669 (nds32_insert_attributes): Ditto.
3670 (nds32_init_libfuncs): New function.
3671 (TARGET_HAVE_TLS): Define.
3672 (TARGET_INIT_LIBFUNCS): Define.
3673 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
3675 (TARGET_ELF): Apply different mcmodel setting.
3676 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
3677 been migrated into elf.h and linux.h files.
3678 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
3679 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
3680 (mcmodel): The content has been migrated into nds32-elf.opt and
3681 nds32-linux.opt files.
3682 * config/nds32/t-elf: New file.
3683 * config/nds32/t-linux: New file.
3685 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
3686 Shiva Chen <shiva0217@gmail.com>
3688 * config/nds32/constants.md (unspec_volatile_element): Add
3689 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
3690 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
3692 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
3693 (make_pass_nds32_fp_as_gp): Declare.
3694 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
3696 (nds32_asm_function_end_prologue): Remove unused asm output.
3697 (nds32_asm_function_begin_epilogue): Remove unused asm output.
3698 (nds32_asm_file_start): Output necessary fp_as_gp information.
3699 (nds32_option_override): Adjust register usage.
3700 (nds32_expand_prologue): Consider fp_as_gp situation.
3701 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
3702 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
3705 (simple_return): Ditto.
3706 (omit_fp_begin): Output special directive for fp_as_gp.
3707 (omit_fp_end): Output special directive for fp_as_gp.
3708 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
3709 mforbid-fp-as-gp): New options.
3711 2018-06-01 Mark Wielaard <mark@klomp.org>
3713 * dwarf2out.c (dwarf2out_finish): Remove generation of
3714 DW_AT_loclists_base.
3716 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
3718 * gimple-ssa-store-merging.c: Include gimple-fold.h.
3719 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
3720 (struct merged_store_group): Add bit_insertion field.
3721 (dump_char_array): Use standard hexadecimal format.
3722 (merged_store_group::merged_store_group): Set bit_insertion to false.
3723 (merged_store_group::apply_stores): Use optimal buffer size. Deal
3724 with BIT_INSERT_EXPR stores. Move up code updating the mask and
3725 also print the mask in the dump file.
3726 (pass_store_merging::gate): Minor tweak.
3727 (imm_store_chain_info::coalesce_immediate): Fix wrong association
3728 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
3729 stores with INTEGER_CST stores.
3730 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
3731 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
3732 and use it throughout. Generate bit insertion sequences if need be.
3733 (pass_store_merging::process_store): Remove redundant condition.
3734 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
3736 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
3738 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
3739 the 128-bit floating point types. Fix function comment.
3741 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3743 * config/aarch64/aarch64-simd.md
3744 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
3746 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
3749 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
3751 PR tree-optimization/85989
3752 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
3754 (backprop::intersect_uses): Check it when deciding whether this
3755 is a backedge reference.
3756 (backprop::process_block): Add each phi to m_visited_phis
3757 after visiting it, then clear it at the end.
3759 2018-06-01 Richard Biener <rguenther@suse.de>
3761 * tree-vectorizer.h (vect_dr_stmt): New function.
3762 (vect_get_load_cost): Adjust.
3763 (vect_get_store_cost): Likewise.
3764 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
3765 Use vect_dr_stmt instead of DR_SMTT.
3766 (vect_record_base_alignments): Likewise.
3767 (vect_calculate_target_alignment): Likewise.
3768 (vect_compute_data_ref_alignment): Likewise and make static.
3769 (vect_update_misalignment_for_peel): Likewise.
3770 (vect_verify_datarefs_alignment): Likewise.
3771 (vector_alignment_reachable_p): Likewise.
3772 (vect_get_data_access_cost): Likewise. Pass down
3773 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
3774 (vect_get_peeling_costs_all_drs): Likewise.
3775 (vect_peeling_hash_get_lowest_cost): Likewise.
3776 (vect_enhance_data_refs_alignment): Likewise.
3777 (vect_find_same_alignment_drs): Likewise.
3778 (vect_analyze_data_refs_alignment): Likewise.
3779 (vect_analyze_group_access_1): Likewise.
3780 (vect_analyze_group_access): Likewise.
3781 (vect_analyze_data_ref_access): Likewise.
3782 (vect_analyze_data_ref_accesses): Likewise.
3783 (vect_vfa_segment_size): Likewise.
3784 (vect_small_gap_p): Likewise.
3785 (vectorizable_with_step_bound_p): Likewise.
3786 (vect_prune_runtime_alias_test_list): Likewise.
3787 (vect_analyze_data_refs): Likewise.
3788 (vect_supportable_dr_alignment): Likewise.
3789 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3790 (vect_gen_prolog_loop_niters): Likewise.
3791 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3792 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
3794 (vect_recog_mask_conversion_pattern): Likewise.
3795 (vect_try_gather_scatter_pattern): Likewise.
3796 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
3797 to vect_get_store_cost.
3798 (vect_get_store_cost): Get stmt_info instead of DR.
3799 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
3800 (vect_get_load_cost): Get stmt_info instead of DR.
3802 2018-06-01 Richard Biener <rguenther@suse.de>
3805 * gimple-fold.c (var_decl_component_p): Also allow offsetted
3806 vars wrapped in MEM_REFs.
3808 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
3810 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
3811 Fix subreg tests so that we only return a choice between
3812 GENERAL_REGS and FP_REGS if the original classes included both.
3814 2018-06-01 Richard Biener <rguenther@suse.de>
3817 * tree-ssa-structalias.c (get_function_part_constraint):
3818 Handle NULL fi->decl.
3819 (find_func_aliases_for_call): Properly handle indirect
3820 fi from direct call.
3821 (find_func_clobbers): Likewise.
3822 (ipa_pta_execute): Likewise.
3823 (create_variable_info_for): For functions that are ifunc_resolver
3824 resolve to a varinfo that contains the result of the resolver call.
3825 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
3828 2018-05-31 Michael Collison <michael.collison@arm.com>
3830 * config/aarch64/aarch64.md:
3831 (*fix_to_zero_extenddfdi2): New pattern.
3832 * gcc.target/aarch64/fix_extend1.c: New testcase.
3834 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
3838 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
3839 and BUILT_IN_STRNCMP_EQ.
3840 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
3841 BUILT_IN_STRNCMP_EQ.
3842 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
3843 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
3844 (gimple_fold_builtin): Likewise.
3845 * tree-ssa-strlen.c (compute_string_length): New function.
3846 (determine_min_obsize): New function.
3847 (handle_builtin_string_cmp): New function to handle calls to
3848 string compare functions.
3849 (strlen_optimize_stmt): Add handling to builtin string compare
3851 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
3852 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
3853 * tree.c (build_common_builtin_nodes): Add new defines of
3854 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
3856 2018-05-31 Jakub Jelinek <jakub@redhat.com>
3859 * bb-reorder.c (pass_partition_blocks::gate): Return false for
3860 functions with naked attribute.
3862 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
3864 * config/i386/sse.md (avx_vec_concat<mode>):
3865 Substitute concat_tg_mode mode attribute with xtg_mode.
3866 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
3867 (concat_tg_mode): Remove mode attribute.
3869 2018-05-31 Martin Sebor <msebor@redhat.com>
3872 * calls.c (alloc_max_size): Correct a logic error/typo.
3873 Treat excessive arguments as infinite. Warn for invalid arguments.
3874 * doc/invoke.texi (-Walloc-size-larger-than): Update.
3876 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
3879 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
3880 and movx for Haswell.
3882 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
3883 Cesar Philippidis <cesar@codesourcery.com>
3886 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
3887 when emitting error on private/firstprivate reductions.
3888 * omp-low.c (lower_omp_target): Avoid reference-type processing
3889 on pointers for firstprivate clause.
3891 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3893 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
3896 * config/aarch64/aarch64-simd.md
3897 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
3898 (aarch64_ld1_x3_<mode>): Likewise
3899 (aarch64_st1x2<VALLDIF:mode>): Likewise
3900 (aarch64_st1_x2_<mode>): Likewise
3901 (aarch64_st1x3<VALLDIF:mode>): Likewise
3902 (aarch64_st1_x3_<mode>): Likewise
3903 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
3904 (vld1_s8_x3): Likewise.
3905 (vld1_u16_x3): Likewise.
3906 (vld1_s16_x3): Likewise.
3907 (vld1_u32_x3): Likewise.
3908 (vld1_s32_x3): Likewise.
3909 (vld1_u64_x3): Likewise.
3910 (vld1_s64_x3): Likewise.
3911 (vld1_f16_x3): Likewise.
3912 (vld1_f32_x3): Likewise.
3913 (vld1_f64_x3): Likewise.
3914 (vld1_p8_x3): Likewise.
3915 (vld1_p16_x3): Likewise.
3916 (vld1_p64_x3): Likewise.
3917 (vld1q_u8_x3): Likewise.
3918 (vld1q_s8_x3): Likewise.
3919 (vld1q_u16_x3): Likewise.
3920 (vld1q_s16_x3): Likewise.
3921 (vld1q_u32_x3): Likewise.
3922 (vld1q_s32_x3): Likewise.
3923 (vld1q_u64_x3): Likewise.
3924 (vld1q_s64_x3): Likewise.
3925 (vld1q_f16_x3): Likewise.
3926 (vld1q_f32_x3): Likewise.
3927 (vld1q_f64_x3): Likewise.
3928 (vld1q_p8_x3): Likewise.
3929 (vld1q_p16_x3): Likewise.
3930 (vld1q_p64_x3): Likewise.
3931 (vst1_s64_x2): Likewise.
3932 (vst1_u64_x2): Likewise.
3933 (vst1_f64_x2): Likewise.
3934 (vst1_s8_x2): Likewise.
3935 (vst1_p8_x2): Likewise.
3936 (vst1_s16_x2): Likewise.
3937 (vst1_p16_x2): Likewise.
3938 (vst1_s32_x2): Likewise.
3939 (vst1_u8_x2): Likewise.
3940 (vst1_u16_x2): Likewise.
3941 (vst1_u32_x2): Likewise.
3942 (vst1_f16_x2): Likewise.
3943 (vst1_f32_x2): Likewise.
3944 (vst1_p64_x2): Likewise.
3945 (vst1q_s8_x2): Likewise.
3946 (vst1q_p8_x2): Likewise.
3947 (vst1q_s16_x2): Likewise.
3948 (vst1q_p16_x2): Likewise.
3949 (vst1q_s32_x2): Likewise.
3950 (vst1q_s64_x2): Likewise.
3951 (vst1q_u8_x2): Likewise.
3952 (vst1q_u16_x2): Likewise.
3953 (vst1q_u32_x2): Likewise.
3954 (vst1q_u64_x2): Likewise.
3955 (vst1q_f16_x2): Likewise.
3956 (vst1q_f32_x2): Likewise.
3957 (vst1q_f64_x2): Likewise.
3958 (vst1q_p64_x2): Likewise.
3959 (vst1_s64_x3): Likewise.
3960 (vst1_u64_x3): Likewise.
3961 (vst1_f64_x3): Likewise.
3962 (vst1_s8_x3): Likewise.
3963 (vst1_p8_x3): Likewise.
3964 (vst1_s16_x3): Likewise.
3965 (vst1_p16_x3): Likewise.
3966 (vst1_s32_x3): Likewise.
3967 (vst1_u8_x3): Likewise.
3968 (vst1_u16_x3): Likewise.
3969 (vst1_u32_x3): Likewise.
3970 (vst1_f16_x3): Likewise.
3971 (vst1_f32_x3): Likewise.
3972 (vst1_p64_x3): Likewise.
3973 (vst1q_s8_x3): Likewise.
3974 (vst1q_p8_x3): Likewise.
3975 (vst1q_s16_x3): Likewise.
3976 (vst1q_p16_x3): Likewise.
3977 (vst1q_s32_x3): Likewise.
3978 (vst1q_s64_x3): Likewise.
3979 (vst1q_u8_x3): Likewise.
3980 (vst1q_u16_x3): Likewise.
3981 (vst1q_u32_x3): Likewise.
3982 (vst1q_u64_x3): Likewise.
3983 (vst1q_f16_x3): Likewise.
3984 (vst1q_f32_x3): Likewise.
3985 (vst1q_f64_x3): Likewise.
3986 (vst1q_p64_x3): Likewise.
3988 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3990 * config/msp430/msp430.c (msp430_output_labelref): Prepend
3991 user_label_prefix to name.
3993 * tree-core.h: Update comment about the format of NAME string
3994 passed to handler in attribute_spec.
3996 * config/msp430/msp430.md: Remove erroneous subreg expression from
3997 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
3998 zero_extend{q,h}isi2.
4000 2018-05-30 Borislav Petkov <bp@suse.de>
4002 * doc/extend.texi: Document some architecture specific
4003 constraints and sort entries.
4005 2018-05-30 Martin Sebor <msebor@redhat.com>
4008 * builtins.c (expand_builtin_stpcpy_1): New function.
4009 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
4010 only if the former succeeds.
4012 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4014 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
4017 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
4019 * doc/invoke.texi (-flinker-output): Document
4021 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
4023 * passes.c (ipa_write_summaries): Only modify statements if body
4025 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
4026 incrementally linking.
4027 (ipa_passes): Likewise.
4028 * lto-cgraph.c (lto_output_node): When incrementally linking do not
4029 pass down resolution info.
4030 * common.opt (flag_incremental_link): Update info.
4031 * gcc.c (plugin specs): Turn flinker-output=* to
4032 -plugin-opt=-linker-output-known
4033 * toplev.c (compile_file): Also cut compilation when doing incremental
4035 * flag-types. (enum lto_partition_model): Add
4036 LTO_LINKER_OUTPUT_NOLTOREL.
4037 (invoke.texi): Add -flinker-output docs.
4038 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
4039 link same way as WPA; do not stream in dead initializers.
4041 * dwarf2out.c (dwarf2out_die_ref_for_decl,
4042 darf2out_register_external_decl): Support incremental link.
4044 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
4046 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
4048 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
4050 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
4051 it down to simple_object_copy_lto_debug_sections.
4052 (run_gcc): Determine incremental LTO link time and configure
4053 lto1 into non-wpa mode, disable renaming of debug sections.
4055 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
4057 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
4058 descriptions of various incorrectly documented functions.
4060 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
4063 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4064 address check not strict.
4066 2018-05-30 Richard Biener <rguenther@suse.de>
4068 PR tree-optimization/85964
4069 * tracer.c (better_p): Drop initialized count check, we only
4070 call the function with initialized counts now.
4071 (find_best_successor): Do find a best edge if one
4072 has uninitialized count.
4073 (find_best_predecessor): Likewise. Do BB frequency check only
4074 if count is initialized.
4076 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
4078 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
4079 (aarch64_ldrstr_offset_compare): New.
4080 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
4081 load/store orderings.
4082 (aarch64_gen_adjusted_ldpstp): Likewise.
4084 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
4086 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4087 Check for subset of GENERAL_REGS and FP_REGS.
4088 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
4091 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
4093 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
4094 and wi::to_poly_offset. Add the current offset and then check
4095 whether the sum fits, rather than using an unchecked addition of
4096 a checked term. Check for a shwi rather than a uhwi.
4097 * expr.c (get_bit_range): Use tree_to_poly_uint64.
4098 (store_constructor): Use poly_int_tree_p.
4099 (expand_expr_real_1): Likewise.
4100 * function.c (assign_temp): Likewise.
4101 * fold-const.c (const_binop): Use poly_int_tree_p and
4103 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
4105 * ipa-icf-gimple.c (func_checker::compare_operand): Use
4106 to_poly_offset for MEM offsets.
4107 * ipa-icf.c (sem_variable::equals): Likewise.
4108 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
4109 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
4110 wi::to_poly_offset for BIT_FIELD_REF offsets.
4111 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
4113 * var-tracking.c (emit_note_insn_var_location): Use
4114 tree_to_poly_uint64.
4116 2018-05-29 Jim Wilson <jimw@sifive.com>
4118 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
4120 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
4123 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
4124 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
4126 (sse4_1_round<mode>2): Use nonimmediate_operand
4127 for operand 1 predicate.
4129 2018-05-29 Martin Sebor <msebor@redhat.com>
4130 Richard Biener <rguenther@suse.de>
4133 * calls.c (get_size_range): Call determine_value_range instead
4134 of get_value_range..
4135 * tree-vrp.h (determine_value_range): Declared new function.
4136 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
4138 2018-05-29 Richard Biener <rguenther@suse.de>
4140 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
4141 sure to use non-pattern stmts for get_earlier_stmt arguments.
4142 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
4143 called on pattern stmts.
4144 (get_later_stmt): Likewise.
4146 2018-05-29 Martin Liska <mliska@suse.cz>
4148 PR gcov-profile/85759
4149 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
4152 2018-05-29 Jakub Jelinek <jakub@redhat.com>
4154 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
4156 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
4160 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
4161 VEC_PACK_FLOAT_EXPR): New tree codes.
4162 * tree-pretty-print.c (op_code_prio): Handle
4163 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
4164 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
4165 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
4166 * tree-inline.c (estimate_operator_cost): Likewise.
4167 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
4168 * fold-const.c (const_binop): Likewise.
4169 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
4170 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
4171 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4172 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
4173 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
4174 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
4175 * expr.c (expand_expr_real_2): Likewise.
4176 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
4177 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
4178 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
4180 * optabs.c (expand_widen_pattern_expr): For
4181 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
4182 sign from result type rather than operand's type.
4183 (expand_binop_directly): For vec_packu_float_optab and
4184 vec_packs_float_optab allow result type to be different from operand's
4186 * optabs-tree.c (optab_for_tree_code): Handle
4187 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
4188 VEC_PACK_FLOAT_EXPR. Formatting fixes.
4189 * tree-vect-generic.c (expand_vector_operations_1): Handle
4190 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
4191 VEC_PACK_FLOAT_EXPR.
4192 * tree-vect-stmts.c (supportable_widening_operation): Handle
4194 (supportable_narrowing_operation): Handle FLOAT_EXPR.
4195 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
4196 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
4197 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
4198 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
4200 (vec_pack<floatprefix>_float_<mode>): New expander.
4201 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
4203 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
4204 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
4205 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
4206 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
4207 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
4209 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
4210 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
4211 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
4212 VEC_PACK_FLOAT_EXPR): Document.
4214 2018-05-29 Richard Biener <rguenther@suse.de>
4216 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
4218 (stmt_vec_info_vec): Make pointer.
4219 (init_stmt_vec_info_vec): Remove.
4220 (free_stmt_vec_info_vec): Likewise.
4221 (set_stmt_vec_info_vec): New function.
4222 (free_stmt_vec_infos): Likewise.
4223 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
4224 (set_vinfo_for_stmt): Likewise.
4225 (get_earlier_stmt): Likewise.
4226 (get_later_stmt): Likewise.
4227 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
4228 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
4229 (vec_info::~vec_info): Free stmt_vec_infos.
4230 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
4231 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
4232 (pass_slp_vectorize::execute): Likewise.
4233 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
4234 (free_stmt_vec_info_vec): Likewise.
4235 (set_stmt_vec_info_vec): New function.
4236 (free_stmt_vec_infos): Likewise.
4237 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
4238 the global stmt_vec_info_vec.
4239 * tree-parloops.c (gather_scalar_reductions): Use
4240 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
4243 2018-05-29 Richard Biener <rguenther@suse.de>
4245 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
4247 2018-05-29 Martin Liska <mliska@suse.cz>
4248 David Malcolm <dmalcolm@redhat.com>
4250 * vec.c (test_reverse): New.
4251 (vec_c_tests): Add new test.
4252 * vec.h (vl_ptr>::reverse): New function.
4254 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
4256 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
4258 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
4261 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4263 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
4265 2018-05-28 Richard Biener <rguenther@suse.de>
4267 PR tree-optimization/85933
4268 * tree-vect-data-refs.c (vect_record_base_alignments): Only
4269 look at stmts marked as vectorizable.
4271 2018-05-28 Richard Biener <rguenther@suse.de>
4273 PR tree-optimization/85934
4274 * tree-vect-generic.c (expand_vector_operations_1): Hoist
4275 vector boolean check before scalar optimization.
4277 2018-05-28 Jakub Jelinek <jakub@redhat.com>
4279 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
4282 2018-05-28 Mark Wielaard <mark@klomp.org>
4284 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
4285 if it is an expression containing a minus sign.
4287 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
4289 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
4291 2018-05-27 Paul Koning <ni1d@arrl.net>
4293 * config/pdp11/pdp11.md (truncsihi2): Remove.
4295 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
4296 Chung-Ju Wu <jasonwucj@gmail.com>
4298 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
4300 (unaligned_store_dw): Ditto.
4301 * config/nds32/nds32-memory-manipulation.c
4302 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
4303 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
4304 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
4305 (emit_setmem_word_loop): Rename to ...
4306 (emit_setmem_doubleword_loop): ... this.
4307 (nds32_gen_dup_4_byte_to_word_value): New function.
4308 (nds32_gen_dup_8_byte_to_double_word_value): New function.
4309 (nds32_expand_setmem_loop): Refine implementation.
4310 (nds32_expand_setmem_loop_v3m): Ditto.
4311 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
4314 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
4316 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
4318 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
4320 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
4321 (nds32_init_machine_status): Initialize machine->attr_naked_p and
4322 machine->attr_no_prologue_p.
4323 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
4324 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
4325 (nds32_expand_epilogue): Consider attr_naked_p.
4326 (nds32_expand_epilogue_v3pop): Likewise.
4327 (nds32_can_use_return_insn): Likewise.
4328 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
4329 attr_no_prologue_p fields.
4330 * config/nds32/nds32.opt (mret-in-naked-func): New option.
4332 2018-05-27 Jakub Jelinek <jakub@redhat.com>
4335 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
4337 * config/i386/sse.md
4338 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
4340 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
4342 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
4344 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
4346 (*<floatsuffix>floatv2div2sf2): Rename to ...
4347 (*float<floatunssuffix>v2div2sf2): ... this.
4348 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
4349 (float<floatunssuffix>v2div2sf2_mask): ... this.
4350 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
4351 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
4352 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
4354 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
4356 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
4358 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
4360 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
4362 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
4364 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
4365 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
4366 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
4367 gen_ufix_truncv8dfv8si2.
4368 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
4369 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
4370 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
4371 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
4372 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
4373 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
4374 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
4375 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
4377 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
4381 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
4383 2018-05-25 Jim Wilson <jimw@sifive.com>
4385 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
4386 * config/riscv/riscv.c (struct machine_function): Add
4387 interrupt_handler_p and attribute_checked_p fields.
4388 (riscv_attribute_table): Add interrupt.
4389 (riscv_interrupt_type_p): New.
4390 (riscv_save_reg_p): Save extra regs for interrupt handler.
4391 (riscv_use_save_libcall): Return false for interrupt handler.
4392 (riscv_first_stack_step): Add forward declaration.
4393 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
4394 for interrupt handler with large frame. Use it for saved reg list.
4395 (riscv_expand_prologue): Move flag_stack_usage_info support to
4396 eliminate duplication.
4397 (riscv_expand_epilogue): Generate mret for interrupt handler.
4398 (riscv_epilogue_uses): New.
4399 (riscv_can_use_return_insn): Return false for interrupt handler.
4400 (riscv_function_ok_for_sibcall): Likewise.
4401 (riscv_set_current_function): Add interrupt handler support.
4402 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
4403 * config/riscv/riscv.md (UNSPECV_MRET): New.
4405 (riscv_frflags, riscv_fsflags): Use tab after opcode.
4407 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
4409 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
4411 PR tree-optimization/85712
4412 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
4413 this candidate has already been replaced in-situ by a copy.
4415 2018-05-25 Jason Merrill <jason@redhat.com>
4417 PR c++/80485 - inline function non-zero address.
4418 * symtab.c (nonzero_address): Check DECL_COMDAT.
4420 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
4423 * config/alpha/alpha.md (ashlsi3): New insn pattern.
4424 (*ashlsi_se): Rename from *ashldi_se. Define as sign
4425 extension of SImode operation. Use const123_operand predicate.
4426 (*saddsi_1): Remove.
4427 (*saddl_se_1): Ditto.
4429 (*ssubl_se_1): Ditto.
4430 * config/alpha/predicates.md (const123_operand): New predicate.
4431 * config/alpha/constraints.md (P): Use IN_RANGE.
4433 2018-05-25 Richard Biener <rguenther@suse.de>
4435 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
4437 (ref_maybe_used_by_stmt_p): Likewise.
4438 (stmt_may_clobber_ref_p): Likewise.
4439 (stmt_may_clobber_ref_p_1): Likewise.
4440 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
4442 (ref_maybe_used_by_stmt_p): Likewise.
4443 (stmt_may_clobber_ref_p): Likewise.
4444 (stmt_may_clobber_ref_p_1): Likewise.
4445 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
4446 the alias oracle to disambiguate DRs with stmts DR analysis
4448 (vect_analyze_data_refs): Do not give up on not analyzable
4449 DRs for BB vectorization. Remove code truncating the dataref
4452 2018-05-25 Jakub Jelinek <jakub@redhat.com>
4455 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
4456 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
4457 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
4459 2018-05-25 Richard Biener <rguenther@suse.de>
4461 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
4462 function, combining stmt data ref gathering and fatal analysis
4464 (vect_analyze_data_refs): Remove now redudnant code and simplify.
4465 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
4466 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
4467 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
4468 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
4470 2018-05-25 Bin Cheng <bin.cheng@arm.com>
4472 PR tree-optimization/85720
4473 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
4474 SCC if all partitions are builtins.
4475 (version_loop_by_alias_check): New parameter. Generate cancelable
4476 runtime alias check if all partitions are builtins.
4477 (distribute_loop): Update call to above function.
4479 2018-05-25 Bin Cheng <bin.cheng@arm.com>
4481 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
4482 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
4483 (parm_default_def_partition_arg): Ditto.
4484 (set_parm_default_def_partition): Ditto.
4485 (get_parm_default_def_partitions): Ditto and make it static.
4486 (get_undefined_value_partitions): Ditto and make it static.
4487 (remove_ssa_form): Refactor call to init_var_map here.
4488 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
4489 computation for loop region.
4490 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
4491 (register_default_def): Delete.
4492 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
4493 (parm_default_def_partition_arg): Ditto.
4494 (set_parm_default_def_partition): Ditto.
4495 (get_parm_default_def_partitions): Ditto and make it static.
4496 (get_undefined_value_partitions): Ditto and make it static.
4497 (coalesce_with_default, coalesce_with_default): Update comment.
4498 (create_coalesce_list_for_region): New func factored out from
4499 create_outofssa_var_map.
4500 (populate_coalesce_list_for_outofssa): New func factored out from
4501 create_outofssa_var_map and coalesce_ssa_name.
4502 (create_outofssa_var_map): Delete.
4503 (coalesce_ssa_name): Refactor to support live range computation.
4504 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
4505 (get_parm_default_def_partitions): Delete.
4506 (get_undefined_value_partitions): Ditto.
4507 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
4508 computation for loop region.
4509 (new_tree_live_info, loe_visit_block): Ditto.
4510 (live_worklist, set_var_live_on_entry): Ditto.
4511 (calculate_live_on_exit, verify_live_on_entry): Ditto.
4512 * tree-ssa-live.h (struct _var_map): New fields.
4513 (init_var_map): Change decl.
4514 (region_contains_p): New.
4516 2018-05-25 Bin Cheng <bin.cheng@arm.com>
4518 * tree-ssa-live.h (live_merge_and_clear): Delete.
4520 2018-05-25 Richard Biener <rguenther@suse.de>
4523 * tree-dump.c (dequeue_and_dump): Remove access to removed
4524 operand 2 of a SWITCH_EXPR.
4526 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
4528 * doc/sourcebuild.texi (vect_double_cond_arith): Include
4529 multiplication and division.
4530 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
4531 (cond_udiv@var{m}, cond_umod@var{m}): Document.
4532 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
4533 (cond_udiv_optab, cond_umod_optab): New optabs.
4534 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
4535 (IFN_COND_RDIV): New internal functions.
4536 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
4537 TRUNC_MOD_EXPR and RDIV_EXPR.
4538 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
4539 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
4541 (SVE_INT_BINARY): Include mult.
4542 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
4543 (optab, sve_int_op): Handle mult.
4544 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
4546 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
4547 for SVE_INT_BINARY_SD.
4549 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
4551 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
4552 (optab, sve_int_op): Handle div and udiv.
4553 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
4554 for SVE_INT_BINARY_SD.
4555 (*<optab><mode>3): New insn for the same.
4557 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
4559 * tree-vect-patterns.c: Include predict.h.
4560 (vect_recog_divmod_pattern): Restrict check for division support
4561 to when optimizing for size.
4563 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
4565 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
4566 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
4567 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
4568 (gimple_match_op::set_op): Likewise.
4569 (gimple_resimplify4): Declare.
4570 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
4571 (expr::gen_transform): Likewise.
4572 (decision_tree::gen): Generate a simplification routine for 4 operands.
4573 * gimple-match-head.c (gimple_simplify): Add an overload for
4574 4 operands. In the top-level function, handle up to 4 call
4575 arguments and call gimple_resimplify4.
4576 (gimple_resimplify4): New function.
4577 (build_call_internal): Pass a fourth operand.
4578 (maybe_push_to_seq): Likewise.
4579 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
4580 Fold VEC_COND_EXPRs of an operation and a default value into
4581 an IFN_COND_* function if possible.
4582 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
4584 (SVE_COND_FP_BINARY): Include them.
4585 (optab, sve_fp_op): Handle them.
4586 (SVE_INT_BINARY_REV): New code iterator.
4587 (SVE_COND_FP_BINARY_REV): New int iterator.
4588 (commutative): New int attribute.
4589 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
4591 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
4593 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
4594 (*cond_<optab><mode>): New patterns for reversed operands.
4596 2018-05-25 Richard Biener <rguenther@suse.de>
4598 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
4599 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
4600 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
4601 (STMT_VINFO_GROUPED_ACCESS): Adjust.
4602 * tree-vect-data-refs.c (everywhere): Adjust users.
4603 * tree-vect-loop.c (everywhere): Likewise.
4604 * tree-vect-slp.c (everywhere): Likewise.
4605 * tree-vect-stmts.c (everywhere): Likewise.
4606 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4608 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4610 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
4612 (gcc_cv_as_section_exclude): ... this.
4613 Try Solaris as #exclude syntax.
4614 * configure: Regenerate.
4615 * config.in: Regenerate.
4616 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
4618 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
4619 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
4621 * varasm.c (default_elf_asm_named_section): Don't check if
4622 HAVE_GAS_SECTION_EXCLUDE is defined.
4624 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
4626 * doc/md.texi: Update the documentation of the cond_* optabs
4627 to mention the new final operand. Fix GET_MODE_NUNITS call.
4628 Describe the scalar case too.
4629 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
4630 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
4632 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
4633 (get_conditional_internal_fn): Update comment.
4634 * tree-vect-loop.c (vectorizable_reduction): Pass the original
4635 accumulator value as a final argument to conditional functions.
4636 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
4637 a define_expand and add an "else" operand. Assert for now that
4638 the else operand is equal to operand 2. Use SVE_INT_BINARY and
4639 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
4640 (*cond_<optab><mode>): New patterns.
4641 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
4642 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
4643 (UNSPEC_COND_EOR): Delete.
4644 (optab): Remove associated mappings.
4645 (SVE_INT_BINARY): New code iterator.
4646 (sve_int_op): Remove int attribute and add "minus" to the code
4648 (SVE_COND_INT_OP): Delete.
4649 (SVE_COND_FP_OP): Rename to...
4650 (SVE_COND_FP_BINARY): ...this.
4652 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
4654 * optabs.c (can_reuse_operands_p): New function.
4655 (maybe_legitimize_operands): Try to reuse the results for
4658 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
4660 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
4661 Add {q} suffix to insn mnemonic.
4663 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4665 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
4666 (msp430_warn_func_return): New.
4668 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
4670 * fold-const.c (tree_nonzero_bits): New function.
4671 * fold-const.h (tree_nonzero_bits): Likewise.
4672 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
4673 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
4675 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
4679 * varasm.c (assemble_alias): Check ifunc_resolver only on
4682 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
4685 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
4686 when memory input operand is handled.
4688 2018-05-24 Luis Machado <luis.machado@linaro.org>
4690 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
4692 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
4694 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
4696 * match.pd: Delay FMA folds until after vectorization.
4698 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
4701 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4702 address check not strict.
4704 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
4706 * gimple-match.h (gimple_match_op): New class.
4707 (mprts_hook): Replace parameters with a gimple_match_op *.
4708 (maybe_build_generic_op): Likewise.
4709 (gimple_simplified_result_is_gimple_val): Replace parameters with
4710 a const gimple_match_op *.
4711 (gimple_simplify): Replace code_helper * and tree * parameters with
4712 a gimple_match_op * parameter.
4713 (gimple_resimplify1): Replace code_helper *, tree and tree *
4714 parameters with a gimple_match_op * parameter.
4715 (gimple_resimplify2): Likewise.
4716 (gimple_resimplify3): Likewise.
4717 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
4718 parameters with a gimple_match_op * parameter.
4719 * gimple-match-head.c (gimple_simplify): Change prototypes of
4720 auto-generated functions to take a gimple_match_op * instead of
4721 separate code_helper * and tree * parameters. Make the same
4722 change in the top-level overload and update calls to the
4723 gimple_resimplify routines. Update calls to the auto-generated
4724 functions and to maybe_push_res_to_seq in the publicly-facing
4725 operation-specific gimple_simplify overloads.
4726 (gimple_match_op::MAX_NUM_OPS): Define.
4727 (gimple_resimplify1): Replace rcode and ops with a single res_op
4728 parameter. Update call to gimple_simplify.
4729 (gimple_resimplify2): Likewise.
4730 (gimple_resimplify3): Likewise.
4731 (mprts_hook): Replace parameters with a gimple_match_op *.
4732 (maybe_build_generic_op): Likewise.
4733 (build_call_internal): Replace type, nargs and ops with
4734 a gimple_match_op *.
4735 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
4736 with a single gimple_match_op *. Update calls to mprts_hook,
4737 build_call_internal and gimple_simplified_result_is_gimple_val.
4738 Factor out code that is common to the tree_code and combined_fn cases.
4739 * genmatch.c (expr::gen_transform): Replace tem_code and
4740 tem_ops with a gimple_match_op called tem_op. Update calls
4741 to the gimple_resimplify functions and maybe_push_res_to_seq.
4742 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
4743 res_ops. Update call to the gimple_resimplify functions.
4744 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
4745 (decision_tree::gen): Make the functions take a gimple_match_op *
4746 called res_op instead of separate res_code and res_ops parameters.
4747 Update call accordingly.
4748 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
4749 and ops with a single res_op parameter. Update calls to
4750 maybe_build_generic_op and maybe_push_res_to_seq.
4751 (fold_stmt_1): Update calls to gimple_simplify and
4752 replace_stmt_with_simplification.
4753 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
4754 and gimple_simplified_result_is_gimple_val.
4755 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
4757 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
4758 with a gimple_match_op *.
4759 (vn_nary_build_or_lookup): Likewise. Update call to
4760 vn_nary_build_or_lookup_1.
4761 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
4762 gimple_match_op *. Update calls to the gimple_resimplify routines
4763 and to gimple_simplified_result_is_gimple_val.
4764 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
4765 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
4766 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
4767 (visit_nary_op): Likewise.
4768 (visit_reference_op_load): Likewise.
4770 2018-05-23 Luis Machado <luis.machado@linaro.org>
4772 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
4773 modifier for printing the step amount.
4775 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
4778 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
4781 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
4783 * doc/sourcebuild.texi (Endianness): New subsubsection.
4785 2018-05-23 Luis Machado <luis.machado@linaro.org>
4787 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4788 <prefetch_dynamic_strides>: New const bool field.
4789 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4790 prefetch_dynamic_strides.
4791 (exynosm1_prefetch_tune): Likewise.
4792 (thunderxt88_prefetch_tune): Likewise.
4793 (thunderx_prefetch_tune): Likewise.
4794 (thunderx2t99_prefetch_tune): Likewise.
4795 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
4797 (aarch64_override_options_internal): Update to set
4798 PARAM_PREFETCH_DYNAMIC_STRIDES.
4799 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
4800 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
4801 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
4802 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
4803 prefetch-dynamic-strides setting.
4805 2018-05-23 Luis Machado <luis.machado@linaro.org>
4807 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4808 <minimum_stride>: New const int field.
4809 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4810 minimum_stride field defaulting to -1.
4811 (exynosm1_prefetch_tune): Likewise.
4812 (thunderxt88_prefetch_tune): Likewise.
4813 (thunderx_prefetch_tune): Likewise.
4814 (thunderx2t99_prefetch_tune): Likewise.
4815 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
4816 <default_opt_level>: Set to 3.
4817 (aarch64_override_options_internal): Update to set
4818 PARAM_PREFETCH_MINIMUM_STRIDE.
4819 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
4820 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
4821 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
4822 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
4823 stride is constant and is below the minimum stride threshold.
4825 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4827 * config/arm/arm-cpus.in (mode26): Delete.
4828 (armv4): Delete mode26 reference.
4829 * config/arm/arm.c (arm_configure_build_target): Delete use of
4832 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
4834 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
4836 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
4837 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
4839 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
4840 (floatunsdidf2): Ditto.
4842 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
4844 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
4845 (fixuns_trunc<mode>si2_avx512f): Ditto.
4846 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
4847 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
4848 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
4850 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
4852 PR rtl-optimization/79985
4853 * df-scan.c (df_insn_refs_collect): Remove special case for
4854 global registers and asm statements.
4856 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
4858 * extend.texi (Global Register Variables): Rewrite the bullet list.
4859 Note that the register is available for allocation. Note that access
4860 via inline asm must use constraints. Add note about async-signal
4861 handlers. Remove paragraph about automagic register selection.
4863 2018-05-23 Richard Biener <rguenther@suse.de>
4865 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
4866 of fixed offset from memset VN.
4868 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
4870 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
4872 (alloc_cand_and_find_basis): Initialize first_interp field.
4873 (slsr_process_mul): Modify first_interp field.
4874 (slsr_process_add): Likewise.
4875 (slsr_process_cast): Modify first_interp field for each new
4877 (slsr_process_copy): Likewise.
4878 (dump_candidate): Dump first_interp field.
4879 (replace_mult_candidate): Process all interpretations, not just
4881 (replace_rhs_if_not_dup): Likewise.
4882 (replace_one_candidate): Likewise.
4884 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
4886 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
4888 (aarch64_needs_frame_chain): New function.
4889 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
4891 2018-05-23 Sudakshina Das <sudi.das@arm.com>
4894 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
4895 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
4896 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
4897 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
4898 as true for strict-align.
4899 (aarch64_can_inline_p): Perform checks even when callee has no
4900 attributes to check for strict alignment.
4901 * doc/extend.texi (AArch64 Function Attributes): Document
4903 * doc/invoke.texi: (AArch64 Options): Likewise.
4905 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
4907 PR tree-optimization/85853
4908 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
4909 the handling of the root of the node to...
4910 (vect_slp_analyze_node_operations_1): ...this new function,
4911 and run the whole thing with the child nodes' def types
4912 set according to their SLP node's def type.
4914 2018-05-23 Richard Biener <rguenther@suse.de>
4917 * tree-data-ref.c (create_runtime_alias_checks): Defer
4918 and ignore overflow warnings.
4920 2018-05-23 Yury Gribov <tetra2005@gmail.com>
4922 PR tree-optimization/85822
4923 * tree-vrp.c (is_masked_range_test): Fix handling of negative
4926 2018-05-23 Richard Biener <rguenther@suse.de>
4928 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
4929 memset constants via native_interpret_expr.
4931 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
4934 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
4936 (cgraph_node::create_alias): Likewise.
4937 (cgraph_node::get_availability): Check ifunc_resolver instead
4938 of looking up ifunc attribute.
4939 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4940 * varasm.c (do_assemble_alias): Likewise.
4941 (assemble_alias): Likewise.
4942 (default_binds_local_p_3): Likewise.
4943 * cgraph.h (cgraph_node): Add ifunc_resolver.
4944 (cgraph_node::only_called_directly_or_aliased_p): Return false
4946 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
4948 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
4949 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
4950 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
4951 instead of looking up ifunc attribute.
4953 2018-05-22 Luis Machado <luis.machado@linaro.org>
4955 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
4957 2018-05-22 Martin Sebor <msebor@redhat.com>
4960 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
4961 only when expasion succeeds.
4962 (expand_builtin_strcmp): Same.
4963 (expand_builtin_strncmp): Same.
4965 2018-05-22 Martin Sebor <msebor@redhat.com>
4967 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
4969 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
4970 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4972 * config/aarch64/aarch64-ldpstp.md: Replace uses of
4973 aarch64_mem_pair_operand with memory_operand and delete operand swapping
4975 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
4976 Add check for legitimate_address.
4977 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
4978 (aarch64_swap_ldrstr_operands): New.
4979 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
4982 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
4983 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4985 * config/aarch64/aarch64.md: New patterns to generate stp
4987 (store_pair_sw, store_pair_dw): New patterns to generate stp for
4988 single words and double words.
4989 (load_pair_sw, load_pair_dw): Likewise.
4990 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
4992 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
4994 * config/aarch64/aarch64-ldpstp.md: Modify peephole
4995 for different mode ldpstp and add peephole for merged zero stores.
4997 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
4999 (aarch64_gen_store_pair): Rename calls to match new patterns.
5000 (aarch64_gen_load_pair): Rename calls to match new patterns.
5001 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
5002 (load_pair<DREG:mode><DREG2:mode>): ... This.
5003 (store_pair<mode>): Rename to...
5004 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
5005 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
5007 (V_INT_EQUIV): Handle SImode.
5008 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
5011 2018-05-22 Martin Sebor <msebor@redhat.com>
5014 * calls.c (maybe_warn_nonstring_arg): Use string length to set
5015 or ajust the presumed bound on an operation to avoid unnecessary
5018 2018-05-22 Martin Sebor <msebor@redhat.com>
5020 PR tree-optimization/85826
5021 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
5022 assuming that a DECL necesarily has a constant size.
5024 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
5027 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
5029 2018-05-22 Richard Biener <rguenther@suse.de>
5031 PR tree-optimization/85834
5032 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
5033 non-constant and non-zero memset arguments.
5035 2018-05-22 Martin Liska <mliska@suse.cz>
5038 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
5040 2018-05-22 Richard Biener <rguenther@suse.de>
5042 PR tree-optimization/85863
5043 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
5044 comparisons when vectype is specified.
5045 (vectorizable_condition): Do not specify vectype for
5046 vect_is_simple_cond when SLP vectorizing.
5048 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
5051 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
5052 define __ibm128 as long double.
5053 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
5054 as a distinct type when IEEE 128-bit support is enabled.
5055 (init_float128_ieee): Fix up conversions between IFmode and IEEE
5056 128-bit types to use the correct functions.
5057 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
5058 convert between 128-bit floating point types that have different
5059 modes but the same representation, instead of using gen_lowpart to
5061 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
5063 (IFKF_reg): New attributes to give the register constraints for
5065 (extend<mode>tf2_internal): New insns to mark an explicit
5066 conversion between 128-bit floating point types that have a
5067 different mode but share the same representation.
5069 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
5071 PR tree-optimization/85814
5072 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
5073 a null return from get_strinfo when unsharing the next
5074 strinfo in the chain.
5076 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
5079 * varasm.c (weak_finish): Clean up weak_decls.
5081 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5083 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
5084 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
5085 UNSPEC_UADALP values.
5086 * config/aarch64/iterators.md (ABAL): New int iterator.
5089 (sur): Add mappings for the above.
5090 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
5092 (aarch64_<sur>abal<mode>_4): Likewise.
5093 (aarch64_<sur>adalp<mode>_3): Likewise.
5094 (<sur>sadv16qi): New define_expand.
5096 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
5098 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
5099 (*movdf_internal): Ditto.
5100 (*rcpsf2_sse): Ditto.
5101 (*rsqrtsf2_sse): Ditto.
5102 (*sqrt<mode>2_sse): Ditto.
5104 2018-05-21 Tamar Christina <tamar.christina@arm.com>
5106 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
5108 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
5109 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
5110 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
5111 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
5113 * config/aarch64/arm_neon.h: Likewise.
5114 * config/aarch64/iterators.md (VQ_I): New.
5116 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
5118 * config.gcc: Add arc/t-multilib-linux to tmake_file for
5120 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
5123 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
5125 * config/nds32/constraints.md (S): New constraint.
5126 * config/nds32/nds32.md (call_internal): Use constraint S.
5127 (call_value_internal): Likewise.
5128 (sibcall_internal): Likewise.
5129 (sibcall_value_internal): Likewise.
5131 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
5132 Chung-Ju Wu <jasonwucj@gmail.com>
5134 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
5137 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
5138 Chung-Ju Wu <jasonwucj@gmail.com>
5140 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
5141 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
5142 (nds32_rtx_costs_impl): Simplify.
5143 (nds32_address_cost_impl): Simplify.
5144 (nds32_init_rtx_costs): New function.
5145 (nds32_rtx_costs_speed_prefer): Likewise.
5146 (nds32_rtx_costs_size_prefer): Likewise.
5147 (nds32_address_cost_speed_prefer): Likewise.
5148 (nds32_address_cost_speed_fwprop): Likewise.
5149 (nds32_address_cost_size_prefer): Likewise.
5150 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
5151 * config/nds32/nds32.c (nds32_option_override): Use
5152 nds32_init_rtx_costs function.
5154 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
5156 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
5157 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
5158 (TARGET_PIPELINE_N8): Likewise.
5159 (TARGET_PIPELINE_N10): Likewise.
5160 (TARGET_PIPELINE_N13): Likewise.
5161 (TARGET_PIPELINE_GRAYWOLF): Likewise.
5163 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
5165 * config/nds32/nds32-fpu.md: Update copyright year.
5167 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5169 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
5171 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5173 * config/nds32/nds32.c
5174 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
5175 * config/nds32/nds32.opt (minline-asm-r15): New option.
5177 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5179 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
5181 * config/nds32/nds32.md (abssi2): New pattern.
5183 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
5185 * config/i386/i386.md (rex64namesuffix): New mode attribute.
5186 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
5187 Merge insn pattern from sse_cvtsi2ss<round_name> and
5188 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
5189 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
5190 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
5191 using SWI48 mode iterator.
5192 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
5193 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
5194 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
5195 pattern from sse_cvttss2si<round_saeonly_name>
5196 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
5197 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
5198 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
5199 using SWI48 mode iterator.
5200 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
5201 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
5202 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
5203 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
5204 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
5205 using SWI48 mode iterator.
5206 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
5207 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
5208 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
5209 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
5210 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
5211 SWI48 mode iterator.
5212 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
5213 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
5214 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
5215 pattern from sse_cvttsd2si<round_saeonly_name>
5216 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
5218 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5220 * config/nds32/nds32-md-auxiliary.c
5221 (nds32_valid_smw_lwm_base_p): Refine.
5222 (nds32_output_smw_single_word): Refine.
5223 (nds32_output_smw_double_word): New.
5224 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
5226 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5228 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
5229 (nds32_output_stack_pop): Refine.
5230 (nds32_expand_unaligned_load): Refine.
5231 (nds32_expand_unaligned_store): Refine.
5233 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5234 Chung-Ju Wu <jasonwucj@gmail.com>
5236 * config/nds32/constants.md: Add TP_REGNUM constant.
5237 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
5238 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
5240 * config/nds32/nds32-doubleword.md: Consider flag_pic.
5241 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
5242 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
5243 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
5244 and PIC code generation.
5245 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
5247 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
5249 * config/nds32/nds32.md: Support TLS and PIC.
5250 * config/nds32/nds32.c: Support TLS and PIC.
5251 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
5252 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
5255 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5257 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
5258 mode with E_ prefix.
5260 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5261 Chung-Ju Wu <jasonwucj@gmail.com>
5263 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
5264 * config/nds32/nds32-md-auxiliary.c
5265 (symbolic_reference_mentioned_p): New.
5266 (nds32_legitimize_ict_address): New.
5267 (nds32_expand_ict_move): New.
5268 (nds32_indirect_call_referenced_p): New.
5269 (nds32_symbol_binds_local_p): Delete.
5270 (nds32_long_call_p): Modify.
5271 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
5272 * config/nds32/nds32-protos.h
5273 (symbolic_reference_mentioned_p): Declare.
5274 (nds32_legitimize_ict_address): Declare.
5275 (nds32_expand_ict_move): Declare.
5276 (nds32_indirect_call_referenced_p): Declare.
5277 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
5278 (nds32_relax_group): Use nds32_ict_const_p as condition.
5279 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
5280 (nds32_asm_file_start): Output ict_model directive in asm code.
5281 (nds32_legitimate_address_p): Consider indirect call.
5282 (nds32_print_operand): Consider indirect call.
5283 (nds32_print_operand_address): Consider indirect call.
5284 (nds32_insert_attributes): Handle "indirect_call" attribute.
5285 (TARGET_LEGITIMATE_ADDRESS_P): Define.
5286 (TARGET_LEGITIMATE_CONSTANT_P): Define.
5287 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
5288 (TARGET_DELEGITIMIZE_ADDRESS): Define.
5289 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
5290 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
5291 (TARGET_ICT_MODEL_SMALL): Define.
5292 (TARGET_ICT_MODEL_LARGE): Define.
5293 * config/nds32/nds32.md (movsi): Consider ict model.
5294 (call, call_value): Consider ict model.
5295 (sibcall, sibcall_value): Consider ict model.
5296 * config/nds32/nds32.opt (mict-model): New option.
5297 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
5300 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
5301 Monk Chiang <sh.chiang04@gmail.com>
5302 Jim Wilson <jimw@sifive.com>
5304 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
5305 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
5306 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
5307 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
5308 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
5309 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
5310 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
5311 compute save_libcall_adjustment properly.
5312 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
5313 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
5314 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
5315 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
5316 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
5317 (ABI_SPEC): Handle mabi=ilp32e.
5318 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
5319 (RVE): Add RVE mask.
5320 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
5321 <-march>: Add rv32e as an example.
5323 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
5326 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
5327 (intra_create_variable_infos): Handle C++ constructors.
5329 2018-05-18 Martin Liska <mliska@suse.cz>
5331 * passes.def: Remove a redundant pass.
5333 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
5336 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
5338 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5340 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
5342 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
5344 (armv2, armv2a, armv3, armv3m): Delete architectures.
5345 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
5346 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
5347 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
5349 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
5350 (*mulsidi3adddi): Likewise.
5351 (mulsidi3): Likewise.
5352 (*mulsidi3_nov6): Likewise.
5353 (umulsidi3): Likewise.
5354 (umulsidi3_nov6): Likewise.
5355 (umaddsidi4): Likewise.
5356 (*umulsidi3adddi): Likewise.
5357 (smulsi3_highpart): Likewise.
5358 (*smulsi3_highpart_nov6): Likewise.
5359 (umulsi3_highpart): Likewise.
5360 (*umulsi3_highpart_nov6): Likewise.
5361 * config/arm/arm.h (arm_arch3m): Delete.
5362 * config/arm/arm.c (arm_arch3m): Delete.
5363 (arm_option_override_internal): Update armv3-related comment.
5364 (arm_configure_build_target): Delete use of isa_bit_mode32.
5365 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
5366 (arm_rtx_costs_internal): Delete check of arm_arch3m.
5367 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
5369 (mulusa3): Likewise.
5370 * config/arm/arm-protos.h (arm_arch3m): Delete.
5371 * config/arm/arm-tables.opt: Regenerate.
5372 * config/arm/arm-tune.md: Likewise.
5373 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
5374 deleted architectures.
5376 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5378 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
5379 (armv5t, armv5te): New features.
5380 (ARMv5, ARMv5e): Delete fgroups.
5381 (ARMv5t, ARMv5te): Adjust for above changes.
5383 (armv5, armv5e): Delete arches.
5384 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
5386 (*call_reg_arm): Likewise.
5387 (*call_value_reg_armv5): Likewise.
5388 (*call_value_reg_arm): Likewise.
5389 (*call_symbol): Likewise.
5390 (*call_value_symbol): Likewise.
5391 (*sibcall_insn): Likewise.
5392 (*sibcall_value_insn): Likewise.
5394 (prefetch): Likewise.
5395 (define_split and define_peephole2 dependent on arm_arch5):
5397 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
5399 (TARGET_ARM_QBIT): Likewise.
5400 (TARGET_DSP_MULTIPLY): Likewise.
5401 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
5402 (arm_arch5, arm_arch5e): Delete.
5403 (arm_arch5t, arm_arch5te): Declare.
5404 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
5405 (arm_arch5t): Declare.
5406 (arm_option_reconfigure_globals): Update for the above.
5407 (arm_options_perform_arch_sanity_checks): Update comment, replace
5408 use of arm_arch5 with arm_arch5t.
5409 (use_return_insn): Likewise.
5410 (arm_emit_call_insn): Likewise.
5411 (output_return_instruction): Likewise.
5412 (arm_final_prescan_insn): Likewise.
5413 (arm_coproc_builtin_available): Likewise.
5414 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
5415 arm_arch5e with arm_arch5t and arm_arch5te.
5416 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
5417 (arm_arch5t, arm_arch5te): Declare.
5418 * config/arm/arm-tables.opt: Regenerate.
5419 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
5420 * config/arm/t-multilib: Likewise.
5421 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
5422 instead of arm_arch5.
5423 (*call_reg_thumb1): Likewise.
5424 (*call_value_reg_thumb1_v5): Likewise.
5425 (*call_value_reg_thumb1): Likewise.
5426 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
5428 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
5430 2018-05-18 Martin Liska <mliska@suse.cz>
5432 PR gcov-profile/84846
5433 * doc/gcov.texi: Document -t option of gcov tool.
5435 2018-05-18 Martin Liska <mliska@suse.cz>
5437 PR gcov-profile/84846
5438 * gcov.c (print_usage): Add new -t option.
5439 (process_args): Handle the option.
5440 (generate_results): Use stdout as output when requested by
5443 2018-05-18 Martin Liska <mliska@suse.cz>
5445 PR gcov-profile/84846
5446 * coverage.c (coverage_init): Write PWD to .gcno file.
5447 * doc/gcov.texi: Document how working directory is printed.
5448 * gcov-dump.c (dump_gcov_file): Print PWD.
5449 * gcov.c (output_intermediate_file): Likewise.
5450 (read_graph_file): Read PWD string.
5451 (output_lines): Print PWD.
5453 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5456 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
5457 for retval and return false if all args to phi are zero.
5459 2018-05-18 Richard Biener <rguenther@suse.de>
5461 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
5463 (evrp_dom_walker::before_dom_children): Call it.
5465 2018-05-18 Richard Biener <rguenther@suse.de>
5467 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
5468 results when processing array refs with variable index.
5470 2018-05-18 Toon Moene <toon@moene.org>
5472 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
5473 directly after that of -floop-interchange. Indicate that both
5474 options are enabled by default when specifying -O3.
5476 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5478 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
5479 iterator. Delete separate integer-mode vec_set<mode> expander.
5480 (aarch64_simd_vec_setv2di): Delete.
5481 (vec_setv2di): Delete.
5482 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
5483 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
5484 the "w, r" alternative.
5486 2018-05-18 Martin Liska <mliska@suse.cz>
5488 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
5489 * tree-pass.h (make_pass_lower_switch_O0): New function.
5490 * tree-switch-conversion.c (node_has_low_bound): Remove.
5491 (node_has_high_bound): Likewise.
5492 (node_is_bounded): Likewise.
5493 (class pass_lower_switch): Make it a template type and create
5495 (pass_lower_switch::execute): Add template argument.
5496 (make_pass_lower_switch): New function.
5497 (make_pass_lower_switch_O0): New function.
5498 (do_jump_if_equal): Remove.
5499 (emit_case_nodes): Simplify to just handle all 3 cases and leave
5500 all the hard work to tree optimization passes.
5502 2018-05-18 Martin Liska <mliska@suse.cz>
5504 * dbgcnt.c (limit_low): Renamed from limit.
5505 (limit_high): New variable.
5506 (dbg_cnt_is_enabled): Check for upper limit.
5507 (dbg_cnt): Adjust dumping.
5508 (dbg_cnt_set_limit_by_index): Add new argument for high
5510 (dbg_cnt_set_limit_by_name): Likewise.
5511 (dbg_cnt_process_single_pair): Parse new format.
5512 (dbg_cnt_process_opt): Use strtok.
5513 (dbg_cnt_list_all_counters): Remove 'value' and add
5515 * doc/invoke.texi: Document changes.
5517 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
5519 * doc/sourcebuild.texi (scalar_all_fma): Document.
5520 * tree.def (FMA_EXPR): Delete.
5521 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
5522 * internal-fn.c (ternary_direct): New macro.
5523 (expand_ternary_optab_fn): Likewise.
5524 (direct_ternary_optab_supported_p): Likewise.
5525 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
5526 * builtins.c (fold_builtin_fma): Delete.
5527 (fold_builtin_3): Don't call it.
5528 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
5529 * expr.c (expand_expr_real_2): Likewise.
5530 * fold-const.c (operand_equal_p): Likewise.
5531 (fold_ternary_loc): Likewise.
5532 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
5533 * gimple.c (DEFTREECODE): Likewise.
5534 * gimplify.c (gimplify_expr): Likewise.
5535 * optabs-tree.c (optab_for_tree_code): Likewise.
5536 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
5537 * tree-eh.c (operation_could_trap_p): Likewise.
5538 (stmt_could_throw_1_p): Likewise.
5539 * tree-inline.c (estimate_operator_cost): Likewise.
5540 * tree-pretty-print.c (dump_generic_node): Likewise.
5541 (op_code_prio): Likewise.
5542 * tree-ssa-loop-im.c (stmt_cost): Likewise.
5543 * tree-ssa-operands.c (get_expr_operands): Likewise.
5544 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
5545 * fold-const-call.h (fold_fma): Delete.
5546 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
5547 CFN_FNMA and CFN_FNMS.
5549 * genmatch.c (combined_fn): New enum.
5550 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
5551 (commutative_op): New function.
5552 (commutate): Use it. Handle more than 2 operands.
5553 (dt_operand::gen_gimple_expr): Use commutative_op.
5554 (parser::parse_expr): Allow :c to be used with non-binary
5555 operators if the commutative operand is known.
5556 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
5557 CFN_FMS, CFN_FNMA and CFN_FNMS.
5558 (backprop::process_assign_use): Remove FMA_EXPR handling.
5559 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
5560 (gen_hsa_fma): New function.
5561 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
5562 IFN_FNMA and IFN_FNMS.
5563 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
5564 * gimple-fold.h (follow_all_ssa_edges): Declare.
5565 * gimple-fold.c (follow_all_ssa_edges): New function.
5566 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
5567 gimple_build interface and use follow_all_ssa_edges to fold the result.
5568 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
5569 instead of checking for optabs directly.
5570 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
5571 rather than FMA_EXPRs.
5572 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
5573 call to IFN_FMA instead of an FMA_EXPR.
5575 2018-05-17 Jim Wilson <jimw@sifive.com>
5577 * expr.c (do_tablejump): When converting index to Pmode, if we have a
5578 sign extended promoted subreg, and the range does not have the sign bit
5579 set, then do a sign extend.
5581 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
5582 test, check for sign extended subreg and/or constant operands, and
5583 do a sign extend in that case.
5585 2018-05-17 Steve Ellcey <sellcey@cavium.com>
5587 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
5588 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
5590 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
5591 Change logics_shift_reg to logics_shift_imm.
5592 (thunderx2t99_fp_loadpair_basic): Delete.
5593 (thunderx2t99_fp_storepair_basic): Delete.
5594 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
5595 (thunderx2t99_asimd_polynomial): Delete.
5596 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
5597 and neon_fp_mul_d_scalar_q.
5598 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
5599 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
5600 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
5601 (thunderx2t99_asimd_lut): Add missing tbl types.
5602 (thunderx2t99_asimd_ext): Delete.
5603 (thunderx2t99_asimd_load1_1_mult): Delete.
5604 (thunderx2t99_asimd_load1_2_mult): Delete.
5605 (thunderx2t99_asimd_load1_ldp): New.
5606 (thunderx2t99_asimd_load1): New.
5607 (thunderx2t99_asimd_load2): Add missing *load2* types.
5608 (thunderx2t99_asimd_load3): New.
5609 (thunderx2t99_asimd_load4): New.
5610 (thunderx2t99_asimd_store1_1_mult): Delete.
5611 (thunderx2t99_asimd_store1_2_mult): Delete.
5612 (thunderx2t99_asimd_store2_mult): Delete.
5613 (thunderx2t99_asimd_store2_onelane): Delete.
5614 (thunderx2t99_asimd_store_stp): New.
5615 (thunderx2t99_asimd_store1): New.
5616 (thunderx2t99_asimd_store2): New.
5617 (thunderx2t99_asimd_store3): New.
5618 (thunderx2t99_asimd_store4): New.
5620 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
5622 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
5623 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
5625 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
5626 Segher Boessenkool <segher@kernel.crashing.org>
5629 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
5632 2018-05-17 Richard Biener <rguenther@suse.de>
5634 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
5635 for pruning loop and prune defs feeding only already visited PHIs.
5637 2018-05-17 Richard Biener <rguenther@suse.de>
5639 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
5641 2018-05-17 Bin Cheng <bin.cheng@arm.com>
5642 Richard Biener <rguenther@suse.de>
5644 PR tree-optimization/85793
5645 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
5646 for VMAT_ELEMENTWISE.
5648 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
5650 * internal-fn.h (lookup_internal_fn): Declare
5651 * internal-fn.c (lookup_internal_fn): New function.
5652 * gimple.c (gimple_build_call_from_tree): Handle calls to
5654 * gimple-pretty-print.c (dump_gimple_call): Print "." before
5655 internal function names.
5656 * tree-pretty-print.c (dump_generic_node): Likewise.
5657 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
5659 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
5661 * gimple-fold.h (gimple_build): Make the function forms take
5662 combined_fn rather than built_in_function.
5663 (gimple_simplify): Likewise.
5664 * gimple-match-head.c (gimple_simplify): Likewise.
5665 * gimple-fold.c (gimple_build): Likewise.
5666 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
5667 rather than gimple_build_call_internal.
5668 (get_initial_defs_for_reduction): Likewise.
5669 (vect_create_epilog_for_reduction): Likewise.
5670 (vectorizable_live_operation): Likewise.
5672 2018-05-17 Martin Liska <mliska@suse.cz>
5674 * gimple-ssa-sprintf.c (format_directive): Do not use
5675 space in between 'G_' and '('.
5677 2018-05-17 Jakub Jelinek <jakub@redhat.com>
5680 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
5681 even if the mask is not all ones.
5684 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
5686 (ix86_gimple_fold_builtin): Likewise.
5689 * config/i386/i386.c: Include tree-vector-builder.h.
5690 (ix86_vector_shift_count): New function.
5691 (ix86_fold_builtin): Fold shift builtins by scalar count.
5692 (ix86_gimple_fold_builtin): Likewise.
5694 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
5695 _mm512_setzero): New intrinsics.
5697 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5698 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5700 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
5701 code generation for cases where splatting a value is not useful.
5702 * simplify-rtx.c (simplify_ternary_operation): Simplify
5703 vec_merge across a vec_duplicate and a paradoxical subreg forming
5704 a vector mode to a vec_concat.
5706 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
5708 * config.gcc: Support "goldmont-plus".
5709 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
5711 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5712 PROCESSOR_GOLDMONT_PLUS.
5713 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
5714 (processor_target_table): Add "goldmont-plus".
5715 (PTA_GOLDMONT_PLUS): Define.
5716 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
5717 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
5718 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
5719 (fold_builtin_cpu): Add "goldmont-plus".
5720 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
5721 (ix86_option_override_internal): Add "goldmont-plus".
5722 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
5723 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
5724 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
5725 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
5727 2018-05-17 Richard Biener <rguenther@suse.de>
5729 PR tree-optimization/85757
5730 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
5731 remove defs that only feed that PHI from further processing.
5733 2018-05-16 Jim Wilson <jimw@sifive.com>
5735 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
5737 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
5739 2018-05-16 Mark Wielaard <mark@klomp.org>
5741 * dwarf2out.c (count_index_strings): New function.
5742 (output_indirect_strings): Call count_index_strings and generate
5743 header for dwarf_version >= 5.
5745 2018-05-16 Mark Wielaard <mark@klomp.org>
5747 * dwarf2out.c (dwarf_FORM): New function.
5748 (set_indirect_string): Use dwarf_FORM.
5749 (reset_indirect_string): Likewise.
5750 (size_of_die): Likewise.
5751 (value_format): Likewise.
5752 (output_die): Likewise.
5753 (add_skeleton_AT_string): Likewise.
5754 (output_macinfo_op): Likewise.
5755 (index_string): Likewise.
5756 (output_index_string_offset): Likewise.
5757 (output_index_string): Likewise.
5758 (count_index_strings): Likewise.
5760 2018-05-16 Carl Love <cel@us.ibm.com>
5762 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
5763 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
5765 2018-05-16 Martin Jambor <mjambor@suse.cz>
5767 * ipa-prop.c (ipa_free_all_edge_args): Remove.
5768 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
5770 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
5772 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
5773 (fnma<mode>4): Likewise.
5774 (fms<mode>4): Likewise.
5775 (fnms<mode>4): Likewise.
5776 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
5777 (aarch64_fnma<mode>4): Likewise.
5778 (aarch64_fms<mode>4): Likewise.
5779 (aarch64_fnms<mode>4): Likewise.
5780 (aarch64_fnmadd<mode>4): Likewise.
5782 2018-05-16 Jason Merrill <jason@redhat.com>
5784 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
5786 2018-05-16 Richard Biener <rguenther@suse.de>
5788 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
5789 (dump_stmt_cost): Declare.
5790 (add_stmt_cost): Dump cost we add.
5791 (add_stmt_costs): New function.
5792 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
5794 (vect_analyze_stmt): Adjust prototype.
5795 (vectorizable_condition): Likewise.
5796 (vectorizable_live_operation): Likewise.
5797 (vectorizable_reduction): Likewise.
5798 (vectorizable_induction): Likewise.
5799 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
5800 cost vector to pass to vectorizable_ and record afterwards.
5801 (vect_model_reduction_cost): Take cost vector argument and adjust.
5802 (vect_model_induction_cost): Likewise.
5803 (vectorizable_reduction): Likewise.
5804 (vectorizable_induction): Likewise.
5805 (vectorizable_live_operation): Likewise.
5806 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
5807 SLP_TREE_NUMBER_OF_VEC_STMTS.
5808 (vect_analyze_slp_cost_1): Remove.
5809 (vect_analyze_slp_cost): Likewise.
5810 (vect_slp_analyze_node_operations): Take visited args and
5811 a target cost vector. Avoid processing already visited stmt sets.
5812 (vect_slp_analyze_operations): Use a local cost vector to gather
5813 costs and register those of non-discarded instances.
5814 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
5815 (vect_schedule_slp_instance): Remove copying of
5816 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
5818 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
5819 adding cost. Record cost entry location.
5820 (vect_prologue_cost_for_slp_op): Function to compute cost of
5821 a constant or invariant generated for SLP vect in the prologue,
5822 split out from vect_analyze_slp_cost_1.
5823 (vect_model_simple_cost): Make static. Adjust for SLP costing.
5824 (vect_model_promotion_demotion_cost): Likewise.
5825 (vect_model_store_cost): Likewise, make static.
5826 (vect_model_load_cost): Likewise.
5827 (vectorizable_bswap): Add cost vector arg and adjust.
5828 (vectorizable_call): Likewise.
5829 (vectorizable_simd_clone_call): Likewise.
5830 (vectorizable_conversion): Likewise.
5831 (vectorizable_assignment): Likewise.
5832 (vectorizable_shift): Likewise.
5833 (vectorizable_operation): Likewise.
5834 (vectorizable_store): Likewise.
5835 (vectorizable_load): Likewise.
5836 (vectorizable_condition): Likewise.
5837 (vectorizable_comparison): Likewise.
5838 (can_vectorize_live_stmts): Likewise.
5839 (vect_analyze_stmt): Likewise.
5840 (vect_transform_stmt): Adjust calls to vectorizable_*.
5841 * tree-vectorizer.c: Include gimple-pretty-print.h.
5842 (dump_stmt_cost): New function.
5844 2018-05-16 Richard Biener <rguenther@suse.de>
5846 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
5847 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
5848 * tree-ssa-dse.c: Include tree-ssa-loop.h.
5849 (check_name): New callback.
5850 (dse_classify_store): Track cycles via a visited bitmap of PHI
5851 defs and simplify handling of in-loop and across loop dead stores
5852 and properly fail for loop-variant refs. Handle byte-tracking with
5853 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
5856 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
5858 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
5859 (vect_get_mask_type_for_stmt): Likewise.
5860 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
5862 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
5863 to determine the statement's vector type and the vector type that
5864 should be used for calculating nunits. Deal with cases in which
5865 the type has to be deferred.
5866 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
5867 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
5868 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
5869 (vect_determine_vf_for_stmt): New functions, split out from...
5870 (vect_determine_vectorization_factor): ...here.
5871 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
5872 (vect_get_mask_type_for_stmt): New functions, split out from
5873 vect_determine_vectorization_factor.
5875 2018-05-16 Richard Biener <rguenther@suse.de>
5877 * tree-cfg.c (verify_gimple_assign_ternary): Properly
5878 verify the [VEC_]COND_EXPR embedded comparison.
5880 2018-05-15 Martin Sebor <msebor@redhat.com>
5882 PR tree-optimization/85753
5883 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
5884 RECORD_TYPE in addition to ARRAY_TYPE.
5886 2018-05-15 Martin Sebor <msebor@redhat.com>
5889 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
5891 2018-05-15 Richard Biener <rguenther@suse.de>
5893 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
5894 add by_clobber_p one. Change algorithm to collect all defs
5895 representing uses we need to walk and try reducing them to
5896 a single one before failing.
5897 (dse_dom_walker::dse_optimize_stmt): Adjust.
5899 2018-05-13 Mark Wielaard <mark@klomp.org>
5901 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
5902 (size_of_loc_descr): Likewise.
5903 (output_loc_operands): Likewise.
5904 (output_loc_operands_raw): Likewise.
5905 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
5906 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
5907 (hash_loc_operands): Likewise.
5908 (compare_loc_operands): Likewise.
5910 2018-05-14 Mark Wielaard <mark@klomp.org>
5912 * dwarf2out.c (count_index_addrs): New function.
5913 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
5915 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5917 PR tree-optimization/83648
5918 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
5919 return value as malloc candidate.
5921 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5924 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
5925 param as true in call to suggest_attribute.
5927 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
5929 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
5930 -mreadonly-in-sdata.
5932 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5934 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
5936 (aarch64_crypto_aesd_fused): Likewise.
5938 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
5940 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
5941 (movsi_aarch64): Likewise.
5942 (load_pairsi): Likewise.
5943 (load_pairdi): Likewise.
5944 (store_pairsi): Likewise.
5945 (store_pairdi): Likewise.
5946 (load_pairsf): Likewise.
5947 (load_pairdf): Likewise.
5948 (store_pairsf): Likewise.
5949 (store_pairdf): Likewise.
5950 (zero_extend): Likewise.
5951 (trunc): Swap alternatives.
5952 (fcvt_target): Add '?' to prefer w over r.
5954 2018-05-14 Jakub Jelinek <jakub@redhat.com>
5957 * config/i386/i386.md: Disallow non-commutative arithmetics in
5958 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
5959 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
5960 in the peephole2 before it.
5962 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
5964 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
5965 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
5966 (ix86_handle_option): Handle -mcldemote.
5967 * config.gcc: New header.
5968 * config/i386/cldemoteintrin.h: New file.
5969 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
5970 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
5972 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5973 OPTION_MASK_ISA_CLDEMOTE.
5974 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
5975 (ix86_valid_target_attribute_inner_p): Ditto.
5976 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
5977 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
5978 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
5979 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
5980 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
5982 * config/i386/i386.opt: Add -mcldemote.
5983 * config/i386/x86intrin.h: New header.
5984 * doc/invoke.texi: Add -mcldemote.
5986 2018-05-14 Richard Biener <rguenther@suse.de>
5988 * doc/match-and-simplify.texi: Adjust :s documentation.
5990 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
5992 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
5993 intended memcpy size.
5994 (REORDER_45): Likewise.
5996 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
5998 * sort.cc: New file.
5999 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
6000 * vec.c (qsort_chk): Use gcc_qsort.
6001 * Makefile.in (OBJS-libcommon): Add sort.o.
6002 (build/sort.o): New target. Use it...
6003 (BUILD_RTL): ... here, and...
6004 (build/gencfn-macros): ... here, and...
6005 (build/genmatch): ... here.
6007 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
6008 Chung-Ju Wu <jasonwucj@gmail.com>
6010 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
6011 * config/nds32/nds32-graywolf.md: New file.
6012 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
6013 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
6015 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
6016 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
6017 * config/nds32/nds32.md (pipeline_model): Add graywolf.
6018 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
6019 * config/nds32/pipelines.md: Include n15 settings.
6021 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
6022 Chung-Ju Wu <jasonwucj@gmail.com>
6024 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
6025 * config/nds32/nds32-n13.md: New file.
6026 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
6027 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
6029 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
6030 * config/nds32/nds32.md (pipeline_model): Add n13.
6031 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
6032 * config/nds32/pipelines.md: Include n13 settings.
6034 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
6035 Chung-Ju Wu <jasonwucj@gmail.com>
6037 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
6038 * config/nds32/nds32-n10.md: New file.
6039 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
6040 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
6042 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
6043 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
6044 * config/nds32/nds32.md (pipeline_model): Add n10.
6045 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
6046 * config/nds32/pipelines.md: Include n10 settings.
6048 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
6049 Kito Cheng <kito.cheng@gmail.com>
6050 Chung-Ju Wu <jasonwucj@gmail.com>
6052 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
6053 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
6054 Add enum values for DSP extension instructions.
6055 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
6057 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
6058 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
6060 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
6061 * config/nds32/nds32-dspext.md: New file for DSP implementation.
6062 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
6063 * config/nds32/nds32-intrinsic.md: Likewise.
6064 * config/nds32/nds32_intrinsic.h: Likewise.
6065 * config/nds32/nds32-md-auxiliary.c: Likewise.
6066 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
6067 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
6068 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
6069 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
6070 * config/nds32/nds32-protos.h: New declarations for DSP extension.
6071 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
6072 TYPE_DMAC in switch statement.
6073 * config/nds32/nds32.c: New checking and implementation for DSP
6074 extension instructions.
6075 * config/nds32/nds32.h: Likewise.
6076 * config/nds32/nds32.md: Likewise.
6077 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
6078 * config/nds32/predicates.md: Implement new predicates for DSP
6081 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
6083 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
6084 Reformat alternatives and attributes so it is easier to identify
6085 which constraints/attributes go with which instruction.
6086 (mov<mode>_hardfloat32, FMOVE64): Likewise.
6087 (mov<mode>_softfloat32, FMOVE64): Likewise.
6088 (mov<mode>_hardfloat64, FMOVE64): Likewise.
6089 (mov<mode>_softfloat64, FMOVE64): Likewise.
6091 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
6093 * doc/extend.texi (PowerPC Built-in Functions): Rename this
6095 (Basic PowerPC Built-in Functions): The new name of the
6096 subsection previously known as "PowerPC Built-in Functions".
6097 (Basic PowerPC Built-in Functions Available on all Configurations):
6099 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
6100 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
6101 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
6102 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
6104 2018-05-11 Martin Jambor <mjambor@suse.cz>
6107 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
6110 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
6113 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
6115 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
6117 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
6118 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
6119 (ix86_handle_option): Handle -mwaitpkg.
6120 * config.gcc: New header.
6121 * config/i386/cpuid.h (bit_WAITPKG): New bit.
6122 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
6123 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
6125 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6126 OPTION_MASK_ISA_WAITPKG.
6127 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
6128 (ix86_option_override_internal): Add PTA_WAITPKG.
6129 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
6130 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
6131 IX86_BUILTIN_TPAUSE.
6132 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
6133 __builtin_ia32_umwait and __builtin_ia32_tpause.
6134 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
6135 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
6136 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
6137 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
6138 UNSPECV_TPAUSE): New.
6139 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
6140 * config/i386/i386.opt: Add -mwaitpkg.
6141 * config/i386/waitpkgintrin.h: New file.
6142 * config/i386/x86intrin.h: New header.
6143 * doc/invoke.texi: Add -mwaitpkg.
6145 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
6148 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
6150 (cortex-m0): Use armv6s-m isa.
6151 (cortex-m0plus): Likewise.
6152 (cortex-m1): Likewise.
6153 (cortex-m0.small-multiply): Likewise.
6154 (cortex-m0plus.small-multiply): Likewise.
6155 (cortex-m1.small-multiply): Likewise.
6157 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
6158 Jakub Jelinek <jakub@redhat.com>
6160 PR tree-optimization/85692
6161 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
6162 source permute as well.
6164 2018-05-11 Martin Liska <mliska@suse.cz>
6167 * doc/extend.texi: Document LLVM style format for no_sanitize
6170 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
6172 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
6173 mode_supports_vsx_dform_quad to mode_supports_dq_form.
6174 (mode_supports_vsx_dform_quad): Likewise.
6175 (mode_supports_vmx_dform): Move these functions to be next to the
6176 other mode_supports functions.
6177 (mode_supports_dq_form): Likewise.
6178 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
6179 mode_supports_dq_form.
6180 (reg_offset_addressing_ok_p): Likewise.
6181 (offsettable_ok_by_alignment): Likewise.
6182 (rs6000_legitimate_offset_address_p): Likewise.
6183 (legitimate_lo_sum_address_p): Likewise.
6184 (rs6000_legitimize_address): Likewise.
6185 (rs6000_legitimize_reload_address): Likewise.
6186 (rs6000_secondary_reload_inner): Likewise.
6187 (rs6000_preferred_reload_class): Likewise.
6188 (rs6000_output_move_128bit): Likewise.
6190 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
6192 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
6193 Generate SImode target register for null target.
6194 <case IX86_BUILTIN_XGETBV>: Ditto.
6195 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
6196 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
6198 2018-05-10 Carl Love <cel@us.ibm.com>
6200 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
6201 dcbtt and dcbtstt if operands[2] is 0.
6203 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
6206 * config/i386/sse.md (usadv64qi): New expander.
6208 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
6210 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
6211 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
6212 -maltivec=be support.
6213 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
6214 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
6215 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
6216 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
6217 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
6218 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
6219 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
6220 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
6221 altivec_vsumsws): Adjust.
6222 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
6223 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
6224 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
6226 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
6227 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
6228 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
6229 (altivec_lve<VI_char>x): Delete expand.
6230 (*altivec_lve<VI_char>x_internal): Rename to...
6231 (altivec_lve<VI_char>x): ... this.
6232 (altivec_lvxl_<mode>): Delete expand.
6233 (*altivec_lvxl_<mode>_internal): Rename to ...
6234 (altivec_lvxl_<mode>): ... this.
6235 (altivec_stvxl_<mode>): Delete expand.
6236 (*altivec_stvxl_<mode>_internal): Rename to ...
6237 (altivec_stvxl_<mode>): ... this.
6238 (altivec_stve<VI_char>x): Delete expand.
6239 (*altivec_stve<VI_char>x_internal): Rename to ...
6240 (altivec_stve<VI_char>x): ... this.
6241 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
6242 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
6243 reduc_plus_scal_<mode>): Adjust.
6244 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
6246 (rs6000_cpu_cpp_builtins): Adjust.
6247 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
6248 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
6249 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
6250 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
6251 -maltivec=be support.
6252 (rs6000_split_vec_extract_var): Adjust.
6253 (rs6000_split_v4si_init): Adjust.
6254 (swap_selector_for_mode): Delete.
6255 (altivec_expand_lvx_be, altivec_expand_stvx_be,
6256 altivec_expand_stvex_be): Delete.
6257 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
6258 -maltivec=be support.
6259 (rs6000_gimple_fold_builtin): Ditto.
6260 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
6262 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
6263 (TARGET_DIRECT_MOVE_64BIT): Adjust.
6264 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
6265 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
6266 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
6267 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
6268 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
6269 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
6270 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
6271 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
6272 anonymous split): Adjust.
6273 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
6274 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
6276 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
6278 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
6279 when --with-gxx-include-dir is also specified.
6280 * configure: Regenerate.
6282 2018-05-09 Jim Wilson <jimw@sifive.com>
6285 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
6286 * config/riscv/t-withmultilib: New.
6287 * config/riscv/withmultilib.h: New.
6288 * doc/install.texi: Document RISC-V --with-multilib-list support.
6290 2018-05-09 Richard Biener <rguenther@suse.de>
6292 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
6294 (vect_bb_vectorization_profitable_p): Adjust. Compute
6295 actual scalar cost using the cost vector and the add_stmt_cost
6298 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6300 PR rtl-optimization/85645
6301 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
6302 in the REG_CFA_REGISTER note for LR, don't leave it empty.
6304 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6306 PR rtl-optimization/85645
6307 * shrink-wrap.c (spread_components): Return a boolean saying if
6308 anything was changed.
6309 (try_shrink_wrapping_separate): Iterate spread_components until
6310 nothing changes anymore.
6312 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6314 PR rtl-optimization/85645
6315 * regrename.c (build_def_use): Also kill the chains that include the
6316 destination of a REG_CFA_REGISTER note.
6318 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6320 PR rtl-optimization/85645
6321 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
6322 insn that has a REG_CFA_REGISTER note.
6324 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
6326 * cfgexpand.c (expand_clobber): New function.
6327 (expand_gimple_stmt_1): Use it.
6328 * tree-vect-stmts.c (vect_clobber_variable): New function,
6330 (vectorizable_simd_clone_call): ...here.
6331 (vectorizable_store): Emit a clobber either side of an
6332 IFN_STORE_LANES sequence.
6333 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
6335 2018-05-09 Tom de Vries <tom@codesourcery.com>
6338 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
6339 (define_insn "trap_if_false"): Add exit after trap.
6341 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
6343 PR rtl-optimization/85638
6344 * bb-reorder.c: Include common/common-target.h.
6345 (create_forwarder_block): New function extracted from...
6346 (fix_up_crossing_landing_pad): ...here. Rename into...
6347 (dw2_fix_up_crossing_landing_pad): ...this.
6348 (sjlj_fix_up_crossing_landing_pad): New function.
6349 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
6350 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
6351 from both partitions and exit the loop after one iteration.
6353 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
6356 * doc/extend.texi (PowerPC Built-in Functions): Rename this
6358 (Basic PowerPC Built-in Functions): The new name of the
6359 subsection previously known as "PowerPC Built-in Functions".
6360 (Basic PowerPC Built-in Functions Available on all Configurations):
6362 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
6364 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
6366 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
6368 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
6371 2018-05-08 Jim Wilson <jimw@sifive.com>
6373 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
6374 (LD_EMUL_SUFFIX): New.
6375 (LINK_SPEC): Use it.
6377 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
6379 * doc/extend.texi (PowerPC Built-in Functions): Rename this
6381 (Basic PowerPC Built-in Functions): The new name of the
6382 subsection previously known as "PowerPC Built-in Functions".
6383 (Basic PowerPC Built-in Functions Available on all Configurations):
6385 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
6387 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
6389 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
6391 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
6394 2018-05-08 Jakub Jelinek <jakub@redhat.com>
6397 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
6398 after cmpelim optimization.
6400 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
6402 * config.gcc: Support "goldmont".
6403 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
6404 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6406 * config/i386/i386.c (m_GOLDMONT): Define.
6407 (processor_target_table): Add "goldmont".
6408 (PTA_GOLDMONT): Define.
6409 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
6410 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
6411 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
6412 (fold_builtin_cpu): Add "goldmont".
6413 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
6414 (ix86_option_override_internal): Add "goldmont".
6415 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
6416 (processor_type): Add PROCESSOR_GOLDMONT.
6417 * config/i386/i386.md: Add CPU "glm".
6418 * config/i386/glm.md: New file.
6419 * config/i386/x86-tune.def: Add m_GOLDMONT.
6420 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
6422 2018-05-08 Jakub Jelinek <jakub@redhat.com>
6425 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
6427 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
6428 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
6429 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
6432 * config/i386/i386.c (ix86_fold_builtin): Handle
6433 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
6436 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
6437 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
6439 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
6442 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
6443 (check_arch): Likewise.
6444 (check_fpu): Return the result rather than printing it.
6445 (end arch): Fix operator precedence.
6446 (end cpu): Likewise.
6447 (END): Print the result from check_fpu.
6449 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
6450 Alan Hayward <alan.hayward@arm.com>
6451 David Sherwood <david.sherwood@arm.com>
6453 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
6454 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
6455 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
6456 (*fcmuo<mode>_and): New patterns.
6458 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
6460 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
6461 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
6462 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
6463 (cmp_op, sve_imm_con): New code attributes.
6464 (SVE_COND_INT_CMP, imm_con): Delete.
6465 (cmp_op): Remove above unspecs from int attribute.
6466 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
6468 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
6469 comparison-specific unspecs.
6470 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
6471 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
6472 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
6473 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
6474 (*vec_fcm<cmp_op><mode>): Rename to...
6475 (*fcm<cmp_op><mode>): ...this and adjust likewise.
6476 (*vec_fcmuo<mode>): Rename to...
6477 (*fcmuo<mode>): ...this and adjust likewise.
6478 (*pred_fcm<cmp_op><mode>): New pattern.
6479 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
6480 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
6482 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
6484 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
6485 (aarch64_emit_sve_predicated_cond): New function.
6486 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
6487 (aarch64_emit_unspec_cond_or): Replace with...
6488 (aarch64_emit_sve_or_conds): ...this new function. Use
6489 aarch64_emit_sve_ptrue_op for the individual comparisons and
6490 aarch64_emit_binop to OR them together.
6491 (aarch64_emit_inverted_unspec_cond): Replace with...
6492 (aarch64_emit_sve_inverted_cond): ...this new function. Use
6493 aarch64_emit_sve_ptrue_op for the comparison and
6494 aarch64_emit_unop to invert the result.
6495 (aarch64_expand_sve_vec_cmp_float): Update after the above
6496 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
6498 2018-05-07 Nathan Sidwell <nathan@acm.org>
6500 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
6501 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
6502 (Backwards Compatibility): Likewise.
6504 2018-05-07 Luis Machado <luis.machado@linaro.org>
6508 2018-05-07 Luis Machado <luis.machado@linaro.org>
6510 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6511 <prefetch_dynamic_strides>: New const bool field.
6512 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6513 prefetch_dynamic_strides.
6514 (exynosm1_prefetch_tune): Likewise.
6515 (thunderxt88_prefetch_tune): Likewise.
6516 (thunderx_prefetch_tune): Likewise.
6517 (thunderx2t99_prefetch_tune): Likewise.
6518 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
6520 (aarch64_override_options_internal): Update to set
6521 PARAM_PREFETCH_DYNAMIC_STRIDES.
6522 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6523 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6524 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6525 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6526 prefetch-dynamic-strides setting.
6528 2018-05-07 Luis Machado <luis.machado@linaro.org>
6530 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6531 <minimum_stride>: New const int field.
6532 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6533 minimum_stride field.
6534 (exynosm1_prefetch_tune): Likewise.
6535 (thunderxt88_prefetch_tune): Likewise.
6536 (thunderx_prefetch_tune): Likewise.
6537 (thunderx2t99_prefetch_tune): Likewise.
6538 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
6539 (aarch64_override_options_internal): Update to set
6540 PARAM_PREFETCH_MINIMUM_STRIDE.
6541 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6542 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6543 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6544 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6545 stride is constant and is below the minimum stride threshold.
6547 2018-05-07 Luis Machado <luis.machado@linaro.org>
6549 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
6552 2018-05-07 Luis Machado <luis.machado@linaro.org>
6554 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6555 <prefetch_dynamic_strides>: New const bool field.
6556 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6557 prefetch_dynamic_strides.
6558 (exynosm1_prefetch_tune): Likewise.
6559 (thunderxt88_prefetch_tune): Likewise.
6560 (thunderx_prefetch_tune): Likewise.
6561 (thunderx2t99_prefetch_tune): Likewise.
6562 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
6564 (aarch64_override_options_internal): Update to set
6565 PARAM_PREFETCH_DYNAMIC_STRIDES.
6566 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6567 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6568 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6569 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6570 prefetch-dynamic-strides setting.
6572 2018-05-07 Luis Machado <luis.machado@linaro.org>
6574 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6575 <minimum_stride>: New const int field.
6576 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6577 minimum_stride field.
6578 (exynosm1_prefetch_tune): Likewise.
6579 (thunderxt88_prefetch_tune): Likewise.
6580 (thunderx_prefetch_tune): Likewise.
6581 (thunderx2t99_prefetch_tune): Likewise.
6582 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
6583 (aarch64_override_options_internal): Update to set
6584 PARAM_PREFETCH_MINIMUM_STRIDE.
6585 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6586 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6587 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6588 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6589 stride is constant and is below the minimum stride threshold.
6591 2018-05-06 Jakub Jelinek <jakub@redhat.com>
6594 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
6595 the type is addressable. Don't force op into register if it has
6598 2018-05-05 Roland McGrath <mcgrathr@google.com>
6601 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
6602 any section for which we don't know a specific type it should have,
6603 regardless of name. Previously this was done only for the exact
6604 names ".init_array", ".fini_array", and ".preinit_array".
6605 (default_elf_asm_named_section): Add comment about
6606 relationship with default_section_type_flags and SECTION_NOTYPE.
6607 (get_section): Don't consider it a type conflict if one side has
6608 SECTION_NOTYPE and the other doesn't, as long as neither has the
6609 SECTION_BSS et al used in the default_section_type_flags logic.
6611 2018-05-05 Tom de Vries <tom@codesourcery.com>
6614 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
6615 (workaround_barsyncs): New function.
6616 (nvptx_reorg): Use workaround_barsyncs.
6617 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
6618 (define_expand "nvptx_membar_cta"): New define_expand.
6619 (define_insn "*nvptx_membar_cta"): New insn.
6621 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
6623 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
6624 To improve optimization opportunities.
6625 * builtin-types.def: The new needed builtin types for the above.
6627 2018-05-04 Richard Biener <rguenther@suse.de>
6629 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
6630 * gimple-ssa-store-merging.c
6631 (imm_store_chain_info::output_merged_store): Remove redundant create,
6632 release split_store vector contents on failure.
6633 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
6634 scalar stmt vector on cache hit.
6636 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
6638 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
6640 * config.gcc (powerpc-xilinx-eabi*): Remove.
6641 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
6643 (fusion_addis_mem_combo_load): Ditto.
6644 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
6646 (rs6000_cpu_cpp_builtins): Ditto.
6647 * config/rs6000/rs6000-linux.c
6648 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
6649 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
6650 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
6652 (rs6000_setup_reg_addr_masks): Ditto.
6653 (rs6000_init_hard_regno_mode_ok): Ditto.
6654 (rs6000_option_override_internal): Ditto.
6655 (legitimate_lo_sum_address_p): Ditto.
6656 (rs6000_legitimize_address): Ditto.
6657 (rs6000_legitimize_reload_address): Ditto.
6658 (rs6000_legitimate_address_p): Ditto.
6659 (abi_v4_pass_in_fpr): Ditto.
6660 (setup_incoming_varargs): Ditto.
6661 (rs6000_gimplify_va_arg): Ditto.
6662 (rs6000_split_multireg_move): Ditto.
6663 (rs6000_savres_strategy): Ditto.
6664 (rs6000_emit_prologue_components): Ditto.
6665 (rs6000_emit_epilogue_components): Ditto.
6666 (rs6000_emit_prologue): Ditto.
6667 (rs6000_emit_epilogue): Ditto.
6668 (rs6000_elf_file_end): Ditto.
6669 (rs6000_function_value): Ditto.
6670 (rs6000_libcall_value): Ditto.
6671 * config/rs6000/rs6000.h: Ditto.
6672 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
6673 (TARGET_MINMAX): ... this. New.
6674 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
6675 * config/rs6000/rs6000.md: Remove Xilinx FP support.
6676 (*movsi_internal1_single): Delete.
6677 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
6678 mfpu=, mxilinx-fpu): Delete.
6679 * config/rs6000/singlefp.h: Delete.
6680 * config/rs6000/sysv4.h: Remove Xilinx FP support.
6681 * config/rs6000/t-rs6000: Ditto.
6682 * config/rs6000/t-xilinx: Delete.
6683 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
6684 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
6685 (VStype_simple): Delete.
6686 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
6687 * config/rs6000/xfpu.h: Delete.
6688 * config/rs6000/xfpu.md: Delete.
6689 * config/rs6000/xilinx.h: Delete.
6690 * config/rs6000/xilinx.opt: Delete.
6691 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
6692 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
6694 2018-05-04 Tom de Vries <tom@codesourcery.com>
6697 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
6700 2018-05-04 Richard Biener <rguenther@suse.de>
6703 * tree-complex.c (update_complex_assignment): We are always in SSA form.
6704 (expand_complex_div_wide): Likewise.
6705 (expand_complex_operations_1): Likewise.
6706 (expand_complex_libcall): Preserve EH info of the original stmt.
6707 (tree_lower_complex): Handle removed blocks.
6708 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
6709 on complex multiplication and division libcall builtins.
6711 2018-05-04 Richard Biener <rguenther@suse.de>
6714 * fold-const.c (negate_expr_p): Restrict negation of operand
6715 zero of a division to when we know that can happen without
6717 (fold_negate_expr_1): Likewise.
6719 2018-05-04 Jakub Jelinek <jakub@redhat.com>
6722 * real.h (real_nextafter): Declare.
6723 * real.c (real_nextafter): New function.
6724 * fold-const-call.c (fold_const_nextafter): New function.
6725 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
6726 CASE_CFN_NEXTTOWARD.
6727 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
6728 even when arg1_mode is different from arg0_mode.
6730 2018-05-03 Nathan Sidwell <nathan@acm.org>
6732 * doc/extend.texi (Deprecated Features): Remove
6734 (Backwards Compatibility): Likewise.
6735 * doc/invoke.texi (C++ Language Options): Likewise.
6736 (C++ Dialect Options): Likewise.
6738 2018-05-03 Jakub Jelinek <jakub@redhat.com>
6741 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
6742 _mm512_mask_mullox_epi64): New intrinsics.
6744 2018-05-03 Tom de Vries <tom@codesourcery.com>
6747 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6748 dump files): Add offload-tree.
6750 2018-05-03 Richard Biener <rguenther@suse.de>
6752 PR tree-optimization/85615
6753 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
6754 to loops not nested in BBs loop father to avoid creating multi-entry
6757 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6759 PR tree-optimization/70291
6760 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
6761 arguments. Change return type to tree. Emit libcall as a new
6762 statement rather than replacing existing one when inplace_p is true.
6763 (expand_complex_multiplication_components): New function.
6764 (expand_complex_multiplication): Expand floating-point complex
6765 multiplication using the above.
6766 (expand_complex_division): Rename inner_type parameter to type.
6767 Update expand_complex_libcall call-site.
6768 (expand_complex_operations_1): Update expand_complex_multiplication
6769 and expand_complex_division call-sites.
6771 2018-05-02 Jakub Jelinek <jakub@redhat.com>
6774 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
6775 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
6776 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
6777 the highest significant bit of the shift count mask is clear. In
6778 check whether and[sq]i3 is needed verify that all significant bits
6779 of the shift count other than the highest are set.
6781 2018-05-02 Tom de Vries <tom@codesourcery.com>
6784 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
6785 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
6786 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
6787 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
6788 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
6789 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
6790 __builtin_goacc_parlevel_size.
6792 2018-05-02 Richard Biener <rguenther@suse.de>
6794 PR tree-optimization/85597
6795 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
6796 do not use split vect_get_vec_defs call but call vect_get_slp_defs
6799 2018-05-02 Tom de Vries <tom@codesourcery.com>
6802 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6803 dump files): Add ltrans-tree.
6805 2018-05-02 Tom de Vries <tom@codesourcery.com>
6808 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6809 dump files): Add wpa-ipa.
6811 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
6813 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
6814 powerpc*-*-linux*paired* target.
6815 * config/rs6000/750cl.h: Delete.
6816 * config/rs6000/paired.h: Delete.
6817 * config/rs6000/paired.md: Delete.
6818 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
6820 * config/rs6000/rs6000-builtin.def: Remove paired float support.
6821 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
6822 comment. Remove paired float support.
6823 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
6824 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6826 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
6827 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
6829 * config/rs6000/rs6000.c: Remove paired float support.
6830 (paired_expand_vector_init, paired_expand_vector_move,
6831 paired_emit_vector_compare, paired_emit_vector_cond_expr,
6832 (paired_expand_lv_builtin, paired_expand_stv_builtin,
6833 paired_expand_builtin, paired_expand_predicate_builtin,
6834 paired_init_builtins): Delete.
6835 * config/rs6000/rs6000.h: Remove paired float support.
6836 * config/rs6000/rs6000.md: Remove paired float support.
6837 (move_from_CR_ov_bit): Delete.
6838 * config/rs6000/rs6000.opt (mpaired): Delete.
6839 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
6840 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
6842 2018-05-02 Richard Biener <rguenther@suse.de>
6845 * gimplify.c (gimplify_save_expr): When in SSA form allow
6846 SAVE_EXPRs to compute to SSA vars.
6848 2018-05-02 Jakub Jelinek <jakub@redhat.com>
6851 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
6852 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
6853 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
6854 clobber operands[2], instead use a new pseudo. Formatting fixes.
6856 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
6858 PR tree-optimization/85586
6859 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
6860 exit early for statements in the same group if the accesses are
6863 2018-05-02 Tom de Vries <tom@codesourcery.com>
6866 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
6869 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
6871 PR tree-optimization/85143
6872 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
6874 2018-05-01 Tom de Vries <tom@codesourcery.com>
6877 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
6878 not found" error message.
6880 2018-05-01 Tom de Vries <tom@codesourcery.com>
6883 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
6884 * vec.c (test_ordered_remove_if): New function.
6885 (vec_c_tests): Call test_ordered_remove_if.
6886 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
6887 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
6888 * tree-vect-patterns.c (vect_pattern_recog_1): Use
6889 VEC_ORDERED_REMOVE_IF.
6891 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6893 PR tree-optimization/82665
6894 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
6895 pointer subtraction where arguments come from a memchr call.
6897 2018-05-01 Jakub Jelinek <jakub@redhat.com>
6899 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
6900 --push-state --as-needed and --pop-state instead of --as-needed and
6901 --no-as-needed if ld supports it.
6902 * configure: Regenerated.
6905 * doc/install.texi2html: Replace _002d with - and _002a with * in
6906 generated html files using sed.
6908 2018-04-30 David Malcolm <dmalcolm@redhat.com>
6911 * gcc-rich-location.c (blank_line_before_p): New function.
6912 (use_new_line): New function.
6913 (gcc_rich_location::add_fixit_insert_formatted): New function.
6914 * gcc-rich-location.h
6915 (gcc_rich_location::add_fixit_insert_formatted): New function.
6917 2018-04-30 David Malcolm <dmalcolm@redhat.com>
6919 * selftest.c (assert_streq): Rename "expected" and "actual" to
6920 "val1" and "val2". Extend NULL-handling to cover both inputs
6921 symmetrically, while still requiring both to be non-NULL for a pass.
6922 * selftest.h (assert_streq): Rename "expected" and "actual" to
6924 (ASSERT_EQ): Likewise.
6925 (ASSERT_EQ_AT): Likewise.
6926 (ASSERT_KNOWN_EQ): Likewise.
6927 (ASSERT_KNOWN_EQ_AT): Likewise.
6928 (ASSERT_NE): Likewise.
6929 (ASSERT_MAYBE_NE): Likewise.
6930 (ASSERT_MAYBE_NE_AT): Likewise.
6931 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
6932 the assertion to pass.
6933 (ASSERT_STREQ_AT): Likewise.
6935 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
6937 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
6938 interaction with -pie.
6940 2018-04-30 David Malcolm <dmalcolm@redhat.com>
6942 * selftest.h: Fix alphabetization of per-source-file selftest
6945 2018-04-30 Jason Merrill <jason@redhat.com>
6947 PR c++/61982 - dead stores to destroyed objects.
6948 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
6951 2018-04-30 Jason Merrill <jason@redhat.com>
6953 * tree.c (build_clobber): New.
6954 * tree.h: Declare it.
6955 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
6957 2018-04-30 David Malcolm <dmalcolm@redhat.com>
6959 * diagnostic-show-locus.c (layout::layout): Update for
6960 location_get_source_line returning a char_span.
6961 (struct char_span): Move to input.h.
6962 (struct correction): Update for fields in char_span becoming
6964 (struct source_line): Update for location_get_source_line
6965 returning a char_span.
6966 (layout::print_line): Likewise.
6967 * edit-context.c (edited_file::print_content): Likewise.
6968 (edited_file::print_diff_hunk): Likewise.
6969 (edited_file::print_run_of_changed_lines): Likewise.
6970 (edited_file::get_num_lines): Likewise.
6971 (edited_line::edited_line): Likewise.
6972 * final.c (asm_show_source): Likewise.
6973 * input.c (location_get_source_line): Convert return type
6974 from const char * to char_span, losing the final "line_len"
6976 (dump_location_info): Update for the above.
6977 (get_substring_ranges_for_loc): Likewise. Use a char_span
6978 when handling the literal within the line.
6979 (test_reading_source_line): Update for location_get_source_line
6980 returning a char_span.
6981 * input.h (class char_span): Move here from
6982 diagnostic-show-locus.c, converting from a struct to a class.
6983 Make data members private.
6984 (char_span::operator bool): New.
6985 (char_span::length): New.
6986 (char_span::get_buffer): New.
6987 (char_span::operator[]): New.
6988 (char_span::subspan): Make const.
6989 (char_span::xstrdup): New.
6990 (location_get_source_line): Convert return type from const char *
6991 to char_span, losing the final "line_size" param.
6993 2018-04-30 Jan Hubicka <jh@suse.cz>
6995 * lto-wrapper.c (ltrans_priorities): New static var.
6996 (cmp_priority): New.
6997 (run_gcc): Read priorities and if doing parallel build order
6998 the Makefile by them.
7000 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7002 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
7004 2018-04-30 Richard Biener <rguenther@suse.de>
7006 * tree-cfg.c (verify_address): Remove base argument, add
7007 flag whether to check TREE_ADDRESSABLE and do that.
7008 (verify_expr): Remove.
7009 (verify_types_in_gimple_reference): Add pieces from verify_expr.
7010 (verify_gimple_assign_single): Likewise.
7011 (verify_gimple_switch): Likewise.
7012 (verify_expr_location_1): Dereference tp once. Add (disabled)
7013 piece from verify_expr.
7014 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
7016 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
7018 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
7020 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
7022 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
7023 (small_data_pattern): Likewise.
7024 (arc_rewrite_small_data): Likewise.
7025 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
7026 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
7027 (get_symbol_alignment): New function.
7028 (legitimate_small_data_address_p): Likewise.
7029 (legitimate_scaled_address): Update, call
7030 legitimate_small_data_address_p.
7031 (output_sdata): New static variable.
7032 (arc_print_operand): Update how we handle small data operands.
7033 (arc_print_operand_address): Likewise.
7034 (arc_legitimate_address_p): Update, use
7035 legitimate_small_data_address_p.
7036 (arc_rewrite_small_data_p): Remove.
7037 (arc_rewrite_small_data_1): Likewise.
7038 (arc_rewrite_small_data): Likewise.
7039 (small_data_pattern): Likewise.
7040 (compact_sda_memory_operand): Update to use
7041 legitimate_small_data_address_p and get_symbol_alignment.
7042 (prepare_move_operands): Don't rewite sdata pattern.
7043 (prepare_extend_operands): Remove.
7044 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
7046 (zero_extendqisi2): Likewise.
7047 (zero_extendhisi2): Likewise.
7048 (extendqihi2): Likewise.
7049 (extendqisi2): Likewise.
7050 (extendhisi2): Likewise.
7054 * config/arc/constraints.md (Usd): Change it to memory constraint.
7056 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
7058 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
7059 as source of std instructions.
7060 * config/arc/arc.md (movsi_insn): Update pattern predicate to
7061 allow 6-bit constants as source for store instructions.
7062 (movdi_insn): Update instruction pattern to allow 6-bit constants
7063 as source for store instructions.
7065 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
7067 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
7069 2018-04-30 Nathan Sidwell <nathan@acm.org>
7070 Sandra Loosemore <sandra@codesourcery.com>
7072 * dumpfile.c (dump_open): Allow '-' for stdout.
7073 * doc/invoke.texi (Developer Options): Document dump filename
7074 determination early. Document stdin/stdout selection.
7076 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
7078 Microblaze Target: PIC data text relative
7080 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
7081 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
7083 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
7084 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
7085 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
7086 New addressing mode for data-text relative position indepenedent code.
7087 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
7088 'ADDRESS_SYMBOLIC_TXT_REL'.
7089 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
7090 (microblaze_legitimate_pic_operand): Exclude function calls from
7091 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
7092 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
7094 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
7095 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
7096 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
7097 for 'address + offset'.
7098 (microblaze_expand_prologue): Add new function prologue call for
7100 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
7101 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
7102 table in case of TARGET_PIC_DATA_TEXT_REL.
7103 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
7104 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
7105 Add new macros 'UNSPEC_TEXT',
7106 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
7107 + exclude function calls from 'UNSPEC_PLT' in case of data text
7109 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
7110 new target hook for generating address diff vector tables in case of
7112 * doc/tm.texi : Regenerate.
7113 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
7114 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
7115 of addr diff vector generation.
7116 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
7117 target hook definition.
7118 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
7119 Add default function for generate_pic_addr_diff_vec -> flag_pic.
7120 * doc/invoke.texi (Add new pic option): Add new microblaze pic
7121 option for data text relative.
7123 2018-04-30 Richard Biener <rguenther@suse.de>
7125 * tree-chrec.h (evolution_function_is_constant_p): Remove
7127 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
7129 2018-04-30 Richard Biener <rguenther@suse.de>
7132 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
7134 2018-04-30 Richard Biener <rguenther@suse.de>
7136 PR tree-optimization/28364
7137 PR tree-optimization/85275
7138 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
7139 copying first exit test.
7141 2018-04-28 Mark Wielaard <mark@klomp.org>
7143 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
7145 (dwarf_AT): Handle DW_AT_addr_base.
7146 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
7148 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
7151 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
7152 (*ashl<dwi>3_doubleword_mask_1): Ditto.
7153 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
7154 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
7156 2018-04-28 Richard Biener <rguenther@suse.de>
7158 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
7159 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
7160 to reflect use. Only add interesting stmts.
7162 2018-04-27 Martin Jambor <mjambor@suse.cz>
7165 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
7166 the jump function allows for passing through aggregate values.
7168 2018-04-27 David Malcolm <dmalcolm@redhat.com>
7170 * input.h (in_system_header_at): Convert from macro to inline
7172 (from_macro_expansion_at): Likewise.
7173 (from_macro_definition_at): Likewise.
7175 2018-04-27 Jeff Law <law@redhat.com>
7177 * config.gcc: Mark tile* targets as deprecated/obsolete.
7179 2018-04-27 Richard Biener <rguenther@suse.de>
7181 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
7184 2018-04-27 Richard Biener <rguenther@suse.de>
7186 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
7188 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
7190 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
7191 with Yd constraint. Set "preferred_for_speed" attribute from
7192 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
7194 (*movdi_internal): Ditto.
7195 (movti_interunit splitters): Remove
7196 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
7197 (movdi_interunit splitters): Ditto.
7198 * config/i386/constraints.md (Ye): Remove.
7199 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
7201 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7204 * config/aarch64/constraints.md (Usg): Limit to 31.
7207 2018-04-27 Jakub Jelinek <jakub@redhat.com>
7209 PR tree-optimization/85529
7210 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
7211 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
7212 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
7213 zero extension or masking of the MSB bit.
7214 (optimize_range_tests): Add FIRST_BB argument, pass it through
7215 to optimize_range_tests_var_bound.
7216 (maybe_optimize_range_tests, reassociate_bb): Adjust
7217 optimize_range_tests callers.
7219 2018-04-26 Richard Biener <rguenther@suse.de>
7220 Jakub Jelinek <jakub@redhat.com>
7222 * cgraph.h (symbol_table): Just declare debug method here.
7223 * symtab.c (symbol_table::debug): Define.
7225 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
7227 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
7229 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
7231 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
7232 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
7233 (*movdi_internal): Substitute Yi and Yj constraint with x
7234 and Ym and Yn constraint with y constraint. Update "isa"
7235 attribute and set "preferred_for_speed" attribute from
7236 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
7237 (*movsi_internal): Ditto.
7238 (*movdf_internal): Ditto.
7239 (*movsf_internal): Ditto.
7240 (*zero_extendsidi2): Ditto.
7241 * config/i386/sse.md (vec_set<mode>_0): Ditto.
7242 (sse2_loadld): Ditto.
7243 (*vec_extract<ssevecmodelower>_0): Ditto.
7244 (*vec_extractv4si_0_zext_sse4): Ditto.
7245 (vec_concatv2di): Ditto.
7246 (*vec_dup<mode>): Ditto.
7247 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
7248 * config/i386/constraints.md (Yi): Remove.
7253 2018-04-26 Nathan Sidwell <nathan@acm.org>
7255 * dumpfile.c (dump_open): New.
7256 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
7257 (dump_finish): Detect stdio/stderr by value not name.
7259 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
7261 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
7263 2018-04-26 Tom de Vries <tom@codesourcery.com>
7266 * config/nvptx/nvptx.c (verify_neutering_jumps)
7267 (verify_neutering_labels): New function
7268 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
7270 2018-04-26 Tom de Vries <tom@codesourcery.com>
7273 * config/nvptx/nvptx.c (needs_neutering_p): New function.
7274 (nvptx_single): Use needs_neutering_p to skip over insns that do not
7277 2018-04-26 Richard Biener <rguenther@suse.de>
7278 Tom de Vries <tom@codesourcery.com>
7281 * lto-streamer-out.c (output_function): Fixup loops if required to match
7282 discovery done in the reader.
7284 2018-04-26 Richard Biener <rguenther@suse.de>
7286 PR tree-optimization/85116
7287 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
7288 have a loop exit from the single latch predecessor. Remove
7289 case of header with just condition.
7290 (ch_base::copy_headers): Exclude infinite loops from any
7292 (pass_ch::execute): Record exits.
7294 2018-04-26 Richard Biener <rguenther@suse.de>
7296 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
7297 prologue cost vector and pass it to vect_get_load_cost.
7298 (vect_get_peeling_costs_all_drs): Likewise.
7299 (vect_peeling_hash_get_lowest_cost): Likewise.
7300 (vect_enhance_data_refs_alignment): Likewise.
7302 2018-04-26 Richard Biener <rguenther@suse.de>
7305 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
7306 checking of integer<->pointer conversions.
7307 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
7308 sign-/zero-extending pointer types.
7309 (expand_omp_for_static_chunk): Likewise.
7311 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
7312 Jean Lee <xiaoyur347@gmail.com>
7314 * config/mips/mips.c (mips_asan_shadow_offset): New function.
7315 (TARGET_ASAN_SHADOW_OFFSET): Define.
7316 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
7317 true for -fsanitize=address.
7319 2018-04-25 Mark Wielaard <mark@klomp.org>
7321 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
7324 2018-04-25 Jakub Jelinek <jakub@redhat.com>
7326 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
7327 than "alu", remove explicit "memory" and "imm_disp" attributes.
7328 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
7331 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
7332 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
7333 gen_lowpart_no_emit.
7335 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
7338 * config/i386/i386.c (ix86_expand_builtin): Change memory
7339 operand to XI, extend p0 to Pmode.
7340 * config/i386/i386.md: Change unspec volatile and operand
7341 1 mode to XI, change operand 0 mode to P.
7343 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7345 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
7346 GET_MODE_MASK before any checking.
7347 (nds32_can_use_bset_p): Likewise.
7348 (nds32_can_use_btgl_p): Likewise.
7350 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7352 * config/nds32/nds32-doubleword.md: New define_split pattern for
7353 illegal register number.
7355 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7357 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
7359 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7361 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
7363 2018-04-25 Richard Biener <rguenther@suse.de>
7365 * lto-streamer.h (LTO_major_version): Bump to 8.
7367 2018-04-25 Jakub Jelinek <jakub@redhat.com>
7369 * BASE-VER: Set to 9.0.0.
7371 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
7373 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
7374 in __abskf2 and __powikf2.
7376 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7379 * config/aarch64/constraints.md (Usg, Usj): New constraints.
7380 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
7381 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
7382 Use the above on operand 2. Reindent.
7383 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
7385 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
7388 * common/config/i386/i386-common.c (ix86_handle_option): Don't
7390 * config/i386/i386.opt (mcet): Removed.
7391 * doc/install.texi: Remove -mcet documentation.
7392 * doc/invoke.texi: Likewise.
7394 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
7397 * doc/install.texi: Remove -mcet from bootstrap-cet.
7399 2018-04-24 Jakub Jelinek <jakub@redhat.com>
7402 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
7403 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
7407 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
7408 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
7409 containing a CONST_VECTOR.
7411 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
7413 * doc/install.texi: Update newlib dependency for nvptx.
7415 2018-04-24 Jakub Jelinek <jakub@redhat.com>
7418 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
7419 instead of INTVAL when shifting x left.
7421 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
7423 PR tree-optimization/85478
7424 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
7425 vect_grouped_store_supported for single element vectors.
7427 2018-04-24 Richard Biener <rguenther@suse.de>
7430 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
7431 load cost increase to the case of non-constant step.
7433 2018-04-24 Jakub Jelinek <jakub@redhat.com>
7436 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
7437 destination if any_malformed_asm.
7439 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
7442 * expr.c (store_field): In the bitfield case, if the value comes from
7443 a function call and is returned in registers by means of a PARALLEL,
7444 do not change the mode of the temporary unless BLKmode and VOIDmode.
7446 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
7448 PR rtl-optimization/85423
7449 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
7450 dependencies to debug insns when the previous insn is non-debug.
7452 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
7454 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
7455 enums into a single definition.
7456 (fls): Fix predicates and printing.
7459 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
7461 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
7462 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
7463 and short u6 immediate.
7464 (check_if_valid_sleep_operand): Remove.
7465 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
7467 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
7469 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
7470 flag_always_save_lp condition.
7471 * config/nds32/nds32.opt (malways-save-lp): New option.
7473 2018-04-22 Shiva Chen <shiva0217@gmail.com>
7475 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
7476 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
7477 * config/nds32/nds32.h
7478 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
7479 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
7481 2018-04-22 Shiva Chen <shiva0217@gmail.com>
7483 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
7484 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
7486 2018-04-22 Shiva Chen <shiva0217@gmail.com>
7487 Chung-Ju Wu <jasonwucj@gmail.com>
7489 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
7491 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
7492 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
7494 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
7496 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
7498 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
7500 * config/nds32/nds32-protos.h (nds32_data_alignment,
7501 nds32_local_alignment): Declare.
7502 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
7503 nds32_local_alignment): New functions.
7504 (TARGET_CONSTANT_ALIGNMENT): Define.
7505 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
7507 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
7509 * config/nds32/nds32.c
7510 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
7511 (TARGET_MODES_TIEABLE_P): Likewise.
7513 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
7515 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
7518 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
7519 Chung-Ju Wu <jasonwucj@gmail.com>
7521 * config/nds32/constants.md (unspec_volatile_element): Add enum values
7522 for unaligned access.
7523 * config/nds32/nds32-intrinsic.c: Implementation of expanding
7525 * config/nds32/nds32-intrinsic.md: Likewise.
7526 * config/nds32/nds32_intrinsic.h: Likewise.
7527 * config/nds32/nds32.h (nds32_builtins): Likewise.
7528 * config/nds32/nds32.opt (munaligned-access): New option.
7529 * config/nds32/nds32.c (nds32_asm_file_start): Display
7530 flag_unaligned_access status.
7532 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
7534 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
7535 -mno-relax is present.
7536 * config/riscv/linux.h (LINK_SPEC): Ditto.
7538 2018-04-20 Martin Sebor <msebor@redhat.com>
7541 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
7543 (gimple_fold_builtin_stxcpy_chk): Same.
7544 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
7546 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
7549 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
7550 __powikf2 when long double is IEEE 128-bit.
7552 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
7554 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
7555 step to make sure stack always aligned.
7557 2018-04-20 Carl Love <cel@us.ibm.com>
7560 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
7561 size check for arg0.
7563 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
7564 Tom de Vries <tom@codesourcery.com>
7567 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
7568 Emit insns for calls too.
7569 (nvptx_find_par): Always look for worker-level predecessor insn.
7570 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
7572 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
7573 (nvptx_process_pars): Propagate frames for calls.
7575 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
7578 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
7580 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
7581 (ix86_handle_option): Don't handle OPT_mibt.
7582 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
7584 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
7586 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
7587 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
7588 (ix86_target_macros): Define __CET__ with flag_cf_protection
7589 for -fcf-protection.
7590 * config/i386/i386.c (isa2_opts): Remove -mibt.
7591 * config/i386/i386.h (TARGET_IBT): Removed.
7592 (TARGET_IBT_P): Likewise.
7593 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
7594 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
7595 * config/i386/i386.opt (mcet): Update help message.
7598 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
7599 -mcet as an alias for -mshstk.
7601 2018-04-20 Richard Biener <rguenther@suse.de>
7604 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
7605 complexity by forcing a single use of the multiply operand.
7607 2018-04-20 Martin Jambor <mjambor@suse.cz>
7610 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
7611 recursion dependency to only apply to non-clones.
7613 2018-04-20 Martin Jambor <mjambor@suse.cz>
7616 * ipa-cp.c (create_specialized_node): Check that clones of
7617 self-recursive edges exist during IPA-CP.
7619 2018-04-19 Toon Moene <toon@moene.org>
7621 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
7624 2018-04-19 Jakub Jelinek <jakub@redhat.com>
7626 PR tree-optimization/85467
7627 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
7628 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
7629 VECTOR_CST element to type.
7631 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
7634 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
7635 * config/i386/i386.md (builtin_setjmp_setup): Removed.
7636 (builtin_longjmp): Likewise.
7637 (save_stack_nonlocal): New pattern.
7638 (restore_stack_nonlocal): Likewise.
7640 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
7643 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
7644 Replace ASM_OUTPUT_LABEL with fprintf.
7646 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
7649 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
7650 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
7651 * config/i386/i386-c.c (ix86_target_macros_internal): Also
7652 define __IBT__ and __SHSTK__ for -fcf-protection.
7653 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
7655 (ix86_trampoline_init): Likewise.
7656 (x86_output_mi_thunk): Likewise.
7657 (ix86_notrack_prefixed_insn_p): Likewise.
7658 (ix86_option_override_internal): Don't disallow -fcf-protection.
7659 * config/i386/i386.md (rdssp<mode>): Also enable for
7661 (incssp<mode>): Likewise.
7662 (nop_endbr): Likewise.
7663 * config/i386/i386.opt (mcet): Change help message to built-in
7667 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
7668 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
7669 enable CET built-in functions.
7671 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
7673 * common/config/i386/i386-common.c
7674 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
7675 OPTION_MASK_ISA_MOVDIRI_UNSET,
7676 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
7677 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
7678 * config.gcc (movdirintrin.h): New header.
7679 * config/i386/cpuid.h (bit_MOVDIRI,
7680 bit_MOVDIR64B): New bits.
7681 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
7683 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
7684 (VOID, PVOID, PCVOID)): New function types.
7685 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
7686 __builtin_ia32_directstoreu_u64,
7687 __builtin_ia32_movdir64b): New builtins.
7688 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
7689 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
7691 (ix86_valid_target_attribute_inner_p): Ditto.
7692 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
7693 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
7694 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
7695 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
7696 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
7697 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
7698 (movdiri<mode>, movdir64b_<mode>): New.
7699 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
7700 * config/i386/immintrin.h: Include movdirintrin.h.
7701 * config/i386/movdirintrin.h: New file.
7702 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
7704 2018-04-19 Richard Biener <rguenther@suse.de>
7707 * cfg.c (clear_bb_flags): When loop state says we have
7708 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
7710 2018-04-19 Richard Biener <rguenther@suse.de>
7712 PR tree-optimization/84737
7713 * tree-vect-data-refs.c (vect_copy_ref_info): New function
7714 copying restrict info.
7715 (vect_setup_realignment): Use it.
7716 * tree-vectorizer.h (vect_copy_ref_info): Declare.
7717 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
7718 the first DR to all generated stores.
7719 (vectorizable_load): Likewise for loads.
7721 2018-04-19 Jakub Jelinek <jakub@redhat.com>
7723 PR tree-optimization/85446
7724 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
7725 the integral and pointer types to have the same precision.
7727 * doc/install.texi: Document --disable-cet being the default and
7730 2018-04-18 Martin Liska <mliska@suse.cz>
7732 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
7735 2018-04-18 Martin Liska <mliska@suse.cz>
7738 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
7741 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
7742 arguments if they are comparable.
7744 2018-04-18 Martin Liska <mliska@suse.cz>
7747 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
7750 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
7753 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
7756 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
7757 ENDBR after calling __morestack.
7759 2018-04-18 David Malcolm <dmalcolm@redhat.com>
7762 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
7763 by using gcc_base_ver to generate a gcc_driver_version, and use
7764 it when generating GCC_DRIVER_NAME.
7765 * configure: Regenerate.
7767 2018-04-18 Jakub Jelinek <jakub@redhat.com>
7770 * config.gcc: Obsolete powerpc*-*-*spe*.
7772 2018-04-17 Jakub Jelinek <jakub@redhat.com>
7775 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
7776 (stabstr_D): Change type of unum from unsigned int to
7777 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
7780 2018-04-17 Jim Wilson <jimw@sifive.com>
7783 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
7784 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
7785 Set arg_pointer_offset after using pretend_args_size.
7787 2018-04-17 Jakub Jelinek <jakub@redhat.com>
7789 PR rtl-optimization/85431
7790 * dse.c (record_store): Ignore zero width stores.
7793 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
7794 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
7795 __builtin_stack_restore rather than after it.
7796 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
7797 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
7798 argument instead of virtual_dynamic_stack_rtx.
7800 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
7802 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
7804 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
7805 Add note to error message to explain internal mapping of overloaded
7806 built-in function name to non-overloaded built-in function name.
7807 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
7810 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
7813 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
7814 where the inputs overlap with the output.
7816 2018-04-17 Jakub Jelinek <jakub@redhat.com>
7818 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
7819 (=v, v) alternative and explicit "memory" attribute.
7820 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
7821 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7823 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
7824 "sselog1" type instead of "sselog".
7825 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
7826 "sselog". Remove explicit "memory" attribute.
7827 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
7828 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7830 (vec_extract_hi_v32hi): Merge all alternatives into one, use
7831 "sselog1" type instead of "sselog". Remove explicit "memory"
7833 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
7834 use "sselog1" type instead of "sselog". Remove explicit "memory"
7836 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
7837 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7839 (vec_extract_hi_v64qi): Merge all alternatives into one, use
7840 "sselog1" type instead of "sselog". Remove explicit "memory"
7842 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
7843 use "sselog1" type instead of "sselog". Remove explicit "memory"
7847 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
7850 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
7853 2018-04-17 Martin Jambor <mjambor@suse.cz>
7856 * ipa-cp.c (create_specialized_node): Call
7857 expand_all_artificial_thunks if necessary.
7859 2018-04-17 Martin Liska <mliska@suse.cz>
7862 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
7863 in message, remote space in between '_G' and '('.
7865 2018-04-17 Jakub Jelinek <jakub@redhat.com>
7868 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
7869 avx512f_vmcmp<mode>3<round_saeonly_name>,
7870 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
7871 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
7872 avx512f_rndscale<mode><round_saeonly_name>,
7873 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
7874 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
7875 Use %<iptr>2 instead of %2 for -masm=intel.
7876 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
7877 avx512f_vcvttss2usi<round_saeonly_name>,
7878 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
7880 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
7881 avx512f_vcvttsd2usi<round_saeonly_name>,
7882 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
7883 Use %q1 instead of %1 for -masm=intel.
7884 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
7885 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
7886 of %3 for -masm=intel.
7887 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
7889 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
7891 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
7893 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
7894 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
7896 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
7898 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
7899 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
7900 %g1 and one with %0 and %1.
7901 (avx512er_vmrcp28<mode><round_saeonly_name>,
7902 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
7904 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
7905 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
7906 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
7907 of %0 and %{%4%} for -masm=intel.
7908 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
7909 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
7910 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
7911 order of %0 and %{%5%}%{z%} for -masm=intel.
7913 2018-04-17 Jan Hubicka <jh@suse.cz>
7916 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
7918 2018-04-17 Martin Liska <mliska@suse.cz>
7921 * multiple_target.c (create_dispatcher_calls): Set apostrophes
7922 for target_clone error message. Make default implementation
7923 clone to be a local declaration.
7924 (separate_attrs): Add new argument and check for an empty
7926 (expand_target_clones): Handle it.
7927 (ipa_target_clone): Make redirection just for target_clones
7930 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
7931 Tom de Vries <tom@codesourcery.com>
7934 * omp-expand.c (expand_oacc_for): Add dummy false branch for
7935 tiled basic blocks without omp continue statements.
7937 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
7940 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
7941 vec_extract expression as having side effects to make sure it gets
7944 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
7947 * config/i386/i386.c (get_builtin_code_for_version): Check
7950 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
7953 * gcc/config.gcc: Support "skylake".
7954 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
7956 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
7957 (processor_target_table): Add "skylake".
7958 (ix86_option_override_internal): Add "skylake".
7959 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
7960 PROCESSOR_CANNONLAKE.
7961 (get_builtin_code_for_version): Fix priority for
7962 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
7963 PROCESSOR_SKYLAKE-AVX512.
7964 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
7965 (processor_type): Add PROCESSOR_SKYLAKE.
7967 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
7968 Jason Merrill <jason@redhat.com>
7971 * convert.c (convert_to_integer_1): Use direct recursion for
7972 enumeral types and types with a precision less than the number
7973 of bits in their mode.
7975 2018-04-16 Julia Koval <julia.koval@intel.com>
7978 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
7979 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
7981 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
7984 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
7985 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
7986 and -mno-direct-move.
7988 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
7991 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
7992 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
7993 Ensure negative shifts result in {0}.
7995 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
7997 PR rtl-optimization/79916
7998 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
7999 regs (if any) to define how to gnerate SD moves when LRA is in
8002 2018-04-13 Jakub Jelinek <jakub@redhat.com>
8004 PR rtl-optimization/85393
8005 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
8006 * except.c (expand_dw2_landing_pad_for_region): Make static.
8007 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
8008 a label and unconditional jump to old_bb, rather than
8009 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
8012 PR rtl-optimization/85376
8013 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
8014 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
8015 instead of a specific value.
8017 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
8018 Bin Cheng <bin.cheng@arm.com>
8020 PR tree-optimization/82965
8021 PR tree-optimization/83991
8022 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
8023 by_profile_only parameter.
8024 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
8025 information if the loop was predicted to iterate too many times.
8026 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
8028 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
8031 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
8034 2018-04-13 Martin Liska <mliska@suse.cz>
8035 Jakub Jelinek <jakub@redhat.com>
8038 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
8039 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
8040 * builtins.c (expand_builtin_memory_copy_args): Use
8041 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
8042 handle dest_addr == pc_rtx.
8044 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
8047 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
8048 asked to not generate direct moves.
8049 (fix_trunc<mode>si2_stfiwx): Similar.
8050 (fix_trunc<mode>si2_internal): Similar.
8052 2018-04-12 Jakub Jelinek <jakub@redhat.com>
8055 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
8056 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
8057 lookup if dest in some wider mode is known to be const0_rtx and
8058 if so, record permanent equivalence for it to be ZERO_EXTEND of
8059 the narrower mode destination.
8061 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
8063 * lto-streamer-out.c (output_function): Revert 259346.
8064 * omp-expand.c (expand_oacc_for): Likewise.
8066 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
8068 PR rtl-optimization/85354
8069 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
8070 * sel-sched.c (sel_global_init): ... here.
8072 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
8075 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
8076 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
8077 mode for PE-COFF targets.
8078 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
8079 (i386_pe_asm_lto_end): Likewise.
8080 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
8081 (TARGET_ASM_LTO_END): Likewise.
8082 * config/i386/winnt.c (saved_debug_info_level): New static variable.
8083 (i386_pe_asm_lto_start): New function.
8084 (i386_pe_asm_lto_end): Likewise.
8086 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
8087 Richard Biener <rguenther@suse.de>
8090 * lto-streamer-out.c (output_function): Fix CFG loop state before
8092 * omp-expand.c (expand_oacc_for): Handle calls to internal
8093 functions like regular functions.
8095 2018-04-12 Richard Biener <rguenther@suse.de>
8098 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
8099 for the early LTO debug to properly generate references to it
8100 during DIE emission. Do not re-use that for the skeleton for
8102 (dwarf2out_early_finish): Likewise.
8104 2018-04-12 Jakub Jelinek <jakub@redhat.com>
8107 * config/i386/sse.md
8108 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
8109 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
8110 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
8111 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
8112 and output is a reg, avoid creating invalid lowpart subreg, but
8113 instead split into a 512-bit move. Don't split if not AVX512VL,
8114 input is xmm16+ reg and output is a mem.
8115 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
8116 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
8117 xmm16+ reg and output is a mem.
8119 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8121 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
8122 also for flag_dwarf2_cfi_asm.
8124 2018-04-12 Jakub Jelinek <jakub@redhat.com>
8126 PR rtl-optimization/85342
8127 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
8128 a bool scalar var inside of the loop instead. Don't try to update
8129 recog_data.operand after failed apply_change_group.
8131 2018-04-12 Tom de Vries <tom@codesourcery.com>
8134 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
8135 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
8136 array with flexible array member as array without given dimension.
8137 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
8138 argument for undefined param to true.
8140 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
8143 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
8144 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
8145 from PowerPC section.
8146 * config/rs6000/sysv4.opt (mcall-): Improve help text.
8147 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
8148 help text that is too long.
8149 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
8150 help text that is too long.
8151 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
8152 help text that is too long.
8154 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
8156 * config/alpha/alpha.md (stack_probe_internal): Rename
8157 from "probe_stack". Update all callers.
8159 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
8161 PR rtl-optimization/84566
8162 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
8163 sched_macro_fuse_insns.
8165 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
8168 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
8169 (compute_block_dependences): ... from here.
8171 2018-04-11 Jakub Jelinek <jakub@redhat.com>
8173 PR tree-optimization/85331
8174 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
8175 from int to HOST_WIDE_INT.
8177 2018-04-11 Martin Jambor <mjambor@suse.cz>
8180 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
8181 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
8182 not the same as the source val.
8183 (cgraph_edge_brings_value_p): New parameter.
8184 (gather_edges_for_value): Pass destination value to
8185 cgraph_edge_brings_value_p.
8186 (perhaps_add_new_callers): Likewise.
8187 (get_info_about_necessary_edges): Likewise and exclude values brought
8188 only by self-recursive edges.
8189 (create_specialized_node): Redirect only clones of self-calling edges.
8190 (+self_recursive_pass_through_p): New function.
8191 (find_more_scalar_values_for_callers_subset): Use it.
8192 (find_aggregate_values_for_callers_subset): Likewise.
8193 (known_aggs_to_agg_replacement_list): Removed.
8194 (decide_whether_version_node): Re-calculate known constants for all
8195 remaining context clones.
8197 2018-04-11 Richard Biener <rguenther@suse.de>
8200 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
8201 from early DWARF output.
8202 (dwarf2out_early_finish): Output line info unconditionally into
8203 early DWARF and add reference to it.
8205 2018-04-11 Jakub Jelinek <jakub@redhat.com>
8208 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
8209 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
8210 other than V2DFmode using iptr mode attribute.
8211 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
8213 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
8215 PR rtl-optimization/84659
8216 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
8218 2018-04-11 Jakub Jelinek <jakub@redhat.com>
8221 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
8223 (output_loc_list): Pass address of a dummy size variable even in the
8224 locview handling loop.
8225 (index_location_lists): Add comment on why skip_loc_list_entry can't
8228 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
8231 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
8234 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
8237 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
8238 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
8239 and -mstring-compare-inline-limit.
8241 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
8244 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
8245 for stack clash protection in a register whenever we need it to be in
8248 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
8250 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
8251 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
8253 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
8256 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
8258 (mlong-double-): Ditto.
8259 * config/rs6000/sysv4.opt (msdata=): Ditto.
8260 (mtls-size=): Ditto.
8262 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
8264 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8265 erroneous entries for
8266 "vector int vec_ldl (int, long int *)", and
8267 "vector unsigned int vec_ldl (int, unsigned long int *)".
8268 Add comments and entries for
8269 "vector bool char vec_ldl (int, bool char *)",
8270 "vector bool short vec_ldl (int, bool short *)",
8271 "vector bool int vec_ldl (int, bool int *)",
8272 "vector bool long long vec_ldl (int, bool long long *)",
8273 "vector pixel vec_ldl (int, pixel *)",
8274 "vector long long vec_ldl (int, long long *)",
8275 "vector unsigned long long vec_ldl (int, unsigned long long *)".
8276 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
8277 type tree bool_long_long_type_node and correct definition of
8278 bool_V2DI_type_node to make reference to this new type tree.
8279 (rs6000_mangle_type): Replace erroneous reference to
8280 bool_long_type_node with bool_long_long_type_node.
8281 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
8282 comments to emphasize sign distinctions for char and int types and
8283 replace RS6000_BTI_bool_long constant with
8284 RS6000_BTI_bool_long_long constant. Also add comment to restrict
8285 use of RS6000_BTI_pixel.
8286 (bool_long_type_node): Remove this macro definition.
8287 (bool_long_long_type_node): New macro definition
8289 2018-04-10 Jakub Jelinek <jakub@redhat.com>
8291 PR rtl-optimization/85300
8292 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
8293 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
8294 simplify_unary_operation fails.
8296 2018-04-10 Martin Liska <mliska@suse.cz>
8298 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
8299 cgraph_edge and ipa_ref.
8301 2018-04-10 Jakub Jelinek <jakub@redhat.com>
8305 * config/i386/sse.md
8306 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
8307 computation of the VEC_MERGE selector from mask.
8308 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
8309 Fix decoding of the VEC_MERGE selector into mask.
8311 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
8313 PR tree-optimization/85286
8314 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
8316 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
8318 * final.c (final_1): Set insn_last_address as well as
8319 insn_current_address.
8321 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8324 * explow.c (emit_stack_probe): Call validize_mem on memory location
8325 before passing it to gen_probe_stack. Create address operand and
8326 legitimize it for the probe_stack_address case.
8328 2018-04-09 Jan Hubicka <jh@suse.cz>
8331 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
8332 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
8333 * tree.c (free_lang_data_in_type): Fix handling of binfos;
8335 (free_lang_data): Rebuild type inheritance graph.
8337 2018-04-09 Martin Sebor <msebor@redhat.com>
8339 * invoke.texi (-finline-small-functions): Mention other optimization
8341 (-findirect-inlining, -fpartial-inlining): Same.
8342 (-finline-functions-called-once): Same.
8343 (-freorder-blocks-and-partition): Same.
8345 2018-04-09 Jan Hubicka <jh@suse.cz>
8348 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
8349 jumps; choose last target that matches the criteria (i.e.
8350 no partition changes for non-crossing jumps).
8351 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
8352 support for redirecting crossing jumps to non-crossing.
8354 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
8356 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
8357 also for naked functions.
8359 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
8361 * config/arc/arc.md (add_shift): New pattern.
8362 (add_shift2): Likewise.
8363 (sub_shift): Likewise.
8364 (sub_shift_cmp0_noout): Likewise.
8365 (compare_si_ashiftsi): Likewise.
8366 (xbfu_cmp0_noout): New combine pattern.
8367 (xbfu_cmp0"): Likewise.
8368 (movsi_set_cc_insn): Place the predicable variant first.
8369 (commutative_binary_cmp0_noout): Remove clobber.
8370 (commutative_binary_cmp0): New pattern.
8371 (noncommutative_binary_cmp0): Likewise.
8372 (noncommutative_binary_cmp0_noout): Likewise.
8373 (noncommutative_binary_comparison_result_used): Removed.
8374 (rsub_cmp0): New pattern.
8375 (rsub_cmp0_noout): Likewise.
8376 (extzvsi): Changed, keep only meaningful variants.
8377 (SQH, SEZ): New iterators.
8378 (SQH_postfix): New mode attribute.
8379 (SEZ_prefix): New code attribute.
8380 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
8381 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
8382 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
8384 (noncommutative_operator): Check the availability of barrel
8387 2018-04-09 Richard Biener <rguenther@suse.de>
8389 PR tree-optimization/85284
8390 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
8391 Only use the niter constraining form of simple_iv when the exit
8394 2018-04-09 Tom de Vries <tom@codesourcery.com>
8397 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8398 (define_expand "*memory_barrier"): New define_expand.
8399 (define_insn "memory_barrier"): New insn.
8401 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
8403 PR rtl-optimization/80463
8404 PR rtl-optimization/83972
8405 PR rtl-optimization/83480
8407 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
8408 correct producer for the insn.
8409 (tidy_control_flow): Fixup seqnos in case of debug insns.
8411 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
8413 PR rtl-optimization/83913
8415 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
8416 different sched-times when merging exprs.
8418 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
8420 PR rtl-optimization/83962
8422 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
8423 tidy_fallthru_edge and tidy_control_flow.
8425 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
8427 PR rtl-optimization/83530
8429 * sel-sched.c (force_next_insn): New global variable.
8430 (remove_insn_for_debug): When force_next_insn is true, also leave only
8431 next insn in the ready list.
8432 (sel_sched_region): When the region wasn't scheduled, make another pass
8433 over it with force_next_insn set to 1.
8435 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
8437 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
8439 * config/nds32/constants.md (unspec_volatile_element): Add enum values
8440 for interrupt control.
8441 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
8442 functions for interrupt control.
8443 * config/nds32/nds32-intrinsic.md: Likewise.
8444 * config/nds32/nds32_intrinsic.h: Likewise.
8445 * config/nds32/nds32.h (nds32_builtins): Likewise.
8447 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
8449 * config/nds32/nds32.c (nds32_init_machine_status,
8450 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
8451 strict_aligned_p field.
8452 (nds32_expand_to_rtl_hook): New function.
8453 (TARGET_EXPAND_TO_RTL_HOOK): Define.
8454 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
8456 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
8457 Chung-Ju Wu <jasonwucj@gmail.com>
8459 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
8460 * config/nds32/nds32-n7.md: New file.
8461 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
8462 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
8464 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
8465 * config/nds32/nds32.md (pipeline_model): Add n7.
8466 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
8467 * config/nds32/pipelines.md: Include n7 settings.
8469 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
8470 Chung-Ju Wu <jasonwucj@gmail.com>
8472 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
8473 * config/nds32/nds32-e8.md: New file.
8474 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
8475 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
8477 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
8478 * config/nds32/nds32.md (pipeline_model): Add e8.
8479 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
8480 * config/nds32/pipelines.md: Include e8 settings.
8482 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
8483 Chung-Ju Wu <jasonwucj@gmail.com>
8485 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
8486 * config/nds32/nds32-n8.md: New file.
8487 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
8488 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
8490 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
8491 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
8492 * config/nds32/nds32.md (pipeline_model): Add n8.
8493 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
8494 * config/nds32/pipelines.md: Include n8 settings.
8496 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
8497 Chung-Ju Wu <jasonwucj@gmail.com>
8499 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
8500 * config/nds32/nds32-n9-2r1w.md: New file.
8501 * config/nds32/nds32-n9-3r2w.md: New file.
8502 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
8503 nds32_register_ports): New or modify for cpu n9.
8504 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
8506 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
8507 * config/nds32/nds32-utils.c: New file.
8508 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
8509 TARGET_MUL_SLOW): Define.
8510 * config/nds32/nds32.md (pipeline_model): New attribute.
8511 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
8512 New options that support cpu n9.
8513 * config/nds32/pipelines.md: Include n9 settings.
8514 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
8516 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
8518 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
8519 information if necessary.
8520 (output_cond_branch_compare_zero): Likewise.
8521 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
8522 (nds32_target_alignment): Refine for alignment.
8523 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
8524 (FUNCTION_BOUNDARY): Modify.
8525 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
8527 * config/nds32/nds32.opt (malways-align, malign-functions): New.
8529 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
8531 * config/nds32/constants.md (unspec_volatile_element): Add values for
8532 TLB operation and data prefetch.
8533 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
8534 functions for TLB operation and data prefetch.
8535 * config/nds32/nds32-intrinsic.md: Likewise.
8536 * config/nds32/nds32_intrinsic.h: Likewise.
8537 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
8538 (nds32_print_operand): Likewise.
8539 * config/nds32/nds32.h (nds32_builtins): Likewise.
8541 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
8542 Andrew Pinski <pinsika@gcc.gnu.org>
8545 * match.pd: Use constant_boolean_node of correct type instead of
8546 boolean_true_node or boolean_false_node for simplifying
8547 pointer comparisons to zero.
8549 2018-04-07 Jakub Jelinek <jakub@redhat.com>
8551 PR tree-optimization/80021
8552 * tree.c (verify_type_variant): Make error call in verify_variant_match
8553 translatable and remove final full stop.
8555 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
8557 * config/nds32/constants.md (unspec_volatile_element): Add
8558 UNSPEC_VOLATILE_EH_RETURN.
8559 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
8560 nds32_output_stack_pop): Support dwarf exception handling process.
8561 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
8562 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
8563 exception handling process.
8564 (nds32_compute_stack_frame): Likewise.
8565 (nds32_return_addr_rtx): Likewise.
8566 (nds32_initial_elimination_offset): Likewise.
8567 (nds32_expand_prologue): Likewise.
8568 (nds32_expand_epilogue): Likewise.
8569 (nds32_dynamic_chain_address): New function.
8570 * config/nds32/nds32.h (machine_function): Add fields for dwarf
8572 (DYNAMIC_CHAIN_ADDRESS): Define.
8573 (EH_RETURN_DATA_REGNO): Define.
8574 (EH_RETURN_STACKADJ_RTX): Define.
8575 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
8576 patterns for dwarf exception handling.
8578 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
8580 * config/nds32/nds32.h: Clean up obsolete macros.
8582 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
8584 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8585 Add enum values for particular instructions.
8586 * config/nds32/nds32-intrinsic.c: Implementation of expanding
8587 particular intrinsic functions.
8588 * config/nds32/nds32-intrinsic.md: Likewise.
8589 * config/nds32/nds32_intrinsic.h: Likewise.
8590 * config/nds32/nds32.h (nds32_builtins): Likewise.
8591 * config/nds32/nds32.md (type): Add pbsad and pbsada.
8592 (btst, ave): New patterns for particular instructions.
8594 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
8596 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8597 Add enum values for atomic load/store and memory sync.
8598 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
8600 * config/nds32/nds32-intrinsic.md: Likewise.
8601 * config/nds32/nds32_intrinsic.h: Likewise.
8602 * config/nds32/nds32.h (nds32_builtins): Likewise.
8604 2018-04-07 Jakub Jelinek <jakub@redhat.com>
8606 PR tree-optimization/85257
8607 * fold-const.c (native_encode_vector): If not all elts could fit
8608 and off is -1, return 0 rather than offset.
8609 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
8610 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
8611 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
8612 adjust buffer in native_interpret_expr call.
8614 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
8616 * config/nds32/constants.md (unspec_volatile_element): Add cache
8617 control enum values.
8618 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
8619 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
8620 * config/nds32/nds32.c (nds32_cctl_names): New.
8621 (nds32_print_operand): Handle cache control register names.
8622 * config/nds32/nds32.h (nds32_builtins): New enum values.
8623 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
8625 * config/nds32/nds32.md (type): Add mmu.
8626 * config/nds32/pipelines.md (simple_insn): Add mmu.
8628 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
8630 * config/nds32/nds32.md (type): Remove call.
8631 * config/nds32/pipelines.md (simple_insn): Likewise.
8633 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
8635 * config/nds32/constants.md (unspec_volatile_element): Add
8636 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
8637 UNSPEC_VOLATILE_FMFCFG.
8638 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
8639 description for fmfcfg and fmfcsr.
8640 (bdesc_1arg): Add fmtcsr.
8641 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
8642 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
8643 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
8644 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
8645 unspec_fmfcfg): New patterns.
8646 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
8647 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
8648 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
8649 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
8650 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
8651 __nds32__fmfcfg): Define.
8653 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
8655 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
8656 intrinsic register names.
8657 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
8658 intrinsic register enum values and macros.
8660 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
8662 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
8663 for load/store addressing form.
8664 (nds32_print_operand_address): Likewise.
8666 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
8669 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
8670 based on LABEL_REF. Remove useless assertion.
8671 (pic_address_needs_scratch): Fix formatting.
8672 (sparc_legitimize_pic_address): Minor tweaks.
8673 (sparc_delegitimize_address): Adjust assertion accordingly.
8674 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
8675 into symbolic_operand.
8676 (movsi_high_pic_label_ref): Likewise.
8677 (movsi_lo_sum_pic_label_ref): Likewise.
8678 (movdi_pic_label_ref): Likewise.
8679 (movdi_high_pic_label_ref): Likewise.
8680 (movdi_lo_sum_pic_label_ref): Likewise.
8682 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
8684 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
8685 custom LIB_SPEC setup.
8687 2018-04-06 Ruslan Bukin <br@bsdpad.com>
8688 Kito Cheng <kito.cheng@gmail.com>
8690 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
8691 * config/riscv/freebsd.h: New.
8693 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
8695 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
8696 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
8699 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
8700 Kito Cheng <kito.cheng@gmail.com>
8702 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
8703 nds32_output_call, nds32_symbol_binds_local_p): New functions.
8704 * config/nds32/nds32-protos.h (nds32_output_call,
8705 nds32_output_return): Declare.
8706 * config/nds32/nds32.md: Refine all the call and return patterns.
8708 2018-04-06 Jakub Jelinek <jakub@redhat.com>
8711 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
8712 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
8714 PR rtl-optimization/84872
8715 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
8716 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
8719 2018-04-06 Tamar Christina <tamar.christina@arm.com>
8721 * expr.c (copy_blkmode_to_reg): Revert 254862.
8722 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
8724 2018-04-06 Richard Biener <rguenther@suse.de>
8727 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
8728 after seeing a component reference with an adjacent field. Treat
8729 refs to arrays at struct end of external decls similar to
8730 refs to unconstrained commons.
8732 2018-04-06 Jakub Jelinek <jakub@redhat.com>
8735 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
8736 look through SAVE_EXPRs with non-side-effects argument. Adjust
8738 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
8741 2018-04-06 Richard Biener <rguenther@suse.de>
8744 * alias.c (find_base_term): New wrapper around find_base_term
8745 unwinding CSELIB_VAL_PTR changes.
8746 (find_base_term): Do not restore CSELIB_VAL_PTR during the
8749 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8751 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
8753 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
8754 constant definitions.
8755 ("nop"): lr 0,0 -> nopr r0
8756 ("nop_lr0", "nop_lr1"): New insn definitions.
8758 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
8760 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
8761 NDS32_V3PUSH_AVAILABLE_P macro.
8763 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
8764 Chung-Ju Wu <jasonwucj@gmail.com>
8766 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
8767 (nds32*-*-*): Add float and fpu_config into supported_defaults.
8768 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
8769 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
8770 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
8771 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
8772 * config/nds32/constraints.md: New constraints and checking for hard
8773 float configuration.
8774 * config/nds32/iterators.md: New mode iterator and attribute for hard
8775 float configuration.
8776 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
8778 * config/nds32/nds32-fpu.md: New file.
8779 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
8780 deal with hard float code generation.
8781 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
8783 (abi_type, float_reg_number): New enum type.
8784 * config/nds32/nds32-predicates.c: New predicates for hard float.
8785 * config/nds32/nds32-protos.h: Declare functions for hard float.
8786 * config/nds32/nds32.c: Implementation for hard float configuration.
8787 * config/nds32/nds32.h: Definitions for hard float configuration.
8788 * config/nds32/nds32.md: Include hard float machine description and
8789 modify patterns for hard float configuration.
8790 * config/nds32/nds32.opt: New options for hard float configuration.
8791 * config/nds32/predicates.md: New predicates for hard float
8794 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8796 * common/config/nds32/nds32-common.c
8797 (nds32_option_optimization_table): Enable -mreleax-hint by default.
8799 2018-04-05 Jakub Jelinek <jakub@redhat.com>
8802 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
8803 CONSTRUCTOR_ELT (ctor, ...)->value.
8805 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
8808 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
8810 2018-04-05 Tom de Vries <tom@codesourcery.com>
8813 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
8816 2018-04-05 Shiva Chen <shiva0217@gmail.com>
8817 Kito Cheng <kito.cheng@gmail.com>
8819 * config/nds32/constraints.md (U33): Fine-tune checking condition.
8820 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
8821 * config/nds32/nds32.h (nds32_16bit_address_type): Add
8822 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
8824 2018-04-05 Shiva Chen <shiva0217@gmail.com>
8825 Kito Cheng <kito.cheng@gmail.com>
8827 * config/nds32/constraints.md (Ufe): New memory constraint.
8828 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
8829 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
8830 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
8832 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
8833 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
8835 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
8837 * config/nds32/nds32.md: Use optimize_size in the condition for
8838 alu-shift instructions.
8840 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
8842 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
8844 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
8846 * config/nds32/nds32.md (negsi2): Refine pattern.
8848 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
8849 Chung-Ju Wu <jasonwucj@gmail.com>
8851 * config/nds32/iterators.md (shift_rotate): New code iterator.
8852 (shift): New code attribute.
8853 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
8854 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
8855 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
8856 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
8857 bit-wise operations.
8858 (andsi3, *andsi3): Ditto.
8859 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
8860 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
8861 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
8862 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
8863 nds32_ior_operand, nds32_xor_operand): New predicates.
8865 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
8867 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
8868 (addsi3, subsi3): ... this.
8870 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
8872 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
8874 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
8876 * config/nds32/nds32.md: Adjust indention.
8878 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
8880 * config/nds32/nds32.md (feature): New attribute.
8882 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
8884 * config/nds32/nds32.md (subtype): New attribute.
8886 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
8889 * config/arm/arm-builtins.c (arm_expand_builtin): Change
8890 expansion to perform a bitwise AND of the argument followed by a
8891 boolean negation of the result.
8893 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
8895 PR rtl-optimization/84878
8896 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
8897 the basic block. Assert the use reference is not artificial and that
8898 it has an associated insn.
8900 2018-04-04 Michael Matz <matz@suse.de>
8902 * builtins.c (compute_objsize): Pass correct operand
8903 to array_at_struct_end_p.
8905 2018-04-04 Richard Biener <rguenther@suse.de>
8908 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
8909 from contexts for DINFO_LEVEL_TERSE and below.
8911 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
8913 * config/nds32/nds32-doubleword.md (move_<mode>): Require
8914 resiter_operand condition.
8915 * config/nds32/nds32.md (*move<mode>): Ditto.
8917 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
8918 Monk Chiang <sh.chiang04@gmail.com>
8920 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
8922 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
8924 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
8926 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
8927 Kito Cheng <kito.cheng@gmail.com>
8929 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
8930 nds32_cond_code_str, output_cond_branch,
8931 output_cond_branch_compare_zero, nds32_expand_cbranch,
8932 nds32_expand_cstore, nds32_expand_movcc,
8933 nds32_output_cbranchsi4_equality_zero,
8934 nds32_output_cbranchsi4_equality_reg,
8935 nds32_output_cbranchsi4_equality_reg_or_const_int,
8936 nds32_output_cbranchsi4_greater_less_zero: New functions.
8937 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
8938 nds32_expand_cstore, nds32_expand_movcc,
8939 nds32_output_cbranchsi4_equality_zero,
8940 nds32_output_cbranchsi4_equality_reg,
8941 nds32_output_cbranchsi4_equality_reg_or_const_int,
8942 nds32_output_cbranchsi4_greater_less_zero): Declare.
8943 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
8944 nds32_rimm11s_operand): New predicates.
8945 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
8946 * config/nds32/nds32.md: Rewrite all the branch and conditional move
8949 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
8951 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
8952 * config/nds32/nds32.md: Ditto.
8953 * config/nds32/pipelines.md: Ditto.
8955 2018-04-04 Richard Biener <rguenther@suse.de>
8957 PR tree-optimization/85168
8958 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
8959 propagating abnormals.
8961 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
8963 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
8965 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
8966 Kito Cheng <kito.cheng@gmail.com>
8968 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
8969 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
8970 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
8971 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
8972 * config/nds32/nds32.md (sibcall_internal): New.
8973 (sibcall_register): Remove.
8974 (sibcall_immediate): Remove.
8975 (sibcall_value_internal): New.
8976 (sibcall_value_register): Remove.
8977 (sibcall_value_immediate): Remove.
8978 * config/nds32/predicates.md (nds32_general_register_operand): New.
8979 (nds32_call_address_operand): New.
8981 2018-04-03 Jakub Jelinek <jakub@redhat.com>
8983 PR rtl-optimization/85167
8984 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
8985 bb_defs if *split_p, instead preinitialize it to NULL.
8987 PR tree-optimization/85156
8988 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
8989 evaluating the argument multiple times.
8991 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
8993 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
8995 (_mm_cvtpd_ps): Likewise.
8996 (_mm_cvttpd_epi32): Likewise.
8997 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
8998 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
8999 vector, pixel, and bool following altivec.h include.
9001 2018-04-03 Martin Sebor <msebor@redhat.com>
9003 * doc/extend.texi (Common Function Attributes): Clarify.
9004 (const attribute): Likewise.
9005 (pure attribute): Likewise.
9007 2018-04-03 Jakub Jelinek <jakub@redhat.com>
9010 * config/i386/i386.c (ix86_expand_vector_set): Use
9011 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
9013 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
9015 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
9016 instructions when changing rounding bits to preserve precision bits
9017 in the x87 control word.
9019 2018-04-03 Martin Liska <mliska@suse.cz>
9021 PR tree-optimization/82491
9022 * rtl.h (strip_offset_and_add): Replace += suboffset with
9023 poly_uint64 () + suboffset.
9025 2018-03-29 Martin Liska <mliska@suse.cz>
9026 Martin Jambor <mjambor@suse.cz>
9029 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
9030 param_type is not an integral or pointer type.
9032 2018-04-03 Richard Biener <rguenther@suse.de>
9034 * sese.h (recompute_all_dominators): Remove.
9036 2018-04-02 Martin Sebor <msebor@redhat.com>
9038 * doc/invoke.texi (-Wrestrict): Fix typos.
9040 2018-04-02 Jim Wilson <jimw@sifive.com>
9042 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
9043 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
9044 (<optab>di3, <optab>si3_extend): Likewise.
9045 (<optab>si3_mask, <optab>si3_mask_1): New.
9046 (<optab>di3_mask, <optab>di3_mask_1): New.
9047 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
9048 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
9049 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
9051 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
9053 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
9056 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
9058 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
9059 (nds32_canonicalize_comparison): New function.
9061 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
9062 Kito Cheng <kito.cheng@gmail.com>
9063 Kuan-Lin Chen <kuanlinchentw@gmail.com>
9065 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
9066 * config/nds32/constants.md (unspec_volatile_element): Add
9067 UNSPEC_VOLATILE_RELAX_GROUP.
9068 * config/nds32/nds32-relax-opt.c: New file.
9069 * config/nds32/nds32-predicates.c
9070 (nds32_symbol_load_store_p): New function.
9071 * config/nds32/nds32-protos.h
9072 (nds32_symbol_load_store_p): Declare function.
9073 (make_pass_nds32_relax_opt): Declare new rtl pass function.
9074 * config/nds32/nds32.c
9075 (nds32_register_pass): New function to register pass.
9076 (nds32_register_passes): New function to register passes.
9077 * config/nds32/nds32.md (relax_group): New pattern.
9078 * config/nds32/nds32.opt (mrelax-hint): New option.
9079 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
9081 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
9083 * config/nds32/t-nds32: Modify files dependency.
9085 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
9087 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
9088 (PROFILE_HOOK): Define its implementation.
9090 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
9092 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
9093 type and 32-bit size.
9095 2018-04-01 Jakub Jelinek <jakub@redhat.com>
9098 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
9099 (V_128_256): New mode iterator.
9100 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
9101 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
9102 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
9104 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
9105 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
9107 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
9110 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
9111 NaN inputs correctly.
9113 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
9116 * config/rs6000/vsx.md (??r): New mode attribute.
9117 (*vsx_mov<mode>_64bit): Use it.
9118 (*vsx_mov<mode>_32bit): Likewise.
9120 2018-03-30 Martin Sebor <msebor@redhat.com>
9122 PR tree-optimization/84818
9123 * builtins.c (check_access): Use warning_n.
9125 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
9128 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
9130 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
9133 2018-03-30 Julia Koval <julia.koval@intel.com>
9136 * x86-tune.def (movx, partial_reg_dependency): Enable for
9139 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
9142 * lra-constraints.c (process_alt_operands): Move setting
9143 this_alternative_matches below.
9145 2018-03-29 Martin Liska <mliska@suse.cz>
9148 * doc/invoke.texi: Document how LTO works with debug info.
9149 Describe auto-load support of binutils. Mention 'x86-64'
9150 as valid option value of -march option.
9152 2018-03-29 Jakub Jelinek <jakub@redhat.com>
9154 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
9157 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
9158 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
9159 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
9162 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
9165 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
9166 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
9167 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
9168 for RS6000_BTM_POWERPC64.
9169 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
9170 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
9171 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
9176 2018-03-28 Carl Love <cel@us.ibm.com>
9179 2017-09-27 Carl Love <cel@us.ibm.com>
9181 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
9182 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
9183 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
9186 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9188 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
9189 instead of __vector bool.
9190 (_mm_max_pu8): Likewise.
9191 (_mm_min_pi16): Likewise.
9193 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
9196 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
9197 (DIVWEUO): Likewise.
9199 (DIVDEUO): Likewise.
9200 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
9201 DIVWEUO and DIVDEUO.
9202 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
9203 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
9204 (div_extend): Likewise.
9205 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
9207 (__builtin_divweuo): Likewise.
9208 (__builtin_divdeo): Likewise.
9209 (__builtin_divdeuo): Likewise.
9211 2018-03-28 Jakub Jelinek <jakub@redhat.com>
9214 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
9215 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
9217 PR tree-optimization/82004
9218 * gimple-match-head.c (optimize_pow_to_exp): New function.
9219 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
9220 Don't fold to exp if optimize_pow_to_exp is false.
9222 2018-03-28 Martin Liska <mliska@suse.cz>
9225 * calls.c (initialize_argument_information): Fix trailing space.
9226 * common.opt: Fix typo and provide better explanation for
9227 -fsanitize-coverage option.
9228 * config/i386/i386.opt: Fix typo.
9230 2018-03-28 Jakub Jelinek <jakub@redhat.com>
9231 Martin Liska <mliska@suse.cz>
9234 * gimplify.c (asan_poison_variable): Don't do the check for
9235 gimplify_omp_ctxp here.
9236 (gimplify_decl_expr): Do it here.
9237 (gimplify_target_expr): Likewise.
9239 2018-03-28 Martin Liska <mliska@suse.cz>
9242 * config/i386/i386.c (ix86_function_arg_advance): Do not call
9243 chkp_type_bounds_count if MPX is not enabled.
9245 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
9247 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
9249 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
9252 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
9253 function to create the function decl for complex long double
9254 multiply and divide for -mabi=ieeelongdouble.
9255 (init_float128_ieee): Call it.
9257 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
9260 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
9261 -fcf-protection=branch -mibt.
9262 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
9264 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9267 * config/arm/arm.c (arm_valid_symbolic_address): Handle
9268 arm_word_relocations.
9270 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
9273 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
9274 extern array declarations.
9276 2018-03-27 Richard Biener <rguenther@suse.de>
9279 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
9280 explicit single_use checks.
9282 2018-03-27 Richard Biener <rguenther@suse.de>
9284 PR tree-optimization/85082
9285 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
9288 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9290 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
9291 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
9292 Turn on fasynchronous-unwind-tables and funwind-tables.
9294 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
9297 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
9298 (*bmi_blsr_<mode>_ccz): Ditto.
9300 2018-03-26 Tom de Vries <tom@codesourcery.com>
9302 PR tree-optimization/85063
9303 * omp-general.c (offloading_function_p): New function. Factor out
9305 * omp-offload.c (pass_omp_target_link::gate): ... here.
9306 * omp-general.h (offloading_function_p): Declare.
9307 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
9308 with attribute omp declare target for offloading functions.
9310 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
9312 PR tree-optimization/84005
9313 * tree-data-ref.h (get_base_for_alignment): Declare.
9314 * tree-data-ref.c (get_base_for_alignment_1): New function.
9315 (get_base_for_alignment): Likewise.
9316 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
9317 get_base_for_alignment to find a suitable base object, instead
9318 of always using drb->base_address.
9320 2018-03-23 Jakub Jelinek <jakub@redhat.com>
9323 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
9324 known size by default.
9326 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
9329 * lra-constraints.c (process_alt_operands): Don't match BLKmode
9330 and non BLKmode operands.
9332 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9335 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
9336 Clean up attributes.
9338 2018-03-23 Richard Biener <rguenther@suse.de>
9341 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
9342 we are going to emit early debug for LTO.
9344 2018-03-23 Jakub Jelinek <jakub@redhat.com>
9347 * function.c (match_asm_constraints_1): Don't optimize if input
9348 doesn't satisfy general_operand predicate for output's mode.
9351 * alias.c (write_dependence_p): Don't require for x_canonicalized
9352 non-VOIDmode if x has VOIDmode.
9355 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
9356 just don't try to optimize it rather than assert it never happens.
9358 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
9360 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
9361 macro expansions for definition of ST_INTERNAL_<mode> and
9362 LD_INTERNAL_<mode> builtins.
9363 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
9365 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
9367 (altivec_expand_st_builtin): Likewise.
9368 (altivec_expand_builtin): Remove calls to deleted functions.
9369 (rs6000_address_for_altivec): Delete this function.
9370 * config/rs6000/vector.md: Remove expands for
9371 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
9373 2018-03-22 Sudakshina Das <sudi.das@arm.com>
9376 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
9377 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
9378 re-computing once computed.
9379 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
9380 (arm_init_machine_status): Initialize
9381 machine->static_chain_stack_bytes.
9383 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
9386 * doc/extend.texi: Add four new prototypes for vec_ld.
9387 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
9388 definitions for more logical presentation.
9389 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
9390 entries for V1TI variants of __builtin_altivec_ld builtin.
9391 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
9392 handling of V1TI variant of LVX icode pattern.
9393 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
9394 (rs6000_gimple_fold_builtin): Likewise.
9395 (altivec_init_builtins): Add code to define
9396 __builtin_altivec_lvx_v1ti function.
9398 2018-03-22 Jakub Jelinek <jakub@redhat.com>
9401 * function.c (match_asm_constraints_1): Don't do the optimization
9402 if input isn't a REG, SUBREG, MEM or constant.
9404 2018-03-22 Tom de Vries <tom@codesourcery.com>
9406 PR tree-optimization/84956
9407 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
9408 bb_has_abnormal_pred.
9410 2018-03-22 Jakub Jelinek <jakub@redhat.com>
9413 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
9414 DECL_INITIAL (decl) to decl at the end.
9415 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
9418 2018-03-21 Joseph Myers <joseph@codesourcery.com>
9420 * doc/extend.texi (__builtin_tgmath): Document when complex
9421 integer types are treated as _Complex _Float64.
9423 2018-03-21 Tom de Vries <tom@codesourcery.com>
9425 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
9427 2018-03-21 Jakub Jelinek <jakub@redhat.com>
9429 PR tree-optimization/84960
9430 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
9431 if it is ENTRY block, move them into single succ of ENTRY in that case.
9433 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
9435 PR tree-optimization/84811
9436 * poly-int.h (poly_span_traits): Remove the T3 parameter and
9437 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
9438 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
9439 (known_subrange_p): Update accordingly. Cast each value involved
9440 in the size comparison, rather than casting the result of the
9443 2018-03-21 Jakub Jelinek <jakub@redhat.com>
9445 PR tree-optimization/84982
9446 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
9447 by flipping the least significant bit rather than all bits from
9448 bitpos to bitpos + bitsize - 1.
9450 2018-03-21 Nathan Sidwell <nathan@acm.org>
9452 * doc/extend.texi (Deprecated Features): Remove mention of
9453 long-deleted deprecations.
9455 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9458 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
9459 * configure: Regenerate.
9461 2018-03-21 Tom de Vries <tom@codesourcery.com>
9463 PR tree-optimization/83126
9464 * tree-parloops.c (num_phis): New function.
9465 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
9467 2018-03-21 Nathan Sidwell <nathan@acm.org>
9469 * doc/extend.texi (Deprecated Features): Update deprecated flags,
9470 mention anon-struct/union members and trailing attributes.
9472 2018-03-21 Bin Cheng <bin.cheng@arm.com>
9474 PR tree-optimization/84969
9475 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
9476 builtin memset partitions if they set different rhs values.
9478 2018-03-21 Jakub Jelinek <jakub@redhat.com>
9480 PR rtl-optimization/84989
9481 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
9482 VEC_DUPLICATE with scalar result mode.
9484 2018-03-21 Martin Liska <mliska@suse.cz>
9487 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
9488 not intended return statement.
9490 2018-03-21 Martin Liska <mliska@suse.cz>
9493 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
9494 (chkp_find_bound_slots_1): Limit number of iterations.
9496 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
9499 * Minor grammar fixes for x86 options.
9501 2018-03-20 Jakub Jelinek <jakub@redhat.com>
9504 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
9505 holding REG_CFA_RESTORE notes, instead turn them into a USE.
9507 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
9510 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
9511 (altivec_lvx_<mode>_1op): Likewise.
9512 (altivec_stvx_<mode>_2op): Likewise.
9513 (altivec_stvx_<mode>_1op): Likewise.
9514 (altivec_lvx_<VM2:mode>): New define_expand.
9515 (altivec_stvx_<VM2:mode>): Likewise.
9516 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
9517 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
9518 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
9519 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
9520 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
9521 (rs6000_gen_lvx): Likewise.
9522 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
9523 (altivec_expand_stv_builtin): Likewise.
9524 (altivec_expand_builtin): Likewise.
9525 * config/rs6000/vector.md: Likewise.
9527 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9530 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
9533 2018-03-20 Richard Biener <rguenther@suse.de>
9536 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
9537 sign-conversions as zero, fall back to standard scalar_stmt
9540 2018-03-20 Martin Liska <mliska@suse.cz>
9543 * predict.c (rebuild_frequencies): Handle case when we have
9544 PROFILE_ABSENT, but flag_guess_branch_prob is false.
9546 2018-03-20 Jakub Jelinek <jakub@redhat.com>
9549 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
9550 flag_section_anchors.
9551 * varasm.c (use_blocks_for_decl_p): Remove hack for
9552 dw2_force_const_mem.
9555 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
9557 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
9558 be created, use lowpart_subreg of operands[0] rather than operands[0]
9560 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
9561 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
9562 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
9563 and n constraint instead of aarch64_shift_imm_di and Usd.
9564 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
9565 (*aarch64_<optab>_reg_minus<mode>3): ... this.
9567 2018-03-20 Sudakshina Das <sudi.das@arm.com>
9570 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
9571 to favor GPR over NEON registers.
9572 (<shift>di3_neon): Likewise.
9574 2018-03-20 Tom de Vries <tom@codesourcery.com>
9577 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
9578 (nvptx_process_pars): Emit bar.sync asap and alap.
9580 2018-03-20 Tom de Vries <tom@codesourcery.com>
9583 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
9584 seen_label if seen_label is already set.
9586 2018-03-20 Jakub Jelinek <jakub@redhat.com>
9589 * config/i386/i386.c (fold_builtin_cpu): For features above 31
9590 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
9591 Use 1U instead of 1. Formatting fixes.
9594 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
9595 instead of TREE_TYPE (s1) for the return value.
9597 2018-03-19 Jakub Jelinek <jakub@redhat.com>
9599 PR tree-optimization/84946
9600 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
9601 bitsize + bitsize in poly_uint64 rather than poly_int64.
9604 * dwarf2asm.c: Include fold-const.c.
9605 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
9606 of decl rather than decl itself.
9608 PR rtl-optimization/84643
9609 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
9611 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
9614 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
9615 calling assemble_variable.
9617 2018-03-19 Sudakshina Das <sudi.das@arm.com>
9620 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
9621 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
9623 2018-03-19 Jim Wilson <jimw@sifive.com>
9626 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
9627 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
9628 (riscv_first_stack_step): Likewise.
9629 (riscv_option_override): Use STACK_BOUNDARY instead of
9631 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
9633 (BIGGEST_ALIGNMENT): Set to 128.
9634 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
9635 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
9638 2018-03-19 Richard Biener <rguenther@suse.de>
9640 PR tree-optimization/84933
9641 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
9642 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
9644 2018-03-19 Richard Biener <rguenther@suse.de>
9646 PR tree-optimization/84859
9647 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
9648 (cond_if_else_store_replacement): Perform sinking operation on
9649 single-store BBs regardless of MAX_STORES_TO_SINK setting.
9650 Generalize what a BB with a single eligible store is.
9652 2018-03-19 Richard Biener <rguenther@suse.de>
9654 PR tree-optimization/84929
9655 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
9656 chrec_is_positive against non-chrec arg.
9658 2018-03-19 Tamar Christina <tamar.christina@arm.com>
9661 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
9663 2018-03-18 Martin Liska <mliska@suse.cz>
9665 PR rtl-optimization/84635
9666 * regrename.c (build_def_use): Use matches_mode only when
9669 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
9671 PR tree-optimization/84913
9672 * tree-vect-loop.c (vectorizable_reduction): Don't try to
9673 vectorize chains of COND_EXPRs.
9675 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
9677 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
9679 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
9681 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
9683 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
9685 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
9687 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
9688 Kito Cheng <kito.cheng@gmail.com>
9690 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
9691 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
9692 (nds32_adjust_reg_alloc_order): New function.
9693 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
9695 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
9697 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
9698 nds32_print_operand, nds32_print_operand_address): Use
9699 HOST_WIDE_INT_PRINT_DEC instead.
9701 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
9703 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
9705 2018-03-17 Jakub Jelinek <jakub@redhat.com>
9708 * config/i386/i386.c (initial_ix86_tune_features,
9709 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
9711 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
9712 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
9713 rather than 1u << ix86_tune. Formatting fix.
9714 (ix86_option_override_internal): Change ix86_arch_mask from
9715 unsigned int to unsigned HOST_WIDE_INT, initialize to
9716 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
9717 (ix86_function_specific_restore): Likewise.
9719 2018-03-16 Jakub Jelinek <jakub@redhat.com>
9722 * postreload.c (reload_combine_recognize_pattern): Perform
9723 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
9724 truncate_int_for_mode the result for the destination's mode.
9727 * hsa-gen.c (mem_type_for_type): Fix comment typo.
9728 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
9730 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
9733 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
9736 * lra-assigns.c (lra_split_hard_reg_for): Don't use
9737 regno_allocno_class_array and sorted_pseudos.
9738 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
9739 insns where regno is used.
9741 2018-03-16 Martin Liska <mliska@suse.cz>
9744 * multiple_target.c (create_dispatcher_calls): Redirect
9745 reference in the symbol table.
9747 2018-03-16 Martin Liska <mliska@suse.cz>
9750 * multiple_target.c (create_dispatcher_calls): Redirect also
9753 2018-03-16 Jakub Jelinek <jakub@redhat.com>
9757 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
9758 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
9759 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
9761 2018-03-16 Julia Koval <julia.koval@intel.com>
9763 * doc/invoke.texi (Skylake Server): Add CLWB.
9764 Cannonlake): Remove CLWB.
9766 2018-03-16 Jakub Jelinek <jakub@redhat.com>
9768 PR tree-optimization/84841
9769 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
9771 (FLOAT_ONE_CONST_TYPE): Define.
9772 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
9773 (sort_by_operand_rank): Put entries with higher constant_type last
9774 rather than first to match comments.
9776 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
9778 * config/nios2/nios2.md (movsi_internal): Fix thinko in
9781 2018-03-15 Jakub Jelinek <jakub@redhat.com>
9784 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
9785 check and use address of target always.
9787 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
9790 * config/i386/i386.c (indirect_thunk_needed): Update comments.
9791 (indirect_thunk_bnd_needed): Likewise.
9792 (indirect_thunks_used): Likewise.
9793 (indirect_thunks_bnd_used): Likewise.
9794 (indirect_return_needed): New.
9795 (indirect_return_bnd_needed): Likewise.
9796 (output_indirect_thunk_function): Add a bool argument for
9798 (output_indirect_thunk_function): Don't generate alias for
9799 function return thunk.
9800 (ix86_code_end): Call output_indirect_thunk_function to generate
9801 function return thunks.
9802 (ix86_output_function_return): Set indirect_return_bnd_needed
9803 and indirect_return_needed instead of indirect_thunk_bnd_needed
9804 and indirect_thunk_needed.
9806 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
9808 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
9809 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
9810 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
9812 2018-03-15 David Malcolm <dmalcolm@redhat.com>
9813 Paul Hua <paul.hua.gm@gmail.com>
9816 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
9818 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
9820 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
9821 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
9824 2018-03-15 Tamar Christina <tamar.christina@arm.com>
9827 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9828 instead of GET_MODE_SIZE when comparing Units.
9830 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
9833 * varasm.c (hash_section): Return an unchangeble hash value
9834 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
9835 Return !aarch64_can_use_per_function_literal_pools_p ().
9837 2018-03-15 Jakub Jelinek <jakub@redhat.com>
9840 * optabs.c (emit_conditional_move): Pass address of cmode's copy
9841 rather than address of cmode as last argument to prepare_cmp_insn.
9843 2018-03-15 Julia Koval <julia.koval@intel.com>
9845 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
9846 F_AVX512VNNI, F_AVX512BITALG): New.
9848 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
9851 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
9852 insn for floating-point loads and stores.
9854 2018-03-14 Carl Love <cel@us.ibm.com>
9856 * config/rs6000/rs6000-c.c: Add macro definitions for
9857 ALTIVEC_BUILTIN_VEC_PERMXOR.
9858 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
9859 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
9860 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
9861 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
9863 * config/doc/extend.texi: Add prototypes for vec_permxor.
9865 2018-03-14 David Malcolm <dmalcolm@redhat.com>
9868 * diagnostic-show-locus.c (class layout_point): Convert m_line
9869 from int to linenum_type.
9870 (line_span::comparator): Use linenum "compare" function when
9871 comparing line numbers.
9872 (test_line_span): New function.
9873 (layout_range::contains_point): Convert param "row" from int to
9875 (layout_range::intersects_line_p): Likewise.
9876 (layout::will_show_line_p): Likewise.
9877 (layout::print_source_line): Likewise.
9878 (layout::should_print_annotation_line_p): Likewise.
9879 (layout::print_annotation_line): Likewise.
9880 (layout::print_leading_fixits): Likewise.
9881 (layout::annotation_line_showed_range_p): Likewise.
9882 (struct line_corrections): Likewise for field m_row.
9883 (line_corrections::line_corrections): Likewise for param "row".
9884 (layout::print_trailing_fixits): Likewise.
9885 (layout::get_state_at_point): Likewise.
9886 (layout::get_x_bound_for_row): Likewise.
9887 (layout::print_line): Likewise.
9888 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
9889 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
9890 * input.c (selftest::test_linenum_comparisons): New function.
9891 (selftest::input_c_tests): Call it.
9892 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
9893 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
9894 * selftest.h (ASSERT_GT): New macro.
9895 (ASSERT_GT_AT): New macro.
9896 (ASSERT_LT): New macro.
9897 (ASSERT_LT_AT): New macro.
9899 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
9901 PR rtl-optimization/84780
9902 * combine.c (distribute_links): Don't make a link based on pc_rtx.
9904 2018-03-14 Martin Liska <mliska@suse.cz>
9906 * tree.c (record_node_allocation_statistics): Use
9907 get_stats_node_kind.
9908 (get_stats_node_kind): New function extracted from
9909 record_node_allocation_statistics.
9910 (free_node): Use get_stats_node_kind.
9912 2018-03-14 Richard Biener <rguenther@suse.de>
9914 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
9915 that the value-set of ANTIC_IN doesn't grow.
9918 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
9920 (BB_VISITED_WITH_VISITED_SUCCS): New define.
9921 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
9923 2018-03-14 Julia Koval <julia.koval@intel.com>
9925 * config.gcc (icelake-client, icelake-server): New.
9927 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
9928 (initial_ix86_arch_features): Ditto.
9929 (PTA_SKYLAKE): Add SGX.
9930 (PTA_ICELAKE): Remove.
9931 (PTA_ICELAKE_CLIENT): New.
9932 (PTA_ICELAKE_SERVER): New.
9933 (ix86_option_override_internal): Split up icelake on icelake client and
9935 (get_builtin_code_for_version): Ditto.
9936 (fold_builtin_cpu): Ditto.
9937 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
9938 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
9939 * config/i386/i386.h (processor_type): Ditto.
9940 * doc/invoke.texi: Ditto.
9942 2018-03-14 Jakub Jelinek <jakub@redhat.com>
9945 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
9946 INTEGER_CST offset, add it together with bitpos / 8 and
9947 sign extend based on POINTER_SIZE.
9951 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
9954 * config/i386/constraints.md (Yc): New register constraint.
9955 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
9956 Use Yc constraint for alternative 2 of operand 0. Remove
9957 preferred_for_speed attribute.
9959 2018-03-14 Richard Biener <rguenther@suse.de>
9961 PR tree-optimization/84830
9962 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
9963 with the old one to avoid oscillations.
9965 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
9968 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
9970 (assign_by_spills): Return a flag of reload assignment failure.
9971 Do not process the reload assignment failures. Do not spill other
9972 reload pseudos if they has the same reg class. Update n if
9974 (lra_assign): Add a return arg. Set up from the result of
9975 assign_by_spills call.
9976 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9977 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
9978 usage_insns if it is not NULL.
9979 (spill_hard_reg_in_range): New function.
9980 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9981 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9982 function prototypes.
9983 (lra_assign): Change prototype.
9984 * lra.c (lra): Add code to deal with fails by splitting hard reg
9987 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
9989 * config/riscv/riscv.opt (mrelax): New option.
9990 * config/riscv/riscv.c (riscv_file_start): Emit ".option
9991 "norelax" when riscv_mrelax is disabled.
9992 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
9994 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
9997 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
9998 reassociation for int modes.
10000 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
10002 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
10003 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
10005 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
10006 * config/aarch64/aarch64-sve.md
10007 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
10008 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
10009 (*extend<mode><Vwide>2): Rename to...
10010 (aarch64_sve_extend<mode><Vwide>2): ...this.
10011 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
10012 renaming the old pattern to...
10013 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
10015 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
10016 define_expand, renaming the old pattern to...
10017 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
10018 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
10019 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
10020 account when deciding which SVE instruction the optab should use.
10021 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
10023 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
10025 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
10026 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
10027 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
10028 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
10029 (tlsdesc_small_<mode>): Turn a define_expand and use
10030 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
10031 (tlsdesc_small_advsimd_<mode>): ...this.
10032 (tlsdesc_small_sve_<mode>): New pattern.
10034 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
10036 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
10037 (UNSPEC_UMUL_HIGHPART): New constants.
10038 (MUL_HIGHPART): New int iteraor.
10039 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
10040 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
10042 (*<su>mul<mode>3_highpart): New define_insn.
10044 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
10047 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10050 2018-03-13 Martin Liska <mliska@suse.cz>
10053 * (sem_item_optimizer::sem_item_optimizer): Initialize new
10055 (sem_item_optimizer::~sem_item_optimizer): Release it.
10056 (sem_item_optimizer::merge_classes): Register variable aliases.
10057 (sem_item_optimizer::fixup_pt_set): New function.
10058 (sem_item_optimizer::fixup_points_to_sets): Likewise.
10059 * ipa-icf.h: Declare new variables and functions.
10061 2018-03-13 Jakub Jelinek <jakub@redhat.com>
10063 PR middle-end/84834
10064 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
10065 integer_pow2p@2 and test integer_pow2p in condition.
10066 (A < 0 ? C : 0): Similarly for @1.
10068 PR middle-end/84831
10069 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
10070 characters starting at p contain '\0' character, don't look beyond
10074 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
10075 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
10078 * reg-stack.c (change_stack): Change update_end var from int to
10079 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
10080 also call set_block_for_insn on the newly added insns and rescan.
10083 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
10084 on the last operand.
10087 * tree.c (stabilize_reference_1): Return save_expr (e) for
10088 STATEMENT_LIST even if it doesn't have side-effects.
10090 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
10092 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
10094 2018-03-12 Renlin Li <renlin.li@arm.com>
10096 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
10097 aarch64_output_scalar_simd_mov_immediate.
10099 2018-03-12 Martin Sebor <msebor@redhat.com>
10101 PR tree-optimization/83456
10102 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
10103 for perfectly overlapping calls to memcpy.
10104 (gimple_fold_builtin_memory_chk): Same.
10105 (gimple_fold_builtin_strcpy): Handle no-warning.
10106 (gimple_fold_builtin_stxcpy_chk): Same.
10107 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
10109 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
10111 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
10112 parameter. Use it for SFmode.
10113 (rs6000_function_arg_advance_1): Adjust.
10114 (rs6000_function_arg): Adjust.
10115 (rs6000_gimplify_va_arg): Pass false for that new parameter.
10117 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
10119 PR rtl-optimization/84169
10120 PR rtl-optimization/84780
10121 * combine.c (can_combine_p): Check for a 2-insn combination whether
10122 the destination register is used between the two insns, too.
10124 2018-03-12 Richard Biener <rguenther@suse.de>
10126 PR tree-optimization/84803
10127 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
10128 for refs DR analysis didn't process.
10130 2018-03-12 Richard Biener <rguenther@suse.de>
10132 PR tree-optimization/84777
10133 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
10134 force-vectorize loops ignore whether we are optimizing for size.
10136 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
10138 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
10139 (TARGET_MD_ASM_ADJUST): Define.
10141 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
10142 Kito Cheng <kito.cheng@gmail.com>
10143 Chung-Ju Wu <jasonwucj@gmail.com>
10145 * config/nds32/nds32.c (nds32_compute_stack_frame,
10146 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
10147 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
10148 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
10149 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
10150 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
10151 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
10152 * config/nds32/nds32.md (prologue, epilogue): Use macro
10153 NDS32_V3PUSH_AVAILABLE_P to do checking.
10155 2018-03-11 Jakub Jelinek <jakub@redhat.com>
10158 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
10159 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
10160 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
10161 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
10162 addition of most attributes on !orig_type_die or the attribute not
10163 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
10165 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
10166 Chung-Ju Wu <jasonwucj@gmail.com>
10168 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
10169 __NDS32_VH__ macro.
10170 * config/nds32/nds32.opt (mvh): New option.
10172 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
10173 Chung-Ju Wu <jasonwucj@gmail.com>
10175 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
10177 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
10178 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
10181 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
10182 Chung-Ju Wu <jasonwucj@gmail.com>
10184 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
10186 * config/nds32/nds32-multiple.md (strlensi): New pattern.
10187 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
10189 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
10190 Kito Cheng <kito.cheng@gmail.com>
10191 Chung-Ju Wu <jasonwucj@gmail.com>
10193 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
10194 UNSPEC_FFMISM and UNSPEC_FLMISM.
10195 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
10196 for ffb, ffmism and flmism.
10197 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
10198 (unspec_ffmism): Ditto.
10199 (unspec_flmism): Ditto.
10200 (nds32_expand_builtin_impl): Check if string extension is available.
10201 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
10202 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
10204 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
10207 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
10210 * lra-assigns.c (assign_by_spills): Return a flag of reload
10211 assignment failure. Do not process the reload assignment
10212 failures. Do not spill other reload pseudos if they has the same
10214 (lra_assign): Add a return arg. Set up from the result of
10215 assign_by_spills call.
10216 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10217 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
10218 usage_insns if it is not NULL.
10219 (spill_hard_reg_in_range): New function.
10220 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10221 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10222 function prototypes.
10223 (lra_assign): Change prototype.
10224 * lra.c (lra): Add code to deal with fails by splitting hard reg
10227 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
10230 * config/i386/i386.opt: Replace Enforcment with Enforcement.
10232 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
10235 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
10236 (dw_val_node): Add val_symbolic_view.
10237 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
10238 (symview_upper_bound): New.
10239 (new_line_info_table): Initialize symviews_since_reset.
10240 (dwarf2out_source_line): Count symviews_since_reset and set
10241 symview_upper_bound.
10242 (dw_val_equal_p): Handle symview.
10243 (add_AT_symview): New.
10244 (print_dw_val): Handle symview.
10245 (attr_checksum, attr_checksum_ordered): Likewise.
10246 (same_dw_val_p, size_of_die): Likewise.
10247 (value_format, output_die): Likewise.
10248 (add_high_low_attributes): Use add_AT_symview for entry_view.
10249 (dwarf2out_finish): Reset symview_upper_bound, clear
10252 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
10255 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
10256 Add strict argument and use it.
10257 (rs6000_split_multireg_move): Update for new strict argument.
10258 (mem_operand_gpr): Disallow all non-offsettable addresses.
10259 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
10261 2018-03-09 Jakub Jelinek <jakub@redhat.com>
10264 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
10265 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
10266 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
10269 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
10270 decl, use remap_type if we want to use the type.
10272 2018-03-09 Martin Sebor <msebor@redhat.com>
10274 PR tree-optimization/84526
10275 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
10277 (builtin_access::generic_overlap): Be prepared to handle non-array
10280 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
10282 PR rtl-optimization/84682
10283 * lra-constraints.c (process_address_1): Check is_address flag
10284 for address constraints.
10285 (process_alt_operands): Likewise.
10286 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
10287 preprocess_constraints.
10288 * recog.h (preprocess_constraints): Add oploc parameter.
10290 * recog.c (preprocess_constraints): Test address_operand for
10291 CT_ADDRESS constraints.
10293 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
10296 * lra-assigns.c (assign_by_spills): Return a flag of reload
10297 assignment failure. Do not process the reload assignment
10298 failures. Do not spill other reload pseudos if they has the same
10300 (lra_assign): Add a return arg. Set up from the result of
10301 assign_by_spills call.
10302 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10303 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
10304 usage_insns if it is not NULL.
10305 (spill_hard_reg_in_range): New function.
10306 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10307 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10308 function prototypes.
10309 (lra_assign): Change prototype.
10310 * lra.c (lra): Add code to deal with fails by splitting hard reg
10313 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10316 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
10317 Accept complain bool parameter. Only emit errors if it is true.
10318 (arm_parse_cpu_option_name): Likewise.
10319 (arm_target_thumb_only): Adjust callers of the above.
10320 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
10321 prototype to take a default true bool parameter.
10322 (arm_parse_arch_option_name): Likewise.
10324 2018-03-09 David Malcolm <dmalcolm@redhat.com>
10325 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10329 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
10330 * configure: Regenerate.
10331 * configure.ac ("linker --version-script option"): New.
10332 ("linker soname option"): New.
10334 2018-03-09 Richard Biener <rguenther@suse.de>
10336 PR tree-optimization/84775
10337 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
10338 immediate uses of predicate stmts and mark them modified.
10341 PR tree-optimization/84178
10342 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
10344 (version_loop_for_if_conversion): Delay update_ssa call.
10345 (tree_if_conversion): Delay update_ssa until after predicate
10348 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
10351 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
10352 when the function accesses prior frames.
10354 2018-03-08 Jakub Jelinek <jakub@redhat.com>
10357 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
10358 gen_llsym, otherwise call maybe_gen_llsym.
10360 PR inline-asm/84742
10361 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
10362 has ',' character inside of it.
10364 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10367 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
10368 as clobbering CC_REGNUM.
10370 2018-03-08 Richard Biener <rguenther@suse.de>
10372 PR middle-end/84552
10373 * tree-scalar-evolution.c: Include tree-into-ssa.h.
10374 (follow_copies_to_constant): Do not follow SSA names registered
10377 2018-03-08 Richard Biener <rguenther@suse.de>
10379 PR tree-optimization/84178
10380 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
10382 (version_loop_for_if_conversion): Delay update_ssa call.
10383 (tree_if_conversion): Delay update_ssa until after predicate
10386 2018-03-08 David Malcolm <dmalcolm@redhat.com>
10388 PR tree-optimization/84178
10389 * tree-if-conv.c (release_bb_predicate): Remove the
10390 the assertion that the stmts have NULL use_ops.
10391 Discard the statements, asserting that they haven't
10392 yet been added to a BB.
10394 2018-03-08 Richard Biener <rguenther@suse.de>
10396 PR tree-optimization/84746
10397 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
10398 (phi_translate): Pass in destination ANTIC_OUT set.
10399 (phi_translate_1): Likewise. For a simplified result lookup
10400 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
10401 (phi_translate_set): Adjust.
10402 (do_pre_regular_insertion): Likewise.
10403 (do_pre_partial_partial_insertion): Likewise.
10405 2018-03-08 Martin Liska <mliska@suse.cz>
10407 PR gcov-profile/84735
10408 * doc/gcov.texi: Document usage of profile files.
10409 * gcov-io.h: Document changes in the format.
10411 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
10415 * dwarf2out.c (struct dw_line_info_table): Update comments for
10417 (FORCE_RESET_NEXT_VIEW): New.
10418 (FORCE_RESETTING_VIEW_P): New.
10419 (RESETTING_VIEW_P): Check for -1 too.
10420 (ZERO_VIEW_P): Likewise.
10421 (new_line_info_table): Force-reset next view.
10422 (dwarf2out_begin_function): Likewise.
10423 (dwarf2out_source_line): Simplify zero_view_p initialization.
10424 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
10425 view directly. Omit view when omitting .loc at line 0.
10427 2018-03-08 Jakub Jelinek <jakub@redhat.com>
10429 PR tree-optimization/84740
10430 * tree-switch-conversion.c (process_switch): Call build_constructors
10431 only if info.phi_count is non-zero.
10433 PR tree-optimization/84739
10434 * tree-tailcall.c (find_tail_calls): Check call arguments against
10435 DECL_ARGUMENTS (current_function_decl) rather than
10436 DECL_ARGUMENTS (func) when checking for tail recursion.
10438 2018-03-07 Jakub Jelinek <jakub@redhat.com>
10440 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
10441 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
10442 Volker Reichelt's entry and add entries for people that perform
10443 GCC fuzzy testing and report numerous bugs.
10445 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
10448 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
10449 readonly data in sdata, if that is disabled.
10450 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
10451 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
10452 -mreadonly-in-sdata option.
10454 2018-03-07 Martin Sebor <msebor@redhat.com>
10456 PR tree-optimization/84468
10457 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
10458 basic block when looking for nul assignment.
10460 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
10463 * except.h (output_function_exception_table): Adjust prototype.
10464 * except.c (output_function_exception_table): Remove FNNAME parameter
10465 and add SECTION parameter. Ouput one part of the table at a time.
10466 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
10467 the first part of the exception table and emit unwind directives.
10468 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
10469 (i386_pe_seh_cold_init): Likewise.
10470 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
10471 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
10472 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
10473 (ix86_output_call_insn): Emit a nop in one more case for SEH.
10474 * config/i386/winnt.c: Include except.h.
10475 (struct seh_frame_state): Add reg_offset, after_prologue and
10476 in_cold_section fields.
10477 (i386_pe_seh_end_prologue): Set seh->after_prologue.
10478 (i386_pe_seh_cold_init): New function.
10479 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
10480 to seh->in_cold_section.
10481 (seh_emit_push): Record the offset of the push.
10482 (seh_emit_save): Record the offet of the save.
10483 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
10484 Test seh->after_prologue to disregard the epilogue.
10485 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
10486 (i386_pe_end_cold_function): New function.
10488 2018-03-07 Jakub Jelinek <jakub@redhat.com>
10491 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
10492 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
10495 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
10497 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
10498 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
10500 PR middle-end/84723
10501 * multiple_target.c: Include tree-inline.h and intl.h.
10502 (expand_target_clones): Diagnose and fail if node->definition and
10503 !tree_versionable_function_p (node->decl).
10505 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
10507 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
10509 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
10510 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
10511 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
10513 2018-03-06 Jakub Jelinek <jakub@redhat.com>
10516 * combine.c (try_combine): Use reg_or_subregno instead of handling
10517 just paradoxical SUBREGs and REGs.
10519 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
10521 * config/arc/arc.c (arc_finalize_pic): Remove function.
10522 (arc_must_save_register): We use single base PIC register, remove
10523 checks to save/restore the PIC register.
10524 (arc_expand_prologue): Likewise.
10525 * config/arc/arc-protos.h (arc_set_default_type_attributes):
10527 (arc_verify_short): Likewise.
10528 (arc_attr_type): Likewise.
10529 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
10530 (walk_stores): Likewise.
10531 (arc_address_cost): Make it static.
10532 (arc_verify_short): Likewise.
10533 (branch_dest): Likewise.
10534 (arc_attr_type): Likewise.
10535 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
10536 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
10537 (arc_final_prescan_insn): Remove inserting the nops due to
10538 hardware hazards. It is done in reorg step.
10539 (insn_length_variant_t): Remove.
10540 (insn_length_parameters_t): Likewise.
10541 (arc_insn_length_parameters): Likewise.
10542 (arc_get_insn_variants): Likewise.
10543 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
10545 2018-03-06 Jakub Jelinek <jakub@redhat.com>
10547 PR inline-asm/84683
10548 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
10551 PR tree-optimization/84687
10552 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
10554 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
10556 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10558 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
10559 Rename to ppc_speculation_barrier.
10560 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
10561 __builtin_ppc_speculation_barrier.
10563 2018-03-05 Jakub Jelinek <jakub@redhat.com>
10566 * combine.c (combine_simplify_rtx): Don't try to simplify if
10567 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
10570 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
10572 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
10573 to 32 bytes when compiling for POWER9.
10575 2018-03-05 Jakub Jelinek <jakub@redhat.com>
10578 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
10579 regparm >= 3 with no arg reg available also for calls with
10580 flag_force_indirect_call. Pass decl to ix86_function_regparm.
10583 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
10585 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
10587 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
10590 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
10592 2018-03-05 Richard Biener <rguenther@suse.de>
10594 PR tree-optimization/84486
10595 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
10596 When inserting a __builtin_assume_aligned call set the LHS
10597 SSA name alignment info accordingly.
10599 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
10601 PR tree-optimization/84114
10602 * config/aarch64/aarch64.c (aarch64_reassociation_width)
10603 Avoid reassociation of FLOAT_MODE addition.
10605 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
10607 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
10608 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
10609 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
10610 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
10611 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
10612 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
10613 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
10615 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
10616 __builtin_ia32_wbinvd): New builtins.
10617 (SPECIAL_ARGS2): New.
10618 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
10619 (SPECIAL_ARGS2): New.
10620 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
10621 (ix86_valid_target_attribute_inner_p): Ditto.
10622 (ix86_init_mmx_sse_builtins): Add special_args2.
10623 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
10624 TARGET_WBNOINVD_P): New.
10625 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
10626 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
10627 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
10628 * config/i386/immintrin.h (_wbinvd): New intrinsic.
10629 * config/i386/pconfigintrin.h: New file.
10630 * config/i386/wbnoinvdintrin.h: Ditto.
10631 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
10633 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
10635 2018-03-05 Richard Biener <rguenther@suse.de>
10637 PR tree-optimization/84670
10638 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
10640 (BB_VISITED_WITH_VISITED_SUCCS): New define.
10641 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
10642 (compute_antic_aux): Only assert the number of values in ANTIC_IN
10643 doesn't grow if all successors (recursively) were visited at least
10646 2018-03-05 Richard Biener <rguenther@suse.de>
10648 PR tree-optimization/84650
10649 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
10650 if executed in the loop pipeline.
10652 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
10654 * doc/configfiles.texi (Configuration Files): Move info about
10655 conditionalizing $target-protos.h to...
10656 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
10657 differs from $target-protos.h.
10659 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
10660 Chung-Ju Wu <jasonwucj@gmail.com>
10662 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
10663 * config/nds32/nds32-multiple.md (setmemsi): Define.
10664 * config/nds32/nds32-memory-manipulation.c
10665 (nds32_gen_dup_4_byte_to_word_value): New.
10666 (emit_setmem_word_loop): New.
10667 (emit_setmem_byte_loop): New.
10668 (nds32_expand_setmem_loop): New.
10669 (nds32_expand_setmem_loop_v3m): New.
10670 (nds32_expand_setmem_unroll): New.
10671 (nds32_expand_setmem): New.
10673 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
10674 Chung-Ju Wu <jasonwucj@gmail.com>
10676 * config/nds32/nds32-memory-manipulation.c
10677 (nds32_emit_load_store): New.
10678 (nds32_emit_post_inc_load_store): New.
10679 (nds32_emit_mem_move): New.
10680 (nds32_emit_mem_move_block): New.
10681 (nds32_expand_movmemsi_loop_unknown_size): New.
10682 (nds32_expand_movmemsi_loop_known_size): New.
10683 (nds32_expand_movmemsi_loop): New.
10684 (nds32_expand_movmemsi_unroll): New.
10685 (nds32_expand_movmemqi): Rename ...
10686 (nds32_expand_movmemsi): ... to this.
10687 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
10688 (movmemsi): ... to this.
10689 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
10690 (nds32_expand_movmemsi): ... to this.
10692 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
10693 Monk Chiang <sh.chiang04@gmail.com>
10694 Chung-Ju Wu <jasonwucj@gmail.com>
10696 * config/nds32/nds32-protos.h
10697 (nds32_expand_load_multiple): New arguments.
10698 (nds32_expand_store_multiple): Ditto.
10699 (nds32_valid_multiple_load_store): Rename ...
10700 (nds32_valid_multiple_load_store_p): ... to this.
10701 * config/nds32/nds32-memory-manipulation.c
10702 (nds32_expand_load_multiple): Refine implementation.
10703 (nds32_expand_store_multiple): Ditto.
10704 * config/nds32/nds32-multiple.md
10705 (load_multiple): Update nds32_expand_load_multiple interface.
10706 (store_multiple): Update nds32_expand_store_multiple interface.
10707 * config/nds32/nds32-predicates.c
10708 (nds32_valid_multiple_load_store): Rename ...
10709 (nds32_valid_multiple_load_store_p): ... to this and refine
10711 * config/nds32/predicates.md
10712 (nds32_load_multiple_and_update_address_operation): New predicate.
10713 (nds32_store_multiple_and_update_address_operation): New predicate.
10715 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
10716 Chung-Ju Wu <jasonwucj@gmail.com>
10718 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
10719 (combo): New attribute.
10720 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
10722 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
10724 * config/nds32/nds32.opt: Change -mcmodel= default value.
10726 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
10727 Monk Chiang <sh.chiang04@gmail.com>
10728 Chung-Ju Wu <jasonwucj@gmail.com>
10730 * config/nds32/constants.md (unspec_element): New enum.
10731 * config/nds32/constraints.md (Umw): New constraint.
10732 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
10733 * config/nds32/nds32-intrinsic.md: Likewise.
10734 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
10735 (nds32_valid_smw_lwm_base_p): New.
10736 (nds32_output_smw_single_word): New.
10737 (nds32_output_lmw_single_word): New.
10738 (nds32_expand_unaligned_load): New.
10739 (nds32_expand_unaligned_store): New.
10740 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
10741 (nds32_output_smw_single_word): Declare.
10742 (nds32_output_lmw_single_word): Declare.
10743 (nds32_expand_unaligned_load): Declare.
10744 (nds32_expand_unaligned_store): Declare.
10745 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
10746 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
10747 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
10748 NDS32_BUILTIN_UASTORE_DW.
10749 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
10752 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
10753 Kito Cheng <kito.cheng@gmail.com>
10754 Chung-Ju Wu <jasonwucj@gmail.com>
10756 * config/nds32/nds32-intrinsic.c
10757 (nds32_expand_builtin_null_ftype_reg): Delete.
10758 (nds32_expand_builtin_reg_ftype_imm): Ditto.
10759 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
10760 (nds32_read_argument): New.
10761 (nds32_legitimize_target): Ditto.
10762 (nds32_legitimize_argument): Ditto.
10763 (nds32_check_constant_argument): Ditto.
10764 (nds32_expand_unop_builtin): Ditto.
10765 (nds32_expand_unopimm_builtin): Ditto.
10766 (nds32_expand_binop_builtin): Ditto.
10767 (nds32_builtin_decl_impl): Ditto.
10768 (builtin_description): Ditto.
10769 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
10770 (nds32_init_builtins_impl): Ditto.
10771 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
10772 (nds32_builtin_decl): New.
10773 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
10774 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
10776 2018-03-02 Jeff Law <law@redhat.com>
10778 * reorg.c (stop_search_p): Handle DEBUG_INSN.
10779 (redundant_insn, fill_simple_delay_slots): Likewise.
10780 (fill_slots_from_thread): Likewise.
10781 * resource.c (mark_referenced_resources): Likewise.
10782 (mark_set_resources, find_dead_or_set_registers): Likewise.
10784 2018-03-02 Jakub Jelinek <jakub@redhat.com>
10786 * substring-locations.h (format_warning_va): Formatting fix for
10787 ATTRIBUTE_GCC_DIAG.
10788 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
10790 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
10791 * substring-locations.c: Include intl.h.
10792 (format_warning_va): Turned into small wrapper around
10793 format_warning_n_va, renamed to ...
10794 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
10795 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
10797 (format_warning_at_substring_n): New function.
10798 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
10799 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
10800 format_warning_at_substring with just a shorter name instead of
10801 const function pointer.
10802 (fmtwarn_n): New function.
10803 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
10804 appropriate, get rid of all the fmtstr temporaries, move conditionals
10805 with G_() wrapped string literals directly into fmtwarn arguments,
10806 cast dir.len to (int), formatting fixes.
10808 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
10810 * doc/invoke.texi: Remove "Cilk Plus" references.
10812 2018-03-02 Jakub Jelinek <jakub@redhat.com>
10813 Richard Biener <rguenther@suse.de>
10816 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
10817 for error or warning attributes if CALL_FROM_THUNK_P is set.
10820 2018-03-02 Jakub Jelinek <jakub@redhat.com>
10823 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
10824 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
10827 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
10828 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
10830 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
10831 instead of -1U in last predictors element's probability member.
10833 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
10836 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10837 arguments if they are comparable.
10839 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
10841 PR tree-optimization/84634
10842 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
10843 masks and masked_loop_p with a single loop_masks, making sure it's
10844 null for bb vectorization.
10846 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
10848 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10849 (vect_analyze_data_ref_access): Use loop->safe_len rather than
10850 loop->force_vectorize to check whether there is no alias.
10852 2018-03-02 Jakub Jelinek <jakub@redhat.com>
10855 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
10857 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
10859 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
10860 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
10861 instead of a loop around prev_real_insn.
10862 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
10865 PR inline-asm/84625
10866 * config/i386/i386.c (ix86_print_operand): Use conditional
10867 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
10870 2018-03-02 Richard Biener <rguenther@suse.de>
10872 PR tree-optimization/84427
10873 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
10874 (bitmap_set_subtract_values): Rewrite to handle multiple
10877 (prune_clobbered_mems): Likewise.
10878 (phi_translate): Take edge instead of pred/phiblock.
10879 (phi_translate_1): Likewise.
10880 (phi_translate_set): Likewise. Insert all translated
10881 exprs for a value into the set, keeping possibly multiple
10882 expressions per value.
10883 (compute_antic_aux): Adjust for phi_translate changes.
10884 When intersecting union the expressions and prune those
10885 not in the final value set, keeping possibly multiple
10886 expressions per value. Do not use value-insertion
10887 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
10888 all expressions. Add verification that the value-sets
10889 only shrink during iteration.
10890 (compute_partial_antic_aux): Adjust for the phi_translate changes.
10891 (do_pre_regular_insertion): Likewise.
10892 (do_pre_partial_partial_insertion): Likewise.
10894 2018-03-02 Richard Biener <rguenther@suse.de>
10897 * config/darwin.c (saved_debug_info_level): New static global.
10898 (darwin_asm_lto_start): Disable debug info generation for LTO out.
10899 (darwin_asm_lto_end): Restore debug info generation settings.
10901 2018-03-01 Martin Liska <mliska@suse.cz>
10904 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
10905 volatile arguments.
10907 2018-03-01 Richard Biener <rguenther@suse.de>
10910 * dwarf2out.c (gen_variable_die): Properly handle late VLA
10911 type annotation with LTO when debug was disabled at compile-time.
10913 2018-03-01 Matthew Fortune <mfortune@gmail.com>
10915 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
10917 (mips_final_postscan_insn): Likewise.
10919 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
10921 PR rtl-optimization/84528
10922 * alias.c (init_alias_target): Add commentary.
10923 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
10924 a unique base value if the frame pointer is not eliminated
10925 to the stack pointer.
10927 2018-03-01 Tom de Vries <tom@codesourcery.com>
10929 PR rtl-optimization/83327
10930 * lra-int.h (hard_regs_spilled_into): Declare.
10931 * lra.c (hard_regs_spilled_into): Define.
10932 (init_reg_info): Init hard_regs_spilled_into.
10933 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
10934 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
10935 (process_bb_lives): Handle hard_regs_spilled_into.
10936 (lra_create_live_ranges_1): Before doing liveness propagation, clear
10937 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
10939 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
10941 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
10942 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
10943 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
10944 * config/rs6000/aix72.h: New file.
10946 2018-02-28 Jakub Jelinek <jakub@redhat.com>
10948 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
10949 instead of warning_at with conditional singular and plural messages
10953 * stor-layout.c (update_alignment_for_field): For
10954 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
10955 && !DECL_PACKED (field), do the alignment update, just use
10956 only desired_align instead of MAX (type_align, desired_align)
10958 (place_field): Don't do known_align < desired_align handling
10959 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
10960 is non-NULL, instead do it after rli->prev_field handling and
10961 only if not within a bitfield word. For DECL_PACKED (field)
10962 use type_align of BITS_PER_UNIT.
10964 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
10966 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
10967 superfluous parentheses and trailing spaces.
10969 2018-02-28 Richard Biener <rguenther@suse.de>
10971 PR tree-optimization/84584
10972 * graphite-scop-detection.c (scop_detection::add_scop): Discard
10973 SCoPs with fake exit edge.
10975 2018-02-28 Martin Liska <mliska@suse.cz>
10978 * timevar.c (timer::print): Fix format to properly print 100%
10981 2018-02-28 Richard Biener <rguenther@suse.de>
10983 PR middle-end/84607
10984 * genmatch.c (capture_info::walk_match): Do not mark
10985 captured expressions without operands as expr_p given
10986 they act more like predicates and should be subject to
10987 "lost tail" side-effect preserving.
10989 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
10991 PR rtl-optimization/81611
10992 * auto-inc-dec.c (attempt_change): Move dead note from
10993 mem_insn if it's the next use of regno
10994 (find_address): Take address use of reg holding
10995 non-incremented value. Add parm to limit search to the named
10997 (merge_in_block): Attempt to use a mem insn that is the next
10998 use of the original regno.
11000 2018-02-27 Martin Sebor <msebor@redhat.com>
11003 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
11004 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
11006 2018-02-27 Martin Sebor <msebor@redhat.com>
11008 PR translation/84207
11009 * diagnostic-core.h (warning_n, error_n, inform_n): Change
11010 n argument to unsigned HOST_WIDE_INT.
11011 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
11012 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
11013 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
11014 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
11016 2018-02-27 Richard Biener <rguenther@suse.de>
11018 PR tree-optimization/84512
11019 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
11020 Do not use the estimate returned from record_stmt_cost for
11021 the scalar iteration cost but sum properly using add_stmt_cost.
11023 2018-02-27 Richard Biener <rguenther@suse.de>
11025 PR tree-optimization/84466
11026 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
11027 Adjust last change to less strictly validate use operands.
11029 2018-02-27 Martin Liska <mliska@suse.cz>
11031 PR gcov-profile/84548
11032 * gcov.c (process_file): Allow partial overlap and consider it
11033 also as group functions.
11034 (output_lines): Properly calculate range of lines for a group.
11036 2018-02-27 Martin Liska <mliska@suse.cz>
11038 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
11039 'ggc' suffixes. Change first column width.
11040 (timer::print): Fix formatting of the column.
11042 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
11044 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
11045 preserve inline entry blocks for the sake of debug inline
11046 entry point markers alone.
11047 (remove_unused_locals): Suggest in comments a better place to
11048 force the preservation of inline entry blocks that are
11049 otherwise unused, but do not preserve them.
11051 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
11053 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
11055 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
11058 * config/i386/constraints.md (Bs): Replace
11059 ix86_indirect_branch_register with
11060 TARGET_INDIRECT_BRANCH_REGISTER.
11062 * config/i386/i386.md (indirect_jump): Likewise.
11063 (tablejump): Likewise.
11064 (*sibcall_memory): Likewise.
11065 (*sibcall_value_memory): Likewise.
11066 Peepholes of indirect call and jump via memory: Likewise.
11067 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
11068 (*sibcall_value_GOT_32): Likewise.
11069 * config/i386/predicates.md (indirect_branch_operand): Likewise.
11070 (GOT_memory_operand): Likewise.
11071 (call_insn_operand): Likewise.
11072 (sibcall_insn_operand): Likewise.
11073 (GOT32_symbol_operand): Likewise.
11074 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
11076 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
11078 PR rtl-optimization/83496
11079 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
11080 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
11081 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
11082 redundant insn, if any.
11083 (relax_delay_slots): Likewise.
11084 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
11086 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
11088 PR tree-optimization/83965
11089 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
11090 that grouped statements are part of a reduction chain. Return
11091 true if the statement is not marked as a reduction itself but
11092 is part of a group.
11093 (vect_recog_dot_prod_pattern): Don't check whether the statement
11094 is part of a group here.
11095 (vect_recog_sad_pattern): Likewise.
11096 (vect_recog_widen_sum_pattern): Likewise.
11098 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
11101 * final.c (rest_of_clean_state): Also look for calls inside sequences.
11103 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
11106 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
11108 (ix86_output_indirect_function_return): New prototype.
11109 (ix86_split_simple_return_pop_internal): Likewise.
11110 * config/i386/i386.c (indirect_return_via_cx): New.
11111 (indirect_return_via_cx_bnd): Likewise.
11112 (indirect_thunk_name): Handle return va CX_REG.
11113 (output_indirect_thunk_function): Create alias for
11114 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
11115 (ix86_output_indirect_jmp): Remove the bool argument.
11116 (ix86_output_indirect_function_return): New function.
11117 (ix86_split_simple_return_pop_internal): Likewise.
11118 * config/i386/i386.md (*indirect_jump): Don't pass false
11119 to ix86_output_indirect_jmp.
11120 (*tablejump_1): Likewise.
11121 (simple_return_pop_internal): Change it to define_insn_and_split.
11122 Call ix86_split_simple_return_pop_internal to split it for
11123 -mfunction-return=.
11124 (simple_return_indirect_internal): Call
11125 ix86_output_indirect_function_return instead of
11126 ix86_output_indirect_jmp.
11128 2018-02-26 Jakub Jelinek <jakub@redhat.com>
11131 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
11132 memset and value initialization afterwards.
11134 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
11136 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
11138 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11141 * common/config/aarch64/aarch64-common.c
11142 (aarch_option_optimization_table[]): Switch
11143 off fomit-frame-pointer
11145 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
11146 Chung-Ju Wu <jasonwucj@gmail.com>
11148 * config/nds32/nds32-multiple.md (load_multiple): Disallow
11150 (store_multiple): Ditto.
11152 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
11154 * config.gcc: Add --with-cpu support for nds32 target.
11155 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
11156 * config/nds32/nds32.opt: Add -mcpu= option.
11158 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
11160 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
11161 isel=yes): Warn for these deprecated options.
11163 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
11165 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
11166 ISA_2_5_MASKS_EMBEDDED.
11168 2018-02-23 Jakub Jelinek <jakub@redhat.com>
11170 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
11171 p->max as pointers rather than using iterative_hash_expr.
11173 2018-02-23 Carl Love <cel@us.ibm.com>
11175 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
11176 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
11178 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
11179 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
11180 P8V_BUILTIN_VEC_VUNSIGNED2.
11182 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
11185 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
11186 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
11188 * lra-constraints.c (curr_insn_transform): Set up
11189 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
11191 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
11192 * lra-eliminations.c (spill_pseudos): Ditto.
11193 (process_insn_for_elimination): Ditto.
11194 * lra-lives.c (reg_early_clobber_p): Use the new macros.
11195 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
11196 LRA_NON_CLOBBERED_ALT.
11198 2018-02-22 Martin Sebor <msebor@redhat.com>
11200 PR tree-optimization/84480
11201 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
11202 to maybe_diag_stxncpy_trunc. Call it.
11203 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
11204 from gimple_fold_builtin_strcpy. Print inlining stack.
11205 (handle_builtin_stxncpy): Print inlining stack.
11206 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
11208 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
11211 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
11212 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
11213 and -fcheck-pointer-bounds are used together.
11214 (indirect_thunk_prefix): New enum.
11215 (indirect_thunk_need_prefix): New function.
11216 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
11217 "_nt" instead of "_bnd" for NOTRACK prefix.
11218 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
11219 (output_indirect_thunk_function): Likewise.
11221 (ix86_code_end): Update output_indirect_thunk_function calls.
11222 (ix86_output_indirect_branch_via_reg): Replace
11223 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
11224 (ix86_output_indirect_branch_via_push): Likewise.
11225 (ix86_output_function_return): Likewise.
11226 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
11227 incompatible with -fcf-protection=branch and
11228 -fcheck-pointer-bounds.
11230 2018-02-22 Steve Ellcey <sellcey@cavium.com>
11233 * config/aarch64/aarch64.c (aarch64_print_address_internal):
11234 Change gcc_assert call to output_operand_lossage.
11236 2018-02-22 Steve Ellcey <sellcey@cavium.com>
11238 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
11240 2018-02-22 DJ Delorie <dj@redhat.com>
11241 Sebastian Perta <sebastian.perta@renesas.com>
11242 Oleg Endo <olegendo@gcc.gnu.org>
11244 * config/rx/rx.c (rx_rtx_costs): New function.
11245 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
11247 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
11249 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
11251 2018-02-22 Martin Liska <mliska@suse.cz>
11254 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
11255 Add "native" as a possible value.
11257 2018-02-22 Martin Liska <mliska@suse.cz>
11260 * config/i386/i386.c (ix86_option_override_internal):
11261 Add "native" as a possible value for -march and -mtune.
11263 2018-02-22 Jakub Jelinek <jakub@redhat.com>
11266 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
11267 to all type variants.
11269 PR tree-optimization/84503
11270 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
11271 width as info->bitpos + info->bitsize - start.
11272 (merged_store_group::merge_overlapping): Simplify width computation.
11273 (check_no_overlap): New function.
11274 (imm_store_chain_info::try_coalesce_bswap): Compute expected
11275 start + width and last_order of the group, fail if check_no_overlap
11277 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
11278 to group if check_no_overlap fails.
11280 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
11282 * config/rs6000/altivec.md: Delete contraint arguments to
11283 define_expand, define_split, and define_peephole2, and in
11284 define_insn_and_split if always unused.
11285 * config/rs6000/darwin.md: Ditto.
11286 * config/rs6000/dfp.md: Ditto.
11287 * config/rs6000/rs6000.md: Ditto.
11288 * config/rs6000/sync.md: Ditto.
11289 * config/rs6000/vector.md: Ditto.
11290 * config/rs6000/vsx.md: Ditto.
11292 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
11294 * config/rs6000/altivec.md: Write output control strings as braced
11295 blocks instead of double-quoted strings.
11296 * config/rs6000/darwin.md: Ditto.
11297 * config/rs6000/rs6000.md: Ditto.
11298 * config/rs6000/vector.md: Ditto.
11299 * config/rs6000/vsx.md: Ditto.
11301 2018-02-21 Jason Merrill <jason@redhat.com>
11303 PR c++/84314 - ICE with templates and fastcall attribute.
11304 * attribs.c (build_type_attribute_qual_variant): Remove assert.
11306 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
11308 * ipa-cp.c (determine_versionability): Fix comment typos.
11310 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
11313 * ipa-cp.c (determine_versionability): Do not version functions caling
11316 2018-02-21 Martin Liska <mliska@suse.cz>
11319 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
11320 Add "native" as a possible value.
11321 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
11322 the macro when native cpu detection is available.
11324 2018-02-21 Martin Liska <mliska@suse.cz>
11327 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
11328 Add "native" as a possible value.
11329 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
11330 when native cpu detection is available.
11332 2018-02-21 Jakub Jelinek <jakub@redhat.com>
11333 Martin Sebor <msebor@redhat.com>
11335 PR tree-optimization/84478
11336 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
11338 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
11339 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
11340 support which is conservatively correct, for 2 only stay conservative
11341 for maxlen. Formatting and comment capitalization fixes. Add STRICT
11342 argument to the 2 argument get_range_strlen, adjust 6 arg
11343 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
11345 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
11346 (gimple_fold_builtin_strlen): Pass true as last argument to
11349 2018-02-20 Martin Sebor <msebor@redhat.com>
11351 PR middle-end/84095
11352 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
11353 (builtin_memref::set_base_and_offset): Same. Handle inner references.
11354 (builtin_memref::builtin_memref): Factor out parts into
11355 set_base_and_offset and call it.
11357 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
11359 PR middle-end/84406
11360 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
11361 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
11362 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
11363 search at the associated MODE_INT.
11365 2018-02-20 Jeff Law <law@redhat.com>
11367 PR middle-end/82123
11368 PR tree-optimization/81592
11369 PR middle-end/79257
11370 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
11371 for range data rather than using global data.
11372 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
11373 range data rather than using global data.
11374 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
11375 pass it to children as needed.
11376 (struct directive::fmtresult): Similarly.
11377 (struct directive::set_width): Similarly.
11378 (struct directive::set_precision): Similarly.
11379 (format_integer, format_directive, parse_directive): Similarly.
11380 (format_none): Accept unnamed vr_values parameter.
11381 (format_percent, format_floating, format_character): Similarly.
11382 (format_string, format_plain): Similarly.
11383 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
11384 the EVRP range analyzer for range data rather than using global data.
11385 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
11386 gimple-ssa-evrp-analyze.h
11387 (class sprintf_dom_walker): Add after_dom_children member function.
11388 Add evrp_range_analyzer member.
11389 (sprintf_dom_walker::before_dom_children): Call into the EVRP
11390 range analyzer as needed.
11391 (sprintf_dom_walker::after_dom_children): New member function.
11392 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
11394 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
11395 (evrp_range_analyzer::pop_to_marker): Likewise.
11397 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
11399 PR tree-optimization/84419
11400 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
11401 with the required type if its current type is compatible but
11404 2018-02-20 Jakub Jelinek <jakub@redhat.com>
11406 PR middle-end/82004
11407 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
11408 after vectorization.
11410 2018-02-20 Martin Liska <mliska@suse.cz>
11413 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
11414 possible values if we don't have a hint.
11416 2018-02-20 Martin Liska <mliska@suse.cz>
11420 * final.c (shorten_branches): Build align_tab array with one
11422 * opts.c (finish_options): Add alignment option limit check.
11423 (MAX_CODE_ALIGN): Likewise.
11424 (MAX_CODE_ALIGN_VALUE): Likewise.
11425 * doc/invoke.texi: Document maximum allowed option value for
11426 all -falign-* options.
11428 2018-02-19 Jakub Jelinek <jakub@redhat.com>
11431 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
11432 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
11433 * var-tracking.c (emit_note_insn_var_location): Remove all references
11434 to NOTE_INSN_CALL_ARG_LOCATION.
11435 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
11436 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
11437 Use copy_rtx_if_shared.
11438 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
11439 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
11440 (dwarf2out_var_location): Remove handling of
11441 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
11443 * final.c (final_scan_insn): Remove all references to
11444 NOTE_INSN_CALL_ARG_LOCATION.
11445 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
11446 before dumping final insns.
11447 * except.c (emit_note_eh_region_end): Remove all references to
11448 NOTE_INSN_CALL_ARG_LOCATION.
11449 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
11450 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
11451 * config/arc/arc.c (hwloop_optimize): Likewise.
11452 * config/arm/arm.c (create_fix_barrier): Likewise.
11453 * config/s390/s390.c (s390_chunkify_start): Likewise.
11454 * config/sh/sh.c (find_barrier): Likewise.
11455 * config/i386/i386.c (rest_of_insert_endbranch,
11456 ix86_seh_fixup_eh_fallthru): Likewise.
11457 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
11458 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
11459 * config/frv/frv.c (frv_function_prologue): Likewise.
11460 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
11462 (note_outside_basic_block_p): Remove all references to
11463 NOTE_INSN_CALL_ARG_LOCATION.
11464 * gengtype.c (adjust_field_rtx_def): Likewise.
11465 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
11467 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
11468 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
11471 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
11474 PR tree-optimization/84452
11475 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
11476 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
11479 2018-02-19 Martin Liska <mliska@suse.cz>
11482 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
11484 2018-02-19 Martin Liska <mliska@suse.cz>
11485 Richard Sandiford <richard.sandiford@linaro.org>
11487 PR tree-optimization/82491
11488 * gimple-fold.c (get_base_constructor): Make earlier bail out
11491 2018-02-19 Carl Love <cel@us.ibm.com>
11493 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
11494 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
11496 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
11497 P8V_BUILTIN_VEC_NEG.
11499 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
11501 * config/rl78/rl78.md (movdf): New define expand.
11503 2018-02-19 Martin Liska <mliska@suse.cz>
11506 * doc/invoke.texi: Fix typo.
11507 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
11509 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
11511 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
11512 handle rs6000_single_float and rs6000_double_float specially for
11515 2018-02-16 Jeff Law <law@redhat.com>
11517 * config/rx/rx.c (add_pop_cfi_notes): New function.;
11518 (pop_regs): Use it.
11520 2018-02-16 Jakub Jelinek <jakub@redhat.com>
11523 * ipa-inline.c (inline_small_functions): Fix a typo.
11525 2018-02-16 Nathan Sidwell <nathan@acm.org>
11527 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
11529 2018-02-16 Carl Love <cel@us.ibm.com>
11531 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
11532 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
11533 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
11534 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
11535 expansion to P8V_BUILTIN_VEC_FLOAT2.
11537 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
11539 PR rtl-optimization/70023
11540 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
11541 src_regno into account.
11543 2018-02-16 Carl Love <cel@us.ibm.com>
11545 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
11546 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
11547 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
11548 * config/rs6000/rs6000.c: Remove case statements for
11549 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
11550 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
11551 and P9V_BUILTIN_VEC_VINSERT4B.
11552 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
11553 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
11554 * config/rs6000/vsx.md:
11555 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
11558 2018-02-16 Carl Love <cel@us.ibm.com>
11560 * config/rs6000/altivec.h: Add builtin names vec_extract4b
11562 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
11564 * config/rs6000/rs6000-c.c: Add the definitions for
11565 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
11566 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
11567 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
11568 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
11569 definition for insert4b and define insn *insert3b_internal.
11570 * doc/extend.texi: Add documentation for vec_extract4b.
11572 2018-02-16 Nathan Sidwell <nathan@acm.org>
11574 * doc/extend.texi (Backwards Compatibility): Mention friend
11575 injection. Note for-scope is deprecated.
11576 * doc/invoke.texi (-ffriend-injection): Deprecate.
11578 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
11580 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
11581 that moved to I2, also allow destinations that are a paradoxical
11582 subreg (instead of a normal reg).
11584 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
11587 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
11590 2018-02-16 Richard Biener <rguenther@suse.de>
11592 PR tree-optimization/84037
11593 PR tree-optimization/84016
11595 * config/i386/i386.c (ix86_builtin_vectorization_cost):
11596 Adjust vec_construct for the fact we need additional higher latency
11597 128bit inserts for AVX256 and AVX512 vector builds.
11598 (ix86_add_stmt_cost): Scale vector construction cost for
11601 2018-02-16 Richard Biener <rguenther@suse.de>
11603 PR tree-optimization/84417
11604 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
11605 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
11606 (non_rewritable_lvalue_p): Likewise, use poly-ints.
11608 2018-02-16 Martin Liska <mliska@suse.cz>
11611 * internal-fn.def (ASAN_CHECK): Set proper flags.
11612 (ASAN_MARK): Likewise.
11614 2018-02-16 Julia Koval <julia.koval@intel.com>
11616 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
11617 from PTA_CANNONLAKE.
11619 2018-02-16 Jakub Jelinek <jakub@redhat.com>
11622 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
11623 Use ++iter rather than iter++ for std::list iterators.
11624 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
11625 defer deleting them until all nodes in the forest are processed. Do
11626 free even leaf nodes. Change to_process into auto_vec.
11629 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
11630 * vec.h (vec_default_construct): Use memset instead of placement new
11631 if BROKEN_VALUE_INITIALIZATION is defined.
11632 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
11633 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
11636 PR rtl-optimization/83723
11637 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
11638 * lra.c (lra_substitute_pseudo): Likewise. If true, use
11639 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
11641 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
11643 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
11645 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
11647 PR rtl-optimization/81443
11648 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
11649 from inner REGs to paradoxical SUBREGs.
11651 2018-02-16 Richard Biener <rguenther@suse.de>
11653 PR tree-optimization/84399
11654 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
11655 For operands we can analyze at their definition make sure we can
11656 analyze them at each use as well.
11658 2018-02-16 Richard Biener <rguenther@suse.de>
11660 PR tree-optimization/84190
11661 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
11662 volatile accesses if the decl isn't volatile.
11664 2018-02-15 Jason Merrill <jason@redhat.com>
11666 PR c++/84314 - ICE with templates and fastcall attribute.
11667 * attribs.c (build_type_attribute_qual_variant): Don't clobber
11668 TYPE_CANONICAL on an existing type.
11670 2018-02-15 Jakub Jelinek <jakub@redhat.com>
11672 PR tree-optimization/84383
11673 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
11674 dstoff nor call operand_equal_p if dstbase is NULL.
11676 PR tree-optimization/84334
11677 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
11678 also a CONSTANT_CLASS_P, punt.
11680 2018-02-14 Jim Wilson <jimw@sifive.com>
11682 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
11683 first SMALL_OPERAND check. New local min_second_step. Move assert
11684 to where locals are set. Add TARGET_RVC support.
11685 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
11687 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
11689 * doc/invoke.texi: Correct -Wformat-overflow code sample.
11691 2018-02-14 Martin Sebor <msebor@redhat.com>
11693 PR tree-optimization/83698
11694 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
11695 arrays constrain the offset range to their bounds.
11696 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
11697 (builtin_access::overlap): Avoid setting the size of overlap if it's
11699 (maybe_diag_overlap): Also consider arrays when deciding what values
11700 of offsets to include in diagnostics.
11702 2018-02-14 Martin Sebor <msebor@redhat.com>
11705 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
11706 that correspond to the kind of a declaration.
11708 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
11711 * config/pa/pa.md: Load address of PIC label using the linkage table
11712 if the label is nonlocal.
11714 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
11716 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
11717 warning message if user requests -maltivec=be.
11718 * doc/invoke.texi: Document deprecation of -maltivec=be.
11720 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
11723 * config/rs6000/rs6000-c.c: Update definitions for
11724 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
11725 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
11727 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
11730 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
11731 add _get_ssp intrinsics. Remove argument from
11732 __builtin_ia32_rdssp[d|q].
11733 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
11734 * config/i386/i386-builtin.def: Remove argument from
11735 __builtin_ia32_rdssp[d|q].
11736 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
11737 ix86_expand_special_args_builtin for _rdssp[d|q].
11738 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
11739 Clear register before usage.
11740 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
11741 Add documentation for new _get_ssp and _inc_ssp intrinsics.
11743 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
11745 PR tree-optimization/84357
11746 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
11747 operand 1 of an ARRAY_REF too.
11749 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
11752 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
11753 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
11755 (set_of_reg): New struct.
11756 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
11757 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
11758 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
11760 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
11761 Split into bitclr, bitset, bitinvert patterns if appropriate.
11762 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
11763 use rx_fuse_in_memory_bitop.
11764 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
11765 to named insn, correct maximum insn length.
11767 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
11770 * machmode.def: Define a complex mode for PARTIAL_INT.
11771 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
11773 * doc/rtl.texi: Document CSPImode.
11774 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
11776 (msp430_hard_regno_nregs_with_padding): Likewise.
11778 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
11781 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
11783 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
11785 PR rtl-optimization/84169
11786 * combine.c (try_combine): New variable split_i2i3. Set it to true if
11787 we generated a parallel as new i3 and we split that to new i2 and i3
11788 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
11789 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
11790 those to i2, not i1. Partially rewrite this scan code.
11792 2018-02-13 Jakub Jelinek <jakub@redhat.com>
11795 * stor-layout.c (place_field): For variable length fields, adjust
11796 offset_align afterwards not just based on the field's alignment,
11797 but also on the size.
11799 PR middle-end/84309
11800 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
11801 of exps and logs in the use_exp2 case.
11803 2018-02-13 Jeff Law <law@redhat.com>
11805 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
11806 entry for "vector".
11808 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
11811 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
11815 * common.opt (gas-loc-support, gas-locview-support): New.
11816 (ginline-points, ginternal-reset-location-views): New.
11817 * doc/invoke.texi: Document them. Use @itemx where intended.
11818 (gvariable-location-views): Adjust.
11819 * target.def (reset_location_view): New.
11820 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
11821 (TARGET_RESET_LOCATION_VIEW): New.
11822 * doc/tm.texi: Rebuilt.
11823 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
11824 (dwarf2out_default_as_locview_support): New.
11825 (output_asm_line_debug_info): Use option variables.
11826 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
11827 (output_loc_list): Likewise.
11828 (add_high_low_attributes): Check option variables.
11829 Don't output entry view attribute in strict mode.
11830 (gen_inlined_subroutine_die): Check option variables.
11831 (dwarf2out_inline_entry): Likewise.
11832 (init_sections_and_labels): Likewise.
11833 (dwarf2out_early_finish): Likewise.
11834 (maybe_reset_location_view): New, from...
11835 (dwarf2out_var_location): ... here. Call it.
11836 * debug.h (dwarf2out_default_as_loc_support): Declare.
11837 (dwarf2out_default_as_locview_support): Declare.
11838 * hooks.c (hook_int_rtx_insn_0): New.
11839 * hooks.h (hook_int_rtx_insn_0): Declare.
11840 * toplev.c (process_options): Take -gas-loc-support and
11841 -gas-locview-support from dwarf2out. Enable
11842 -gvariable-location-views by default only with locview
11843 assembler support. Enable -ginternal-reset-location-views by
11844 default only if the target defines the corresponding hook.
11845 Enable -ginline-points by default if location views are
11846 enabled; force it disabled if statement frontiers are
11848 * tree-inline.c (expand_call_inline): Check option variables.
11849 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
11851 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
11853 PR tree-optimization/84321
11854 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
11855 handling. Also check whether the anti-range contains any values
11856 that satisfy the mask; switch to a VR_RANGE if not.
11858 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
11861 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
11863 2018-02-13 Martin Jambor <mjambor@suse.cz>
11866 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
11867 of call statements, also set location of a load to a temporary.
11869 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
11871 * config/rl78/rl78.c (add_vector_labels): New function.
11872 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
11873 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
11874 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
11875 which checks that no arguments are passed.
11876 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
11877 * doc/extend.texi: Documentation for the new attribute.
11879 2018-02-13 Andreas Schwab <schwab@suse.de>
11881 * config/riscv/linux.h (CPP_SPEC): Define.
11883 2018-02-13 Jakub Jelinek <jakub@redhat.com>
11886 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
11887 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
11888 OPTION_MASK_ISA_AES as first argument to def_builtin_const
11889 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
11890 instead of OPTION_MASK_ISA_PCLMUL as first argument to
11891 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
11892 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
11893 temporarily for AES and PCLMUL builtins.
11895 PR tree-optimization/84339
11896 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
11897 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
11900 PR middle-end/84309
11901 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
11902 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
11903 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
11905 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
11907 * omp-simd-clone.h: New file.
11908 * omp-simd-clone.c: Include omp-simd-clone.h.
11909 (expand_simd_clones): No longer static.
11910 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
11911 cgraph.h and omp-simd-clone.h.
11912 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
11913 (vect_recog_widen_shift_pattern): Formatting fix.
11914 (vect_pattern_recog_1): Don't check optab for calls.
11917 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
11918 operands[2] into a REG before using gen_lowpart on it.
11920 2018-02-12 Jeff Law <law@redhat.com>
11923 * config/sh/sh.c (find_barrier): Consider a sibling call
11926 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
11927 successfully back substituting a reg.
11929 2018-02-12 Richard Biener <rguenther@suse.de>
11931 PR tree-optimization/84037
11932 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
11933 parameter, move visited init to caller.
11934 (vect_slp_analyze_operations): Separate cost from validity
11935 check, initialize visited once for all instances.
11936 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
11938 * tree-vect-stmts.c (vect_model_simple_cost): Make early
11940 (vect_model_promotion_demotion_cost): Likewise.
11941 (vectorizable_bswap): Guard cost modeling with !slp_node
11942 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
11944 (vectorizable_call): Likewise.
11945 (vectorizable_conversion): Likewise.
11946 (vectorizable_assignment): Likewise.
11947 (vectorizable_shift): Likewise.
11948 (vectorizable_operation): Likewise.
11949 (vectorizable_store): Likewise.
11950 (vectorizable_load): Likewise.
11951 (vectorizable_condition): Likewise.
11952 (vectorizable_comparison): Likewise.
11954 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
11957 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
11958 (ASAN_MARK): Fix fnspec to account for return value, change pointer
11959 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
11961 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
11963 PR middle-end/83665
11964 * params.def (inline-min-speedup): Increase from 8 to 15.
11965 (max-inline-insns-auto): Decrease from 40 to 30.
11966 * ipa-split.c (consider_split): Add some buffer for function to
11967 be considered inlining candidate.
11968 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
11971 2018-02-12 Richard Biener <rguenther@suse.de>
11973 PR tree-optimization/84037
11974 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
11975 matched stmts if we cannot swap the non-matched ones.
11977 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
11979 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
11980 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
11981 _mm_maskz_scalef_round_ss): New intrinsics.
11982 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
11983 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
11984 __builtin_ia32_scalefss_round): Remove.
11985 (__builtin_ia32_scalefsd_mask_round,
11986 __builtin_ia32_scalefss_mask_round): New intrinsics.
11987 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
11988 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
11989 ((match_operand:VF_128 2 "<round_nimm_predicate>"
11990 "<round_constraint>")): Changed to ...
11991 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
11992 "<round_scalar_constraint>")): ... this.
11993 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
11994 %0, %1, %2<round_op3>}"): Changed to ...
11995 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
11996 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
11997 %2<round_scalar_mask_op3>}"): ... this.
11998 * config/i386/subst.md (round_scalar_nimm_predicate): New.
12000 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
12002 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
12003 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
12004 (_mm_maskz_sqrt_round_ss): New intrinsics.
12005 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
12006 (__builtin_ia32_sqrtsd_mask_round)
12007 (__builtin_ia32_sqrtss_mask_round): New builtins.
12008 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
12009 (__builtin_ia32_sqrtss_round): Remove.
12010 (__builtin_ia32_sqrtsd_mask_round)
12011 (__builtin_ia32_sqrtss_mask_round): New builtins.
12012 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
12013 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
12014 ((match_operand:VF_128 1 "vector_operand"
12015 "xBm,<round_constraint>")): Changed to ...
12016 ((match_operand:VF_128 1 "vector_operand"
12017 "xBm,<round_scalar_constraint>")): ... this.
12018 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
12019 %0, %2, %<iptr>1<round_op3>}): Changed to ...
12020 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
12021 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
12022 %<iptr>1<round_scalar_mask_op3>}): ... this.
12023 ((set_attr "prefix" "<round_prefix>")): Changed to ...
12024 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
12026 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
12029 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
12030 Cast vec_cmpeq result to correct type.
12031 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
12032 Cast vec_cmpgt result to correct type.
12034 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
12036 * final.c (final_scan_insn_1): Renamed from...
12037 (final_scan_insn): ... this. New wrapper, to recover
12038 seen from the outermost call in recursive ones.
12039 * config/sparc/sparc.c (output_return): Drop seen from call.
12040 (output_sibcall): Likewise.
12041 * config/visium/visium.c (output_branch): Likewise.
12043 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
12045 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
12048 2018-02-10 Alan Modra <amodra@gmail.com>
12051 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
12052 Specify LR as an input.
12054 2018-02-10 Jakub Jelinek <jakub@redhat.com>
12057 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
12058 remove_member_access_dummy_vars): New functions.
12059 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
12060 lower_omp_1, execute_lower_omp): Use them.
12062 PR rtl-optimization/84308
12063 * shrink-wrap.c (spread_components): Release todo vector.
12065 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
12067 PR rtl-optimization/57193
12068 * ira-color.c (struct allocno_color_data): Add member
12069 conflict_allocno_hard_prefs.
12070 (update_conflict_allocno_hard_prefs): New.
12071 (bucket_allocno_compare_func): Add a preference based on
12072 conflict_allocno_hard_prefs.
12073 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
12074 (color_allocnos): Remove a dead code. Initiate
12075 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
12077 2018-02-09 Jakub Jelinek <jakub@redhat.com>
12080 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
12081 constraint from =wa to wa. Avoid a subreg on the output operand,
12082 instead use a pseudo and subreg it in a move.
12083 (p9_xxbrd_<mode>): Changed to ...
12084 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
12085 (p9_xxbrd_v2df): New expander.
12086 (p9_xxbrw_<mode>): Changed to ...
12087 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
12088 (p9_xxbrw_v4sf): New expander.
12090 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
12092 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
12094 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
12097 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
12098 multiply in 32-bit mode.
12099 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
12100 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
12103 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
12105 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
12106 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
12107 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
12108 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
12110 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
12113 * dwarf2out.c (is_trivial_indirect_ref): New function.
12114 (dwarf2out_late_global_decl): Do not generate a location
12115 attribute for variables that have a non-trivial DECL_VALUE_EXPR
12116 and that are not defined in the current unit.
12118 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
12120 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
12121 instead of a libcall for UNORDERED.
12123 2018-02-09 Tamar Christina <tamar.christina@arm.com>
12126 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
12127 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
12129 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12132 * config/s390/s390.c (s390_set_current_function): Invoke
12133 s390_indirect_branch_settings also if fndecl didn't change.
12135 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
12137 * config/rs6000/rs6000.md (blockage): Set length to zero.
12139 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
12141 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
12143 2018-02-09 Jakub Jelinek <jakub@redhat.com>
12146 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
12147 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
12151 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
12152 PARALLEL incoming that failed vt_get_decl_and_offset check.
12154 PR middle-end/84237
12155 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
12156 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
12158 (get_variable_section): For decls in named .bss* sections pass true as
12159 second argument to bss_initializer_p.
12161 2018-02-09 Marek Polacek <polacek@redhat.com>
12162 Jakub Jelinek <jakub@redhat.com>
12165 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
12166 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
12167 Sync some changes from cxx_fold_indirect_ref.
12169 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
12171 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
12173 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
12174 (BLOCK_INLINE_ENTRY_LABEL): New.
12175 (dwarf2out_var_location): Disregard inline entry markers.
12176 (inline_entry_data): New struct.
12177 (inline_entry_data_hasher): New hashtable type.
12178 (inline_entry_data_hasher::hash): New.
12179 (inline_entry_data_hasher::equal): New.
12180 (inline_entry_data_table): New variable.
12181 (add_high_low_attributes): Add DW_AT_entry_pc and
12182 DW_AT_GNU_entry_view attributes if a pending entry is found
12183 in inline_entry_data_table. Add old entry_pc attribute only
12184 if debug nonbinding markers are disabled.
12185 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
12186 markers are enabled.
12187 (block_within_block_p, dwarf2out_inline_entry): New.
12188 (dwarf2out_finish): Check that no entries remained in
12189 inline_entry_data_table.
12190 * final.c (reemit_insn_block_notes): Handle inline entry notes.
12191 (final_scan_insn, notice_source_line): Likewise.
12192 (rest_of_clean_state): Skip inline entry markers.
12193 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
12195 * gimple.c (gimple_build_debug_inline_entry): New.
12196 * gimple.h (enum gimple_debug_subcode): Add
12197 GIMPLE_DEBUG_INLINE_ENTRY.
12198 (gimple_build_debug_inline_entry): Declare.
12199 (gimple_debug_inline_entry_p): New.
12200 (gimple_debug_nonbind_marker_p): Adjust.
12201 * insn-notes.def (INLINE_ENTRY): New.
12202 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
12203 inline entry marker notes.
12204 (print_insn): Likewise.
12205 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
12206 (INSN_DEBUG_MARKER_KIND): Likewise.
12207 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
12208 * tree-inline.c (expand_call_inline): Build and insert
12209 debug_inline_entry stmt.
12210 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
12211 inline entry blocks early, if nonbind markers are enabled.
12212 (dump_scope_block): Dump fragment info.
12213 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
12214 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
12215 (gimple_build_debug_inline_entry): New.
12216 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
12217 Enable/disable inline entry points too.
12218 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
12219 (DEBUG_INSN): Describe inline entry markers.
12221 * common.opt (gvariable-location-views): New.
12222 (gvariable-location-views=incompat5): New.
12223 * config.in: Rebuilt.
12224 * configure: Rebuilt.
12225 * configure.ac: Test assembler for view support.
12226 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
12227 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
12228 * dwarf2out.c (var_loc_view): New typedef.
12229 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
12230 (dwarf2out_locviews_in_attribute): New.
12231 (dwarf2out_locviews_in_loclist): New.
12232 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
12233 (enum dw_line_info_opcode): Add LI_adv_address.
12234 (struct dw_line_info_table): Add view.
12235 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
12236 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
12237 (zero_view_p): New variable.
12238 (ZERO_VIEW_P): New macro.
12239 (output_asm_line_debug_info): New.
12240 (struct var_loc_node): Add view.
12241 (add_AT_view_list, AT_loc_list): New.
12242 (add_var_loc_to_decl): Add view param. Test it against last.
12243 (new_loc_list): Add view params. Record them.
12244 (AT_loc_list_ptr): Handle loc and view lists.
12245 (view_list_to_loc_list_val_node): New.
12246 (print_dw_val): Handle dw_val_class_view_list.
12247 (size_of_die): Likewise.
12248 (value_format): Likewise.
12249 (loc_list_has_views): New.
12250 (gen_llsym): Set vl_symbol too.
12251 (maybe_gen_llsym, skip_loc_list_entry): New.
12252 (dwarf2out_maybe_output_loclist_view_pair): New.
12253 (output_loc_list): Output view list or entries too.
12254 (output_view_list_offset): New.
12255 (output_die): Handle dw_val_class_view_list.
12256 (output_dwarf_version): New.
12257 (output_compilation_unit_header): Use it.
12258 (output_skeleton_debug_sections): Likewise.
12259 (output_rnglists, output_line_info): Likewise.
12260 (output_pubnames, output_aranges): Update version comments.
12261 (output_one_line_info_table): Output view numbers in asm comments.
12262 (dw_loc_list): Determine current endview, pass it to new_loc_list.
12263 Call maybe_gen_llsym.
12264 (loc_list_from_tree_1): Adjust.
12265 (add_AT_location_description): Create view list attribute if
12266 needed, check it's absent otherwise.
12267 (convert_cfa_to_fb_loc_list): Adjust.
12268 (maybe_emit_file): Call output_asm_line_debug_info for test.
12269 (dwarf2out_var_location): Reset views as needed. Precompute
12270 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
12271 attribute. Set view.
12272 (new_line_info_table): Reset next view.
12273 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
12274 (dwarf2out_source_line): Likewise. Output view resets and labels to
12275 the assembler, or select appropriate line info opcodes.
12276 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
12277 (optimize_string_length): Catch it. Adjust.
12278 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
12279 dw_val_class_view_list, and remove it if no longer needed.
12280 (hash_loc_list): Hash view numbers.
12281 (loc_list_hasher::equal): Compare them.
12282 (optimize_location_lists): Check whether a view list symbol is
12283 needed, and whether the locview attribute is present, and
12284 whether they match. Remove the locview attribute if no longer
12286 (index_location_lists): Call skip_loc_list_entry for test.
12287 (dwarf2out_finish): Call output_asm_line_debug_info for test.
12288 Use output_dwarf_version.
12289 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
12290 (struct dw_val_node): Add val_view_list.
12291 * final.c (SEEN_NEXT_VIEW): New.
12292 (set_next_view_needed): New.
12293 (clear_next_view_needed): New.
12294 (maybe_output_next_view): New.
12295 (final_start_function): Rename to...
12296 (final_start_function_1): ... this. Take pointer to FIRST,
12297 add SEEN parameter. Emit param bindings in the initial view.
12298 (final_start_function): Reintroduce SEEN-less interface.
12299 (final): Rename to...
12300 (final_1): ... this. Take SEEN parameter. Output final pending
12301 next view at the end.
12302 (final): Reintroduce seen-less interface.
12303 (final_scan_insn): Output pending next view before switching
12304 sections or ending a block. Mark the next view as needed when
12305 outputting variable locations. Notify debug backend of section
12306 changes, and of location view changes.
12307 (rest_of_handle_final): Adjust.
12308 * toplev.c (process_options): Autodetect value for debug variable
12309 location views option. Warn on incompat5 without -gdwarf-5.
12310 * doc/invoke.texi (gvariable-location-views): New.
12311 (gvariable-location-views=incompat5): New.
12312 (gno-variable-location-views): New.
12314 2018-02-08 David Malcolm <dmalcolm@redhat.com>
12316 PR tree-optimization/84136
12317 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
12318 that the result of find_edge is non-NULL.
12320 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
12323 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
12324 storing integer register in SImode. Fix cost of 256 and 512
12325 byte aligned SSE register store.
12327 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
12329 * config/i386/i386.c (ix86_multiplication_cost): Fix
12330 multiplication cost for TARGET_AVX512DQ.
12332 2018-02-08 Marek Polacek <polacek@redhat.com>
12334 PR tree-optimization/84238
12335 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
12338 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
12340 PR tree-optimization/84265
12341 * tree-vect-stmts.c (vectorizable_store): Don't treat
12342 VMAT_CONTIGUOUS accesses as grouped.
12343 (vectorizable_load): Likewise.
12345 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
12347 PR tree-optimization/81635
12348 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
12349 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
12350 (test_round_for_mask): New functions.
12351 (wide_int_cc_tests): Call test_round_for_mask.
12352 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
12353 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
12354 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
12355 range returned by get_range_info.
12357 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
12360 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
12361 * symtab.c: Include builtins.h
12362 (symtab_node::output_to_lto_symbol_table_p): Move here
12363 from lto-streamer-out.c:output_symbol_p.
12364 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
12365 (output_symbol_p): Move all logic to symtab.c
12366 (produce_symtab): Update.
12368 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12370 * config/s390/s390-opts.h (enum indirect_branch): Define.
12371 * config/s390/s390-protos.h (s390_return_addr_from_memory)
12372 (s390_indirect_branch_via_thunk)
12373 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
12374 (enum s390_indirect_branch_type): Define.
12375 * config/s390/s390.c (struct s390_frame_layout, struct
12376 machine_function): Remove.
12377 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
12378 (indirect_branch_table_label_no, indirect_branch_table_name):
12380 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
12381 (enum s390_indirect_branch_option): Define.
12382 (s390_return_addr_from_memory): New function.
12383 (s390_handle_string_attribute): New function.
12384 (s390_attribute_table): Add new attribute handler.
12385 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
12386 (s390_indirect_branch_via_thunk): New function.
12387 (s390_indirect_branch_via_inline_thunk): New function.
12388 (s390_function_ok_for_sibcall): When jumping via thunk disallow
12389 sibling call optimization for non z10 compiles.
12390 (s390_emit_call): Force indirect branch target to be a single
12391 register. Add r1 clobber for non-z10 compiles.
12392 (s390_emit_epilogue): Emit return jump via return_use expander.
12393 (s390_reorg): Handle JUMP_INSNs as execute targets.
12394 (s390_option_override_internal): Perform validity checks for the
12395 new command line options.
12396 (s390_indirect_branch_attrvalue): New function.
12397 (s390_indirect_branch_settings): New function.
12398 (s390_set_current_function): Invoke s390_indirect_branch_settings.
12399 (s390_output_indirect_thunk_function): New function.
12400 (s390_code_end): Implement target hook.
12401 (s390_case_values_threshold): Implement target hook.
12402 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
12404 * config/s390/s390.h (struct s390_frame_layout)
12405 (struct machine_function): Move here from s390.c.
12406 (TARGET_INDIRECT_BRANCH_NOBP_RET)
12407 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
12408 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
12409 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
12410 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
12411 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
12412 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
12413 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
12414 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
12415 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
12416 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
12417 (mnemonic attribute): Add values which aren't recognized
12419 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
12420 pattern for branch conversion. Fix mnemonic attribute.
12421 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
12422 indirect branch via thunk if requested.
12423 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
12424 ("*indirect_jump"): Disable for branch conversion using out of
12426 ("indirect_jump_via_thunk<mode>_z10")
12427 ("indirect_jump_via_thunk<mode>")
12428 ("indirect_jump_via_inlinethunk<mode>_z10")
12429 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
12430 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
12431 ("casesi_jump_via_inlinethunk<mode>_z10")
12432 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
12433 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
12434 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
12435 ("*indirect2_jump"): Disable for branch conversion.
12436 ("casesi_jump"): Turn into expander and expand patterns for branch
12438 ("return_use"): New expander.
12439 ("*return"): Emit return via thunk and rename it to ...
12440 ("*return<mode>"): ... this one.
12441 * config/s390/s390.opt: Add new options and and enum for the
12444 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
12446 * lra-constraints.c (match_reload): Unconditionally use
12447 gen_lowpart_SUBREG, rather than selecting between that
12448 and equivalent gen_rtx_SUBREG code.
12450 2018-02-08 Richard Biener <rguenther@suse.de>
12452 PR tree-optimization/84233
12453 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
12454 changed flag instead of boguously re-using phi_inserted.
12456 2018-02-08 Martin Jambor <mjambor@suse.cz>
12458 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
12459 static local variables.
12461 2018-02-08 Richard Biener <rguenther@suse.de>
12463 PR tree-optimization/84278
12464 * tree-vect-stmts.c (vectorizable_store): When looking for
12465 smaller vector types to perform grouped strided loads/stores
12466 make sure the mode is supported by the target.
12467 (vectorizable_load): Likewise.
12469 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
12471 * config/aarch64/aarch64.c (aarch64_components_for_bb):
12472 Increase LDP/STP opportunities by adding adjacent callee-saves.
12474 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
12476 PR rtl-optimization/84068
12477 PR rtl-optimization/83459
12478 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
12480 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
12482 PR tree-optimization/84224
12483 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
12484 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
12485 non-zero arguments.
12487 2018-02-07 Iain Sandoe <iain@codesourcery.com>
12490 * config/rs6000/altivec.md (*restore_world): Remove LR use.
12491 * config/rs6000/predicates.md (restore_world_operation): Adjust op
12492 count, remove one USE.
12494 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
12496 * doc/install.texi (Configuration): Document the
12497 --with-long-double-format={ibm,ieee} PowerPC configuration
12501 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
12502 Convert from define_expand to be define_insn_and_split. Rework
12503 float/double/_Float128 conversions to QI/HI/SImode to work with
12504 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
12505 conversions to QI/HImode types did a store and then a load to
12506 truncate the value. For conversions to VSX registers, don't split
12507 the insn, instead emit the code directly. Use the code iterator
12508 any_fix to combine signed and unsigned conversions.
12509 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
12510 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
12511 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
12512 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
12513 (fix_<mode>di2_hw): Likewise.
12514 (fixuns_<mode>di2_hw): Likewise.
12515 (fix_<mode>si2_hw): Likewise.
12516 (fixuns_<mode>si2_hw): Likewise.
12517 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
12518 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
12519 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
12520 fix<uns>_trunc<SFDF:mode>si2_p8.
12521 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
12522 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
12523 (fix<uns>_<mode>_mem): Likewise.
12524 (fctiw<u>z_<mode>_mem): Likewise.
12525 (fix<uns>_<mode>_mem): Likewise.
12526 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
12527 the register allocator from doing a direct move to the GPRs to do
12528 a store, and instead use the ISA 3.0 store byte/half-word from
12529 vector register instruction. For IEEE 128-bit floating point,
12530 also optimize stores of 32-bit ints.
12531 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
12533 2018-02-07 Alan Hayward <alan.hayward@arm.com>
12535 * genextract.c (push_pathstr_operand): New function to support
12537 (walk_rtx): Call push_pathstr_operand.
12538 (print_path): Support [a-zA-Z].
12540 2018-02-07 Richard Biener <rguenther@suse.de>
12542 PR tree-optimization/84037
12543 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
12544 (cse_and_gimplify_to_preheader): Declare.
12545 (vect_get_place_in_interleaving_chain): Likewise.
12546 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12548 (_loop_vec_info::~_loop_vec_info): Delete it.
12549 (cse_and_gimplify_to_preheader): New function.
12550 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
12551 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
12552 (vectorizable_load): Likewise. For grouped stores always base
12553 the IV on the first element.
12554 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
12555 condition before gimplifying.
12557 2018-02-07 Jakub Jelinek <jakub@redhat.com>
12559 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
12560 *DIV_EXPR and *MOD_EXPR.
12562 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
12565 * config/i386/i386.c (ix86_option_override_internal): Mask out
12566 the CF_SET bit when checking -fcf-protection.
12568 2018-02-07 Tom de Vries <tom@codesourcery.com>
12571 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
12574 2018-02-07 Richard Biener <rguenther@suse.de>
12576 PR tree-optimization/84204
12577 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
12580 PR tree-optimization/84205
12581 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
12582 special-case isl_ast_op_zdiv_r.
12584 PR tree-optimization/84223
12585 * graphite-scop-detection.c (gather_bbs::before_dom_children):
12586 Only add conditions from within the region.
12587 (gather_bbs::after_dom_children): Adjust.
12589 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
12592 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
12593 * config/avr/avr.md: Only post-reload split REG-REG moves if
12594 either register is GENERAL_REG_P.
12596 2018-02-07 Jakub Jelinek <jakub@redhat.com>
12598 PR tree-optimization/84235
12599 * tree-ssa-scopedtables.c
12600 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
12601 if the subtraction is performed in floating point type where NaNs are
12602 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
12603 build 1. Formatting fix.
12605 2018-02-06 Jakub Jelinek <jakub@redhat.com>
12608 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
12609 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
12610 and skip it regardless of bb boundaries. Use CALL_P macro,
12611 don't test INSN_P (insn) together with CALL_P or JUMP_P check
12612 unnecessarily, formatting fix.
12614 2018-02-06 Michael Collison <michael.collison@arm.com>
12616 * config/arm/thumb2.md:
12617 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
12618 (*thumb_mov_notscc): Ditto.
12620 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
12623 * config/rs6000/rs6000.md (su code attribute): Use "u" for
12624 unsigned_fix, not "s".
12626 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12628 * configure.ac (gcc_fn_eh_frame_ro): New function.
12629 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
12630 correct .eh_frame permissions.
12631 * configure: Regenerate.
12633 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
12635 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
12636 irrelevant options.
12638 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12640 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12641 Display warning message for -mno-speculate-indirect-jumps.
12643 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
12645 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
12647 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
12649 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
12651 PR tree-optimization/84225
12652 * tree-eh.c (find_trapping_overflow): Only call
12653 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
12655 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
12658 * config/i386/i386.c: Reimplement the check of possible options
12659 -mibt/-mshstk conbination. Change error messages.
12660 * doc/invoke.texi: Fix a typo: remove extra '='.
12662 2018-02-06 Marek Polacek <polacek@redhat.com>
12664 PR tree-optimization/84228
12665 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
12667 2018-02-06 Tamar Christina <tamar.christina@arm.com>
12670 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
12671 emitted arch directives.
12672 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
12673 __ARM_FEATURE_COPROC before changing architectures.
12675 2018-02-06 Richard Biener <rguenther@suse.de>
12677 * config/i386/i386.c (print_reg): Fix typo.
12678 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
12680 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
12682 * configure: Regenerate.
12684 2018-02-05 Martin Sebor <msebor@redhat.com>
12686 PR tree-optimization/83369
12687 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
12690 2018-02-05 Martin Liska <mliska@suse.cz>
12692 * doc/invoke.texi: Cherry-pick upstream r323995.
12694 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
12696 * ira.c (ira_init_register_move_cost): Adjust comment.
12698 2018-02-05 Martin Liska <mliska@suse.cz>
12700 PR gcov-profile/84137
12701 * doc/gcov.texi: Fix typo in documentation.
12703 2018-02-05 Martin Liska <mliska@suse.cz>
12705 PR gcov-profile/83879
12706 * doc/gcov.texi: Document necessity of --dynamic-list-data when
12707 using dlopen functionality.
12709 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
12711 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
12712 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
12713 _mm_maskz_range_ss, _mm_mask_range_round_ss,
12714 _mm_maskz_range_round_ss): New intrinsics.
12715 (__builtin_ia32_rangesd128_round)
12716 (__builtin_ia32_rangess128_round): Remove.
12717 (__builtin_ia32_rangesd128_mask_round,
12718 __builtin_ia32_rangess128_mask_round): New builtins.
12719 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
12720 __builtin_ia32_rangess128_round): Remove.
12721 (__builtin_ia32_rangesd128_mask_round,
12722 __builtin_ia32_rangess128_mask_round): New builtins.
12723 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
12724 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
12725 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
12726 "<round_saeonly_constraint>")): Changed to ...
12727 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
12728 "<round_saeonly_scalar_constraint>")): ... this.
12729 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
12730 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
12731 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
12732 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
12733 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
12735 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
12737 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
12739 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
12740 Remove all values except native, 8540 and 8548.
12742 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
12744 * config/i386/i386.c (ix86_output_function_return): Pass
12745 INVALID_REGNUM, instead of -1, as invalid register number to
12746 indirect_thunk_name and output_indirect_thunk.
12748 2018-02-02 Julia Koval <julia.koval@intel.com>
12750 * config.gcc: Add -march=icelake.
12751 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
12752 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
12753 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
12754 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
12755 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
12756 (processor_target_table): Add icelake.
12757 (ix86_option_override_internal): Handle new PTAs.
12758 (get_builtin_code_for_version): Handle icelake.
12759 (M_INTEL_COREI7_ICELAKE): New.
12760 (fold_builtin_cpu): Handle icelake.
12761 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
12762 * doc/invoke.texi: Add -march=icelake.
12764 2018-02-02 Julia Koval <julia.koval@intel.com>
12766 * config/i386/i386.c (ix86_option_override_internal): Change flags type
12767 to wide_int_bitmask.
12768 * wide-int-bitmask.h: New.
12770 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
12773 * config/i386/i386.md: Replace Pmode with word_mode in
12774 builtin_setjmp_setup and builtin_longjmp to support x32.
12776 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
12780 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
12782 (rs6000_supported_cpu_names): New static variable.
12783 (linux_cpu_translation_table): Likewise.
12784 (elf_platform) <cpu>: Define new static variable and use it.
12785 Translate kernel AT_PLATFORM name to canonical name if needed.
12786 Error if platform name is unknown.
12788 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
12791 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
12793 2018-02-01 Jeff Law <law@redhat.com>
12796 * config/i386/i386.c (release_scratch_register_on_entry): Add new
12797 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
12798 the scratch if RELEASE_VIA_POP is false.
12799 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
12800 If we have to save a temporary register, decrement SIZE appropriately.
12801 Pass new arguments to release_scratch_register_on_entry.
12802 (ix86_adjust_stack_and_probe): Likewise.
12803 (ix86_emit_probe_stack_range): Pass new arguments to
12804 release_scratch_register_on_entry.
12806 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
12808 PR rtl-optimization/84157
12809 * combine.c (change_zero_ext): Use REG_P predicate in
12810 front of HARD_REGISTER_P predicate.
12812 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
12814 * config/avr/avr.c (avr_option_override): Move disabling of
12815 -fdelete-null-pointer-checks to...
12816 * common/config/avr/avr-common.c (avr_option_optimization_table):
12819 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
12821 PR tree-optimization/81635
12822 * tree-data-ref.c (split_constant_offset_1): For types that
12823 wrap on overflow, try to use range info to prove that wrapping
12826 2018-02-01 Renlin Li <renlin.li@arm.com>
12829 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
12830 TAILCALL_ADDR_REGS.
12831 (aarch64_register_move_cost): Likewise.
12832 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
12833 TAILCALL_ADDR_REGS.
12834 (REG_CLASS_NAMES): Likewise.
12835 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
12836 TAILCALL_ADDR_REGS. Remove IP registers.
12837 * config/aarch64/aarch64.md (Ucs): Update register constraint.
12839 2018-02-01 Richard Biener <rguenther@suse.de>
12841 * domwalk.h (dom_walker::dom_walker): Add additional constructor
12842 for specifying RPO order and allow NULL for that.
12843 * domwalk.c (dom_walker::dom_walker): Likewise.
12844 (dom_walker::walk): Handle NULL RPO order.
12845 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
12847 (rewrite_update_dom_walker): Likewise.
12848 (mark_def_dom_walker): Likewise.
12850 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
12852 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
12853 (aarch64_maybe_expand_sve_subreg_move): Declare.
12854 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
12855 * config/aarch64/predicates.md (aarch64_any_register_operand): New
12857 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
12858 that are semantically a reverse operation.
12859 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
12860 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
12861 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
12863 (aarch64_can_change_mode_class): For big-endian, forbid changes
12864 between two SVE modes if they have different element sizes.
12866 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
12868 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
12869 the TImode handling for big-endian targets.
12871 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
12873 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
12874 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
12876 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
12877 Remove BSWAP handing for big-endian targets and use the form of
12878 LD1RQ appropariate for the mode.
12880 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
12882 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
12883 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
12884 duplicated element.
12886 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
12889 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
12890 check for operands that need to go through aarch64_sve_reload_be.
12892 2018-02-01 Jakub Jelinek <jakub@redhat.com>
12894 PR tree-optimization/81661
12895 PR tree-optimization/84117
12896 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
12897 * tree-eh.c: Include gimplify.h.
12898 (find_trapping_overflow, replace_trapping_overflow,
12899 rewrite_to_non_trapping_overflow): New functions.
12900 * tree-vect-loop.c: Include tree-eh.h.
12901 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
12902 * tree-data-ref.c: Include tree-eh.h.
12903 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
12905 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
12907 PR rtl-optimization/84123
12908 * combine.c (change_zero_ext): Check if hard register satisfies
12909 can_change_dest_mode before calling gen_lowpart_SUBREG.
12911 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
12914 * ira.c (ira_init_register_move_cost): Remove assert.
12916 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
12918 PR rtl-optimization/84071
12919 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
12920 * doc/tm.texi: Regenerate.
12922 2018-01-31 Richard Biener <rguenther@suse.de>
12924 PR tree-optimization/84132
12925 * tree-data-ref.c (analyze_miv_subscript): Properly
12926 check whether evolution_function_is_affine_multivariate_p
12927 before calling gcd_of_steps_may_divide_p.
12929 2018-01-31 Julia Koval <julia.koval@intel.com>
12932 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
12933 * config/i386/i386.md (rdpid_rex64) New.
12934 (rdpid): Make 32bit only.
12936 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
12939 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
12940 an IDENTIFIER_NODE for FUNCTION_TYPE's.
12942 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
12945 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
12947 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
12949 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
12951 PR rtl-optimization/84071
12952 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
12953 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
12955 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
12957 * config/arc/arc.c (arc_handle_aux_attribute): New function.
12958 (arc_attribute_table): Add 'aux' attribute.
12959 (arc_in_small_data_p): Consider aux like variables.
12960 (arc_is_aux_reg_p): New function.
12961 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
12962 (arc_get_aux_arg): New function.
12963 (prepare_move_operands): Handle aux-register access.
12964 (arc_handle_aux_attribute): New function.
12965 * doc/extend.texi (ARC Variable attributes): Add subsection.
12967 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
12969 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
12970 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
12971 (arc_attribute_table): Add 'uncached' attribute.
12972 (arc_print_operand): Print '.di' flag for uncached memory
12974 (arc_in_small_data_p): Do not consider for small data the uncached
12976 (arc_is_uncached_mem_p): New function.
12977 * config/arc/predicates.md (compact_store_memory_operand): Check
12978 for uncached memory accesses.
12979 (nonvol_nonimm_operand): Likewise.
12980 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
12982 2018-01-31 Jakub Jelinek <jakub@redhat.com>
12985 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
12986 falign-loops=): Add Optimization flag.
12988 2018-01-30 Jeff Law <law@redhat.com>
12991 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
12992 INT_REGISTERS_SAVED. Check it prior to calling
12993 get_scratch_register_on_entry.
12994 (ix86_adjust_stack_and_probe): Similarly.
12995 (ix86_emit_probe_stack_range): Similarly.
12996 (ix86_expand_prologue): Corresponding changes.
12998 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13001 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
13002 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
13004 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
13007 * lra-constraints.c (curr_insn_transform): Process AND in the
13010 2018-01-30 Jakub Jelinek <jakub@redhat.com>
13012 PR rtl-optimization/83986
13013 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
13014 dependence against last_pending_memory_flush in addition to
13015 pending_jump_insns.
13017 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
13019 PR tree-optimization/81611
13020 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
13023 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13026 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
13029 2018-01-30 Richard Biener <rguenther@suse.de>
13030 Jakub Jelinek <jakub@redhat.com>
13032 PR tree-optimization/84111
13033 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
13034 inner loops added during recursion, as they don't have up-to-date
13037 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
13040 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
13041 (can_inline_edge_by_limits_p): ... here.
13042 (can_early_inline_edge_p, check_callers,
13043 update_caller_keys, update_callee_keys, recursive_inlining,
13044 add_new_edges_to_heap, speculation_useful_p,
13045 inline_small_functions,
13046 inline_small_functions, flatten_function,
13047 inline_to_all_callers_1): Update.
13049 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
13051 * profile-count.c (profile_count::combine_with_ipa_count): Handle
13054 2018-01-30 Richard Biener <rguenther@suse.de>
13056 PR tree-optimization/83008
13057 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
13058 invariant and constant vector uses in stmts when they need
13059 more than one stmt.
13061 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13064 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
13065 * configure: Regenerate.
13067 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
13069 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
13071 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
13072 Use gen_rtx_REG rather than gen_lowpart.
13074 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
13076 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
13077 rather than 0 when creating partial subregs.
13079 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
13081 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
13084 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
13087 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
13088 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
13089 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
13090 flags. This restores the settings used before the 2017-07-24.
13091 Turning off pre increment/decrement/modify allows IVOPTS to
13092 optimize DF/SF loops where the index is an int.
13094 2018-01-29 Richard Biener <rguenther@suse.de>
13095 Kelvin Nilsen <kelvin@gcc.gnu.org>
13098 * tree-vect-stmts.c (vectorizable_call): Don't call
13099 targetm.vectorize_builtin_md_vectorized_function if callee is
13102 2018-01-22 Carl Love <cel@us.ibm.com>
13104 * doc/extend.tex: Fix typo in second arg in
13105 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
13107 2018-01-29 Richard Biener <rguenther@suse.de>
13109 PR tree-optimization/84086
13110 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
13111 (flush_ssaname_freelist): When SSA names were released reset
13112 the SCEV hash table.
13114 2018-01-29 Richard Biener <rguenther@suse.de>
13116 PR tree-optimization/84057
13117 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
13118 removed paths when removing edges.
13120 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
13122 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
13123 -mfunction-return=@var{choice}.
13125 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
13127 PR diagnostic/84034
13128 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
13129 Handle CR like TAB.
13130 (layout::print_source_line): Likewise.
13131 (test_get_line_width_without_trailing_whitespace): Add test cases.
13133 2018-01-27 Jakub Jelinek <jakub@redhat.com>
13135 PR middle-end/84040
13136 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
13139 2018-01-26 Jim Wilson <jimw@sifive.com>
13141 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
13143 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
13146 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13148 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
13149 and CMP + SUB-immediate -> SUBS.
13151 2018-01-26 Martin Sebor <msebor@redhat.com>
13153 PR tree-optimization/83896
13154 * tree-ssa-strlen.c (get_string_len): Rename...
13155 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
13156 Avoid assuming length is constant.
13157 (handle_char_store): Use HOST_WIDE_INT for string length.
13159 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
13162 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
13163 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
13165 2018-01-26 Richard Biener <rguenther@suse.de>
13167 PR rtl-optimization/84003
13168 * dse.c (record_store): Only record redundant stores when
13169 the earlier store aliases at least all accesses the later one does.
13171 2018-01-26 Jakub Jelinek <jakub@redhat.com>
13173 PR rtl-optimization/83985
13174 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
13175 REG_CFA_RESTORE insns.
13176 (delete_unmarked_insns): Don't ignore separate shrink wrapping
13177 REG_CFA_RESTORE insns here.
13180 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
13181 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
13183 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
13185 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
13186 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
13187 (arc_init): Likewise.
13188 (arc_override_options): Likewise.
13189 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
13191 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
13193 * config/arc/arc.h (TARGET_DBNZ): Define.
13194 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
13195 properly set the tune attribute.
13196 (dbnz): Use TARGET_DBNZ guard.
13197 * config/arc/arc.opt (mtune): Add core3 option.
13199 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
13201 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
13202 recognize new pic like addresses.
13203 (arc_delegitimize_address): Clean up.
13205 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
13207 * config/arc/arc-arches.def: Option mrf16 valid for all
13209 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
13210 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
13211 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
13212 * config/arc/arc-tables.opt: Regenerate.
13213 * config/arc/arc.c (arc_conditional_register_usage): Handle
13214 reduced register file case.
13215 (arc_file_start): Set must have build attributes.
13216 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
13217 mrf16 option value.
13218 * config/arc/arc.opt (mrf16): Add new option.
13219 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
13220 * config/arc/genmultilib.awk: Handle new mrf16 option.
13221 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
13222 * config/arc/t-multilib: Regenerate.
13223 * doc/invoke.texi (ARC Options): Document mrf16 option.
13225 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
13227 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
13228 * config/arc/arc.c (arc_handle_secure_attribute): New function.
13229 (arc_attribute_table): Add 'secure_call' attribute.
13230 (arc_print_operand): Print secure call operand.
13231 (arc_function_ok_for_sibcall): Don't optimize tail calls when
13233 (arc_is_secure_call_p): New function. * config/arc/arc.md
13234 (call_i): Add support for sjli instruction.
13235 (call_value_i): Likewise.
13236 * config/arc/constraints.md (Csc): New constraint.
13238 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
13239 John Eric Martin <John.Martin@emmicro-us.com>
13241 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
13242 * config/arc/arc.c (_arc_jli_section): New struct.
13243 (arc_jli_section): New type.
13244 (rc_jli_sections): New static variable.
13245 (arc_handle_jli_attribute): New function.
13246 (arc_attribute_table): Add jli_always and jli_fixed attribute.
13247 (arc_file_end): New function.
13248 (TARGET_ASM_FILE_END): Define.
13249 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
13250 (arc_add_jli_section): New function.
13251 (jli_call_scan): Likewise.
13252 (arc_reorg): Call jli_call_scan.
13253 (arc_output_addsi): Remove 'S' from printing asm operand.
13254 (arc_is_jli_call_p): New function.
13255 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
13257 (movhi_insn): Likewise.
13258 (movsi_insn): Likewise.
13259 (movsi_set_cc_insn): Likewise.
13260 (loadqi_update): Likewise.
13261 (load_zeroextendqisi_update): Likewise.
13262 (load_signextendqisi_update): Likewise.
13263 (loadhi_update): Likewise.
13264 (load_zeroextendhisi_update): Likewise.
13265 (load_signextendhisi_update): Likewise.
13266 (loadsi_update): Likewise.
13267 (loadsf_update): Likewise.
13268 (movsicc_insn): Likewise.
13269 (bset_insn): Likewise.
13270 (bxor_insn): Likewise.
13271 (bclr_insn): Likewise.
13272 (bmsk_insn): Likewise.
13273 (bicsi3_insn): Likewise.
13274 (cmpsi_cc_c_insn): Likewise.
13275 (movsi_ne): Likewise.
13276 (movsi_cond_exec): Likewise.
13277 (clrsbsi2): Likewise.
13278 (norm_f): Likewise.
13288 (call_i): Remove 'S' asm letter, add jli instruction.
13289 (call_value_i): Likewise.
13290 * config/arc/arc.op (mjli-always): New option.
13291 * config/arc/constraints.md (Cji): New constraint.
13292 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
13294 (subsf3_fpx): Likewise.
13295 (mulsf3_fpx): Likewise.
13296 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
13298 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
13299 function attrbutes.
13300 * doc/invoke.texi (ARC): Document mjli-always option.
13302 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
13304 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
13305 avoid addition with 0 and use incw and decw where possible.
13307 2018-01-26 Richard Biener <rguenther@suse.de>
13309 PR tree-optimization/81082
13310 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
13311 association if it requires casting to unsigned.
13312 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
13313 from fold_plusminus_mult_expr to catch important cases late when
13314 range info is available.
13316 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13318 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
13319 * configure.ac (hidden_linkonce): New test.
13320 * configure: Regenerate.
13321 * config.in: Regenerate.
13323 2018-01-26 Julia Koval <julia.koval@intel.com>
13325 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
13326 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
13327 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
13328 _mm_mask_bitshuffle_epi64_mask): Fix type.
13329 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
13330 USI_FTYPE_V4DI_V4DI_USI): Remove.
13331 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
13332 __builtin_ia32_vpshufbitqmb256_mask,
13333 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
13334 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
13335 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
13337 2018-01-26 Alan Modra <amodra@gmail.com>
13340 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
13341 UNSPEC_VBPERMQ. Sort other unspecs.
13343 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
13345 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
13347 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
13349 PR middle-end/83055
13350 * predict.c (drop_profile): Do not push/pop cfun; update also
13352 (handle_missing_profiles): Fix logic looking for zero profiles.
13354 2018-01-25 Jakub Jelinek <jakub@redhat.com>
13356 PR middle-end/83977
13357 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
13358 on functions with #pragma omp declare simd or functions with simd
13360 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
13361 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
13362 Remove trailing \n from warning_at calls.
13364 2018-01-25 Tom de Vries <tom@codesourcery.com>
13367 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
13368 for neutered workers.
13370 2018-01-24 Joseph Myers <joseph@codesourcery.com>
13373 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
13374 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
13376 2018-01-24 Jeff Law <law@redhat.com>
13379 * i386.c (get_probe_interval): Move to earlier point.
13380 (ix86_compute_frame_layout): If -fstack-clash-protection and
13381 the frame is larger than the probe interval, then use pushes
13382 to save registers rather than reg->mem moves.
13383 (ix86_expand_prologue): Remove conditional for int_registers_saved
13386 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
13389 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
13390 min/max for never referenced object.
13392 2018-01-24 Jakub Jelinek <jakub@redhat.com>
13394 PR middle-end/83977
13395 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
13397 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
13398 attributes from DECL_ATTRIBUTES (decl) without affecting
13399 DECL_ATTRIBUTES (current_function_decl).
13400 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
13401 functions with non-NULL DECL_ABSTRACT_ORIGIN.
13403 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
13405 PR tree-optimization/83979
13406 * fold-const.c (fold_comparison): Use constant_boolean_node
13407 instead of boolean_{true,false}_node.
13409 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
13411 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
13414 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13416 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13417 Simplify the clause that sets the length attribute.
13418 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13419 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
13420 clause that sets the length attribute.
13421 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13423 2018-01-24 Tom de Vries <tom@codesourcery.com>
13426 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
13427 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
13428 Add strict parameter.
13429 (prevent_branch_around_nothing): Insert dummy insn between branch to
13430 label and label with no ptx insn inbetween.
13431 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
13433 2018-01-24 Tom de Vries <tom@codesourcery.com>
13436 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
13437 for neutered threads in warp.
13438 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
13440 2018-01-24 Richard Biener <rguenther@suse.de>
13442 PR tree-optimization/83176
13443 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
13446 2018-01-24 Richard Biener <rguenther@suse.de>
13448 PR tree-optimization/82819
13449 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
13450 code generating pluses that are no-ops in the target precision.
13452 2018-01-24 Richard Biener <rguenther@suse.de>
13454 PR middle-end/84000
13455 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
13457 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
13459 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
13460 to merge probabilities.
13461 * predict.c (probably_never_executed): Also mark as cold functions
13462 with global 0 profile and guessed local profile.
13463 * profile-count.c (profile_probability::combine_with_count): New
13465 * profile-count.h (profile_probability::operator*,
13466 profile_probability::operator*=, profile_probability::operator/,
13467 profile_probability::operator/=): Reduce precision to adjusted
13468 and set value to guessed on contradictory divisions.
13469 (profile_probability::combine_with_freq): Remove.
13470 (profile_probability::combine_wiht_count): Declare.
13471 (profile_count::force_nonzero):: Set to adjusted.
13472 (profile_count::probability_in):: Set quality to adjusted.
13473 * tree-ssa-tail-merge.c (replace_block_by): Use
13474 combine_with_count.
13476 2018-01-23 Andrew Waterman <andrew@sifive.com>
13477 Jim Wilson <jimw@sifive.com>
13479 * config/riscv/riscv.c (riscv_stack_boundary): New.
13480 (riscv_option_override): Set riscv_stack_boundary. Handle
13481 riscv_preferred_stack_boundary_arg.
13482 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
13483 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
13484 (STACK_BOUNDARY): Set to riscv_stack_boundary.
13485 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
13486 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
13487 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
13489 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
13492 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
13493 of struct ix86_frame.
13494 (ix86_expand_epilogue): Likewise. Add a local variable for
13495 the reg_save_offset field in struct ix86_frame.
13497 2018-01-23 Bin Cheng <bin.cheng@arm.com>
13499 PR tree-optimization/82604
13500 * tree-loop-distribution.c (enum partition_kind): New enum item
13501 PKIND_PARTIAL_MEMSET.
13502 (partition_builtin_p): Support above new enum item.
13503 (generate_code_for_partition): Ditto.
13504 (compute_access_range): Differentiate cases that equality can be
13505 proven at all loops, the innermost loops or no loops.
13506 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
13507 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
13508 (finalize_partitions, distribute_loop): Don't fuse partition of
13509 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
13510 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
13511 parloop is enabled.
13513 2018-01-23 Martin Liska <mliska@suse.cz>
13515 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
13516 order to ignore the predictor.
13517 (PRED_POLYMORPHIC_CALL): Likewise.
13518 (PRED_RECURSIVE_CALL): Likewise.
13520 2018-01-23 Martin Liska <mliska@suse.cz>
13522 * tree-profile.c (tree_profiling): Print function header to
13523 aware reader which function we are working on.
13524 * value-prof.c (gimple_find_values_to_profile): Do not print
13525 not interesting value histograms.
13527 2018-01-23 Martin Liska <mliska@suse.cz>
13529 * profile-count.h (enum profile_quality): Add
13530 profile_uninitialized as the first value. Do not number values
13531 as they are zero based.
13532 (profile_count::verify): Update sanity check.
13533 (profile_probability::verify): Likewise.
13535 2018-01-23 Nathan Sidwell <nathan@acm.org>
13537 * doc/invoke.texi (ffor-scope): Deprecate.
13539 2018-01-23 David Malcolm <dmalcolm@redhat.com>
13541 PR tree-optimization/83510
13542 * domwalk.c (set_all_edges_as_executable): New function.
13543 (dom_walker::dom_walker): Convert bool param
13544 "skip_unreachable_blocks" to enum reachability. Move setup of
13545 edge flags to set_all_edges_as_executable and only do it when
13546 reachability is REACHABLE_BLOCKS.
13547 * domwalk.h (enum dom_walker::reachability): New enum.
13548 (dom_walker::dom_walker): Convert bool param
13549 "skip_unreachable_blocks" to enum reachability.
13550 (set_all_edges_as_executable): New decl.
13551 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
13552 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
13554 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
13555 but converting true to REACHABLE_BLOCKS.
13556 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
13558 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
13559 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
13560 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
13562 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
13563 if check_all_array_refs will be called.
13565 2018-01-23 David Malcolm <dmalcolm@redhat.com>
13567 * tree.c (selftest::test_location_wrappers): Add more test
13570 2018-01-23 David Malcolm <dmalcolm@redhat.com>
13572 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
13573 (selftest::test_bit_in_range): Likewise.
13575 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
13578 * doc/sourcebuild.texi (vect_float): Say that the selector
13579 only describes the situation when -funsafe-math-optimizations is on.
13580 (vect_float_strict): Document.
13582 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
13584 PR tree-optimization/83965
13585 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13586 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
13587 instead of checking only for a reduction.
13588 (vect_recog_widen_sum_pattern): Likewise.
13590 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
13592 * predict.c (probably_never_executed): Only use precise profile info.
13593 (compute_function_frequency): Skip after inlining hack since we now
13594 have quality checking.
13596 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
13598 * profile-count.h (profile_probability::very_unlikely,
13599 profile_probability::unlikely, profile_probability::even): Set
13600 precision to guessed.
13602 2018-01-23 Richard Biener <rguenther@suse.de>
13604 PR tree-optimization/83963
13605 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
13606 Properly terminate dominator walk when crossing the exit edge not
13607 when visiting its source block.
13609 2018-01-23 Jakub Jelinek <jakub@redhat.com>
13612 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
13613 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
13615 2018-01-22 Jakub Jelinek <jakub@redhat.com>
13617 PR tree-optimization/83957
13618 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
13619 semicolon after for body surrounded by braces.
13621 PR tree-optimization/83081
13622 * profile-count.h (profile_probability::split): New method.
13623 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
13624 Use profile_probability::split.
13625 (do_compare_rtx_and_jump): Fix adjustment of probabilities
13626 when splitting a single conditional jump into 2.
13628 2018-01-22 David Malcolm <dmalcolm@redhat.com>
13630 PR tree-optimization/69452
13631 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
13634 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13636 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
13637 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
13638 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
13640 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13642 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
13644 * config/rl78/rl78.md (movdi): New define_expand.
13645 * config/rl78/rl78.c (rl78_split_movdi): New function.
13647 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
13650 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
13652 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
13653 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
13654 128-bit to produce an UNSPEC move to get the double word with the
13655 signbit and then a shift directly to do signbit.
13656 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
13657 implementation with a new version that just does either a direct
13658 move or a regular move. Move memory interface to separate insns.
13659 Move insns so they are next to the expander.
13660 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
13661 with signbit move. Split big and little endian case.
13662 (signbit<mode>2_dm_mem_le): Likewise.
13663 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
13664 (signbit<mode>2_dm2): Likewise.
13666 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13668 * config/rl78/rl78.md (anddi3): New define_expand.
13670 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13672 * config/rl78/rl78.md (umindi3): New define_expand.
13674 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13676 * config/rl78/rl78.md (smindi3): New define_expand.
13678 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13680 * config/rl78/rl78.md (smaxdi3): New define_expand.
13682 2018-01-22 Carl Love <cel@us.ibm.com>
13684 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
13685 LVX_V1TI): Add macro expansion.
13686 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
13687 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
13688 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
13689 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
13690 Change check to determine if the instruction is a byte reversing
13691 entry. Fix typo in comment.
13692 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
13693 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
13694 Add def_builtin calls for new builtins.
13695 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
13696 Add define_insn expansion.
13698 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13700 * config/rl78/rl78.md (umaxdi3): New define_expand.
13702 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
13704 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
13705 for non-QImode registers.
13707 2018-01-22 Richard Biener <rguenther@suse.de>
13709 PR tree-optimization/83963
13710 * graphite-scop-detection.c (scop_detection::get_sese): Delay
13711 including the loop exit block.
13712 (scop_detection::merge_sese): Likewise.
13713 (scop_detection::add_scop): Do it here instead.
13715 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13717 * doc/sourcebuild.texi (arm_softfloat): Document.
13719 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
13722 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
13723 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
13724 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
13726 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13727 David Edelsohn <dje.gcc@gmail.com>
13730 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13731 Change "crset eq" to "crset 2".
13732 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13733 (*call_indirect_aix<mode>_nospec): Likewise.
13734 (*call_value_indirect_aix<mode>_nospec): Likewise.
13735 (*call_indirect_elfv2<mode>_nospec): Likewise.
13736 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
13737 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
13738 change assembly output from . to $.
13739 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13740 (indirect_jump<mode>_nospec): Change assembly output from . to $.
13741 (*tablejump<mode>_internal1_nospec): Likewise.
13743 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
13746 * config/sh/sh_optimize_sett_clrt.cc:
13747 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
13749 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
13751 PR tree-optimization/83940
13752 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
13753 offset_dt to vect_constant_def rather than vect_unknown_def_type.
13754 (vect_check_load_store_mask): Add a mask_dt_out parameter and
13755 use it to pass back the definition type.
13756 (vect_check_store_rhs): Likewise rhs_dt_out.
13757 (vect_build_gather_load_calls): Add a mask_dt argument and use
13758 it instead of a call to vect_is_simple_use.
13759 (vectorizable_store): Update calls to vect_check_load_store_mask
13760 and vect_check_store_rhs. Use the dt returned by the latter instead
13761 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
13762 instead of calls to vect_is_simple_use. Pass the scalar rather
13763 than the vector operand to vect_is_simple_use when handling
13764 second and subsequent copies of an rhs value.
13765 (vectorizable_load): Update calls to vect_check_load_store_mask
13766 and vect_build_gather_load_calls. Use the cached mask_dt and
13767 gs_info.offset_dt instead of calls to vect_is_simple_use.
13769 2018-01-20 Jakub Jelinek <jakub@redhat.com>
13771 PR middle-end/83945
13772 * tree-emutls.c: Include gimplify.h.
13773 (lower_emutls_2): New function.
13774 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
13775 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
13776 it before further processing.
13779 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
13780 UINTVAL (trueop1) instead of INTVAL (op1).
13782 2018-01-19 Jakub Jelinek <jakub@redhat.com>
13786 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
13787 INCOMING_FRAME_SP_OFFSET if not defined.
13788 (scan_trace): Add ENTRY argument. If true and
13789 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
13790 emit a note to adjust the CFA offset.
13791 (create_cfi_notes): Adjust scan_trace callers.
13792 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
13793 INCOMING_FRAME_SP_OFFSET in the CIE.
13794 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
13795 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
13797 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
13798 * doc/tm.texi: Regenerated.
13800 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13802 PR rtl-optimization/83147
13803 * lra-constraints.c (remove_inheritance_pseudos): Use
13804 lra_substitute_pseudo_within_insn.
13806 2018-01-19 Tom de Vries <tom@codesourcery.com>
13807 Cesar Philippidis <cesar@codesourcery.com>
13810 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
13812 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
13815 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
13816 spaces for function labels.
13818 2018-01-19 Martin Liska <mliska@suse.cz>
13820 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
13821 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
13822 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
13823 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
13824 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
13825 (PRED_CONST_RETURN): Change from 69 to 65.
13826 (PRED_NULL_RETURN): Change from 91 to 71.
13827 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
13828 (PRED_LOOP_GUARD): Change from 66 to 73.
13830 2018-01-19 Martin Liska <mliska@suse.cz>
13832 * predict.c (predict_insn_def): Add new assert.
13833 (struct branch_predictor): Change type to signed integer.
13834 (test_prediction_value_range): Amend test to cover
13835 PROB_UNINITIALIZED.
13836 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
13837 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
13838 (PRED_LOOP_ITERATIONS_MAX): Likewise.
13839 (PRED_LOOP_IV_COMPARE): Likewise.
13840 * predict.h (PROB_UNINITIALIZED): Define new constant.
13842 2018-01-19 Martin Liska <mliska@suse.cz>
13844 * predict.c (dump_prediction): Add new format for
13845 analyze_brprob.py script which is enabled with -details
13847 * profile-count.h (precise_p): New function.
13849 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
13851 PR tree-optimization/83922
13852 * tree-vect-loop.c (vect_verify_full_masking): Return false if
13853 there are no statements that need masking.
13854 (vect_active_double_reduction_p): New function.
13855 (vect_analyze_loop_operations): Use it when handling phis that
13856 are not in the loop header.
13858 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
13860 PR tree-optimization/83914
13861 * tree-vect-loop.c (vectorizable_induction): Don't convert
13862 init_expr or apply the peeling adjustment for inductions
13863 that are nested within the vectorized loop.
13865 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13867 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
13870 2018-01-18 Jakub Jelinek <jakub@redhat.com>
13874 * function.h (gimplify_parameters): Add gimple_seq * argument.
13875 * function.c: Include gimple.h and options.h.
13876 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
13877 for the added local temporaries if needed.
13878 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
13879 if there are any parameter cleanups, wrap whole body into a
13880 try/finally with the cleanups.
13882 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
13885 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
13886 Use GET_MODE_CLASS for scalar floating point.
13888 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
13892 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
13893 Fix call of call_cgraph_insertion_hooks.
13895 2018-01-18 Martin Sebor <msebor@redhat.com>
13897 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
13899 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
13902 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
13905 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
13908 * common.opt: (-ffile-prefix-map): New option.
13909 * opts.c (common_handle_option): Defer it.
13910 * opts-global.c (handle_common_deferred_options): Handle it.
13911 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
13912 * file-prefix-map.h: New file.
13913 (remap_debug_filename, add_debug_prefix_map): ...here.
13914 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
13915 * final.c (debug_prefix_map, add_debug_prefix_map
13916 remap_debug_filename): Move to...
13917 * file-prefix-map.c: New file.
13918 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
13919 generalize, get rid of alloca(), use strrchr() instead of strchr().
13920 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
13921 Implement in terms of add_prefix_map().
13922 (remap_macro_filename, remap_debug_filename): Implement in term of
13924 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
13925 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
13926 * dbxout.c: Include file-prefix-map.h.
13927 * varasm.c: Likewise.
13928 * vmsdbgout.c: Likewise.
13929 * xcoffout.c: Likewise.
13930 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
13931 * doc/cppopts.texi (-fmacro-prefix-map): Document.
13932 * doc/invoke.texi (-ffile-prefix-map): Document.
13933 (-fdebug-prefix-map): Update description.
13935 2018-01-18 Martin Liska <mliska@suse.cz>
13937 * config/i386/i386.c (indirect_thunk_name): Document that also
13939 (output_indirect_thunk): Document why both instructions
13940 (pause and lfence) are generated.
13942 2018-01-18 Richard Biener <rguenther@suse.de>
13944 PR tree-optimization/83887
13945 * graphite-scop-detection.c
13946 (scop_detection::get_nearest_dom_with_single_entry): Remove.
13947 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
13948 (scop_detection::merge_sese): Re-implement with a flood-fill
13949 algorithm that properly finds a SESE region if it exists.
13951 2018-01-18 Jakub Jelinek <jakub@redhat.com>
13954 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
13955 pointer_diff optimizations use view_convert instead of convert.
13957 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13959 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13960 Generate different code for -mno-speculate-indirect-jumps.
13961 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13962 (*call_indirect_aix<mode>): Disable for
13963 -mno-speculate-indirect-jumps.
13964 (*call_indirect_aix<mode>_nospec): New define_insn.
13965 (*call_value_indirect_aix<mode>): Disable for
13966 -mno-speculate-indirect-jumps.
13967 (*call_value_indirect_aix<mode>_nospec): New define_insn.
13968 (*sibcall_nonlocal_sysv<mode>): Generate different code for
13969 -mno-speculate-indirect-jumps.
13970 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13972 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
13974 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
13975 long double type, set the flags for noting the default long double
13976 type, even if we don't pass or return a long double type.
13978 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
13981 * ipa-inline.c (flatten_function): Do not overwrite final inlining
13984 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
13986 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
13987 support for merge[hl].
13988 (fold_mergehl_helper): New helper function.
13989 (tree-vector-builder.h): New #include for tree_vector_builder usage.
13990 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
13991 (altivec_vmrglw_direct): Add xxmrglw insn.
13993 2018-01-17 Andrew Waterman <andrew@sifive.com>
13995 * config/riscv/riscv.c (riscv_conditional_register_usage): If
13996 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
13998 2018-01-17 David Malcolm <dmalcolm@redhat.com>
14001 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
14002 call the lto_location_cache before reading the
14003 DECL_SOURCE_LOCATION of the types.
14005 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
14006 Richard Sandiford <richard.sandiford@linaro.org>
14008 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
14009 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
14010 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
14011 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
14012 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
14014 * config/aarch64/constraints.md (aarch64_movti_operand):
14016 * config/aarch64/predicates.md (Uti): Add new constraint.
14018 2018-01-17 Carl Love <cel@us.ibm.com>
14020 * config/rs6000/vsx.md (define_expand xl_len_r,
14021 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
14022 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
14024 (define_expand, define_insn): Move the shift left from the
14025 define_insn to the define_expand for lxvl and stxvl instructions.
14026 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
14027 and XL_LEN_R definitions to PURE.
14029 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
14031 * config/i386/i386.c (indirect_thunk_name): Declare regno
14032 as unsigned int. Compare regno with INVALID_REGNUM.
14033 (output_indirect_thunk): Ditto.
14034 (output_indirect_thunk_function): Ditto.
14035 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
14036 in the call to output_indirect_thunk_function.
14038 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
14040 PR middle-end/83884
14041 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
14042 rather than the size of inner_type to determine the stack slot size
14043 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
14045 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
14048 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
14051 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
14053 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
14054 endian Linux systems to optionally enable multilibs for selecting
14055 the long double type if the user configured an explicit type.
14056 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
14057 have no long double multilibs if not defined.
14058 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
14059 warn if the user used -mabi={ieee,ibm}longdouble and we built
14060 multilibs for long double.
14061 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
14062 appropriate multilib option.
14063 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
14065 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
14066 for building long double multilibs.
14067 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
14069 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
14071 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
14074 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
14076 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
14079 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
14082 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
14085 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
14087 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
14088 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
14090 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
14092 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
14093 different rtl trees depending on TARGET_64BIT.
14094 (rs6000_gen_lvx): Likewise.
14096 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
14098 * config/visium/visium.md (nop): Tweak comment.
14099 (hazard_nop): Likewise.
14101 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14103 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
14104 -mspeculate-indirect-jumps.
14105 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
14106 for -mno-speculate-indirect-jumps.
14107 (*call_indirect_elfv2<mode>_nospec): New define_insn.
14108 (*call_value_indirect_elfv2<mode>): Disable for
14109 -mno-speculate-indirect-jumps.
14110 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
14111 (indirect_jump): Emit different RTL for
14112 -mno-speculate-indirect-jumps.
14113 (*indirect_jump<mode>): Disable for
14114 -mno-speculate-indirect-jumps.
14115 (*indirect_jump<mode>_nospec): New define_insn.
14116 (tablejump): Emit different RTL for
14117 -mno-speculate-indirect-jumps.
14118 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
14119 (tablejumpsi_nospec): New define_expand.
14120 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
14121 (tablejumpdi_nospec): New define_expand.
14122 (*tablejump<mode>_internal1): Disable for
14123 -mno-speculate-indirect-jumps.
14124 (*tablejump<mode>_internal1_nospec): New define_insn.
14125 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
14128 2018-01-16 Artyom Skrobov tyomitch@gmail.com
14130 * caller-save.c (insert_save): Drop unnecessary parameter. All
14133 2018-01-16 Jakub Jelinek <jakub@redhat.com>
14134 Richard Biener <rguenth@suse.de>
14137 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
14138 return early, inline manually is_gimple_sizepos. Make sure if we
14139 call gimplify_expr we don't end up with a gimple constant.
14140 * tree.c (variably_modified_type_p): Don't return true for
14141 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
14142 * gimplify.h (is_gimple_sizepos): Remove.
14144 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
14146 PR tree-optimization/83857
14147 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
14148 vectorizable_live_operation for pure SLP statements.
14149 (vectorizable_live_operation): Handle PHIs.
14151 2018-01-16 Richard Biener <rguenther@suse.de>
14153 PR tree-optimization/83867
14154 * tree-vect-stmts.c (vect_transform_stmt): Precompute
14155 nested_in_vect_loop_p since the scalar stmt may get invalidated.
14157 2018-01-16 Jakub Jelinek <jakub@redhat.com>
14160 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
14161 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
14162 If off is not INTEGER_CST, issue a may not be aligned warning
14163 rather than isn't aligned. Use isn%'t rather than isn't.
14164 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
14166 <case MULT_EXPR>: Improve the case when bottom and one of the
14167 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
14168 operand, in that case check if the other operand is multiple of
14169 bottom divided by the INTEGER_CST operand.
14171 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
14174 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
14175 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
14176 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
14177 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
14178 * config/pa/pa.c (pa_function_arg_advance): Likewise.
14179 (pa_function_arg, pa_arg_partial_bytes): Likewise.
14180 (pa_function_arg_size): New function.
14182 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
14184 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
14185 in a separate statement.
14187 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
14189 PR tree-optimization/83847
14190 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
14191 group gathers and scatters.
14193 2018-01-16 Jakub Jelinek <jakub@redhat.com>
14195 PR rtl-optimization/86620
14196 * params.def (max-sched-ready-insns): Bump minimum value to 1.
14198 PR rtl-optimization/83213
14199 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
14200 to last if both are JUMP_INSNs.
14202 PR tree-optimization/83843
14203 * gimple-ssa-store-merging.c
14204 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
14205 store_immediate_info for bswap/nop orig_stores.
14207 2018-01-15 Andrew Waterman <andrew@sifive.com>
14209 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
14211 <UDIV>: Increase cost if !TARGET_DIV.
14213 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
14215 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
14216 (define_attr "cr_logical_3op"): New.
14217 (cceq_ior_compare): Adjust.
14218 (cceq_ior_compare_complement): Adjust.
14219 (*cceq_rev_compare): Adjust.
14220 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
14221 (is_cracked_insn): Adjust.
14222 (insn_must_be_first_in_group): Adjust.
14223 * config/rs6000/40x.md: Adjust.
14224 * config/rs6000/440.md: Adjust.
14225 * config/rs6000/476.md: Adjust.
14226 * config/rs6000/601.md: Adjust.
14227 * config/rs6000/603.md: Adjust.
14228 * config/rs6000/6xx.md: Adjust.
14229 * config/rs6000/7450.md: Adjust.
14230 * config/rs6000/7xx.md: Adjust.
14231 * config/rs6000/8540.md: Adjust.
14232 * config/rs6000/cell.md: Adjust.
14233 * config/rs6000/e300c2c3.md: Adjust.
14234 * config/rs6000/e500mc.md: Adjust.
14235 * config/rs6000/e500mc64.md: Adjust.
14236 * config/rs6000/e5500.md: Adjust.
14237 * config/rs6000/e6500.md: Adjust.
14238 * config/rs6000/mpc.md: Adjust.
14239 * config/rs6000/power4.md: Adjust.
14240 * config/rs6000/power5.md: Adjust.
14241 * config/rs6000/power6.md: Adjust.
14242 * config/rs6000/power7.md: Adjust.
14243 * config/rs6000/power8.md: Adjust.
14244 * config/rs6000/power9.md: Adjust.
14245 * config/rs6000/rs64.md: Adjust.
14246 * config/rs6000/titan.md: Adjust.
14248 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14250 * config/i386/predicates.md (indirect_branch_operand): Rewrite
14251 ix86_indirect_branch_register logic.
14253 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14255 * config/i386/constraints.md (Bs): Update
14256 ix86_indirect_branch_register check. Don't check
14257 ix86_indirect_branch_register with GOT_memory_operand.
14259 * config/i386/predicates.md (GOT_memory_operand): Don't check
14260 ix86_indirect_branch_register here.
14261 (GOT32_symbol_operand): Likewise.
14263 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14265 * config/i386/predicates.md (constant_call_address_operand):
14266 Rewrite ix86_indirect_branch_register logic.
14267 (sibcall_insn_operand): Likewise.
14269 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14271 * config/i386/constraints.md (Bs): Replace
14272 ix86_indirect_branch_thunk_register with
14273 ix86_indirect_branch_register.
14275 * config/i386/i386.md (indirect_jump): Likewise.
14276 (tablejump): Likewise.
14277 (*sibcall_memory): Likewise.
14278 (*sibcall_value_memory): Likewise.
14279 Peepholes of indirect call and jump via memory: Likewise.
14280 * config/i386/i386.opt: Likewise.
14281 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14282 (GOT_memory_operand): Likewise.
14283 (call_insn_operand): Likewise.
14284 (sibcall_insn_operand): Likewise.
14285 (GOT32_symbol_operand): Likewise.
14287 2018-01-15 Jakub Jelinek <jakub@redhat.com>
14289 PR middle-end/83837
14290 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
14291 type rather than type addr's type points to.
14292 (expand_omp_atomic_mutex): Likewise.
14293 (expand_omp_atomic): Likewise.
14295 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14298 * config/i386/i386.c (output_indirect_thunk_function): Use
14299 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
14300 for __x86_return_thunk.
14302 2018-01-15 Richard Biener <rguenther@suse.de>
14304 PR middle-end/83850
14305 * expmed.c (extract_bit_field_1): Fix typo.
14307 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14310 * config/arm/iterators.md (VF): New mode iterator.
14311 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
14312 Remove integer-related logic from pattern.
14313 (neon_vabd<mode>_3): Likewise.
14315 2018-01-15 Jakub Jelinek <jakub@redhat.com>
14317 PR middle-end/82694
14318 * common.opt (fstrict-overflow): No longer an alias.
14319 (fwrapv-pointer): New option.
14320 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
14321 also for pointer types based on flag_wrapv_pointer.
14322 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
14323 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
14324 opts->x_flag_wrapv got set.
14325 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
14326 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
14327 POINTER_TYPE_OVERFLOW_UNDEFINED.
14328 * match.pd: Likewise in address comparison pattern.
14329 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
14331 2018-01-15 Richard Biener <rguenther@suse.de>
14334 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
14335 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
14336 Reset type names to their identifier if their TYPE_DECL doesn't
14337 have linkage (and thus is used for ODR and devirt).
14338 (save_debug_info_for_decl): Remove.
14339 (save_debug_info_for_type): Likewise.
14340 (add_tree_to_fld_list): Adjust.
14341 * tree-pretty-print.c (dump_generic_node): Make dumping of
14342 type names more robust.
14344 2018-01-15 Richard Biener <rguenther@suse.de>
14346 * BASE-VER: Bump to 8.0.1.
14348 2018-01-14 Martin Sebor <msebor@redhat.com>
14351 * builtins.c (check_access): Avoid warning when the no-warning bit
14354 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
14356 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
14357 * ira-color (allocno_hard_regs_compare): Likewise.
14359 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
14362 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
14363 Use .pushsection/.popsection.
14365 2018-01-14 Martin Sebor <msebor@redhat.com>
14368 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
14370 2018-01-14 Jakub Jelinek <jakub@redhat.com>
14372 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
14373 entry from extra_headers.
14374 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
14375 extra_headers, make the list bitwise identical to the i?86-*-* one.
14377 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14379 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
14380 -mcmodel=large with -mindirect-branch=thunk,
14381 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
14382 -mfunction-return=thunk-extern.
14383 * doc/invoke.texi: Document -mcmodel=large is incompatible with
14384 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
14385 -mfunction-return=thunk and -mfunction-return=thunk-extern.
14387 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14389 * config/i386/i386.c (print_reg): Print the name of the full
14390 integer register without '%'.
14391 (ix86_print_operand): Handle 'V'.
14392 * doc/extend.texi: Document 'V' modifier.
14394 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14396 * config/i386/constraints.md (Bs): Disallow memory operand for
14397 -mindirect-branch-register.
14399 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14400 (GOT_memory_operand): Likewise.
14401 (call_insn_operand): Likewise.
14402 (sibcall_insn_operand): Likewise.
14403 (GOT32_symbol_operand): Likewise.
14404 * config/i386/i386.md (indirect_jump): Call convert_memory_address
14405 for -mindirect-branch-register.
14406 (tablejump): Likewise.
14407 (*sibcall_memory): Likewise.
14408 (*sibcall_value_memory): Likewise.
14409 Disallow peepholes of indirect call and jump via memory for
14410 -mindirect-branch-register.
14411 (*call_pop): Replace m with Bw.
14412 (*call_value_pop): Likewise.
14413 (*sibcall_pop_memory): Replace m with Bs.
14414 * config/i386/i386.opt (mindirect-branch-register): New option.
14415 * doc/invoke.texi: Document -mindirect-branch-register option.
14417 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14419 * config/i386/i386-protos.h (ix86_output_function_return): New.
14420 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
14421 set function_return_type.
14422 (indirect_thunk_name): Add ret_p to indicate thunk for function
14424 (output_indirect_thunk_function): Pass false to
14425 indirect_thunk_name.
14426 (ix86_output_indirect_branch_via_reg): Likewise.
14427 (ix86_output_indirect_branch_via_push): Likewise.
14428 (output_indirect_thunk_function): Create alias for function
14429 return thunk if regno < 0.
14430 (ix86_output_function_return): New function.
14431 (ix86_handle_fndecl_attribute): Handle function_return.
14432 (ix86_attribute_table): Add function_return.
14433 * config/i386/i386.h (machine_function): Add
14434 function_return_type.
14435 * config/i386/i386.md (simple_return_internal): Use
14436 ix86_output_function_return.
14437 (simple_return_internal_long): Likewise.
14438 * config/i386/i386.opt (mfunction-return=): New option.
14439 (indirect_branch): Mention -mfunction-return=.
14440 * doc/extend.texi: Document function_return function attribute.
14441 * doc/invoke.texi: Document -mfunction-return= option.
14443 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14445 * config/i386/i386-opts.h (indirect_branch): New.
14446 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
14447 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
14448 with local indirect jump when converting indirect call and jump.
14449 (ix86_set_indirect_branch_type): New.
14450 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
14451 (indirectlabelno): New.
14452 (indirect_thunk_needed): Likewise.
14453 (indirect_thunk_bnd_needed): Likewise.
14454 (indirect_thunks_used): Likewise.
14455 (indirect_thunks_bnd_used): Likewise.
14456 (INDIRECT_LABEL): Likewise.
14457 (indirect_thunk_name): Likewise.
14458 (output_indirect_thunk): Likewise.
14459 (output_indirect_thunk_function): Likewise.
14460 (ix86_output_indirect_branch_via_reg): Likewise.
14461 (ix86_output_indirect_branch_via_push): Likewise.
14462 (ix86_output_indirect_branch): Likewise.
14463 (ix86_output_indirect_jmp): Likewise.
14464 (ix86_code_end): Call output_indirect_thunk_function if needed.
14465 (ix86_output_call_insn): Call ix86_output_indirect_branch if
14467 (ix86_handle_fndecl_attribute): Handle indirect_branch.
14468 (ix86_attribute_table): Add indirect_branch.
14469 * config/i386/i386.h (machine_function): Add indirect_branch_type
14470 and has_local_indirect_jump.
14471 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
14473 (tablejump): Likewise.
14474 (*indirect_jump): Use ix86_output_indirect_jmp.
14475 (*tablejump_1): Likewise.
14476 (simple_return_indirect_internal): Likewise.
14477 * config/i386/i386.opt (mindirect-branch=): New option.
14478 (indirect_branch): New.
14481 (thunk-inline): Likewise.
14482 (thunk-extern): Likewise.
14483 * doc/extend.texi: Document indirect_branch function attribute.
14484 * doc/invoke.texi: Document -mindirect-branch= option.
14486 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
14489 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
14491 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
14493 * ipa-inline.c (want_inline_small_function_p): Return false if
14494 inlining has already failed with CIF_FINAL_ERROR.
14495 (update_caller_keys): Call want_inline_small_function_p before
14497 (update_callee_keys): Likewise.
14499 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
14501 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
14503 (rs6000_quadword_masked_address_p): Likewise.
14504 (quad_aligned_load_p): Likewise.
14505 (quad_aligned_store_p): Likewise.
14506 (const_load_sequence_p): Add comment to describe the outer-most loop.
14507 (mimic_memory_attributes_and_flags): New function.
14508 (rs6000_gen_stvx): Likewise.
14509 (replace_swapped_aligned_store): Likewise.
14510 (rs6000_gen_lvx): Likewise.
14511 (replace_swapped_aligned_load): Likewise.
14512 (replace_swapped_load_constant): Capitalize argument name in
14513 comment describing this function.
14514 (rs6000_analyze_swaps): Add a third pass to search for vector loads
14515 and stores that access quad-word aligned addresses and replace
14516 with stvx or lvx instructions when appropriate.
14517 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
14518 New function prototype.
14519 (rs6000_quadword_masked_address_p): Likewise.
14520 (rs6000_gen_lvx): Likewise.
14521 (rs6000_gen_stvx): Likewise.
14522 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
14523 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
14524 when memory address is aligned.
14525 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
14526 this split to select lvx instruction when memory address is aligned.
14527 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
14528 instruction when memory address is aligned.
14529 (*vsx_le_perm_load_v16qi): Likewise.
14530 (four unnamed splitters): Modify to select the stvx instruction
14531 when memory is aligned.
14533 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
14535 * predict.c (determine_unlikely_bbs): Handle correctly BBs
14536 which appears in the queue multiple times.
14538 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14539 Alan Hayward <alan.hayward@arm.com>
14540 David Sherwood <david.sherwood@arm.com>
14542 * tree-vectorizer.h (vec_lower_bound): New structure.
14543 (_loop_vec_info): Add check_nonzero and lower_bounds.
14544 (LOOP_VINFO_CHECK_NONZERO): New macro.
14545 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
14546 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
14547 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
14548 fields. Make seg_len the distance travelled, not including the
14550 (dr_direction_indicator): Declare.
14551 (dr_zero_step_indicator): Likewise.
14552 (dr_known_forward_stride_p): Likewise.
14553 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
14555 (runtime_alias_check_p): Allow runtime alias checks with
14557 (operator ==): Compare access_size and align.
14558 (prune_runtime_alias_test_list): Rework for new distinction between
14559 the access_size and seg_len.
14560 (create_intersect_range_checks_index): Likewise. Cope with polynomial
14562 (get_segment_min_max): New function.
14563 (create_intersect_range_checks): Use it.
14564 (dr_step_indicator): New function.
14565 (dr_direction_indicator): Likewise.
14566 (dr_zero_step_indicator): Likewise.
14567 (dr_known_forward_stride_p): Likewise.
14568 * tree-loop-distribution.c (data_ref_segment_size): Return
14569 DR_STEP * (niters - 1).
14570 (compute_alias_check_pairs): Update call to the dr_with_seg_len
14572 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
14573 (vect_preserves_scalar_order_p): New function, split out from...
14574 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
14575 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
14576 (vect_vfa_access_size): New function.
14577 (vect_vfa_align): Likewise.
14578 (vect_compile_time_alias): Take access_size_a and access_b arguments.
14579 (dump_lower_bound): New function.
14580 (vect_check_lower_bound): Likewise.
14581 (vect_small_gap_p): Likewise.
14582 (vectorizable_with_step_bound_p): Likewise.
14583 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
14584 depencies if the vectorization factor is 1. Convert the checks
14585 for nonzero steps into checks on the bounds of DR_STEP. Try using
14586 a bunds check for variable steps if the minimum required step is
14587 relatively small. Update calls to the dr_with_seg_len
14588 constructor and to vect_compile_time_alias.
14589 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
14591 (vect_loop_versioning): Call it.
14592 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
14594 (vect_estimate_min_profitable_iters): Account for any bounds checks.
14596 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14597 Alan Hayward <alan.hayward@arm.com>
14598 David Sherwood <david.sherwood@arm.com>
14600 * doc/sourcebuild.texi (vect_scatter_store): Document.
14601 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
14603 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
14605 * genopinit.c (main): Add supports_vec_scatter_store and
14606 supports_vec_scatter_store_cached to target_optabs.
14607 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
14608 IFN_MASK_SCATTER_STORE.
14609 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
14611 * internal-fn.h (internal_store_fn_p): Declare.
14612 (internal_fn_stored_value_index): Likewise.
14613 * internal-fn.c (scatter_store_direct): New macro.
14614 (expand_scatter_store_optab_fn): New function.
14615 (direct_scatter_store_optab_supported_p): New macro.
14616 (internal_store_fn_p): New function.
14617 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
14618 IFN_MASK_SCATTER_STORE.
14619 (internal_fn_mask_index): Likewise.
14620 (internal_fn_stored_value_index): New function.
14621 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
14622 for scatter stores.
14623 * optabs-query.h (supports_vec_scatter_store_p): Declare.
14624 * optabs-query.c (supports_vec_scatter_store_p): New function.
14625 * tree-vectorizer.h (vect_get_store_rhs): Declare.
14626 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
14627 true for scatter stores.
14628 (vect_gather_scatter_fn_p): Handle scatter stores too.
14629 (vect_check_gather_scatter): Consider using scatter stores if
14630 supports_vec_scatter_store_p.
14631 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
14632 scatter stores too.
14633 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
14634 internal_fn_stored_value_index.
14635 (check_load_store_masking): Handle scatter stores too.
14636 (vect_get_store_rhs): Make public.
14637 (vectorizable_call): Use internal_store_fn_p.
14638 (vectorizable_store): Handle scatter store internal functions.
14639 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
14640 when deciding whether the end of the group has been reached.
14641 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
14642 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
14643 (mask_scatter_store<mode>): New insns.
14645 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14646 Alan Hayward <alan.hayward@arm.com>
14647 David Sherwood <david.sherwood@arm.com>
14649 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
14650 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
14651 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
14653 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
14654 Use vect_truncate_gather_scatter_offset if we can't treat the
14655 operation as a normal gather load or scatter store.
14656 (get_group_load_store_type): Take the gather_scatter_info
14657 as argument. Try using a gather load or scatter store for
14658 single-element groups.
14659 (get_load_store_type): Update calls to get_group_load_store_type
14660 and vect_use_strided_gather_scatters_p.
14662 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14663 Alan Hayward <alan.hayward@arm.com>
14664 David Sherwood <david.sherwood@arm.com>
14666 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
14667 optional tree argument.
14668 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
14670 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
14671 but continue to use the current value as a fallback.
14672 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
14673 to compare the updates.
14674 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
14675 (get_load_store_type): Use it when handling a strided access.
14676 (vect_get_strided_load_store_ops): New function.
14677 (vect_get_data_ptr_increment): Likewise.
14678 (vectorizable_load): Handle strided gather loads. Always pass
14679 a step to vect_create_data_ref_ptr and bump_vector_ptr.
14681 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14682 Alan Hayward <alan.hayward@arm.com>
14683 David Sherwood <david.sherwood@arm.com>
14685 * doc/md.texi (gather_load@var{m}): Document.
14686 (mask_gather_load@var{m}): Likewise.
14687 * genopinit.c (main): Add supports_vec_gather_load and
14688 supports_vec_gather_load_cached to target_optabs.
14689 * optabs-tree.c (init_tree_optimization_optabs): Use
14690 ggc_cleared_alloc to allocate target_optabs.
14691 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
14692 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
14694 * internal-fn.h (internal_load_fn_p): Declare.
14695 (internal_gather_scatter_fn_p): Likewise.
14696 (internal_fn_mask_index): Likewise.
14697 (internal_gather_scatter_fn_supported_p): Likewise.
14698 * internal-fn.c (gather_load_direct): New macro.
14699 (expand_gather_load_optab_fn): New function.
14700 (direct_gather_load_optab_supported_p): New macro.
14701 (direct_internal_fn_optab): New function.
14702 (internal_load_fn_p): Likewise.
14703 (internal_gather_scatter_fn_p): Likewise.
14704 (internal_fn_mask_index): Likewise.
14705 (internal_gather_scatter_fn_supported_p): Likewise.
14706 * optabs-query.c (supports_at_least_one_mode_p): New function.
14707 (supports_vec_gather_load_p): Likewise.
14708 * optabs-query.h (supports_vec_gather_load_p): Declare.
14709 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
14710 and memory_type field.
14711 (NUM_PATTERNS): Bump to 15.
14712 * tree-vect-data-refs.c: Include internal-fn.h.
14713 (vect_gather_scatter_fn_p): New function.
14714 (vect_describe_gather_scatter_call): Likewise.
14715 (vect_check_gather_scatter): Try using internal functions for
14716 gather loads. Recognize existing calls to a gather load function.
14717 (vect_analyze_data_refs): Consider using gather loads if
14718 supports_vec_gather_load_p.
14719 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
14720 (vect_get_gather_scatter_offset_type): Likewise.
14721 (vect_convert_mask_for_vectype): Likewise.
14722 (vect_add_conversion_to_patterm): Likewise.
14723 (vect_try_gather_scatter_pattern): Likewise.
14724 (vect_recog_gather_scatter_pattern): New pattern recognizer.
14725 (vect_vect_recog_func_ptrs): Add it.
14726 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
14727 internal_fn_mask_index and internal_gather_scatter_fn_p.
14728 (check_load_store_masking): Take the gather_scatter_info as an
14729 argument and handle gather loads.
14730 (vect_get_gather_scatter_ops): New function.
14731 (vectorizable_call): Check internal_load_fn_p.
14732 (vectorizable_load): Likewise. Handle gather load internal
14734 (vectorizable_store): Update call to check_load_store_masking.
14735 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
14736 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
14737 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
14738 (aarch64_gather_scale_operand_d): New predicates.
14739 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
14740 (mask_gather_load<mode>): New insns.
14742 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14743 Alan Hayward <alan.hayward@arm.com>
14744 David Sherwood <david.sherwood@arm.com>
14746 * optabs.def (fold_left_plus_optab): New optab.
14747 * doc/md.texi (fold_left_plus_@var{m}): Document.
14748 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
14749 * internal-fn.c (fold_left_direct): Define.
14750 (expand_fold_left_optab_fn): Likewise.
14751 (direct_fold_left_optab_supported_p): Likewise.
14752 * fold-const-call.c (fold_const_fold_left): New function.
14753 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
14754 * tree-parloops.c (valid_reduction_p): New function.
14755 (gather_scalar_reductions): Use it.
14756 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
14757 (vect_finish_replace_stmt): Declare.
14758 * tree-vect-loop.c (fold_left_reduction_fn): New function.
14759 (needs_fold_left_reduction_p): New function, split out from...
14760 (vect_is_simple_reduction): ...here. Accept reductions that
14761 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
14762 (vect_force_simple_reduction): Also store the reduction type in
14763 the assignment's STMT_VINFO_REDUC_TYPE.
14764 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
14765 (merge_with_identity): New function.
14766 (vect_expand_fold_left): Likewise.
14767 (vectorize_fold_left_reduction): Likewise.
14768 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
14769 scalar phi in place for it. Check for target support and reject
14770 cases that would reassociate the operation. Defer the transform
14771 phase to vectorize_fold_left_reduction.
14772 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
14773 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
14774 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
14776 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14778 * tree-if-conv.c (predicate_mem_writes): Remove redundant
14779 call to ifc_temp_var.
14781 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14782 Alan Hayward <alan.hayward@arm.com>
14783 David Sherwood <david.sherwood@arm.com>
14785 * target.def (legitimize_address_displacement): Take the original
14786 offset as a poly_int.
14787 * targhooks.h (default_legitimize_address_displacement): Update
14789 * targhooks.c (default_legitimize_address_displacement): Likewise.
14790 * doc/tm.texi: Regenerate.
14791 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
14792 as an argument, moving assert of ad->disp == ad->disp_term to...
14793 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
14794 Try calling targetm.legitimize_address_displacement before expanding
14795 the address rather than afterwards, and adjust for the new interface.
14796 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
14797 Match the new hook interface. Handle SVE addresses.
14798 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
14799 new hook interface.
14801 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14803 * Makefile.in (OBJS): Add early-remat.o.
14804 * target.def (select_early_remat_modes): New hook.
14805 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
14806 * doc/tm.texi: Regenerate.
14807 * targhooks.h (default_select_early_remat_modes): Declare.
14808 * targhooks.c (default_select_early_remat_modes): New function.
14809 * timevar.def (TV_EARLY_REMAT): New timevar.
14810 * passes.def (pass_early_remat): New pass.
14811 * tree-pass.h (make_pass_early_remat): Declare.
14812 * early-remat.c: New file.
14813 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
14815 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
14817 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14818 Alan Hayward <alan.hayward@arm.com>
14819 David Sherwood <david.sherwood@arm.com>
14821 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
14822 vfm1 with a bound_epilog parameter.
14823 (vect_do_peeling): Update calls accordingly, and move the prologue
14824 call earlier in the function. Treat the base bound_epilog as 0 for
14825 fully-masked loops and retain vf - 1 for other loops. Add 1 to
14826 this base when peeling for gaps.
14827 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
14828 with fully-masked loops.
14829 (vect_estimate_min_profitable_iters): Handle the single peeled
14830 iteration in that case.
14832 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14833 Alan Hayward <alan.hayward@arm.com>
14834 David Sherwood <david.sherwood@arm.com>
14836 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
14837 single-element interleaving even if the size is not a power of 2.
14838 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
14839 accesses for single-element interleaving if the group size is
14842 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14843 Alan Hayward <alan.hayward@arm.com>
14844 David Sherwood <david.sherwood@arm.com>
14846 * doc/md.texi (fold_extract_last_@var{m}): Document.
14847 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
14848 * optabs.def (fold_extract_last_optab): New optab.
14849 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
14850 * internal-fn.c (fold_extract_direct): New macro.
14851 (expand_fold_extract_optab_fn): Likewise.
14852 (direct_fold_extract_optab_supported_p): Likewise.
14853 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
14854 * tree-vect-loop.c (vect_model_reduction_cost): Handle
14855 EXTRACT_LAST_REDUCTION.
14856 (get_initial_def_for_reduction): Do not create an initial vector
14857 for EXTRACT_LAST_REDUCTION reductions.
14858 (vectorizable_reduction): Leave the scalar phi in place for
14859 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
14860 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
14861 epilogue code for EXTRACT_LAST_REDUCTION and defer the
14862 transform phase to vectorizable_condition.
14863 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
14865 (vect_finish_stmt_generation): ...here.
14866 (vect_finish_replace_stmt): New function.
14867 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
14868 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
14870 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
14872 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14873 Alan Hayward <alan.hayward@arm.com>
14874 David Sherwood <david.sherwood@arm.com>
14876 * doc/md.texi (extract_last_@var{m}): Document.
14877 * optabs.def (extract_last_optab): New optab.
14878 * internal-fn.def (EXTRACT_LAST): New internal function.
14879 * internal-fn.c (cond_unary_direct): New macro.
14880 (expand_cond_unary_optab_fn): Likewise.
14881 (direct_cond_unary_optab_supported_p): Likewise.
14882 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
14883 loops using EXTRACT_LAST.
14884 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
14885 (extract_last_<mode>): ...this optab.
14886 (vec_extract<mode><Vel>): Update accordingly.
14888 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14889 Alan Hayward <alan.hayward@arm.com>
14890 David Sherwood <david.sherwood@arm.com>
14892 * target.def (empty_mask_is_expensive): New hook.
14893 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
14894 * doc/tm.texi: Regenerate.
14895 * targhooks.h (default_empty_mask_is_expensive): Declare.
14896 * targhooks.c (default_empty_mask_is_expensive): New function.
14897 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
14898 if the target says that empty masks are expensive.
14899 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
14901 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
14903 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14904 Alan Hayward <alan.hayward@arm.com>
14905 David Sherwood <david.sherwood@arm.com>
14907 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
14908 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
14909 (vect_use_loop_mask_for_alignment_p): New function.
14910 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
14911 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
14912 niters_skip argument. Make sure that the first niters_skip elements
14913 of the first iteration are inactive.
14914 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
14915 Update call to vect_set_loop_masks_directly.
14916 (get_misalign_in_elems): New function, split out from...
14917 (vect_gen_prolog_loop_niters): ...here.
14918 (vect_update_init_of_dr): Take a code argument that specifies whether
14919 the adjustment should be added or subtracted.
14920 (vect_update_init_of_drs): Likewise.
14921 (vect_prepare_for_masked_peels): New function.
14922 (vect_do_peeling): Skip prologue peeling if we're using a mask
14923 instead. Update call to vect_update_inits_of_drs.
14924 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14926 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
14927 alignment. Do not include the number of peeled iterations in
14928 the minimum threshold in that case.
14929 (vectorizable_induction): Adjust the start value down by
14930 LOOP_VINFO_MASK_SKIP_NITERS iterations.
14931 (vect_transform_loop): Call vect_prepare_for_masked_peels.
14932 Take the number of skipped iterations into account when calculating
14934 * tree-vect-stmts.c (vect_gen_while_not): New function.
14936 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14937 Alan Hayward <alan.hayward@arm.com>
14938 David Sherwood <david.sherwood@arm.com>
14940 * doc/sourcebuild.texi (vect_fully_masked): Document.
14941 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
14942 default value to 0.
14943 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
14945 (vect_analyze_loop_2): ...here. Don't check the vectorization
14946 factor against the number of loop iterations if the loop is
14949 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14950 Alan Hayward <alan.hayward@arm.com>
14951 David Sherwood <david.sherwood@arm.com>
14953 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
14954 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
14955 (dump_groups): Update accordingly.
14956 (iv_use::mem_type): New member variable.
14957 (address_p): New function.
14958 (record_use): Add a mem_type argument and initialize the new
14960 (record_group_use): Add a mem_type argument. Use address_p.
14961 Remove obsolete null checks of base_object. Update call to record_use.
14962 (find_interesting_uses_op): Update call to record_group_use.
14963 (find_interesting_uses_cond): Likewise.
14964 (find_interesting_uses_address): Likewise.
14965 (get_mem_type_for_internal_fn): New function.
14966 (find_address_like_use): Likewise.
14967 (find_interesting_uses_stmt): Try find_address_like_use before
14968 calling find_interesting_uses_op.
14969 (addr_offset_valid_p): Use the iv mem_type field as the type
14970 of the addressed memory.
14971 (add_autoinc_candidates): Likewise.
14972 (get_address_cost): Likewise.
14973 (split_small_address_groups_p): Use address_p.
14974 (split_address_groups): Likewise.
14975 (add_iv_candidate_for_use): Likewise.
14976 (autoinc_possible_for_pair): Likewise.
14977 (rewrite_groups): Likewise.
14978 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
14979 (determine_group_iv_cost): Update after split of USE_ADDRESS.
14980 (get_alias_ptr_type_for_ptr_address): New function.
14981 (rewrite_use_address): Rewrite address uses in calls that were
14982 identified by find_address_like_use.
14984 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14985 Alan Hayward <alan.hayward@arm.com>
14986 David Sherwood <david.sherwood@arm.com>
14988 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
14990 * gimple-expr.h (is_gimple_addressable: Likewise.
14991 * gimple-expr.c (is_gimple_address): Likewise.
14992 * internal-fn.c (expand_call_mem_ref): New function.
14993 (expand_mask_load_optab_fn): Use it.
14994 (expand_mask_store_optab_fn): Likewise.
14996 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
14997 Alan Hayward <alan.hayward@arm.com>
14998 David Sherwood <david.sherwood@arm.com>
15000 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
15001 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
15002 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
15003 (cond_umax@var{mode}): Document.
15004 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
15005 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
15006 (cond_umin_optab, cond_umax_optab): New optabs.
15007 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
15008 (COND_IOR, COND_XOR): New internal functions.
15009 * internal-fn.h (get_conditional_internal_fn): Declare.
15010 * internal-fn.c (cond_binary_direct): New macro.
15011 (expand_cond_binary_optab_fn): Likewise.
15012 (direct_cond_binary_optab_supported_p): Likewise.
15013 (get_conditional_internal_fn): New function.
15014 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
15015 Cope with reduction statements that are vectorized as calls rather
15017 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
15018 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
15019 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
15020 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15021 (UNSPEC_COND_EOR): New unspecs.
15022 (optab): Add mappings for them.
15023 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
15024 (sve_int_op, sve_fp_op): New int attributes.
15026 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15027 Alan Hayward <alan.hayward@arm.com>
15028 David Sherwood <david.sherwood@arm.com>
15030 * optabs.def (while_ult_optab): New optab.
15031 * doc/md.texi (while_ult@var{m}@var{n}): Document.
15032 * internal-fn.def (WHILE_ULT): New internal function.
15033 * internal-fn.h (direct_internal_fn_supported_p): New override
15034 that takes two types as argument.
15035 * internal-fn.c (while_direct): New macro.
15036 (expand_while_optab_fn): New function.
15037 (convert_optab_supported_p): Likewise.
15038 (direct_while_optab_supported_p): New macro.
15039 * wide-int.h (wi::udiv_ceil): New function.
15040 * tree-vectorizer.h (rgroup_masks): New structure.
15041 (vec_loop_masks): New typedef.
15042 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
15043 and fully_masked_p.
15044 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
15045 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
15046 (vect_max_vf): New function.
15047 (slpeel_make_loop_iterate_ntimes): Delete.
15048 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
15049 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
15050 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
15051 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
15052 internal-fn.h, stor-layout.h and optabs-query.h.
15053 (vect_set_loop_mask): New function.
15054 (add_preheader_seq): Likewise.
15055 (add_header_seq): Likewise.
15056 (interleave_supported_p): Likewise.
15057 (vect_maybe_permute_loop_masks): Likewise.
15058 (vect_set_loop_masks_directly): Likewise.
15059 (vect_set_loop_condition_masked): Likewise.
15060 (vect_set_loop_condition_unmasked): New function, split out from
15061 slpeel_make_loop_iterate_ntimes.
15062 (slpeel_make_loop_iterate_ntimes): Rename to..
15063 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
15064 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
15065 (vect_do_peeling): Update call accordingly.
15066 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
15068 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15069 mask_compare_type, can_fully_mask_p and fully_masked_p.
15070 (release_vec_loop_masks): New function.
15071 (_loop_vec_info): Use it to free the loop masks.
15072 (can_produce_all_loop_masks_p): New function.
15073 (vect_get_max_nscalars_per_iter): Likewise.
15074 (vect_verify_full_masking): Likewise.
15075 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
15076 retries, and free the mask rgroups before retrying. Check loop-wide
15077 reasons for disallowing fully-masked loops. Make the final decision
15078 about whether use a fully-masked loop or not.
15079 (vect_estimate_min_profitable_iters): Do not assume that peeling
15080 for the number of iterations will be needed for fully-masked loops.
15081 (vectorizable_reduction): Disable fully-masked loops.
15082 (vectorizable_live_operation): Likewise.
15083 (vect_halve_mask_nunits): New function.
15084 (vect_double_mask_nunits): Likewise.
15085 (vect_record_loop_mask): Likewise.
15086 (vect_get_loop_mask): Likewise.
15087 (vect_transform_loop): Handle the case in which the final loop
15088 iteration might handle a partial vector. Call vect_set_loop_condition
15089 instead of slpeel_make_loop_iterate_ntimes.
15090 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
15091 (check_load_store_masking): New function.
15092 (prepare_load_store_mask): Likewise.
15093 (vectorizable_store): Handle fully-masked loops.
15094 (vectorizable_load): Likewise.
15095 (supportable_widening_operation): Use vect_halve_mask_nunits for
15097 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
15098 (vect_gen_while): New function.
15099 * config/aarch64/aarch64.md (umax<mode>3): New expander.
15100 (aarch64_uqdec<mode>): New insn.
15102 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15103 Alan Hayward <alan.hayward@arm.com>
15104 David Sherwood <david.sherwood@arm.com>
15106 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
15107 (reduc_xor_scal_optab): New optabs.
15108 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
15109 (reduc_xor_scal_@var{m}): Document.
15110 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
15111 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
15112 internal functions.
15113 * fold-const-call.c (fold_const_call): Handle them.
15114 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
15115 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
15116 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
15117 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
15118 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
15119 (UNSPEC_XORV): New unspecs.
15120 (optab): Add entries for them.
15121 (BITWISEV): New int iterator.
15122 (bit_reduc_op): New int attributes.
15124 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15125 Alan Hayward <alan.hayward@arm.com>
15126 David Sherwood <david.sherwood@arm.com>
15128 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
15129 * internal-fn.def (VEC_SHL_INSERT): New internal function.
15130 * optabs.def (vec_shl_insert_optab): New optab.
15131 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
15132 (duplicate_and_interleave): Likewise.
15133 * tree-vect-loop.c: Include internal-fn.h.
15134 (neutral_op_for_slp_reduction): New function, split out from
15135 get_initial_defs_for_reduction.
15136 (get_initial_def_for_reduction): Handle option 2 for variable-length
15137 vectors by loading the neutral value into a vector and then shifting
15138 the initial value into element 0.
15139 (get_initial_defs_for_reduction): Replace the code argument with
15140 the neutral value calculated by neutral_op_for_slp_reduction.
15141 Use gimple_build_vector for constant-length vectors.
15142 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
15143 but the first group_size elements have a neutral value.
15144 Use duplicate_and_interleave otherwise.
15145 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
15146 Update call to get_initial_defs_for_reduction. Handle SLP
15147 reductions for variable-length vectors by creating one vector
15148 result for each scalar result, with the elements associated
15149 with other scalar results stubbed out with the neutral value.
15150 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
15151 Require IFN_VEC_SHL_INSERT for double reductions on
15152 variable-length vectors, or SLP reductions that have
15153 a neutral value. Require can_duplicate_and_interleave_p
15154 support for variable-length unchained SLP reductions if there
15155 is no neutral value, such as for MIN/MAX reductions. Also require
15156 the number of vector elements to be a multiple of the number of
15157 SLP statements when doing variable-length unchained SLP reductions.
15158 Update call to vect_create_epilog_for_reduction.
15159 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
15160 and remove initial values.
15161 (duplicate_and_interleave): Make public.
15162 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
15163 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
15165 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15166 Alan Hayward <alan.hayward@arm.com>
15167 David Sherwood <david.sherwood@arm.com>
15169 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
15170 (can_duplicate_and_interleave_p): New function.
15171 (vect_get_and_check_slp_defs): Take the vector of statements
15172 rather than just the current one. Remove excess parentheses.
15173 Restriction rejectinon of vect_constant_def and vect_external_def
15174 for variable-length vectors to boolean types, or types for which
15175 can_duplicate_and_interleave_p is false.
15176 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
15177 (duplicate_and_interleave): New function.
15178 (vect_get_constant_vectors): Use gimple_build_vector for
15179 constant-length vectors and suitable variable-length constant
15180 vectors. Use duplicate_and_interleave for other variable-length
15181 vectors. Don't defer the update when inserting new statements.
15183 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15184 Alan Hayward <alan.hayward@arm.com>
15185 David Sherwood <david.sherwood@arm.com>
15187 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
15188 min_profitable_iters doesn't go negative.
15190 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15191 Alan Hayward <alan.hayward@arm.com>
15192 David Sherwood <david.sherwood@arm.com>
15194 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
15195 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
15196 * optabs.def (vec_mask_load_lanes_optab): New optab.
15197 (vec_mask_store_lanes_optab): Likewise.
15198 * internal-fn.def (MASK_LOAD_LANES): New internal function.
15199 (MASK_STORE_LANES): Likewise.
15200 * internal-fn.c (mask_load_lanes_direct): New macro.
15201 (mask_store_lanes_direct): Likewise.
15202 (expand_mask_load_optab_fn): Handle masked operations.
15203 (expand_mask_load_lanes_optab_fn): New macro.
15204 (expand_mask_store_optab_fn): Handle masked operations.
15205 (expand_mask_store_lanes_optab_fn): New macro.
15206 (direct_mask_load_lanes_optab_supported_p): Likewise.
15207 (direct_mask_store_lanes_optab_supported_p): Likewise.
15208 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
15210 (vect_load_lanes_supported): Likewise.
15211 * tree-vect-data-refs.c (strip_conversion): New function.
15212 (can_group_stmts_p): Likewise.
15213 (vect_analyze_data_ref_accesses): Use it instead of checking
15214 for a pair of assignments.
15215 (vect_store_lanes_supported): Take a masked_p parameter.
15216 (vect_load_lanes_supported): Likewise.
15217 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
15218 vect_store_lanes_supported and vect_load_lanes_supported.
15219 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
15220 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
15221 parameter. Don't allow gaps for masked accesses.
15222 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
15223 and vect_load_lanes_supported.
15224 (get_load_store_type): Take a masked_p parameter and update
15225 call to get_group_load_store_type.
15226 (vectorizable_store): Update call to get_load_store_type.
15227 Handle IFN_MASK_STORE_LANES.
15228 (vectorizable_load): Update call to get_load_store_type.
15229 Handle IFN_MASK_LOAD_LANES.
15231 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15232 Alan Hayward <alan.hayward@arm.com>
15233 David Sherwood <david.sherwood@arm.com>
15235 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
15237 * config/aarch64/aarch64-protos.h
15238 (aarch64_sve_struct_memory_operand_p): Declare.
15239 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
15240 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
15241 (VPRED, vpred): Handle SVE structure modes.
15242 * config/aarch64/constraints.md (Utx): New constraint.
15243 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
15244 (aarch64_sve_struct_nonimmediate_operand): New predicates.
15245 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
15246 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
15247 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
15248 structure modes. Split into pieces after RA.
15249 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
15250 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
15252 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
15253 SVE structure modes.
15254 (aarch64_classify_address): Likewise.
15255 (sizetochar): Move earlier in file.
15256 (aarch64_print_operand): Handle SVE register lists.
15257 (aarch64_array_mode): New function.
15258 (aarch64_sve_struct_memory_operand_p): Likewise.
15259 (TARGET_ARRAY_MODE): Redefine.
15261 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15262 Alan Hayward <alan.hayward@arm.com>
15263 David Sherwood <david.sherwood@arm.com>
15265 * target.def (array_mode): New target hook.
15266 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
15267 * doc/tm.texi: Regenerate.
15268 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
15269 * hooks.c (hook_optmode_mode_uhwi_none): New function.
15270 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
15271 targetm.array_mode.
15272 * stor-layout.c (mode_for_array): Likewise. Support polynomial
15275 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15276 Alan Hayward <alan.hayward@arm.com>
15277 David Sherwood <david.sherwood@arm.com>
15279 * fold-const.c (fold_binary_loc): Check the argument types
15280 rather than the result type when testing for a vector operation.
15282 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15284 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
15285 * doc/tm.texi: Regenerate.
15287 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15288 Alan Hayward <alan.hayward@arm.com>
15289 David Sherwood <david.sherwood@arm.com>
15291 * doc/invoke.texi (-msve-vector-bits=): Document new option.
15292 (sve): Document new AArch64 extension.
15293 * doc/md.texi (w): Extend the description of the AArch64
15294 constraint to include SVE vectors.
15295 (Upl, Upa): Document new AArch64 predicate constraints.
15296 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
15298 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
15299 (msve-vector-bits=): New option.
15300 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
15301 SVE when these are disabled.
15302 (sve): New extension.
15303 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
15304 modes. Adjust their number of units based on aarch64_sve_vg.
15305 (MAX_BITSIZE_MODE_ANY_MODE): Define.
15306 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
15307 aarch64_addr_query_type.
15308 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
15309 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
15310 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
15311 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
15312 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
15313 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
15314 (aarch64_simd_imm_zero_p): Delete.
15315 (aarch64_check_zero_based_sve_index_immediate): Declare.
15316 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
15317 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
15318 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
15319 (aarch64_sve_float_mul_immediate_p): Likewise.
15320 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
15321 rather than an rtx.
15322 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
15323 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
15324 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
15325 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
15326 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
15327 (aarch64_regmode_natural_size): Likewise.
15328 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
15329 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
15331 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
15332 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
15333 for VG and the SVE predicate registers.
15334 (V_ALIASES): Add a "z"-prefixed alias.
15335 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
15336 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
15337 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
15338 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
15339 (REG_CLASS_NAMES): Add entries for them.
15340 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
15341 and the predicate registers.
15342 (aarch64_sve_vg): Declare.
15343 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
15344 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
15345 (REGMODE_NATURAL_SIZE): Define.
15346 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
15348 * config/aarch64/aarch64.c: Include cfgrtl.h.
15349 (simd_immediate_info): Add a constructor for series vectors,
15350 and an associated step field.
15351 (aarch64_sve_vg): New variable.
15352 (aarch64_dbx_register_number): Handle VG and the predicate registers.
15353 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
15354 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
15355 (VEC_ANY_DATA, VEC_STRUCT): New constants.
15356 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
15357 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
15358 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
15359 (aarch64_get_mask_mode): New functions.
15360 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
15361 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
15362 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
15363 predicate modes and predicate registers. Explicitly restrict
15364 GPRs to modes of 16 bytes or smaller. Only allow FP registers
15365 to store a vector mode if it is recognized by
15366 aarch64_classify_vector_mode.
15367 (aarch64_regmode_natural_size): New function.
15368 (aarch64_hard_regno_caller_save_mode): Return the original mode
15370 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
15371 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
15372 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
15373 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
15375 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
15376 does not overlap dest if the function is frame-related. Handle
15378 (aarch64_split_add_offset): New function.
15379 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
15380 them aarch64_add_offset.
15381 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
15382 and update call to aarch64_sub_sp.
15383 (aarch64_add_cfa_expression): New function.
15384 (aarch64_expand_prologue): Pass extra temporary registers to the
15385 functions above. Handle the case in which we need to emit new
15386 DW_CFA_expressions for registers that were originally saved
15387 relative to the stack pointer, but now have to be expressed
15388 relative to the frame pointer.
15389 (aarch64_output_mi_thunk): Pass extra temporary registers to the
15391 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
15392 IP0 and IP1 values for SVE frames.
15393 (aarch64_expand_vec_series): New function.
15394 (aarch64_expand_sve_widened_duplicate): Likewise.
15395 (aarch64_expand_sve_const_vector): Likewise.
15396 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
15397 Handle SVE constants. Use emit_move_insn to move a force_const_mem
15398 into the register, rather than emitting a SET directly.
15399 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
15400 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
15401 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
15402 (offset_9bit_signed_scaled_p): New functions.
15403 (aarch64_replicate_bitmask_imm): New function.
15404 (aarch64_bitmask_imm): Use it.
15405 (aarch64_cannot_force_const_mem): Reject expressions involving
15406 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
15407 (aarch64_classify_index): Handle SVE indices, by requiring
15408 a plain register index with a scale that matches the element size.
15409 (aarch64_classify_address): Handle SVE addresses. Assert that
15410 the mode of the address is VOIDmode or an integer mode.
15411 Update call to aarch64_classify_symbol.
15412 (aarch64_classify_symbolic_expression): Update call to
15413 aarch64_classify_symbol.
15414 (aarch64_const_vec_all_in_range_p): New function.
15415 (aarch64_print_vector_float_operand): Likewise.
15416 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
15417 "vN" for FP registers with SVE modes. Handle (const ...) vectors
15418 and the FP immediates 1.0 and 0.5.
15419 (aarch64_print_address_internal): Handle SVE addresses.
15420 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
15421 (aarch64_regno_regclass): Handle predicate registers.
15422 (aarch64_secondary_reload): Handle big-endian reloads of SVE
15424 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
15425 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
15426 (aarch64_convert_sve_vector_bits): New function.
15427 (aarch64_override_options): Use it to handle -msve-vector-bits=.
15428 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
15429 rather than an rtx.
15430 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
15431 Handle SVE vector and predicate modes. Accept VL-based constants
15432 that need only one temporary register, and VL offsets that require
15433 no temporary registers.
15434 (aarch64_conditional_register_usage): Mark the predicate registers
15435 as fixed if SVE isn't available.
15436 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
15437 Return true for SVE vector and predicate modes.
15438 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
15439 rather than an unsigned int. Handle SVE modes.
15440 (aarch64_preferred_simd_mode): Update call accordingly. Handle
15442 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
15444 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
15445 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
15446 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
15447 (aarch64_sve_float_mul_immediate_p): New functions.
15448 (aarch64_sve_valid_immediate): New function.
15449 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
15450 Explicitly reject structure modes. Check for INDEX constants.
15451 Handle PTRUE and PFALSE constants.
15452 (aarch64_check_zero_based_sve_index_immediate): New function.
15453 (aarch64_simd_imm_zero_p): Delete.
15454 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
15455 vector modes. Accept constants in the range of CNT[BHWD].
15456 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
15457 ask for an Advanced SIMD mode.
15458 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
15459 (aarch64_simd_vector_alignment): Handle SVE predicates.
15460 (aarch64_vectorize_preferred_vector_alignment): New function.
15461 (aarch64_simd_vector_alignment_reachable): Use it instead of
15463 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
15464 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
15466 (MAX_VECT_LEN): Delete.
15467 (expand_vec_perm_d): Add a vec_flags field.
15468 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
15469 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
15470 (aarch64_evpc_ext): Don't apply a big-endian lane correction
15472 (aarch64_evpc_rev): Rename to...
15473 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
15474 (aarch64_evpc_rev_global): New function.
15475 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
15476 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
15478 (aarch64_evpc_sve_tbl): New function.
15479 (aarch64_expand_vec_perm_const_1): Update after rename of
15480 aarch64_evpc_rev. Handle SVE permutes too, trying
15481 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
15482 than aarch64_evpc_tbl.
15483 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
15484 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
15485 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
15486 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
15487 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
15488 (aarch64_expand_sve_vcond): New functions.
15489 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
15490 of aarch64_vector_mode_p.
15491 (aarch64_dwarf_poly_indeterminate_value): New function.
15492 (aarch64_compute_pressure_classes): Likewise.
15493 (aarch64_can_change_mode_class): Likewise.
15494 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
15495 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
15496 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
15497 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
15498 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
15499 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
15500 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
15501 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
15503 (Dn, Dl, Dr): Accept const as well as const_vector.
15504 (Dz): Likewise. Compare against CONST0_RTX.
15505 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
15506 of "vector" where appropriate.
15507 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
15508 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
15509 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
15510 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
15511 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
15512 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
15513 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
15514 (v_int_equiv): Extend to SVE modes.
15515 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
15517 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
15518 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
15519 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
15520 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
15521 (SVE_COND_FP_CMP): New int iterators.
15522 (perm_hilo): Handle the new unpack unspecs.
15523 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
15525 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
15526 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
15527 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
15528 (aarch64_equality_operator, aarch64_constant_vector_operand)
15529 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
15530 (aarch64_sve_nonimmediate_operand): Likewise.
15531 (aarch64_sve_general_operand): Likewise.
15532 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
15533 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
15534 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
15535 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
15536 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
15537 (aarch64_sve_float_arith_immediate): Likewise.
15538 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
15539 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
15540 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
15541 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
15542 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
15543 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
15544 (aarch64_sve_float_arith_operand): Likewise.
15545 (aarch64_sve_float_arith_with_sub_operand): Likewise.
15546 (aarch64_sve_float_mul_operand): Likewise.
15547 (aarch64_sve_vec_perm_operand): Likewise.
15548 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
15549 (aarch64_mov_operand): Accept const_poly_int and const_vector.
15550 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
15551 as well as const_vector.
15552 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
15553 in file. Use CONST0_RTX and CONSTM1_RTX.
15554 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
15555 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
15556 Use aarch64_simd_imm_zero.
15557 * config/aarch64/aarch64-sve.md: New file.
15558 * config/aarch64/aarch64.md: Include it.
15559 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
15560 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
15561 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
15562 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
15563 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
15564 (sve): New attribute.
15565 (enabled): Disable instructions with the sve attribute unless
15567 (movqi, movhi): Pass CONST_POLY_INT operaneds through
15568 aarch64_expand_mov_immediate.
15569 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
15570 CNT[BHSD] immediates.
15571 (movti): Split CONST_POLY_INT moves into two halves.
15572 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
15573 Split additions that need a temporary here if the destination
15574 is the stack pointer.
15575 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
15576 (*add<mode>3_poly_1): New instruction.
15577 (set_clobber_cc): New expander.
15579 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15581 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
15582 parameter and use it instead of GET_MODE_SIZE (innermode). Use
15583 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
15584 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
15585 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
15586 Change innermode from fixed_mode_size to machine_mode.
15587 (simplify_subreg): Update call accordingly. Handle a constant-sized
15588 subreg of a variable-length CONST_VECTOR.
15590 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15591 Alan Hayward <alan.hayward@arm.com>
15592 David Sherwood <david.sherwood@arm.com>
15594 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
15595 (add_offset_to_base): New function, split out from...
15596 (create_mem_ref): ...here. When handling a scale other than 1,
15597 check first whether the address is valid without the offset.
15598 Add it into the base if so, leaving the index and scale as-is.
15600 2018-01-12 Jakub Jelinek <jakub@redhat.com>
15603 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
15604 fold_for_warn before checking if arg2 is INTEGER_CST.
15606 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
15608 * config/rs6000/predicates.md (load_multiple_operation): Delete.
15609 (store_multiple_operation): Delete.
15610 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
15611 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
15612 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
15613 guarded by TARGET_STRING.
15614 (rs6000_output_load_multiple): Delete.
15615 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
15616 OPTION_MASK_STRING / TARGET_STRING handling.
15617 (print_operand) <'N', 'O'>: Add comment that these are unused now.
15618 (const rs6000_opt_masks) <"string">: Change mask to 0.
15619 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
15620 (MASK_STRING): Delete.
15621 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
15623 (load_multiple): Delete.
15630 (store_multiple): Delete.
15637 (movmemsi_8reg): Delete.
15638 (corresponding unnamed define_insn): Delete.
15639 (movmemsi_6reg): Delete.
15640 (corresponding unnamed define_insn): Delete.
15641 (movmemsi_4reg): Delete.
15642 (corresponding unnamed define_insn): Delete.
15643 (movmemsi_2reg): Delete.
15644 (corresponding unnamed define_insn): Delete.
15645 (movmemsi_1reg): Delete.
15646 (corresponding unnamed define_insn): Delete.
15647 * config/rs6000/rs6000.opt (mno-string): New.
15648 (mstring): Replace by deprecation warning stub.
15649 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
15651 2018-01-12 Jakub Jelinek <jakub@redhat.com>
15653 * regrename.c (regrename_do_replace): If replacing the same
15654 reg multiple times, try to reuse last created gen_raw_REG.
15657 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
15658 main to workaround a bug in GDB.
15660 2018-01-12 Tom de Vries <tom@codesourcery.com>
15663 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
15665 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
15667 PR rtl-optimization/80481
15668 * ira-color.c (get_cap_member): New function.
15669 (allocnos_conflict_by_live_ranges_p): Use it.
15670 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
15671 (setup_slot_coalesced_allocno_live_ranges): Ditto.
15673 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
15676 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
15677 (*saddl_se_1): Ditto.
15678 (*ssubsi_1): Ditto.
15679 (*ssubl_se_1): Ditto.
15681 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
15683 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
15684 rather than wi::to_widest for DR_INITs.
15685 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
15686 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
15687 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
15689 (vect_analyze_group_access_1): Note that here.
15691 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
15693 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
15694 polynomial type sizes.
15696 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
15698 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
15699 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
15700 (gimple_add_tmp_var): Likewise.
15702 2018-01-12 Martin Liska <mliska@suse.cz>
15704 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
15705 (gimple_alloc_sizes): Likewise.
15706 (dump_gimple_statistics): Use PRIu64 in printf format.
15707 * gimple.h: Change uint64_t to int.
15709 2018-01-12 Martin Liska <mliska@suse.cz>
15711 * tree-core.h: Use uint64_t instead of int.
15712 * tree.c (tree_node_counts): Likewise.
15713 (tree_node_sizes): Likewise.
15714 (dump_tree_statistics): Use PRIu64 in printf format.
15716 2018-01-12 Martin Liska <mliska@suse.cz>
15718 * Makefile.in: As qsort_chk is implemented in vec.c, add
15719 vec.o to linkage of gencfn-macros.
15720 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
15721 passing the info to record_node_allocation_statistics.
15722 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
15724 * ggc-common.c (struct ggc_usage): Add operator== and use
15725 it in operator< and compare function.
15726 * mem-stats.h (struct mem_usage): Likewise.
15727 * vec.c (struct vec_usage): Remove operator< and compare
15728 function. Can be simply inherited.
15730 2018-01-12 Martin Jambor <mjambor@suse.cz>
15733 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
15734 * tree-ssa-math-opts.c: Include domwalk.h.
15735 (convert_mult_to_fma_1): New function.
15736 (fma_transformation_info): New type.
15737 (fma_deferring_state): Likewise.
15738 (cancel_fma_deferring): New function.
15739 (result_of_phi): Likewise.
15740 (last_fma_candidate_feeds_initial_phi): Likewise.
15741 (convert_mult_to_fma): Added deferring logic, split actual
15742 transformation to convert_mult_to_fma_1.
15743 (math_opts_dom_walker): New type.
15744 (math_opts_dom_walker::after_dom_children): New method, body moved
15745 here from pass_optimize_widening_mul::execute, added deferring logic
15747 (pass_optimize_widening_mul::execute): Moved most of code to
15748 math_opts_dom_walker::after_dom_children.
15749 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
15750 * config/i386/i386.c (ix86_option_override_internal): Added
15751 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
15753 2018-01-12 Richard Biener <rguenther@suse.de>
15756 * dwarf2out.c (gen_variable_die): Do not reset old_die for
15757 inline instance vars.
15759 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
15762 * config/rx/rx.c (rx_is_restricted_memory_address):
15763 Handle SUBREG case.
15765 2018-01-12 Richard Biener <rguenther@suse.de>
15767 PR tree-optimization/80846
15768 * target.def (split_reduction): New target hook.
15769 * targhooks.c (default_split_reduction): New function.
15770 * targhooks.h (default_split_reduction): Declare.
15771 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
15772 target requests first reduce vectors by combining low and high
15774 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
15775 (get_vectype_for_scalar_type_and_size): Export.
15776 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
15777 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
15778 * doc/tm.texi: Regenerate.
15779 * config/i386/i386.c (ix86_split_reduction): Implement
15780 TARGET_VECTORIZE_SPLIT_REDUCTION.
15782 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
15785 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
15786 in PIC mode except for TARGET_VXWORKS_RTP.
15787 * config/sparc/sparc.c: Include cfgrtl.h.
15788 (TARGET_INIT_PIC_REG): Define.
15789 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
15790 (sparc_pic_register_p): New predicate.
15791 (sparc_legitimate_address_p): Use it.
15792 (sparc_legitimize_pic_address): Likewise.
15793 (sparc_delegitimize_address): Likewise.
15794 (sparc_mode_dependent_address_p): Likewise.
15795 (gen_load_pcrel_sym): Remove 4th parameter.
15796 (load_got_register): Adjust call to above. Remove obsolete stuff.
15797 (sparc_expand_prologue): Do not call load_got_register here.
15798 (sparc_flat_expand_prologue): Likewise.
15799 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
15800 (sparc_use_pseudo_pic_reg): New function.
15801 (sparc_init_pic_reg): Likewise.
15802 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15803 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
15805 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
15807 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
15808 Add item for branch_cost.
15810 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
15812 PR rtl-optimization/83565
15813 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
15814 not extend the result to a larger mode for rotate operations.
15815 (num_sign_bit_copies1): Likewise.
15817 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15820 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
15822 Use values-Xc.o for -pedantic.
15823 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
15825 2018-01-12 Martin Liska <mliska@suse.cz>
15828 * ipa-devirt.c (final_warning_record::grow_type_warnings):
15830 (possible_polymorphic_call_targets): Use it.
15831 (ipa_devirt): Likewise.
15833 2018-01-12 Martin Liska <mliska@suse.cz>
15835 * profile-count.h (enum profile_quality): Use 0 as invalid
15836 enum value of profile_quality.
15838 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
15840 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
15841 -mext-string options.
15843 2018-01-12 Richard Biener <rguenther@suse.de>
15845 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
15846 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
15847 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
15849 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
15851 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
15853 * configure.ac (--with-long-double-format): Add support for the
15854 configuration option to change the default long double format on
15856 * config.gcc (powerpc*-linux*-*): Likewise.
15857 * configure: Regenerate.
15858 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
15859 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
15860 used without modification.
15862 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15864 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
15865 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
15866 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
15867 MISC_BUILTIN_SPEC_BARRIER.
15868 (rs6000_init_builtins): Likewise.
15869 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
15871 (speculation_barrier): New define_insn.
15872 * doc/extend.texi: Document __builtin_speculation_barrier.
15874 2018-01-11 Jakub Jelinek <jakub@redhat.com>
15877 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
15878 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
15879 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
15881 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
15882 integral modes instead of "ss" and "sd".
15883 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
15884 vectors with 32-bit and 64-bit elements.
15885 (vecdupssescalarmodesuffix): New mode attribute.
15886 (vec_dup<mode>): Use it.
15888 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
15891 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
15892 frame if argument is passed on stack.
15894 2018-01-11 Jakub Jelinek <jakub@redhat.com>
15897 * ree.c (combine_reaching_defs): Optimize also
15898 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
15899 reg2=any_extend(exp); reg1=reg2;, formatting fix.
15901 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
15903 PR middle-end/83189
15904 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
15906 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
15908 PR middle-end/83718
15909 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
15910 after they are computed.
15912 2018-01-11 Bin Cheng <bin.cheng@arm.com>
15914 PR tree-optimization/83695
15915 * gimple-loop-linterchange.cc
15916 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
15917 reset cached scev information after interchange.
15918 (pass_linterchange::execute): Remove call to scev_reset_htab.
15920 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15922 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
15923 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
15924 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
15925 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
15926 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
15927 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
15928 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
15929 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
15930 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
15931 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
15932 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
15933 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
15934 (V_lane_reg): Likewise.
15935 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
15937 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
15938 (vfmal_lane_low<mode>_intrinsic,
15939 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
15940 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
15941 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
15942 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
15943 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
15944 vfmsl_lane_high<mode>_intrinsic): New define_insns.
15946 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15948 * config/arm/arm-cpus.in (fp16fml): New feature.
15949 (ALL_SIMD): Add fp16fml.
15950 (armv8.2-a): Add fp16fml as an option.
15951 (armv8.3-a): Likewise.
15952 (armv8.4-a): Add fp16fml as part of fp16.
15953 * config/arm/arm.h (TARGET_FP16FML): Define.
15954 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
15956 * config/arm/arm-modes.def (V2HF): Define.
15957 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
15958 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
15959 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
15960 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
15961 vfmsl_low, vfmsl_high): New set of builtins.
15962 * config/arm/iterators.md (PLUSMINUS): New code iterator.
15963 (vfml_op): New code attribute.
15964 (VFMLHALVES): New int iterator.
15965 (VFML, VFMLSEL): New mode attributes.
15966 (V_reg): Define mapping for V2HF.
15967 (V_hi, V_lo): New mode attributes.
15968 (VF_constraint): Likewise.
15969 (vfml_half, vfml_half_selector): New int attributes.
15970 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
15972 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
15973 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
15975 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
15976 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
15977 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
15978 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
15980 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
15981 Document new effective target and option set.
15983 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15985 * config/arm/arm-cpus.in (armv8_4): New feature.
15986 (ARMv8_4a): New fgroup.
15987 (armv8.4-a): New arch.
15988 * config/arm/arm-tables.opt: Regenerate.
15989 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
15990 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
15991 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
15992 Add matching rules for -march=armv8.4-a and extensions.
15993 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
15995 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
15998 * config/rx/rx.md (BW): New mode attribute.
15999 (sync_lock_test_and_setsi): Add mode suffix to insn output.
16001 2018-01-11 Richard Biener <rguenther@suse.de>
16003 PR tree-optimization/83435
16004 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
16005 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
16006 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
16008 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16009 Alan Hayward <alan.hayward@arm.com>
16010 David Sherwood <david.sherwood@arm.com>
16012 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
16014 (aarch64_classify_address): Initialize it. Track polynomial offsets.
16015 (aarch64_print_address_internal): Use it to check for a zero offset.
16017 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16018 Alan Hayward <alan.hayward@arm.com>
16019 David Sherwood <david.sherwood@arm.com>
16021 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
16022 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
16023 Return a poly_int64 rather than a HOST_WIDE_INT.
16024 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
16025 rather than a HOST_WIDE_INT.
16026 * config/aarch64/aarch64.h (aarch64_frame): Protect with
16027 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
16028 hard_fp_offset, frame_size, initial_adjust, callee_offset and
16029 final_offset from HOST_WIDE_INT to poly_int64.
16030 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
16031 to_constant when getting the number of units in an Advanced SIMD
16033 (aarch64_builtin_vectorized_function): Check for a constant number
16035 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
16037 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
16038 attribute instead of GET_MODE_NUNITS.
16039 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
16040 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
16041 GET_MODE_SIZE for fixed-size registers.
16042 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
16043 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
16044 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
16045 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
16046 (aarch64_print_operand, aarch64_print_address_internal)
16047 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
16048 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
16049 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
16050 Handle polynomial GET_MODE_SIZE.
16051 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
16052 wider than SImode without modification.
16053 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
16054 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
16055 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
16056 passing and returning SVE modes.
16057 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
16058 rather than GEN_INT.
16059 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
16060 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
16061 (aarch64_allocate_and_probe_stack_space): Likewise.
16062 (aarch64_layout_frame): Cope with polynomial offsets.
16063 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
16064 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
16065 polynomial offsets.
16066 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
16067 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
16068 poly_int64 rather than a HOST_WIDE_INT.
16069 (aarch64_get_separate_components, aarch64_process_components)
16070 (aarch64_expand_prologue, aarch64_expand_epilogue)
16071 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
16072 (aarch64_anchor_offset): New function, split out from...
16073 (aarch64_legitimize_address): ...here.
16074 (aarch64_builtin_vectorization_cost): Handle polynomial
16075 TYPE_VECTOR_SUBPARTS.
16076 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
16078 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
16079 number of elements from the PARALLEL rather than the mode.
16080 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
16081 rather than GET_MODE_BITSIZE.
16082 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
16083 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
16084 (aarch64_expand_vec_perm_const_1): Handle polynomial
16085 d->perm.length () and d->perm elements.
16086 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
16087 Apply to_constant to d->perm elements.
16088 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
16089 polynomial CONST_VECTOR_NUNITS.
16090 (aarch64_move_pointer): Take amount as a poly_int64 rather
16092 (aarch64_progress_pointer): Avoid temporary variable.
16093 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
16094 the mode attribute instead of GET_MODE.
16096 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16097 Alan Hayward <alan.hayward@arm.com>
16098 David Sherwood <david.sherwood@arm.com>
16100 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
16101 x exists before using it.
16102 (aarch64_add_constant_internal): Rename to...
16103 (aarch64_add_offset_1): ...this. Replace regnum with separate
16104 src and dest rtxes. Handle the case in which they're different,
16105 including when the offset is zero. Replace scratchreg with an rtx.
16106 Use 2 additions if there is no spare register into which we can
16107 move a 16-bit constant.
16108 (aarch64_add_constant): Delete.
16109 (aarch64_add_offset): Replace reg with separate src and dest
16110 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
16111 Use aarch64_add_offset_1.
16112 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
16113 an rtx rather than an int. Take the delta as a poly_int64
16114 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
16115 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
16116 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
16117 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
16118 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
16119 and aarch64_add_sp.
16120 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
16121 aarch64_add_constant.
16123 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16125 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
16126 Use scalar_float_mode.
16128 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16130 * config/aarch64/aarch64-simd.md
16131 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
16132 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
16133 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
16134 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
16135 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
16136 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
16137 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
16138 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
16139 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
16140 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
16142 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16145 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
16146 targ_options->x_arm_arch_string is non NULL.
16148 2018-01-11 Tamar Christina <tamar.christina@arm.com>
16150 * config/aarch64/aarch64.h
16151 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
16153 2018-01-11 Sudakshina Das <sudi.das@arm.com>
16156 * expmed.c (emit_store_flag_force): Swap if const op0
16157 and change VOIDmode to mode of op0.
16159 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16161 PR rtl-optimization/83761
16162 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
16163 than bytes to mode_for_size.
16165 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
16167 PR middle-end/83189
16168 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
16169 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
16172 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
16174 PR middle-end/83575
16175 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
16176 when in layout mode.
16177 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
16178 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
16181 2018-01-10 Michael Collison <michael.collison@arm.com>
16183 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
16184 * config/aarch64/aarch64-option-extension.def: Add
16185 AARCH64_OPT_EXTENSION of 'fp16fml'.
16186 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16187 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
16188 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
16189 * config/aarch64/constraints.md (Ui7): New constraint.
16190 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
16191 (VFMLA_SEL_W): Ditto.
16194 (VFMLA16_LOW): New int iterator.
16195 (VFMLA16_HIGH): Ditto.
16196 (UNSPEC_FMLAL): New unspec.
16197 (UNSPEC_FMLSL): Ditto.
16198 (UNSPEC_FMLAL2): Ditto.
16199 (UNSPEC_FMLSL2): Ditto.
16200 (f16mac): New code attribute.
16201 * config/aarch64/aarch64-simd-builtins.def
16202 (aarch64_fmlal_lowv2sf): Ditto.
16203 (aarch64_fmlsl_lowv2sf): Ditto.
16204 (aarch64_fmlalq_lowv4sf): Ditto.
16205 (aarch64_fmlslq_lowv4sf): Ditto.
16206 (aarch64_fmlal_highv2sf): Ditto.
16207 (aarch64_fmlsl_highv2sf): Ditto.
16208 (aarch64_fmlalq_highv4sf): Ditto.
16209 (aarch64_fmlslq_highv4sf): Ditto.
16210 (aarch64_fmlal_lane_lowv2sf): Ditto.
16211 (aarch64_fmlsl_lane_lowv2sf): Ditto.
16212 (aarch64_fmlal_laneq_lowv2sf): Ditto.
16213 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
16214 (aarch64_fmlalq_lane_lowv4sf): Ditto.
16215 (aarch64_fmlsl_lane_lowv4sf): Ditto.
16216 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
16217 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
16218 (aarch64_fmlal_lane_highv2sf): Ditto.
16219 (aarch64_fmlsl_lane_highv2sf): Ditto.
16220 (aarch64_fmlal_laneq_highv2sf): Ditto.
16221 (aarch64_fmlsl_laneq_highv2sf): Ditto.
16222 (aarch64_fmlalq_lane_highv4sf): Ditto.
16223 (aarch64_fmlsl_lane_highv4sf): Ditto.
16224 (aarch64_fmlalq_laneq_highv4sf): Ditto.
16225 (aarch64_fmlsl_laneq_highv4sf): Ditto.
16226 * config/aarch64/aarch64-simd.md:
16227 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
16228 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
16229 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
16230 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
16231 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
16232 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
16233 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
16234 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
16235 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
16236 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
16237 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
16238 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
16239 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
16240 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
16241 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
16242 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
16243 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
16244 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
16245 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
16246 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
16247 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
16248 (vfmlsl_low_u32): Ditto.
16249 (vfmlalq_low_u32): Ditto.
16250 (vfmlslq_low_u32): Ditto.
16251 (vfmlal_high_u32): Ditto.
16252 (vfmlsl_high_u32): Ditto.
16253 (vfmlalq_high_u32): Ditto.
16254 (vfmlslq_high_u32): Ditto.
16255 (vfmlal_lane_low_u32): Ditto.
16256 (vfmlsl_lane_low_u32): Ditto.
16257 (vfmlal_laneq_low_u32): Ditto.
16258 (vfmlsl_laneq_low_u32): Ditto.
16259 (vfmlalq_lane_low_u32): Ditto.
16260 (vfmlslq_lane_low_u32): Ditto.
16261 (vfmlalq_laneq_low_u32): Ditto.
16262 (vfmlslq_laneq_low_u32): Ditto.
16263 (vfmlal_lane_high_u32): Ditto.
16264 (vfmlsl_lane_high_u32): Ditto.
16265 (vfmlal_laneq_high_u32): Ditto.
16266 (vfmlsl_laneq_high_u32): Ditto.
16267 (vfmlalq_lane_high_u32): Ditto.
16268 (vfmlslq_lane_high_u32): Ditto.
16269 (vfmlalq_laneq_high_u32): Ditto.
16270 (vfmlslq_laneq_high_u32): Ditto.
16271 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
16272 (AARCH64_FL_FOR_ARCH8_4): New.
16273 (AARCH64_ISA_F16FML): New ISA flag.
16274 (TARGET_F16FML): New feature flag for fp16fml.
16275 (doc/invoke.texi): Document new fp16fml option.
16277 2018-01-10 Michael Collison <michael.collison@arm.com>
16279 * config/aarch64/aarch64-builtins.c:
16280 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
16281 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16282 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
16283 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
16284 (AARCH64_ISA_SHA3): New ISA flag.
16285 (TARGET_SHA3): New feature flag for sha3.
16286 * config/aarch64/iterators.md (sha512_op): New int attribute.
16287 (CRYPTO_SHA512): New int iterator.
16288 (UNSPEC_SHA512H): New unspec.
16289 (UNSPEC_SHA512H2): Ditto.
16290 (UNSPEC_SHA512SU0): Ditto.
16291 (UNSPEC_SHA512SU1): Ditto.
16292 * config/aarch64/aarch64-simd-builtins.def
16293 (aarch64_crypto_sha512hqv2di): New builtin.
16294 (aarch64_crypto_sha512h2qv2di): Ditto.
16295 (aarch64_crypto_sha512su0qv2di): Ditto.
16296 (aarch64_crypto_sha512su1qv2di): Ditto.
16297 (aarch64_eor3qv8hi): Ditto.
16298 (aarch64_rax1qv2di): Ditto.
16299 (aarch64_xarqv2di): Ditto.
16300 (aarch64_bcaxqv8hi): Ditto.
16301 * config/aarch64/aarch64-simd.md:
16302 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
16303 (aarch64_crypto_sha512su0qv2di): Ditto.
16304 (aarch64_crypto_sha512su1qv2di): Ditto.
16305 (aarch64_eor3qv8hi): Ditto.
16306 (aarch64_rax1qv2di): Ditto.
16307 (aarch64_xarqv2di): Ditto.
16308 (aarch64_bcaxqv8hi): Ditto.
16309 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
16310 (vsha512h2q_u64): Ditto.
16311 (vsha512su0q_u64): Ditto.
16312 (vsha512su1q_u64): Ditto.
16313 (veor3q_u16): Ditto.
16314 (vrax1q_u64): Ditto.
16315 (vxarq_u64): Ditto.
16316 (vbcaxq_u16): Ditto.
16317 * config/arm/types.md (crypto_sha512): New type attribute.
16318 (crypto_sha3): Ditto.
16319 (doc/invoke.texi): Document new sha3 option.
16321 2018-01-10 Michael Collison <michael.collison@arm.com>
16323 * config/aarch64/aarch64-builtins.c:
16324 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
16325 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16326 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
16327 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
16328 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
16329 (AARCH64_ISA_SM4): New ISA flag.
16330 (TARGET_SM4): New feature flag for sm4.
16331 * config/aarch64/aarch64-simd-builtins.def
16332 (aarch64_sm3ss1qv4si): Ditto.
16333 (aarch64_sm3tt1aq4si): Ditto.
16334 (aarch64_sm3tt1bq4si): Ditto.
16335 (aarch64_sm3tt2aq4si): Ditto.
16336 (aarch64_sm3tt2bq4si): Ditto.
16337 (aarch64_sm3partw1qv4si): Ditto.
16338 (aarch64_sm3partw2qv4si): Ditto.
16339 (aarch64_sm4eqv4si): Ditto.
16340 (aarch64_sm4ekeyqv4si): Ditto.
16341 * config/aarch64/aarch64-simd.md:
16342 (aarch64_sm3ss1qv4si): Ditto.
16343 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
16344 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
16345 (aarch64_sm4eqv4si): Ditto.
16346 (aarch64_sm4ekeyqv4si): Ditto.
16347 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
16348 (sm3part_op): Ditto.
16349 (CRYPTO_SM3TT): Ditto.
16350 (CRYPTO_SM3PART): Ditto.
16351 (UNSPEC_SM3SS1): New unspec.
16352 (UNSPEC_SM3TT1A): Ditto.
16353 (UNSPEC_SM3TT1B): Ditto.
16354 (UNSPEC_SM3TT2A): Ditto.
16355 (UNSPEC_SM3TT2B): Ditto.
16356 (UNSPEC_SM3PARTW1): Ditto.
16357 (UNSPEC_SM3PARTW2): Ditto.
16358 (UNSPEC_SM4E): Ditto.
16359 (UNSPEC_SM4EKEY): Ditto.
16360 * config/aarch64/constraints.md (Ui2): New constraint.
16361 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
16362 * config/arm/types.md (crypto_sm3): New type attribute.
16363 (crypto_sm4): Ditto.
16364 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
16365 (vsm3tt1aq_u32): Ditto.
16366 (vsm3tt1bq_u32): Ditto.
16367 (vsm3tt2aq_u32): Ditto.
16368 (vsm3tt2bq_u32): Ditto.
16369 (vsm3partw1q_u32): Ditto.
16370 (vsm3partw2q_u32): Ditto.
16371 (vsm4eq_u32): Ditto.
16372 (vsm4ekeyq_u32): Ditto.
16373 (doc/invoke.texi): Document new sm4 option.
16375 2018-01-10 Michael Collison <michael.collison@arm.com>
16377 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
16378 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
16379 (AARCH64_FL_FOR_ARCH8_4): New.
16380 (AARCH64_FL_V8_4): New flag.
16381 (doc/invoke.texi): Document new armv8.4-a option.
16383 2018-01-10 Michael Collison <michael.collison@arm.com>
16385 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16386 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
16387 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
16388 * config/aarch64/aarch64-option-extension.def: Add
16389 AARCH64_OPT_EXTENSION of 'sha2'.
16390 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
16391 (crypto): Disable sha2 and aes if crypto disabled.
16392 (crypto): Enable aes and sha2 if enabled.
16393 (simd): Disable sha2 and aes if simd disabled.
16394 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
16396 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
16397 (TARGET_SHA2): New feature flag for sha2.
16398 (TARGET_AES): New feature flag for aes.
16399 * config/aarch64/aarch64-simd.md:
16400 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
16401 conditional on TARGET_AES.
16402 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
16403 (aarch64_crypto_sha1hsi): Make pattern conditional
16405 (aarch64_crypto_sha1hv4si): Ditto.
16406 (aarch64_be_crypto_sha1hv4si): Ditto.
16407 (aarch64_crypto_sha1su1v4si): Ditto.
16408 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
16409 (aarch64_crypto_sha1su0v4si): Ditto.
16410 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
16411 (aarch64_crypto_sha256su0v4si): Ditto.
16412 (aarch64_crypto_sha256su1v4si): Ditto.
16413 (doc/invoke.texi): Document new aes and sha2 options.
16415 2018-01-10 Martin Sebor <msebor@redhat.com>
16417 PR tree-optimization/83781
16418 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
16421 2018-01-11 Martin Sebor <msebor@gmail.com>
16422 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16424 PR tree-optimization/83501
16425 PR tree-optimization/81703
16427 * tree-ssa-strlen.c (get_string_cst): Rename...
16428 (get_string_len): ...to this. Handle global constants.
16429 (handle_char_store): Adjust.
16431 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
16432 Jim Wilson <jimw@sifive.com>
16434 * config/riscv/riscv-protos.h (riscv_output_return): New.
16435 * config/riscv/riscv.c (struct machine_function): New naked_p field.
16436 (riscv_attribute_table, riscv_output_return),
16437 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
16438 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
16439 (riscv_compute_frame_info): Only compute frame->mask if not a naked
16441 (riscv_expand_prologue): Add early return for naked function.
16442 (riscv_expand_epilogue): Likewise.
16443 (riscv_function_ok_for_sibcall): Return false for naked function.
16444 (riscv_set_current_function): New.
16445 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
16446 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
16447 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
16448 * doc/extend.texi (RISC-V Function Attributes): New.
16450 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
16452 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
16453 check for 128-bit long double before checking TCmode.
16454 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
16455 128-bit long doubles before checking TFmode or TCmode.
16456 (FLOAT128_IBM_P): Likewise.
16458 2018-01-10 Martin Sebor <msebor@redhat.com>
16460 PR tree-optimization/83671
16461 * builtins.c (c_strlen): Unconditionally return zero for the empty
16463 Use -Warray-bounds for warnings.
16464 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
16465 for non-constant array indices with COMPONENT_REF, arrays of
16466 arrays, and pointers to arrays.
16467 (gimple_fold_builtin_strlen): Determine and set length range for
16468 non-constant character arrays.
16470 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
16472 PR middle-end/81897
16473 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
16476 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
16478 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
16480 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
16483 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
16484 VECTOR_MEM_ALTIVEC_OR_VSX_P.
16485 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
16486 indexed_or_indirect_operand predicate.
16487 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
16488 (*vsx_le_perm_load_v8hi): Likewise.
16489 (*vsx_le_perm_load_v16qi): Likewise.
16490 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
16491 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
16492 (*vsx_le_perm_store_v8hi): Likewise.
16493 (*vsx_le_perm_store_v16qi): Likewise.
16494 (eight unnamed splitters): Likewise.
16496 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
16498 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
16499 * config/rs6000/emmintrin.h: Likewise.
16500 * config/rs6000/mmintrin.h: Likewise.
16501 * config/rs6000/xmmintrin.h: Likewise.
16503 2018-01-10 David Malcolm <dmalcolm@redhat.com>
16506 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
16508 * tree.c (tree_nop_conversion): Return true for location wrapper
16510 (maybe_wrap_with_location): New function.
16511 (selftest::check_strip_nops): New function.
16512 (selftest::test_location_wrappers): New function.
16513 (selftest::tree_c_tests): Call it.
16514 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
16515 (maybe_wrap_with_location): New decl.
16516 (EXPR_LOCATION_WRAPPER_P): New macro.
16517 (location_wrapper_p): New inline function.
16518 (tree_strip_any_location_wrapper): New inline function.
16520 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
16523 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
16524 stack_realign_offset for the largest alignment of stack slot
16526 (ix86_find_max_used_stack_alignment): New function.
16527 (ix86_finalize_stack_frame_flags): Use it. Set
16528 max_used_stack_alignment if we don't realign stack.
16529 * config/i386/i386.h (machine_function): Add
16530 max_used_stack_alignment.
16532 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
16534 * config/arm/arm.opt (-mbranch-cost): New option.
16535 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
16538 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
16541 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
16542 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
16544 2018-01-10 Richard Biener <rguenther@suse.de>
16547 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
16548 early out so it also covers the case where we have a non-NULL
16551 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
16553 PR tree-optimization/83753
16554 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
16555 for non-strided grouped accesses if the number of elements is 1.
16557 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
16560 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
16561 * i386.h (TARGET_USE_GATHER): Define.
16562 * x86-tune.def (X86_TUNE_USE_GATHER): New.
16564 2018-01-10 Martin Liska <mliska@suse.cz>
16567 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
16568 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
16570 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
16571 CLEANUP_NO_PARTITIONING is not set.
16573 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
16575 * doc/rtl.texi: Remove documentation of (const ...) wrappers
16576 for vectors, as a partial revert of r254296.
16577 * rtl.h (const_vec_p): Delete.
16578 (const_vec_duplicate_p): Don't test for vector CONSTs.
16579 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
16580 * expmed.c (make_tree): Likewise.
16583 * common.md (E, F): Use CONSTANT_P instead of checking for
16585 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
16586 checking for CONST_VECTOR.
16588 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
16590 PR middle-end/83575
16591 * predict.c (force_edge_cold): Handle in more sane way edges
16592 with no prediction.
16594 2018-01-09 Carl Love <cel@us.ibm.com>
16596 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
16598 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
16599 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
16600 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
16601 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
16602 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
16603 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
16604 * config/rs6000/rs6000-protos.h: Add extern defition for
16605 rs6000_generate_float2_double_code.
16606 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
16608 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
16609 (float2_v2df): Add define_expand.
16611 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
16614 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
16615 op_mode in the force_to_mode call.
16617 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
16619 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
16620 instead of checking each element individually.
16621 (aarch64_evpc_uzp): Likewise.
16622 (aarch64_evpc_zip): Likewise.
16623 (aarch64_evpc_ext): Likewise.
16624 (aarch64_evpc_rev): Likewise.
16625 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
16626 instead of checking each element individually. Return true without
16628 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
16629 whether all selected elements come from the same input, instead of
16630 checking each element individually. Remove calls to gen_rtx_REG,
16631 start_sequence and end_sequence and instead assert that no rtl is
16634 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
16636 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
16637 order of HIGH and CONST checks.
16639 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
16641 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
16642 if the destination isn't an SSA_NAME.
16644 2018-01-09 Richard Biener <rguenther@suse.de>
16646 PR tree-optimization/83668
16647 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
16649 (canonicalize_loop_form): ... here, renamed from ...
16650 (canonicalize_loop_closed_ssa_form): ... this and amended to
16651 swap successor edges for loop exit blocks to make us use
16652 the RPO order we need for initial schedule generation.
16654 2018-01-09 Joseph Myers <joseph@codesourcery.com>
16656 PR tree-optimization/64811
16657 * match.pd: When optimizing comparisons with Inf, avoid
16658 introducing or losing exceptions from comparisons with NaN.
16660 2018-01-09 Martin Liska <mliska@suse.cz>
16663 * asan.c (shadow_mem_size): Add gcc_assert.
16665 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
16667 Don't save registers in main().
16670 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
16671 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
16672 * config/avr/avr.c (avr_set_current_function): Don't error if
16673 naked, OS_task or OS_main are specified at the same time.
16674 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
16676 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
16678 * common/config/avr/avr-common.c (avr_option_optimization_table):
16679 Switch on -mmain-is-OS_task for optimizing compilations.
16681 2018-01-09 Richard Biener <rguenther@suse.de>
16683 PR tree-optimization/83572
16684 * graphite.c: Include cfganal.h.
16685 (graphite_transform_loops): Connect infinite loops to exit
16686 and remove fake edges at the end.
16688 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
16690 * ipa-inline.c (edge_badness): Revert accidental checkin.
16692 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
16695 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
16696 symbols; not inline clones.
16698 2018-01-09 Jakub Jelinek <jakub@redhat.com>
16701 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
16702 hard registers. Formatting fixes.
16704 PR preprocessor/83722
16705 * gcc.c (try_generate_repro): Pass
16706 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
16707 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
16710 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
16711 Kito Cheng <kito.cheng@gmail.com>
16713 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
16714 (riscv_leaf_function_p): Delete.
16715 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
16717 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16719 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
16721 (do_ifelse): New function.
16722 (do_isel): New function.
16723 (do_sub3): New function.
16724 (do_add3): New function.
16725 (do_load_mask_compare): New function.
16726 (do_overlap_load_compare): New function.
16727 (expand_compare_loop): New function.
16728 (expand_block_compare): Call expand_compare_loop() when appropriate.
16729 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
16730 option description.
16731 (-mblock-compare-inline-loop-limit): New option.
16733 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16736 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
16737 Reverse order of second and third operands in first alternative.
16738 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
16739 of first and second elements in UNSPEC_VPERMR vector.
16740 (altivec_expand_vec_perm_le): Likewise.
16742 2018-01-08 Jeff Law <law@redhat.com>
16744 PR rtl-optimizatin/81308
16745 * tree-switch-conversion.c (cfg_altered): New file scoped static.
16746 (process_switch): If group_case_labels makes a change, then set
16748 (pass_convert_switch::execute): If a switch is converted, then
16749 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
16751 PR rtl-optimization/81308
16752 * recog.c (split_all_insns): Conditionally cleanup the CFG after
16755 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
16757 PR target/83663 - Revert r255946
16758 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
16759 generation for cases where splatting a value is not useful.
16760 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
16761 across a vec_duplicate and a paradoxical subreg forming a vector
16762 mode to a vec_concat.
16764 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16766 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
16767 -march=armv8.3-a variants.
16768 * config/arm/t-multilib: Likewise.
16769 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
16771 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16773 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
16775 (cceq_ior_compare_complement): Give it a name so I can use it, and
16776 change boolean_or_operator predicate to boolean_operator so it can
16777 be used to generate a crand.
16778 (eqne): New code iterator.
16779 (bd/bd_neg): New code_attrs.
16780 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
16781 a single define_insn.
16782 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
16783 decrement (bdnzt/bdnzf/bdzt/bdzf).
16784 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
16785 with the new names of the branch decrement patterns, and added the
16786 names of the branch decrement conditional patterns.
16788 2018-01-08 Richard Biener <rguenther@suse.de>
16790 PR tree-optimization/83563
16791 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
16794 2018-01-08 Richard Biener <rguenther@suse.de>
16796 PR middle-end/83713
16797 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
16799 2018-01-08 Richard Biener <rguenther@suse.de>
16801 PR tree-optimization/83685
16802 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
16803 references to abnormals.
16805 2018-01-08 Richard Biener <rguenther@suse.de>
16808 * dwarf2out.c (output_indirect_strings): Handle empty
16809 skeleton_debug_str_hash.
16810 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
16812 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
16814 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
16815 (emit_store_direct): Likewise.
16816 (arc_trampoline_adjust_address): Likewise.
16817 (arc_asm_trampoline_template): New function.
16818 (arc_initialize_trampoline): Use asm_trampoline_template.
16819 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
16820 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
16821 * config/arc/arc.md (flush_icache): Delete pattern.
16823 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
16825 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
16826 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
16829 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
16832 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
16833 by not USED_FOR_TARGET.
16834 (make_pass_resolve_sw_modes): Likewise.
16836 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
16838 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
16841 2018-01-08 Richard Biener <rguenther@suse.de>
16843 PR middle-end/83580
16844 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
16846 2018-01-08 Richard Biener <rguenther@suse.de>
16848 PR middle-end/83517
16849 * match.pd ((t * 2) / 2) -> t): Add missing :c.
16851 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
16853 PR middle-end/81897
16854 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
16855 basic blocks with a small number of successors.
16856 (convert_control_dep_chain_into_preds): Improve handling of
16858 (dump_predicates): Split apart into...
16859 (dump_pred_chain): ...here...
16860 (dump_pred_info): ...and here.
16861 (can_one_predicate_be_invalidated_p): Add debugging printfs.
16862 (can_chain_union_be_invalidated_p): Improve check for invalidation
16864 (uninit_uses_cannot_happen): Avoid unnecessary if
16865 convert_control_dep_chain_into_preds yielded nothing.
16867 2018-01-06 Martin Sebor <msebor@redhat.com>
16869 PR tree-optimization/83640
16870 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
16871 subtracting negative offset from size.
16872 (builtin_access::overlap): Adjust offset bounds of the access to fall
16873 within the size of the object if possible.
16875 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
16877 PR rtl-optimization/83699
16878 * expmed.c (extract_bit_field_1): Restrict the vector usage of
16879 extract_bit_field_as_subreg to cases in which the extracted
16880 value is also a vector.
16882 * lra-constraints.c (process_alt_operands): Test for the equivalence
16883 substitutions when detecting a possible reload cycle.
16885 2018-01-06 Jakub Jelinek <jakub@redhat.com>
16888 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
16889 by default if flag_selective_schedling{,2}. Formatting fixes.
16891 PR rtl-optimization/83682
16892 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
16893 if it has non-VECTOR_MODE element mode.
16894 (vec_duplicate_p): Likewise.
16896 PR middle-end/83694
16897 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
16898 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
16900 2018-01-05 Jakub Jelinek <jakub@redhat.com>
16903 * config/i386/i386-builtin.def
16904 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
16905 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
16906 Require also OPTION_MASK_ISA_AVX512F in addition to
16907 OPTION_MASK_ISA_GFNI.
16908 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
16909 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
16910 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
16911 to OPTION_MASK_ISA_GFNI.
16912 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
16913 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
16914 OPTION_MASK_ISA_AVX512BW.
16915 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
16916 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
16917 addition to OPTION_MASK_ISA_GFNI.
16918 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
16919 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
16920 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
16921 to OPTION_MASK_ISA_GFNI.
16922 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
16923 a requirement for all ISAs rather than any of them with a few
16925 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
16927 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
16928 bitmasks to be enabled with 3 exceptions, instead of requiring any
16929 enabled ISA with lots of exceptions.
16930 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
16931 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
16932 Change avx512bw in isa attribute to avx512f.
16933 * config/i386/sgxintrin.h: Add license boilerplate.
16934 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
16935 to __AVX512F__ and __AVX512VL to __AVX512VL__.
16936 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
16937 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
16939 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
16940 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
16941 temporarily sse2 rather than sse if not enabled already.
16944 * config/i386/sse.md (VI248_VLBW): Rename to ...
16945 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
16946 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
16947 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
16948 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
16949 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
16950 mode iterator instead of VI248_VLBW.
16952 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
16954 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
16955 (record_modified): Skip clobbers; add debug output.
16956 (param_change_prob): Use sreal frequencies.
16958 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
16960 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
16961 punt for user-aligned variables.
16963 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
16965 * tree-chrec.c (chrec_contains_symbols): Return true for
16968 2018-01-05 Sudakshina Das <sudi.das@arm.com>
16971 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
16972 of (x|y) == x for BICS pattern.
16974 2018-01-05 Jakub Jelinek <jakub@redhat.com>
16976 PR tree-optimization/83605
16977 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
16978 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
16981 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
16983 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
16984 * config/epiphany/rtems.h: New file.
16986 2018-01-04 Jakub Jelinek <jakub@redhat.com>
16987 Uros Bizjak <ubizjak@gmail.com>
16990 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
16991 QIreg_operand instead of register_operand predicate.
16992 * config/i386/i386.c (ix86_rop_should_change_byte_p,
16993 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
16994 comments instead of -fmitigate[-_]rop.
16996 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16999 * cgraphunit.c (symbol_table::compile): Switch to text_section
17000 before calling assembly_start debug hook.
17001 * run-rtl-passes.c (run_rtl_passes): Likewise.
17004 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17006 * tree-vrp.c (extract_range_from_binary_expr_1): Check
17007 range_int_cst_p rather than !symbolic_range_p before calling
17008 extract_range_from_multiplicative_op_1.
17010 2018-01-04 Jeff Law <law@redhat.com>
17012 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
17013 redundant test in assertion.
17015 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17017 * doc/rtl.texi: Document machine_mode wrapper classes.
17019 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17021 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
17022 using tree_to_uhwi.
17024 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17026 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
17027 the VEC_PERM_EXPR fold to fail.
17029 2018-01-04 Jakub Jelinek <jakub@redhat.com>
17032 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
17033 to switched_sections.
17035 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17038 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
17039 test for d.testing.
17041 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
17044 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
17045 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
17047 2018-01-04 Jakub Jelinek <jakub@redhat.com>
17050 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
17051 is BLKmode and bitpos not zero or mode change is needed.
17053 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17056 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
17059 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
17062 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
17063 instead of MULT rtx. Update all corresponding splitters.
17064 (*saddl_se): Ditto.
17065 (*ssub<modesuffix>): Ditto.
17066 (*ssubl_se): Ditto.
17067 (*cmp_sadd_di): Update split patterns.
17068 (*cmp_sadd_si): Ditto.
17069 (*cmp_sadd_sidi): Ditto.
17070 (*cmp_ssub_di): Ditto.
17071 (*cmp_ssub_si): Ditto.
17072 (*cmp_ssub_sidi): Ditto.
17073 * config/alpha/predicates.md (const23_operand): New predicate.
17074 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
17075 Look for ASHIFT, not MULT inner operand.
17076 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
17078 2018-01-04 Martin Liska <mliska@suse.cz>
17080 PR gcov-profile/83669
17081 * gcov.c (output_intermediate_file): Add version to intermediate
17083 * doc/gcov.texi: Document new field 'version' in intermediate
17084 file format. Fix location of '-k' option of gcov command.
17086 2018-01-04 Martin Liska <mliska@suse.cz>
17089 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
17091 2018-01-04 Jakub Jelinek <jakub@redhat.com>
17093 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
17095 2018-01-03 Martin Sebor <msebor@redhat.com>
17097 PR tree-optimization/83655
17098 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
17099 checking calls with invalid arguments.
17101 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17103 * tree-vect-stmts.c (vect_get_store_rhs): New function.
17104 (vectorizable_mask_load_store): Delete.
17105 (vectorizable_call): Return false for masked loads and stores.
17106 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
17107 instead of gimple_assign_rhs1.
17108 (vectorizable_load): Handle IFN_MASK_LOAD.
17109 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
17111 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17113 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
17115 (vectorizable_mask_load_store): ...here.
17116 (vectorizable_load): ...and here.
17118 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17120 * tree-vect-stmts.c (vect_build_all_ones_mask)
17121 (vect_build_zero_merge_argument): New functions, split out from...
17122 (vectorizable_load): ...here.
17124 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17126 * tree-vect-stmts.c (vect_check_store_rhs): New function,
17128 (vectorizable_mask_load_store): ...here.
17129 (vectorizable_store): ...and here.
17131 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17133 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
17135 (vectorizable_mask_load_store): ...here.
17137 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17139 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
17140 (vect_model_store_cost): Take a vec_load_store_type instead of a
17142 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
17143 (vect_model_store_cost): Take a vec_load_store_type instead of a
17145 (vectorizable_mask_load_store): Update accordingly.
17146 (vectorizable_store): Likewise.
17147 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
17149 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17151 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
17152 IFN_MASK_LOAD calls here rather than...
17153 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
17155 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17156 Alan Hayward <alan.hayward@arm.com>
17157 David Sherwood <david.sherwood@arm.com>
17159 * expmed.c (extract_bit_field_1): For vector extracts,
17160 fall back to extract_bit_field_as_subreg if vec_extract
17163 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17164 Alan Hayward <alan.hayward@arm.com>
17165 David Sherwood <david.sherwood@arm.com>
17167 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
17168 they are variable or constant sized.
17169 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
17170 slots for constant-sized data.
17172 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17173 Alan Hayward <alan.hayward@arm.com>
17174 David Sherwood <david.sherwood@arm.com>
17176 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
17177 handling COND_EXPRs with boolean comparisons, try to find a better
17178 basis for the mask type than the boolean itself.
17180 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17182 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
17183 is calculated and how it can be overridden.
17184 * genmodes.c (max_bitsize_mode_any_mode): New variable.
17185 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
17187 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
17190 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17191 Alan Hayward <alan.hayward@arm.com>
17192 David Sherwood <david.sherwood@arm.com>
17194 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
17195 Remove the mode argument.
17196 (aarch64_simd_valid_immediate): Remove the mode and inverse
17198 * config/aarch64/iterators.md (bitsize): New iterator.
17199 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
17200 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
17201 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
17202 aarch64_simd_valid_immediate.
17203 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
17204 (aarch64_reg_or_bic_imm): Likewise.
17205 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
17206 with an insn_type enum and msl with a modifier_type enum.
17207 Replace element_width with a scalar_mode. Change the shift
17208 to unsigned int. Add constructors for scalar_float_mode and
17209 scalar_int_mode elements.
17210 (aarch64_vect_float_const_representable_p): Delete.
17211 (aarch64_can_const_movi_rtx_p)
17212 (aarch64_simd_scalar_immediate_valid_for_move)
17213 (aarch64_simd_make_constant): Update call to
17214 aarch64_simd_valid_immediate.
17215 (aarch64_advsimd_valid_immediate_hs): New function.
17216 (aarch64_advsimd_valid_immediate): Likewise.
17217 (aarch64_simd_valid_immediate): Remove mode and inverse
17218 arguments. Rewrite to use the above. Use const_vec_duplicate_p
17219 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
17220 and aarch64_float_const_representable_p on the result.
17221 (aarch64_output_simd_mov_immediate): Remove mode argument.
17222 Update call to aarch64_simd_valid_immediate and use of
17223 simd_immediate_info.
17224 (aarch64_output_scalar_simd_mov_immediate): Update call
17227 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17228 Alan Hayward <alan.hayward@arm.com>
17229 David Sherwood <david.sherwood@arm.com>
17231 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
17232 (mode_nunits): Likewise CONST_MODE_NUNITS.
17233 * machmode.def (ADJUST_NUNITS): Document.
17234 * genmodes.c (mode_data::need_nunits_adj): New field.
17235 (blank_mode): Update accordingly.
17236 (adj_nunits): New variable.
17237 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
17239 (emit_mode_size_inline): Set need_bytesize_adj for all modes
17240 listed in adj_nunits.
17241 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
17242 listed in adj_nunits. Don't emit case statements for such modes.
17243 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
17244 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
17245 nothing if adj_nunits is nonnull.
17246 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
17247 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
17248 (emit_mode_fbit): Update use of print_maybe_const_decl.
17249 (emit_move_size): Likewise. Treat the array as non-const
17251 (emit_mode_adjustments): Handle adj_nunits.
17253 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17255 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
17256 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
17257 (VECTOR_MODES): Use it.
17258 (make_vector_modes): Take the prefix as an argument.
17260 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17261 Alan Hayward <alan.hayward@arm.com>
17262 David Sherwood <david.sherwood@arm.com>
17264 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
17265 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
17266 for MODE_VECTOR_BOOL.
17267 * machmode.def (VECTOR_BOOL_MODE): Document.
17268 * genmodes.c (VECTOR_BOOL_MODE): New macro.
17269 (make_vector_bool_mode): New function.
17270 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
17272 * lto-streamer-in.c (lto_input_mode_table): Likewise.
17273 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
17275 * stor-layout.c (int_mode_for_mode): Likewise.
17276 * tree.c (build_vector_type_for_mode): Likewise.
17277 * varasm.c (output_constant_pool_2): Likewise.
17278 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
17279 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
17280 for MODE_VECTOR_BOOL.
17281 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
17282 of mode class checks.
17283 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
17284 instead of a list of mode class checks.
17285 (expand_vector_scalar_condition): Likewise.
17286 (type_for_widest_vector_mode): Handle BImode as an inner mode.
17288 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17289 Alan Hayward <alan.hayward@arm.com>
17290 David Sherwood <david.sherwood@arm.com>
17292 * machmode.h (mode_size): Change from unsigned short to
17294 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
17295 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
17296 or if measurement_type is not polynomial.
17297 (fixed_size_mode::includes_p): Check for constant-sized modes.
17298 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
17299 return a poly_uint16 rather than an unsigned short.
17300 (emit_mode_size): Change the type of mode_size from unsigned short
17301 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
17302 (emit_mode_adjustments): Cope with polynomial vector sizes.
17303 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17305 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17307 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
17308 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
17309 * caller-save.c (setup_save_areas): Likewise.
17310 (replace_reg_with_saved_mem): Likewise.
17311 * calls.c (emit_library_call_value_1): Likewise.
17312 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
17313 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
17314 (gen_lowpart_for_combine): Likewise.
17315 * convert.c (convert_to_integer_1): Likewise.
17316 * cse.c (equiv_constant, cse_insn): Likewise.
17317 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
17318 (cselib_subst_to_values): Likewise.
17319 * dce.c (word_dce_process_block): Likewise.
17320 * df-problems.c (df_word_lr_mark_ref): Likewise.
17321 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
17322 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
17323 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
17324 (rtl_for_decl_location): Likewise.
17325 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
17326 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
17327 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
17328 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
17329 (expand_expr_real_1): Likewise.
17330 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
17331 (pad_below): Likewise.
17332 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
17333 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
17334 * ira.c (get_subreg_tracking_sizes): Likewise.
17335 * ira-build.c (ira_create_allocno_objects): Likewise.
17336 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
17337 (ira_sort_regnos_for_alter_reg): Likewise.
17338 * ira-costs.c (record_operand_costs): Likewise.
17339 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
17340 (resolve_simple_move): Likewise.
17341 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
17342 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
17343 (lra_constraints): Likewise.
17344 (CONST_POOL_OK_P): Reject variable-sized modes.
17345 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
17346 (add_pseudo_to_slot, lra_spill): Likewise.
17347 * omp-low.c (omp_clause_aligned_alignment): Likewise.
17348 * optabs-query.c (get_best_extraction_insn): Likewise.
17349 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
17350 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
17351 (expand_mult_highpart, valid_multiword_target_p): Likewise.
17352 * recog.c (offsettable_address_addr_space_p): Likewise.
17353 * regcprop.c (maybe_mode_change): Likewise.
17354 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
17355 * regrename.c (build_def_use): Likewise.
17356 * regstat.c (dump_reg_info): Likewise.
17357 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
17358 (find_reloads, find_reloads_subreg_address): Likewise.
17359 * reload1.c (eliminate_regs_1): Likewise.
17360 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
17361 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
17362 (simplify_binary_operation_1, simplify_subreg): Likewise.
17363 * targhooks.c (default_function_arg_padding): Likewise.
17364 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
17365 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
17366 (verify_gimple_assign_ternary): Likewise.
17367 * tree-inline.c (estimate_move_cost): Likewise.
17368 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17369 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
17370 (get_address_cost_ainc): Likewise.
17371 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
17372 (vect_supportable_dr_alignment): Likewise.
17373 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17374 (vectorizable_reduction): Likewise.
17375 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
17376 (vectorizable_operation, vectorizable_load): Likewise.
17377 * tree.c (build_same_sized_truth_vector_type): Likewise.
17378 * valtrack.c (cleanup_auto_inc_dec): Likewise.
17379 * var-tracking.c (emit_note_insn_var_location): Likewise.
17380 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
17381 (ADDR_VEC_ALIGN): Likewise.
17383 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17384 Alan Hayward <alan.hayward@arm.com>
17385 David Sherwood <david.sherwood@arm.com>
17387 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
17389 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
17390 or if measurement_type is polynomial.
17391 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
17392 * combine.c (make_extraction): Likewise.
17393 * dse.c (find_shift_sequence): Likewise.
17394 * dwarf2out.c (mem_loc_descriptor): Likewise.
17395 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
17396 (extract_bit_field, extract_low_bits): Likewise.
17397 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
17398 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
17399 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
17400 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
17401 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
17402 * reload.c (find_reloads): Likewise.
17403 * reload1.c (alter_reg): Likewise.
17404 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
17405 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
17406 * tree-if-conv.c (predicate_mem_writes): Likewise.
17407 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
17408 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
17409 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
17410 * valtrack.c (dead_debug_insert_temp): Likewise.
17411 * varasm.c (mergeable_constant_section): Likewise.
17412 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
17414 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17415 Alan Hayward <alan.hayward@arm.com>
17416 David Sherwood <david.sherwood@arm.com>
17418 * expr.c (expand_assignment): Cope with polynomial mode sizes
17419 when assigning to a CONCAT.
17421 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17422 Alan Hayward <alan.hayward@arm.com>
17423 David Sherwood <david.sherwood@arm.com>
17425 * machmode.h (mode_precision): Change from unsigned short to
17427 (mode_to_precision): Return a poly_uint16 rather than an unsigned
17429 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
17430 or if measurement_type is not polynomial.
17431 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
17432 in which the mode is already known to be a scalar_int_mode.
17433 * genmodes.c (emit_mode_precision): Change the type of mode_precision
17434 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
17436 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17437 for GET_MODE_PRECISION.
17438 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17439 for GET_MODE_PRECISION.
17440 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
17442 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
17443 (expand_field_assignment, make_extraction): Likewise.
17444 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
17445 (get_last_value): Likewise.
17446 * convert.c (convert_to_integer_1): Likewise.
17447 * cse.c (cse_insn): Likewise.
17448 * expr.c (expand_expr_real_1): Likewise.
17449 * lra-constraints.c (simplify_operand_subreg): Likewise.
17450 * optabs-query.c (can_atomic_load_p): Likewise.
17451 * optabs.c (expand_atomic_load): Likewise.
17452 (expand_atomic_store): Likewise.
17453 * ree.c (combine_reaching_defs): Likewise.
17454 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
17455 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
17456 * tree.h (type_has_mode_precision_p): Likewise.
17457 * ubsan.c (instrument_si_overflow): Likewise.
17459 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17460 Alan Hayward <alan.hayward@arm.com>
17461 David Sherwood <david.sherwood@arm.com>
17463 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
17464 polynomial numbers of units.
17465 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
17466 (valid_vector_subparts_p): New function.
17467 (build_vector_type): Remove temporary shim and take the number
17468 of units as a poly_uint64 rather than an int.
17469 (build_opaque_vector_type): Take the number of units as a
17470 poly_uint64 rather than an int.
17471 * tree.c (build_vector_from_ctor): Handle polynomial
17472 TYPE_VECTOR_SUBPARTS.
17473 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
17474 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
17475 (build_vector_from_val): If the number of units is variable,
17476 use build_vec_duplicate_cst for constant operands and
17477 VEC_DUPLICATE_EXPR otherwise.
17478 (make_vector_type): Remove temporary is_constant ().
17479 (build_vector_type, build_opaque_vector_type): Take the number of
17480 units as a poly_uint64 rather than an int.
17481 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
17483 * cfgexpand.c (expand_debug_expr): Likewise.
17484 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
17485 (store_constructor, expand_expr_real_1): Likewise.
17486 (const_scalar_mask_from_tree): Likewise.
17487 * fold-const-call.c (fold_const_reduction): Likewise.
17488 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
17489 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
17490 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
17491 (fold_relational_const): Likewise.
17492 (native_interpret_vector): Likewise. Change the size from an
17493 int to an unsigned int.
17494 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
17495 TYPE_VECTOR_SUBPARTS.
17496 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
17497 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
17498 duplicating a non-constant operand into a variable-length vector.
17499 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
17500 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
17501 * ipa-icf.c (sem_variable::equals): Likewise.
17502 * match.pd: Likewise.
17503 * omp-simd-clone.c (simd_clone_subparts): Likewise.
17504 * print-tree.c (print_node): Likewise.
17505 * stor-layout.c (layout_type): Likewise.
17506 * targhooks.c (default_builtin_vectorization_cost): Likewise.
17507 * tree-cfg.c (verify_gimple_comparison): Likewise.
17508 (verify_gimple_assign_binary): Likewise.
17509 (verify_gimple_assign_ternary): Likewise.
17510 (verify_gimple_assign_single): Likewise.
17511 * tree-pretty-print.c (dump_generic_node): Likewise.
17512 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17513 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
17514 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
17515 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
17516 (vect_shift_permute_load_chain): Likewise.
17517 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
17518 (expand_vector_condition, optimize_vector_constructor): Likewise.
17519 (lower_vec_perm, get_compute_type): Likewise.
17520 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17521 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
17522 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
17523 (vect_recog_mask_conversion_pattern): Likewise.
17524 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
17525 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
17526 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17527 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
17528 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
17529 (vectorizable_shift, vectorizable_operation, vectorizable_store)
17530 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
17531 (supportable_widening_operation): Likewise.
17532 (supportable_narrowing_operation): Likewise.
17533 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
17535 * varasm.c (output_constant): Likewise.
17537 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17538 Alan Hayward <alan.hayward@arm.com>
17539 David Sherwood <david.sherwood@arm.com>
17541 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
17542 so that both the length == 3 and length != 3 cases set up their
17543 own permute vectors. Add comments explaining why we know the
17544 number of elements is constant.
17545 (vect_permute_load_chain): Likewise.
17547 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17548 Alan Hayward <alan.hayward@arm.com>
17549 David Sherwood <david.sherwood@arm.com>
17551 * machmode.h (mode_nunits): Change from unsigned char to
17553 (ONLY_FIXED_SIZE_MODES): New macro.
17554 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
17555 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
17556 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
17558 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
17559 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
17560 or if measurement_type is not polynomial.
17561 * genmodes.c (ZERO_COEFFS): New macro.
17562 (emit_mode_nunits_inline): Make mode_nunits_inline return a
17564 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
17565 Use ZERO_COEFFS when emitting initializers.
17566 * data-streamer.h (bp_pack_poly_value): New function.
17567 (bp_unpack_poly_value): Likewise.
17568 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17569 for GET_MODE_NUNITS.
17570 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17571 for GET_MODE_NUNITS.
17572 * tree.c (make_vector_type): Remove temporary shim and make
17573 the real function take the number of units as a poly_uint64
17574 rather than an int.
17575 (build_vector_type_for_mode): Handle polynomial nunits.
17576 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
17577 * emit-rtl.c (const_vec_series_p_1): Likewise.
17578 (gen_rtx_CONST_VECTOR): Likewise.
17579 * fold-const.c (test_vec_duplicate_folding): Likewise.
17580 * genrecog.c (validate_pattern): Likewise.
17581 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
17582 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
17583 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
17584 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
17585 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
17586 * rtlanal.c (subreg_get_info): Likewise.
17587 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17588 (vect_grouped_load_supported): Likewise.
17589 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
17590 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
17591 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
17592 (simplify_const_unary_operation, simplify_binary_operation_1)
17593 (simplify_const_binary_operation, simplify_ternary_operation)
17594 (test_vector_ops_duplicate, test_vector_ops): Likewise.
17595 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
17596 instead of CONST_VECTOR_NUNITS.
17597 * varasm.c (output_constant_pool_2): Likewise.
17598 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
17599 explicit-encoded elements in the XVEC for variable-length vectors.
17601 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17603 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
17605 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17606 Alan Hayward <alan.hayward@arm.com>
17607 David Sherwood <david.sherwood@arm.com>
17609 * coretypes.h (fixed_size_mode): Declare.
17610 (fixed_size_mode_pod): New typedef.
17611 * builtins.h (target_builtins::x_apply_args_mode)
17612 (target_builtins::x_apply_result_mode): Change type to
17613 fixed_size_mode_pod.
17614 * builtins.c (apply_args_size, apply_result_size, result_vector)
17615 (expand_builtin_apply_args_1, expand_builtin_apply)
17616 (expand_builtin_return): Update accordingly.
17618 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17620 * cse.c (hash_rtx_cb): Hash only the encoded elements.
17621 * cselib.c (cselib_hash_rtx): Likewise.
17622 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
17623 CONST_VECTOR encoding.
17625 2018-01-03 Jakub Jelinek <jakub@redhat.com>
17626 Jeff Law <law@redhat.com>
17629 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
17630 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
17631 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
17632 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
17635 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
17636 explicitly probe *sp in a noreturn function if there were any callee
17637 register saves or frame pointer is needed.
17639 2018-01-03 Jakub Jelinek <jakub@redhat.com>
17642 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
17643 BLKmode for ternary, binary or unary expressions.
17646 * var-tracking.c (delete_vta_debug_insn): New inline function.
17647 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
17648 insns from get_insns () to NULL instead of each bb separately.
17649 Use delete_vta_debug_insn. No longer static.
17650 (vt_debug_insns_local, variable_tracking_main_1): Adjust
17651 delete_vta_debug_insns callers.
17652 * rtl.h (delete_vta_debug_insns): Declare.
17653 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
17654 instead of variable_tracking_main.
17656 2018-01-03 Martin Sebor <msebor@redhat.com>
17658 PR tree-optimization/83603
17659 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
17660 arguments past the endof the argument list in functions declared
17661 without a prototype.
17662 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
17663 Avoid checking when arguments are null.
17665 2018-01-03 Martin Sebor <msebor@redhat.com>
17668 * doc/extend.texi (attribute const): Fix a typo.
17669 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
17670 issuing -Wsuggest-attribute for void functions.
17672 2018-01-03 Martin Sebor <msebor@redhat.com>
17674 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
17675 offset_int::from instead of wide_int::to_shwi.
17676 (maybe_diag_overlap): Remove assertion.
17677 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
17678 * gimple-ssa-sprintf.c (format_directive): Same.
17679 (parse_directive): Same.
17680 (sprintf_dom_walker::compute_format_length): Same.
17681 (try_substitute_return_value): Same.
17683 2018-01-03 Jeff Law <law@redhat.com>
17685 PR middle-end/83654
17686 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
17687 non-constant residual for zero at runtime and avoid probing in
17688 that case. Reorganize code for trailing problem to mirror handling
17691 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17693 PR tree-optimization/83501
17694 * tree-ssa-strlen.c (get_string_cst): New.
17695 (handle_char_store): Call get_string_cst.
17697 2018-01-03 Martin Liska <mliska@suse.cz>
17699 PR tree-optimization/83593
17700 * tree-ssa-strlen.c: Include tree-cfg.h.
17701 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
17702 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
17703 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
17705 (strlen_dom_walker::before_dom_children): Call
17706 gimple_purge_dead_eh_edges. Dump tranformation with details
17708 (strlen_dom_walker::before_dom_children): Update call by adding
17709 new argument cleanup_eh.
17710 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
17712 2018-01-03 Martin Liska <mliska@suse.cz>
17715 * cif-code.def (VARIADIC_THUNK): New enum value.
17716 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
17719 2018-01-03 Jan Beulich <jbeulich@suse.com>
17721 * sse.md (mov<mode>_internal): Tighten condition for when to use
17722 vmovdqu<ssescalarsize> for TI and OI modes.
17724 2018-01-03 Jakub Jelinek <jakub@redhat.com>
17726 Update copyright years.
17728 2018-01-03 Martin Liska <mliska@suse.cz>
17731 * ipa-visibility.c (function_and_variable_visibility): Skip
17732 functions with noipa attribure.
17734 2018-01-03 Jakub Jelinek <jakub@redhat.com>
17736 * gcc.c (process_command): Update copyright notice dates.
17737 * gcov-dump.c (print_version): Ditto.
17738 * gcov.c (print_version): Ditto.
17739 * gcov-tool.c (print_version): Ditto.
17740 * gengtype.c (create_file): Ditto.
17741 * doc/cpp.texi: Bump @copying's copyright year.
17742 * doc/cppinternals.texi: Ditto.
17743 * doc/gcc.texi: Ditto.
17744 * doc/gccint.texi: Ditto.
17745 * doc/gcov.texi: Ditto.
17746 * doc/install.texi: Ditto.
17747 * doc/invoke.texi: Ditto.
17749 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17751 * vector-builder.h (vector_builder::m_full_nelts): Change from
17752 unsigned int to poly_uint64.
17753 (vector_builder::full_nelts): Update prototype accordingly.
17754 (vector_builder::new_vector): Likewise.
17755 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
17756 (vector_builder::operator ==): Likewise.
17757 (vector_builder::finalize): Likewise.
17758 * int-vector-builder.h (int_vector_builder::int_vector_builder):
17759 Take the number of elements as a poly_uint64 rather than an
17761 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
17762 from unsigned int to poly_uint64.
17763 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
17764 (vec_perm_indices::new_vector): Likewise.
17765 (vec_perm_indices::length): Likewise.
17766 (vec_perm_indices::nelts_per_input): Likewise.
17767 (vec_perm_indices::input_nelts): Likewise.
17768 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
17769 number of elements per input as a poly_uint64 rather than an
17770 unsigned int. Use the original encoding for variable-length
17771 vectors, rather than clamping each individual element.
17772 For the second and subsequent elements in each pattern,
17773 clamp the step and base before clamping their sum.
17774 (vec_perm_indices::series_p): Handle polynomial element counts.
17775 (vec_perm_indices::all_in_range_p): Likewise.
17776 (vec_perm_indices_to_tree): Likewise.
17777 (vec_perm_indices_to_rtx): Likewise.
17778 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
17779 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
17780 (tree_vector_builder::new_binary_operation): Handle polynomial
17781 element counts. Return false if we need to know the number
17782 of elements at compile time.
17783 * fold-const.c (fold_vec_perm): Punt if the number of elements
17784 isn't known at compile time.
17786 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17788 * vec-perm-indices.h (vec_perm_builder): Change element type
17789 from HOST_WIDE_INT to poly_int64.
17790 (vec_perm_indices::element_type): Update accordingly.
17791 (vec_perm_indices::clamp): Handle polynomial element_types.
17792 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
17793 (vec_perm_indices::all_in_range_p): Likewise.
17794 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
17796 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
17797 polynomial vec_perm_indices element types.
17798 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
17799 * fold-const.c (fold_vec_perm): Likewise.
17800 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
17801 * tree-vect-generic.c (lower_vec_perm): Likewise.
17802 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
17803 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
17804 element type to HOST_WIDE_INT.
17806 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17807 Alan Hayward <alan.hayward@arm.com>
17808 David Sherwood <david.sherwood@arm.com>
17810 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
17811 rather than an int. Use plus_constant.
17812 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
17813 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
17815 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17816 Alan Hayward <alan.hayward@arm.com>
17817 David Sherwood <david.sherwood@arm.com>
17819 * calls.c (emit_call_1, expand_call): Change struct_value_size from
17820 a HOST_WIDE_INT to a poly_int64.
17822 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17823 Alan Hayward <alan.hayward@arm.com>
17824 David Sherwood <david.sherwood@arm.com>
17826 * calls.c (load_register_parameters): Cope with polynomial
17827 mode sizes. Require a constant size for BLKmode parameters
17828 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
17829 forces a parameter to be padded at the lsb end in order to
17830 fill a complete number of words, require the parameter size
17831 to be ordered wrt UNITS_PER_WORD.
17833 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17834 Alan Hayward <alan.hayward@arm.com>
17835 David Sherwood <david.sherwood@arm.com>
17837 * reload1.c (spill_stack_slot_width): Change element type
17838 from unsigned int to poly_uint64_pod.
17839 (alter_reg): Treat mode sizes as polynomial.
17841 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17842 Alan Hayward <alan.hayward@arm.com>
17843 David Sherwood <david.sherwood@arm.com>
17845 * reload.c (complex_word_subreg_p): New function.
17846 (reload_inner_reg_of_subreg, push_reload): Use it.
17848 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17849 Alan Hayward <alan.hayward@arm.com>
17850 David Sherwood <david.sherwood@arm.com>
17852 * lra-constraints.c (process_alt_operands): Reject matched
17853 operands whose sizes aren't ordered.
17854 (match_reload): Refer to this check here.
17856 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17857 Alan Hayward <alan.hayward@arm.com>
17858 David Sherwood <david.sherwood@arm.com>
17860 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
17861 that the mode size is in the set {1, 2, 4, 8, 16}.
17863 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17864 Alan Hayward <alan.hayward@arm.com>
17865 David Sherwood <david.sherwood@arm.com>
17867 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
17868 Use plus_constant instead of gen_rtx_PLUS.
17870 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17871 Alan Hayward <alan.hayward@arm.com>
17872 David Sherwood <david.sherwood@arm.com>
17874 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
17875 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
17876 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
17877 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
17878 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
17879 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
17880 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
17881 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
17882 * config/i386/i386.c (ix86_push_rounding): ...this new function.
17883 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
17885 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
17886 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
17887 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
17888 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
17889 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
17890 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
17891 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
17892 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
17893 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
17894 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
17896 * expr.c (emit_move_resolve_push): Treat the input and result
17897 of PUSH_ROUNDING as a poly_int64.
17898 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
17899 (emit_push_insn): Likewise.
17900 * lra-eliminations.c (mark_not_eliminable): Likewise.
17901 * recog.c (push_operand): Likewise.
17902 * reload1.c (elimination_effects): Likewise.
17903 * rtlanal.c (nonzero_bits1): Likewise.
17904 * calls.c (store_one_arg): Likewise. Require the padding to be
17905 known at compile time.
17907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17908 Alan Hayward <alan.hayward@arm.com>
17909 David Sherwood <david.sherwood@arm.com>
17911 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
17912 Use plus_constant instead of gen_rtx_PLUS.
17914 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17915 Alan Hayward <alan.hayward@arm.com>
17916 David Sherwood <david.sherwood@arm.com>
17918 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
17919 rather than an int.
17921 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17922 Alan Hayward <alan.hayward@arm.com>
17923 David Sherwood <david.sherwood@arm.com>
17925 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
17926 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
17927 via stack temporaries. Treat the mode size as polynomial too.
17929 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17930 Alan Hayward <alan.hayward@arm.com>
17931 David Sherwood <david.sherwood@arm.com>
17933 * expr.c (expand_expr_real_2): When handling conversions involving
17934 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
17935 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
17936 as a poly_uint64 too.
17938 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17939 Alan Hayward <alan.hayward@arm.com>
17940 David Sherwood <david.sherwood@arm.com>
17942 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
17944 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17945 Alan Hayward <alan.hayward@arm.com>
17946 David Sherwood <david.sherwood@arm.com>
17948 * combine.c (can_change_dest_mode): Handle polynomial
17949 REGMODE_NATURAL_SIZE.
17950 * expmed.c (store_bit_field_1): Likewise.
17951 * expr.c (store_constructor): Likewise.
17952 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
17953 and polynomial REGMODE_NATURAL_SIZE.
17954 (gen_lowpart_common): Likewise.
17955 * reginfo.c (record_subregs_of_mode): Likewise.
17956 * rtlanal.c (read_modify_subreg_p): Likewise.
17958 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17959 Alan Hayward <alan.hayward@arm.com>
17960 David Sherwood <david.sherwood@arm.com>
17962 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
17963 numbers of elements.
17965 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17966 Alan Hayward <alan.hayward@arm.com>
17967 David Sherwood <david.sherwood@arm.com>
17969 * match.pd: Cope with polynomial numbers of vector elements.
17971 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17972 Alan Hayward <alan.hayward@arm.com>
17973 David Sherwood <david.sherwood@arm.com>
17975 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
17976 in a POINTER_PLUS_EXPR.
17978 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17979 Alan Hayward <alan.hayward@arm.com>
17980 David Sherwood <david.sherwood@arm.com>
17982 * omp-simd-clone.c (simd_clone_subparts): New function.
17983 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
17984 (ipa_simd_modify_function_body): Likewise.
17986 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17987 Alan Hayward <alan.hayward@arm.com>
17988 David Sherwood <david.sherwood@arm.com>
17990 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
17991 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
17992 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
17993 (expand_vector_condition, vector_element): Likewise.
17994 (subparts_gt): New function.
17995 (get_compute_type): Use subparts_gt.
17996 (count_type_subparts): Delete.
17997 (expand_vector_operations_1): Use subparts_gt instead of
17998 count_type_subparts.
18000 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18001 Alan Hayward <alan.hayward@arm.com>
18002 David Sherwood <david.sherwood@arm.com>
18004 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
18005 (vect_compile_time_alias): ...this new function. Do the calculation
18006 on poly_ints rather than trees.
18007 (vect_prune_runtime_alias_test_list): Update call accordingly.
18009 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18010 Alan Hayward <alan.hayward@arm.com>
18011 David Sherwood <david.sherwood@arm.com>
18013 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
18015 (vect_schedule_slp_instance): Likewise.
18017 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18018 Alan Hayward <alan.hayward@arm.com>
18019 David Sherwood <david.sherwood@arm.com>
18021 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
18022 constant and extern definitions for variable-length vectors.
18023 (vect_get_constant_vectors): Note that the number of units
18024 is known to be constant.
18026 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18027 Alan Hayward <alan.hayward@arm.com>
18028 David Sherwood <david.sherwood@arm.com>
18030 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
18031 of units as polynomial. Choose between WIDE and NARROW based
18034 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18035 Alan Hayward <alan.hayward@arm.com>
18036 David Sherwood <david.sherwood@arm.com>
18038 * tree-vect-stmts.c (simd_clone_subparts): New function.
18039 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
18041 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18042 Alan Hayward <alan.hayward@arm.com>
18043 David Sherwood <david.sherwood@arm.com>
18045 * tree-vect-stmts.c (vectorizable_call): Treat the number of
18046 vectors as polynomial. Use build_index_vector for
18047 IFN_GOMP_SIMD_LANE.
18049 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18050 Alan Hayward <alan.hayward@arm.com>
18051 David Sherwood <david.sherwood@arm.com>
18053 * tree-vect-stmts.c (get_load_store_type): Treat the number of
18054 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
18055 for variable-length vectors.
18056 (vectorizable_mask_load_store): Treat the number of units as
18057 polynomial, asserting that it is constant if the condition has
18058 already been enforced.
18059 (vectorizable_store, vectorizable_load): Likewise.
18061 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18062 Alan Hayward <alan.hayward@arm.com>
18063 David Sherwood <david.sherwood@arm.com>
18065 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
18066 of units as polynomial. Punt if we can't tell at compile time
18067 which vector contains the final result.
18069 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18070 Alan Hayward <alan.hayward@arm.com>
18071 David Sherwood <david.sherwood@arm.com>
18073 * tree-vect-loop.c (vectorizable_induction): Treat the number
18074 of units as polynomial. Punt on SLP inductions. Use an integer
18075 VEC_SERIES_EXPR for variable-length integer reductions. Use a
18076 cast of such a series for variable-length floating-point
18079 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18080 Alan Hayward <alan.hayward@arm.com>
18081 David Sherwood <david.sherwood@arm.com>
18083 * tree.h (build_index_vector): Declare.
18084 * tree.c (build_index_vector): New function.
18085 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
18086 of units as polynomial, forcibly converting it to a constant if
18087 vectorizable_reduction has already enforced the condition.
18088 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
18089 to create a {1,2,3,...} vector.
18090 (vectorizable_reduction): Treat the number of units as polynomial.
18091 Choose vectype_in based on the largest scalar element size rather
18092 than the smallest number of units. Enforce the restrictions
18095 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18096 Alan Hayward <alan.hayward@arm.com>
18097 David Sherwood <david.sherwood@arm.com>
18099 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
18100 number of units as polynomial.
18102 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18103 Alan Hayward <alan.hayward@arm.com>
18104 David Sherwood <david.sherwood@arm.com>
18106 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
18107 * target.def (autovectorize_vector_sizes): Return the vector sizes
18108 by pointer, using vector_sizes rather than a bitmask.
18109 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
18110 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
18111 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
18113 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
18114 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
18115 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
18116 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
18117 * omp-general.c (omp_max_vf): Likewise.
18118 * omp-low.c (omp_clause_aligned_alignment): Likewise.
18119 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
18120 * tree-vect-loop.c (vect_analyze_loop): Likewise.
18121 * tree-vect-slp.c (vect_slp_bb): Likewise.
18122 * doc/tm.texi: Regenerate.
18123 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
18125 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
18126 the vector size as a poly_uint64 rather than an unsigned int.
18127 (current_vector_size): Change from an unsigned int to a poly_uint64.
18128 (get_vectype_for_scalar_type): Update accordingly.
18129 * tree.h (build_truth_vector_type): Take the size and number of
18130 units as a poly_uint64 rather than an unsigned int.
18131 (build_vector_type): Add a temporary overload that takes
18132 the number of units as a poly_uint64 rather than an unsigned int.
18133 * tree.c (make_vector_type): Likewise.
18134 (build_truth_vector_type): Take the number of units as a poly_uint64
18135 rather than an unsigned int.
18137 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18138 Alan Hayward <alan.hayward@arm.com>
18139 David Sherwood <david.sherwood@arm.com>
18141 * target.def (get_mask_mode): Take the number of units and length
18142 as poly_uint64s rather than unsigned ints.
18143 * targhooks.h (default_get_mask_mode): Update accordingly.
18144 * targhooks.c (default_get_mask_mode): Likewise.
18145 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
18146 * doc/tm.texi: Regenerate.
18148 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18149 Alan Hayward <alan.hayward@arm.com>
18150 David Sherwood <david.sherwood@arm.com>
18152 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
18153 * omp-general.c (omp_max_vf): Likewise.
18154 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
18155 (expand_omp_simd): Handle polynomial safelen.
18156 * omp-low.c (omplow_simd_context): Add a default constructor.
18157 (omplow_simd_context::max_vf): Change from int to poly_uint64.
18158 (lower_rec_simd_input_clauses): Update accordingly.
18159 (lower_rec_input_clauses): Likewise.
18161 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18162 Alan Hayward <alan.hayward@arm.com>
18163 David Sherwood <david.sherwood@arm.com>
18165 * tree-vectorizer.h (vect_nunits_for_cost): New function.
18166 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
18167 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
18168 (vect_analyze_slp_cost): Likewise.
18169 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
18170 (vect_model_load_cost): Likewise.
18172 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18173 Alan Hayward <alan.hayward@arm.com>
18174 David Sherwood <david.sherwood@arm.com>
18176 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
18177 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
18178 from an unsigned int * to a poly_uint64_pod *.
18179 (calculate_unrolling_factor): New function.
18180 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
18182 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18183 Alan Hayward <alan.hayward@arm.com>
18184 David Sherwood <david.sherwood@arm.com>
18186 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
18187 from an unsigned int to a poly_uint64.
18188 (_loop_vec_info::slp_unrolling_factor): Likewise.
18189 (_loop_vec_info::vectorization_factor): Change from an int
18191 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
18192 (vect_get_num_vectors): New function.
18193 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
18194 (vect_get_num_copies): Use vect_get_num_vectors.
18195 (vect_analyze_data_ref_dependences): Change max_vf from an int *
18196 to an unsigned int *.
18197 (vect_analyze_data_refs): Change min_vf from an int * to a
18199 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
18200 than an unsigned HOST_WIDE_INT.
18201 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
18202 (vect_analyze_data_ref_dependence): Change max_vf from an int *
18203 to an unsigned int *.
18204 (vect_analyze_data_ref_dependences): Likewise.
18205 (vect_compute_data_ref_alignment): Handle polynomial vf.
18206 (vect_enhance_data_refs_alignment): Likewise.
18207 (vect_prune_runtime_alias_test_list): Likewise.
18208 (vect_shift_permute_load_chain): Likewise.
18209 (vect_supportable_dr_alignment): Likewise.
18210 (dependence_distance_ge_vf): Take the vectorization factor as a
18211 poly_uint64 rather than an unsigned HOST_WIDE_INT.
18212 (vect_analyze_data_refs): Change min_vf from an int * to a
18214 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
18215 vfm1 as a poly_uint64 rather than an int. Make the same change
18216 for the returned bound_scalar.
18217 (vect_gen_vector_loop_niters): Handle polynomial vf.
18218 (vect_do_peeling): Likewise. Update call to
18219 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
18220 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
18222 * tree-vect-loop.c (vect_determine_vectorization_factor)
18223 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
18224 (vect_get_known_peeling_cost): Likewise.
18225 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
18226 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
18227 (vect_transform_loop): Likewise. Use the lowest possible VF when
18228 updating the upper bounds of the loop.
18229 (vect_min_worthwhile_factor): Make static. Return an unsigned int
18230 rather than an int.
18231 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
18232 polynomial unroll factors.
18233 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
18234 (vect_make_slp_decision): Likewise.
18235 (vect_supported_load_permutation_p): Likewise, and polynomial
18237 (vect_analyze_slp_cost): Handle polynomial vf.
18238 (vect_slp_analyze_node_operations): Likewise.
18239 (vect_slp_analyze_bb_1): Likewise.
18240 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
18241 than an unsigned HOST_WIDE_INT.
18242 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
18243 (vectorizable_load): Handle polynomial vf.
18244 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
18246 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
18248 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18249 Alan Hayward <alan.hayward@arm.com>
18250 David Sherwood <david.sherwood@arm.com>
18252 * match.pd: Handle bit operations involving three constants
18253 and try to fold one pair.
18255 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18257 * tree-vect-loop-manip.c: Include gimple-fold.h.
18258 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
18259 niters_maybe_zero parameters. Handle other cases besides a step of 1.
18260 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
18261 Add a path that uses a step of VF instead of 1, but disable it
18263 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
18264 and niters_no_overflow parameters. Update calls to
18265 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
18266 Create a new SSA name if the latter choses to use a ste other
18267 than zero, and return it via niters_vector_mult_vf_var.
18268 * tree-vect-loop.c (vect_transform_loop): Update calls to
18269 vect_do_peeling, vect_gen_vector_loop_niters and
18270 slpeel_make_loop_iterate_ntimes.
18271 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
18272 (vect_gen_vector_loop_niters): Update declarations after above changes.
18274 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
18276 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
18277 128-bit round to integer instructions.
18278 (ceil<mode>2): Likewise.
18279 (btrunc<mode>2): Likewise.
18280 (round<mode>2): Likewise.
18282 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18284 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
18285 unaligned VSX load/store on P8/P9.
18286 (expand_block_clear): Allow the use of unaligned VSX
18287 load/store on P8/P9.
18289 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18291 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
18293 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
18294 swap associated with both a load and a store.
18296 2018-01-02 Andrew Waterman <andrew@sifive.com>
18298 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
18299 * config/riscv/riscv.md (clear_cache): Use it.
18301 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
18303 * web.c: Remove out-of-date comment.
18305 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18307 * expr.c (fixup_args_size_notes): Check that any existing
18308 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
18309 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
18310 (emit_single_push_insn): ...here.
18312 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18314 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
18315 (const_vector_encoded_nelts): New function.
18316 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
18317 (const_vector_int_elt, const_vector_elt): Declare.
18318 * emit-rtl.c (const_vector_int_elt_1): New function.
18319 (const_vector_elt): Likewise.
18320 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
18321 of CONST_VECTOR_ELT.
18323 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18325 * expr.c: Include rtx-vector-builder.h.
18326 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
18327 directly on the tree encoding.
18328 (const_vector_from_tree): Likewise.
18329 * optabs.c: Include rtx-vector-builder.h.
18330 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
18331 sequence of "u" values.
18332 * vec-perm-indices.c: Include rtx-vector-builder.h.
18333 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
18334 directly on the vec_perm_indices encoding.
18336 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18338 * doc/rtl.texi (const_vector): Describe new encoding scheme.
18339 * Makefile.in (OBJS): Add rtx-vector-builder.o.
18340 * rtx-vector-builder.h: New file.
18341 * rtx-vector-builder.c: Likewise.
18342 * rtl.h (rtx_def::u2): Add a const_vector field.
18343 (CONST_VECTOR_NPATTERNS): New macro.
18344 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
18345 (CONST_VECTOR_DUPLICATE_P): Likewise.
18346 (CONST_VECTOR_STEPPED_P): Likewise.
18347 (CONST_VECTOR_ENCODED_ELT): Likewise.
18348 (const_vec_duplicate_p): Check for a duplicated vector encoding.
18349 (unwrap_const_vec_duplicate): Likewise.
18350 (const_vec_series_p): Check for a non-duplicated vector encoding.
18351 Say that the function only returns true for integer vectors.
18352 * emit-rtl.c: Include rtx-vector-builder.h.
18353 (gen_const_vec_duplicate_1): Delete.
18354 (gen_const_vector): Call gen_const_vec_duplicate instead of
18355 gen_const_vec_duplicate_1.
18356 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
18357 (gen_const_vec_duplicate): Use rtx_vector_builder.
18358 (gen_const_vec_series): Likewise.
18359 (gen_rtx_CONST_VECTOR): Likewise.
18360 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
18361 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
18362 Build a new vector rather than modifying a CONST_VECTOR in-place.
18363 (handle_special_swappables): Update call accordingly.
18364 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
18365 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
18366 Build a new vector rather than modifying a CONST_VECTOR in-place.
18367 (handle_special_swappables): Update call accordingly.
18369 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18371 * simplify-rtx.c (simplify_const_binary_operation): Use
18372 CONST_VECTOR_ELT instead of XVECEXP.
18374 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18376 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
18377 the selector elements to be different from the data elements
18378 if the selector is a VECTOR_CST.
18379 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
18380 ssizetype for the selector.
18382 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18384 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
18385 before testing each element individually.
18386 * tree-vect-generic.c (lower_vec_perm): Likewise.
18388 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18390 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
18391 * selftest-run-tests.c (selftest::run_tests): Call it.
18392 * vector-builder.h (vector_builder::operator ==): New function.
18393 (vector_builder::operator !=): Likewise.
18394 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
18395 (vec_perm_indices::all_from_input_p): New function.
18396 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
18397 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
18398 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
18399 instead of reading the VECTOR_CST directly. Detect whether both
18400 vector inputs are the same before constructing the vec_perm_indices,
18401 and update the number of inputs argument accordingly. Use the
18402 utility functions added above. Only construct sel2 if we need to.
18404 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18406 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
18407 the broadcast of the low byte.
18408 (expand_mult_highpart): Use an explicit encoding for the permutes.
18409 * optabs-query.c (can_mult_highpart_p): Likewise.
18410 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
18411 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18412 (vectorizable_bswap): Likewise.
18413 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
18414 explicit encoding for the power-of-2 permutes.
18415 (vect_permute_store_chain): Likewise.
18416 (vect_grouped_load_supported): Likewise.
18417 (vect_permute_load_chain): Likewise.
18419 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18421 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
18422 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
18423 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
18424 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18425 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
18426 (vect_gen_perm_mask_any): Likewise.
18428 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18430 * int-vector-builder.h: New file.
18431 * vec-perm-indices.h: Include int-vector-builder.h.
18432 (vec_perm_indices): Redefine as an int_vector_builder.
18433 (auto_vec_perm_indices): Delete.
18434 (vec_perm_builder): Redefine as a stand-alone class.
18435 (vec_perm_indices::vec_perm_indices): New function.
18436 (vec_perm_indices::clamp): Likewise.
18437 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
18438 (vec_perm_indices::new_vector): New function.
18439 (vec_perm_indices::new_expanded_vector): Update for new
18440 vec_perm_indices class.
18441 (vec_perm_indices::rotate_inputs): New function.
18442 (vec_perm_indices::all_in_range_p): Operate directly on the
18443 encoded form, without computing elided elements.
18444 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
18445 encoding. Update for new vec_perm_indices class.
18446 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
18447 the given vec_perm_builder.
18448 (expand_vec_perm_var): Update vec_perm_builder constructor.
18449 (expand_mult_highpart): Use vec_perm_builder instead of
18450 auto_vec_perm_indices.
18451 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
18452 vec_perm_indices instead of auto_vec_perm_indices. Use a single
18453 or double series encoding as appropriate.
18454 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
18455 vec_perm_indices instead of auto_vec_perm_indices.
18456 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18457 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18458 (vect_permute_store_chain): Likewise.
18459 (vect_grouped_load_supported): Likewise.
18460 (vect_permute_load_chain): Likewise.
18461 (vect_shift_permute_load_chain): Likewise.
18462 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
18463 (vect_transform_slp_perm_load): Likewise.
18464 (vect_schedule_slp_instance): Likewise.
18465 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18466 (vectorizable_mask_load_store): Likewise.
18467 (vectorizable_bswap): Likewise.
18468 (vectorizable_store): Likewise.
18469 (vectorizable_load): Likewise.
18470 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
18471 vec_perm_indices instead of auto_vec_perm_indices. Use
18472 tree_to_vec_perm_builder to read the vector from a tree.
18473 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
18474 vec_perm_builder instead of a vec_perm_indices.
18475 (have_whole_vector_shift): Use vec_perm_builder and
18476 vec_perm_indices instead of auto_vec_perm_indices. Leave the
18477 truncation to calc_vec_perm_mask_for_shift.
18478 (vect_create_epilog_for_reduction): Likewise.
18479 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
18480 from auto_vec_perm_indices to vec_perm_indices.
18481 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
18482 instead of changing individual elements.
18483 (aarch64_vectorize_vec_perm_const): Use new_vector to install
18484 the vector in d.perm.
18485 * config/arm/arm.c (expand_vec_perm_d::perm): Change
18486 from auto_vec_perm_indices to vec_perm_indices.
18487 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
18488 instead of changing individual elements.
18489 (arm_vectorize_vec_perm_const): Use new_vector to install
18490 the vector in d.perm.
18491 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
18492 Update vec_perm_builder constructor.
18493 (rs6000_expand_interleave): Likewise.
18494 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
18495 (rs6000_expand_interleave): Likewise.
18497 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18499 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
18500 to qimode could truncate the indices.
18501 * optabs.c (expand_vec_perm_var): Likewise.
18503 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18505 * Makefile.in (OBJS): Add vec-perm-indices.o.
18506 * vec-perm-indices.h: New file.
18507 * vec-perm-indices.c: Likewise.
18508 * target.h (vec_perm_indices): Replace with a forward class
18510 (auto_vec_perm_indices): Move to vec-perm-indices.h.
18511 * optabs.h: Include vec-perm-indices.h.
18512 (expand_vec_perm): Delete.
18513 (selector_fits_mode_p, expand_vec_perm_var): Declare.
18514 (expand_vec_perm_const): Declare.
18515 * target.def (vec_perm_const_ok): Replace with...
18516 (vec_perm_const): ...this new hook.
18517 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
18518 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
18519 * doc/tm.texi: Regenerate.
18520 * optabs.def (vec_perm_const): Delete.
18521 * doc/md.texi (vec_perm_const): Likewise.
18522 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
18523 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
18524 expand_vec_perm for constant permutation vectors. Assert that
18525 the mode of variable permutation vectors is the integer equivalent
18526 of the mode that is being permuted.
18527 * optabs-query.h (selector_fits_mode_p): Declare.
18528 * optabs-query.c: Include vec-perm-indices.h.
18529 (selector_fits_mode_p): New function.
18530 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
18531 is defined, instead of checking whether the vec_perm_const_optab
18532 exists. Use targetm.vectorize.vec_perm_const instead of
18533 targetm.vectorize.vec_perm_const_ok. Check whether the indices
18534 fit in the vector mode before using a variable permute.
18535 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
18536 vec_perm_indices instead of an rtx.
18537 (expand_vec_perm): Replace with...
18538 (expand_vec_perm_const): ...this new function. Take the selector
18539 as a vec_perm_indices rather than an rtx. Also take the mode of
18540 the selector. Update call to shift_amt_for_vec_perm_mask.
18541 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
18542 Use vec_perm_indices::new_expanded_vector to expand the original
18543 selector into bytes. Check whether the indices fit in the vector
18544 mode before using a variable permute.
18545 (expand_vec_perm_var): Make global.
18546 (expand_mult_highpart): Use expand_vec_perm_const.
18547 * fold-const.c: Includes vec-perm-indices.h.
18548 * tree-ssa-forwprop.c: Likewise.
18549 * tree-vect-data-refs.c: Likewise.
18550 * tree-vect-generic.c: Likewise.
18551 * tree-vect-loop.c: Likewise.
18552 * tree-vect-slp.c: Likewise.
18553 * tree-vect-stmts.c: Likewise.
18554 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
18556 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
18557 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
18558 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
18559 (aarch64_vectorize_vec_perm_const): ...this new function.
18560 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18561 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18562 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
18563 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
18564 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18565 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18566 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
18568 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
18569 check for NEON modes.
18570 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
18571 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
18572 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
18573 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
18575 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
18576 the old VEC_PERM_CONST conditions.
18577 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
18578 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
18579 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
18580 (ia64_vectorize_vec_perm_const_ok): Merge into...
18581 (ia64_vectorize_vec_perm_const): ...this new function.
18582 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
18583 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
18584 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
18585 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
18586 * config/mips/mips.c (mips_expand_vec_perm_const)
18587 (mips_vectorize_vec_perm_const_ok): Merge into...
18588 (mips_vectorize_vec_perm_const): ...this new function.
18589 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
18590 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
18591 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
18592 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
18593 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
18594 (rs6000_expand_vec_perm_const): Delete.
18595 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
18597 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18598 (altivec_expand_vec_perm_const_le): Take each operand individually.
18599 Operate on constant selectors rather than rtxes.
18600 (altivec_expand_vec_perm_const): Likewise. Update call to
18601 altivec_expand_vec_perm_const_le.
18602 (rs6000_expand_vec_perm_const): Delete.
18603 (rs6000_vectorize_vec_perm_const_ok): Delete.
18604 (rs6000_vectorize_vec_perm_const): New function.
18605 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
18606 an element count and rtx array.
18607 (rs6000_expand_extract_even): Update call accordingly.
18608 (rs6000_expand_interleave): Likewise.
18609 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
18610 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
18611 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
18612 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
18613 (rs6000_expand_vec_perm_const): Delete.
18614 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18615 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18616 (altivec_expand_vec_perm_const_le): Take each operand individually.
18617 Operate on constant selectors rather than rtxes.
18618 (altivec_expand_vec_perm_const): Likewise. Update call to
18619 altivec_expand_vec_perm_const_le.
18620 (rs6000_expand_vec_perm_const): Delete.
18621 (rs6000_vectorize_vec_perm_const_ok): Delete.
18622 (rs6000_vectorize_vec_perm_const): New function. Remove stray
18623 reference to the SPE evmerge intructions.
18624 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
18625 an element count and rtx array.
18626 (rs6000_expand_extract_even): Update call accordingly.
18627 (rs6000_expand_interleave): Likewise.
18628 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
18629 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
18631 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18633 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18635 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
18636 vector mode and that that mode matches the mode of the data
18638 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
18639 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
18640 directly using expand_vec_perm_1 when forcing selectors into
18642 (expand_vec_perm_var): New function, split out from expand_vec_perm.
18644 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18646 * optabs-query.h (can_vec_perm_p): Delete.
18647 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
18648 * optabs-query.c (can_vec_perm_p): Split into...
18649 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
18650 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
18651 particular selector is valid.
18652 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18653 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18654 (vect_grouped_load_supported): Likewise.
18655 (vect_shift_permute_load_chain): Likewise.
18656 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
18657 (vect_transform_slp_perm_load): Likewise.
18658 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18659 (vectorizable_bswap): Likewise.
18660 (vect_gen_perm_mask_checked): Likewise.
18661 * fold-const.c (fold_ternary_loc): Likewise. Don't take
18662 implementations of variable permutation vectors into account
18663 when deciding which selector to use.
18664 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
18665 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
18666 with a false third argument.
18667 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
18668 to test whether the constant selector is valid and can_vec_perm_var_p
18669 to test whether a variable selector is valid.
18671 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18673 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
18674 * optabs-query.c (can_vec_perm_p): Likewise.
18675 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
18676 instead of vec_perm_indices.
18677 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
18678 (vect_gen_perm_mask_checked): Likewise,
18679 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
18680 (vect_gen_perm_mask_checked): Likewise,
18682 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18684 * optabs-query.h (qimode_for_vec_perm): Declare.
18685 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
18686 (qimode_for_vec_perm): ...this new function.
18687 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
18689 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18691 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
18692 does not have a conditional at the top.
18694 2018-01-02 Richard Biener <rguenther@suse.de>
18696 * ipa-inline.c (big_speedup_p): Fix expression.
18698 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
18701 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
18704 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
18708 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
18709 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
18710 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
18711 cond_taken_branch_cost 3->4.
18713 2018-01-01 Jakub Jelinek <jakub@redhat.com>
18715 PR tree-optimization/83581
18716 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
18717 TODO_cleanup_cfg if any changes have been made.
18719 PR middle-end/83608
18720 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
18721 convert_modes if target mode has the right side, but different mode
18724 PR middle-end/83609
18725 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
18726 last argument when extracting from CONCAT. If either from_real or
18727 from_imag is NULL, use expansion through memory. If result is not
18728 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
18729 the parts directly to inner mode, if even that fails, use expansion
18732 PR middle-end/83623
18733 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
18734 check for bswap in mode rather than HImode and use that in expand_unop
18737 Copyright (C) 2018 Free Software Foundation, Inc.
18739 Copying and distribution of this file, with or without modification,
18740 are permitted in any medium without royalty provided the copyright
18741 notice and this notice are preserved.