[Openmp-commits] [openmp] [OpenMP][NFC] Explicit run-checks for OpenMP 6.0 loop-splitting (PR #221651)
Amit Tiwari via Openmp-commits
openmp-commits at lists.llvm.org
Sun Sep 6 23:44:33 PDT 2026
https://github.com/loopacino created https://github.com/llvm/llvm-project/pull/221651
Move OpenMP 6.0 test flag to RUN lines for loop splitting
>From 118c8852aee70e37ff57ab3711fa48f3a6c15c1d Mon Sep 17 00:00:00 2001
From: amtiwari <amtiwari at amd.com>
Date: Thu, 3 Sep 2026 17:10:45 -0400
Subject: [PATCH] put -fopenmp-version explicit
---
openmp/runtime/test/transform/split/fill_first.c | 3 ++-
openmp/runtime/test/transform/split/foreach.cpp | 3 ++-
openmp/runtime/test/transform/split/intfor.c | 3 ++-
openmp/runtime/test/transform/split/intfor_negstart.c | 3 ++-
openmp/runtime/test/transform/split/iterfor.cpp | 3 ++-
openmp/runtime/test/transform/split/leq_bound.c | 3 ++-
openmp/runtime/test/transform/split/lit.local.cfg | 5 -----
openmp/runtime/test/transform/split/negative_incr.c | 3 ++-
openmp/runtime/test/transform/split/nonconstant_incr.c | 3 ++-
openmp/runtime/test/transform/split/parallel-split-intfor.c | 3 ++-
openmp/runtime/test/transform/split/single_fill.c | 3 ++-
openmp/runtime/test/transform/split/three_segments.c | 3 ++-
openmp/runtime/test/transform/split/trip_one.c | 3 ++-
openmp/runtime/test/transform/split/unsigned_iv.c | 3 ++-
openmp/runtime/test/transform/split/zero_first_segment.c | 3 ++-
15 files changed, 28 insertions(+), 19 deletions(-)
delete mode 100644 openmp/runtime/test/transform/split/lit.local.cfg
diff --git a/openmp/runtime/test/transform/split/fill_first.c b/openmp/runtime/test/transform/split/fill_first.c
index 12568f6896d18..e0e78f269a80c 100644
--- a/openmp/runtime/test/transform/split/fill_first.c
+++ b/openmp/runtime/test/transform/split/fill_first.c
@@ -1,4 +1,5 @@
-// RUN: %libomp-compile-and-run | FileCheck %s --match-full-lines
+// RUN: %libomp-compile -fopenmp-version=60 && %libomp-run | FileCheck %s
+// --match-full-lines
#include <stdlib.h>
#include <stdio.h>
diff --git a/openmp/runtime/test/transform/split/foreach.cpp b/openmp/runtime/test/transform/split/foreach.cpp
index 846449b9d86ca..4f1461e4c69f3 100644
--- a/openmp/runtime/test/transform/split/foreach.cpp
+++ b/openmp/runtime/test/transform/split/foreach.cpp
@@ -1,4 +1,5 @@
-// RUN: %libomp-cxx-compile-and-run | FileCheck %s --match-full-lines
+// RUN: %libomp-cxx-compile -fopenmp-version=60 && %libomp-run | FileCheck %s
+// --match-full-lines
#include <cstdlib>
#include <cstdio>
diff --git a/openmp/runtime/test/transform/split/intfor.c b/openmp/runtime/test/transform/split/intfor.c
index 321fa5ca51f08..7d29d36941927 100644
--- a/openmp/runtime/test/transform/split/intfor.c
+++ b/openmp/runtime/test/transform/split/intfor.c
@@ -1,4 +1,5 @@
-// RUN: %libomp-compile-and-run | FileCheck %s --match-full-lines
+// RUN: %libomp-compile -fopenmp-version=60 && %libomp-run | FileCheck %s
+// --match-full-lines
#include <stdlib.h>
#include <stdio.h>
diff --git a/openmp/runtime/test/transform/split/intfor_negstart.c b/openmp/runtime/test/transform/split/intfor_negstart.c
index 1e3860bba2d53..4045bdda98347 100644
--- a/openmp/runtime/test/transform/split/intfor_negstart.c
+++ b/openmp/runtime/test/transform/split/intfor_negstart.c
@@ -1,4 +1,5 @@
-// RUN: %libomp-compile-and-run | FileCheck %s --match-full-lines
+// RUN: %libomp-compile -fopenmp-version=60 && %libomp-run | FileCheck %s
+// --match-full-lines
#include <stdlib.h>
#include <stdio.h>
diff --git a/openmp/runtime/test/transform/split/iterfor.cpp b/openmp/runtime/test/transform/split/iterfor.cpp
index 60ecbb374f6e3..12a70d860d823 100644
--- a/openmp/runtime/test/transform/split/iterfor.cpp
+++ b/openmp/runtime/test/transform/split/iterfor.cpp
@@ -1,4 +1,5 @@
-// RUN: %libomp-cxx20-compile-and-run | FileCheck %s --match-full-lines
+// RUN: %libomp-cxx20-compile -fopenmp-version=60 && %libomp-run | FileCheck %s
+// --match-full-lines
#include <cstdlib>
#include <cstdarg>
diff --git a/openmp/runtime/test/transform/split/leq_bound.c b/openmp/runtime/test/transform/split/leq_bound.c
index 81061fe430ae4..db956e43f4e4d 100644
--- a/openmp/runtime/test/transform/split/leq_bound.c
+++ b/openmp/runtime/test/transform/split/leq_bound.c
@@ -1,4 +1,5 @@
-// RUN: %libomp-compile-and-run | FileCheck %s --match-full-lines
+// RUN: %libomp-compile -fopenmp-version=60 && %libomp-run | FileCheck %s
+// --match-full-lines
#include <stdlib.h>
#include <stdio.h>
diff --git a/openmp/runtime/test/transform/split/lit.local.cfg b/openmp/runtime/test/transform/split/lit.local.cfg
deleted file mode 100644
index beb73ea04165d..0000000000000
--- a/openmp/runtime/test/transform/split/lit.local.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-# The split directive's counts clause requires OpenMP 6.0.
-for i, (pattern, replacement) in enumerate(config.substitutions):
- if pattern == "%openmp_flags":
- config.substitutions[i] = (pattern, replacement + " -fopenmp-version=60")
- break
diff --git a/openmp/runtime/test/transform/split/negative_incr.c b/openmp/runtime/test/transform/split/negative_incr.c
index ce537db067f06..665e89e97e173 100644
--- a/openmp/runtime/test/transform/split/negative_incr.c
+++ b/openmp/runtime/test/transform/split/negative_incr.c
@@ -1,4 +1,5 @@
-// RUN: %libomp-compile-and-run | FileCheck %s --match-full-lines
+// RUN: %libomp-compile -fopenmp-version=60 && %libomp-run | FileCheck %s
+// --match-full-lines
#include <stdlib.h>
#include <stdio.h>
diff --git a/openmp/runtime/test/transform/split/nonconstant_incr.c b/openmp/runtime/test/transform/split/nonconstant_incr.c
index d594a437f2ab2..4f9fb0843be87 100644
--- a/openmp/runtime/test/transform/split/nonconstant_incr.c
+++ b/openmp/runtime/test/transform/split/nonconstant_incr.c
@@ -1,4 +1,5 @@
-// RUN: %libomp-compile-and-run | FileCheck %s --match-full-lines
+// RUN: %libomp-compile -fopenmp-version=60 && %libomp-run | FileCheck %s
+// --match-full-lines
#include <stdlib.h>
#include <stdio.h>
diff --git a/openmp/runtime/test/transform/split/parallel-split-intfor.c b/openmp/runtime/test/transform/split/parallel-split-intfor.c
index 0b9bd7df5027e..9ca83a044b140 100644
--- a/openmp/runtime/test/transform/split/parallel-split-intfor.c
+++ b/openmp/runtime/test/transform/split/parallel-split-intfor.c
@@ -1,4 +1,5 @@
-// RUN: %libomp-compile-and-run | FileCheck %s --match-full-lines
+// RUN: %libomp-compile -fopenmp-version=60 && %libomp-run | FileCheck %s
+// --match-full-lines
#include <stdlib.h>
#include <stdio.h>
diff --git a/openmp/runtime/test/transform/split/single_fill.c b/openmp/runtime/test/transform/split/single_fill.c
index 4ef10bf3b4d26..d88573d6284a8 100644
--- a/openmp/runtime/test/transform/split/single_fill.c
+++ b/openmp/runtime/test/transform/split/single_fill.c
@@ -1,4 +1,5 @@
-// RUN: %libomp-compile-and-run | FileCheck %s --match-full-lines
+// RUN: %libomp-compile -fopenmp-version=60 && %libomp-run | FileCheck %s
+// --match-full-lines
#include <stdlib.h>
#include <stdio.h>
diff --git a/openmp/runtime/test/transform/split/three_segments.c b/openmp/runtime/test/transform/split/three_segments.c
index f34b640a86710..1a2df1fa0049c 100644
--- a/openmp/runtime/test/transform/split/three_segments.c
+++ b/openmp/runtime/test/transform/split/three_segments.c
@@ -1,4 +1,5 @@
-// RUN: %libomp-compile-and-run | FileCheck %s --match-full-lines
+// RUN: %libomp-compile -fopenmp-version=60 && %libomp-run | FileCheck %s
+// --match-full-lines
#include <stdlib.h>
#include <stdio.h>
diff --git a/openmp/runtime/test/transform/split/trip_one.c b/openmp/runtime/test/transform/split/trip_one.c
index 5f00d25239685..72f2118f5ade7 100644
--- a/openmp/runtime/test/transform/split/trip_one.c
+++ b/openmp/runtime/test/transform/split/trip_one.c
@@ -1,4 +1,5 @@
-// RUN: %libomp-compile-and-run | FileCheck %s --match-full-lines
+// RUN: %libomp-compile -fopenmp-version=60 && %libomp-run | FileCheck %s
+// --match-full-lines
// Tiny trip counts: trip=1 with counts(1, omp_fill) and trip=0.
diff --git a/openmp/runtime/test/transform/split/unsigned_iv.c b/openmp/runtime/test/transform/split/unsigned_iv.c
index ad096122d8cea..af8dffc40f267 100644
--- a/openmp/runtime/test/transform/split/unsigned_iv.c
+++ b/openmp/runtime/test/transform/split/unsigned_iv.c
@@ -1,4 +1,5 @@
-// RUN: %libomp-compile-and-run | FileCheck %s --match-full-lines
+// RUN: %libomp-compile -fopenmp-version=60 && %libomp-run | FileCheck %s
+// --match-full-lines
#include <stdlib.h>
#include <stdio.h>
diff --git a/openmp/runtime/test/transform/split/zero_first_segment.c b/openmp/runtime/test/transform/split/zero_first_segment.c
index 09cc526ed81ec..141bedd4783fa 100644
--- a/openmp/runtime/test/transform/split/zero_first_segment.c
+++ b/openmp/runtime/test/transform/split/zero_first_segment.c
@@ -1,4 +1,5 @@
-// RUN: %libomp-compile-and-run | FileCheck %s --match-full-lines
+// RUN: %libomp-compile -fopenmp-version=60 && %libomp-run | FileCheck %s
+// --match-full-lines
#include <stdlib.h>
#include <stdio.h>
More information about the Openmp-commits
mailing list