[InstSimplify] Return poison if insertelement touches out of bounds
authorJuneyoung Lee <aqjune@gmail.com>
Sun, 3 Jan 2021 15:05:08 +0000 (00:05 +0900)
committerJuneyoung Lee <aqjune@gmail.com>
Sun, 3 Jan 2021 15:43:02 +0000 (00:43 +0900)
commit2139958b53440074fcab9bb2de15e6ec13cc18eb
treec516c5d957e676df2521640e0be2f3deb6294609
parent578c5a0c6e71b0a7b31b3af69ec6fcb176291572
[InstSimplify] Return poison if insertelement touches out of bounds

This is a simple patch that updates InstSimplify to return poison if the index is/can be out-of-bounds

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D93990
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstCombine/out-of-bounds-indexes.ll
llvm/test/Transforms/InstCombine/vector_insertelt_shuffle-inseltpoison.ll
llvm/test/Transforms/InstCombine/vector_insertelt_shuffle.ll
llvm/test/Transforms/InstSimplify/insertelement.ll
llvm/test/Transforms/InstSimplify/vscale-inseltpoison.ll
llvm/test/Transforms/InstSimplify/vscale.ll