X86 Peephole: fix PR13475 in optimizeCompare.
authorManman Ren <mren@apple.com>
Sat, 28 Jul 2012 03:15:46 +0000 (03:15 +0000)
committerManman Ren <mren@apple.com>
Sat, 28 Jul 2012 03:15:46 +0000 (03:15 +0000)
commit43d9ab1812f7551844112f6f21cf3e487cb77385
treec39e5e633e2e241c7eef2361789d89d72ede3b7a
parent4b72ada1f4c1c90ead331a650956e7b14450080e
X86 Peephole: fix PR13475 in optimizeCompare.

It is possible that an instruction can use and update EFLAGS.
When checking the safety, we should check the usage of EFLAGS first before
declaring it is safe to optimize due to the update.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160912 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86InstrInfo.cpp
test/CodeGen/X86/jump_sign.ll