[llvm-commits] [llvm] r120640 - /llvm/trunk/utils/TableGen/NeonEmitter.cpp

Bob Wilson bob.wilson at apple.com
Wed Dec 1 17:18:20 PST 2010


Author: bwilson
Date: Wed Dec  1 19:18:20 2010
New Revision: 120640

URL: http://llvm.org/viewvc/llvm-project?rev=120640&view=rev
Log:
Add a missing cast for Neon vsbl results.
The bitwise operations are always done with unsigned values, but the result may
be signed.

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=120640&r1=120639&r2=120640&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/NeonEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/NeonEmitter.cpp Wed Dec  1 19:18:20 2010
@@ -611,9 +611,10 @@
     break;
   case OpSelect:
     // ((0 & 1) | (~0 & 2))
+    s += "(" + ts + ")";
     ts = TypeString(proto[1], typestr);
-    s += "(a & (" + ts + ")b) | ";
-    s += "(~a & (" + ts + ")c)";
+    s += "((a & (" + ts + ")b) | ";
+    s += "(~a & (" + ts + ")c))";
     break;
   case OpRev16:
     s += "__builtin_shufflevector(a, a";





More information about the llvm-commits mailing list