public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/99726] [10/11 Regression] ICE in create_intersect_range_checks_index, at tree-data-ref.c:1855 since r10-4762-gf9d6338bd15ce1fae36bf25d3a0545e9678ddc58
Date: Mon, 29 Mar 2021 16:31:10 +0000	[thread overview]
Message-ID: <bug-99726-4-wkZ0WFWNC8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99726-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99726

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
And -flive-patching=inline-clone -mavx512f -O2 -floop-nest-optimize
-ftree-loop-vectorize -ftrapv -m32
is sufficient to trigger it.
I'm afraid I'm lost in what exactly the code wants to do.
dr_a.dr:
#(Data Ref: 
#  bb: 57 
#  stmt: _231 = a[_238][_242];
#  ref: a[_238][_242];
#  base_object: a;
#  Access function 0: {(unsigned int) (_239 - graphite_IV.18_206) + 2, +,
4294967295}_6
#  Access function 1: {((unsigned int) (graphite_IV.18_206 + _234) + e.6_19) +
4294967295, +, 1}_6
#)
dr_b.dr:
#(Data Ref: 
#  bb: 57 
#  stmt: a[_250][_254] = _243;
#  ref: a[_250][_254];
#  base_object: a;
#  Access function 0: {(unsigned int) (_251 - graphite_IV.18_206) + 1, +,
4294967295}_6
#  Access function 1: {(unsigned int) (graphite_IV.18_206 + _247) + e.6_19, +,
1}_6
#)

DR_STEP (dr_a.dr) == DR_STEP (dr_b.dr) == 4092, so it is not neg_step:
  bool neg_step = tree_int_cst_compare (DR_STEP (dr_a.dr), size_zero_node) < 0;

      /* Index must evaluate in the same direction as DR.  */
      gcc_assert (!neg_step || tree_int_cst_sign_bit (idx_step) == 1);
but this doesn't check anything if neg_step is false, rather than ensuring it
has the same direction.
And
      offset_int abs_idx_step = offset_int::from (wi::to_wide (idx_step),
                                                  SIGNED);
      if (neg_step)
        abs_idx_step = -abs_idx_step;
offset_int::from will treat the unsigned int idx_step of -1U as -1 and the
asserts fail because it is not non-negative.

  parent reply	other threads:[~2021-03-29 16:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 10:59 [Bug tree-optimization/99726] New: " marxin at gcc dot gnu.org
2021-03-23 10:59 ` [Bug tree-optimization/99726] " marxin at gcc dot gnu.org
2021-03-24  8:31 ` rguenth at gcc dot gnu.org
2021-03-29 16:12 ` jakub at gcc dot gnu.org
2021-03-29 16:31 ` jakub at gcc dot gnu.org [this message]
2021-03-30 12:08 ` rsandifo at gcc dot gnu.org
2021-03-31 18:34 ` cvs-commit at gcc dot gnu.org
2021-03-31 20:36 ` [Bug tree-optimization/99726] [10 " rsandifo at gcc dot gnu.org
2021-04-02  8:09 ` cvs-commit at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-04-23  9:10 ` cvs-commit at gcc dot gnu.org
2021-04-23  9:11 ` rsandifo at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-99726-4-wkZ0WFWNC8@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).