diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-08 23:56:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-08 23:56:03 +0000 |
commit | b22423c89a4acfe06b8552c1e6a0f564ff1b1aae (patch) | |
tree | 3dc9ebeb45e7f6083b6f8a60eb4fc30872c4e829 /llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp | |
parent | 156a8f92e6764ac25d6808cf2a1fbe4ee58eeddb (diff) | |
download | bcm5719-llvm-b22423c89a4acfe06b8552c1e6a0f564ff1b1aae.tar.gz bcm5719-llvm-b22423c89a4acfe06b8552c1e6a0f564ff1b1aae.zip |
fix some problems handling large vectors reported in PR6230
llvm-svn: 95616
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp index f11f5578880..20fda1a2718 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp +++ b/llvm/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); |