]> granicus.if.org Git - llvm/commitdiff
[PM] Clean up the testing for IVUsers, especially with the new PM.
authorChandler Carruth <chandlerc@gmail.com>
Sun, 15 Jan 2017 09:29:27 +0000 (09:29 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 15 Jan 2017 09:29:27 +0000 (09:29 +0000)
First, I've moved a test of IVUsers from the LSR tree to a dedicated
IVUsers test directory. I've also simplified its RUN line now that the
new pass manager's loop PM is providing analyses on their own.

No functionality changed, but it makes subsequent changes cleaner.

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

test/Analysis/IVUsers/quadradic-exit-value.ll [moved from test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll with 78% similarity]
test/Analysis/ScalarEvolution/2011-04-26-FoldAddRec.ll
test/Analysis/ScalarEvolution/2012-05-18-LoopPredRecurse.ll
test/Analysis/ScalarEvolution/avoid-infinite-recursion-1.ll

similarity index 78%
rename from test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll
rename to test/Analysis/IVUsers/quadradic-exit-value.ll
index 09f0e1aa2a0903442ed5d572ca5ce50f729c5a40..593c0e388da7f8ea70de3a3a7707be8ca9ef948f 100644 (file)
@@ -1,5 +1,12 @@
+; This test ensures that IVUsers works correctly in the legacy pass manager
+; without LCSSA and in the specific ways that some of its users (LSR) require.
+;
+; FIXME: We need some way to match the precision here in the new PM where loop
+; passes *always* work on LCSSA. This should stop using a different set of
+; checks at that point.
+
 ; RUN: opt < %s -analyze -iv-users | FileCheck %s
-; RUN: opt -passes='function(require<scalar-evolution>,loop(print<ivusers>))' -S < %s 2>&1| FileCheck %s
+; RUN: opt < %s -disable-output -passes='print<ivusers>' 2>&1 | FileCheck %s
 
 ; Provide legal integer types.
 target datalayout = "n8:16:32:64"
index 973dd7d6dd0d2cbd02612e7dfc74222e8fe1b4dd..4f126fbf6b3e7ffc6dc55f22276e0e262541524f 100644 (file)
@@ -1,4 +1,5 @@
 ; RUN: opt < %s -analyze -iv-users
+; RUN: opt < %s -passes='print<ivusers>'
 ; PR9633: Tests that SCEV handles the mul.i2 recurrence being folded to
 ; constant zero.
 
index 66df9d19234fed14686e2e3afd8c98fcbaca77e2..853d43c4f875a8b86f76958074713b55ba7cf5c1 100644 (file)
@@ -1,4 +1,5 @@
 ; RUN: opt < %s -iv-users -S -disable-output
+; RUN: opt < %s -passes='require<ivusers>' -S -disable-output
 ;
 ; PR12868: Infinite recursion:
 ; getUDivExpr()->getZeroExtendExpr()->isLoopBackedgeGuardedBy()
index f61b667dcfa7506d6f92d6c1af77e1661608d390..8e519d409edebc7bd3a8e61a9c67bda5d8871018 100644 (file)
@@ -1,4 +1,5 @@
 ; RUN: opt < %s -iv-users
+; RUN: opt < %s -passes='require<ivusers>'
 ; PR4538
 
 ; ModuleID = 'bugpoint-reduced-simplified.bc'