Add a comment about why ScalarEvolution doesn't recognize non-loop PHIs
authorDan Gohman <gohman@apple.com>
Tue, 14 Jul 2009 14:06:25 +0000 (14:06 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 14 Jul 2009 14:06:25 +0000 (14:06 +0000)
even when they're obvious.

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

lib/Analysis/ScalarEvolution.cpp

index 0152a9ff061230ed9ebea666b40459f9be84bf87..457466f9de5711b4e9fd63f3f7f0234f7c143e48 100644 (file)
@@ -2402,6 +2402,10 @@ const SCEV *ScalarEvolution::createNodeForPHI(PHINode *PN) {
         return SymbolicName;
       }
 
+  // It's tempting to recognize PHIs with a unique incoming value, however
+  // this leads passes like indvars to break LCSSA form. Fortunately, such
+  // PHIs are rare, as instcombine zaps them.
+
   // If it's not a loop phi, we can't handle it yet.
   return getUnknown(PN);
 }