CGP: Clear data structures at the end of a loop iteration instead of the beginning.
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 23 Oct 2018 21:23:18 +0000 (21:23 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Tue, 23 Oct 2018 21:23:18 +0000 (21:23 +0000)
commitabd820a92bc82b5279c8cf87d54e89915414fedb
treec892262347eb0fa3cd97b7777087621d3f3677ae
parentedc3201b11bb7fcf9f8ccdfb72be506c41849978
CGP: Clear data structures at the end of a loop iteration instead of the beginning.

Clearing LargeOffsetGEPMap at the end fixes a bug where if a large
offset GEP is in a dead basic block, we fail an assertion when trying
to delete the block due to the asserting VH in LargeOffsetGEPMap.

Differential Revision: https://reviews.llvm.org/D53464

llvm-svn: 345082
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/test/CodeGen/Thumb2/unreachable-large-offset-gep.ll [new file with mode: 0644]