From: Jeff Law <jeffreyalaw@gmail.com>
To: Alexander Monakov <amonakov@ispras.ru>,
"Kong, Lingling" <lingling.kong@intel.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
"Liu, Hongtao" <hongtao.liu@intel.com>,
Uros Bizjak <ubizjak@gmail.com>
Subject: Re: [PATCH 0/3] [APX CFCMOV] Support APX CFCMOV
Date: Fri, 14 Jun 2024 11:22:11 -0600 [thread overview]
Message-ID: <1d06e4aa-6e76-4e8a-b9bb-3ec6af05c779@gmail.com> (raw)
In-Reply-To: <bc075cca-fb13-e411-38ac-4cc94777f157@ispras.ru>
On 6/14/24 11:10 AM, Alexander Monakov wrote:
>
> On Fri, 14 Jun 2024, Kong, Lingling wrote:
>
>> APX CFCMOV[1] feature implements conditionally faulting which means that all memory faults are suppressed
>> when the condition code evaluates to false and load or store a memory operand. Now we could load or store a
>> memory operand may trap or fault for conditional move.
>>
>> In middle-end, now we don't support a conditional move if we knew that a load
>> from A or B could trap or fault.
>
> Predicated loads&stores on Itanium don't trap either. They are modeled via
> COND_EXEC on RTL. The late if-conversion pass (the instance that runs after
> reload) is capable of introducing them.
>
>> To enable CFCMOV, we add a target HOOK TARGET_HAVE_CONDITIONAL_MOVE_MEM_NOTRAP
>> in if-conversion pass to allow convert to cmov.
>
> Considering the above, is the new hook really necessary? Can you model the new
> instructions via (cond_exec () (set ...)) instead of (set (if_then_else ...)) ?
Note that turning on cond_exec will turn off some of the cmove support.
But the general suggesting of trying to avoid a hook for this is a good
one. In fact, my first reaction to this thread was "do we really need a
hook for this".
jeff
next prev parent reply other threads:[~2024-06-14 17:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240614025749.743388-1-lingling.kong@intel.com>
2024-06-14 3:11 ` Kong, Lingling
2024-06-14 6:52 ` Richard Biener
2024-06-14 6:58 ` Liu, Hongtao
2024-06-14 8:10 ` Richard Biener
2024-06-14 17:10 ` Alexander Monakov
2024-06-14 17:22 ` Jeff Law [this message]
2024-06-17 3:04 ` Hongtao Liu
2024-06-18 7:40 ` [PATCH v2 0/2] " Kong, Lingling
[not found] ` <20240614025749.743388-2-lingling.kong@intel.com>
2024-06-14 3:11 ` [PATCH 1/3] [APX CFCMOV] Add a new target hook: TARGET_HAVE_CONDITIONAL_MOVE_MEM_NOTRAP Kong, Lingling
[not found] ` <20240614025749.743388-3-lingling.kong@intel.com>
2024-06-14 3:11 ` [PATCH 2/3] [APX CFCMOV] Support APX CFCMOV in if_convert pass Kong, Lingling
[not found] ` <20240614025749.743388-4-lingling.kong@intel.com>
2024-06-14 3:11 ` [PATCH 3/3] [APX CFCMOV] Support APX CFCMOV in backend Kong, Lingling
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=1d06e4aa-6e76-4e8a-b9bb-3ec6af05c779@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=amonakov@ispras.ru \
--cc=gcc-patches@gcc.gnu.org \
--cc=hongtao.liu@intel.com \
--cc=lingling.kong@intel.com \
--cc=ubizjak@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).