[PATCH] D138569: [WebAssembly] Remove unnecessary GEP insts from table tests
Paulo Matos via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 09:46:11 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbab98395a103: [WebAssembly] Remove unnecessary GEP insts from table tests (authored by pmatos).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138569/new/
https://reviews.llvm.org/D138569
Files:
llvm/test/CodeGen/WebAssembly/table-copy.ll
llvm/test/CodeGen/WebAssembly/table-fill.ll
llvm/test/CodeGen/WebAssembly/table-grow.ll
llvm/test/CodeGen/WebAssembly/table-size.ll
Index: llvm/test/CodeGen/WebAssembly/table-size.ll
===================================================================
--- llvm/test/CodeGen/WebAssembly/table-size.ll
+++ llvm/test/CodeGen/WebAssembly/table-size.ll
@@ -11,7 +11,6 @@
; CHECK-NEXT: .functype table_size () -> (i32)
; CHECK-NEXT: table.size externref_table
; CHECK-NEXT: end_function
- %tableptr = getelementptr [0 x %externref], ptr addrspace(1) @externref_table, i32 0, i32 0
- %sz = call i32 @llvm.wasm.table.size(ptr addrspace(1) %tableptr)
+ %sz = call i32 @llvm.wasm.table.size(ptr addrspace(1) @externref_table)
ret i32 %sz
}
Index: llvm/test/CodeGen/WebAssembly/table-grow.ll
===================================================================
--- llvm/test/CodeGen/WebAssembly/table-grow.ll
+++ llvm/test/CodeGen/WebAssembly/table-grow.ll
@@ -15,7 +15,6 @@
; CHECK-NEXT: table.grow externref_table
; CHECK-NEXT: end_function
%null = call %externref @llvm.wasm.ref.null.extern()
- %tableptr = getelementptr [0 x %externref], ptr addrspace(1) @externref_table, i32 0, i32 0
- %newsz = call i32 @llvm.wasm.table.grow.externref(ptr addrspace(1) %tableptr, %externref %null, i32 %sz)
+ %newsz = call i32 @llvm.wasm.table.grow.externref(ptr addrspace(1) @externref_table, %externref %null, i32 %sz)
ret i32 %newsz
}
Index: llvm/test/CodeGen/WebAssembly/table-fill.ll
===================================================================
--- llvm/test/CodeGen/WebAssembly/table-fill.ll
+++ llvm/test/CodeGen/WebAssembly/table-fill.ll
@@ -14,7 +14,6 @@
; CHECK-NEXT: local.get 1
; CHECK-NEXT: table.fill externref_table
; CHECK-NEXT: end_function
- %tableptr = getelementptr [0 x %externref], ptr addrspace(1) @externref_table, i32 0, i32 0
- call void @llvm.wasm.table.fill.externref(ptr addrspace(1) %tableptr, i32 %start, %externref %val, i32 %len)
+ call void @llvm.wasm.table.fill.externref(ptr addrspace(1) @externref_table, i32 %start, %externref %val, i32 %len)
ret void
}
Index: llvm/test/CodeGen/WebAssembly/table-copy.ll
===================================================================
--- llvm/test/CodeGen/WebAssembly/table-copy.ll
+++ llvm/test/CodeGen/WebAssembly/table-copy.ll
@@ -15,9 +15,7 @@
; CHECK-NEXT: local.get 2
; CHECK-NEXT: table.copy externref_table1, externref_table2
; CHECK-NEXT: end_function
- %tableptr1 = getelementptr [0 x %externref], ptr addrspace(1) @externref_table1, i32 0, i32 0
- %tableptr2 = getelementptr [0 x %externref], ptr addrspace(1) @externref_table2, i32 0, i32 0
- call void @llvm.wasm.table.copy(ptr addrspace(1) %tableptr1, ptr addrspace(1) %tableptr2, i32 %dst, i32 %src, i32 %len)
+ call void @llvm.wasm.table.copy(ptr addrspace(1) @externref_table1, ptr addrspace(1) @externref_table2, i32 %dst, i32 %src, i32 %len)
ret void
}
@@ -34,7 +32,6 @@
; CHECK-NEXT: table.copy externref_table1, externref_table1
; CHECK-NEXT: end_function
%dst = add nsw i32 %src, %off
- %tableptr1 = getelementptr [0 x %externref], ptr addrspace(1) @externref_table1, i32 0, i32 0
- call void @llvm.wasm.table.copy(ptr addrspace(1) %tableptr1, ptr addrspace(1) %tableptr1, i32 %dst, i32 %src, i32 %len)
+ call void @llvm.wasm.table.copy(ptr addrspace(1) @externref_table1, ptr addrspace(1) @externref_table1, i32 %dst, i32 %src, i32 %len)
ret void
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138569.477543.patch
Type: text/x-patch
Size: 3338 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221123/96ea7dc3/attachment.bin>
More information about the llvm-commits
mailing list