]> granicus.if.org Git - clang/commitdiff
[WebAssembly] Revert type of wake count in atomic.wake to i32
authorHeejin Ahn <aheejin@gmail.com>
Mon, 20 Aug 2018 23:49:34 +0000 (23:49 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Mon, 20 Aug 2018 23:49:34 +0000 (23:49 +0000)
Summary:
We decided to revert this from i64 to i32 in Nov 28 CG meeting. Fixes
PR38632.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, sunfish, jfb, cfe-commits

Differential Revision: https://reviews.llvm.org/D51013

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340235 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 45ce07292e4d671cb22a47a39e4094c9a8b73c12..d987af6492c1f10b267dd42cf2ac25bb62b42a79 100644 (file)
@@ -37,6 +37,6 @@ BUILTIN(__builtin_wasm_rethrow, "v", "r")
 // 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
index d1c5c303d4e8068ca9d24356dc574a7e19c1618f..1eb5222884a35a56a635d4ff2853a9d56a206651 100644 (file)
@@ -63,8 +63,8 @@ int f9(long long *addr, long long expected, long long timeout) {
 // 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 %{{.*}})
 }