From 1d826a76f591afea445489b9a5485c345e66bf87 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sun, 14 Feb 2010 03:12:47 +0000 Subject: In rememberInstruction, if the value being remembered is the current insertion point, advance the current insertion point. This avoids a use-before-def situation in a testcase extracted from clang which is difficult to reduce to a reasonable-sized regression test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96151 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/ScalarEvolutionExpander.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'include') diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h index a9a70cb..303bc1e 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpander.h +++ b/include/llvm/Analysis/ScalarEvolutionExpander.h @@ -168,9 +168,7 @@ namespace llvm { return S->getValue(); } - void rememberInstruction(Value *I) { - if (!PostIncLoop) InsertedValues.insert(I); - } + void rememberInstruction(Value *I); Value *expandAddRecExprLiterally(const SCEVAddRecExpr *); PHINode *getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized, -- cgit v1.1