[InstSimplify] Fold gep inbounds undef to undef instead of poison
authorNikita Popov <npopov@redhat.com>
Fri, 30 Jun 2023 13:31:47 +0000 (15:31 +0200)
committerNikita Popov <npopov@redhat.com>
Thu, 6 Jul 2023 12:59:22 +0000 (14:59 +0200)
commit6c7fd723c460dee6546b3b876a0dfee8c996d7d8
tree0daa30f6fde72480a9090c20c6213473b9a39775
parent5861b4c6de26ccbf628b7c127a199942d7cbc3cb
[InstSimplify] Fold gep inbounds undef to undef instead of poison

With the semantics change from D154051, it is no longer valid to
fold gep inbounds undef to poison (unless we know the index is
non-zero). Fold it to undef instead.

Differential Revision: https://reviews.llvm.org/D154215
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstSimplify/gep.ll