brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1022 B · 0f3d9c3 Raw
30 lines · plain
1; REQUIRES: x862; RUN: rm -f %t.a3; RUN: llvm-as -o %t.o %s4; RUN: llvm-as -o %t2.o %S/Inputs/libcall-archive.ll5; RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux -o %t3.o %S/Inputs/libcall-archive.s6; RUN: llvm-ar rcs %t.a %t2.o %t3.o7; RUN: ld.lld --why-extract=%t.why.txt -o %t %t.o %t.a8; RUN: FileCheck %s --input-file=%t.why.txt --check-prefix=CHECK-WHY9; RUN: llvm-nm %t | FileCheck %s10; RUN: ld.lld -o %t2 %t.o --start-lib %t2.o %t3.o --end-lib11; RUN: llvm-nm %t2 | FileCheck %s12 13; CHECK-WHY: reference extracted symbol14; CHECK-WHY-NEXT: <libcall> {{.*}}tmp.a({{.*}}tmp2.o) memcpy15 16; CHECK-NOT: T __sync_val_compare_and_swap_817; CHECK: T _start18; CHECK: T memcpy19 20target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"21target triple = "x86_64-unknown-linux-gnu"22 23define void @_start(ptr %a, ptr %b) {24entry:25  call void @llvm.memcpy.p0.p0.i64(ptr %a, ptr %b, i64 1024, i1 false)26  ret void27}28 29declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1)30