Skip to content

Commit

Permalink
[WebAssembly] Revert type of wake count in atomic.wake to i32
Browse files Browse the repository at this point in the history
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

llvm-svn: 340235
  • Loading branch information
aheejin committed Aug 20, 2018
1 parent 487992c commit f0fe359
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/BuiltinsWebAssembly.def
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions clang/test/CodeGen/builtins-wasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 %{{.*}})
}

0 comments on commit f0fe359

Please sign in to comment.