public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/110461] [14 regression] ICE when building openh264 with new vector_type checking
Date: Thu, 29 Jun 2023 07:13:32 +0000 [thread overview]
Message-ID: <bug-110461-4-RG1CJk1u0m@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110461-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110461
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> Yes it is that pattern, specifically :
> /* Try to fold (type) X op CST -> (type) (X op ((type-x) CST))
> when profitable.
> For bitwise binary operations apply operand conversions to the
> binary operation result instead of to the operands. This allows
> to combine successive conversions and bitwise binary operations.
> We combine the above two cases by using a conditional convert. */
> (for bitop (bit_and bit_ior bit_xor)
> (simplify
> (bitop (convert@2 @0) (convert?@3 @1))
> (if (((TREE_CODE (@1) == INTEGER_CST
> && INTEGRAL_TYPE_P (TREE_TYPE (@0))
> && (int_fits_type_p (@1, TREE_TYPE (@0))
> || tree_nop_conversion_p (TREE_TYPE (@0), type)))
> || types_match (@0, @1))
> && !POINTER_TYPE_P (TREE_TYPE (@0))
> && TREE_CODE (TREE_TYPE (@0)) != OFFSET_TYPE
> /* ??? This transform conflicts with fold-const.cc doing
> Convert (T)(x & c) into (T)x & (T)c, if c is an integer
> constants (if x has signed type, the sign bit cannot be set
> in c). This folds extension into the BIT_AND_EXPR.
> Restrict it to GIMPLE to avoid endless recursions. */
> && (bitop != BIT_AND_EXPR || GIMPLE)
> && (/* That's a good idea if the conversion widens the operand, thus
> after hoisting the conversion the operation will be narrower.
> It is also a good if the conversion is a nop as moves the
> conversion to one side; allowing for combining of the
> conversions. */
> TYPE_PRECISION (TREE_TYPE (@0)) < TYPE_PRECISION (type)
> /* The conversion check for being a nop can only be done at the
> gimple
> level as fold_binary has some re-association code which can
> conflict
> with this if there is a "constant" which is not a full
> INTEGER_CST. */
> || (GIMPLE && TYPE_PRECISION (TREE_TYPE (@0)) == TYPE_PRECISION
> (type))
>
> Those 2 above TYPE_PRECISION .
For vectors this also lacks a check the resulting bit operation is supported.
I'm testing a patch.
next prev parent reply other threads:[~2023-06-29 7:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 16:46 [Bug tree-optimization/110461] New: " sjames at gcc dot gnu.org
2023-06-28 16:51 ` [Bug tree-optimization/110461] " pinskia at gcc dot gnu.org
2023-06-28 16:51 ` pinskia at gcc dot gnu.org
2023-06-28 17:29 ` sjames at gcc dot gnu.org
2023-06-28 17:39 ` pinskia at gcc dot gnu.org
2023-06-28 17:44 ` pinskia at gcc dot gnu.org
2023-06-28 17:51 ` pinskia at gcc dot gnu.org
2023-06-28 19:07 ` pinskia at gcc dot gnu.org
2023-06-28 22:16 ` dcb314 at hotmail dot com
2023-06-28 22:19 ` pinskia at gcc dot gnu.org
2023-06-28 22:20 ` seurer at gcc dot gnu.org
2023-06-29 4:03 ` pinskia at gcc dot gnu.org
2023-06-29 7:13 ` rguenth at gcc dot gnu.org [this message]
2023-06-29 7:13 ` rguenth at gcc dot gnu.org
2023-06-29 7:43 ` dcb314 at hotmail dot com
2023-06-29 8:14 ` cvs-commit at gcc dot gnu.org
2023-06-29 8:14 ` rguenth 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-110461-4-RG1CJk1u0m@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).