r195943 - AArch64: Two intrinsics are expected to return float64 not float32 in arm_neon.h

Hao Liu Hao.Liu at arm.com
Thu Nov 28 18:31:43 PST 2013


Author: haoliu
Date: Thu Nov 28 20:31:42 2013
New Revision: 195943

URL: http://llvm.org/viewvc/llvm-project?rev=195943&view=rev
Log:
AArch64: Two intrinsics are expected to return float64 not float32 in arm_neon.h

Modified:
    cfe/trunk/include/clang/Basic/arm_neon.td
    cfe/trunk/utils/TableGen/NeonEmitter.cpp

Modified: cfe/trunk/include/clang/Basic/arm_neon.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/arm_neon.td?rev=195943&r1=195942&r2=195943&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/arm_neon.td (original)
+++ cfe/trunk/include/clang/Basic/arm_neon.td Thu Nov 28 20:31:42 2013
@@ -183,6 +183,7 @@ class NoTestOpInst<string n, string p, s
 // x: signed integer   (int/float args)
 // u: unsigned integer (int/float args)
 // f: float (int args)
+// F: double (int args)
 // d: default
 // g: default, ignore 'Q' size modifier.
 // j: default, force 'Q' size modifier.
@@ -679,7 +680,7 @@ def VCVT_HIGH_F32_F16 : SOpInst<"vcvt_hi
 def VCVT_F32_F64 : SInst<"vcvt_f32_f64", "fj", "d">;
 def VCVT_HIGH_F32_F64 : SOpInst<"vcvt_high_f32", "qfj", "d", OP_VCVT_NA_HI>;
 def VCVT_F64_F32 : SInst<"vcvt_f64", "wd", "f">;
-def VCVT_F64 : SInst<"vcvt_f64", "fd",  "QlQUl">;
+def VCVT_F64 : SInst<"vcvt_f64", "Fd",  "QlQUl">;
 def VCVT_HIGH_F64_F32 : SOpInst<"vcvt_high_f64", "wj", "f", OP_VCVT_EX_HI>;
 def VCVTX_F32_F64 : SInst<"vcvtx_f32", "fj",  "d">;
 def VCVTX_HIGH_F32_F64 : SOpInst<"vcvtx_high_f32", "qfj", "d", OP_VCVTX_HI>;
@@ -799,7 +800,7 @@ def QRSHRN_HIGH_N  : SOpInst<"vqrshrn_hi
 def VMOVL_HIGH   : SOpInst<"vmovl_high", "nd", "HcHsHiHUcHUsHUi", OP_MOVL_HI>;
 
 let isVCVT_N = 1 in {
-def CVTF_N_F64   : SInst<"vcvt_n_f64", "fdi", "QlQUl">;
+def CVTF_N_F64   : SInst<"vcvt_n_f64", "Fdi", "QlQUl">;
 def FCVTZS_N_S64 : SInst<"vcvt_n_s64", "xdi", "Qd">;
 def FCVTZS_N_U64 : SInst<"vcvt_n_u64", "udi", "Qd">;
 }

Modified: cfe/trunk/utils/TableGen/NeonEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/NeonEmitter.cpp?rev=195943&r1=195942&r2=195943&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/NeonEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/NeonEmitter.cpp Thu Nov 28 20:31:42 2013
@@ -533,6 +533,10 @@ static char ModType(const char mod, char
       type = 'f';
       usgn = false;
       break;
+    case 'F':
+      type = 'd';
+      usgn = false;
+      break;
     case 'g':
       quad = false;
       break;
@@ -765,7 +769,7 @@ static std::string BuiltinTypeString(con
       return "vv*"; // void result with void* first argument
     if (mod == 'f' || (ck != ClassB && type == 'f'))
       return quad ? "V4f" : "V2f";
-    if (ck != ClassB && type == 'd')
+    if (mod == 'F' || (ck != ClassB && type == 'd'))
       return quad ? "V2d" : "V1d";
     if (ck != ClassB && type == 's')
       return quad ? "V8s" : "V4s";
@@ -787,7 +791,7 @@ static std::string BuiltinTypeString(con
 
   if (mod == 'f' || (ck != ClassB && type == 'f'))
     return quad ? "V4f" : "V2f";
-  if (ck != ClassB && type == 'd')
+  if (mod == 'F' || (ck != ClassB && type == 'd'))
     return quad ? "V2d" : "V1d";
   if (ck != ClassB && type == 's')
     return quad ? "V8s" : "V4s";
@@ -1088,6 +1092,7 @@ static void NormalizeProtoForRegisterPat
     switch (Proto[i]) {
     case 'u':
     case 'f':
+    case 'F':
     case 'd':
     case 's':
     case 'x':
@@ -2163,7 +2168,7 @@ static std::string GenOpString(const std
 static unsigned GetNeonEnum(const std::string &proto, StringRef typestr) {
   unsigned mod = proto[0];
 
-  if (mod == 'v' || mod == 'f')
+  if (mod == 'v' || mod == 'f' || mod == 'F')
     mod = proto[1];
 
   bool quad = false;





More information about the cfe-commits mailing list