summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2019-06-08 10:32:53 +0000
committerDavid Green <david.green@arm.com>2019-06-08 10:32:53 +0000
commitc5471c2a5751976c4214b889110ad649e95a2188 (patch)
tree9d69e2b4c238b4cf92df9822abae0e04a3a92f6e /llvm/lib
parent342d1b81a34932829479d48d3225eae5cdc9b193 (diff)
downloadbcm5719-llvm-c5471c2a5751976c4214b889110ad649e95a2188.tar.gz
bcm5719-llvm-c5471c2a5751976c4214b889110ad649e95a2188.zip
[ARM] Adjust isLegalT1AddressImmediate for non-legal types
Types such as float and i64's do not have legal loads in Thumb1, but will still be loaded with a LDR (or potentially multiple LDR's). As such we can treat the cost of addressing mode calculations the same as an i32 and get some optimisation benefits. Differential Revision: https://reviews.llvm.org/D62968 llvm-svn: 362874
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 5d83dfbf428..74974597f50 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -13265,7 +13265,6 @@ static bool isLegalT1AddressImmediate(int64_t V, EVT VT) {
unsigned Scale = 1;
switch (VT.getSimpleVT().SimpleTy) {
- default: return false;
case MVT::i1:
case MVT::i8:
// Scale == 1;
@@ -13274,7 +13273,8 @@ static bool isLegalT1AddressImmediate(int64_t V, EVT VT) {
// Scale == 2;
Scale = 2;
break;
- case MVT::i32:
+ default:
+ // On thumb1 we load most things (i32, i64, floats, etc) with a LDR
// Scale == 4;
Scale = 4;
break;
OpenPOWER on IntegriCloud