[PATCH] D33313: [SCEV][NFC] Remove duplication of isLoopInvariant code

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 18 01:40:07 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL303336: [SCEV][NFC] Remove duplication of isLoopInvariant code (authored by mkazantsev).

Changed prior to commit:
  https://reviews.llvm.org/D33313?vs=99406&id=99410#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D33313

Files:
  llvm/trunk/lib/Analysis/ScalarEvolution.cpp


Index: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
===================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp
@@ -3885,7 +3885,7 @@
       : SCEVRewriteVisitor(SE), L(L), Valid(true) {}
 
   const SCEV *visitUnknown(const SCEVUnknown *Expr) {
-    if (!(SE.getLoopDisposition(Expr, L) == ScalarEvolution::LoopInvariant))
+    if (!SE.isLoopInvariant(Expr, L))
       Valid = false;
     return Expr;
   }
@@ -3919,7 +3919,7 @@
 
   const SCEV *visitUnknown(const SCEVUnknown *Expr) {
     // Only allow AddRecExprs for this loop.
-    if (!(SE.getLoopDisposition(Expr, L) == ScalarEvolution::LoopInvariant))
+    if (!SE.isLoopInvariant(Expr, L))
       Valid = false;
     return Expr;
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33313.99410.patch
Type: text/x-patch
Size: 797 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170518/5bd984a6/attachment.bin>


More information about the llvm-commits mailing list