From: Richard Biener <richard.guenther@gmail.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: will_schmidt@vnet.ibm.com, GCC Patches <gcc-patches@gcc.gnu.org>,
David Edelsohn <dje.gcc@gmail.com>,
Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Subject: Re: [PATCH, rs6000] Fold vector absolutes in GIMPLE
Date: Tue, 30 May 2017 07:05:00 -0000 [thread overview]
Message-ID: <CAFiYyc0zuReke-nrhq1aNMp1X33Avf6ttC+iAM6dyoOb4zt10Q@mail.gmail.com> (raw)
In-Reply-To: <20170529122120.GL19687@gate.crashing.org>
On Mon, May 29, 2017 at 2:21 PM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> On Mon, May 29, 2017 at 01:35:22PM +0200, Richard Biener wrote:
>> >> What's the documented behavior for vec_abs with respect to an
>> >argument
>> >> of value INT_MIN?
>> >
>> >The documentation says:
>> >
>> > "For integer vectors, the arithmetic is modular."
>>
>> This means that folding as ABS_EXPR is not safe for !TYPE_OVERFLOW_WRAPS
>> Integral vector types.
>
> Is it still fine if TYPE_OVERFLOW_UNDEFINED? So essentially always
> except with -ftrapv?
The docs say it needs to wrap so the correct check is TYPE_OVERFLOW_WRAPS.
It's not fine with TYPE_OVERFLOW_UNDEFINED as we will conclude the result
can never be INT_MIN while the spec says it can.
Richard.
>
>
> Segher
next prev parent reply other threads:[~2017-05-30 7:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 17:19 Will Schmidt
2017-05-29 8:39 ` Richard Biener
2017-05-29 10:29 ` Segher Boessenkool
2017-05-29 11:55 ` Richard Biener
2017-05-29 12:23 ` Segher Boessenkool
2017-05-30 7:05 ` Richard Biener [this message]
2017-05-31 14:02 ` Will Schmidt
2017-05-31 14:04 ` Richard Biener
2017-05-31 14:06 ` Ramana Radhakrishnan
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=CAFiYyc0zuReke-nrhq1aNMp1X33Avf6ttC+iAM6dyoOb4zt10Q@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=segher@kernel.crashing.org \
--cc=will_schmidt@vnet.ibm.com \
--cc=wschmidt@linux.vnet.ibm.com \
/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).