diff options
| author | Bob Wilson <bob.wilson@apple.com> | 2010-12-02 01:18:23 +0000 |
|---|---|---|
| committer | Bob Wilson <bob.wilson@apple.com> | 2010-12-02 01:18:23 +0000 |
| commit | 492de6da40993ed953966e32ac2a4dbac064a115 (patch) | |
| tree | c941e4c00f500a7e680fe33a6da5341609e44015 /llvm/utils/TableGen/NeonEmitter.cpp | |
| parent | ec626b09cb843b15d2b67c9c724e3b131bbaa54f (diff) | |
| download | bcm5719-llvm-492de6da40993ed953966e32ac2a4dbac064a115.tar.gz bcm5719-llvm-492de6da40993ed953966e32ac2a4dbac064a115.zip | |
Add casts for splatted scalars in calls to Neon builtins.
llvm-svn: 120641
Diffstat (limited to 'llvm/utils/TableGen/NeonEmitter.cpp')
| -rw-r--r-- | llvm/utils/TableGen/NeonEmitter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/utils/TableGen/NeonEmitter.cpp b/llvm/utils/TableGen/NeonEmitter.cpp index 7badd5af860..eda76b3ca99 100644 --- a/llvm/utils/TableGen/NeonEmitter.cpp +++ b/llvm/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 += ", "; } |

