Files
clang-p2996/mlir/lib/Dialect/Math/Transforms/ExpandPatterns.cpp
Christopher Bate a92e3df300 [mlir][math] Fix math.powf expansion case for pow(x, 0) (#119015)
Lowering `math.powf` to `llvm.intr.powf` will result in `pow(x, 0) =
1`, even for `x=0`. When using the Math dialect expansion patterns,
`pow(0, 0)` will result in `-nan`, however, This change adds two
additional instructions to the lowering to ensure the `pow(x, 0)` case
lowers to to `1` regardless of the value of `x`.

Resolves https://github.com/llvm/llvm-project/issues/118945.
2024-12-09 14:52:55 -07:00

29 KiB