PR tree-optimization/79389
* ifcvt.c (struct noce_if_info): Add rev_cond field.
(noce_reversed_cond_code): New function.
(noce_emit_store_flag): Use rev_cond if non-NULL instead of
reversed_comparison_code. Formatting fix.
(noce_try_store_flag): Test rev_cond != NULL in addition to
reversed_comparison_code.
(noce_try_store_flag_constants): Likewise.
(noce_try_store_flag_mask): Likewise.
(noce_try_addcc): Use rev_cond if non-NULL instead of
reversed_comparison_code.
(noce_try_cmove_arith): Likewise. Formatting fixes.
(noce_try_minmax, noce_try_abs): Clear rev_cond.
(noce_find_if_block): Initialize rev_cond.
(find_cond_trap): Call noce_get_condition with then_bb == trap_bb
instead of false as last argument never attempt to reverse it
afterwards.
From-SVN: r245690
2017-01-21 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/79663
* tree-predcom.c (combine_chains): Process refs in reverse order
only for ZERO length chains, and add explaining comment.
From-SVN: r245689
* include/experimental/iterator: Include <iterator>.
* testsuite/experimental/iterator/requirements.cc: Check for contents
of <iterator>.
From-SVN: r245686
2017-02-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/79683
* tree-vect-stmts.c (vect_analyze_stmt): Do not overwrite
vector types for data-refs.
* gcc.target/i386/pr79683.c: New testcase.
From-SVN: r245679
PR middle-end/79665
* internal-fn.c (get_range_pos_neg): Moved to ...
* tree.c (get_range_pos_neg): ... here. No longer static.
* tree.h (get_range_pos_neg): New prototype.
* expr.c (expand_expr_real_2) <case TRUNC_DIV_EXPR>: If both arguments
are known to be in between 0 and signed maximum inclusive, try to
expand both unsigned and signed divmod and use the cheaper one from
those.
From-SVN: r245676
PR tree-optimization/79578
* tree-ssa-dse.c (clear_bytes_written_by): Use operand_equal_p
to compare base operands.
PR tree-optimization/79578
* g++.dg/tree-ssa/ssa-dse-3.C: New test.
From-SVN: r245675
The fsel define_insn uses fpr_reg_operand for its predicates. This
won't work because passes can put a hard register in the operands: in
the testcase, combine likes to forward the parameter registers to what
then is still an smin, and then split1 uses "*s<minmax><mode>3_fpr"
(which has gpc_reg_operand). And then we have a GPR in the operand,
which does not match fpr_reg_operand.
It seems to me the predicates should be gpc_reg_operand here as well.
This patch changes that.
PR target/79211
* config/rs6000/rs6000.md (*fsel<SFDF:mode><SFDF2:mode>4): Use
gpc_reg_operand instead of fpr_reg_operand.
From-SVN: r245667
gcc/
* config/mips/mips.c (mips_return_in_memory): Force FP
vector types to be returned in memory for o32 ABI.
gcc/testsuite/
* gcc.target/mips/msa-fp-cc.c: New test.
From-SVN: r245666
* dwarf2out.c (gen_variable_die): For -gdwarf-5, use DW_TAG_variable
instead of DW_TAG_member for static data member declarations and don't
set no_linkage_name for static inline data members.
(gen_member_die): For -gdwarf-5 don't change DW_TAG_variable
to DW_TAG_member.
* g++.dg/debug/dwarf2/inline-var-2.C: New test.
From-SVN: r245661
2017-02-22 Martin Liska <mliska@suse.cz>
* doc/invoke.texi: Replace inequality signs with square brackets
for -Wnornalized.
2017-02-22 Martin Liska <mliska@suse.cz>
* c.opt: Replace inequality signs with square brackets
for -Wnornalized.
From-SVN: r245659
PR c++/79653
* parser.c (cp_parser_std_attribute_spec): Don't build the attribute
if the alignas expression is erroneous.
* pt.c (tsubst_attribute): If tsubst_pack_expansion fails, return
error_mark_node.
* g++.dg/cpp0x/alignas10.C: New test.
* g++.dg/cpp0x/alignas9.C: New test.
From-SVN: r245657
PR target/70465
* reg-stack.c (emit_swap_insn): Treat (float_extend:?F (mem:?F))
and (const_double:?F) like (mem:?F) for the purpose of fxch %st(1)
elimination by swapping fld*.
* gcc.target/i386/pr70465-2.c: New test.
From-SVN: r245654
2017-02-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/79673
* tree-ssa-pre.c (compute_avail): Use wide_int_to_tree to
convert the [TARGET_]MEM_REF offset INTEGER_CST, scrapping off
irrelevant address-space qualifiers and avoiding a
ADDR_SPACE_CONVERT_EXPR from fold_convert.
* gcc.target/i386/pr79673.c: New testcase.
From-SVN: r245649
2017-02-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/79666
* tree-vrp.c (extract_range_from_binary_expr_1): Make sure
to not symbolically negate if that may introduce undefined
overflow.
* gcc.dg/torture/pr79666.c: New testcase.
From-SVN: r245648
2017-02-22 Martin Liska <mliska@suse.cz>
PR lto/79587
* data-streamer-in.c (streamer_read_gcov_count): Remove assert.
* data-streamer-out.c (streamer_write_gcov_count_stream):
Likewise.
* value-prof.c (stream_out_histogram_value): Make assert more
precise based on type of counter.
2017-02-22 Martin Liska <mliska@suse.cz>
PR lto/79587
* gcc.dg/tree-prof/pr79587.c: New test.
From-SVN: r245647
PR c++/17729 - duplicate deprecated warning
* semantics.c (finish_id_expression): Only call mark_used on a
function if we aren't building a call.
From-SVN: r245643
PR c++/79654
* decl.c (cp_finish_decomp): Don't set decl's type to error_mark_node
on error.
* pt.c (tsubst_decomp_names): Return error_mark_node if the first
decl after the decomposition artificial decl has error_mark_node.
* decl2.c (prune_vars_needing_no_initialization): Use error_operand_p
instead of just == error_mark_node comparison.
* g++.dg/cpp1z/decomp26.C: New test.
Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>
From-SVN: r245639
PR sanitizer/79589
* decl.c: Include gimplify.h.
(cp_finish_decomp): Make sure there is no sharing of trees
in between DECL_VALUE_EXPR of decomposition decls.
* g++.dg/ubsan/pr79589.C: New test.
From-SVN: r245638
PR c++/79639
* constexpr.c (cxx_eval_store_expression): If *valp is a PTRMEM_CST,
call cplus_expand_constant on it first.
* g++.dg/cpp1y/constexpr-79639.C: New test.
From-SVN: r245635
PR target/79633
* tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
Use gimple_call_builtin_p.
* gcc.target/i386/mpx/pr79633.c: New test.
From-SVN: r245634
PR tree-optimization/79649
* tree-loop-distribution.c (classify_partition): Give up on
non-generic address space loads/stores.
* gcc.target/i386/pr79649.c: New test.
From-SVN: r245631