[PATCH] D41093: [WebAssembly] check more details in call-indirect test
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 11 14:08:00 PST 2017
sbc100 created this revision.
Herald added subscribers: llvm-commits, sunfish, aheejin, jgravelle-google, dschuff, jfb.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D41093
Files:
test/wasm/call-indirect.ll
Index: test/wasm/call-indirect.ll
===================================================================
--- test/wasm/call-indirect.ll
+++ test/wasm/call-indirect.ll
@@ -13,15 +13,15 @@
; Function Attrs: norecurse nounwind readnone
define i32 @foo() #0 {
entry:
- ret i32 1
+ ret i32 2
}
; Function Attrs: nounwind
-define void @_start() local_unnamed_addr #1 {
+define i32 @_start() local_unnamed_addr #1 {
entry:
%0 = load i32 ()*, i32 ()** @indirect_func, align 4
%call = tail call i32 %0() #2
- ret void
+ ret i32 0
}
; CHECK: !WASM
@@ -37,7 +37,7 @@
; CHECK-NEXT: ReturnType: NORESULT
; CHECK-NEXT: ParamTypes:
; CHECK-NEXT: - Type: FUNCTION
-; CHECK-NEXT: FunctionTypes: [ 0, 1, 0, 1 ]
+; CHECK-NEXT: FunctionTypes: [ 0, 1, 0, 0 ]
; CHECK-NEXT: - Type: TABLE
; CHECK-NEXT: Tables:
; CHECK-NEXT: - ElemType: ANYFUNC
@@ -72,18 +72,23 @@
; CHECK-NEXT: - Name: call_bar_indirect
; CHECK-NEXT: Kind: FUNCTION
; CHECK-NEXT: Index: 1
-; CHECK: - Type: ELEM
+; CHECK-NEXT: - Type: ELEM
; CHECK-NEXT: Segments:
; CHECK-NEXT: - Offset:
; CHECK-NEXT: Opcode: I32_CONST
; CHECK-NEXT: Value: 1
; CHECK-NEXT: Functions: [ 0, 2 ]
; CHECK-NEXT: - Type: CODE
; CHECK-NEXT: Functions:
-; CHECK: - Locals:
-; CHECK: - Locals:
-; CHECK: - Locals:
-; CHECK: - Type: DATA
+; CHECK-NEXT: - Locals:
+; CHECK-NEXT: Body: 41010B
+; CHECK-NEXT: - Locals:
+; CHECK-NEXT: Body: 410028028088808000118080808000001A0B
+; CHECK-NEXT: - Locals:
+; CHECK-NEXT: Body: 41020B
+; CHECK-NEXT: - Locals:
+; CHECK-NEXT: Body: 410028028888808000118080808000001A41000B
+; CHECK-NEXT: - Type: DATA
; CHECK-NEXT: Segments:
; CHECK-NEXT: - SectionOffset: 7
; CHECK-NEXT: MemoryIndex: 0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41093.126444.patch
Type: text/x-patch
Size: 2240 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171211/849e05cd/attachment.bin>
More information about the llvm-commits
mailing list