aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2015-10-08 18:28:36 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2015-10-08 18:28:36 +0000
commitdd70996a5c4585f6c6068471b582b97c0f3acd77 (patch)
treee098db7afa6acd543a9d578ddb9b9fe1b89dae31 /clang/lib/CodeGen/CodeGenModule.cpp
parenta0e159f7aa6c521940b170984e146b468840d7c8 (diff)
downloadllvm-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