aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/array.zig
diff options
context:
space:
mode:
authorXavier Bouchoux <xavierb@gmail.com>2023-07-28 08:15:20 +0200
committerAndrew Kelley <andrew@ziglang.org>2023-08-10 16:10:59 -0700
commit77dd64b5f449982bda1bf1871e214a68c535f4c5 (patch)
tree7c19c7440c7015a57d1ad7cf315d138aa7d344d2 /test/behavior/array.zig
parent9959319d5395a668867c90f63b5f82eb03f0ac9f (diff)
downloadzig-77dd64b5f449982bda1bf1871e214a68c535f4c5.tar.gz
zig-77dd64b5f449982bda1bf1871e214a68c535f4c5.zip
Sema: fix coerceArrayLike() for vectors with padding
as explainded at https://llvm.org/docs/LangRef.html#vector-type : "In general vector elements are laid out in memory in the same way as array types. Such an analogy works fine as long as the vector elements are byte sized. However, when the elements of the vector aren’t byte sized it gets a bit more complicated. One way to describe the layout is by describing what happens when a vector such as <N x iM> is bitcasted to an integer type with N*M bits, and then following the rules for storing such an integer to memory." "When <N*M> isn’t evenly divisible by the byte size the exact memory layout is unspecified (just like it is for an integral type of the same size)."
Diffstat (limited to 'test/behavior/array.zig')
0 files changed, 0 insertions, 0 deletions