From: Kai Tietz <ktietz70@googlemail.com>
To: Jason Merrill <jason@redhat.com>
Cc: Kai Tietz <ktietz@redhat.com>,
gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: C++ delayed folding branch review
Date: Thu, 27 Aug 2015 18:15:00 -0000 [thread overview]
Message-ID: <CAEwic4YJkbKPTs5t4fE08xZQ3QuUi_eqA_b+3N_46p8S9v3Ddg@mail.gmail.com> (raw)
In-Reply-To: <CAEwic4Z5X0BTV1-S3M77uree3+E8KgLLwESaTjZT-j8E5FmTyA@mail.gmail.com>
With following patch testcase passes:
Index: fold-const.c
===================================================================
--- fold-const.c (Revision 227111)
+++ fold-const.c (Arbeitskopie)
@@ -2110,6 +2110,17 @@ fold_convert_const (enum tree_code code, tree type
else if (TREE_CODE (arg1) == REAL_CST)
return fold_convert_const_fixed_from_real (type, arg1);
}
+ else if (TREE_CODE (type) == VECTOR_TYPE)
+ {
+ if (TREE_CODE (arg1) == VECTOR_CST
+ && code == NOP_EXPR
+ && TYPE_VECTOR_SUBPARTS (type) == VECTOR_CST_NELTS (arg1))
+ {
+ tree r = copy_node (arg1);
+ TREE_TYPE (arg1) = type;
+ return r;
+ }
+ }
return NULL_TREE;
}
Index: cp/constexpr.c
===================================================================
--- constexpr.c (Revision 227111)
+++ constexpr.c (Arbeitskopie)
@@ -1441,8 +1441,6 @@ cxx_eval_call_expression (const constexpr_ctx *ctx
bool
reduced_constant_expression_p (tree t)
{
- /* Make sure we remove useless initial NOP_EXPRs. */
- STRIP_NOPS (t);
switch (TREE_CODE (t))
{
case PTRMEM_CST:
next prev parent reply other threads:[~2015-08-27 18:12 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 5:41 Jason Merrill
2015-06-12 16:17 ` Kai Tietz
2015-06-13 7:58 ` Jason Merrill
2015-07-27 19:01 ` Jason Merrill
2015-07-28 2:40 ` Kai Tietz
2015-07-28 20:35 ` Kai Tietz
2015-07-29 18:48 ` Jason Merrill
2015-07-29 23:03 ` Kai Tietz
2015-07-30 14:40 ` Kai Tietz
2015-07-30 18:41 ` Jason Merrill
2015-07-30 21:33 ` Kai Tietz
2015-07-31 0:43 ` Jason Merrill
2015-07-31 7:08 ` Jeff Law
2015-07-31 23:00 ` Kai Tietz
2015-08-03 3:49 ` Jason Merrill
2015-08-03 9:42 ` Kai Tietz
2015-08-03 15:39 ` Jason Merrill
2015-08-24 7:20 ` Kai Tietz
2015-08-27 2:57 ` Jason Merrill
2015-08-27 10:54 ` Kai Tietz
2015-08-27 13:35 ` Jason Merrill
2015-08-27 13:44 ` Kai Tietz
2015-08-27 18:15 ` Kai Tietz [this message]
2015-08-28 3:03 ` Jason Merrill
2015-08-28 7:43 ` Kai Tietz
2015-08-28 11:18 ` Kai Tietz
2015-08-28 2:12 ` Jason Merrill
2015-07-31 4:00 ` Jeff Law
2015-07-31 16:26 ` Jason Merrill
2015-07-31 16:43 ` Kai Tietz
2015-07-31 16:52 ` Jakub Jelinek
2015-07-31 16:53 ` Jason Merrill
2015-07-31 21:31 ` Kai Tietz
-- strict thread matches above, loose matches on Subject: below --
2015-04-24 4:23 Jason Merrill
2015-04-24 13:46 ` Kai Tietz
2015-04-24 18:25 ` Jason Merrill
2015-04-28 12:06 ` Kai Tietz
2015-04-28 13:57 ` Jason Merrill
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=CAEwic4YJkbKPTs5t4fE08xZQ3QuUi_eqA_b+3N_46p8S9v3Ddg@mail.gmail.com \
--to=ktietz70@googlemail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=ktietz@redhat.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).