[llvm] r241566 - [ARM] Define a subtarget feature and use it to decide whether long calls should

Akira Hatanaka ahatanak at gmail.com
Tue Jul 7 07:45:48 PDT 2015


Fixed the failing test case in r241588.

On Tue, Jul 7, 2015 at 2:53 AM, Daniel Jasper <djasper at google.com> wrote:

> I think this might be breaking on a buildbot:
> http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/builds/13663
> <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=>
>
> Can you take a look?
>
> On Tue, Jul 7, 2015 at 8:54 AM, Akira Hatanaka <ahatanaka at apple.com>
> wrote:
>
>> Author: ahatanak
>> Date: Tue Jul  7 01:54:42 2015
>> New Revision: 241566
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=241566&view=rev
>> <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=>
>> Log:
>> [ARM] Define a subtarget feature and use it to decide whether long calls
>> should
>> be emitted.
>>
>> This is needed to enable ARM long calls for LTO and enable and disable it
>> on a
>> per-function basis.
>>
>> Out-of-tree projects currently using EnableARMLongCalls to emit long calls
>> should start passing "+long-calls" to the feature string (see the changes
>> made
>> to clang in r241565).
>>
>> rdar://problem/21529937
>>
>> Differential Revision: http://reviews.llvm.org/D9364
>> <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=>
>>
>> Added:
>>     llvm/trunk/test/CodeGen/ARM/subtarget-features-long-calls.ll
>> Modified:
>>     llvm/trunk/lib/Target/ARM/ARM.td
>>     llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
>>     llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
>>     llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
>>     llvm/trunk/lib/Target/ARM/ARMSubtarget.h
>>     llvm/trunk/test/CodeGen/ARM/Windows/long-calls.ll
>>     llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll
>>     llvm/trunk/test/CodeGen/ARM/fast-isel-intrinsic.ll
>>     llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll
>>
>> Modified: llvm/trunk/lib/Target/ARM/ARM.td
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARM.td?rev=241566&r1=241565&r2=241566&view=diff
>> <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=>
>>
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARM/ARM.td (original)
>> +++ llvm/trunk/lib/Target/ARM/ARM.td Tue Jul  7 01:54:42 2015
>> @@ -150,6 +150,10 @@ def FeatureAClass : SubtargetFeature<"ac
>>  def FeatureNaClTrap : SubtargetFeature<"nacl-trap", "UseNaClTrap",
>> "true",
>>                                         "NaCl trap">;
>>
>> +def FeatureLongCalls : SubtargetFeature<"long-calls", "GenLongCalls",
>> "true",
>> +                                        "Generate calls via indirect
>> call "
>> +                                        "instructions">;
>> +
>>  // ARM ISAs.
>>  def HasV4TOps   : SubtargetFeature<"v4t", "HasV4TOps", "true",
>>                                     "Support ARM v4T instructions">;
>>
>> Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=241566&r1=241565&r2=241566&view=diff
>> <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=>
>>
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
>> +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Tue Jul  7 01:54:42 2015
>> @@ -49,8 +49,6 @@
>>  #include "llvm/Target/TargetOptions.h"
>>  using namespace llvm;
>>
>> -extern cl::opt<bool> EnableARMLongCalls;
>> -
>>  namespace {
>>
>>    // All possible address modes, plus some.
>> @@ -2246,19 +2244,19 @@ bool ARMFastISel::ARMEmitLibcall(const I
>>      return false;
>>
>>    unsigned CalleeReg = 0;
>> -  if (EnableARMLongCalls) {
>> +  if (Subtarget->genLongCalls()) {
>>      CalleeReg = getLibcallReg(TLI.getLibcallName(Call));
>>      if (CalleeReg == 0) return false;
>>    }
>>
>>    // Issue the call.
>> -  unsigned CallOpc = ARMSelectCallOp(EnableARMLongCalls);
>> +  unsigned CallOpc = ARMSelectCallOp(Subtarget->genLongCalls());
>>    MachineInstrBuilder MIB = BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt,
>>                                      DbgLoc, TII.get(CallOpc));
>>    // BL / BLX don't take a predicate, but tBL / tBLX do.
>>    if (isThumb2)
>>      AddDefaultPred(MIB);
>> -  if (EnableARMLongCalls)
>> +  if (Subtarget->genLongCalls())
>>      MIB.addReg(CalleeReg);
>>    else
>>      MIB.addExternalSymbol(TLI.getLibcallName(Call));
>> @@ -2380,7 +2378,7 @@ bool ARMFastISel::SelectCall(const Instr
>>
>>    bool UseReg = false;
>>    const GlobalValue *GV = dyn_cast<GlobalValue>(Callee);
>> -  if (!GV || EnableARMLongCalls) UseReg = true;
>> +  if (!GV || Subtarget->genLongCalls()) UseReg = true;
>>
>>    unsigned CalleeReg = 0;
>>    if (UseReg) {
>>
>> Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=241566&r1=241565&r2=241566&view=diff
>> <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=>
>>
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
>> +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Jul  7 01:54:42 2015
>> @@ -60,11 +60,6 @@ STATISTIC(NumTailCalls, "Number of tail
>>  STATISTIC(NumMovwMovt, "Number of GAs materialized with movw + movt");
>>  STATISTIC(NumLoopByVals, "Number of loops generated for byval
>> arguments");
>>
>> -cl::opt<bool>
>> -EnableARMLongCalls("arm-long-calls", cl::Hidden,
>> -  cl::desc("Generate calls via indirect call instructions"),
>> -  cl::init(false));
>> -
>>  static cl::opt<bool>
>>  ARMInterworking("arm-interworking", cl::Hidden,
>>    cl::desc("Enable / disable ARM interworking (for debugging only)"),
>> @@ -1694,7 +1689,7 @@ ARMTargetLowering::LowerCall(TargetLower
>>    bool isLocalARMFunc = false;
>>    ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
>>
>> -  if (EnableARMLongCalls) {
>> +  if (Subtarget->genLongCalls()) {
>>      assert((Subtarget->isTargetWindows() ||
>>              getTargetMachine().getRelocationModel() == Reloc::Static) &&
>>             "long-calls with non-static relocation model!");
>>
>> Modified: llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp?rev=241566&r1=241565&r2=241566&view=diff
>> <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=>
>>
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp (original)
>> +++ llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp Tue Jul  7 01:54:42 2015
>> @@ -172,6 +172,7 @@ void ARMSubtarget::initializeEnvironment
>>    AllowsUnalignedMem = false;
>>    Thumb2DSP = false;
>>    UseNaClTrap = false;
>> +  GenLongCalls = false;
>>    UnsafeFPMath = false;
>>  }
>>
>>
>> Modified: llvm/trunk/lib/Target/ARM/ARMSubtarget.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSubtarget.h?rev=241566&r1=241565&r2=241566&view=diff
>> <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=>
>>
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARM/ARMSubtarget.h (original)
>> +++ llvm/trunk/lib/Target/ARM/ARMSubtarget.h Tue Jul  7 01:54:42 2015
>> @@ -206,6 +206,9 @@ protected:
>>    /// NaCl TRAP instruction is generated instead of the regular TRAP.
>>    bool UseNaClTrap;
>>
>> +  /// Generate calls via indirect call instructions.
>> +  bool GenLongCalls;
>> +
>>    /// Target machine allowed unsafe FP math (such as use of NEON fp)
>>    bool UnsafeFPMath;
>>
>> @@ -342,6 +345,7 @@ public:
>>    bool hasMPExtension() const { return HasMPExtension; }
>>    bool hasThumb2DSP() const { return Thumb2DSP; }
>>    bool useNaClTrap() const { return UseNaClTrap; }
>> +  bool genLongCalls() const { return GenLongCalls; }
>>
>>    bool hasFP16() const { return HasFP16; }
>>    bool hasD16() const { return HasD16; }
>>
>> Modified: llvm/trunk/test/CodeGen/ARM/Windows/long-calls.ll
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/Windows/long-calls.ll?rev=241566&r1=241565&r2=241566&view=diff
>> <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=>
>>
>> ==============================================================================
>> --- llvm/trunk/test/CodeGen/ARM/Windows/long-calls.ll (original)
>> +++ llvm/trunk/test/CodeGen/ARM/Windows/long-calls.ll Tue Jul  7 01:54:42
>> 2015
>> @@ -1,4 +1,4 @@
>> -; RUN: llc -mtriple=thumbv7-windows -mcpu=cortex-a9 -arm-long-calls -o -
>> %s \
>> +; RUN: llc -mtriple=thumbv7-windows -mcpu=cortex-a9 -mattr=+long-calls
>> -o - %s \
>>  ; RUN:    | FileCheck %s
>>
>>  declare arm_aapcs_vfpcc void @callee()
>>
>> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll?rev=241566&r1=241565&r2=241566&view=diff
>> <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=>
>>
>> ==============================================================================
>> --- llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll (original)
>> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll Tue Jul  7 01:54:42 2015
>> @@ -1,9 +1,9 @@
>>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1
>> -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s
>> --check-prefix=ARM
>>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1
>> -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck
>> %s --check-prefix=ARM
>>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1
>> -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s
>> --check-prefix=THUMB
>> -; 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
>> -; 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
>> -; 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
>> +; 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
>> +; 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
>> +; 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
>>  ; 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
>>  ; 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
>>  ; 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
>>
>> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-intrinsic.ll
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-intrinsic.ll?rev=241566&r1=241565&r2=241566&view=diff
>> <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=>
>>
>> ==============================================================================
>> --- llvm/trunk/test/CodeGen/ARM/fast-isel-intrinsic.ll (original)
>> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-intrinsic.ll Tue Jul  7
>> 01:54:42 2015
>> @@ -1,9 +1,9 @@
>>  ; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=dynamic-no-pic
>> -mtriple=armv7-apple-ios -verify-machineinstrs | FileCheck %s
>> --check-prefix=ARM
>>  ; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=dynamic-no-pic
>> -mtriple=armv7-linux-gnueabi -verify-machineinstrs | FileCheck %s
>> --check-prefix=ARM
>>  ; RUN: llc < %s -O0 -fast-isel-abort=1 -relocation-model=dynamic-no-pic
>> -mtriple=thumbv7-apple-ios -verify-machineinstrs | FileCheck %s
>> --check-prefix=THUMB
>> -; 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
>> -; 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
>> -; 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
>> +; 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
>> +; 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
>> +; 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
>>
>>  ; Note that some of these tests assume that relocations are either
>>  ; movw/movt or constant pool loads. Different platforms will select
>>
>> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll?rev=241566&r1=241565&r2=241566&view=diff
>> <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=>
>>
>> ==============================================================================
>> --- llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll (original)
>> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll Tue Jul  7 01:54:42
>> 2015
>> @@ -1,5 +1,5 @@
>> -; 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
>> -; 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
>> +; 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
>> +; 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
>>  ; RUN: llc < %s -mtriple=thumbv7-apple-ios -O0 -verify-machineinstrs
>> -fast-isel-abort=1 -relocation-model=static | FileCheck
>> -check-prefix=CHECK-NORM %s
>>  ; RUN: llc < %s -mtriple=armv7-linux-gnueabi -O0 -verify-machineinstrs
>> -fast-isel-abort=1 -relocation-model=static | FileCheck
>> -check-prefix=CHECK-NORM %s
>>
>>
>> Added: llvm/trunk/test/CodeGen/ARM/subtarget-features-long-calls.ll
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/subtarget-features-long-calls.ll?rev=241566&view=auto
>> <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=>
>>
>> ==============================================================================
>> --- llvm/trunk/test/CodeGen/ARM/subtarget-features-long-calls.ll (added)
>> +++ llvm/trunk/test/CodeGen/ARM/subtarget-features-long-calls.ll Tue Jul
>> 7 01:54:42 2015
>> @@ -0,0 +1,40 @@
>> +; RUN: llc -march arm -mcpu cortex-a8 -relocation-model=static %s -o - |
>> FileCheck -check-prefix=NO-OPTION %s
>> +; RUN: llc -march arm -mcpu cortex-a8 -relocation-model=static %s -o -
>> -mattr=+long-calls | FileCheck -check-prefix=LONGCALL %s
>> +; RUN: llc -march arm -mcpu cortex-a8 -relocation-model=static %s -o -
>> -mattr=-long-calls | FileCheck -check-prefix=NO-LONGCALL %s
>> +; RUN: llc -march arm -mcpu cortex-a8 -relocation-model=static %s -o -
>> -O0 | FileCheck -check-prefix=NO-OPTION %s
>> +; RUN: llc -march arm -mcpu cortex-a8 -relocation-model=static %s -o -
>> -O0 -mattr=+long-calls | FileCheck -check-prefix=LONGCALL %s
>> +; RUN: llc -march arm -mcpu cortex-a8 -relocation-model=static %s -o -
>> -O0 -mattr=-long-calls | FileCheck -check-prefix=NO-LONGCALL %s
>> +
>> +; NO-OPTION-LABEL: {{_?}}caller0
>> +; NO-OPTION: blx {{r[0-9]+}}
>> +
>> +; LONGCALL-LABEL: {{_?}}caller0
>> +; LONGCALL: blx {{r[0-9]+}}
>> +
>> +; NO-LONGCALL-LABEL: {{_?}}caller0
>> +; NO-LONGCALL: bl {{_?}}callee0
>> +
>> +define i32 @caller0() #0 {
>> +entry:
>> +  tail call void @callee0()
>> +  ret i32 0
>> +}
>> +
>> +; NO-OPTION-LABEL: {{_?}}caller1
>> +; NO-OPTION: bl {{_?}}callee0
>> +
>> +; LONGCALL-LABEL: {{_?}}caller1
>> +; LONGCALL: blx {{r[0-9]+}}
>> +
>> +; NO-LONGCALL-LABEL: {{_?}}caller1
>> +; NO-LONGCALL: bl {{_?}}callee0
>> +
>> +define i32 @caller1() {
>> +entry:
>> +  tail call void @callee0()
>> +  ret i32 0
>> +}
>> +
>> +declare void @callee0()
>> +
>> +attributes #0 = { "target-features"="+long-calls" }
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150707/a442dc46/attachment.html>


More information about the llvm-commits mailing list