]> granicus.if.org Git - clang/commit
[Hexagon] Specify vector alignment in DataLayout string
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 12 Feb 2016 14:48:34 +0000 (14:48 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 12 Feb 2016 14:48:34 +0000 (14:48 +0000)
commit8148f06ebc11112332b5c256b27a561a63b27c11
treec3824dea59e793ba961d7e4aae758f07d7409492
parent26f6c2fd8a9d945be7d8f14e26ca0092abcc5ac3
[Hexagon] Specify vector alignment in DataLayout string

The DataLayout can calculate alignment of vectors based on the alignment
of the element type and the number of elements. In fact, it is the product
of these two values. The problem is that for vectors of N x i1, this will
return the alignment of N bytes, since the alignment of i1 is 8 bits. The
vector types of vNi1 should be aligned to N bits instead. Provide explicit
alignment for HVX vectors to avoid such complications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260680 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/Targets.cpp
test/CodeGen/target-data.c