[PATCH] D51013: [WebAssembly] Revert type of wake count in atomic.wake to i32

Heejin Ahn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 20 16:28:24 PDT 2018


aheejin created this revision.
aheejin added a reviewer: dschuff.
Herald added subscribers: cfe-commits, jfb, sunfish, jgravelle-google, sbc100.

We decided to revert this from i64 to i32 in Nov 28 CG meeting. Fixes
PR38632.


Repository:
  rC Clang

https://reviews.llvm.org/D51013

Files:
  include/clang/Basic/BuiltinsWebAssembly.def
  test/CodeGen/builtins-wasm.c


Index: test/CodeGen/builtins-wasm.c
===================================================================
--- test/CodeGen/builtins-wasm.c
+++ test/CodeGen/builtins-wasm.c
@@ -63,8 +63,8 @@
 // WEBASSEMBLY64: call i32 @llvm.wasm.atomic.wait.i64(i64* %{{.*}}, i64 %{{.*}}, i64 %{{.*}})
 }
 
-unsigned long long f10(int *addr, long long count) {
+unsigned int f10(int *addr, int count) {
   return __builtin_wasm_atomic_notify(addr, count);
-// WEBASSEMBLY32: call i64 @llvm.wasm.atomic.notify(i32* %{{.*}}, i64 %{{.*}})
-// WEBASSEMBLY64: call i64 @llvm.wasm.atomic.notify(i32* %{{.*}}, i64 %{{.*}})
+// WEBASSEMBLY32: call i32 @llvm.wasm.atomic.notify(i32* %{{.*}}, i32 %{{.*}})
+// WEBASSEMBLY64: call i32 @llvm.wasm.atomic.notify(i32* %{{.*}}, i32 %{{.*}})
 }
Index: include/clang/Basic/BuiltinsWebAssembly.def
===================================================================
--- include/clang/Basic/BuiltinsWebAssembly.def
+++ include/clang/Basic/BuiltinsWebAssembly.def
@@ -37,6 +37,6 @@
 // Atomic wait and notify.
 BUILTIN(__builtin_wasm_atomic_wait_i32, "ii*iLLi", "n")
 BUILTIN(__builtin_wasm_atomic_wait_i64, "iLLi*LLiLLi", "n")
-BUILTIN(__builtin_wasm_atomic_notify, "ULLii*LLi", "n")
+BUILTIN(__builtin_wasm_atomic_notify, "Uii*i", "n")
 
 #undef BUILTIN


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51013.161615.patch
Type: text/x-patch
Size: 1267 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180820/ddd88c71/attachment.bin>


More information about the cfe-commits mailing list