[llvm-commits] [llvm] r147683 - /llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
Andrew Trick
atrick at apple.com
Fri Jan 6 13:43:35 PST 2012
On Jan 6, 2012, at 1:36 PM, Cameron Zwarich wrote:
> Is there a test case where this does something wrong?
Not on trunk. Potentially after checking in several other larger changes. In the meantime, it's an obvious fix.
-Andy
>
> Cameron
>
> On Jan 6, 2012, at 1:23 PM, Andrew Trick wrote:
>
>> Author: atrick
>> Date: Fri Jan 6 15:23:43 2012
>> New Revision: 147683
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=147683&view=rev
>> Log:
>> SCEVExpander: hoistStep should check strict dominance.
>>
>> Modified:
>> llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
>>
>> Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=147683&r1=147682&r2=147683&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original)
>> +++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Fri Jan 6 15:23:43 2012
>> @@ -1564,7 +1564,7 @@
>> for (User::op_iterator OI = IncV->op_begin(), OE = IncV->op_end();
>> OI != OE; ++OI) {
>> Instruction *OInst = dyn_cast<Instruction>(OI);
>> - if (OInst && !DT->dominates(OInst, InsertPos))
>> + if (OInst && (OInst == InsertPos || !DT->dominates(OInst, InsertPos)))
>> return false;
>> }
>> IncV->moveBefore(InsertPos);
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list