# Legalize: replace \`safety_checked_instructions\` · gitcafe/zig

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

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

Visibility: public

Requested revision: 4c4dacf81a5da85a1f7d1550ed45f5cb20fd1524

Requested commit: 4c4dacf81a5da85a1f7d1550ed45f5cb20fd1524

Commit: 4c4dacf81a5da85a1f7d1550ed45f5cb20fd1524

Tree: dc8ed2db66482c0f8706b5e730ebcddd4f3155b7

Author: mlugg

Committer: mlugg

## Message

```
Legalize: replace `safety_checked_instructions`

This adds 4 `Legalize.Feature`s:
* `expand_intcast_safe`
* `expand_add_safe`
* `expand_sub_safe`
* `expand_mul_safe`

These do pretty much what they say on the tin. This logic was previously
in Sema, used when `Zcu.Feature.safety_checked_instructions` was not
supported by the backend. That `Zcu.Feature` has been removed in favour
of this legalization.

```

## Parents

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

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