From: Paulo Matos Date: Thu, 23 Jun 2022 12:10:52 +0000 (+0200) Subject: [WebAssembly] Update test to run it in opaque pointers mode X-Git-Tag: upstream/15.0.7~3817 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0fdfeb0847dfbce9d5734f61c9fc16ed6f7dc17e;p=platform%2Fupstream%2Fllvm.git [WebAssembly] Update test to run it in opaque pointers mode When opaque pointers was enabled, -no-opaque-pointers were added to some tests in order not to change behaviour. We now revert this and fix the test. Reviewed By: asb, tlively Differential Revision: https://reviews.llvm.org/D128282 --- diff --git a/clang/test/CodeGen/builtins-wasm.c b/clang/test/CodeGen/builtins-wasm.c index d9ea753..ea591a1 100644 --- a/clang/test/CodeGen/builtins-wasm.c +++ b/clang/test/CodeGen/builtins-wasm.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -no-opaque-pointers -triple wasm32-unknown-unknown -target-feature +simd128 -target-feature +relaxed-simd -target-feature +nontrapping-fptoint -target-feature +exception-handling -target-feature +bulk-memory -target-feature +atomics -flax-vector-conversions=none -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes WEBASSEMBLY,WEBASSEMBLY32 -// RUN: %clang_cc1 -no-opaque-pointers -triple wasm64-unknown-unknown -target-feature +simd128 -target-feature +relaxed-simd -target-feature +nontrapping-fptoint -target-feature +exception-handling -target-feature +bulk-memory -target-feature +atomics -flax-vector-conversions=none -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes WEBASSEMBLY,WEBASSEMBLY64 -// RUN: not %clang_cc1 -no-opaque-pointers -triple wasm64-unknown-unknown -target-feature +nontrapping-fptoint -target-feature +exception-handling -target-feature +bulk-memory -target-feature +atomics -flax-vector-conversions=none -O3 -emit-llvm -o - %s 2>&1 | FileCheck %s -check-prefixes MISSING-SIMD +// RUN: %clang_cc1 -triple wasm32-unknown-unknown -target-feature +simd128 -target-feature +relaxed-simd -target-feature +nontrapping-fptoint -target-feature +exception-handling -target-feature +bulk-memory -target-feature +atomics -flax-vector-conversions=none -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes WEBASSEMBLY,WEBASSEMBLY32 +// RUN: %clang_cc1 -triple wasm64-unknown-unknown -target-feature +simd128 -target-feature +relaxed-simd -target-feature +nontrapping-fptoint -target-feature +exception-handling -target-feature +bulk-memory -target-feature +atomics -flax-vector-conversions=none -O3 -emit-llvm -o - %s | FileCheck %s -check-prefixes WEBASSEMBLY,WEBASSEMBLY64 +// RUN: not %clang_cc1 -triple wasm64-unknown-unknown -target-feature +nontrapping-fptoint -target-feature +exception-handling -target-feature +bulk-memory -target-feature +atomics -flax-vector-conversions=none -O3 -emit-llvm -o - %s 2>&1 | FileCheck %s -check-prefixes MISSING-SIMD // SIMD convenience types typedef signed char i8x16 __attribute((vector_size(16))); @@ -40,13 +40,12 @@ __SIZE_TYPE__ tls_align(void) { void *tls_base(void) { return __builtin_wasm_tls_base(); - // WEBASSEMBLY: call i8* @llvm.wasm.tls.base() + // WEBASSEMBLY: call ptr @llvm.wasm.tls.base() } 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* %{{.*}}) + // WEBASSEMBLY: call void @llvm.wasm.throw(i32 0, ptr %{{.*}}) } void rethrow(void) { @@ -57,20 +56,17 @@ void rethrow(void) { int memory_atomic_wait32(int *addr, int expected, long long timeout) { return __builtin_wasm_memory_atomic_wait32(addr, expected, timeout); - // WEBASSEMBLY32: call i32 @llvm.wasm.memory.atomic.wait32(i32* %{{.*}}, i32 %{{.*}}, i64 %{{.*}}) - // WEBASSEMBLY64: call i32 @llvm.wasm.memory.atomic.wait32(i32* %{{.*}}, i32 %{{.*}}, i64 %{{.*}}) + // WEBASSEMBLY: call i32 @llvm.wasm.memory.atomic.wait32(ptr %{{.*}}, i32 %{{.*}}, i64 %{{.*}}) } int memory_atomic_wait64(long long *addr, long long expected, long long timeout) { return __builtin_wasm_memory_atomic_wait64(addr, expected, timeout); - // WEBASSEMBLY32: call i32 @llvm.wasm.memory.atomic.wait64(i64* %{{.*}}, i64 %{{.*}}, i64 %{{.*}}) - // WEBASSEMBLY64: call i32 @llvm.wasm.memory.atomic.wait64(i64* %{{.*}}, i64 %{{.*}}, i64 %{{.*}}) + // WEBASSEMBLY: call i32 @llvm.wasm.memory.atomic.wait64(ptr %{{.*}}, i64 %{{.*}}, i64 %{{.*}}) } unsigned int memory_atomic_notify(int *addr, unsigned int count) { return __builtin_wasm_memory_atomic_notify(addr, count); - // WEBASSEMBLY32: call i32 @llvm.wasm.memory.atomic.notify(i32* %{{.*}}, i32 %{{.*}}) - // WEBASSEMBLY64: call i32 @llvm.wasm.memory.atomic.notify(i32* %{{.*}}, i32 %{{.*}}) + // WEBASSEMBLY: call i32 @llvm.wasm.memory.atomic.notify(ptr %{{.*}}, i32 %{{.*}}) } int trunc_s_i32_f32(float f) {