OSDN Git Service

[InstCombine] Retain TBAA when narrowing memory accesses
authorKeno Fischer <keno@alumni.harvard.edu>
Wed, 28 Jun 2017 23:36:40 +0000 (23:36 +0000)
committerKeno Fischer <keno@alumni.harvard.edu>
Wed, 28 Jun 2017 23:36:40 +0000 (23:36 +0000)
commit7caefab1703facdeb00b63f5d93f528ff7fa90c0
treee4a21cb2100e8e38c4c188bdb781f97f30d88a66
parenta49984025573ae69bbbe306656f76baf6ac86d3e
[InstCombine] Retain TBAA when narrowing memory accesses

Summary:
As discussed on the mailing list it is legal to propagate TBAA to loads/stores
from/to smaller regions of a larger load tagged with TBAA. Do so for
(load->extractvalue)=>(gep->load) and similar foldings.

Reviewed By: sanjoy
Differential Revision: https://reviews.llvm.org/D31954

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