# compiler-rt: remove dead code · gitcafe/zig

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

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

Visibility: public

Requested revision: 20bd5e801826121ffa72ee54e3788bdb371b0fbc

Requested commit: 20bd5e801826121ffa72ee54e3788bdb371b0fbc

Commit: 20bd5e801826121ffa72ee54e3788bdb371b0fbc

Tree: feafaa7e61a82983cb97f037e8e6f3cc8104a37c

Author: Matthew Lugg

Committer: Matthew Lugg

## Message

```
compiler-rt: remove dead code

`__addosi4`, `__addodi4`, `__addoti4`, `__subosi4`, `__subodi4`, and
`__suboti4` were all functions which we invented for no apparent reason.
Neither LLVM, nor GCC, nor the Zig compiler use these functions. It
appears the functions were created in a kind of misunderstanding of an
old language proposal; see https://github.com/ziglang/zig/pull/10824.

There is no benefit to these functions existing; if a Zig compiler
backend needs this operation, it is trivial to implement, and *far*
simpler than calling a compiler-rt routine. Therefore, this commit
deletes them. A small amount of that code was used by other parts of
compiler-rt; the logic is trivial so has just been inlined where needed.
I also chose to quickly implement `__addvdi3` (a standard function)
because it is trivial and we already implement the `sub` parallel.

```

## Parents

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

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