Florian Hahn | 4d6ca73 | 2017-06-07 09:17:01 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as %s -o %t1.bc |
| 2 | ; RUN: llvm-as %p/Inputs/thumb.ll -o %t2.bc |
Florian Hahn | a7783d7 | 2017-06-07 09:59:22 +0000 | [diff] [blame] | 3 | ; RUN: llvm-link %t1.bc %t2.bc -S 2> %t3.out | FileCheck %s |
Florian Hahn | 4d6ca73 | 2017-06-07 09:17:01 +0000 | [diff] [blame] | 4 | ; RUN: FileCheck --allow-empty --input-file %t3.out --check-prefix STDERR %s |
| 5 | |
| 6 | target triple = "armv7-linux-gnueabihf" |
| 7 | |
| 8 | declare i32 @foo(i32 %a, i32 %b); |
| 9 | |
| 10 | define i32 @main() { |
| 11 | entry: |
| 12 | %add = call i32 @foo(i32 10, i32 20) |
| 13 | ret i32 %add |
| 14 | } |
| 15 | |
Florian Hahn | a7783d7 | 2017-06-07 09:59:22 +0000 | [diff] [blame] | 16 | ; 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 Hahn | 4d6ca73 | 2017-06-07 09:17:01 +0000 | [diff] [blame] | 19 | |
Florian Hahn | a7783d7 | 2017-06-07 09:59:22 +0000 | [diff] [blame] | 20 | ; CHECK: attributes [[ARM_ATTRS]] = { "target-features"="-thumb-mode" } |
| 21 | ; CHECK: attributes [[THUMB_ATTRS]] = { "target-features"="+thumb-mode" } |
Florian Hahn | 4d6ca73 | 2017-06-07 09:17:01 +0000 | [diff] [blame] | 22 | |
| 23 | ; STDERR-NOT: warning: Linking two modules of different target triples: |