Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delete libpgmath veclib definitions for sincos
As noted in #11, flang currently crashes when lowering a sincos reference into a libpgmath runtime function call. The issue is that `__fd_sincos_1` is defined as returning a `<{ double, double }>` struct and there is no LLVM support for automatically vectorizing target functions of this form. In particular, it is somewhat ambiguous how to vectorize such functions, i.e. how they pack their return values into the vector registers. libpgmath itself also has a somewhat questionable implementation of the vector forms of `sincos`, relying on this beauty: https://github.com/flang-compiler/flang/blob/master/runtime/libpgmath/lib/common/mth_vreturns.c#L8-L47 This may sometimes work in practice, but it is not particularly robust. For example, this will definitely break in any sort of LTO or instrumentation setting. I think until libpgmath is updated and LLVM upstream has a consensus on how to vectorize these functions, we just need to stop trying to vectorize these functions. As noted, since LLVM was crashing anyway, no performance and functionality is lost here over current master. Fixes #11. Originally By: Keno Fischer <keno@juliacomputing.com>
- Loading branch information