[PATCH] D13994: [SimplifyLibCalls] Optimization for pow(x, n) where n is some constant

Mandeep Singh Grang via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 19:32:22 PST 2015


mgrang added a comment.

I think we cannot simply call convertToDouble(V) on something which is not a double.

For example;
powf (x, 8) --> results in assertion: "semantics == (const llvm::fltSemantics*)&IEEEdouble && "Float semantics are not IEEEdouble"' failed."

That's the reason I checked the Type of V and accordingly converted to float or double.

But the problem is that long doubles are neither float nor doubles (they are type FP128) and hence cannot be converted readily.


http://reviews.llvm.org/D13994





More information about the llvm-commits mailing list