brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 90e7f1b Raw
50 lines · plain
1; RUN: rm -f %t.a2; RUN: llvm-as -o %t.o %s3; RUN: llvm-as -o %t2.o %S/Inputs/libcall-archive.ll4; RUN: llvm-ar rcs %t.a %t2.o5; RUN: wasm-ld -o %t %t.o %t.a6; RUN: obj2yaml %t | FileCheck %s7 8target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"9target triple = "wasm32-unknown-unknown"10 11@llvm.used = appending global [2 x ptr] [ptr @test_acosf, ptr @test___umodti3]12 13define void @_start(ptr %a, ptr %b) #0 {14entry:15  call void @llvm.memcpy.p0.p0.i64(ptr %a, ptr %b, i64 1024, i1 false)16  ret void17}18 19; Emit acosf, which currently happens to be the first runtime libcall20; entry.21define float @test_acosf(float %x) {22  %acos = call float @llvm.acos.f32(float %x)23  ret float %acos24}25 26; Emit __umodti3, which currently happens to be the last runtime27; libcall entry.28define i128 @test___umodti3(i128 %a, i128 %b) {29  %urem = urem i128 %a, %b30  ret i128 %urem31}32 33declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1)34 35attributes #0 = { "target-features"="-bulk-memory,-bulk-memory-opt" }36 37; CHECK:       - Type:            CUSTOM38; CHECK-NEXT:    Name:            name39; CHECK-NEXT:    FunctionNames:40; CHECK-NEXT:      - Index:           041; CHECK-NEXT:        Name:            test_acosf42; CHECK-NEXT:      - Index:           143; CHECK-NEXT:        Name:            acosf44; CHECK-NEXT:      - Index:           245; CHECK-NEXT:        Name:            test___umodti346; CHECK-NEXT:      - Index:           347; CHECK-NEXT:        Name:            __umodti348; CHECK-NEXT:      - Index:           449; CHECK-NEXT:        Name:            _start50