Page MenuHomePhabricator

[LoopVectorize] Support widening memory ops with irregular types
Needs ReviewPublic

Authored by LemonBoy on Mar 18 2021, 11:33 AM.

Details

Summary

Successive elements of types whose Alloc size doesn't match the type size have some padding bits in between, preventing the vectorizer from kicking in.
Let's handle this case by promoting the load/store to a type that's as big as the Alloc size and truncating/extending the values as needed.

Diff Detail

Event Timeline

LemonBoy created this revision.Mar 18 2021, 11:33 AM
LemonBoy requested review of this revision.Mar 18 2021, 11:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2021, 11:33 AM
LemonBoy updated this revision to Diff 332091.Mar 20 2021, 3:08 AM

Rebase to main.

lebedev.ri added inline comments.Mar 30 2021, 8:53 AM
llvm/include/llvm/IR/DataLayout.h
519

Split this into a preparatory patch?

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
2812
lebedev.ri added inline comments.Apr 8 2021, 6:49 AM
llvm/include/llvm/IR/DataLayout.h
519

... and replace hasIrregularType() in LoopVectorize.cpp with this check?

Ping! (As suggested by fhahn)

Weekly ping.