Clean up some multiple-return-value code that is no longer
authorDan Gohman <gohman@apple.com>
Fri, 3 Oct 2008 22:21:24 +0000 (22:21 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 3 Oct 2008 22:21:24 +0000 (22:21 +0000)
applicable.

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

lib/Transforms/IPO/IPConstantPropagation.cpp

index 1d65562f58d80bb4ce58651413376633a57d2105..5bd7a3d4cc008321b4a4b9d562c2585e1cdf93e2 100644 (file)
@@ -170,10 +170,6 @@ bool IPCP::PropagateConstantReturn(Function &F) {
   unsigned NumNonConstant = 0;
   for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB)
     if (ReturnInst *RI = dyn_cast<ReturnInst>(BB->getTerminator())) {
-      // Return type does not match operand type, this is an old style multiple
-      // return
-      bool OldReturn = (F.getReturnType() != RI->getOperand(0)->getType());
-
       for (unsigned i = 0, e = RetVals.size(); i != e; ++i) {
         // Already found conflicting return values?
         Value *RV = RetVals[i];
@@ -182,7 +178,7 @@ bool IPCP::PropagateConstantReturn(Function &F) {
 
         // Find the returned value
         Value *V;
-        if (!STy || OldReturn)
+        if (!STy)
           V = RI->getOperand(i);
         else
           V = FindInsertedValue(RI->getOperand(0), i);