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

Daniel Dunbar daniel at zuster.org
Wed Aug 25 17:55:57 PDT 2010


Author: ddunbar
Date: Wed Aug 25 19:55:57 2010
New Revision: 112126

URL: http://llvm.org/viewvc/llvm-project?rev=112126&view=rev
Log:
IRgen/NEON: Fix codegen of vzip and vzipq.
 - Will be adding an executable test case to test-suite repo.

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=112126&r1=112125&r2=112126&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Wed Aug 25 19:55:57 2010
@@ -1710,8 +1710,8 @@
     for (unsigned vi = 0; vi != 2; ++vi) {
       SmallVector<Constant*, 16> Indices;
       for (unsigned i = 0, e = VTy->getNumElements(); i != e; i += 2) {
-        Indices.push_back(ConstantInt::get(Int32Ty, (i >> 1)));
-        Indices.push_back(ConstantInt::get(Int32Ty, (i >> 1)+e));
+        Indices.push_back(ConstantInt::get(Int32Ty, (i + vi*e) >> 1));
+        Indices.push_back(ConstantInt::get(Int32Ty, ((i + vi*e) >> 1)+e));
       }
       Value *Addr = Builder.CreateConstInBoundsGEP1_32(Ops[0], vi);
       SV = llvm::ConstantVector::get(Indices.begin(), Indices.size());





More information about the cfe-commits mailing list