[InstCombine] Don't remove non-terminator unreachable markers
authorNikita Popov <npopov@redhat.com>
Thu, 22 Jun 2023 13:50:22 +0000 (15:50 +0200)
committerNikita Popov <npopov@redhat.com>
Thu, 22 Jun 2023 13:52:52 +0000 (15:52 +0200)
commit8aefa2bf392ec7a82f2eceba241ae0fac9e5d42e
tree1678e3559701531f436e4fc0f8dbb2c89a3d6330
parent553cd1924d39927ef8a0889b9f643de147b9037a
[InstCombine] Don't remove non-terminator unreachable markers

Even if the value happens to be undef, we should preserve these so
they get turned into an unreachable terminator later.
llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
llvm/test/Transforms/InstCombine/constant-fold-shifts.ll
llvm/test/Transforms/InstCombine/not-add.ll
llvm/test/Transforms/InstCombine/phi.ll
llvm/test/Transforms/InstCombine/udiv-simplify.ll