Yes, This patch changes the meaning of CmpValue. It may not be the best way to solve this problem, but it has no effect on the other compare instructions and other backends comparing to the way of changing the interface of the function. And appropriate comments are added in optimizeCompare. http://reviews.llvm.org/D4771