diff options
author | Christopher Bate <cbate@nvidia.com> | 2024-12-09 14:52:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-09 14:52:55 -0700 |
commit | a92e3df3007a323b5434c6cf301e15e01a642a70 (patch) | |
tree | bb4fe0a46192fd68e945777082e46bce3d9d1b85 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 847154106168d0de99679548a2734de99a0724e2 (diff) | |
download | llvm-a92e3df3007a323b5434c6cf301e15e01a642a70.zip llvm-a92e3df3007a323b5434c6cf301e15e01a642a70.tar.gz llvm-a92e3df3007a323b5434c6cf301e15e01a642a70.tar.bz2 |
[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.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions