karthikthecool added a comment. Thanks escha for the counter example. I will handle NaN case properly. Apart from that it should work properly right? Repository: rL LLVM http://reviews.llvm.org/D21137