[clang] [llvm] [mlir] [openmp] [Clang][OpenMP] Canonicalize Intra-tiles in Loop Tiling (PR #191114)
Michael Kruse via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 6 06:45:48 PDT 2026
================
@@ -0,0 +1,51 @@
+// RUN: %clang_cc1 -verify -triple x86_64-pc-linux-gnu -fclang-abi-compat=latest -std=c++20 -fopenmp -ast-print %s | FileCheck %s
+// expected-no-diagnostics
+
+// -ast-print round-trip tests: a `#pragma omp tile` directive and its associated
+// loop must print back as written. This checks parsing/printing only; for the
+// generated IR (min-bounded lowering) see tile_rect_codegen_ir.cpp.
+
+extern "C" void body(...) {}
+
+// CHECK-LABEL: void rect_tile_1d(
+void rect_tile_1d() {
+ // Partial last tile (trip count 4, tile 5); -ast-print prints the original loop.
+ // CHECK: #pragma omp tile sizes(5)
+ // CHECK-NEXT: for (int i = 7; i < 17; i += 3)
+ #pragma omp tile sizes(5)
----------------
Meinersbur wrote:
None of the tests in this file need the intra-tile loops to be canonical.
https://github.com/llvm/llvm-project/pull/191114
More information about the cfe-commits
mailing list