Add test-case (PR tree-optimization/66278).

Submitted by Martin Liška on April 20, 2017, 8:35 a.m.

Details

Message ID c4e7a118-0b49-fc15-ead5-943be6c9db6b@suse.cz
State New
Headers show

Commit Message

Martin Liška April 20, 2017, 8:35 a.m.
Hello.

The patch adds a new test-case for the mentioned PR. Tested on x86_64-linux-gnu
and ppc64le-linux-gnu.

Ready for trunk or should I postpone it for next stage1?
Martin

Comments

Bin.Cheng April 20, 2017, 1:04 p.m.
On Thu, Apr 20, 2017 at 9:35 AM, Martin Liška <mliska@suse.cz> wrote:
> Hello.
>
> The patch adds a new test-case for the mentioned PR. Tested on x86_64-linux-gnu
> and ppc64le-linux-gnu.
>
> Ready for trunk or should I postpone it for next stage1?
Though can't approve, I think it's ok since we are in stage 1 now,
also adding test is unlikely to affect RCs.
Thanks,
bin
> Martin
Mike Stump April 20, 2017, 9:31 p.m.
On Apr 20, 2017, at 6:04 AM, Bin.Cheng <amker.cheng@gmail.com> wrote:
> 
> On Thu, Apr 20, 2017 at 9:35 AM, Martin Liška <mliska@suse.cz> wrote:
>> Hello.
>> 
>> The patch adds a new test-case for the mentioned PR. Tested on x86_64-linux-gnu
>> and ppc64le-linux-gnu.
>> 
>> Ready for trunk or should I postpone it for next stage1?
> Though can't approve, I think it's ok since we are in stage 1 now,
> also adding test is unlikely to affect RCs.

Right, since we are in stage1 now, there is little reason to postpone any work the next stage 1 after the current stage 1.  :-)
Martin Liška April 21, 2017, 8:50 a.m.
On 04/20/2017 11:31 PM, Mike Stump wrote:
> On Apr 20, 2017, at 6:04 AM, Bin.Cheng <amker.cheng@gmail.com> wrote:
>>
>> On Thu, Apr 20, 2017 at 9:35 AM, Martin Liška <mliska@suse.cz> wrote:
>>> Hello.
>>>
>>> The patch adds a new test-case for the mentioned PR. Tested on x86_64-linux-gnu
>>> and ppc64le-linux-gnu.
>>>
>>> Ready for trunk or should I postpone it for next stage1?
>> Though can't approve, I think it's ok since we are in stage 1 now,
>> also adding test is unlikely to affect RCs.
> 
> Right, since we are in stage1 now, there is little reason to postpone any work the next stage 1 after the current stage 1.  :-)
> 

Yep, the test is installed as r247051.

Thanks,
Martin

Patch hide | download patch | download mbox

From 84335b09fd7626224148be8883edbaa42dcc496e Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Thu, 20 Apr 2017 09:54:02 +0200
Subject: [PATCH] Add test-case (PR tree-optimization/66278).

gcc/testsuite/ChangeLog:

2017-04-20  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/66278
	* gcc.dg/vect/pr66278.c: New test.
---
 gcc/testsuite/gcc.dg/vect/pr66278.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 gcc/testsuite/gcc.dg/vect/pr66278.c

diff --git a/gcc/testsuite/gcc.dg/vect/pr66278.c b/gcc/testsuite/gcc.dg/vect/pr66278.c
new file mode 100644
index 00000000000..3e0e2ec5e2b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr66278.c
@@ -0,0 +1,19 @@ 
+/* { dg-do compile } */
+#define N 101
+
+typedef unsigned int __uint32_t;
+
+int main(int argc, char **argv)
+{
+  __uint32_t array[N][N][N];
+
+  const unsigned int next = argc == 3 ? 0 : 1;
+
+  for (unsigned i = next; i < N;  i++)
+    array[3][3][i] = array[3][3][i] - 10;
+
+  return array[3][3][argc];
+}
+
+/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 1 "vect" } } */
+/* { dg-require-effective-target vect_int } */
-- 
2.12.2