mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-08 19:25:47 +00:00
Add casts for splatted scalars in calls to Neon builtins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120641 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -790,8 +790,11 @@ static std::string GenBuiltin(const std::string &name, const std::string &proto,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (splat && (i + 1) == e)
|
||||||
|
args = Duplicate(GetNumElements(typestr, argQuad), typestr, args);
|
||||||
|
|
||||||
// Check if an explicit cast is needed.
|
// Check if an explicit cast is needed.
|
||||||
if (!argScalar &&
|
if ((splat || !argScalar) &&
|
||||||
((ck == ClassB && argType != 'c') || argPoly || argUsgn)) {
|
((ck == ClassB && argType != 'c') || argPoly || argUsgn)) {
|
||||||
std::string argTypeStr = "c";
|
std::string argTypeStr = "c";
|
||||||
if (ck != ClassB)
|
if (ck != ClassB)
|
||||||
@@ -801,10 +804,7 @@ static std::string GenBuiltin(const std::string &name, const std::string &proto,
|
|||||||
args = "(" + TypeString('d', argTypeStr) + ")" + args;
|
args = "(" + TypeString('d', argTypeStr) + ")" + args;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (splat && (i + 1) == e)
|
s += args;
|
||||||
s += Duplicate(GetNumElements(typestr, argQuad), typestr, args);
|
|
||||||
else
|
|
||||||
s += args;
|
|
||||||
if ((i + 1) < e)
|
if ((i + 1) < e)
|
||||||
s += ", ";
|
s += ", ";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user