[InstSimplify] remove poison-unsafe insertelement of undef value
authorSanjay Patel <spatel@rotateright.com>
Fri, 1 May 2020 13:18:33 +0000 (09:18 -0400)
committerSanjay Patel <spatel@rotateright.com>
Fri, 1 May 2020 13:22:05 +0000 (09:22 -0400)
commit5486e00dc3e3bb9969f1e8dbddfd18bb92c99e56
tree36d94b9131dc7fada2f56cb94b012ad0f3782968
parent4f1e9a17e9d28bdfd035313c96b3a5d4c91a7733
[InstSimplify] remove poison-unsafe insertelement of undef value

PR45481:
https://bugs.llvm.org/show_bug.cgi?id=45481

SDAG has an identical transform to this, so there's little
chance of any real-world impact. OTOH, that means we are
effectively sweeping the bug out of sight because poison
exists in codegen too.
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstCombine/extractelement.ll
llvm/test/Transforms/InstSimplify/insertelement.ll