1; RUN: not llc < %s -asm-verbose=false 2>&1 | FileCheck %s
2
3target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
4target triple = "wasm32-unknown-unknown"
5
6; This tests the implementation of __builtin_return_address on the unknown OS.
7; Since this is not implemented, it should fail.
8
9; CHECK: Non-Emscripten WebAssembly hasn't implemented __builtin_return_address
10define i8* @test_returnaddress() {
11  %r = call i8* @llvm.returnaddress(i32 0)
12  ret i8* %r
13}
14
15; LLVM represents __builtin_return_address as call to this function in IR.
16declare i8* @llvm.returnaddress(i32 immarg)
17