diff options
| author | Craig Topper <craig.topper@gmail.com> | 2013-08-01 04:51:48 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2013-08-01 04:51:48 +0000 |
| commit | 72c422cc2b27c87b4a217ab01a9d8bfd836a30be (patch) | |
| tree | 442cfb5a6fa28a2be23a56d71eca8d239374ebe7 /lib/CodeGen/CGExprScalar.cpp | |
| parent | fcbe20811e3848869054ad13352cbb431bd423eb (diff) | |
| download | clang-72c422cc2b27c87b4a217ab01a9d8bfd836a30be.tar.gz clang-72c422cc2b27c87b4a217ab01a9d8bfd836a30be.tar.bz2 clang-72c422cc2b27c87b4a217ab01a9d8bfd836a30be.tar.xz | |
Remove broken and unnecessary vec3 handling from VisitShuffleVectorExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187558 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
| -rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index d0b4ef4ef0..d3250ea646 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -969,13 +969,9 @@ Value *ScalarExprEmitter::VisitShuffleVectorExpr(ShuffleVectorExpr *E) { Value* V1 = CGF.EmitScalarExpr(E->getExpr(0)); Value* V2 = CGF.EmitScalarExpr(E->getExpr(1)); - // Handle vec3 special since the index will be off by one for the RHS. - llvm::VectorType *VTy = cast<llvm::VectorType>(V1->getType()); SmallVector<llvm::Constant*, 32> indices; - for (unsigned i = 2; i < E->getNumSubExprs(); i++) { + for (unsigned i = 2; i < E->getNumSubExprs(); ++i) { unsigned Idx = E->getShuffleMaskIdx(CGF.getContext(), i-2); - if (VTy->getNumElements() == 3 && Idx > 3) - Idx -= 1; indices.push_back(Builder.getInt32(Idx)); } |
