[flang-commits] [flang] [lld] [compiler-rt] [clang-tools-extra] [clang] [libc] [libcxx] [libunwind] [llvm] [lldb] [libcxxabi] Fix a bug in Smith's algorithm used in complex div. (PR #78330)

Andy Kaylor via flang-commits flang-commits at lists.llvm.org
Thu Jan 18 11:34:26 PST 2024


andykaylor wrote:

> I mean that we could lazily emit a helper function like `__clang_smiths_division_double` and call it instead of emitting like twenty instructions inline.

That's a reasonable suggestion. We may also want to add the ability to emit a helper function to handle the full range instead of calling the compiler-rt function when -ffreestanding has been used.

Are you aware of the PR that @jcranmer-intel posted to add intrinsics for complex multiplication and division (https://github.com/llvm/llvm-project/pull/68742)? That would allow us to move this problem out of the front end, which seems good.

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


More information about the flang-commits mailing list