[llvm] [NVPTX] Improve support for {ex2,lg2}.approx (PR #120519)
Princeton Ferro via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 26 20:29:20 PST 2024
Prince781 wrote:
If I support `afn` as a way to force `lg2.approx` on individual function calls, even if `nvptx-approx-log2f32` is disabled, I run into the problem where SelectionDAG promoting a `flog2` SDNode operation from `f16` to `f32` will drop the `afn` modifier. Since there is no user-friendly way to request flags being preserved on promotion, I'd have to write my own tablegen pattern matching `f16 = flog2 afn t` -> `f16 = fp_trunc ( f32 = flog2 afn ( fp_extend t ) )`. Is there a better way of going about this?
https://github.com/llvm/llvm-project/pull/120519
More information about the llvm-commits
mailing list