xref: /llvm-project/lld/test/wasm/lto/libcall-truncsfhf2.ll (revision a35ebcf255046bc78ea86b3c524e0836425a1156)
1; RUN: llvm-as %s -o %t.o
2; RUN: llvm-as %p/Inputs/libcall-truncsfhf2.ll -o %t.truncsfhf2.o
3; RUN: rm -f %t.a
4; RUN: llvm-ar rcs %t.a %t.truncsfhf2.o
5; RUN: not wasm-ld --export-all %t.o %t.a -o %t.wasm 2>&1 | FileCheck %s
6
7target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
8target triple = "wasm32-unknown-unknown"
9
10@g_float = global float 0.0
11@g_half = global half 0.0
12
13define void @_start() {
14  %val1 = load float, ptr @g_float
15  %v0 = fptrunc float %val1 to half
16  store half %v0, ptr @g_half
17  ret void
18}
19
20; CHECK: wasm-ld: error: {{.*}}truncsfhf2.o): attempt to add bitcode file after LTO (__truncsfhf2)
21