[libcxx-commits] [libcxx] [libc++] <experimental/simd> Fix conversion constructor (PR #74693)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 19 00:45:25 PST 2023


joy2myself wrote:

https://godbolt.org/z/84vahGGaT

It looks like this issue cannot be resolved by adjusting tolerance. Moreover, this problem not only occurs under the `-O3` option but also persists under the `-O2` option. I attempted to compile the same code using `clang-15` and `clang-16` with the same options, as shown in the link above. It can be observed that the expected value of `data[1] as long double`, which should be `1`, is actually output as `7.81847e-4942`. The difference in datas is beyond any tolerance range. Additionally, the code compiled with `clang-15` has no issues, so I am inclined to believe that this is a bug introduced by `clang-16` in the `-O2` optimization.

https://github.com/llvm/llvm-project/pull/74693


More information about the libcxx-commits mailing list