summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/t2-imm.ll
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-09-27 23:52:58 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-09-27 23:52:58 +0000
commit7c2b1e71c13e88e0788c5e26e6a366fecea06238 (patch)
treef10554a55fe9846eebdbde16c015dac2ac2bebe8 /llvm/test/CodeGen/ARM/t2-imm.ll
parentb0934cdd1cbb561755b16701d735eb39ca7ccba7 (diff)
downloadbcm5719-llvm-7c2b1e71c13e88e0788c5e26e6a366fecea06238.tar.gz
bcm5719-llvm-7c2b1e71c13e88e0788c5e26e6a366fecea06238.zip
Use movt/movw pair to materialize 32 bit constants on ARMv6T2+.
This should be better than single load from constpool. llvm-svn: 82948
Diffstat (limited to 'llvm/test/CodeGen/ARM/t2-imm.ll')
-rw-r--r--llvm/test/CodeGen/ARM/t2-imm.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/t2-imm.ll b/llvm/test/CodeGen/ARM/t2-imm.ll
new file mode 100644
index 00000000000..8b619bfef3e
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/t2-imm.ll
@@ -0,0 +1,9 @@
+; RUN: llc < %s -march=arm -mattr=+thumb2 | FileCheck %s
+
+define i32 @f6(i32 %a) {
+; CHECK:f6
+; CHECK: movw r0, #1123
+; CHECK: movt r0, #1000
+ %tmp = add i32 0, 65537123
+ ret i32 %tmp
+}
OpenPOWER on IntegriCloud