This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] disentangle range_fold_*ary_expr into various pieces


On Mon, 7 Oct 2019 at 13:53, Aldy Hernandez <aldyh@redhat.com> wrote:

>
> > +bool
> > +ipa_vr::nonzero_p (tree expr_type) const
> > +{
> > +  if (type == VR_ANTI_RANGE && wi::eq_p (min, 0) && wi::eq_p (max, 0))
> > +    return true;
> > +
> > +  unsigned prec = TYPE_PRECISION (expr_type);
> > +  return (type == VR_RANGE
> > +         && wi::eq_p (min, wi::one (prec))
> > +         && wi::eq_p (max, wi::max_value (prec, TYPE_SIGN
> (expr_type))));
> > +}
>
> Errr, wrong version posted.  There was a TYPE_UNSIGNED missing.
>
> Fixed and committed.
>
>
Hi,

Since this was committed (r276654), I've noticed regressions on aarch64:
    gcc.target/aarch64/pr88838.c (test for excess errors)
    gcc.target/aarch64/stack-check-cfa-3.c (test for excess errors)
    gcc.target/aarch64/stack-check-prologue-16.c (test for excess errors)
    gcc.target/aarch64/sve/abs_1.c -march=armv8.2-a+sve
 scan-assembler-times \\tabs\\tz[0-9]+\\.b, p[0-7]/m, z[0-9]+\\.b\\n 1
    gcc.target/aarch64/sve/abs_1.c -march=armv8.2-a+sve
 scan-assembler-times \\tabs\\tz[0-9]+\\.d, p[0-7]/m, z[0-9]+\\.d\\n 1
    gcc.target/aarch64/sve/abs_1.c -march=armv8.2-a+sve
 scan-assembler-times \\tabs\\tz[0-9]+\\.h, p[0-7]/m, z[0-9]+\\.h\\n 1
    gcc.target/aarch64/sve/abs_1.c -march=armv8.2-a+sve
 scan-assembler-times \\tabs\\tz[0-9]+\\.s, p[0-7]/m, z[0-9]+\\.s\\n 1
    gcc.target/aarch64/sve/abs_1.c -march=armv8.2-a+sve (test for excess
errors)
    gcc.target/aarch64/sve/adr_1.c -march=armv8.2-a+sve (test for excess
errors)

and many others

For instance:
compiler exited with status 1
FAIL: gcc.target/aarch64/pr88838.c (internal compiler error)
FAIL: gcc.target/aarch64/pr88838.c (test for excess errors)
Excess errors:
during GIMPLE pass: dom
/gcc/testsuite/gcc.target/aarch64/pr88838.c:5:1: internal compiler error:
tree check: expected integer_cst, have poly_int_cst in to_wide, at
tree.h:5795
0x5efa71 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        /gcc/tree.c:9926
0x749584 tree_check(tree_node const*, char const*, int, char const*,
tree_code)
        /gcc/tree.h:3523
0x749584 wi::to_wide(tree_node const*)
        /gcc/tree.h:5795
0xf7c0c0 value_range_base::lower_bound(unsigned int) const
        /gcc/tree-vrp.c:6136
0x155d2e6 range_operator::fold_range(tree_node*, value_range_base const&,
value_range_base const&) const
        /gcc/range-op.cc:156
0xf87597 range_fold_binary_expr(value_range_base*, tree_code, tree_node*,
value_range_base const*, value_range_base const*)
        /gcc/tree-vrp.c:1915
0x1007962 vr_values::extract_range_from_binary_expr(value_range*,
tree_code, tree_node*, tree_node*, tree_node*)
        /gcc/vr-values.c:808
0x1011f0c vr_values::extract_range_from_assignment(value_range*, gassign*)
        /gcc/vr-values.c:1469
0x1499d21 evrp_range_analyzer::record_ranges_from_stmt(gimple*, bool)
        /gcc/gimple-ssa-evrp-analyze.c:307
0xdd76dd dom_opt_dom_walker::before_dom_children(basic_block_def*)
        /gcc/tree-ssa-dom.c:1503
0x146e68a dom_walker::walk(basic_block_def*)
        /gcc/domwalk.c:309
0xdd4759 execute
        /gcc/tree-ssa-dom.c:724

gcc.target/aarch64/pr88838.c: output file does not exist
UNRESOLVED: gcc.target/aarch64/pr88838.c scan-assembler-not sxtw

Christophe

diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
> index 20a0bddcbab..5020f4a44d5 100644
> --- a/gcc/ipa-prop.c
> +++ b/gcc/ipa-prop.c
> @@ -5117,6 +5117,7 @@ ipa_vr::nonzero_p (tree expr_type) const
>
>     unsigned prec = TYPE_PRECISION (expr_type);
>     return (type == VR_RANGE
> +         && TYPE_UNSIGNED (expr_type)
>            && wi::eq_p (min, wi::one (prec))
>            && wi::eq_p (max, wi::max_value (prec, TYPE_SIGN (expr_type))));
>   }
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]