From 1dbfa91671c766cbca6ea1adaa634856e0b88305 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Thu, 2 Dec 2010 01:18:20 +0000 Subject: [PATCH 1/1] Add a missing cast for Neon vsbl results. The bitwise operations are always done with unsigned values, but the result may be signed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120640 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/NeonEmitter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/TableGen/NeonEmitter.cpp b/utils/TableGen/NeonEmitter.cpp index 56e7e185b45..7badd5af860 100644 --- a/utils/TableGen/NeonEmitter.cpp +++ b/utils/TableGen/NeonEmitter.cpp @@ -611,9 +611,10 @@ static std::string GenOpString(OpKind op, const std::string &proto, 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"; -- 2.34.1