[flang-commits] [flang] 7c49f56 - [flang][nfc] Add missing `REQUIRES: asserts` in tests
Andrzej Warzynski via flang-commits
flang-commits at lists.llvm.org
Thu Jul 21 02:23:30 PDT 2022
Author: Andrzej Warzynski
Date: 2022-07-21T09:22:01Z
New Revision: 7c49f56956eb48af15dd2d9a6f2f650443e5be2c
URL: https://github.com/llvm/llvm-project/commit/7c49f56956eb48af15dd2d9a6f2f650443e5be2c
DIFF: https://github.com/llvm/llvm-project/commit/7c49f56956eb48af15dd2d9a6f2f650443e5be2c.diff
LOG: [flang][nfc] Add missing `REQUIRES: asserts` in tests
Tests that use `--mlir-pass-statistics-display=` from MLIR require the
following condition to hold: (extracted from LLVM's Statistics.h):
```
#define LLVM_ENABLE_STATS 1
```
This is normally enforced with `REQUIRES: asserts`. This patch updates
relevant Flang tests accordingly.
For "Release" builds (with assertions disabled), the affected tests will
be failing without this change.
Differential Revision: https://reviews.llvm.org/D130185
Added:
Modified:
flang/test/Driver/mlir-pass-pipeline.f90
flang/test/Fir/basic-program.fir
Removed:
################################################################################
diff --git a/flang/test/Driver/mlir-pass-pipeline.f90 b/flang/test/Driver/mlir-pass-pipeline.f90
index 344520a1511c8..c11afc02f9122 100644
--- a/flang/test/Driver/mlir-pass-pipeline.f90
+++ b/flang/test/Driver/mlir-pass-pipeline.f90
@@ -1,6 +1,9 @@
! Test the MLIR pass pipeline
! RUN: %flang_fc1 -S -mmlir --mlir-pass-statistics -mmlir --mlir-pass-statistics-display=pipeline %s -o - 2>&1 | FileCheck %s
+
+! REQUIRES: asserts
+
end program
! CHECK: Pass statistics report
diff --git a/flang/test/Fir/basic-program.fir b/flang/test/Fir/basic-program.fir
index b47ff59007614..a187780b596cd 100644
--- a/flang/test/Fir/basic-program.fir
+++ b/flang/test/Fir/basic-program.fir
@@ -1,6 +1,8 @@
// RUN: tco %s | FileCheck %s
// RUN: tco %s --mlir-pass-statistics --mlir-pass-statistics-display=pipeline 2>&1 | FileCheck %s --check-prefix=PASSES
+// REQUIRES: asserts
+
// Check that tco is working with a basic test.
// Also check the passes in the default pipeline.
More information about the flang-commits
mailing list