This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ delayed folding branch review
- From: Jason Merrill <jason at redhat dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: Kai Tietz <ktietz at redhat dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 27 Aug 2015 22:11:52 -0400
- Subject: Re: C++ delayed folding branch review
- Authentication-results: sourceware.org; auth=none
- References: <557A5214 dot 7060106 at redhat dot com> <CAEwic4ZQomb_en7o4=n40j8cHU6-TXmhoSOZZOshiw1Pkgi0Bg at mail dot gmail dot com> <CAEwic4YufFNkdjaXxW0e1ExaGJk0xWwT8FJfiekJWa_mzVsxOQ at mail dot gmail dot com> <55B911DD dot 30105 at redhat dot com> <CAEwic4Z-MgOwdyY_GTP+hGrK6qHgRoys8d4Tj_kHMri7oGuqHQ at mail dot gmail dot com> <55BA5667 dot 9040200 at redhat dot com> <CAEwic4apQgQzSWU6Rbyn-OnBqTu_ADrCm-2Fsc2iPsm_NhUr_g at mail dot gmail dot com> <55BAACF9 dot 7040707 at redhat dot com> <597173047 dot 4338388 dot 1438379666336 dot JavaMail dot zimbra at redhat dot com> <55BEE4CE dot 9070706 at redhat dot com> <CAEwic4aQeu6c88q+RfZ=mGu6tObjzq9tWR4YgRnxCjk2PG=cXQ at mail dot gmail dot com> <55BF8B2B dot 9040001 at redhat dot com> <CAEwic4aN=BVPQkg03u257v=wRc1j5G4e91ahf0g4BBfhUUyhMg at mail dot gmail dot com> <55DE7C55 dot 6030207 at redhat dot com> <CAEwic4ZoKOnXi2oMoJXFsr-e+duL0KtwJ22WBTN7DGcwX3A8qg at mail dot gmail dot com> <55DF1042 dot 9020603 at redhat dot com> <CAEwic4Z5X0BTV1-S3M77uree3+E8KgLLwESaTjZT-j8E5FmTyA at mail dot gmail dot com> <CAEwic4YJkbKPTs5t4fE08xZQ3QuUi_eqA_b+3N_46p8S9v3Ddg at mail dot gmail dot com>
On 08/27/2015 02:12 PM, Kai Tietz wrote:
+ 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;
+ }
+ }
I would drop the check on 'code' and add a check that
TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (arg1))
Does that still pass?
Jason