[llvm-commits] [llvm] r141763 - /llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Oct 11 18:24:51 PDT 2011


Author: stoklund
Date: Tue Oct 11 20:24:51 2011
New Revision: 141763

URL: http://llvm.org/viewvc/llvm-project?rev=141763&view=rev
Log:
Use an existing function.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=141763&r1=141762&r2=141763&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Tue Oct 11 20:24:51 2011
@@ -2760,16 +2760,8 @@
 
     // If none of the value types for this register class are valid, we
     // can't use it.  For example, 64-bit reg classes on 32-bit targets.
-    bool isLegal = false;
-    for (TargetRegisterClass::vt_iterator I = RC->vt_begin(), E = RC->vt_end();
-         I != E; ++I) {
-      if (isTypeLegal(*I)) {
-        isLegal = true;
-        break;
-      }
-    }
-
-    if (!isLegal) continue;
+    if (!isLegalRC(RC))
+      continue;
 
     for (TargetRegisterClass::iterator I = RC->begin(), E = RC->end();
          I != E; ++I) {





More information about the llvm-commits mailing list