diff options
-rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index 482c0fcbde..62d8d173cb 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -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())); } }; |