[cfe-commits] r120806 - /cfe/trunk/lib/CodeGen/CGBuiltin.cpp

Bob Wilson bob.wilson at apple.com
Fri Dec 3 09:10:22 PST 2010


Author: bwilson
Date: Fri Dec  3 11:10:22 2010
New Revision: 120806

URL: http://llvm.org/viewvc/llvm-project?rev=120806&view=rev
Log:
Add a separate rightShift flag instead of reusing the existing "poly" variable
to distinguish vsri/vsli.

Modified:
    cfe/trunk/lib/CodeGen/CGBuiltin.cpp

Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=120806&r1=120805&r2=120806&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Fri Dec  3 11:10:22 2010
@@ -1172,6 +1172,7 @@
   bool quad = type & 0x10;
   bool poly = (type & 0x7) == 5 || (type & 0x7) == 6;
   bool splat = false;
+  bool rightShift = false;
 
   const llvm::VectorType *VTy = GetNeonType(VMContext, type & 0x7, quad);
   const llvm::Type *Ty = VTy;
@@ -1737,10 +1738,10 @@
       return Builder.CreateAShr(Ops[0], Ops[1], "vshr_n");
   case ARM::BI__builtin_neon_vsri_n_v:
   case ARM::BI__builtin_neon_vsriq_n_v:
-    poly = true;
+    rightShift = true;
   case ARM::BI__builtin_neon_vsli_n_v:
   case ARM::BI__builtin_neon_vsliq_n_v:
-    Ops[2] = EmitNeonShiftVector(Ops[2], Ty, poly);
+    Ops[2] = EmitNeonShiftVector(Ops[2], Ty, rightShift);
     return EmitNeonCall(CGM.getIntrinsic(Intrinsic::arm_neon_vshiftins, &Ty, 1),
                         Ops, "vsli_n");
   case ARM::BI__builtin_neon_vsra_n_v:





More information about the cfe-commits mailing list