summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Northover <t.p.northover@gmail.com>2019-10-30 11:27:13 +0000
committerTim Northover <t.p.northover@gmail.com>2019-11-20 13:20:02 +0000
commite23d6f3184d365a9e72a67dddd870d98e80f998d (patch)
tree6341d8087731476d7fece8726f23763394ef2b49
parentdb73bcd98ef4ffbe91405a5adfcfdcd83bc007f4 (diff)
downloadbcm5719-llvm-e23d6f3184d365a9e72a67dddd870d98e80f998d.tar.gz
bcm5719-llvm-e23d6f3184d365a9e72a67dddd870d98e80f998d.zip
NeonEmitter: remove special case on casting polymorphic builtins.
For some reason we were not casting a fairly obscure class of builtin calls we expected to be polymorphic to vectors of char. It worked because the only affected intrinsics weren't actually polymorphic after all, but is unnecessarily complicated.
-rw-r--r--clang/lib/CodeGen/CGBuiltin.cpp5
-rw-r--r--clang/utils/TableGen/NeonEmitter.cpp7
2 files changed, 7 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index d9d0538b913..ecac9aee5c7 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -5456,6 +5456,11 @@ Value *CodeGenFunction::EmitCommonNeonBuiltinExpr(
llvm::Type *Tys[2] = { Ty, GetFloatNeonType(this, Type) };
return EmitNeonCall(CGM.getIntrinsic(LLVMIntrinsic, Tys), Ops, NameHint);
}
+ case NEON::BI__builtin_neon_vcvtx_f32_v: {
+ llvm::Type *Tys[2] = { VTy->getTruncatedElementVectorType(VTy), Ty};
+ return EmitNeonCall(CGM.getIntrinsic(LLVMIntrinsic, Tys), Ops, NameHint);
+
+ }
case NEON::BI__builtin_neon_vext_v:
case NEON::BI__builtin_neon_vextq_v: {
int CV = cast<ConstantInt>(Ops[2])->getSExtValue();
diff --git a/clang/utils/TableGen/NeonEmitter.cpp b/clang/utils/TableGen/NeonEmitter.cpp
index bb893bc49f6..cdf761b00c6 100644
--- a/clang/utils/TableGen/NeonEmitter.cpp
+++ b/clang/utils/TableGen/NeonEmitter.cpp
@@ -1078,9 +1078,7 @@ std::string Intrinsic::getBuiltinTypeStr() {
if (!RetT.isScalar() && RetT.isInteger() && !RetT.isSigned())
RetT.makeSigned();
- bool ForcedVectorFloatingType = isFloatingPointProtoModifier(Proto[0]);
- if (LocalCK == ClassB && !RetT.isVoid() && !RetT.isScalar() &&
- !ForcedVectorFloatingType)
+ if (LocalCK == ClassB && !RetT.isVoid() && !RetT.isScalar())
// Cast to vector of 8-bit elements.
RetT.makeInteger(8, true);
@@ -1092,8 +1090,7 @@ std::string Intrinsic::getBuiltinTypeStr() {
if (T.isPoly())
T.makeInteger(T.getElementSizeInBits(), false);
- bool ForcedFloatingType = isFloatingPointProtoModifier(Proto[I + 1]);
- if (LocalCK == ClassB && !T.isScalar() && !ForcedFloatingType)
+ if (LocalCK == ClassB && !T.isScalar())
T.makeInteger(8, true);
// Halves always get converted to 8-bit elements.
if (T.isHalf() && T.isVector() && !T.isScalarForMangling())
OpenPOWER on IntegriCloud