From 8f7a270ccbf1e23764d24eb8aeb45ac90cfe4980 Mon Sep 17 00:00:00 2001 From: Lukas Korencik Date: Wed, 15 May 2024 13:09:00 +0200 Subject: [PATCH] test: Update tests to use `-vast-emit-mlir-after` instead of snapshots. --- test/vast/Conversion/select-a.c | 8 +++++--- test/vast/Conversion/select-b.c | 6 ++++++ test/vast/Conversion/select-c.c | 8 +++++--- test/vast/Conversion/void-return-a.c | 4 ++-- test/vast/Conversion/void-return-b.c | 6 +++--- 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/test/vast/Conversion/select-a.c b/test/vast/Conversion/select-a.c index 88794c1800..734879de22 100644 --- a/test/vast/Conversion/select-a.c +++ b/test/vast/Conversion/select-a.c @@ -1,6 +1,8 @@ -// RUN: %vast-front -vast-emit-mlir=llvm -vast-snapshot-at="vast-core-to-llvm;vast-hl-to-lazy-regions" %s -// RUN: %file-check %s -input-file=$(basename %s .c).vast-hl-to-lazy-regions -check-prefix=LAZY -// RUN: %file-check %s -input-file=$(basename %s .c).vast-core-to-llvm -check-prefix=LLVM +// RUN: %vast-front -vast-emit-mlir-after=vast-hl-to-lazy-regions %s -o %t.mlir +// RUN: %file-check --input-file=%t.mlir %s -check-prefix=LAZY + +// RUN: %vast-front -vast-emit-mlir-after=vast-core-to-llvm %s -o %t.mlir +// RUN: %file-check --input-file=%t.mlir %s -check-prefix=LLVM #include #include diff --git a/test/vast/Conversion/select-b.c b/test/vast/Conversion/select-b.c index b8659fcd8b..08d4ee358a 100644 --- a/test/vast/Conversion/select-b.c +++ b/test/vast/Conversion/select-b.c @@ -2,6 +2,12 @@ // RUN: %file-check %s -input-file=$(basename %s .c).vast-irs-to-llvm -check-prefix=I_LLVM // RUN: %file-check %s -input-file=$(basename %s .c).vast-core-to-llvm -check-prefix=C_LLVM +// RUN: %vast-front -vast-emit-mlir-after=vast-irs-to-llvm %s -o %t.mlir +// RUN: %file-check --input-file=%t.mlir %s -check-prefix=I_LLVM + +// RUN: %vast-front -vast-emit-mlir-after=vast-core-to-llvm %s -o %t.mlir +// RUN: %file-check --input-file=%t.mlir %s -check-prefix=C_LLVM + void foo() {} int main(int argc, char** argv) diff --git a/test/vast/Conversion/select-c.c b/test/vast/Conversion/select-c.c index ff1b01b015..3a673781e3 100644 --- a/test/vast/Conversion/select-c.c +++ b/test/vast/Conversion/select-c.c @@ -1,6 +1,8 @@ -// RUN: %vast-front -vast-emit-mlir=llvm -vast-snapshot-at="vast-core-to-llvm;vast-irs-to-llvm" %s -// RUN: %file-check %s -input-file=$(basename %s .c).vast-irs-to-llvm -check-prefix=I_LLVM -// RUN: %file-check %s -input-file=$(basename %s .c).vast-core-to-llvm -check-prefix=C_LLVM +// RUN: %vast-front -vast-emit-mlir-after=vast-irs-to-llvm %s -o %t.mlir +// RUN: %file-check --input-file=%t.mlir %s -check-prefix=I_LLVM + +// RUN: %vast-front -vast-emit-mlir-after=vast-core-to-llvm %s -o %t.mlir +// RUN: %file-check --input-file=%t.mlir %s -check-prefix=C_LLVM int main(int argc, char** argv) { diff --git a/test/vast/Conversion/void-return-a.c b/test/vast/Conversion/void-return-a.c index c383587011..7e1700cb36 100644 --- a/test/vast/Conversion/void-return-a.c +++ b/test/vast/Conversion/void-return-a.c @@ -1,5 +1,5 @@ -// RUN: %vast-front -vast-emit-mlir=llvm -vast-snapshot-at="vast-irs-to-llvm" %s -// RUN: %file-check %s -input-file=$(basename %s .c).vast-irs-to-llvm -check-prefix=LLVM +// RUN: %vast-front -vast-emit-mlir-after=vast-irs-to-llvm %s -o %t.mlir +// RUN: %file-check --input-file=%t.mlir %s -check-prefix=LLVM void foo() { // LLVM: llvm.call @foo() : () -> () diff --git a/test/vast/Conversion/void-return-b.c b/test/vast/Conversion/void-return-b.c index b6e7f00c66..caeeee67b8 100644 --- a/test/vast/Conversion/void-return-b.c +++ b/test/vast/Conversion/void-return-b.c @@ -1,7 +1,7 @@ -// RUN: %vast-front -vast-emit-mlir=llvm -vast-snapshot-at="vast-irs-to-llvm" %s -// RUN: %file-check %s -input-file=$(basename %s .c).vast-irs-to-llvm -check-prefix=LLVM +// RUN: %vast-front -vast-emit-mlir-after=vast-irs-to-llvm %s -o %t.mlir +// RUN: %file-check --input-file=%t.mlir %s -check-prefix=LLVM -// REQUIRES: hl.stmt.expr +// REQUIRES: to-llvm-hl.stmt.expr void foo() { return ( { foo(); } );