diff options
| author | Jiangning Liu <jiangning.liu@arm.com> | 2014-10-21 01:34:34 +0000 |
|---|---|---|
| committer | Jiangning Liu <jiangning.liu@arm.com> | 2014-10-21 01:34:34 +0000 |
| commit | 444822bbcfe5baa3739f8f57d751848418726eda (patch) | |
| tree | 0d69a743615a15fc4e4db083638dc83d0d176f45 | |
| parent | c606bfe6600a64be3f99d0b420946de004c57a57 (diff) | |
| download | bcm5719-llvm-444822bbcfe5baa3739f8f57d751848418726eda.tar.gz bcm5719-llvm-444822bbcfe5baa3739f8f57d751848418726eda.zip | |
Lower compound assignment for the missing type llvm::Type::FP128TyID.
llvm-svn: 220257
| -rw-r--r-- | clang/lib/CodeGen/CGExprComplex.cpp | 4 | ||||
| -rw-r--r-- | clang/test/CodeGen/fp128_complex.c | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprComplex.cpp b/clang/lib/CodeGen/CGExprComplex.cpp index e957256ab5d..ca19c94be08 100644 --- a/clang/lib/CodeGen/CGExprComplex.cpp +++ b/clang/lib/CodeGen/CGExprComplex.cpp @@ -607,6 +607,8 @@ static StringRef getComplexMultiplyLibCallName(llvm::Type *Ty) { return "__multc3"; case llvm::Type::X86_FP80TyID: return "__mulxc3"; + case llvm::Type::FP128TyID: + return "__multc3"; } } @@ -746,6 +748,8 @@ ComplexPairTy ComplexExprEmitter::EmitBinDiv(const BinOpInfo &Op) { return EmitComplexBinOpLibCall("__divtc3", LibCallOp); case llvm::Type::X86_FP80TyID: return EmitComplexBinOpLibCall("__divxc3", LibCallOp); + case llvm::Type::FP128TyID: + return EmitComplexBinOpLibCall("__divtc3", LibCallOp); } } assert(LHSi && "Can have at most one non-complex operand!"); diff --git a/clang/test/CodeGen/fp128_complex.c b/clang/test/CodeGen/fp128_complex.c new file mode 100644 index 00000000000..7653bf0dd4b --- /dev/null +++ b/clang/test/CodeGen/fp128_complex.c @@ -0,0 +1,10 @@ +// RUN: %clang -target aarch64-linux-gnuabi %s -O3 -S -emit-llvm -o - | FileCheck %s +#include <complex.h> + +complex long double a, b, c, d; +void test_fp128_compound_assign(void) { + // CHECK: tail call { fp128, fp128 } @__multc3 + a *= b; + // CHECK: tail call { fp128, fp128 } @__divtc3 + c /= d; +} |

