When InstCombine simplifies a load -> extract element to gep -> load, place
authorMon P Wang <wangmp@apple.com>
Thu, 13 Aug 2009 05:12:13 +0000 (05:12 +0000)
committerMon P Wang <wangmp@apple.com>
Thu, 13 Aug 2009 05:12:13 +0000 (05:12 +0000)
commit7c4efa6808b737b2bfc7c79872b9c16f566a7d8a
tree6995406b42919084dbae9759766bd52173ad2ad0
parentb808588a3a5febe931896b3779d159ba90d836f7
When InstCombine simplifies a load -> extract element to gep -> load, place
the new load by the old load instead of by the extract element because
a store could have occurred between the load and extract element.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78891 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/vec_extract_elt2.ll [new file with mode: 0644]