Commit 85d5b033 by Richard Biener Committed by Richard Biener

pr65947-14.c: New testcase.

2017-06-22  Richard Biener  <rguenther@suse.de>

	* gcc.dg/vect/pr65947-14.c: New testcase.

From-SVN: r249500
parent 8dc877eb
2017-06-22 Richard Biener <rguenther@suse.de>
* gcc.dg/vect/pr65947-14.c: New testcase.
2017-06-21 Michael Meissner <meissner@linux.vnet.ibm.com> 2017-06-21 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/80510 PR target/80510
......
/* { dg-require-effective-target vect_condition } */
#include "tree-vect.h"
extern void abort (void) __attribute__ ((noreturn));
#define N 27
/* Condition reduction with matches only in even lanes at runtime. */
int
condition_reduction (int *a, int min_v)
{
int last = N + 96;
for (int i = 0; i < N; i++)
if (a[i] > min_v)
last = i;
return last;
}
int
main (void)
{
int a[N] = {
47, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
21, 22, 23, 24, 25, 26, 27
};
check_vect ();
int ret = condition_reduction (a, 46);
/* loop should have found a value of 0, not default N + 96. */
if (ret != 0)
abort ();
return 0;
}
/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" { xfail { ! vect_max_reduc } } } */
/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 4 "vect" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment