Skip to content

Commit

Permalink
test: Update tests to use -vast-emit-mlir-after instead of snapshots.
Browse files Browse the repository at this point in the history
  • Loading branch information
lkorenc committed May 16, 2024
1 parent 66b6f1b commit 8f7a270
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
8 changes: 5 additions & 3 deletions test/vast/Conversion/select-a.c
Original file line number Diff line number Diff line change
@@ -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 <stdlib.h>
#include <stdio.h>
Expand Down
6 changes: 6 additions & 0 deletions test/vast/Conversion/select-b.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 5 additions & 3 deletions test/vast/Conversion/select-c.c
Original file line number Diff line number Diff line change
@@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions test/vast/Conversion/void-return-a.c
Original file line number Diff line number Diff line change
@@ -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() : () -> ()
Expand Down
6 changes: 3 additions & 3 deletions test/vast/Conversion/void-return-b.c
Original file line number Diff line number Diff line change
@@ -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(); } );
Expand Down

0 comments on commit 8f7a270

Please sign in to comment.