diff options
author | Eric Christopher <echristo@apple.com> | 2010-08-25 04:58:56 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-08-25 04:58:56 +0000 |
commit | 6490bf6072849ee48b045e096064028e5a43a2cb (patch) | |
tree | 31d939dbba78110f16e0ec5c93ffca5324c8f72d | |
parent | d845c79fe26fae2bffd6a034fda4e06fd27777bd (diff) | |
download | bcm5719-llvm-6490bf6072849ee48b045e096064028e5a43a2cb.tar.gz bcm5719-llvm-6490bf6072849ee48b045e096064028e5a43a2cb.zip |
Allow strict subclasses of register classes, this way we can handle
ARM instructions with:
foo GPR, rGPR
which happens a lot.
llvm-svn: 112025
-rw-r--r-- | llvm/utils/TableGen/FastISelEmitter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/FastISelEmitter.cpp b/llvm/utils/TableGen/FastISelEmitter.cpp index 243208612d5..6c16fcfaa8a 100644 --- a/llvm/utils/TableGen/FastISelEmitter.cpp +++ b/llvm/utils/TableGen/FastISelEmitter.cpp @@ -112,9 +112,10 @@ struct OperandsSignature { if (!RC) return false; - // For now, all the operands must have the same register class. + // For now, all the operands must have the same register class or be + // a strict subclass of the destination. if (DstRC) { - if (DstRC != RC) + if (DstRC != RC && !DstRC->hasSubClass(RC)) return false; } else DstRC = RC; |