diff options
Diffstat (limited to 'contrib/llvm/lib/Target/TargetInstrInfo.cpp')
-rw-r--r-- | contrib/llvm/lib/Target/TargetInstrInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Target/TargetInstrInfo.cpp b/contrib/llvm/lib/Target/TargetInstrInfo.cpp index 094a57e..c099a7e 100644 --- a/contrib/llvm/lib/Target/TargetInstrInfo.cpp +++ b/contrib/llvm/lib/Target/TargetInstrInfo.cpp @@ -28,6 +28,10 @@ const TargetRegisterClass * TargetOperandInfo::getRegClass(const TargetRegisterInfo *TRI) const { if (isLookupPtrRegClass()) return TRI->getPointerRegClass(RegClass); + // Instructions like INSERT_SUBREG do not have fixed register classes. + if (RegClass < 0) + return 0; + // Otherwise just look it up normally. return TRI->getRegClass(RegClass); } |