From: Jeff Law <law@redhat.com>
To: Ilya Enkovich <enkovich.gnu@gmail.com>,
Richard Biener <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Scalar masks 2/x] Use bool masks in if-conversion
Date: Tue, 25 Aug 2015 21:42:00 -0000 [thread overview]
Message-ID: <55DCE12C.3070300@redhat.com> (raw)
In-Reply-To: <CAMbmDYZ-dvygua8G0m6qCQ43YUNkG7DJZj7tRY2aXX4wV+_y1g@mail.gmail.com>
On 08/21/2015 04:49 AM, Ilya Enkovich wrote:
>
> I want a work with bitmasks to be expressed in a natural way using
> regular integer operations. Currently all masks manipulations are
> emulated via vector statements (mostly using a bunch of vec_cond). For
> complex predicates it may be nontrivial to transform it back to scalar
> masks and get an efficient code. Also the same vector may be used as
> both a mask and an integer vector. Things become more complex if you
> additionally have broadcasts and vector pack/unpack code. It also
> should be transformed into a scalar masks manipulations somehow.
Or why not model the conversion at the gimple level using a
CONVERT_EXPR? In fact, the more I think about it, that seems to make
more sense to me.
We pick a canonical form for the mask, whatever it may be. We use that
canonical form and model conversions between it and the other form via
CONVERT_EXPR. We then let DOM/PRE find/eliminate the redundant
conversions. If it's not up to the task, we should really look into why
and resolve.
Yes, that does mean we have two forms which I'm not terribly happy about
and it means some target dependencies on what the masked vector
operation looks like (ie, does it accept a simple integer or vector
mask), but I'm starting to wonder if, as distasteful as I find it, it's
the right thing to do.
>>
>> But I don't like changing our IL so much as to allow 'integer' masks everywhere.
I'm warming up to that idea...
jeff
next prev parent reply other threads:[~2015-08-25 21:42 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-17 16:27 Ilya Enkovich
2015-08-20 19:26 ` Jeff Law
2015-08-21 8:32 ` Richard Biener
2015-08-21 10:52 ` Ilya Enkovich
2015-08-21 11:15 ` Richard Biener
2015-08-21 12:19 ` Ilya Enkovich
2015-08-25 21:40 ` Jeff Law
2015-08-26 11:13 ` Ilya Enkovich
2015-08-26 13:09 ` Richard Biener
2015-08-26 13:21 ` Jakub Jelinek
2015-08-26 13:27 ` Richard Biener
2015-08-26 13:47 ` Jakub Jelinek
2015-08-26 14:36 ` Richard Biener
2015-08-26 14:51 ` Ilya Enkovich
2015-08-26 15:02 ` Richard Biener
2015-08-26 15:15 ` Jakub Jelinek
2015-08-26 16:09 ` Ilya Enkovich
2015-08-27 7:58 ` Richard Biener
2015-09-01 13:13 ` [RFC] Try vector<bool> as a new representation for vector masks Ilya Enkovich
2015-09-01 14:25 ` Richard Biener
[not found] ` <CAMbmDYafMuqzmRwRQfFHpLORFFGmFpfSRTR0QKx+LRFm6z75JQ@mail.gmail.com>
2015-09-03 12:12 ` Ilya Enkovich
2015-09-03 12:42 ` Richard Biener
2015-09-03 14:12 ` Ilya Enkovich
2015-09-18 12:29 ` Richard Biener
2015-09-18 13:44 ` Ilya Enkovich
2015-09-23 13:46 ` Ilya Enkovich
2015-09-23 14:10 ` Richard Biener
2015-09-23 18:51 ` Richard Henderson
2015-09-24 8:40 ` Richard Biener
2015-09-24 16:55 ` Richard Henderson
2015-09-25 8:51 ` Richard Biener
2015-09-25 14:57 ` Ilya Enkovich
2015-09-23 13:50 ` Richard Biener
2015-09-04 20:47 ` Jeff Law
2015-09-08 12:43 ` Ilya Enkovich
2015-09-15 13:55 ` Ilya Enkovich
2015-09-17 17:54 ` Richard Henderson
2015-09-18 13:26 ` Ilya Enkovich
2015-09-18 16:58 ` Richard Henderson
2015-09-21 12:21 ` Ilya Enkovich
2015-09-21 17:40 ` Richard Henderson
2015-09-18 12:45 ` Richard Biener
2015-09-18 13:55 ` Ilya Enkovich
2015-08-25 21:42 ` Jeff Law [this message]
2015-08-26 11:14 ` [Scalar masks 2/x] Use bool masks in if-conversion Ilya Enkovich
2015-08-26 13:12 ` Richard Biener
2015-08-26 16:58 ` Jeff Law
2015-08-21 15:57 ` Jeff Law
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=55DCE12C.3070300@redhat.com \
--to=law@redhat.com \
--cc=enkovich.gnu@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.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).