Enhance memdep to return clobber relation between noalias loads when
commitcb5fd743a95898ddefd75b6d104f5e91c0d50b23
authorChris Lattner <sabre@nondot.org>
Tue, 26 Apr 2011 22:42:01 +0000 (26 22:42 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 26 Apr 2011 22:42:01 +0000 (26 22:42 +0000)
tree77e606ba67cec80a4d3015c2f4cb86bad93eccdc
parent9f4b893b84d9c2b56aa2abc3c96ce1e5ccc465e5
Enhance memdep to return clobber relation between noalias loads when
an earlier load could be widened to encompass a later load.  For example,
if we see:

  X = load i8* P, align 4
  Y = load i8* (P+3), align 1

and we have a 32-bit native integer type, we can widen the former load
to i32 which then makes the second load redundant.  GVN can't actually
do anything with this load/load relation yet, so this isn't testable, but
it is the next step to resolving PR6627, and a fairly general class of
"merge neighboring loads" missed optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130250 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/MemoryDependenceAnalysis.cpp