Make load->store deletion a bit smarter. This allows us to compile this:
authorChris Lattner <sabre@nondot.org>
Tue, 8 Jan 2008 23:08:06 +0000 (23:08 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 8 Jan 2008 23:08:06 +0000 (23:08 +0000)
commit07649d9265c9a378fe753f80601ae5f4de3312dc
tree2eabcc37ee50dfa67da49656a189f8e3b9214e07
parent0c5714bb9944ed085fb5854ac4c6abf941c532ed
Make load->store deletion a bit smarter.  This allows us to compile this:

void test(long long *P) { *P ^= 1; }

into just:

_test:
movl 4(%esp), %eax
xorl $1, (%eax)
ret

instead of code like this:

_test:
movl 4(%esp), %ecx
        xorl    $1, (%ecx)
movl 4(%ecx), %edx
movl %edx, 4(%ecx)
ret

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45762 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/longlong-deadload.ll [new file with mode: 0644]