OSDN Git Service

[SDAG] Use correct alignments on expanded vector trunc-store/ext-loads
authorHal Finkel <hfinkel@anl.gov>
Sun, 22 Feb 2015 15:58:04 +0000 (15:58 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sun, 22 Feb 2015 15:58:04 +0000 (15:58 +0000)
commit1584f114c1903ed27c8b9a6b6f4978aad8da9f3c
tree91c5d5692a862b9a7374614868537bf30e3bb303
parentd40ce7ac2bf5adedfc95b1c33fe2b170af737f36
[SDAG] Use correct alignments on expanded vector trunc-store/ext-loads

When expanding a truncating store or extending load using vector extracts or
inserts and scalar stores and loads, we were giving each of these scalar stores
or loads the same alignment as the original vector operation. While this will
often be right (most vector operations, especially those produced by
autovectorization, have the alignment of the underlying scalar type), the
vector operation could certainly have a larger alignment.

No test case (yet); noticed by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230175 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp