# Sema: avoid emitting loops that can't loop · gitcafe/zig

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

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

Visibility: public

Requested revision: 23d7921758524f76f2157e6f8a5823da2511396a

Requested commit: 23d7921758524f76f2157e6f8a5823da2511396a

Commit: 23d7921758524f76f2157e6f8a5823da2511396a

Tree: 14f71cfd47fb4b26d48c5c5a662e3bfd61be84b0

Author: Jacob Young

Committer: Andrew Kelley

## Message

```
Sema: avoid emitting loops that can't loop

If a `loop` ends with a `noreturn` instruction, then it cannot loop and
will be emitted as a `block` instead.

```

## Parents

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

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