summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-02-25 13:53:01 +0000
committerTim Northover <tnorthover@apple.com>2014-02-25 13:53:01 +0000
commite44e9e0a0039fb869c17a49208a3ec0c4f4a9d90 (patch)
tree109837586e423a7fc073b46f76645342a32944e4
parentee2e36b5159ac2a2dfb7dd0adb69537eaabfc2ae (diff)
downloadclang-e44e9e0a0039fb869c17a49208a3ec0c4f4a9d90.tar.gz
clang-e44e9e0a0039fb869c17a49208a3ec0c4f4a9d90.tar.bz2
clang-e44e9e0a0039fb869c17a49208a3ec0c4f4a9d90.tar.xz
AArch64: use different type modifier in arm_neon.td
The 'f' modifier is designed for integer type arguments really (according to its documentation). It's better to use the "half width, same number" modifier. Should be no user-visible change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202152 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/arm_neon.td2
-rw-r--r--lib/CodeGen/CGBuiltin.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Basic/arm_neon.td b/include/clang/Basic/arm_neon.td
index f1b07b70ee..8f7ae57f44 100644
--- a/include/clang/Basic/arm_neon.td
+++ b/include/clang/Basic/arm_neon.td
@@ -680,7 +680,7 @@ def QXTN2 : SOpInst<"vqmovn_high", "qhk", "silUsUiUl", OP_QXTN>;
// Converting vectors
def VCVT_HIGH_F16 : SOpInst<"vcvt_high_f16", "qhj", "f", OP_VCVT_NA_HI>;
def VCVT_HIGH_F32_F16 : SOpInst<"vcvt_high_f32", "wk", "h", OP_VCVT_EX_HI>;
-def VCVT_F32_F64 : SInst<"vcvt_f32_f64", "fj", "d">;
+def VCVT_F32_F64 : SInst<"vcvt_f32_f64", "mj", "d">;
def VCVT_HIGH_F32_F64 : SOpInst<"vcvt_high_f32", "qfj", "d", OP_VCVT_NA_HI>;
def VCVT_F64_F32 : SInst<"vcvt_f64_f32", "wd", "f">;
def VCVT_F64 : SInst<"vcvt_f64", "Fd", "lUlQlQUl">;
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp
index c781c922b8..020dc8da99 100644
--- a/lib/CodeGen/CGBuiltin.cpp
+++ b/lib/CodeGen/CGBuiltin.cpp
@@ -3841,8 +3841,8 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID,
Int = Intrinsic::aarch64_neon_rbit;
return EmitNeonCall(CGM.getIntrinsic(Int, Ty), Ops, "vrbit");
case NEON::BI__builtin_neon_vcvt_f32_f64: {
- Ops[0] = Builder.CreateBitCast(Ops[0], Ty);
- Ty = GetNeonType(this, NeonTypeFlags(NeonTypeFlags::Float32, false, false));
+ NeonTypeFlags SrcFlag = NeonTypeFlags(NeonTypeFlags::Float64, false, true);
+ Ops[0] = Builder.CreateBitCast(Ops[0], GetNeonType(this, SrcFlag));
return Builder.CreateFPTrunc(Ops[0], Ty, "vcvt");
}
case NEON::BI__builtin_neon_vcvtx_f32_v: {