reames added a subscriber: reames. reames added a comment. I think you need to leave in: if (!CI->isNoopCast(CI->getModule()->getDataLayout())) - return false; This is needed to catch things like addrspacecast. Other than that, LGTM. http://reviews.llvm.org/D15789