Skip to content

Commit

Permalink
asm: add test cases for LLVM 10.0
Browse files Browse the repository at this point in the history
This includes test cases for the use of nofree as parameter attribute
and the new calling conventions of LLVM 10.0.

Updates #132.

An additional change, is to name unnamed basic blocks (if not the
entry basic block). This change was introduced in LLVM 9.0 I think.

Essentially, for any block with a local ID that is not the entry block,
we use an explicit label (e.g. `2:`) instead of just adding a comment
(e.g. `; <label>:2`. This will require an update to the llir/llvm/ir
basic block output function.
  • Loading branch information
mewmew committed Apr 15, 2020
1 parent b0ac958 commit 8006f32
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions asm/asm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ func TestParseFile(t *testing.T) {
// parameter attribute.
{path: "../testdata/llvm/test/Transforms/InstSimplify/compare.ll"},

// Calling conventions.
{path: "../testdata/llvm/test/Bitcode/calling-conventions.3.2.ll"},
{path: "../testdata/llvm/test/CodeGen/X86/tailccfp.ll"},

// Parameter attributes (nofree).
{path: "../testdata/llvm/test/Transforms/Attributor/nonnull.ll"},

// Basic block labels.
{path: "../testdata/llvm/test/Assembler/block-labels.ll"},

Expand Down
2 changes: 1 addition & 1 deletion testdata

0 comments on commit 8006f32

Please sign in to comment.