summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2014-11-03 20:37:04 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2014-11-03 20:37:04 +0000
commitb96153481854dd26e03c9b16cea72fcc5492d03e (patch)
tree88ee5389b22b78cbc5073d0cf5ee45fb0c20c874 /llvm/lib
parent94add6bb6ff6cd995dbea423299d8f9b42a37cfe (diff)
downloadbcm5719-llvm-b96153481854dd26e03c9b16cea72fcc5492d03e.tar.gz
bcm5719-llvm-b96153481854dd26e03c9b16cea72fcc5492d03e.zip
[ARM, inline-asm] Fix ARMTargetLowering::getRegForInlineAsmConstraint to return
register class tGPRRegClass if the target is thumb1. This commit fixes a crash that occurs during register allocation which was triggered when a virtual register defined by an inline-asm instruction had to be spilled. rdar://problem/18740489 llvm-svn: 221178
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index eb444d57cff..fd46a015b79 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -10557,6 +10557,8 @@ ARMTargetLowering::getRegForInlineAsmConstraint(const std::string &Constraint,
return RCPair(0U, &ARM::hGPRRegClass);
break;
case 'r':
+ if (Subtarget->isThumb1Only())
+ return RCPair(0U, &ARM::tGPRRegClass);
return RCPair(0U, &ARM::GPRRegClass);
case 'w':
if (VT == MVT::Other)
OpenPOWER on IntegriCloud