commit | 0d3e7be65f6ad6ec6c49fb8f99f88d0c0dd82b66 | [log] [tgz] |
---|---|---|
author | Dan Gohman <gohman@apple.com> | Fri Apr 16 17:15:02 2010 +0000 |
committer | Dan Gohman <gohman@apple.com> | Fri Apr 16 17:15:02 2010 +0000 |
tree | cdfe46815d63f0fad23d9f2506dd86fd82f42a6d | |
parent | 2008c183b287fe50d9252eba6d3eb179d3aa77b3 [diff] [blame] |
Avoid creating virtual registers for unused values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101480 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 7436bbe..9082fb6 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -834,7 +834,7 @@ BI->dump(); } - if (!BI->getType()->isVoidTy()) { + if (!BI->getType()->isVoidTy() && !BI->use_empty()) { unsigned &R = FuncInfo->ValueMap[BI]; if (!R) R = FuncInfo->CreateRegForValue(BI);