blob: a90f2128e4430a42e4a92427321d487b6d0e21be [file] [log] [blame]
Florian Hahn4d6ca732017-06-07 09:17:01 +00001; RUN: llvm-as %s -o %t1.bc
2; RUN: llvm-as %p/Inputs/thumb.ll -o %t2.bc
Florian Hahna7783d72017-06-07 09:59:22 +00003; RUN: llvm-link %t1.bc %t2.bc -S 2> %t3.out | FileCheck %s
Florian Hahn4d6ca732017-06-07 09:17:01 +00004; RUN: FileCheck --allow-empty --input-file %t3.out --check-prefix STDERR %s
5
6target triple = "armv7-linux-gnueabihf"
7
8declare i32 @foo(i32 %a, i32 %b);
9
10define i32 @main() {
11entry:
12 %add = call i32 @foo(i32 10, i32 20)
13 ret i32 %add
14}
15
Florian Hahna7783d72017-06-07 09:59:22 +000016; CHECK: define i32 @main() {
17; CHECK: define i32 @foo(i32 %a, i32 %b) [[ARM_ATTRS:#[0-9]+]]
18; CHECK: define i32 @bar(i32 %a, i32 %b) [[THUMB_ATTRS:#[0-9]+]]
Florian Hahn4d6ca732017-06-07 09:17:01 +000019
Florian Hahna7783d72017-06-07 09:59:22 +000020; CHECK: attributes [[ARM_ATTRS]] = { "target-features"="-thumb-mode" }
21; CHECK: attributes [[THUMB_ATTRS]] = { "target-features"="+thumb-mode" }
Florian Hahn4d6ca732017-06-07 09:17:01 +000022
23; STDERR-NOT: warning: Linking two modules of different target triples: