When the "true" and "false" blocks of a diamond if-conversion are the same,
authorBob Wilson <bob.wilson@apple.com>
Tue, 26 Oct 2010 00:02:24 +0000 (00:02 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 26 Oct 2010 00:02:24 +0000 (00:02 +0000)
commit7c730e77908123a83abcfffe781d368e9b873ce9
treec8421e1413b609f7702a08129984eb7a4c0946ab
parent2ad40d34947ced36d96f351f6c2a4d57a044e2a4
When the "true" and "false" blocks of a diamond if-conversion are the same,
do not double-count the duplicate instructions by counting once from the
beginning and again from the end.  Keep track of where the duplicates from
the beginning ended and don't go past that point when counting duplicates
at the end.  Radar 8589805.

This change causes one of the MC/ARM/simple-fp-encoding tests to produce
different (better!) code without the vmovne instruction being tested.
I changed the test to produce vmovne and vmoveq instructions but moving
between register files in the opposite direction.  That's not quite the same
but predicated versions of those instructions weren't being tested before,
so at least the test coverage is not any worse, just different.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117333 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/IfConversion.cpp
test/CodeGen/ARM/2010-10-25-ifcvt-ldm.ll [new file with mode: 0644]
test/MC/ARM/simple-fp-encoding.ll