# stage2 codegen: re-allocate result register in finishAir · gitcafe/zig

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

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

Visibility: public

Requested revision: 5806c386eb640247f6aa8983132c6b193195ea4a

Requested commit: 5806c386eb640247f6aa8983132c6b193195ea4a

Commit: 5806c386eb640247f6aa8983132c6b193195ea4a

Tree: 08c05374dc59894c46f7578894a1f4c6af7d9489

Author: joachimschmidt557

Committer: Andrew Kelley

## Message

```
stage2 codegen: re-allocate result register in finishAir

In some cases (such as bitcast), an operand may be the same MCValue as
the result. If that operand died and was a register, it was freed by
processDeath. We have to "re-allocate" the register.

```

## Parents

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

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