[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

Joshua Cranmer via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 15 12:20:10 PDT 2024


================
@@ -310,6 +310,13 @@ class ComplexExprEmitter
         CGF.getContext().getFloatTypeSemantics(ElementType);
     const llvm::fltSemantics &HigherElementTypeSemantics =
         CGF.getContext().getFloatTypeSemantics(HigherElementType);
+    // Check that LongDouble Size > Double Size.
+    // This can be interpreted as:
+    // SmallerType.LargestFiniteVal * SmallerType.LargestFiniteVal <=
+    // LargerType.LargestFiniteVal.
----------------
jcranmer-intel wrote:

Not entirely accurate, it's `(SmallerType.LargestFiniteVal * SmallerType.LargestFiniteVal) * 2`

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


More information about the cfe-commits mailing list