public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/66630] Missing ubsan/ftrapv error
Date: Wed, 03 Apr 2024 04:59:43 +0000 [thread overview]
Message-ID: <bug-66630-4-lOmCIeBa3M@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-66630-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66630
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #2)
> That's one thing. But there also something else going on. I hope it's just
> missing TYPE_OVERFLOW_SANITIZED in some match.pd patterns.
```
/* ~A + A -> -1 */
(simplify
(plus:c (convert? (bit_not @0)) (convert? @0))
(if (!TYPE_OVERFLOW_TRAPS (type))
(convert { build_all_ones_cst (TREE_TYPE (@0)); })))
/* ~A + 1 -> -A */
(simplify
(plus (convert? (bit_not @0)) integer_each_onep)
(if (tree_nop_conversion_p (type, TREE_TYPE (@0)))
(negate (convert @0))))
/* -A - 1 -> ~A */
(simplify
(minus (convert? (negate @0)) integer_each_onep)
(if (!TYPE_OVERFLOW_TRAPS (type)
&& TREE_CODE (type) != COMPLEX_TYPE
&& tree_nop_conversion_p (type, TREE_TYPE (@0)))
(bit_not (convert @0))))
/* -1 - A -> ~A */
(simplify
(minus integer_all_onesp @0)
(if (TREE_CODE (type) != COMPLEX_TYPE)
(bit_not @0)))
```
I am not sure which one of these patterns need the check for
TYPE_OVERFLOW_SANITIZED though.
prev parent reply other threads:[~2024-04-03 4:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 16:46 [Bug middle-end/66630] New: " mpolacek at gcc dot gnu.org
2015-06-22 16:53 ` [Bug middle-end/66630] " pinskia at gcc dot gnu.org
2015-06-22 16:55 ` mpolacek at gcc dot gnu.org
2015-06-23 8:22 ` rguenth at gcc dot gnu.org
2021-07-19 22:54 ` pinskia at gcc dot gnu.org
2024-04-03 4:59 ` pinskia at gcc dot gnu.org [this message]
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-66630-4-lOmCIeBa3M@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).