Open
Description
The LLVM constant folder evaluates llvm.powi.f64(double fC, i32 iC) as if it were pow(double fC, double fC2). This leads to a deviation from the value that would be returned if the expression were not constant folded.
I reproduced it here using C: https://godbolt.org/z/vT4YMYKne
For C maybe you can argue that this doesn't matter because the definition of __builtin_powi says that it makes no guarantees about precision (though I think users expect at least consistency). However, we can't assume that the intrinsic came from the C builtin, so I think this is a problem.