[cfe-commits] r85033 - /cfe/trunk/lib/Sema/SemaExpr.cpp

Nate Begeman natebegeman at mac.com
Sat Oct 24 19:26:49 PDT 2009


Author: sampo
Date: Sat Oct 24 21:26:48 2009
New Revision: 85033

URL: http://llvm.org/viewvc/llvm-project?rev=85033&view=rev
Log:
Add support for vector shifts, pretty straight forward.

Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=85033&r1=85032&r2=85033&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sat Oct 24 21:26:48 2009
@@ -4406,6 +4406,10 @@
   if (!lex->getType()->isIntegerType() || !rex->getType()->isIntegerType())
     return InvalidOperands(Loc, lex, rex);
 
+  // Vector shifts promote their scalar inputs to vector type.
+  if (lex->getType()->isVectorType() || rex->getType()->isVectorType())
+    return CheckVectorOperands(Loc, lex, rex);
+
   // Shifts don't perform usual arithmetic conversions, they just do integer
   // promotions on each operand. C99 6.5.7p3
   QualType LHSTy = Context.isPromotableBitField(lex);





More information about the cfe-commits mailing list