This is an archive of the discontinued LLVM Phabricator instance.

[SLP] Fix for PR34219, part 1: Use minimal alignment for vectorized loads.
AbandonedPublic

Authored by ABataev on Aug 17 2017, 9:31 AM.

Details

Reviewers
mkuper
RKSimon
Summary

When building vectorized load in SLP pass, we use the alignment of the
the first vectorized load instruction. But other vectorized load
instruction may have the alignment that is less than the alignment of
the first vectorizable instruction. Patch uses the minimal alignment of
all vectorizable loads for a resulting vector load instruction.

Event Timeline

ABataev created this revision.Aug 17 2017, 9:31 AM
RKSimon added inline comments.Aug 17 2017, 10:36 AM
test/Transforms/SLPVectorizer/X86/sitofp.ll
88

We know src64 is 64-byte aligned, and the base load (%ld0) is 64-byte aligned - so why do you have to assume 8-byte?

ABataev added inline comments.Aug 17 2017, 11:34 AM
test/Transforms/SLPVectorizer/X86/sitofp.ll
88

Agree, dropping these patches.

ABataev abandoned this revision.Aug 17 2017, 11:35 AM