aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-08 23:56:03 +0000
committerChris Lattner <sabre@nondot.org>2010-02-08 23:56:03 +0000
commit8609fda0f7e4446de85f882755601ffcbd540324 (patch)
tree1b723fcdb7d4dd8fed64439d24bb79aa8528a8e9 /lib/Transforms/InstCombine/InstCombineVectorOps.cpp
parentc133457269306ef8fa45b4e8990bc462e710feaf (diff)
downloadexternal_llvm-8609fda0f7e4446de85f882755601ffcbd540324.zip
external_llvm-8609fda0f7e4446de85f882755601ffcbd540324.tar.gz
external_llvm-8609fda0f7e4446de85f882755601ffcbd540324.tar.bz2
fix some problems handling large vectors reported in PR6230
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95616 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineVectorOps.cpp')
-rw-r--r--lib/Transforms/InstCombine/InstCombineVectorOps.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
index f11f557..20fda1a 100644
--- a/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
+++ b/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
@@ -162,7 +162,8 @@ Instruction *InstCombiner::visitExtractElementInst(ExtractElementInst &EI) {
// property.
if (EI.getOperand(0)->hasOneUse() && VectorWidth != 1) {
APInt UndefElts(VectorWidth, 0);
- APInt DemandedMask(VectorWidth, 1 << IndexVal);
+ APInt DemandedMask(VectorWidth, 0);
+ DemandedMask.set(IndexVal);
if (Value *V = SimplifyDemandedVectorElts(EI.getOperand(0),
DemandedMask, UndefElts)) {
EI.setOperand(0, V);