diff mbox

[PR43378] Add test case for the issue

Message ID 000101d04430$73df7e10$5b9e7a30$@arm.com
State New
Headers show

Commit Message

Bin Cheng Feb. 9, 2015, 6:20 a.m. UTC
And the missed patch.

Thanks,
bin

> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
> owner@gcc.gnu.org] On Behalf Of Bin Cheng
> Sent: Monday, February 09, 2015 2:07 PM
> To: gcc-patches@gcc.gnu.org
> Subject: [PATCH PR43378]Add test case for the issue
> 
> Hi,
> I crossed to PR43378 and found it had already been fixed on trunk long
> before.  I am adding a test case and going to close it after this patch.
> The case is tested, Is it OK?
> 
> 2015-02-09  Bin Cheng  <bin.cheng@arm.com>
> 
> 	PR tree-optimization/43378
> 	* gcc.dg/tree-ssa/pr43378.c: New test.
> 
> 
>

Comments

Richard Biener Feb. 9, 2015, 1:24 p.m. UTC | #1
On Mon, Feb 9, 2015 at 7:20 AM, Bin Cheng <bin.cheng@arm.com> wrote:
> And the missed patch.
>
> Thanks,
> bin
>
>> -----Original Message-----
>> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-
>> owner@gcc.gnu.org] On Behalf Of Bin Cheng
>> Sent: Monday, February 09, 2015 2:07 PM
>> To: gcc-patches@gcc.gnu.org
>> Subject: [PATCH PR43378]Add test case for the issue
>>
>> Hi,
>> I crossed to PR43378 and found it had already been fixed on trunk long
>> before.  I am adding a test case and going to close it after this patch.
>> The case is tested, Is it OK?

Ok.

Thanks,
Richard.

>> 2015-02-09  Bin Cheng  <bin.cheng@arm.com>
>>
>>       PR tree-optimization/43378
>>       * gcc.dg/tree-ssa/pr43378.c: New test.
>>
>>
>>
diff mbox

Patch

Index: gcc/testsuite/gcc.dg/tree-ssa/pr43378.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/pr43378.c	(revision 0)
+++ gcc/testsuite/gcc.dg/tree-ssa/pr43378.c	(revision 0)
@@ -0,0 +1,17 @@ 
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-ivopts" } */
+
+void bar (int, int, int);
+void foo (int left, int rite, int element)
+{
+  while (left <= rite)
+    {
+      rite -= element;
+      bar (left, rite, element);
+      left += element;
+    }
+}
+
+/* { dg-final { scan-tree-dump-times "rite_\[0-9\]* = rite_\[0-9\]* - element" 1 "ivopts"} } */
+/* { dg-final { scan-tree-dump-times "left_\[0-9\]* = left_\[0-9\]* \\+ element|left_\[0-9\]* = element_\[0-9\]*\\(D\\) \\+ left" 1 "ivopts"} } */
+/* { dg-final { cleanup-tree-dump "ivopts" } } */