================ @@ -0,0 +1,44 @@ +/* + * Verify #pragma omp split counts(c1, c2, ...) at AST, IR, and runtime. + * counts(3, 5, 2) splits 10 iterations into: [0..3), [3..8), [8..10). + * Sum 0+1+...+9 = 45. + */ +// REQUIRES: x86-registered-target + +// 1) Syntax and semantics only +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -fopenmp-version=60 -fsyntax-only -verify %s +// expected-no-diagnostics + +// 2) AST dump should show OMPSplitDirective with OMPCountsClause node. +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -fopenmp-version=60 -ast-dump %s 2>&1 | FileCheck %s --check-prefix=AST + +// 3) Emit LLVM: three sequential loops (multiple phi/br for loop structure) +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -fopenmp-version=60 -emit-llvm %s -o - 2>&1 | FileCheck %s --check-prefix=IR + +// 4) Compile and run: exit 0 if sum == 45 +// RUN: %clang -fopenmp -fopenmp-version=60 -O0 %s -o %t.exe +// RUN: %t.exe ---------------- amitamd7 wrote:
Removed the end-to-end RUNs in previous commit: c4c7d8ff1c57b4d537b0a43b9a86cca97c2ee24c Noted this test addition as a TODO for now. https://github.com/llvm/llvm-project/pull/183261 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
