[llvm] Upstreaming warning suppression to LLVM (PR #83590)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 19 12:43:52 PDT 2024


rnk wrote:

It appears MLIR uses std::complex<T> for integer types: https://github.com/search?q=repo%3Allvm%2Fllvm-project%20std%3A%3Acomplex%3Cint&type=code

And the behavior is "unspecified" because many complex numeric operations require square roots, and don't work precisely on integers:
https://stackoverflow.com/questions/11108743/why-does-c-mandate-that-complex-only-be-instantiated-for-float-double-or-lon

Has this been reported to the MLIR project? Should they be fixing the warning, or have they made some affirmative decision to use or avoid std::complex of integers? They even have std::complex<APInt>, which is exciting.

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


More information about the llvm-commits mailing list