[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)
commit83773b77a5a45592426a2e8011a36dc1fa19aedc
tree7d8abf776d4ec7e377902e230c6b0b31837c1bf6
parent74ac20158a068633e0a84f9f95e7242ceab6b61d
[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

llvm-svn: 363547
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/X86/x86_fp80-interleaved-access.ll [new file with mode: 0644]