mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
cb60eaba94
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. llvm-svn: 183966
109 lines
2.1 KiB
LLVM
109 lines
2.1 KiB
LLVM
; 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
|
|
|
|
; Note: The Thumb code is being generated by the target-independent selector.
|
|
|
|
define void @t1() nounwind {
|
|
entry:
|
|
; ARM: t1
|
|
; THUMB: t1
|
|
; ARM: mvn r0, #0
|
|
; THUMB: movw r0, #65535
|
|
; THUMB: movt r0, #65535
|
|
call void @foo(i32 -1)
|
|
ret void
|
|
}
|
|
|
|
declare void @foo(i32)
|
|
|
|
define void @t2() nounwind {
|
|
entry:
|
|
; ARM: t2
|
|
; THUMB: t2
|
|
; ARM: mvn r0, #233
|
|
; THUMB: movw r0, #65302
|
|
; THUMB: movt r0, #65535
|
|
call void @foo(i32 -234)
|
|
ret void
|
|
}
|
|
|
|
define void @t3() nounwind {
|
|
entry:
|
|
; ARM: t3
|
|
; THUMB: t3
|
|
; ARM: mvn r0, #256
|
|
; THUMB: movw r0, #65279
|
|
; THUMB: movt r0, #65535
|
|
call void @foo(i32 -257)
|
|
ret void
|
|
}
|
|
|
|
; Load from constant pool
|
|
define void @t4() nounwind {
|
|
entry:
|
|
; ARM: t4
|
|
; THUMB: t4
|
|
; ARM: ldr r0
|
|
; THUMB: movw r0, #65278
|
|
; THUMB: movt r0, #65535
|
|
call void @foo(i32 -258)
|
|
ret void
|
|
}
|
|
|
|
define void @t5() nounwind {
|
|
entry:
|
|
; ARM: t5
|
|
; THUMB: t5
|
|
; ARM: mvn r0, #65280
|
|
; THUMB: movs r0, #255
|
|
; THUMB: movt r0, #65535
|
|
call void @foo(i32 -65281)
|
|
ret void
|
|
}
|
|
|
|
define void @t6() nounwind {
|
|
entry:
|
|
; ARM: t6
|
|
; THUMB: t6
|
|
; ARM: mvn r0, #978944
|
|
; THUMB: movw r0, #4095
|
|
; THUMB: movt r0, #65521
|
|
call void @foo(i32 -978945)
|
|
ret void
|
|
}
|
|
|
|
define void @t7() nounwind {
|
|
entry:
|
|
; ARM: t7
|
|
; THUMB: t7
|
|
; ARM: mvn r0, #267386880
|
|
; THUMB: movw r0, #65535
|
|
; THUMB: movt r0, #61455
|
|
call void @foo(i32 -267386881)
|
|
ret void
|
|
}
|
|
|
|
define void @t8() nounwind {
|
|
entry:
|
|
; ARM: t8
|
|
; THUMB: t8
|
|
; ARM: mvn r0, #65280
|
|
; THUMB: movs r0, #255
|
|
; THUMB: movt r0, #65535
|
|
call void @foo(i32 -65281)
|
|
ret void
|
|
}
|
|
|
|
define void @t9() nounwind {
|
|
entry:
|
|
; ARM: t9
|
|
; THUMB: t9
|
|
; ARM: mvn r0, #2130706432
|
|
; THUMB: movw r0, #65535
|
|
; THUMB: movt r0, #33023
|
|
call void @foo(i32 -2130706433)
|
|
ret void
|
|
}
|