mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-02 00:16:25 +00:00
fix ExprMap and constant check in setcc
llvm-svn: 19870
This commit is contained in:
parent
29092b4f26
commit
9db35b0763
@ -653,7 +653,7 @@ unsigned ISel::SelectExpr(SDOperand N) {
|
|||||||
}
|
}
|
||||||
} else if (dir == 2) {
|
} else if (dir == 2) {
|
||||||
Tmp1 = SelectExpr(N.getOperand(1));
|
Tmp1 = SelectExpr(N.getOperand(1));
|
||||||
if (isConst2) {
|
if (isConst1) {
|
||||||
Tmp2 = cast<ConstantSDNode>(N.getOperand(0))->getValue();
|
Tmp2 = cast<ConstantSDNode>(N.getOperand(0))->getValue();
|
||||||
BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addImm(Tmp2);
|
BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addImm(Tmp2);
|
||||||
} else {
|
} else {
|
||||||
@ -866,9 +866,9 @@ unsigned ISel::SelectExpr(SDOperand N) {
|
|||||||
void ISel::Select(SDOperand N) {
|
void ISel::Select(SDOperand N) {
|
||||||
unsigned Tmp1, Tmp2, Opc;
|
unsigned Tmp1, Tmp2, Opc;
|
||||||
|
|
||||||
if(ExprMap[N])
|
// FIXME: Disable for our current expansion model!
|
||||||
return; //alread selected
|
if (/*!N->hasOneUse() &&*/ !ExprMap.insert(std::make_pair(N, 1)).second)
|
||||||
ExprMap[N] = 1;
|
return; // Already selected.
|
||||||
|
|
||||||
SDNode *Node = N.Val;
|
SDNode *Node = N.Val;
|
||||||
|
|
||||||
@ -977,6 +977,7 @@ void ISel::Select(SDOperand N) {
|
|||||||
case ISD::CopyFromReg:
|
case ISD::CopyFromReg:
|
||||||
case ISD::CALL:
|
case ISD::CALL:
|
||||||
// case ISD::DYNAMIC_STACKALLOC:
|
// case ISD::DYNAMIC_STACKALLOC:
|
||||||
|
ExprMap.erase(N);
|
||||||
SelectExpr(N);
|
SelectExpr(N);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user