From: James Greenhalgh <james.greenhalgh@arm.com>
To: Bin Cheng <Bin.Cheng@arm.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>, nd <nd@arm.com>
Subject: Re: [Patch AArch64 2/2]Add missing vcond by rewriting it with vcond_mask/vec_cmp patterns.
Date: Tue, 21 Jun 2016 14:38:00 -0000 [thread overview]
Message-ID: <20160621143803.GA37847@arm.com> (raw)
In-Reply-To: <DB5PR08MB1144D56F64725BA9E00FC21CE7550@DB5PR08MB1144.eurprd08.prod.outlook.com>
On Wed, Jun 15, 2016 at 09:22:20AM +0000, Bin Cheng wrote:
> + rtx mask = gen_reg_rtx (<V_cmp_result>mode);
> + enum rtx_code code = GET_CODE (operands[3]);
> +
> + emit_insn (gen_vec_cmp<mode><v_cmp_result>_internal (mask, operands[3],
> + operands[4], operands[5]));
> + /* See comments of vec_cmp<mode><v_cmp_result>_internal, the opposite
> + result masks are computed for below operators, we need to invert
> + the mask here. In this case we can save an inverting instruction
> + by simply swapping the two operands to bsl. */
> + if (code == NE || code == UNEQ || code == UNLT || code == UNLE
> + || code == UNGT || code == UNGE || code == UNORDERED)
> + std::swap (operands[1], operands[2]);
With regards to my comments on patch 1/2 - do you not get the same code-gen
if you change those functions to always generate the correct mask, and add
a second invert here before swapping the operands. The two mask inverts
should simplify to nothing, and you'd clean up the design?
Thanks,
James
prev parent reply other threads:[~2016-06-21 14:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 9:22 Bin Cheng
2016-06-21 14:38 ` James Greenhalgh [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=20160621143803.GA37847@arm.com \
--to=james.greenhalgh@arm.com \
--cc=Bin.Cheng@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nd@arm.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).