From a653fc5f6bdfa016ba703c9b6d520b697c987517 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 14 Jul 2009 14:06:25 +0000 Subject: [PATCH] Add a comment about why ScalarEvolution doesn't recognize non-loop PHIs 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 0152a9ff061..457466f9de5 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -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); } -- 2.11.0