Fix an infinite alternation in JumpThreading where two transforms would repeatedly...
authorOwen Anderson <resistor@mac.com>
Thu, 14 Apr 2011 21:35:50 +0000 (21:35 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 14 Apr 2011 21:35:50 +0000 (21:35 +0000)
commitf6832bbda08b6975caa264de183bf3ee1d472aca
treec68ce481543c526392f0af9048788eb165ef6782
parent481823aa819ea1dd25567ae616dca93056ef770a
Fix an infinite alternation in JumpThreading where two transforms would repeatedly undo each other.  The solution is to perform more aggressive constant folding to make one of the edges just folded away rather than trying to thread it.
Fixes <rdar://problem/9284786>.

Discovered with CSmith.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129538 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/JumpThreading.cpp
test/Transforms/JumpThreading/2011-04-14-InfLoop.ll [new file with mode: 0644]