aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2010-09-23 16:49:17 +0000
committerNate Begeman <natebegeman@mac.com>2010-09-23 16:49:17 +0000
commit8a6e7e12149da32ae954a31480779cca732a8905 (patch)
tree9ff180dba4f32df99e6aaae5e14630b3e99bb2c6
parent6b5db9500cdab089f0875d1cf8b9f85036463625 (diff)
Revert r114596, it's breaking a few tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114659 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--utils/TableGen/NeonEmitter.cpp27
1 files changed, 5 insertions, 22 deletions
diff --git a/utils/TableGen/NeonEmitter.cpp b/utils/TableGen/NeonEmitter.cpp
index 310d5142da..f3707f2b22 100644
--- a/utils/TableGen/NeonEmitter.cpp
+++ b/utils/TableGen/NeonEmitter.cpp
@@ -89,7 +89,7 @@ static char Narrow(const char t) {
return 'i';
case 'f':
return 'h';
- default: throw "unhandled type in narrow!";
+ default: throw "unhandled type in widen!";
}
return '\0';
}
@@ -155,10 +155,6 @@ static char ModType(const char mod, char type, bool &quad, bool &poly,
case 'n':
type = Widen(type);
break;
- case 'i':
- type = 'i';
- scal = true;
- break;
case 'l':
type = 'l';
scal = true;
@@ -811,27 +807,14 @@ static std::string GenBuiltin(const std::string &name, const std::string &proto,
for (unsigned i = 1, e = proto.size(); i != e; ++i, ++arg) {
std::string args = std::string(&arg, 1);
- bool argquad = quad;
- bool scal = false;
-
- (void) ModType(proto[i], type, argquad, dummy, dummy, scal, dummy, dummy);
- bool explicitcast = define && !scal;
-
if (define)
args = "(" + args + ")";
- if (explicitcast) {
- unsigned builtinelts = quad ? 16 : 8;
- args = "(__neon_int8x" + utostr(builtinelts) + "_t)(" + args;
- }
// Handle multiple-vector values specially, emitting each subvector as an
// argument to the __builtin.
- if (structTypes && (proto[i] >= '2') && (proto[i] <= '4')) {
+ if (structTypes && (proto[i] == '2' || proto[i] == '3' || proto[i] == '4')){
for (unsigned vi = 0, ve = proto[i] - '0'; vi != ve; ++vi) {
s += args + ".val[" + utostr(vi) + "].val";
- if (explicitcast)
- s += ")";
-
if ((vi + 1) < ve)
s += ", ";
}
@@ -846,10 +829,10 @@ static std::string GenBuiltin(const std::string &name, const std::string &proto,
else
s += args;
- if (structTypes && !scal)
+ if (structTypes && proto[i] != 's' && proto[i] != 'i' && proto[i] != 'l' &&
+ proto[i] != 'p' && proto[i] != 'c' && proto[i] != 'a') {
s += ".val";
- if (explicitcast)
- s += ")";
+ }
if ((i + 1) < e)
s += ", ";
}