aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-11-16 10:19:22 +0100
committerJakub Jelinek <jakub@redhat.com>2021-11-16 10:19:22 +0100
commit47de0b56ee455ec82ec7d61a20988f11b67aa4e9 (patch)
treeddc094cef4723dd77816e24afa6b9c2db259d0dd /gcc/testsuite
parenteacdfaf7ca07367ede1a0c50aa997953958dabae (diff)
downloadgcc-47de0b56ee455ec82ec7d61a20988f11b67aa4e9.zip
gcc-47de0b56ee455ec82ec7d61a20988f11b67aa4e9.tar.gz
gcc-47de0b56ee455ec82ec7d61a20988f11b67aa4e9.tar.bz2
openmp: Regimplify operands of GIMPLE_COND in a few more places [PR103208]
As the testcase shows, the non-rectangular loop expansion code didn't try to regimplify operands of GIMPLE_CONDs it built in some cases. I have added a helper function which does that and used it in some places that were regimplifying already to simplify those spots, plus added it in a couple of other places where it was needed. 2021-11-16 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/103208 * omp-expand.c (expand_omp_build_cond): New function. (expand_omp_for_init_counts, expand_omp_for_init_vars, expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Use it. * c-c++-common/gomp/loop-11.c: New test.
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/c-c++-common/gomp/loop-11.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/gomp/loop-11.c b/gcc/testsuite/c-c++-common/gomp/loop-11.c
new file mode 100644
index 0000000..5076e65
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/loop-11.c
@@ -0,0 +1,5 @@
+/* PR tree-optimization/103208 */
+/* { dg-do compile } */
+/* { dg-additional-options "-O2 -fwrapv" } */
+
+#include "loop-8.c"