[llvm] [SimplifyLibCalls] Avoid simplifying pow(x, 2.0) -> x * x with math-errno. (PR #183099)

Yunbo Ni via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 7 23:14:17 PST 2026


================

----------------
cardigan1008 wrote:

Hi @rj-jesus, this seems to raise the same issue for the `pow(x, -1.0) -> 1.0 / x` fold. If removing the `pow` libcall is only valid when the call is known not to access memory under `math-errno`, should this fold also be gated on `Pow->doesNotAccessMemory()`?

https://github.com/llvm/llvm-project/pull/183099


More information about the llvm-commits mailing list