r220257 - Lower compound assignment for the missing type llvm::Type::FP128TyID.

Jiangning Liu jiangning.liu at arm.com
Mon Oct 20 18:34:34 PDT 2014


Author: jiangning
Date: Mon Oct 20 20:34:34 2014
New Revision: 220257

URL: http://llvm.org/viewvc/llvm-project?rev=220257&view=rev
Log:
Lower compound assignment for the missing type llvm::Type::FP128TyID.


Added:
    cfe/trunk/test/CodeGen/fp128_complex.c
Modified:
    cfe/trunk/lib/CodeGen/CGExprComplex.cpp

Modified: cfe/trunk/lib/CodeGen/CGExprComplex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprComplex.cpp?rev=220257&r1=220256&r2=220257&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprComplex.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprComplex.cpp Mon Oct 20 20:34:34 2014
@@ -607,6 +607,8 @@ static StringRef getComplexMultiplyLibCa
     return "__multc3";
   case llvm::Type::X86_FP80TyID:
     return "__mulxc3";
+  case llvm::Type::FP128TyID:
+    return "__multc3";
   }
 }
 
@@ -746,6 +748,8 @@ ComplexPairTy ComplexExprEmitter::EmitBi
         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!");

Added: cfe/trunk/test/CodeGen/fp128_complex.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/fp128_complex.c?rev=220257&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/fp128_complex.c (added)
+++ cfe/trunk/test/CodeGen/fp128_complex.c Mon Oct 20 20:34:34 2014
@@ -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;
+}





More information about the cfe-commits mailing list