# zir: add negate/negate_wrap, implement astgen · gitcafe/zig

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

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

Visibility: public

Requested revision: 310a44d5be051a339b5739d59416a70604375541

Requested commit: 310a44d5be051a339b5739d59416a70604375541

Commit: 310a44d5be051a339b5739d59416a70604375541

Tree: 585f13adadeb49cd50ffd85f0343921ebc203a02

Author: Isaac Freund

Committer: Isaac Freund

## Message

```
zir: add negate/negate_wrap, implement astgen

These were previously implemented as a sub/sub_wrap instruction with a
lhs of 0. Making this separate instructions however allows us to save
some memory as there is no need to store a lhs.

```

## Parents

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

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