summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorSimon Dardis <simon.dardis@mips.com>2017-11-24 16:45:28 +0000
committerSimon Dardis <simon.dardis@mips.com>2017-11-24 16:45:28 +0000
commit230f45357466ba0e6bfa32a694b2d51f876cdeac (patch)
tree3c6f08e03c7637cf4a1a766b9654118e6ab62f0f /clang/lib/Format
parent0e8924a5c7219c4d11d3b776e7d33293a5e59a77 (diff)
downloadbcm5719-llvm-230f45357466ba0e6bfa32a694b2d51f876cdeac.tar.gz
bcm5719-llvm-230f45357466ba0e6bfa32a694b2d51f876cdeac.zip
[CodeGenPrepare] Check that erased sunken address are not reused
CodeGenPrepare sinks address computations from one basic block to another and attempts to reuse address computations that have already been sunk. If the same address computation appears twice with the first instance as an operand of a load whose result is an operand to a simplifable select, CodeGenPrepare simplifies the select and recursively erases the now dead instructions. CodeGenPrepare then attempts to use the erased address computation for the second load. Fix this by erasing the cached address value if it has zero uses before looking for the address value in the sunken address map. This partially resolves PR35209. Thanks to Alexander Richardson for reporting the issue! This fixed version relands r318032 which was reverted in r318049 due to sanitizer buildbot failures. Reviewers: john.brawn Differential Revision: https://reviews.llvm.org/D39841 llvm-svn: 318956
Diffstat (limited to 'clang/lib/Format')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud