This is an archive of the discontinued LLVM Phabricator instance.

[LV] Interleaved access vectorization: fix computing new alias info
ClosedPublic

Authored by anemet on Nov 29 2017, 11:10 AM.

Details

Summary

As a new access is generated spanning across multiple fields we need to
propagate alias info from all the fields to form the most generic alias info.

rdar://35602528

Event Timeline

anemet created this revision.Nov 29 2017, 11:10 AM
anemet added a comment.Dec 6 2017, 8:59 AM

@hfinkel, @mkuper, could you guys look at this please. We are experiencing a serious miscompile due to this bug. Thanks!

mkuper added inline comments.Dec 6 2017, 11:53 AM
lib/Transforms/Vectorize/LoopVectorize.cpp
952

InnerLoopVectorizer::addMetadata() also calls addNewMetadata(), while this doesn't.
Is that intentional?

anemet added inline comments.Dec 6 2017, 1:10 PM
lib/Transforms/Vectorize/LoopVectorize.cpp
952

Yes, it is intentional. addNewMetadata adds noalias metadata based on the inserted memchecks. We need a way to aggregate that information from several accesses as well.

I can add a FIXME that we don't propagate this information currently. This is conservatively correct.

mkuper accepted this revision.Dec 6 2017, 1:15 PM

LGTM

lib/Transforms/Vectorize/LoopVectorize.cpp
952

The FIXME would probably be good.

This revision is now accepted and ready to land.Dec 6 2017, 1:15 PM
This revision was automatically updated to reflect the committed changes.