[llvm] r323275 - [WebAssembly] MC: Use inline triple in test bitcode files
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 15:03:47 PST 2018
Author: sbc
Date: Tue Jan 23 15:03:47 2018
New Revision: 323275
URL: http://llvm.org/viewvc/llvm-project?rev=323275&view=rev
Log:
[WebAssembly] MC: Use inline triple in test bitcode files
This matches the CodeGen tests and makes it a little easy
to run these from the command line manually.
Differential Revision: https://reviews.llvm.org/D42440
Modified:
llvm/trunk/test/MC/WebAssembly/bss.ll
llvm/trunk/test/MC/WebAssembly/comdat.ll
llvm/trunk/test/MC/WebAssembly/custom-code-section.ll
llvm/trunk/test/MC/WebAssembly/debug-info.ll
llvm/trunk/test/MC/WebAssembly/explicit-sections.ll
llvm/trunk/test/MC/WebAssembly/external-data.ll
llvm/trunk/test/MC/WebAssembly/external-func-address.ll
llvm/trunk/test/MC/WebAssembly/func-address.ll
llvm/trunk/test/MC/WebAssembly/global-ctor-dtor.ll
llvm/trunk/test/MC/WebAssembly/reloc-code.ll
llvm/trunk/test/MC/WebAssembly/reloc-data.ll
llvm/trunk/test/MC/WebAssembly/sections.ll
llvm/trunk/test/MC/WebAssembly/stack-ptr.ll
llvm/trunk/test/MC/WebAssembly/unnamed-data.ll
llvm/trunk/test/MC/WebAssembly/visibility.ll
llvm/trunk/test/MC/WebAssembly/weak-alias.ll
llvm/trunk/test/MC/WebAssembly/weak.ll
Modified: llvm/trunk/test/MC/WebAssembly/bss.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/bss.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/bss.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/bss.ll Tue Jan 23 15:03:47 2018
@@ -1,4 +1,6 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s
+; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
+
+target triple = "wasm32-unknown-unknown-wasm"
@g0 = global i8* null, align 4
@g1 = global i32 0, align 4
Modified: llvm/trunk/test/MC/WebAssembly/comdat.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/comdat.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/comdat.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/comdat.ll Tue Jan 23 15:03:47 2018
@@ -1,4 +1,6 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s
+; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
+
+target triple = "wasm32-unknown-unknown-wasm"
; Import a function just so we can check the index arithmetic for
; WASM_COMDAT_FUNCTION entries is performed correctly
Modified: llvm/trunk/test/MC/WebAssembly/custom-code-section.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/custom-code-section.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/custom-code-section.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/custom-code-section.ll Tue Jan 23 15:03:47 2018
@@ -1,4 +1,6 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -O2 -filetype=obj %s -o %t.o
+; RUN: llc -O2 -filetype=obj %s -o %t.o
+
+target triple = "wasm32-unknown-unknown-wasm"
; Wasm silently ignores custom sections for code.
; We had a bug where this cause a crash
Modified: llvm/trunk/test/MC/WebAssembly/debug-info.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/debug-info.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/debug-info.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/debug-info.ll Tue Jan 23 15:03:47 2018
@@ -1,4 +1,6 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | llvm-readobj -r -s -expand-relocs
+; RUN: llc -filetype=obj %s -o - | llvm-readobj -r -s -expand-relocs
+
+target triple = "wasm32-unknown-unknown-wasm"
; Debug information is currently not supported. This test simply verifies that
; a valid object generated.
Modified: llvm/trunk/test/MC/WebAssembly/explicit-sections.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/explicit-sections.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/explicit-sections.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/explicit-sections.ll Tue Jan 23 15:03:47 2018
@@ -1,4 +1,6 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s
+; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
+
+target triple = "wasm32-unknown-unknown-wasm"
%struct.bd = type { i32, i8 }
Modified: llvm/trunk/test/MC/WebAssembly/external-data.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/external-data.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/external-data.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/external-data.ll Tue Jan 23 15:03:47 2018
@@ -1,4 +1,7 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s
+; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
+
+target triple = "wasm32-unknown-unknown-wasm"
+
; Verify relocations are correctly generated for addresses of externals
; in the data section.
Modified: llvm/trunk/test/MC/WebAssembly/external-func-address.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/external-func-address.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/external-func-address.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/external-func-address.ll Tue Jan 23 15:03:47 2018
@@ -1,4 +1,7 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s
+; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
+
+target triple = "wasm32-unknown-unknown-wasm"
+
; Verify that addresses of external functions generate correctly typed
; imports and relocations or type R_TABLE_INDEX_I32.
Modified: llvm/trunk/test/MC/WebAssembly/func-address.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/func-address.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/func-address.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/func-address.ll Tue Jan 23 15:03:47 2018
@@ -1,4 +1,6 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -O2 -filetype=obj %s -o - | llvm-readobj -r -s -expand-relocs | FileCheck %s
+; RUN: llc -O2 -filetype=obj %s -o - | llvm-readobj -r -s -expand-relocs | FileCheck %s
+
+target triple = "wasm32-unknown-unknown-wasm"
declare i32 @import1()
declare i32 @import2()
Modified: llvm/trunk/test/MC/WebAssembly/global-ctor-dtor.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/global-ctor-dtor.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/global-ctor-dtor.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/global-ctor-dtor.ll Tue Jan 23 15:03:47 2018
@@ -1,4 +1,6 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s
+; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
+
+target triple = "wasm32-unknown-unknown-wasm"
@global1 = global i32 1025, align 8
Modified: llvm/trunk/test/MC/WebAssembly/reloc-code.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/reloc-code.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/reloc-code.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/reloc-code.ll Tue Jan 23 15:03:47 2018
@@ -1,4 +1,6 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | llvm-readobj -r -expand-relocs | FileCheck %s
+; RUN: llc -filetype=obj %s -o - | llvm-readobj -r -expand-relocs | FileCheck %s
+
+target triple = "wasm32-unknown-unknown-wasm"
; Pointers to functions of two different types
@a = global i64 ()* inttoptr (i64 5 to i64 ()*), align 8
Modified: llvm/trunk/test/MC/WebAssembly/reloc-data.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/reloc-data.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/reloc-data.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/reloc-data.ll Tue Jan 23 15:03:47 2018
@@ -1,7 +1,10 @@
-; RUN: llc -O0 -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | llvm-readobj -r -expand-relocs | FileCheck %s
+; RUN: llc -O0 -filetype=obj %s -o - | llvm-readobj -r -expand-relocs | FileCheck %s
+
+target triple = "wasm32-unknown-unknown-wasm"
; foo and bar are external and internal symbols. a and b are pointers
; initialized to these locations offset by 2 and -2 elements respecitively.
+
@foo = external global i32, align 4
@bar = global i64 7, align 4
@a = global i32* getelementptr (i32, i32* @foo, i32 2), align 8
Modified: llvm/trunk/test/MC/WebAssembly/sections.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/sections.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/sections.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/sections.ll Tue Jan 23 15:03:47 2018
@@ -1,4 +1,6 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | llvm-readobj -s | FileCheck %s
+; RUN: llc -filetype=obj %s -o - | llvm-readobj -s | FileCheck %s
+
+target triple = "wasm32-unknown-unknown-wasm"
; external function
declare i32 @a()
@@ -13,7 +15,6 @@ entry:
ret i32 %tmp1
}
-
; CHECK: Format: WASM
; CHECK: Arch: wasm32
; CHECK: AddressSize: 32bit
Modified: llvm/trunk/test/MC/WebAssembly/stack-ptr.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/stack-ptr.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/stack-ptr.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/stack-ptr.ll Tue Jan 23 15:03:47 2018
@@ -1,4 +1,6 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s
+; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
+
+target triple = "wasm32-unknown-unknown-wasm"
; Function that uses explict stack, and should generate a reference to
; __stack_pointer, along with the corresponding reloction entry.
Modified: llvm/trunk/test/MC/WebAssembly/unnamed-data.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/unnamed-data.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/unnamed-data.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/unnamed-data.ll Tue Jan 23 15:03:47 2018
@@ -1,4 +1,6 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s
+; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
+
+target triple = "wasm32-unknown-unknown-wasm"
@.str1 = private unnamed_addr constant [6 x i8] c"hello\00", align 1
@.str2 = private unnamed_addr constant [6 x i8] c"world\00", align 1
Modified: llvm/trunk/test/MC/WebAssembly/visibility.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/visibility.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/visibility.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/visibility.ll Tue Jan 23 15:03:47 2018
@@ -1,4 +1,6 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s
+; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
+
+target triple = "wasm32-unknown-unknown-wasm"
; Function with __attribute__((visibility("default")))
define void @defaultVis() #0 {
Modified: llvm/trunk/test/MC/WebAssembly/weak-alias.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/weak-alias.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/weak-alias.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/weak-alias.ll Tue Jan 23 15:03:47 2018
@@ -1,7 +1,9 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o %t.o
+; RUN: llc -filetype=obj %s -o %t.o
; RUN: obj2yaml %t.o | FileCheck %s
; RUN: llvm-objdump -t %t.o | FileCheck --check-prefix=CHECK-SYMS %s
+target triple = "wasm32-unknown-unknown-wasm"
+
; 'foo_alias()' is weak alias of function 'foo()'
; 'bar_alias' is weak alias of global variable 'bar'
; Generates two exports of the same function, one of them weak
Modified: llvm/trunk/test/MC/WebAssembly/weak.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/weak.ll?rev=323275&r1=323274&r2=323275&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/weak.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/weak.ll Tue Jan 23 15:03:47 2018
@@ -1,4 +1,6 @@
-; RUN: llc -mtriple wasm32-unknown-unknown-wasm -filetype=obj %s -o - | obj2yaml | FileCheck %s
+; RUN: llc -filetype=obj %s -o - | obj2yaml | FileCheck %s
+
+target triple = "wasm32-unknown-unknown-wasm"
; Weak external data reference
@weak_external_data = extern_weak global i32, align 4
More information about the llvm-commits
mailing list