diff options
author | ed <ed@FreeBSD.org> | 2009-06-07 09:21:09 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-07 09:21:09 +0000 |
commit | e65fe1a3e103e3aa81b69704d20eb95f54097271 (patch) | |
tree | 7faa7e6887831d68515763b37bd680e3d4a886ea /lib/Transforms/Scalar/InstructionCombining.cpp | |
parent | 2361a5c2bfbaef476824e51fa72712e334219c7b (diff) | |
download | FreeBSD-src-e65fe1a3e103e3aa81b69704d20eb95f54097271.zip FreeBSD-src-e65fe1a3e103e3aa81b69704d20eb95f54097271.tar.gz |
Import LLVM r73021.
Diffstat (limited to 'lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 97bd34c..6d2ff0e 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -12579,6 +12579,12 @@ Instruction *InstCombiner::visitInsertElementInst(InsertElementInst &IE) { } } + unsigned VWidth = cast<VectorType>(VecOp->getType())->getNumElements(); + APInt UndefElts(VWidth, 0); + APInt AllOnesEltMask(APInt::getAllOnesValue(VWidth)); + if (SimplifyDemandedVectorElts(&IE, AllOnesEltMask, UndefElts)) + return &IE; + return 0; } |