From: Richard Guenther <richard.guenther@gmail.com>
To: Kai Tietz <ktietz70@googlemail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Eric Botcazou <ebotcazou@adacore.com>
Subject: Re: [patch gimplifier]: Change TRUTH_(AND|OR|XOR) expressions to binary form
Date: Thu, 19 May 2011 12:31:00 -0000 [thread overview]
Message-ID: <BANLkTinv=33LGFz07OxRDbFV25=jDPnnpQ@mail.gmail.com> (raw)
In-Reply-To: <BANLkTinxTSmLC1VBfZpEhjRD6C9+rRGqZQ@mail.gmail.com>
On Wed, May 18, 2011 at 8:30 PM, Kai Tietz <ktietz70@googlemail.com> wrote:
> 2011/5/18 Kai Tietz <ktietz70@googlemail.com>:
>> Hello
>>
>> As follow-up for logical to binary transition
>>
>> 2011-05-18 Kai Tietz <ktietz@redhat.com>
>>
>> * tree-cfg.c (verify_gimple_assign_binary): Barf on
>> TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
>> (gimplify_expr): Boolify TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR,
>> TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR. Additionally
>> move TRUTH_AND|OR|XOR_EXPR to its binary form.
>>
>> Boostrapped for x86_64-pc-linux-gnu and regression tested for ada,
>> fortran, g++, and c. Ok for apply?
>
> Additional bootstrapped and regression tested for java, obj-c, and
> obj-c++. Regression tested alos libstdc++ and libjava. No regressions.
Please put a comment before
+
+ switch (TREE_CODE (*expr_p))
+ {
+ case TRUTH_AND_EXPR:
+ TREE_SET_CODE (*expr_p, BIT_AND_EXPR);
+ break;
+ case TRUTH_OR_EXPR:
+ TREE_SET_CODE (*expr_p, BIT_IOR_EXPR);
+ break;
+ case TRUTH_XOR_EXPR:
+ TREE_SET_CODE (*expr_p, BIT_XOR_EXPR);
+ break;
+ default:
+ break;
+ }
like
/* With two-valued operand types binary truth expressions are
semantically equivalent to bitwise binary expressions. Canonicalize
them to the bitwise variant. */
Eric, how will this interact with Ada boolean types with 8 bit precision
and those "invalid" values - will invalid values ever enter into
expressions or are they checked before? Can you think of something
that would break with s/TRUTH_*_EXPR/BIT_*_EXPR/ for Ada?
Thanks,
Richard.
> Regards,
> Kai
>
next prev parent reply other threads:[~2011-05-19 9:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-18 17:14 Kai Tietz
2011-05-18 19:35 ` Kai Tietz
2011-05-19 12:31 ` Richard Guenther [this message]
2011-05-19 12:57 ` Eric Botcazou
2011-05-19 12:59 ` Richard Guenther
2011-05-19 13:01 ` Kai Tietz
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='BANLkTinv=33LGFz07OxRDbFV25=jDPnnpQ@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ktietz70@googlemail.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).