diff options
| author | Igor Laevsky <igmyrj@gmail.com> | 2017-12-13 11:21:18 +0000 |
|---|---|---|
| committer | Igor Laevsky <igmyrj@gmail.com> | 2017-12-13 11:21:18 +0000 |
| commit | e0edb66475dd3dd4adf55cb00cdd06e596b199ef (patch) | |
| tree | 88a05c5b136b063fe94be5ab72cefcbe8e7f0ddd /llvm/lib/Transforms | |
| parent | e8d4e88babc915ffdadf96b69550acfded64d0ee (diff) | |
| download | bcm5719-llvm-e0edb66475dd3dd4adf55cb00cdd06e596b199ef.tar.gz bcm5719-llvm-e0edb66475dd3dd4adf55cb00cdd06e596b199ef.zip | |
Reintroduce r320049, r320014 and r319894.
OpenGL issues should be fixed by now.
llvm-svn: 320568
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp index 6c99007475c..65a96b96522 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp @@ -781,6 +781,10 @@ Instruction *InstCombiner::visitInsertElementInst(InsertElementInst &IE) { Value *ScalarOp = IE.getOperand(1); Value *IdxOp = IE.getOperand(2); + if (auto *V = SimplifyInsertElementInst( + VecOp, ScalarOp, IdxOp, SQ.getWithInstruction(&IE))) + return replaceInstUsesWith(IE, V); + // Inserting an undef or into an undefined place, remove this. if (isa<UndefValue>(ScalarOp) || isa<UndefValue>(IdxOp)) replaceInstUsesWith(IE, VecOp); |

