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

2024-03-20 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam closed https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-20 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel approved this pull request. https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-19 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-18 Thread Michael Toguchi via cfe-commits
https://github.com/mdtoguchi approved this pull request. https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-18 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks good to me. Thanks for the updates! https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-03-18 Thread Zahira Ammarguellat via cfe-commits
@@ -287,9 +288,47 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo ); - QualType getPromotionType(QualType Ty) { + QualType GetHigherPrecisionFPType(QualType ElementType) { +

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

2024-03-15 Thread Andy Kaylor via cfe-commits
andykaylor wrote: Can you add test cases for targets that will have problems with promotion. Something like this? ``` // RUN: %clang_cc1 -triple x86_64-windows-pc \ // RUN: -complex-range=promoted -emit-llvm -o - %s \ // RUN: | FileCheck %s

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

2024-03-15 Thread Andy Kaylor via cfe-commits
@@ -287,9 +288,47 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo ); - QualType getPromotionType(QualType Ty) { + QualType GetHigherPrecisionFPType(QualType ElementType) { +

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

2024-03-15 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-15 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: Except for lacking a couple of tests, I think this looks good. @jcranmer-intel do you agree? https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-03-15 Thread Zahira Ammarguellat via cfe-commits
@@ -2824,26 +2816,89 @@ static void RenderFloatingPointOptions(const ToolChain , const Driver , switch (optID) { default: break; -case options::OPT_fcx_limited_range: { - EmitComplexRangeDiag(D, Range, LangOptions::ComplexRangeKind::CX_Limited); -

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

2024-03-15 Thread Zahira Ammarguellat via cfe-commits
@@ -287,9 +288,47 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo ); - QualType getPromotionType(QualType Ty) { + QualType GetHigherPrecisionFPType(QualType ElementType) { +

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

2024-03-15 Thread Andy Kaylor via cfe-commits
@@ -2824,26 +2816,89 @@ static void RenderFloatingPointOptions(const ToolChain , const Driver , switch (optID) { default: break; -case options::OPT_fcx_limited_range: { - EmitComplexRangeDiag(D, Range, LangOptions::ComplexRangeKind::CX_Limited); -

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

2024-03-15 Thread Joshua Cranmer via cfe-commits
@@ -310,6 +310,13 @@ class ComplexExprEmitter CGF.getContext().getFloatTypeSemantics(ElementType); const llvm::fltSemantics = CGF.getContext().getFloatTypeSemantics(HigherElementType); +// Check that LongDouble Size > Double Size. +// This can be

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

2024-03-15 Thread Joshua Cranmer via cfe-commits
@@ -310,6 +310,13 @@ class ComplexExprEmitter CGF.getContext().getFloatTypeSemantics(ElementType); const llvm::fltSemantics = CGF.getContext().getFloatTypeSemantics(HigherElementType); +// Check that LongDouble Size > Double Size.

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

2024-03-15 Thread Andy Kaylor via cfe-commits
@@ -794,8 +834,10 @@ ComplexPairTy ComplexExprEmitter::EmitBinMul(const BinOpInfo ) { ResR = Builder.CreateFSub(AC, BD, "mul_r"); ResI = Builder.CreateFAdd(AD, BC, "mul_i"); - if (Op.FPFeatures.getComplexRange() == LangOptions::CX_Limited || -

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

2024-03-15 Thread Zahira Ammarguellat via cfe-commits
@@ -287,9 +288,47 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo ); - QualType getPromotionType(QualType Ty) { + QualType GetHigherPrecisionFPType(QualType ElementType) { +

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

2024-03-15 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-15 Thread Zahira Ammarguellat via cfe-commits
@@ -986,13 +1028,17 @@ ComplexPairTy ComplexExprEmitter::EmitBinDiv(const BinOpInfo ) { llvm::Value *OrigLHSi = LHSi; if (!LHSi) LHSi = llvm::Constant::getNullValue(RHSi->getType()); -if (Op.FPFeatures.getComplexRange() == LangOptions::CX_Fortran) +

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

2024-03-15 Thread Zahira Ammarguellat via cfe-commits
@@ -2824,26 +2816,89 @@ static void RenderFloatingPointOptions(const ToolChain , const Driver , switch (optID) { default: break; -case options::OPT_fcx_limited_range: { - EmitComplexRangeDiag(D, Range, LangOptions::ComplexRangeKind::CX_Limited); -

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

2024-03-15 Thread Michael Toguchi via cfe-commits
@@ -1046,30 +1046,35 @@ defm offload_uniform_block : BoolFOption<"offload-uniform-block", NegFlag, BothFlags<[], [ClangOption], " that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise)">>; -def fcx_limited_range :

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

2024-03-15 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-15 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-15 Thread Zahira Ammarguellat via cfe-commits
@@ -794,8 +834,10 @@ ComplexPairTy ComplexExprEmitter::EmitBinMul(const BinOpInfo ) { ResR = Builder.CreateFSub(AC, BD, "mul_r"); ResI = Builder.CreateFAdd(AD, BC, "mul_i"); - if (Op.FPFeatures.getComplexRange() == LangOptions::CX_Limited || -

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

2024-03-15 Thread Zahira Ammarguellat via cfe-commits
@@ -1046,30 +1046,35 @@ defm offload_uniform_block : BoolFOption<"offload-uniform-block", NegFlag, BothFlags<[], [ClangOption], " that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise)">>; -def fcx_limited_range :

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

2024-03-14 Thread Joshua Cranmer via cfe-commits
@@ -287,9 +288,47 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo ); - QualType getPromotionType(QualType Ty) { + QualType GetHigherPrecisionFPType(QualType ElementType) { +

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

2024-03-14 Thread Joshua Cranmer via cfe-commits
@@ -287,9 +288,47 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo ); - QualType getPromotionType(QualType Ty) { + QualType GetHigherPrecisionFPType(QualType ElementType) { +

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

2024-03-14 Thread Andy Kaylor via cfe-commits
@@ -986,13 +1028,17 @@ ComplexPairTy ComplexExprEmitter::EmitBinDiv(const BinOpInfo ) { llvm::Value *OrigLHSi = LHSi; if (!LHSi) LHSi = llvm::Constant::getNullValue(RHSi->getType()); -if (Op.FPFeatures.getComplexRange() == LangOptions::CX_Fortran) +

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

2024-03-14 Thread Andy Kaylor via cfe-commits
@@ -2824,26 +2816,89 @@ static void RenderFloatingPointOptions(const ToolChain , const Driver , switch (optID) { default: break; -case options::OPT_fcx_limited_range: { - EmitComplexRangeDiag(D, Range, LangOptions::ComplexRangeKind::CX_Limited); -

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

2024-03-14 Thread Andy Kaylor via cfe-commits
@@ -986,13 +1028,17 @@ ComplexPairTy ComplexExprEmitter::EmitBinDiv(const BinOpInfo ) { llvm::Value *OrigLHSi = LHSi; if (!LHSi) LHSi = llvm::Constant::getNullValue(RHSi->getType()); -if (Op.FPFeatures.getComplexRange() == LangOptions::CX_Fortran) +

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

2024-03-14 Thread Andy Kaylor via cfe-commits
@@ -2807,9 +2791,17 @@ static void RenderFloatingPointOptions(const ToolChain , const Driver , FPExceptionBehavior = ""; // If fast-math is set then set the fp-contract mode to fast. FPContract = "fast"; -// ffast-math enables limited range rules for complex

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

2024-03-14 Thread Andy Kaylor via cfe-commits
@@ -794,8 +834,10 @@ ComplexPairTy ComplexExprEmitter::EmitBinMul(const BinOpInfo ) { ResR = Builder.CreateFSub(AC, BD, "mul_r"); ResI = Builder.CreateFAdd(AD, BC, "mul_i"); - if (Op.FPFeatures.getComplexRange() == LangOptions::CX_Limited || -

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

2024-03-14 Thread Andy Kaylor via cfe-commits
@@ -51,11 +51,12 @@ class ComplexExprEmitter CGBuilderTy bool IgnoreReal; bool IgnoreImag; -public: - ComplexExprEmitter(CodeGenFunction , bool ir=false, bool ii=false) -: CGF(cgf), Builder(CGF.Builder), IgnoreReal(ir), IgnoreImag(ii) { - } +

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

2024-03-14 Thread Andy Kaylor via cfe-commits
@@ -2807,9 +2791,17 @@ static void RenderFloatingPointOptions(const ToolChain , const Driver , FPExceptionBehavior = ""; // If fast-math is set then set the fp-contract mode to fast. FPContract = "fast"; -// ffast-math enables limited range rules for complex

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

2024-03-14 Thread Michael Toguchi via cfe-commits
@@ -1046,30 +1046,35 @@ defm offload_uniform_block : BoolFOption<"offload-uniform-block", NegFlag, BothFlags<[], [ClangOption], " that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise)">>; -def fcx_limited_range :

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

2024-03-08 Thread Joshua Cranmer via cfe-commits
@@ -1847,19 +1847,50 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. +.. option:: -fcomplex-arithmetic=: + + This option specifies the

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

2024-03-08 Thread Joshua Cranmer via cfe-commits
@@ -283,9 +283,48 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo ); - QualType getPromotionType(QualType Ty) { + QualType GetHigherPrecisionFPType(QualType ElementType) { +

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

2024-03-08 Thread Joshua Cranmer via cfe-commits
@@ -982,13 +1024,18 @@ ComplexPairTy ComplexExprEmitter::EmitBinDiv(const BinOpInfo ) { llvm::Value *OrigLHSi = LHSi; if (!LHSi) LHSi = llvm::Constant::getNullValue(RHSi->getType()); -if (Op.FPFeatures.getComplexRange() == LangOptions::CX_Fortran) +

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

2024-03-01 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,50 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. +.. option:: -fcomplex-arithmetic=: + + This option specifies the

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

2024-03-01 Thread Andy Kaylor via cfe-commits
@@ -283,9 +283,46 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo ); - QualType getPromotionType(QualType Ty) { + QualType HigherPrecisionTypeForComplexArithmetic(QualType

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

2024-03-01 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,33 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-03-01 Thread Aaron Ballman via cfe-commits
@@ -1847,19 +1847,33 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-29 Thread Joshua Cranmer via cfe-commits
@@ -1847,19 +1847,33 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-29 Thread Joshua Cranmer via cfe-commits
@@ -982,13 +1022,18 @@ ComplexPairTy ComplexExprEmitter::EmitBinDiv(const BinOpInfo ) { llvm::Value *OrigLHSi = LHSi; if (!LHSi) LHSi = llvm::Constant::getNullValue(RHSi->getType()); -if (Op.FPFeatures.getComplexRange() == LangOptions::CX_Fortran) +

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

2024-02-29 Thread Joshua Cranmer via cfe-commits
@@ -283,9 +283,46 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo ); - QualType getPromotionType(QualType Ty) { + QualType HigherPrecisionTypeForComplexArithmetic(QualType

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

2024-02-29 Thread Joshua Cranmer via cfe-commits
@@ -1847,19 +1847,50 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. +.. option:: -fcomplex-arithmetic=: + + This option specifies the

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

2024-02-27 Thread Zahira Ammarguellat via cfe-commits
@@ -1847,19 +1847,51 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. +.. option:: -fcomplex-arithmetic=: + + This option specifies the

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

2024-02-27 Thread Aaron Ballman via cfe-commits
@@ -396,7 +396,38 @@ class LangOptionsBase { IncompleteOnly = 3, }; - enum ComplexRangeKind { CX_Full, CX_Limited, CX_Fortran, CX_None }; + /// Controls the various implementations for complex multiplication and + // division. + enum ComplexRangeKind { +///

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

2024-02-27 Thread Aaron Ballman via cfe-commits
@@ -1847,19 +1847,33 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-27 Thread Aaron Ballman via cfe-commits
@@ -396,7 +396,38 @@ class LangOptionsBase { IncompleteOnly = 3, }; - enum ComplexRangeKind { CX_Full, CX_Limited, CX_Fortran, CX_None }; + /// Controls the various implementations for complex multiplication and + // division. + enum ComplexRangeKind { +///

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

2024-02-27 Thread Aaron Ballman via cfe-commits
@@ -396,7 +396,38 @@ class LangOptionsBase { IncompleteOnly = 3, }; - enum ComplexRangeKind { CX_Full, CX_Limited, CX_Fortran, CX_None }; + /// Controls the various implementations for complex multiplication and + // division. + enum ComplexRangeKind { +///

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

2024-02-27 Thread Aaron Ballman via cfe-commits
@@ -283,9 +283,47 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo ); - QualType getPromotionType(QualType Ty) { + QualType HigherPrecisionTypeForComplexArithmetic(QualType

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

2024-02-27 Thread Aaron Ballman via cfe-commits
@@ -1847,19 +1847,51 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. +.. option:: -fcomplex-arithmetic=: + + This option specifies the

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

2024-02-27 Thread Aaron Ballman via cfe-commits
@@ -1847,19 +1847,51 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. +.. option:: -fcomplex-arithmetic=: + + This option specifies the

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

2024-02-27 Thread Aaron Ballman via cfe-commits
@@ -1,52 +1,170 @@ // Test range options for complex multiplication and division. // RUN: %clang -### -target x86_64 -fcx-limited-range -c %s 2>&1 \ -// RUN: | FileCheck --check-prefix=LMTD %s +// RUN: | FileCheck --check-prefix=BASIC %s // RUN: %clang -### -target

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

2024-02-27 Thread Aaron Ballman via cfe-commits
@@ -1847,19 +1847,51 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. +.. option:: -fcomplex-arithmetic=: + + This option specifies the

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

2024-02-27 Thread Aaron Ballman via cfe-commits
@@ -396,7 +396,38 @@ class LangOptionsBase { IncompleteOnly = 3, }; - enum ComplexRangeKind { CX_Full, CX_Limited, CX_Fortran, CX_None }; + /// Controls the various implementations for complex multiplication and + // division. + enum ComplexRangeKind { +///

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

2024-02-27 Thread Aaron Ballman via cfe-commits
@@ -1847,19 +1847,51 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. +.. option:: -fcomplex-arithmetic=: + + This option specifies the

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

2024-02-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: > @AaronBallman what do you think about the warnings (and the rest of course)? > -fcomplex-arithmetic=full -ffast-math generates this warning: "use of nnan or > ninf flags in the presence of '-fcomplex-arithmetic=full' option". > -ffast-math

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

2024-02-22 Thread Andy Kaylor via cfe-commits
@@ -1041,28 +1041,15 @@ defm offload_uniform_block : BoolFOption<"offload-uniform-block", NegFlag, BothFlags<[], [ClangOption], " that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise)">>; -def fcx_limited_range :

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

2024-02-22 Thread Zahira Ammarguellat via cfe-commits
@@ -1041,28 +1041,15 @@ defm offload_uniform_block : BoolFOption<"offload-uniform-block", NegFlag, BothFlags<[], [ClangOption], " that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise)">>; -def fcx_limited_range :

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

2024-02-22 Thread Andy Kaylor via cfe-commits
@@ -1041,28 +1041,15 @@ defm offload_uniform_block : BoolFOption<"offload-uniform-block", NegFlag, BothFlags<[], [ClangOption], " that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise)">>; -def fcx_limited_range :

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

2024-02-22 Thread Zahira Ammarguellat via cfe-commits
@@ -1041,28 +1041,15 @@ defm offload_uniform_block : BoolFOption<"offload-uniform-block", NegFlag, BothFlags<[], [ClangOption], " that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise)">>; -def fcx_limited_range :

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

2024-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang-driver Author: Zahira Ammarguellat (zahiraam) Changes In clang there are two options `-f[no]cx-limited-range` and `-f[no]cx-fortran-rules` that control the range of complex multiplication and division. However,

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

2024-02-22 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam ready_for_review https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-22 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: @andykaylor I am opening up this for review in order to have other people chime in. @AaronBallman what do you think about the warnings (and the rest of course)? -fcomplex-arithmetic=full -ffast-math generates this warning: "use of nnan or ninf flags in the presence of

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

2024-02-22 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/81514 >From 13fd73932251843173cbbc31ca93905ca0469277 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Mon, 12 Feb 2024 10:58:19 -0800 Subject: [PATCH 1/4] [CLANG] Full support of complex multiplication and

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

2024-02-22 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-22 Thread Zahira Ammarguellat via cfe-commits
@@ -1847,19 +1847,33 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-22 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-22 Thread Zahira Ammarguellat via cfe-commits
@@ -1847,19 +1847,33 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-21 Thread Andy Kaylor via cfe-commits
@@ -67,41 +79,164 @@ _Complex float pragma_on_div(_Complex float a, _Complex float b) { // FULL-NEXT: fdiv float // FULL: fdiv float - // LMTD: fmul float - // LMTD-NEXT: fmul float - // LMTD-NEXT: fadd float - // LMTD-NEXT: fmul float - // LMTD-NEXT: fmul float -

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

2024-02-21 Thread Andy Kaylor via cfe-commits
@@ -283,9 +283,48 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo ); - QualType getPromotionType(QualType Ty) { + QualType HigherPrecisionTypeForComplexArithmetic(QualType

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

2024-02-21 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,33 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-21 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,33 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-21 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,33 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-21 Thread Andy Kaylor via cfe-commits
@@ -283,9 +283,48 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo ); - QualType getPromotionType(QualType Ty) { + QualType HigherPrecisionTypeForComplexArithmetic(QualType

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

2024-02-21 Thread Andy Kaylor via cfe-commits
@@ -1041,28 +1041,15 @@ defm offload_uniform_block : BoolFOption<"offload-uniform-block", NegFlag, BothFlags<[], [ClangOption], " that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise)">>; -def fcx_limited_range :

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

2024-02-21 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,33 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-21 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,33 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-21 Thread Andy Kaylor via cfe-commits
@@ -79,29 +91,152 @@ _Complex float pragma_on_div(_Complex float a, _Complex float b) { // LMTD-NEXT: fdiv float // LMTD-NEXT: fdiv float - // FRTRN: fmul float - // FRTRN-NEXT: fmul float - // FRTRN-NEXT: fadd float - // FRTRN-NEXT: fmul float - // FRTRN-NEXT: fmul

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

2024-02-21 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,33 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-21 Thread Andy Kaylor via cfe-commits
@@ -396,7 +396,41 @@ class LangOptionsBase { IncompleteOnly = 3, }; - enum ComplexRangeKind { CX_Full, CX_Limited, CX_Fortran, CX_None }; + /// Controls the various implementations for complex multiplication and + // division. + enum ComplexRangeKind { +///

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

2024-02-21 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/81514 >From 13fd73932251843173cbbc31ca93905ca0469277 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Mon, 12 Feb 2024 10:58:19 -0800 Subject: [PATCH 1/3] [CLANG] Full support of complex multiplication and

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

2024-02-21 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/81514 >From 13fd73932251843173cbbc31ca93905ca0469277 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Mon, 12 Feb 2024 10:58:19 -0800 Subject: [PATCH 1/3] [CLANG] Full support of complex multiplication and

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

2024-02-20 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/81514 >From 13fd73932251843173cbbc31ca93905ca0469277 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Mon, 12 Feb 2024 10:58:19 -0800 Subject: [PATCH 1/2] [CLANG] Full support of complex multiplication and

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

2024-02-20 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-20 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: This is still WIP in progress, but I would like to get @MaskRay's opinion about the feasibility of getting this new option approved knowing that the 2 options being potentially replaced are already merged in clang18 and are probably already used by some users.

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

2024-02-20 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff d08d3159d5ee0ee127d3581776ef569b8a6113af eb9a35c4b3c42b0caf3ce4759dd4b1b640a8 --

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

2024-02-20 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/81514 >From 13fd73932251843173cbbc31ca93905ca0469277 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Mon, 12 Feb 2024 10:58:19 -0800 Subject: [PATCH 1/2] [CLANG] Full support of complex multiplication and

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

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -283,9 +283,23 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo ); - QualType getPromotionType(QualType Ty) { + QualType getPromotionType(QualType Ty, bool IsDivOpCode =

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

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

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

2024-02-12 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-12 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam created https://github.com/llvm/llvm-project/pull/81514 None >From 13fd73932251843173cbbc31ca93905ca0469277 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Mon, 12 Feb 2024 10:58:19 -0800 Subject: [PATCH] [CLANG] Full support of complex multiplication and

  1   2   >