mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 19:26:05 +00:00

This patch adds the erfc op to the math dialect. It also does lowering of the math.erfc op to libm calls. There is also a f32 polynomial approximation for the function based on https://stackoverflow.com/questions/35966695/vectorizable-implementation-of-complementary-error-function-erfcf This is in turn based on M. M. Shepherd and J. G. Laframboise, "Chebyshev Approximation of (1+2x)exp(x^2)erfc x in 0 <= x < INF", Mathematics of Computation, Vol. 36, No. 153, January 1981, pp. 249-253. The code has a ULP error less than 3, which was tested, and MLIR test values were verified against the C implementation.
-*- mlir/utils/vim/README -*- This directory contains settings for the vim editor to work on MLIR *.mlir files. It comes with filetype detection rules in the (ftdetect), syntax highlighting (syntax), some minimal sensible default settings (ftplugin) and indentation plugins (indent). To install, copy all subdirectories to your $HOME/.vim/, or if you prefer, create symlinks to the files here. To enable highlighting inside the Markdown docs, one can add ``` let g:markdown_fenced_languages = ['mlir'] ``` to `.vimrc`.