From 7c49f56956eb48af15dd2d9a6f2f650443e5be2c Mon Sep 17 00:00:00 2001 From: Andrzej Warzynski Date: Wed, 20 Jul 2022 17:00:50 +0000 Subject: [PATCH] [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 --- flang/test/Driver/mlir-pass-pipeline.f90 | 3 +++ flang/test/Fir/basic-program.fir | 2 ++ 2 files changed, 5 insertions(+) diff --git a/flang/test/Driver/mlir-pass-pipeline.f90 b/flang/test/Driver/mlir-pass-pipeline.f90 index 344520a1511c..c11afc02f912 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 b47ff5900761..a187780b596c 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.