[LoopVectorize] Propagate known metadata to vectorized instructions
authorHal Finkel <hfinkel@anl.gov>
Sat, 19 Jul 2014 13:33:16 +0000 (13:33 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sat, 19 Jul 2014 13:33:16 +0000 (13:33 +0000)
commit2350e9f6b71cf3cd7792e86bcd3fec3cd8afcc94
tree09fcd6be37211f9c9d96aea389057ae3cd54daa0
parent5bc21c3b57273921600b86d5ce45569b642871ad
[LoopVectorize] Propagate known metadata to vectorized instructions

There are some kinds of metadata that are safe to propagate from the scalar
instructions to the vector instructions (fpmath and tbaa currently).

Regarding TBAA, one might worry about propagating it on if-converted loads and
stores, because the metadata might have had a control dependency on the
condition, and thus actually aliased with some other non-speculated memory
access when the condition was false. However, this would be caught by the
runtime overlap checks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213452 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/metadata.ll [new file with mode: 0644]