Handle forwarding local memsets to loads. For example, we optimize this:
authorChris Lattner <sabre@nondot.org>
Sun, 6 Dec 2009 01:57:02 +0000 (01:57 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 6 Dec 2009 01:57:02 +0000 (01:57 +0000)
commitfaf815b9380baef522becff67da7b9c3b0f1638d
tree30b8c600ae871883fa41461197b728ec862a1afa
parent90ec9680a9b0c76bbc739d7309e4611b478ebe91
Handle forwarding local memsets to loads.  For example, we optimize this:

short x(short *A) {
  memset(A, 1, sizeof(*A)*100);
  return A[42];
}

to 'return 257' instead of doing the load.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90695 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/GVN.cpp
test/Transforms/GVN/rle.ll