* [Patch] Fix vectorization test case.
@ 2010-08-18 14:15 tejas belagod
2010-08-18 14:24 ` Richard Guenther
0 siblings, 1 reply; 2+ messages in thread
From: tejas belagod @ 2010-08-18 14:15 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 467 bytes --]
Hi,
One of the loops in gcc/testsuite/gcc.dg/vect/vect-1.c is suspect. A
two-level nested loop in foo() uses the same index variable for both
loops, but uses a different variable to access the matrix inside the
loop. I presume this is a typo as this loop is expected to vectorize.
Attached is a patch that fixes this.
--
Tejas Belagod
ARM.
gcc/testsuite
2010-08-18 Tejas Belagod <tejas.belagod@arm.com>
* gcc.dg/vect/vect-1.c (foo): Change loop index variable.
[-- Attachment #2: vect-1.c.patch --]
[-- Type: text/x-patch, Size: 345 bytes --]
Index: vect-1.c
===================================================================
--- vect-1.c (revision 163337)
+++ vect-1.c (working copy)
@@ -37,7 +37,7 @@
/* Vectorizable. */
diff = 0;
for (i = 0; i < N; i++) {
- for (i = 0; i < N; i++) {
+ for (j = 0; j < N; j++) {
diff += (image[i][j] - block[i][j]);
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Patch] Fix vectorization test case.
2010-08-18 14:15 [Patch] Fix vectorization test case tejas belagod
@ 2010-08-18 14:24 ` Richard Guenther
0 siblings, 0 replies; 2+ messages in thread
From: Richard Guenther @ 2010-08-18 14:24 UTC (permalink / raw)
To: tejas belagod; +Cc: gcc-patches
On Wed, Aug 18, 2010 at 4:05 PM, tejas belagod <tejas.belagod@arm.com> wrote:
> Hi,
>
> One of the loops in gcc/testsuite/gcc.dg/vect/vect-1.c is suspect. A
> two-level nested loop in foo() uses the same index variable for both
> loops, but uses a different variable to access the matrix inside the
> loop. I presume this is a typo as this loop is expected to vectorize.
> Attached is a patch that fixes this.
Ok.
Thanks,
Richard.
> --
> Tejas Belagod
> ARM.
>
> gcc/testsuite
>
> 2010-08-18 Tejas Belagod <tejas.belagod@arm.com>
>
> * gcc.dg/vect/vect-1.c (foo): Change loop index variable.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-18 14:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-18 14:15 [Patch] Fix vectorization test case tejas belagod
2010-08-18 14:24 ` Richard Guenther
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).