llvm/test/Linker/Inputs/thumb.ll
Florian Hahn 4d6ca73334 [Linker] Remove warning when linking ARM and Thumb IR modules.
Summary:
This patch updates Triple::isCompatibleWith to make armxx and thumbxx
triples compatible, as long as the subarch, vendor, os, envorionment and
object format match. Thumb/ARM code generation should be controlled
using the thumb-mode per-function target feature rather than by the
triple to allow mixing Thumb and ARM functions.

D33448 updates Clang's codegen to add thumb-mode for all functions with
armxx or thumbxx triples.

Reviewers: echristo, t.p.northover, rafael, kristof.beyls, rengolin, tejohnson

Reviewed By: tejohnson

Subscribers: rinon, eugenis, pcc, srhines, aemerson, mehdi_amini, javed.absar, llvm-commits

Differential Revision: https://reviews.llvm.org/D33287

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304884 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-07 09:17:01 +00:00

17 lines
319 B
LLVM

target triple = "thumbv7-linux-gnueabihf"
define i32 @foo(i32 %a, i32 %b) #0 {
entry:
%add = add i32 %a, %b
ret i32 %add
}
define i32 @bar(i32 %a, i32 %b) #1 {
entry:
%add = add i32 %a, %b
ret i32 %add
}
attributes #0 = { "target-features"="-thumb-mode" }
attributes #1 = { "target-features"="+thumb-mode" }