]> granicus.if.org Git - llvm/commit
[LV] Deny irregular types in interleavedAccessCanBeWidened
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Mon, 17 Jun 2019 12:02:24 +0000 (12:02 +0000)
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Mon, 17 Jun 2019 12:02:24 +0000 (12:02 +0000)
commit784000b4c2abfaf40f48d8a077611272bd729f7d
treeb721920a3d7fe1029719ef5f3c6f08226cac334b
parent52598dbf5e8896f038520df52e3a9a800dee0091
[LV] Deny irregular types in interleavedAccessCanBeWidened

Summary:
Avoid that loop vectorizer creates loads/stores of vectors
with "irregular" types when interleaving. An example of
an irregular type is x86_fp80 that is 80 bits, but that
may have an allocation size that is 96 bits. So an array
of x86_fp80 is not bitcast compatible with a vector
of the same type.

Not sure if interleavedAccessCanBeWidened is the best
place for this check, but it solves the problem seen
in the added test case. And it is the same kind of check
that already exists in memoryInstructionCanBeWidened.

Reviewers: fhahn, Ayal, craig.topper

Reviewed By: fhahn

Subscribers: hiraditya, rkruppe, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63386

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