[llvm-dev] [RFC] Expose user provided vector function for auto-vectorization.

Renato Golin via llvm-dev llvm-dev at lists.llvm.org
Tue May 28 15:12:09 PDT 2019

On Tue, 28 May 2019 at 22:52, Shawn Landden <slandden at gmail.com> wrote:
> On architectures that have sticky floating point status flags, these
> can be supported, and
> my versions of exp and expf for PPC support them. I'd like to see the
> compile know if
> these work, because supporting them in the compiler is extra work
> because you have
> to re-run the calculation if you get a flag (and you care about which
> specific operation caused
> that flag).

Having to teach the compiler about user-provided libraries with hidden
side-effects without any kind of meta-data really doesn't scale.

A work around is, in specific hardware, *always* check if the flags
are changed and if they are, reset and run again. Now, what to do if
it changes again? Infinite loop?

Anything more "intelligent" will need hacks in the compiler that are
specific to the combination of library-hardware and that won't work
because neither the library (and sometimes nor the hardware) guarantee
they won't change.


More information about the llvm-dev mailing list