aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils/TableGen/NeonEmitter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/TableGen/NeonEmitter.cpp b/utils/TableGen/NeonEmitter.cpp
index 7badd5af86..eda76b3ca9 100644
--- a/utils/TableGen/NeonEmitter.cpp
+++ b/utils/TableGen/NeonEmitter.cpp
@@ -790,8 +790,11 @@ static std::string GenBuiltin(const std::string &name, const std::string &proto,
continue;
}
+ if (splat && (i + 1) == e)
+ args = Duplicate(GetNumElements(typestr, argQuad), typestr, args);
+
// Check if an explicit cast is needed.
- if (!argScalar &&
+ if ((splat || !argScalar) &&
((ck == ClassB && argType != 'c') || argPoly || argUsgn)) {
std::string argTypeStr = "c";
if (ck != ClassB)
@@ -801,10 +804,7 @@ static std::string GenBuiltin(const std::string &name, const std::string &proto,
args = "(" + TypeString('d', argTypeStr) + ")" + args;
}
- if (splat && (i + 1) == e)
- s += Duplicate(GetNumElements(typestr, argQuad), typestr, args);
- else
- s += args;
+ s += args;
if ((i + 1) < e)
s += ", ";
}