commit | 33b7a291aa1bd477bc09e3ef5fccb76249502a5e | [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 | ac7d05c4bfbd988a08e9cd8ac817be7b22cd9953 [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);