summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-08-13 21:42:19 +0000
committerJuergen Ributzka <juergen@apple.com>2014-08-13 21:42:19 +0000
commita5b083853cfda598d76e53ef2c302d13c936834b (patch)
tree8ff320be0c598071182e81b372ae3c561c7772d2 /llvm/lib
parent2cbcf7aad91bccd7123c0be16fc18273f7e2e82d (diff)
downloadbcm5719-llvm-a5b083853cfda598d76e53ef2c302d13c936834b.tar.gz
bcm5719-llvm-a5b083853cfda598d76e53ef2c302d13c936834b.zip
[FastISel][ARM] Use MOVT/MOVW if the subtarget requests it.
This change is also in preparation for a future change to make sure that the constant materialization uses MOVT/MOVW when available and not a load from the constant pool. llvm-svn: 215584
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/ARMFastISel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp
index 5d33303ffa1..5cb6d9a0a77 100644
--- a/llvm/lib/Target/ARM/ARMFastISel.cpp
+++ b/llvm/lib/Target/ARM/ARMFastISel.cpp
@@ -546,6 +546,9 @@ unsigned ARMFastISel::ARMMaterializeInt(const Constant *C, MVT VT) {
}
}
+ if (Subtarget->useMovt(*FuncInfo.MF))
+ return FastEmit_i(VT, VT, ISD::Constant, CI->getZExtValue());
+
// Load from constant pool. For now 32-bit only.
if (VT != MVT::i32)
return false;
OpenPOWER on IntegriCloud