# LLVM: update lowering of saturating shift-left · gitcafe/zig

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

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

Visibility: public

Requested revision: 15f111a085dcd2da7b91da8e29b89def24cb3c6a

Requested commit: 15f111a085dcd2da7b91da8e29b89def24cb3c6a

Commit: 15f111a085dcd2da7b91da8e29b89def24cb3c6a

Tree: b06957a599f66d333a4b91e1e489bacaee5f3a15

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
LLVM: update lowering of saturating shift-left

LLVM 14 makes it so that a RHS of saturating shift left produces a
poison value if the value is greater than the number of bits of the LHS.
Zig now emits code that will check if this is the case and select a
saturated LHS value in such case, matching Zig semantics.

```

## Parents

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

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