summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM
diff options
context:
space:
mode:
authorWeiming Zhao <weimingz@codeaurora.org>2016-08-03 17:05:23 +0000
committerWeiming Zhao <weimingz@codeaurora.org>2016-08-03 17:05:23 +0000
commit57dc4cf0e1dc149f05569aee7c5dd8fec04f81b4 (patch)
treeb556506ad1ad97783d201353a01b6c686411b92a /llvm/test/CodeGen/ARM
parent8cf51c340dcb0c150a5dcb8c820c758c781404d9 (diff)
downloadbcm5719-llvm-57dc4cf0e1dc149f05569aee7c5dd8fec04f81b4.tar.gz
bcm5719-llvm-57dc4cf0e1dc149f05569aee7c5dd8fec04f81b4.zip
[ARM] Constant Materialize: imms with specific value can be encoded into mov.w
Summary: Thumb2 supports encoding immediates with specific patterns into mov.w by splatting the low 8 bits into other bytes. Reviewers: john.brawn, jmolloy Subscribers: jmolloy, aemerson, rengolin, samparker, llvm-commits Differential Revision: https://reviews.llvm.org/D23090 llvm-svn: 277610
Diffstat (limited to 'llvm/test/CodeGen/ARM')
-rw-r--r--llvm/test/CodeGen/ARM/subtarget-no-movt.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/subtarget-no-movt.ll b/llvm/test/CodeGen/ARM/subtarget-no-movt.ll
index cb61bde3f9c..aad3c0a2ed6 100644
--- a/llvm/test/CodeGen/ARM/subtarget-no-movt.ll
+++ b/llvm/test/CodeGen/ARM/subtarget-no-movt.ll
@@ -42,4 +42,21 @@ define i32 @foo1(i32 %a) {
ret i32 %1
}
+; NO-OPTION-LABEL: {{_?}}foo2
+; NO-OPTION: mov.w r0, #-536813568
+; NO-OPTION-LABEL-NOT: .long
+
+; USE-MOVT-LABEL: {{_?}}foo2
+; USE-MOVT: mov.w r0, #-536813568
+; USE-MOVT-NOT: .long
+
+; NO-USE-MOVT-LABEL: {{_?}}foo2
+; NO-USE-MOVT: mov.w r0, #-536813568
+; NO-USE-MOVT-NOT: .long
+define i32 @foo2() {
+ %1 = load i32, i32* inttoptr (i32 -536813568 to i32*) ; load from 0xe000e000
+ ret i32 %1
+}
+
+
attributes #0 = { "target-features"="+no-movt" }
OpenPOWER on IntegriCloud