# Sema: improve lowering of stores to bitcasted vector pointers · gitcafe/zig

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

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

Visibility: public

Requested revision: b2a1b4c085b93d508c51307f40444252b8cd4d52

Requested commit: b2a1b4c085b93d508c51307f40444252b8cd4d52

Commit: b2a1b4c085b93d508c51307f40444252b8cd4d52

Tree: 307c504b85c9aee16602e667db1a5db5c25e1fff

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: improve lowering of stores to bitcasted vector pointers

Detect if we are storing an array operand to a bitcasted vector pointer.
If so, we instead reach through the bitcasted pointer to the vector pointer,
bitcast the array operand to a vector, and then lower this as a store of
a vector value to a vector pointer. This generally results in better code,
as well as working around an LLVM bug.

See #11154

```

## Parents

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

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