In FreeBSD, we are always having trouble getting one of our boot loaders
small enough, when compiled with clang/llvm. Each successive release of
clang has turned out to increase the size, and we had to enable all
kinds of llvm-only options to get the size below the target size.
With the 3.5.0 import though, we also had to add an option to
selectively disable the GVN pass. This shaved off yet another few bytes
of the resulting binary.
The patch lives here:
https://svnweb.freebsd.org/base/head/contrib/llvm/patches/patch-04-add-llvm-gvn-option.diff?revision=280031&view=markup
but I would rather have it upstream. Since this is a hidden option, and
the implementation is trivial, I don't think any particular test case is
necessary.