diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-10-23 19:56:19 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@linaro.org> | 2017-10-23 19:56:19 +0100 |
commit | 7bef5b82e4109778a0988d20e19e1ed29dadd835 (patch) | |
tree | f5c594a5206e2b23c95741c1338fc1d11acffd25 /gcc/testsuite/gcc.dg/graphite/id-30.c | |
parent | 246229fdf9230ca040aa990a3fbb42698f30ae5f (diff) | |
parent | b11bf8d85f574c56cab353544b50396c18ab9b93 (diff) | |
download | gcc-7bef5b82e4109778a0988d20e19e1ed29dadd835.tar.gz |
Merge trunk into sve
Diffstat (limited to 'gcc/testsuite/gcc.dg/graphite/id-30.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/graphite/id-30.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/graphite/id-30.c b/gcc/testsuite/gcc.dg/graphite/id-30.c new file mode 100644 index 00000000000..f8144cec4f2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/id-30.c @@ -0,0 +1,16 @@ +/* The modulo constraints we generate for the niter expression + (unsinged long)ubound - (unsigned long)lbound + end up with a modulo that we cannot represent in the expression + type we are using (int64_t), so we run into the codegen error + where ISL generates a modulo/divide by sth that doesn't fit the + type we code-generate with. Verify we properly elide those. */ + +void foo (double *a, long int lbound0, long int ubound0, + long int lbound1, long int ubound1, long int stride1) +{ + if (lbound0 < ubound0) + for (long int i = lbound0; i <= ubound0; ++i) + if (lbound1 < ubound1) + for (long int j = lbound1; j <= ubound1; ++j) + a[i*stride1 + j] = 0.; +} |