Reduce Your Testcases with Bugpoint and Custom Scripts https://blog.llvm.org/2015/11/reduce-your-testcases-with-bugpoint-and.html (incredible tool for automatically reducing LLVMIR testcases)