danielcdh added a comment. not sure how to test this: it requires -compile-twice, which is an llc flag, but llc does not use PSI for now. https://reviews.llvm.org/D24989 will be the first patch that makes llc uses PSI. https://reviews.llvm.org/D24993