# stage2: implement \`@minimum\` and \`@maximum\`, including vectors · gitcafe/zig

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

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

Visibility: public

Requested revision: 55eea3b045c86c78eb8d9cc862122d260352a631

Requested commit: 55eea3b045c86c78eb8d9cc862122d260352a631

Commit: 55eea3b045c86c78eb8d9cc862122d260352a631

Tree: a8e234fa3a68c1c62233f047b2b1647be2e091dd

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: implement `@minimum` and `@maximum`, including vectors

 * std.os: take advantage of `@minimum`. It's probably time to
   deprecate `std.min` and `std.max`.
 * New AIR instructions: min and max
 * Introduce SIMD vector support to stage2
 * Add `@Type` support for vectors
 * Sema: add `checkSimdBinOp` which can be re-used for other arithmatic
   operators that want to support vectors.
 * Implement coercion from vectors to arrays.
   - In backends this is handled with bitcast for vector to array,
     however maybe we want to reduce the amount of branching by
     introducing an explicit AIR instruction for it in the future.
 * LLVM backend: implement lowering vector types
 * Sema: Implement `slice.ptr` at comptime
 * Value: improve `numberMin` and `numberMax` to support floats in
   addition to integers, and make them behave properly in the presence
   of NaN.

```

## Parents

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

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