add a missed optimization

llvm-svn: 25786
This commit is contained in:
Chris Lattner 2006-01-29 09:08:15 +00:00
parent 2c748afd6c
commit 5a7a22c9dd
1 changed files with 10 additions and 0 deletions

View File

@ -204,3 +204,13 @@ There are two ways to fix this:
disambiguate the pointers.
Number 1 is the preferred solution.
//===---------------------------------------------------------------------===//
The instruction selector sometimes misses folding a load into a compare. The
pattern is written as (cmp reg, (load p)). Because the compare isn't
commutative, it is not matched with the load on both sides. The dag combiner
should be made smart enough to cannonicalize the load into the RHS of a compare
when it can invert the result of the compare for free.