> Does it make sense to make simplifycfg smarter instead of sccp? Yes - that makes the code change much smaller (no need for a custom visitor)! I've pushed a (completely) new version of the patch to http://reviews.llvm.org/D9634 . Thanks - Nick