public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Felix Yang <fei.yang0953@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	"dorit@il.ibm.com" <dorit@il.ibm.com>,
		Ira Rosen <irar@il.ibm.com>
Subject: Re: [PATCH] Fix for PR62037
Date: Wed, 13 Aug 2014 12:28:00 -0000	[thread overview]
Message-ID: <CAFc0fxz-ohRUOV8CSZcXc4J8rZc1WugfArXBa4tZ4LSyz3BCNA@mail.gmail.com> (raw)
In-Reply-To: <CAFiYyc1q3=xNQ2uAmRtupwqoXgge4Y08tVkSQmTGC0X03HE0cw@mail.gmail.com>

Hi Richard,

    Yeah, the testcase is there. Sorry for my mistake.
    Thank you for back-porting this patch to 4.8 & 4.9 branch.

Cheers,
Felix


On Wed, Aug 13, 2014 at 5:30 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Tue, Aug 12, 2014 at 6:40 PM, Felix Yang <fei.yang0953@gmail.com> wrote:
>> Hi Richard,
>>
>>     I find that you missed the testcase with when committing the patch.
>
> I don't think so.
>
>>     GCC 4.8 & 4.9 branch also has the same issue, may be we need to
>> fix for them too?
>
> Yeah, I'll backport it.
>
> Thanks,
> Richard.
>
>> Cheers,
>> Felix
>>
>>
>> On Mon, Aug 11, 2014 at 7:24 PM, Richard Biener
>> <richard.guenther@gmail.com> wrote:
>>> On Sat, Aug 9, 2014 at 6:28 AM, Felix Yang <fei.yang0953@gmail.com> wrote:
>>>> Attached please find the patch and testcase for PR62037.
>>>>
>>>> DEF1 can be a GIMPLE_NOP and gimple_bb will be NULL then. The patch
>>>> checks for that.
>>>> Bootstrapped on x86_64-suse-linux. OK for trunk? Please commit this
>>>> patch if it's OK.
>>>>
>>>
>>> Thanks - applied.
>>>
>>> Richard.
>>>
>>>> Index: gcc/ChangeLog
>>>> ===================================================================
>>>> --- gcc/ChangeLog    (revision 213772)
>>>> +++ gcc/ChangeLog    (working copy)
>>>> @@ -1,3 +1,9 @@
>>>> +2014-08-09  Felix Yang  <fei.yang0953@gmail.com>
>>>> +
>>>> +    PR tree-optimization/62073
>>>> +    * tree-vect-loop.c (vect_is_simple_reduction_1): Check that DEF1 has
>>>> +    a basic block.
>>>> +
>>>>  2014-08-08  Guozhi Wei  <carrot@google.com>
>>>>
>>>>      * config/rs6000/rs6000.md (*movdi_internal64): Add a new constraint.
>>>> Index: gcc/testsuite/gcc.dg/vect/pr62073.c
>>>> ===================================================================
>>>> --- gcc/testsuite/gcc.dg/vect/pr62073.c    (revision 0)
>>>> +++ gcc/testsuite/gcc.dg/vect/pr62073.c    (revision 0)
>>>> @@ -0,0 +1,41 @@
>>>> +/* { dg-do compile } */
>>>> +/* { dg-options "-O1 -ftree-vectorize" } */
>>>> +
>>>> +struct S0
>>>> +{
>>>> +    int f7;
>>>> +};
>>>> +struct S0 g_50;
>>>> +int g_70;
>>>> +int g_76;
>>>> +
>>>> +
>>>> +int foo (long long p_56, int * p_57)
>>>> +{
>>>> +    int *l_77;
>>>> +    int l_101;
>>>> +
>>>> +    for (; g_70;)
>>>> +    {
>>>> +        int **l_78 = &l_77;
>>>> +        if (g_50.f7)
>>>> +            continue;
>>>> +        *l_78 = 0;
>>>> +    }
>>>> +    for (g_76 = 1; g_76 >= 0; g_76--)
>>>> +    {
>>>> +        int *l_90;
>>>> +        for (l_101 = 4; l_101 >= 0; l_101--)
>>>> +            if (l_101)
>>>> +                *l_90 = 0;
>>>> +            else
>>>> +            {
>>>> +                int **l_113 = &l_77;
>>>> +                *l_113 = p_57;
>>>> +            }
>>>> +    }
>>>> +
>>>> +    return *l_77;
>>>> +}
>>>> +
>>>> +/* { dg-final { cleanup-tree-dump "vect" } } */
>>>> Index: gcc/testsuite/ChangeLog
>>>> ===================================================================
>>>> --- gcc/testsuite/ChangeLog    (revision 213772)
>>>> +++ gcc/testsuite/ChangeLog    (working copy)
>>>> @@ -1,3 +1,8 @@
>>>> +2014-08-09  Felix Yang  <fei.yang0953@gmail.com>
>>>> +
>>>> +    PR tree-optimization/62073
>>>> +    * gcc.dg/vect/pr62073.c: New test.
>>>> +
>>>>  2014-08-08  Richard Biener  <rguenther@suse.de>
>>>>
>>>>      * gcc.dg/strlenopt-8.c: Remove XFAIL.
>>>> Index: gcc/tree-vect-loop.c
>>>> ===================================================================
>>>> --- gcc/tree-vect-loop.c    (revision 213772)
>>>> +++ gcc/tree-vect-loop.c    (working copy)
>>>> @@ -2321,7 +2321,8 @@ vect_is_simple_reduction_1 (loop_vec_info loop_inf
>>>>          }
>>>>
>>>>        def1 = SSA_NAME_DEF_STMT (op1);
>>>> -      if (flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
>>>> +      if (gimple_bb (def1)
>>>> +          && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
>>>>            && loop->inner
>>>>            && flow_bb_inside_loop_p (loop->inner, gimple_bb (def1))
>>>>            && is_gimple_assign (def1))
>>>>
>>>>
>>>> Cheers,
>>>> Felix

      reply	other threads:[~2014-08-13 12:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-09  4:28 Felix Yang
2014-08-11 11:24 ` Richard Biener
2014-08-12 16:40   ` Felix Yang
2014-08-13  9:31     ` Richard Biener
2014-08-13 12:28       ` Felix Yang [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=CAFc0fxz-ohRUOV8CSZcXc4J8rZc1WugfArXBa4tZ4LSyz3BCNA@mail.gmail.com \
    --to=fei.yang0953@gmail.com \
    --cc=dorit@il.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=irar@il.ibm.com \
    --cc=richard.guenther@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).