[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)
Zahira Ammarguellat via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 15 07:30:57 PDT 2024
================
@@ -986,13 +1028,17 @@ ComplexPairTy ComplexExprEmitter::EmitBinDiv(const BinOpInfo &Op) {
llvm::Value *OrigLHSi = LHSi;
if (!LHSi)
LHSi = llvm::Constant::getNullValue(RHSi->getType());
- if (Op.FPFeatures.getComplexRange() == LangOptions::CX_Fortran)
+ QualType ComplexElementTy = Op.Ty->castAs<ComplexType>()->getElementType();
+ if (Op.FPFeatures.getComplexRange() == LangOptions::CX_Improved ||
+ (Op.FPFeatures.getComplexRange() == LangOptions::CX_Promoted &&
+ FPHasBeenPromoted == LangOptions::CX_Improved))
----------------
zahiraam wrote:
I think may be using a boolean for this variable makes sense. It's only set when there is type promotion. In which case the name of the variable is appropriate?
https://github.com/llvm/llvm-project/pull/81514
More information about the cfe-commits
mailing list