[llvm] r321606 - [SimplifyCFG] Return to the pass manager the correct value.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 31 08:54:04 PST 2017


Author: davide
Date: Sun Dec 31 08:54:03 2017
New Revision: 321606

URL: http://llvm.org/viewvc/llvm-project?rev=321606&view=rev
Log:
[SimplifyCFG] Return to the pass manager the correct value.

I wanted to commit this with r321603, but I failed to squash
the two commits.

Modified:
    llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp

Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=321606&r1=321605&r2=321606&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Sun Dec 31 08:54:03 2017
@@ -1285,7 +1285,7 @@ static bool HoistThenElseCodeToIf(Branch
     auto *C2 = dyn_cast<CallInst>(I2);
     if (C1 && C2)
       if (C1->isMustTailCall() != C2->isMustTailCall())
-        return false;
+        return Changed;
 
     if (!TTI.isProfitableToHoist(I1) || !TTI.isProfitableToHoist(I2))
       return Changed;




More information about the llvm-commits mailing list