diff options
author | Hiroshi Inoue <inouehrs@jp.ibm.com> | 2018-09-26 12:32:45 +0000 |
---|---|---|
committer | Hiroshi Inoue <inouehrs@jp.ibm.com> | 2018-09-26 12:32:45 +0000 |
commit | 20982f09956d2630a7d889293a9f4a26c6d2c43e (patch) | |
tree | 6fb200edabb49fe08589ae9081b9fc2703d6953e /llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
parent | 20b5abe23b33b924a9f1a7ad62f3a9d9e118ebf5 (diff) | |
download | bcm5719-llvm-20982f09956d2630a7d889293a9f4a26c6d2c43e.tar.gz bcm5719-llvm-20982f09956d2630a7d889293a9f4a26c6d2c43e.zip |
[PowerPC] optimize conditional branch on CRSET/CRUNSET
This patch adds a check to optimize conditional branch (BC and BCn) based on a constant set by CRSET or CRUNSET.
Other optimizers, such as block placement, may generate such code and hence
I do this at the very end of the optimization in pre-emit peephole pass.
A conditional branch based on a constant is eliminated or converted into unconditional branch.
Also CRSET/CRUNSET is eliminated if the condition code register is not used
by instruction other than the branch to be optimized.
Differential Revision: https://reviews.llvm.org/D52345
llvm-svn: 343100
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
0 files changed, 0 insertions, 0 deletions