PR7407

I just filed PR7407 which we discovered in 2.5 but exists all the way
into trunk. Revision 98780 was an attempt to try to fix this situation
but it apparently doesn't cover all cases. I put some commentary in the
bug about possible solutions but perhaps Evan (the author of revision
98780) or others have better ideas.

This came from a customer code so it's not an artificially-constructed
scenario.

                                 -Dave

David, it's possible that Dan just fixed this. Can you reverify with ToT?

-Chris

Chris Lattner <clattner@apple.com> writes:

David, it's possible that Dan just fixed this. Can you reverify with ToT?

Nope, I just updated and the test still fails for me. I don't think
Dan's patch addresses the fundamental issue, which is that
ReplaceAllUsesWith deletes nodes, so even if we back out and don't match
to an addressing mode at that point, the node has already been delected
and references to the node up the call chain are now pointing to bogus
memory.

                               -Dave