<div dir="ltr">Fixed the failing test case in r241588.<div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 7, 2015 at 2:53 AM, Daniel Jasper <span dir="ltr"><<a href="mailto:djasper@google.com" target="_blank">djasper@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I think this might be breaking on a buildbot: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__bb.pgr.jp_builders_ninja-2Dx64-2Dmsvc-2DRA-2Dcentos6_builds_13663&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Z52S6tX26kWyK8H8Srg5ACjTpDVzJ80bL2oKkpdM_W0&s=Yqv5eGzbb-gqkK3VavVrhElDnFGDUxrg_qqq44HKZro&e=" target="_blank">http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/builds/13663</a><div><br></div><div>Can you take a look?</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 7, 2015 at 8:54 AM, Akira Hatanaka <span dir="ltr"><<a href="mailto:ahatanaka@apple.com" target="_blank">ahatanaka@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ahatanak<br>
Date: Tue Jul 7 01:54:42 2015<br>
New Revision: 241566<br>
<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D241566-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Z52S6tX26kWyK8H8Srg5ACjTpDVzJ80bL2oKkpdM_W0&s=MFG-818Uwi-bWCj6-GXTLjAV-8P8rdDqsMIHFNDqZKE&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=241566&view=rev</a><br>
Log:<br>
[ARM] Define a subtarget feature and use it to decide whether long calls should<br>
be emitted.<br>
<br>
This is needed to enable ARM long calls for LTO and enable and disable it on a<br>
per-function basis.<br>
<br>
Out-of-tree projects currently using EnableARMLongCalls to emit long calls<br>
should start passing "+long-calls" to the feature string (see the changes made<br>
to clang in r241565).<br>
<br>
rdar://problem/21529937<br>
<br>
Differential Revision: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D9364&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Z52S6tX26kWyK8H8Srg5ACjTpDVzJ80bL2oKkpdM_W0&s=I_RP_Y2dphlAjdDRGG2f3Vzhy7Oj3SRFevtxmDyhN0w&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D9364</a><br>
<br>
Added:<br>
llvm/trunk/test/CodeGen/ARM/subtarget-features-long-calls.ll<br>
Modified:<br>
llvm/trunk/lib/Target/ARM/ARM.td<br>
llvm/trunk/lib/Target/ARM/ARMFastISel.cpp<br>
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp<br>
llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp<br>
llvm/trunk/lib/Target/ARM/ARMSubtarget.h<br>
llvm/trunk/test/CodeGen/ARM/Windows/long-calls.ll<br>
llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll<br>
llvm/trunk/test/CodeGen/ARM/fast-isel-intrinsic.ll<br>
llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/ARM.td<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_ARM_ARM.td-3Frev-3D241566-26r1-3D241565-26r2-3D241566-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Z52S6tX26kWyK8H8Srg5ACjTpDVzJ80bL2oKkpdM_W0&s=3GzRHcJR2VS5hhTTBxuoKb9NvxQo8y5efDioi_6_A0Q&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARM.td?rev=241566&r1=241565&r2=241566&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/ARM.td (original)<br>
+++ llvm/trunk/lib/Target/ARM/ARM.td Tue Jul 7 01:54:42 2015<br>
@@ -150,6 +150,10 @@ def FeatureAClass : SubtargetFeature<"ac<br>
def FeatureNaClTrap : SubtargetFeature<"nacl-trap", "UseNaClTrap", "true",<br>
"NaCl trap">;<br>
<br>
+def FeatureLongCalls : SubtargetFeature<"long-calls", "GenLongCalls", "true",<br>
+ "Generate calls via indirect call "<br>
+ "instructions">;<br>
+<br>
// ARM ISAs.<br>
def HasV4TOps : SubtargetFeature<"v4t", "HasV4TOps", "true",<br>
"Support ARM v4T instructions">;<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_ARM_ARMFastISel.cpp-3Frev-3D241566-26r1-3D241565-26r2-3D241566-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Z52S6tX26kWyK8H8Srg5ACjTpDVzJ80bL2oKkpdM_W0&s=ppLsdDw-RSZm6VTBzUG23elrnQ_Il6J-ufypPFPbeV8&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=241566&r1=241565&r2=241566&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)<br>
+++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Tue Jul 7 01:54:42 2015<br>
@@ -49,8 +49,6 @@<br>
#include "llvm/Target/TargetOptions.h"<br>
using namespace llvm;<br>
<br>
-extern cl::opt<bool> EnableARMLongCalls;<br>
-<br>
namespace {<br>
<br>
// All possible address modes, plus some.<br>
@@ -2246,19 +2244,19 @@ bool ARMFastISel::ARMEmitLibcall(const I<br>
return false;<br>
<br>
unsigned CalleeReg = 0;<br>
- if (EnableARMLongCalls) {<br>
+ if (Subtarget->genLongCalls()) {<br>
CalleeReg = getLibcallReg(TLI.getLibcallName(Call));<br>
if (CalleeReg == 0) return false;<br>
}<br>
<br>
// Issue the call.<br>
- unsigned CallOpc = ARMSelectCallOp(EnableARMLongCalls);<br>
+ unsigned CallOpc = ARMSelectCallOp(Subtarget->genLongCalls());<br>
MachineInstrBuilder MIB = BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt,<br>
DbgLoc, TII.get(CallOpc));<br>
// BL / BLX don't take a predicate, but tBL / tBLX do.<br>
if (isThumb2)<br>
AddDefaultPred(MIB);<br>
- if (EnableARMLongCalls)<br>
+ if (Subtarget->genLongCalls())<br>
MIB.addReg(CalleeReg);<br>
else<br>
MIB.addExternalSymbol(TLI.getLibcallName(Call));<br>
@@ -2380,7 +2378,7 @@ bool ARMFastISel::SelectCall(const Instr<br>
<br>
bool UseReg = false;<br>
const GlobalValue *GV = dyn_cast<GlobalValue>(Callee);<br>
- if (!GV || EnableARMLongCalls) UseReg = true;<br>
+ if (!GV || Subtarget->genLongCalls()) UseReg = true;<br>
<br>
unsigned CalleeReg = 0;<br>
if (UseReg) {<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_ARM_ARMISelLowering.cpp-3Frev-3D241566-26r1-3D241565-26r2-3D241566-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Z52S6tX26kWyK8H8Srg5ACjTpDVzJ80bL2oKkpdM_W0&s=9ct74gm5hfFs6HmXqQ_ctCscNpcyvzjcFZoUCFD3VHk&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=241566&r1=241565&r2=241566&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)<br>
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Jul 7 01:54:42 2015<br>
@@ -60,11 +60,6 @@ STATISTIC(NumTailCalls, "Number of tail<br>
STATISTIC(NumMovwMovt, "Number of GAs materialized with movw + movt");<br>
STATISTIC(NumLoopByVals, "Number of loops generated for byval arguments");<br>
<br>
-cl::opt<bool><br>
-EnableARMLongCalls("arm-long-calls", cl::Hidden,<br>
- cl::desc("Generate calls via indirect call instructions"),<br>
- cl::init(false));<br>
-<br>
static cl::opt<bool><br>
ARMInterworking("arm-interworking", cl::Hidden,<br>
cl::desc("Enable / disable ARM interworking (for debugging only)"),<br>
@@ -1694,7 +1689,7 @@ ARMTargetLowering::LowerCall(TargetLower<br>
bool isLocalARMFunc = false;<br>
ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();<br>
<br>
- if (EnableARMLongCalls) {<br>
+ if (Subtarget->genLongCalls()) {<br>
assert((Subtarget->isTargetWindows() ||<br>
getTargetMachine().getRelocationModel() == Reloc::Static) &&<br>
"long-calls with non-static relocation model!");<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_ARM_ARMSubtarget.cpp-3Frev-3D241566-26r1-3D241565-26r2-3D241566-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Z52S6tX26kWyK8H8Srg5ACjTpDVzJ80bL2oKkpdM_W0&s=oMYiQs55QfaM4Y2UKvwPfB0iTHsbf3NuZv1MPQcvVsI&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp?rev=241566&r1=241565&r2=241566&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp (original)<br>
+++ llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp Tue Jul 7 01:54:42 2015<br>
@@ -172,6 +172,7 @@ void ARMSubtarget::initializeEnvironment<br>
AllowsUnalignedMem = false;<br>
Thumb2DSP = false;<br>
UseNaClTrap = false;<br>
+ GenLongCalls = false;<br>
UnsafeFPMath = false;<br>
}<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/ARMSubtarget.h<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_ARM_ARMSubtarget.h-3Frev-3D241566-26r1-3D241565-26r2-3D241566-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Z52S6tX26kWyK8H8Srg5ACjTpDVzJ80bL2oKkpdM_W0&s=6QFHkVx6cx81UmcJKI6hG8Ym7BcIy5_ceovX440R3Ac&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSubtarget.h?rev=241566&r1=241565&r2=241566&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/ARMSubtarget.h (original)<br>
+++ llvm/trunk/lib/Target/ARM/ARMSubtarget.h Tue Jul 7 01:54:42 2015<br>
@@ -206,6 +206,9 @@ protected:<br>
/// NaCl TRAP instruction is generated instead of the regular TRAP.<br>
bool UseNaClTrap;<br>
<br>
+ /// Generate calls via indirect call instructions.<br>
+ bool GenLongCalls;<br>
+<br>
/// Target machine allowed unsafe FP math (such as use of NEON fp)<br>
bool UnsafeFPMath;<br>
<br>
@@ -342,6 +345,7 @@ public:<br>
bool hasMPExtension() const { return HasMPExtension; }<br>
bool hasThumb2DSP() const { return Thumb2DSP; }<br>
bool useNaClTrap() const { return UseNaClTrap; }<br>
+ bool genLongCalls() const { return GenLongCalls; }<br>
<br>
bool hasFP16() const { return HasFP16; }<br>
bool hasD16() const { return HasD16; }<br>
<br>
Modified: llvm/trunk/test/CodeGen/ARM/Windows/long-calls.ll<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_CodeGen_ARM_Windows_long-2Dcalls.ll-3Frev-3D241566-26r1-3D241565-26r2-3D241566-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Z52S6tX26kWyK8H8Srg5ACjTpDVzJ80bL2oKkpdM_W0&s=reWmg8QSN5mMn4iWtmN6TLnzvXiOUqiq2UmiZP9Cb_M&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/Windows/long-calls.ll?rev=241566&r1=241565&r2=241566&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/CodeGen/ARM/Windows/long-calls.ll (original)<br>
+++ llvm/trunk/test/CodeGen/ARM/Windows/long-calls.ll Tue Jul 7 01:54:42 2015<br>
@@ -1,4 +1,4 @@<br>
-; RUN: llc -mtriple=thumbv7-windows -mcpu=cortex-a9 -arm-long-calls -o - %s \<br>
+; RUN: llc -mtriple=thumbv7-windows -mcpu=cortex-a9 -mattr=+long-calls -o - %s \<br>
; RUN: | FileCheck %s<br>
<br>
declare arm_aapcs_vfpcc void @callee()<br>
<br>
Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_CodeGen_ARM_fast-2Disel-2Dcall.ll-3Frev-3D241566-26r1-3D241565-26r2-3D241566-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Z52S6tX26kWyK8H8Srg5ACjTpDVzJ80bL2oKkpdM_W0&s=MB1X_sDLtjQvZ0VctJHWlP4UCj21qtgNxI1WSXr5aRg&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll?rev=241566&r1=241565&r2=241566&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll (original)<br>
+++ llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll Tue Jul 7 01:54:42 2015<br>
@@ -1,9 +1,9 @@<br>
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM<br>
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM<br>
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB<br>
-; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios -arm-long-calls | FileCheck %s --check-prefix=ARM-LONG<br>
-; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi -arm-long-calls | FileCheck %s --check-prefix=ARM-LONG<br>
-; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios -arm-long-calls | FileCheck %s --check-prefix=THUMB-LONG<br>
+; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios -mattr=+long-calls | FileCheck %s --check-prefix=ARM-LONG<br>
+; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi -mattr=+long-calls | FileCheck %s --check-prefix=ARM-LONG<br>
+; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios -mattr=+long-calls | FileCheck %s --check-prefix=THUMB-LONG<br>
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios -mattr=-vfp2 | FileCheck %s --check-prefix=ARM-NOVFP<br>
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi -mattr=-vfp2 | FileCheck %s --check-prefix=ARM-NOVFP<br>
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios -mattr=-vfp2 | FileCheck %s --check-prefix=THUMB-NOVFP<br>
<br>
Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-intrinsic.ll<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_CodeGen_ARM_fast-2Disel-2Dintrinsic.ll-3Frev-3D241566-26r1-3D241565-26r2-3D241566-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Z52S6tX26kWyK8H8Srg5ACjTpDVzJ80bL2oKkpdM_W0&s=cT-dd4Rks8XSB2KPB-UJHkZn5qRWEioxgnQi76Nukao&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-intrinsic.ll?rev=241566&r1=241565&r2=241566&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/CodeGen/ARM/fast-isel-intrinsic.ll (original)<br>
+++ llvm/trunk/test/CodeGen/ARM/fast-isel-intrinsic.ll Tue Jul 7 01:54:42 2015<br>
@@ -1,9 +1,9 @@<br>
; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios -verify-machineinstrs | FileCheck %s --check-prefix=ARM<br>
; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi -verify-machineinstrs | FileCheck %s --check-prefix=ARM<br>
; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios -verify-machineinstrs | FileCheck %s --check-prefix=THUMB<br>
-; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios -arm-long-calls -verify-machineinstrs | FileCheck %s --check-prefix=ARM-LONG<br>
-; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi -arm-long-calls -verify-machineinstrs | FileCheck %s --check-prefix=ARM-LONG<br>
-; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios -arm-long-calls -verify-machineinstrs | FileCheck %s --check-prefix=THUMB-LONG<br>
+; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios -mattr=+long-calls -verify-machineinstrs | FileCheck %s --check-prefix=ARM-LONG<br>
+; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi -mattr=+long-calls -verify-machineinstrs | FileCheck %s --check-prefix=ARM-LONG<br>
+; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios -mattr=+long-calls -verify-machineinstrs | FileCheck %s --check-prefix=THUMB-LONG<br>
<br>
; Note that some of these tests assume that relocations are either<br>
; movw/movt or constant pool loads. Different platforms will select<br>
<br>
Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_CodeGen_ARM_fast-2Disel-2Dstatic.ll-3Frev-3D241566-26r1-3D241565-26r2-3D241566-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Z52S6tX26kWyK8H8Srg5ACjTpDVzJ80bL2oKkpdM_W0&s=oSvSOK0OG9--QjdU-r-U17O7lk9X4kdh9Z7L7_vKem0&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll?rev=241566&r1=241565&r2=241566&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll (original)<br>
+++ llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll Tue Jul 7 01:54:42 2015<br>
@@ -1,5 +1,5 @@<br>
-; RUN: llc < %s -mtriple=thumbv7-apple-ios -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=static -arm-long-calls | FileCheck -check-prefix=CHECK-LONG %s<br>
-; RUN: llc < %s -mtriple=armv7-linux-gnueabi -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=static -arm-long-calls | FileCheck -check-prefix=CHECK-LONG %s<br>
+; RUN: llc < %s -mtriple=thumbv7-apple-ios -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=static -mattr=+long-calls | FileCheck -check-prefix=CHECK-LONG %s<br>
+; RUN: llc < %s -mtriple=armv7-linux-gnueabi -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=static -mattr=+long-calls | FileCheck -check-prefix=CHECK-LONG %s<br>
; RUN: llc < %s -mtriple=thumbv7-apple-ios -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=static | FileCheck -check-prefix=CHECK-NORM %s<br>
; RUN: llc < %s -mtriple=armv7-linux-gnueabi -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=static | FileCheck -check-prefix=CHECK-NORM %s<br>
<br>
<br>
Added: llvm/trunk/test/CodeGen/ARM/subtarget-features-long-calls.ll<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_test_CodeGen_ARM_subtarget-2Dfeatures-2Dlong-2Dcalls.ll-3Frev-3D241566-26view-3Dauto&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Z52S6tX26kWyK8H8Srg5ACjTpDVzJ80bL2oKkpdM_W0&s=hHMhS36JamxxLEuXeDCNQ-pN99uPOJPMdTVnT2ru5BQ&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/subtarget-features-long-calls.ll?rev=241566&view=auto</a><br>
==============================================================================<br>
--- llvm/trunk/test/CodeGen/ARM/subtarget-features-long-calls.ll (added)<br>
+++ llvm/trunk/test/CodeGen/ARM/subtarget-features-long-calls.ll Tue Jul 7 01:54:42 2015<br>
@@ -0,0 +1,40 @@<br>
+; RUN: llc -march arm -mcpu cortex-a8 -relocation-model=static %s -o - | FileCheck -check-prefix=NO-OPTION %s<br>
+; RUN: llc -march arm -mcpu cortex-a8 -relocation-model=static %s -o - -mattr=+long-calls | FileCheck -check-prefix=LONGCALL %s<br>
+; RUN: llc -march arm -mcpu cortex-a8 -relocation-model=static %s -o - -mattr=-long-calls | FileCheck -check-prefix=NO-LONGCALL %s<br>
+; RUN: llc -march arm -mcpu cortex-a8 -relocation-model=static %s -o - -O0 | FileCheck -check-prefix=NO-OPTION %s<br>
+; RUN: llc -march arm -mcpu cortex-a8 -relocation-model=static %s -o - -O0 -mattr=+long-calls | FileCheck -check-prefix=LONGCALL %s<br>
+; RUN: llc -march arm -mcpu cortex-a8 -relocation-model=static %s -o - -O0 -mattr=-long-calls | FileCheck -check-prefix=NO-LONGCALL %s<br>
+<br>
+; NO-OPTION-LABEL: {{_?}}caller0<br>
+; NO-OPTION: blx {{r[0-9]+}}<br>
+<br>
+; LONGCALL-LABEL: {{_?}}caller0<br>
+; LONGCALL: blx {{r[0-9]+}}<br>
+<br>
+; NO-LONGCALL-LABEL: {{_?}}caller0<br>
+; NO-LONGCALL: bl {{_?}}callee0<br>
+<br>
+define i32 @caller0() #0 {<br>
+entry:<br>
+ tail call void @callee0()<br>
+ ret i32 0<br>
+}<br>
+<br>
+; NO-OPTION-LABEL: {{_?}}caller1<br>
+; NO-OPTION: bl {{_?}}callee0<br>
+<br>
+; LONGCALL-LABEL: {{_?}}caller1<br>
+; LONGCALL: blx {{r[0-9]+}}<br>
+<br>
+; NO-LONGCALL-LABEL: {{_?}}caller1<br>
+; NO-LONGCALL: bl {{_?}}callee0<br>
+<br>
+define i32 @caller1() {<br>
+entry:<br>
+ tail call void @callee0()<br>
+ ret i32 0<br>
+}<br>
+<br>
+declare void @callee0()<br>
+<br>
+attributes #0 = { "target-features"="+long-calls" }<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div></div>