public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/106878] [11/12/13 Regression] ICE: verify_gimple failed at -O2 with pointers and bitwise caluclation
Date: Wed, 14 Sep 2022 10:37:28 +0000	[thread overview]
Message-ID: <bug-106878-4-BV0CxH92Bb@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106878-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:645ef01a463f15fc230e2155719c7a12cec89acf

commit r13-2658-g645ef01a463f15fc230e2155719c7a12cec89acf
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Sep 14 12:36:36 2022 +0200

    Disallow pointer operands for |, ^ and partly & [PR106878]

    My change to match.pd (that added the two simplifications this patch
    touches) results in more |/^/& assignments with pointer arguments,
    but since r12-1608 we reject pointer operands for BIT_NOT_EXPR.

    Disallowing them for BIT_NOT_EXPR and allowing for BIT_{IOR,XOR,AND}_EXPR
    leads to a match.pd maintainance nightmare (see one of the patches in the
    PR), so either we want to allow pointer operand on BIT_NOT_EXPR (but then
    we run into issues e.g. with the ranger which expects it can emulate
    BIT_NOT_EXPR ~X as - 1 - X which doesn't work for pointers which don't
    support MINUS_EXPR), or the following patch disallows pointer arguments
    for all of BIT_{IOR,XOR,AND}_EXPR with the exception of BIT_AND_EXPR
    with INTEGER_CST last operand (for simpler pointer realignment).
    I had to tweak one reassoc optimization and the two match.pd
    simplifications.

    2022-09-14  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/106878
            * tree-cfg.cc (verify_gimple_assign_binary): Disallow pointer,
            reference or OFFSET_TYPE BIT_IOR_EXPR, BIT_XOR_EXPR or, unless
            the second argument is INTEGER_CST, BIT_AND_EXPR.
            * match.pd ((type) X op CST -> (type) (X op ((type-x) CST)),
            (type) (((type2) X) op Y) -> (X op (type) Y)): Punt for
            POINTER_TYPE_P or OFFSET_TYPE.
            * tree-ssa-reassoc.cc (optimize_range_tests_cmp_bitwise): For
            pointers cast them to pointer sized integers first.

            * gcc.c-torture/compile/pr106878.c: New test.

  parent reply	other threads:[~2022-09-14 10:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07 17:28 [Bug tree-optimization/106878] New: ICE: verify_gimple failed at -O2 on arm-none-eabi acoplan at gcc dot gnu.org
2022-09-07 17:39 ` [Bug tree-optimization/106878] [11/12/13 Regression] " pinskia at gcc dot gnu.org
2022-09-07 19:00 ` [Bug tree-optimization/106878] [11/12/13 Regression] ICE: verify_gimple failed at -O2 with pointers and bitwise caluclation acoplan at gcc dot gnu.org
2022-09-07 19:02 ` jakub at gcc dot gnu.org
2022-09-08  9:34 ` rguenth at gcc dot gnu.org
2022-09-08 13:38 ` jakub at gcc dot gnu.org
2022-09-08 13:58 ` jakub at gcc dot gnu.org
2022-09-08 14:00 ` jakub at gcc dot gnu.org
2022-09-08 14:05 ` jakub at gcc dot gnu.org
2022-09-13  8:29 ` jakub at gcc dot gnu.org
2022-09-14 10:37 ` cvs-commit at gcc dot gnu.org [this message]
2022-10-31 18:54 ` pinskia at gcc dot gnu.org
2022-10-31 18:55 ` pinskia at gcc dot gnu.org
2022-11-25 15:22 ` [Bug tree-optimization/106878] [11/12 Regression] ICE: verify_gimple failed at -O2 with pointers and bitwise calculation jakub at gcc dot gnu.org
2023-01-09 12:33 ` marxin at gcc dot gnu.org
2023-01-10  0:28 ` vvinayag at arm dot com
2023-04-27 12:01 ` rguenth at gcc dot gnu.org
2023-04-27 12:04 ` jakub at gcc dot gnu.org
2023-05-13  8:13 ` pinskia at gcc dot gnu.org
2023-05-29 10:07 ` jakub at gcc dot gnu.org
2023-10-19 13:56 ` acoplan at gcc dot gnu.org
2023-10-20  9:15 ` acoplan 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-106878-4-BV0CxH92Bb@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).