]> granicus.if.org Git - llvm/commitdiff
[SelectionDAG] Check membership of register in class for single
authorNirav Dave <niravd@google.com>
Tue, 15 Jan 2019 17:09:23 +0000 (17:09 +0000)
committerNirav Dave <niravd@google.com>
Tue, 15 Jan 2019 17:09:23 +0000 (17:09 +0000)
register constraints. NFCI.

Now that X86's ST(7) constraints are fixed this check can be
reinstated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351207 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

index 1db7d78caf8c5ded3b6f7955eb7f5e1bcb7cbd44..871ab9b29881b2561d67ff4c39ff5dcbc6f38eb9 100644 (file)
@@ -7429,13 +7429,8 @@ static void GetRegistersForValue(SelectionDAG &DAG, const SDLoc &DL,
 
   // Do not check for single registers.
   if (AssignedReg) {
-    Regs.push_back(AssignedReg);
-    --NumRegs;
-    if (NumRegs) {
       for (; *I != AssignedReg; ++I)
-        assert(I != RC->end() && "Didn't find reg!");
-      ++I;
-    }
+        assert(I != RC->end() && "AssignedReg should be member of RC");
   }
 
   for (; NumRegs; --NumRegs, ++I) {