diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-10-08 18:28:36 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-10-08 18:28:36 +0000 |
commit | dd70996a5c4585f6c6068471b582b97c0f3acd77 (patch) | |
tree | e098db7afa6acd543a9d578ddb9b9fe1b89dae31 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | a0e159f7aa6c521940b170984e146b468840d7c8 (diff) | |
download | llvm-dd70996a5c4585f6c6068471b582b97c0f3acd77.zip llvm-dd70996a5c4585f6c6068471b582b97c0f3acd77.tar.gz llvm-dd70996a5c4585f6c6068471b582b97c0f3acd77.tar.bz2 |
[SCEV] Pick backedge values for phi nodes correctly
Summary:
`getConstantEvolutionLoopExitValue` and `ComputeExitCountExhaustively`
assumed all phi nodes in the loop header have the same order of incoming
values. This is not correct, and this commit changes
`getConstantEvolutionLoopExitValue` and `ComputeExitCountExhaustively`
to lookup the backedge value of a phi node using the loop's latch block.
Unfortunately, there is still some code duplication
`getConstantEvolutionLoopExitValue` and `ComputeExitCountExhaustively`.
At some point in the future we should extract out a helper class /
method that can evolve constant evolution phi nodes across iterations.
Fixes 25060. Thanks to Mattias Eriksson for the spot-on analysis!
Depends on D13457.
Reviewers: atrick, hfinkel
Subscribers: materi, llvm-commits
Differential Revision: http://reviews.llvm.org/D13458
llvm-svn: 249712
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions