# compiler_rt: add \_\_cmpXi2 and \_\_ucmpXi2 · gitcafe/zig

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

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

Visibility: public

Requested revision: 20328e976fe3aea206fbd7a82090c1b61298398a

Requested commit: 20328e976fe3aea206fbd7a82090c1b61298398a

Commit: 20328e976fe3aea206fbd7a82090c1b61298398a

Tree: 8c6954d566e2801761f1dad665d32d26d3c67cfa

Author: Jan Philipp Hafer

Committer: Andrew Kelley

## Message

```
compiler_rt: add __cmpXi2 and __ucmpXi2

- adds __cmpsi2, __cmpdi2, __cmpti2
- adds __ucmpsi2, __ucmpdi2, __ucmpti2
- use 2 if statements with 2 temporaries and a constant
- tests: MIN, MIN+1, MIN/2, -1, 0, 1, MAX/2, MAX-1, MAX if applicable

See #1290

```

## Parents

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

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