forked from OSchip/llvm-project
parent
df586aa20e
commit
3590ef1164
|
@ -1899,7 +1899,7 @@ unsigned ISel::SelectExpr(SDOperand N, bool Recording) {
|
||||||
BuildMI(BB, PPC::EQV, 2, Result).addReg(Tmp1).addReg(Tmp2);
|
BuildMI(BB, PPC::EQV, 2, Result).addReg(Tmp1).addReg(Tmp2);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
// Check for NOT, NOR, and NAND: xor (copy, or, and), -1
|
// Check for NOT, NOR, EQV, and NAND: xor (copy, or, xor, and), -1
|
||||||
if (N.getOperand(1).getOpcode() == ISD::Constant &&
|
if (N.getOperand(1).getOpcode() == ISD::Constant &&
|
||||||
cast<ConstantSDNode>(N.getOperand(1))->isAllOnesValue()) {
|
cast<ConstantSDNode>(N.getOperand(1))->isAllOnesValue()) {
|
||||||
switch(N.getOperand(0).getOpcode()) {
|
switch(N.getOperand(0).getOpcode()) {
|
||||||
|
@ -1913,6 +1913,11 @@ unsigned ISel::SelectExpr(SDOperand N, bool Recording) {
|
||||||
Tmp2 = SelectExpr(N.getOperand(0).getOperand(1));
|
Tmp2 = SelectExpr(N.getOperand(0).getOperand(1));
|
||||||
BuildMI(BB, PPC::NAND, 2, Result).addReg(Tmp1).addReg(Tmp2);
|
BuildMI(BB, PPC::NAND, 2, Result).addReg(Tmp1).addReg(Tmp2);
|
||||||
break;
|
break;
|
||||||
|
case ISD::XOR:
|
||||||
|
Tmp1 = SelectExpr(N.getOperand(0).getOperand(0));
|
||||||
|
Tmp2 = SelectExpr(N.getOperand(0).getOperand(1));
|
||||||
|
BuildMI(BB, PPC::EQV, 2, Result).addReg(Tmp1).addReg(Tmp2);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
Tmp1 = SelectExpr(N.getOperand(0));
|
Tmp1 = SelectExpr(N.getOperand(0));
|
||||||
BuildMI(BB, PPC::NOR, 2, Result).addReg(Tmp1).addReg(Tmp1);
|
BuildMI(BB, PPC::NOR, 2, Result).addReg(Tmp1).addReg(Tmp1);
|
||||||
|
|
Loading…
Reference in New Issue