[Simplify] Actually remove unsed instruction from region header.
commit4b683a2088af44319906d0ab22e0a503bad9f866
authorMichael Kruse <llvm@meinersbur.de>
Tue, 5 Sep 2017 19:44:39 +0000 (5 19:44 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Tue, 5 Sep 2017 19:44:39 +0000 (5 19:44 +0000)
tree47c410880eeda19bb978f77ea8c2ddb6fd438fd1
parent815fb6452bd4bbd55bf7b76e42eee2aa68a1ad89
[Simplify] Actually remove unsed instruction from region header.

Since r312249 instructions of a entry block of region statements are
not marked as root anymore and hence can theoretically be removed
if unused. Theoretically, because the instruction list was not changed.

Still, MemoryAccesses for unused instructions were removed. This lead
to a failed assertion in the code generator  when the MemoryAccess for
the still listed instruction was not found.

This hould fix the
Assertion failed: ArrayAccess && "No array access found for instruction!",
file ScopInfo.h, line 1494
compiler crashes.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@312566 91177308-0d34-0410-b5e6-96231b3b80d8
include/polly/ScopInfo.h
lib/Transform/Simplify.cpp
test/Simplify/ununsed_read_in_region_entry.ll [new file with mode: 0644]