# adjust codegen of casting between arrays and vectors · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/558b4ac1f0fd7123ebe25f3e59eef275b066c50a)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 558b4ac1f0fd7123ebe25f3e59eef275b066c50a

Requested commit: 558b4ac1f0fd7123ebe25f3e59eef275b066c50a

Commit: 558b4ac1f0fd7123ebe25f3e59eef275b066c50a

Tree: a776d9e13cddf773a737fdba5a66c2722434637d

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
adjust codegen of casting between arrays and vectors

 * bitcasting is still better when the size_in_bits aligns with the ABI
   size of the element type. Logic is reworked to do bitcasting when
   possible
 * rather than using insertelement/extractelement to work with arrays,
   store/load elements directly. This matches codegen for arrays
   elsewhere.

```

## Parents

- [0e3ca4c63ecb8e43af8261020d21bc6888d18fc0](https://git.cafe/gitcafe/zig/commit/0e3ca4c63ecb8e43af8261020d21bc6888d18fc0?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/558b4ac1f0fd7123ebe25f3e59eef275b066c50a?format=markdown)
