[llvm-commits] [llvm] r114659 - /llvm/trunk/utils/TableGen/NeonEmitter.cpp
Nate Begeman
natebegeman at mac.com
Thu Sep 23 09:49:18 PDT 2010
Author: sampo
Date: Thu Sep 23 11:49:17 2010
New Revision: 114659
URL: http://llvm.org/viewvc/llvm-project?rev=114659&view=rev
Log:
Revert r114596, it's breaking a few tests.
Modified:
llvm/trunk/utils/TableGen/NeonEmitter.cpp
Modified: llvm/trunk/utils/TableGen/NeonEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/NeonEmitter.cpp?rev=114659&r1=114658&r2=114659&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/NeonEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/NeonEmitter.cpp Thu Sep 23 11:49:17 2010
@@ -89,7 +89,7 @@
return 'i';
case 'f':
return 'h';
- default: throw "unhandled type in narrow!";
+ default: throw "unhandled type in widen!";
}
return '\0';
}
@@ -155,10 +155,6 @@
case 'n':
type = Widen(type);
break;
- case 'i':
- type = 'i';
- scal = true;
- break;
case 'l':
type = 'l';
scal = true;
@@ -811,27 +807,14 @@
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 @@
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 += ", ";
}
More information about the llvm-commits
mailing list