[PATCH] D59448: [WebAssembly] Change wasm.throw intrinsic's first argument to immediate
Heejin Ahn via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 16 00:47:17 PDT 2019
aheejin created this revision.
aheejin added a reviewer: dschuff.
Herald added subscribers: cfe-commits, sunfish, jgravelle-google, sbc100.
Herald added a project: clang.
After D57825 <https://reviews.llvm.org/D57825> (r355981), intrinsic arguments that are marked as `ImmArg`
only can take immediate values.
Repository:
rC Clang
https://reviews.llvm.org/D59448
Files:
test/CodeGen/builtins-wasm.c
Index: test/CodeGen/builtins-wasm.c
===================================================================
--- test/CodeGen/builtins-wasm.c
+++ test/CodeGen/builtins-wasm.c
@@ -38,10 +38,10 @@
// WEBASSEMBLY64: call void @llvm.wasm.data.drop(i32 3)
}
-void throw(unsigned int tag, void *obj) {
- return __builtin_wasm_throw(tag, obj);
- // WEBASSEMBLY32: call void @llvm.wasm.throw(i32 %{{.*}}, i8* %{{.*}})
- // WEBASSEMBLY64: call void @llvm.wasm.throw(i32 %{{.*}}, i8* %{{.*}})
+void throw(void *obj) {
+ return __builtin_wasm_throw(0, obj);
+ // WEBASSEMBLY32: call void @llvm.wasm.throw(i32 0, i8* %{{.*}})
+ // WEBASSEMBLY64: call void @llvm.wasm.throw(i32 0, i8* %{{.*}})
}
void rethrow_in_catch(void) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59448.190949.patch
Type: text/x-patch
Size: 724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190316/94bec6b8/attachment.bin>
More information about the cfe-commits
mailing list