summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/fast-isel-mvn.ll
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-08-14 19:56:28 +0000
committerJuergen Ributzka <juergen@apple.com>2014-08-14 19:56:28 +0000
commit790bacf232d0ec3cee7c41fef4702b7f90862269 (patch)
tree579ad6ffa3206e8cbacf5bf8f4abb7f19f22f660 /llvm/test/CodeGen/ARM/fast-isel-mvn.ll
parent53e6a5d60c7be3ce3fc261e08b3926bb12a27663 (diff)
downloadbcm5719-llvm-790bacf232d0ec3cee7c41fef4702b7f90862269.tar.gz
bcm5719-llvm-790bacf232d0ec3cee7c41fef4702b7f90862269.zip
Revert several FastISel commits to track down a buildbot error.
This reverts: r215595 "[FastISel][X86] Add large code model support for materializing floating-point constants." r215594 "[FastISel][X86] Use XOR to materialize the "0" value." r215593 "[FastISel][X86] Emit more efficient instructions for integer constant materialization." r215591 "[FastISel][AArch64] Make use of the zero register when possible." r215588 "[FastISel] Let the target decide first if it wants to materialize a constant." r215582 "[FastISel][AArch64] Cleanup constant materialization code. NFCI." llvm-svn: 215673
Diffstat (limited to 'llvm/test/CodeGen/ARM/fast-isel-mvn.ll')
-rw-r--r--llvm/test/CodeGen/ARM/fast-isel-mvn.ll71
1 files changed, 48 insertions, 23 deletions
diff --git a/llvm/test/CodeGen/ARM/fast-isel-mvn.ll b/llvm/test/CodeGen/ARM/fast-isel-mvn.ll
index 7ec7f3ce32d..9cb56ea9ae1 100644
--- a/llvm/test/CodeGen/ARM/fast-isel-mvn.ll
+++ b/llvm/test/CodeGen/ARM/fast-isel-mvn.ll
@@ -1,13 +1,17 @@
; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -arm-use-movt=false -mtriple=armv7-apple-ios < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM
; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -arm-use-movt=false -mtriple=armv7-linux-gnueabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM
-; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -arm-use-movt=false -mtriple=thumbv7-apple-ios < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM
-; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -arm-use-movt=true -mtriple=thumbv7-apple-ios < %s | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB
+; 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:
-; CHECK-LABEL: t1
-; CHECK: mvn r0, #0
+; ARM: t1
+; THUMB: t1
+; ARM: mvn r0, #0
+; THUMB: movw r0, #65535
+; THUMB: movt r0, #65535
call void @foo(i32 -1)
ret void
}
@@ -16,16 +20,22 @@ declare void @foo(i32)
define void @t2() nounwind {
entry:
-; CHECK-LABEL: t2
-; CHECK: mvn r0, #233
+; 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:
-; CHECK-LABEL: t3
-; CHECK: mvn r0, #256
+; ARM: t3
+; THUMB: t3
+; ARM: mvn r0, #256
+; THUMB: movw r0, #65279
+; THUMB: movt r0, #65535
call void @foo(i32 -257)
ret void
}
@@ -33,51 +43,66 @@ entry:
; Load from constant pool
define void @t4() nounwind {
entry:
-; ARM-LABEL: t4
-; ARM: ldr r0
-; THUMB-LABEL: t4
-; THUMB: movw r0, #65278
-; THUMB: movt r0, #65535
+; 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:
-; CHECK-LABEL: t5
-; CHECK: mvn r0, #65280
+; 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:
-; CHECK-LABEL: t6
-; CHECK: mvn r0, #978944
+; 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:
-; CHECK-LABEL: t7
-; CHECK: mvn r0, #267386880
+; 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:
-; CHECK-LABEL: t8
-; CHECK: mvn r0, #65280
+; 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:
-; CHECK-LABEL: t9
-; CHECK: mvn r0, #2130706432
+; ARM: t9
+; THUMB: t9
+; ARM: mvn r0, #2130706432
+; THUMB: movw r0, #65535
+; THUMB: movt r0, #33023
call void @foo(i32 -2130706433)
ret void
}
OpenPOWER on IntegriCloud