scanon added a comment. The one thing that's a little bit weird here is cases like x = -1, y = 4; log(pow(-1, 4)) is 0, but 4*log(-1) is NaN. That's a dramatic difference even for fast-math. Do we find exact integer exponents before we get to this point? http://reviews.llvm.org/D14400