summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2011-02-24 10:00:25 +0000
committerCameron Zwarich <zwarich@apple.com>2011-02-24 10:00:25 +0000
commita62fc89a04b2fb9d15a7c14332bdfcfb59adc129 (patch)
treec5267ac9afe7fc7bfca0622aa811a4954c8ff8f0 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent3cf92802148655027d277940eafb1f38d4d6b1fb (diff)
downloadbcm5719-llvm-a62fc89a04b2fb9d15a7c14332bdfcfb59adc129.tar.gz
bcm5719-llvm-a62fc89a04b2fb9d15a7c14332bdfcfb59adc129.zip
Merge information about the number of zero, one, and sign bits of live-out
registers at phis. This enables us to eliminate a lot of pointless zexts during the DAGCombine phase. This fixes <rdar://problem/8760114>. llvm-svn: 126380
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index d5400630835..68ba966d268 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -842,7 +842,12 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
}
}
- if (!AllPredsVisited) {
+ if (AllPredsVisited) {
+ for (BasicBlock::const_iterator I = LLVMBB->begin(), E = LLVMBB->end();
+ I != E && isa<PHINode>(I); ++I) {
+ FuncInfo->ComputePHILiveOutRegInfo(cast<PHINode>(I));
+ }
+ } else {
for (BasicBlock::const_iterator I = LLVMBB->begin(), E = LLVMBB->end();
I != E && isa<PHINode>(I); ++I) {
FuncInfo->InvalidatePHILiveOutRegInfo(cast<PHINode>(I));
OpenPOWER on IntegriCloud