[llvm] r183966 - Enable FastISel on ARM for Linux and NaCl, not MCJIT

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Jun 14 06:11:37 PDT 2013


I think this broke this bot:

http://lab.llvm.org:8011/builders/llvm-armv5-linux/builds/406/steps/test-llvm/logs/LLVM%3A%3A2010-04-19-FramePtr.ll

On 13 June 2013 22:49, JF Bastien <jfb at google.com> wrote:
> Author: jfb
> Date: Thu Jun 13 21:49:43 2013
> New Revision: 183966
>
> URL: http://llvm.org/viewvc/llvm-project?rev=183966&view=rev
> Log:
> Enable FastISel on ARM for Linux and NaCl, not MCJIT
>
> This is a resubmit of r182877, which was reverted because it broken
> MCJIT tests on ARM. The patch leaves MCJIT on ARM as it was before: only
> enabled for iOS. I've CC'ed people from the original review and revert.
>
> FastISel was only enabled for iOS ARM and Thumb2, this patch enables it
> for ARM (not Thumb2) on Linux and NaCl, but not MCJIT.
>
> Thumb2 support needs a bit more work, mainly around register class
> restrictions.
>
> The patch punts to SelectionDAG when doing TLS relocation on non-Darwin
> targets. I will fix this and other FastISel-to-SelectionDAG failures in
> a separate patch.
>
> The patch also forces FastISel to retain frame pointers: iOS always
> keeps them for backtracking (so emitted code won't change because of
> this), but Linux was getting much worse code that was incorrect when
> using big frames (such as test-suite's lencod). I'll also fix this in a
> later patch, it will probably require a peephole so that FastISel
> doesn't rematerialize frame pointers back-to-back.
>
> The test changes are straightforward, similar to:
>   http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130513/174279.html
> They also add a vararg test that got dropped in that change.
>
> I ran all of lnt test-suite on A15 hardware with --optimize-option=-O0
> and all the tests pass. All the tests also pass on x86 make check-all. I
> also re-ran the check-all tests that failed on ARM, and they all seem to
> pass.
>
> Added:
>     llvm/trunk/test/CodeGen/ARM/fast-isel-vararg.ll
> Modified:
>     llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp
>     llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
>     llvm/trunk/test/CodeGen/ARM/fast-isel-GEP-coalesce.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-binary.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-br-const.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-call-multi-reg-return.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-cmp-imm.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-conversion.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-crash.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-crash2.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-ext.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-fold.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-frameaddr.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-icmp.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-indirectbr.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-intrinsic.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-ldrh-strh-arm.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-mvn.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-pic.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-pred.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-ret.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-select.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-shifter.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll
>     llvm/trunk/test/CodeGen/ARM/fast-isel.ll
>
> Modified: llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp (original)
> +++ llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp Thu Jun 13 21:49:43 2013
> @@ -88,6 +88,14 @@ TargetMachine *EngineBuilder::selectTarg
>      FeaturesStr = Features.getString();
>    }
>
> +  // FIXME: non-iOS ARM FastISel is broken with MCJIT.
> +  if (UseMCJIT &&
> +      TheTriple.getArch() == Triple::arm &&
> +      TheTriple.getOS() != Triple::IOS &&
> +      OptLevel == CodeGenOpt::None) {
> +    OptLevel = CodeGenOpt::Less;
> +  }
> +
>    // Allocate a target...
>    TargetMachine *Target = TheTarget->createTargetMachine(TheTriple.getTriple(),
>                                                           MCPU, FeaturesStr,
>
> Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Thu Jun 13 21:49:43 2013
> @@ -630,6 +630,11 @@ unsigned ARMFastISel::ARMMaterializeGV(c
>      (const TargetRegisterClass*)&ARM::GPRRegClass;
>    unsigned DestReg = createResultReg(RC);
>
> +  // FastISel TLS support on non-Darwin is broken, punt to SelectionDAG.
> +  const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV);
> +  bool IsThreadLocal = GVar && GVar->isThreadLocal();
> +  if (!Subtarget->isTargetDarwin() && IsThreadLocal) return 0;
> +
>    // Use movw+movt when possible, it avoids constant pool entries.
>    // Darwin targets don't support movt with Reloc::Static, see
>    // ARMTargetLowering::LowerGlobalAddressDarwin.  Other targets only support
> @@ -3044,13 +3049,23 @@ bool ARMFastISel::FastLowerArguments() {
>  namespace llvm {
>    FastISel *ARM::createFastISel(FunctionLoweringInfo &funcInfo,
>                                  const TargetLibraryInfo *libInfo) {
> -    // Completely untested on non-iOS.
>      const TargetMachine &TM = funcInfo.MF->getTarget();
>
> -    // Darwin and thumb1 only for now.
>      const ARMSubtarget *Subtarget = &TM.getSubtarget<ARMSubtarget>();
> -    if (Subtarget->isTargetIOS() && !Subtarget->isThumb1Only())
> +    // Thumb2 support on iOS; ARM support on iOS, Linux and NaCl.
> +    bool UseFastISel = false;
> +    UseFastISel |= Subtarget->isTargetIOS() && !Subtarget->isThumb1Only();
> +    UseFastISel |= Subtarget->isTargetLinux() && !Subtarget->isThumb();
> +    UseFastISel |= Subtarget->isTargetNaCl() && !Subtarget->isThumb();
> +
> +    if (UseFastISel) {
> +      // iOS always has a FP for backtracking, force other targets
> +      // to keep their FP when doing FastISel. The emitted code is
> +      // currently superior, and in cases like test-suite's lencod
> +      // FastISel isn't quite correct when FP is eliminated.
> +      TM.Options.NoFramePointerElim = true;
>        return new ARMFastISel(funcInfo, libInfo);
> +    }
>      return 0;
>    }
>  }
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-GEP-coalesce.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-GEP-coalesce.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-GEP-coalesce.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-GEP-coalesce.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-darwin | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-darwin | FileCheck %s --check-prefix=THUMB
>
>  %struct.A = type { i32, [2 x [2 x i32]], i8, [3 x [3 x [3 x i32]]] }
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-binary.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-binary.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-binary.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-binary.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
>
>  ; Test add with non-legal types
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-br-const.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-br-const.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-br-const.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-br-const.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
>
>  define i32 @t1(i32 %a, i32 %b) nounwind uwtable ssp {
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-call-multi-reg-return.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-call-multi-reg-return.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-call-multi-reg-return.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-call-multi-reg-return.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
>
>  ; Fast-isel can't handle non-double multi-reg retvals.
>
> 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=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-call.ll Thu Jun 13 21:49:43 2013
> @@ -1,8 +1,11 @@
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios -arm-long-calls | FileCheck %s --check-prefix=ARM-LONG
> +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi -arm-long-calls | FileCheck %s --check-prefix=ARM-LONG
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios -arm-long-calls | FileCheck %s --check-prefix=THUMB-LONG
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios -mattr=-vfp2 | FileCheck %s --check-prefix=ARM-NOVFP
> +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi -mattr=-vfp2 | FileCheck %s --check-prefix=ARM-NOVFP
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios -mattr=-vfp2 | FileCheck %s --check-prefix=THUMB-NOVFP
>
>  ; Note that some of these tests assume that relocations are either
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-cmp-imm.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-cmp-imm.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-cmp-imm.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-cmp-imm.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
>
>  define void @t1a(float %a) uwtable ssp {
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-conversion.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-conversion.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-conversion.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-conversion.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
>
>  ; Test sitofp
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-crash.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-crash.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-crash.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-crash.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -mtriple=thumbv7-apple-darwin
> +; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -mtriple=thumbv7-linux-gnueabi
>
>  %union.anon = type { <16 x i32> }
>
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-crash2.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-crash2.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-crash2.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-crash2.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -mtriple=thumbv7-apple-darwin
> +; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -mtriple=thumbv7-linux-gnueabi
>  ; rdar://9515076
>  ; (Make sure this doesn't crash.)
>
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-ext.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-ext.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-ext.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-ext.ll Thu Jun 13 21:49:43 2013
> @@ -1,6 +1,9 @@
>  ; RUN: llc < %s -O0 -fast-isel-abort -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=v7
> +; RUN: llc < %s -O0 -fast-isel-abort -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=v7
>  ; RUN: llc < %s -O0 -fast-isel-abort -mtriple=armv4t-apple-ios | FileCheck %s --check-prefix=prev6
> +; RUN: llc < %s -O0 -fast-isel-abort -mtriple=armv4t-linux-gnueabi | FileCheck %s --check-prefix=prev6
>  ; RUN: llc < %s -O0 -fast-isel-abort -mtriple=armv5-apple-ios | FileCheck %s --check-prefix=prev6
> +; RUN: llc < %s -O0 -fast-isel-abort -mtriple=armv5-linux-gnueabi | FileCheck %s --check-prefix=prev6
>  ; RUN: llc < %s -O0 -fast-isel-abort -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=v7
>
>  ; Can't test pre-ARMv6 Thumb because ARM FastISel currently only supports
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-fold.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-fold.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-fold.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-fold.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-darwin | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-darwin | FileCheck %s --check-prefix=THUMB
>
>  @a = global i8 1, align 1
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-frameaddr.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-frameaddr.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-frameaddr.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-frameaddr.ll Thu Jun 13 21:49:43 2013
> @@ -46,8 +46,7 @@ entry:
>  ; LINUX-ARM: frameaddr_index1:
>  ; LINUX-ARM: push {r11}
>  ; LINUX-ARM: mov r11, sp
> -; LINUX-ARM: mov r0, r11
> -; LINUX-ARM: ldr r0, [r0]
> +; LINUX-ARM: ldr r0, [r11]
>
>  ; LINUX-THUMB2: frameaddr_index1:
>  ; LINUX-THUMB2: str r7, [sp, #-4]!
> @@ -80,8 +79,7 @@ entry:
>  ; LINUX-ARM: frameaddr_index3:
>  ; LINUX-ARM: push {r11}
>  ; LINUX-ARM: mov r11, sp
> -; LINUX-ARM: mov r0, r11
> -; LINUX-ARM: ldr r0, [r0]
> +; LINUX-ARM: ldr r0, [r11]
>  ; LINUX-ARM: ldr r0, [r0]
>  ; LINUX-ARM: ldr r0, [r0]
>
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-icmp.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-icmp.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-icmp.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-icmp.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
>
>  define i32 @icmp_i16_signed(i16 %a, i16 %b) nounwind {
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-indirectbr.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-indirectbr.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-indirectbr.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-indirectbr.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
>
>  define void @t1(i8* %x) {
>
> 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=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-intrinsic.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-intrinsic.ll Thu Jun 13 21:49:43 2013
> @@ -1,6 +1,8 @@
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios -arm-long-calls | FileCheck %s --check-prefix=ARM-LONG
> +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi -arm-long-calls | FileCheck %s --check-prefix=ARM-LONG
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios -arm-long-calls | FileCheck %s --check-prefix=THUMB-LONG
>
>  ; Note that some of these tests assume that relocations are either
> @@ -20,8 +22,8 @@ define void @t1() nounwind ssp {
>  ; ARM: and r1, r1, #255
>  ; ARM: bl {{_?}}memset
>  ; ARM-LONG: t1
> -; ARM-LONG: movw r3, :lower16:L_memset$non_lazy_ptr
> -; ARM-LONG: movt r3, :upper16:L_memset$non_lazy_ptr
> +; ARM-LONG: {{(movw r3, :lower16:L_memset\$non_lazy_ptr)|(ldr r3, .LCPI)}}
> +; ARM-LONG: {{(movt r3, :upper16:L_memset\$non_lazy_ptr)?}}
>  ; ARM-LONG: ldr r3, [r3]
>  ; ARM-LONG: blx r3
>  ; THUMB: t1
> @@ -58,8 +60,8 @@ define void @t2() nounwind ssp {
>  ; ARM: ldr r1, [sp[[SLOT]]] @ 4-byte Reload
>  ; ARM: bl {{_?}}memcpy
>  ; ARM-LONG: t2
> -; ARM-LONG: movw r3, :lower16:L_memcpy$non_lazy_ptr
> -; ARM-LONG: movt r3, :upper16:L_memcpy$non_lazy_ptr
> +; ARM-LONG: {{(movw r3, :lower16:L_memcpy\$non_lazy_ptr)|(ldr r3, .LCPI)}}
> +; ARM-LONG: {{(movt r3, :upper16:L_memcpy\$non_lazy_ptr)?}}
>  ; ARM-LONG: ldr r3, [r3]
>  ; ARM-LONG: blx r3
>  ; THUMB: t2
> @@ -96,8 +98,8 @@ define void @t3() nounwind ssp {
>  ; ARM: mov r0, r1
>  ; ARM: bl {{_?}}memmove
>  ; ARM-LONG: t3
> -; ARM-LONG: movw r3, :lower16:L_memmove$non_lazy_ptr
> -; ARM-LONG: movt r3, :upper16:L_memmove$non_lazy_ptr
> +; ARM-LONG: {{(movw r3, :lower16:L_memmove\$non_lazy_ptr)|(ldr r3, .LCPI)}}
> +; ARM-LONG: {{(movt r3, :upper16:L_memmove\$non_lazy_ptr)?}}
>  ; ARM-LONG: ldr r3, [r3]
>  ; ARM-LONG: blx r3
>  ; THUMB: t3
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-ldrh-strh-arm.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-ldrh-strh-arm.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-ldrh-strh-arm.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-ldrh-strh-arm.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>  ; rdar://10418009
>
>  define zeroext i16 @t1(i16* nocapture %a) nounwind uwtable readonly ssp {
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-mvn.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-mvn.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-mvn.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-mvn.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
>  ; rdar://10412592
>
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-pic.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-pic.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-pic.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-pic.ll Thu Jun 13 21:49:43 2013
> @@ -26,7 +26,7 @@ entry:
>  ; ARMv7-ELF: LoadGV
>  ; ARMv7-ELF: ldr r[[reg2:[0-9]+]],
>  ; ARMv7-ELF: ldr r[[reg3:[0-9]+]],
> -; ARMv7-ELF: ldr r[[reg2]], [r[[reg2]], r[[reg3]]]
> +; ARMv7-ELF: ldr r[[reg2]], [r[[reg3]], r[[reg2]]]
>    %tmp = load i32* @g
>    ret i32 %tmp
>  }
> @@ -55,7 +55,7 @@ entry:
>  ; ARMv7-ELF: LoadIndirectSymbol
>  ; ARMv7-ELF: ldr r[[reg5:[0-9]+]],
>  ; ARMv7-ELF: ldr r[[reg6:[0-9]+]],
> -; ARMv7-ELF: ldr r[[reg5]], [r[[reg5]], r[[reg6]]]
> +; ARMv7-ELF: ldr r[[reg5]], [r[[reg6]], r[[reg5]]]
>    %tmp = load i32* @i
>    ret i32 %tmp
>  }
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-pred.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-pred.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-pred.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-pred.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc -O0 -verify-machineinstrs -mtriple=armv7-apple-darwin < %s
> +; RUN: llc -O0 -verify-machineinstrs -mtriple=armv7-linux-gnueabi < %s
>
>  define i32 @main() nounwind ssp {
>  entry:
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-ret.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-ret.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-ret.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-ret.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s
> +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s
>
>  ; Sign-extend of i1 currently not supported by fast-isel
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-select.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-select.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-select.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-select.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
>
>  define i32 @t1(i1 %c) nounwind readnone {
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel-shifter.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-shifter.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-shifter.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-shifter.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>
>  define i32 @shl() nounwind ssp {
>  entry:
>
> 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=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-static.ll Thu Jun 13 21:49:43 2013
> @@ -1,5 +1,7 @@
>  ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=static -arm-long-calls | FileCheck -check-prefix=LONG %s
> +; RUN: llc < %s -mtriple=thumbv7-linux-gnueabi -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=static -arm-long-calls | FileCheck -check-prefix=LONG %s
>  ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=static | FileCheck -check-prefix=NORM %s
> +; RUN: llc < %s -mtriple=thumbv7-linux-gnueabi -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=static | FileCheck -check-prefix=NORM %s
>
>  define void @myadd(float* %sum, float* %addend) nounwind {
>  entry:
>
> Added: llvm/trunk/test/CodeGen/ARM/fast-isel-vararg.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel-vararg.ll?rev=183966&view=auto
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel-vararg.ll (added)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel-vararg.ll Thu Jun 13 21:49:43 2013
> @@ -0,0 +1,47 @@
> +; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
> +
> +define i32 @VarArg() nounwind {
> +entry:
> +  %i = alloca i32, align 4
> +  %j = alloca i32, align 4
> +  %k = alloca i32, align 4
> +  %m = alloca i32, align 4
> +  %n = alloca i32, align 4
> +  %tmp = alloca i32, align 4
> +  %0 = load i32* %i, align 4
> +  %1 = load i32* %j, align 4
> +  %2 = load i32* %k, align 4
> +  %3 = load i32* %m, align 4
> +  %4 = load i32* %n, align 4
> +; ARM: VarArg
> +; ARM: mov [[FP:r[0-9]+]], sp
> +; ARM: sub sp, sp, #32
> +; ARM: movw r0, #5
> +; ARM: ldr r1, {{\[}}[[FP]], #-4]
> +; ARM: ldr r2, {{\[}}[[FP]], #-8]
> +; ARM: ldr r3, {{\[}}[[FP]], #-12]
> +; ARM: ldr [[Ra:r[0-9]+]], [sp, #16]
> +; ARM: ldr [[Rb:[lr]+[0-9]*]], [sp, #12]
> +; ARM: str [[Ra]], [sp]
> +; ARM: str [[Rb]], [sp, #4]
> +; ARM: bl {{_?CallVariadic}}
> +; THUMB: sub sp, #32
> +; THUMB: movs r0, #5
> +; THUMB: movt r0, #0
> +; THUMB: ldr r1, [sp, #28]
> +; THUMB: ldr r2, [sp, #24]
> +; THUMB: ldr r3, [sp, #20]
> +; THUMB: ldr.w {{[a-z0-9]+}}, [sp, #16]
> +; THUMB: ldr.w {{[a-z0-9]+}}, [sp, #12]
> +; THUMB: str.w {{[a-z0-9]+}}, [sp]
> +; THUMB: str.w {{[a-z0-9]+}}, [sp, #4]
> +; THUMB: bl {{_?}}CallVariadic
> +  %call = call i32 (i32, ...)* @CallVariadic(i32 5, i32 %0, i32 %1, i32 %2, i32 %3, i32 %4)
> +  store i32 %call, i32* %tmp, align 4
> +  %5 = load i32* %tmp, align 4
> +  ret i32 %5
> +}
> +
> +declare i32 @CallVariadic(i32, ...)
>
> Modified: llvm/trunk/test/CodeGen/ARM/fast-isel.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fast-isel.ll?rev=183966&r1=183965&r2=183966&view=diff
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/fast-isel.ll (original)
> +++ llvm/trunk/test/CodeGen/ARM/fast-isel.ll Thu Jun 13 21:49:43 2013
> @@ -1,4 +1,5 @@
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
> +; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
>  ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
>
>  ; Very basic fast-isel functionality.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list