summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorMomchil Velikov <momchil.velikov@arm.com>2018-01-26 10:20:58 +0000
committerMomchil Velikov <momchil.velikov@arm.com>2018-01-26 10:20:58 +0000
commitd2cc6fd90b7d72ff0bd5705ff57c6d0980c345ba (patch)
tree67229e3f798897e1bf4cd9a068d3e2f17e7ca6fd /llvm/lib
parentcbc5a688f3f247c989d6dd21c87e7281a83dff12 (diff)
downloadbcm5719-llvm-d2cc6fd90b7d72ff0bd5705ff57c6d0980c345ba.tar.gz
bcm5719-llvm-d2cc6fd90b7d72ff0bd5705ff57c6d0980c345ba.zip
[ARM] Accept a subset of Thumb GPR register class when emitting an SP-relative
load instruction The function `Thumb1InstrInfo::loadRegFromStackSlot` accepts only the `tGPR` register class. The function serves to emit a `tLDRspi` instruction and certainly any subset of the `tGPR` register class is a valid destination of the load. Differential revision: https://reviews.llvm.org/D42535 llvm-svn: 323514
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/Thumb1InstrInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp b/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp
index 49645834e2d..f9e7ecbb7c5 100644
--- a/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp
+++ b/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp
@@ -109,11 +109,11 @@ loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
unsigned DestReg, int FI,
const TargetRegisterClass *RC,
const TargetRegisterInfo *TRI) const {
- assert((RC == &ARM::tGPRRegClass ||
+ assert((RC->hasSuperClassEq(&ARM::tGPRRegClass) ||
(TargetRegisterInfo::isPhysicalRegister(DestReg) &&
isARMLowRegister(DestReg))) && "Unknown regclass!");
- if (RC == &ARM::tGPRRegClass ||
+ if (RC->hasSuperClassEq(&ARM::tGPRRegClass) ||
(TargetRegisterInfo::isPhysicalRegister(DestReg) &&
isARMLowRegister(DestReg))) {
DebugLoc DL;
OpenPOWER on IntegriCloud