Commit b82aa8f
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 <[email protected]>1 parent aae0f27 commit b82aa8f
1 file changed
+0
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1599 | 1599 | | |
1600 | 1600 | | |
1601 | 1601 | | |
1602 | | - | |
1603 | | - | |
1604 | | - | |
1605 | | - | |
1606 | | - | |
1607 | | - | |
1608 | | - | |
1609 | | - | |
1610 | | - | |
1611 | | - | |
1612 | | - | |
1613 | | - | |
1614 | | - | |
1615 | | - | |
1616 | | - | |
1617 | | - | |
1618 | | - | |
1619 | | - | |
1620 | | - | |
1621 | | - | |
1622 | | - | |
1623 | | - | |
1624 | | - | |
1625 | | - | |
1626 | 1602 | | |
1627 | 1603 | | |
1628 | 1604 | | |
| |||
0 commit comments