diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2005-01-28 14:06:46 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2005-01-28 14:06:46 +0000 |
commit | 6b9870abced52820afb2c51a7fab96afd6e12bba (patch) | |
tree | 09157cef96110009d761616ca79d71bbdb97e840 | |
parent | a5ba89421eb6e8ade7833480e5820f9131fa3555 (diff) |
fix ExprMap and constant check in setcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19870 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/Alpha/AlphaISelPattern.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Target/Alpha/AlphaISelPattern.cpp b/lib/Target/Alpha/AlphaISelPattern.cpp index eb3594cdca..e6efc030cc 100644 --- a/lib/Target/Alpha/AlphaISelPattern.cpp +++ b/lib/Target/Alpha/AlphaISelPattern.cpp @@ -653,7 +653,7 @@ unsigned ISel::SelectExpr(SDOperand N) { } } else if (dir == 2) { Tmp1 = SelectExpr(N.getOperand(1)); - if (isConst2) { + if (isConst1) { Tmp2 = cast<ConstantSDNode>(N.getOperand(0))->getValue(); BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addImm(Tmp2); } else { @@ -866,9 +866,9 @@ unsigned ISel::SelectExpr(SDOperand N) { void ISel::Select(SDOperand N) { unsigned Tmp1, Tmp2, Opc; - if(ExprMap[N]) - return; //alread selected - ExprMap[N] = 1; + // FIXME: Disable for our current expansion model! + if (/*!N->hasOneUse() &&*/ !ExprMap.insert(std::make_pair(N, 1)).second) + return; // Already selected. SDNode *Node = N.Val; @@ -977,6 +977,7 @@ void ISel::Select(SDOperand N) { case ISD::CopyFromReg: case ISD::CALL: // case ISD::DYNAMIC_STACKALLOC: + ExprMap.erase(N); SelectExpr(N); return; |