1 // RUN: %clang_cc1 -triple wasm32-unknown-unknown -O3 -emit-llvm -o - %s \ 2 // RUN: | FileCheck %s -check-prefix=WEBASSEMBLY32 3 // RUN: %clang_cc1 -triple wasm64-unknown-unknown -O3 -emit-llvm -o - %s \ 4 // RUN: | FileCheck %s -check-prefix=WEBASSEMBLY64 5 6 __SIZE_TYPE__ f1(void) { 7 return __builtin_wasm_current_memory(); 8 // WEBASSEMBLY32: call {{i.*}} @llvm.wasm.current.memory.i32() 9 // WEBASSEMBLY64: call {{i.*}} @llvm.wasm.current.memory.i64() 10 } 11 12 void f2(long delta) { 13 __builtin_wasm_grow_memory(delta); 14 // WEBASSEMBLY32: call void @llvm.wasm.grow.memory.i32(i32 %{{.*}}) 15 // WEBASSEMBLY64: call void @llvm.wasm.grow.memory.i64(i64 %{{.*}}) 16 } 17