1 ; RUN: split-file %s %t
2 ; RUN: llvm-as -o %t1.bc %t/f01.ll
3 ; RUN: llvm-as -o %t2.bc %t/f02.ll
4 ; RUN: llvm-link %t1.bc %t2.bc -o %t3.bc
5 ; RUN: llvm-dis -o - %t3.bc | FileCheck %s
7 ; Make sure we can link files with clashing intrinsic names using unnamed types.
13 ; CHECK-LABEL: @test01(
14 ; CHECK: %c1 = call %0 @llvm.ssa.copy.s_s.0(%0 %arg)
15 ; CHECK-NEXT: %c2 = call %1 @llvm.ssa.copy.s_s.1(%1 %tmp)
17 define void @test01(%0 %arg, %1 %tmp) {
19 %c1 = call %0 @llvm.ssa.copy.s_s.0(%0 %arg)
20 %c2 = call %1 @llvm.ssa.copy.s_s.1(%1 %tmp)
24 declare %0 @llvm.ssa.copy.s_s.0(%0 returned)
26 declare %1 @llvm.ssa.copy.s_s.1(%1 returned)
28 ; now with recycling of previous declarations:
29 ; CHECK-LABEL: @test02(
30 ; CHECK: %c1 = call %0 @llvm.ssa.copy.s_s.0(%0 %arg)
31 ; CHECK-NEXT: %c2 = call %1 @llvm.ssa.copy.s_s.1(%1 %tmp)
33 define void @test02(%0 %arg, %1 %tmp) {
35 %c1 = call %0 @llvm.ssa.copy.s_s.0(%0 %arg)
36 %c2 = call %1 @llvm.ssa.copy.s_s.1(%1 %tmp)
44 ; CHECK-LABEL: @test03(
45 ; CHECK: %c1 = call %3 @llvm.ssa.copy.s_s.2(%3 %arg)
46 ; CHECK-NEXT: %c2 = call %2 @llvm.ssa.copy.s_s.3(%2 %tmp)
48 define void @test03(%1 %tmp, %2 %arg) {
50 %c1 = call %2 @llvm.ssa.copy.s_s.0(%2 %arg)
51 %c2 = call %1 @llvm.ssa.copy.s_s.1(%1 %tmp)
55 declare %2 @llvm.ssa.copy.s_s.0(%2 returned)
57 declare %1 @llvm.ssa.copy.s_s.1(%1 returned)