[llvm-commits] [llvm] r112025 - /llvm/trunk/utils/TableGen/FastISelEmitter.cpp

Eric Christopher echristo at apple.com
Tue Aug 24 21:58:56 PDT 2010


Author: echristo
Date: Tue Aug 24 23:58:56 2010
New Revision: 112025

URL: http://llvm.org/viewvc/llvm-project?rev=112025&view=rev
Log:
Allow strict subclasses of register classes, this way we can handle
ARM instructions with:

foo GPR, rGPR

which happens a lot.

Modified:
    llvm/trunk/utils/TableGen/FastISelEmitter.cpp

Modified: llvm/trunk/utils/TableGen/FastISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FastISelEmitter.cpp?rev=112025&r1=112024&r2=112025&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/FastISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/FastISelEmitter.cpp Tue Aug 24 23:58:56 2010
@@ -112,9 +112,10 @@
       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;





More information about the llvm-commits mailing list