aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-08-26 00:55:57 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-08-26 00:55:57 +0000
commite361cc3daa6c22e4413d48bd8b8934ea9fd5a55f (patch)
tree7c49862c4e1772a528b3e833c02aaa84589e520c /lib/CodeGen
parent5edbd23c2a6b21cd4a80e1a83db3fcfadb339764 (diff)
IRgen/NEON: Fix codegen of vzip and vzipq.
- Will be adding an executable test case to test-suite repo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112126 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGBuiltin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp
index 23c63e4452..7fc27c8075 100644
--- a/lib/CodeGen/CGBuiltin.cpp
+++ b/lib/CodeGen/CGBuiltin.cpp
@@ -1710,8 +1710,8 @@ Value *CodeGenFunction::EmitARMBuiltinExpr(unsigned BuiltinID,
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());