Simplify, no functionality change.
authorDuncan Sands <baldrick@free.fr>
Fri, 19 Nov 2010 08:33:20 +0000 (08:33 +0000)
committerDuncan Sands <baldrick@free.fr>
Fri, 19 Nov 2010 08:33:20 +0000 (08:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119797 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/LoopInfo.h

index 482c0fcbde8fe4a56d10c439e033c7958ee103d8..62d8d173cb0299d40257028e2ebc21b3484eb0d4 100644 (file)
@@ -1035,9 +1035,7 @@ public:
     // If the replacing instruction is defined in the same loop as the original
     // instruction, or in a loop that contains it as an inner loop, then using
     // it as a replacement will not break LCSSA form.
-    Loop *FromLoop = getLoopFor(From->getParent());
-    if (ToLoop->contains(FromLoop)) return true;
-    return false;
+    return ToLoop->contains(getLoopFor(From->getParent()));
   }
 };