summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2013-08-01 06:59:29 +0000
committerCraig Topper <craig.topper@gmail.com>2013-08-01 06:59:29 +0000
commite1791d80d5c8e26cd7727524b2bf028e00998558 (patch)
treefe78e51613754bb583c8b5e3e445057a1499f8fc /lib/CodeGen/CGExprScalar.cpp
parent2f66512a110844268c0f230ceea2c2ec1006858f (diff)
downloadclang-e1791d80d5c8e26cd7727524b2bf028e00998558.tar.gz
clang-e1791d80d5c8e26cd7727524b2bf028e00998558.tar.bz2
clang-e1791d80d5c8e26cd7727524b2bf028e00998558.tar.xz
Remove more odd code that tries to account for an off by 1 problem in vec3 shuffles that doesn't really exist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187561 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--lib/CodeGen/CGExprScalar.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index c0355f690d..9ab111c493 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -944,14 +944,6 @@ Value *ScalarExprEmitter::VisitShuffleVectorExpr(ShuffleVectorExpr *E) {
Value *Indx = Builder.CreateExtractElement(Mask, IIndx, "shuf_idx");
Indx = Builder.CreateZExt(Indx, CGF.Int32Ty, "idx_zext");
- // Handle vec3 special since the index will be off by one for the RHS.
- if ((LHSElts == 6) && (E->getNumSubExprs() == 3)) {
- Value *cmpIndx, *newIndx;
- cmpIndx = Builder.CreateICmpUGT(Indx, Builder.getInt32(3),
- "cmp_shuf_idx");
- newIndx = Builder.CreateSub(Indx, Builder.getInt32(1), "shuf_idx_adj");
- Indx = Builder.CreateSelect(cmpIndx, newIndx, Indx, "sel_shuf_idx");
- }
Value *VExt = Builder.CreateExtractElement(LHS, Indx, "shuf_elt");
NewV = Builder.CreateInsertElement(NewV, VExt, IIndx, "shuf_ins");
}