OSDN Git Service

[LoopIdiom] Don't remove dead operands manually
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 20 Jun 2016 02:33:29 +0000 (02:33 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 20 Jun 2016 02:33:29 +0000 (02:33 +0000)
commit0f886c294186f5bd14894676e9c1991733447b29
tree4444927a244b45dfc87aa1d7f4813c6acdcb5f63
parent96b66d10fef2f295c669526697d9978ac0728a1a
[LoopIdiom] Don't remove dead operands manually

Removing dead instructions requires remembering which operands have
already been removed.  RecursivelyDeleteTriviallyDeadInstructions has
this logic, don't partially reimplement it in LoopIdiomRecognize.

This fixes PR28196.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273132 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
test/Transforms/LoopIdiom/pr28196.ll [new file with mode: 0644]