forked from OSchip/llvm-project
- Allow custom lowering for CTPOP, CTTZ, CTLZ.
- Fixed an existing unexpanded tab. llvm-svn: 40605
This commit is contained in:
parent
c5e340eded
commit
34e2d22d63
|
@ -2738,9 +2738,16 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
||||||
case ISD::CTLZ:
|
case ISD::CTLZ:
|
||||||
Tmp1 = LegalizeOp(Node->getOperand(0)); // Op
|
Tmp1 = LegalizeOp(Node->getOperand(0)); // Op
|
||||||
switch (TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0))) {
|
switch (TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0))) {
|
||||||
case TargetLowering::Custom: assert(0 && "Cannot custom handle this yet!");
|
case TargetLowering::Custom:
|
||||||
case TargetLowering::Legal:
|
case TargetLowering::Legal:
|
||||||
Result = DAG.UpdateNodeOperands(Result, Tmp1);
|
Result = DAG.UpdateNodeOperands(Result, Tmp1);
|
||||||
|
if (TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0)) ==
|
||||||
|
TargetLowering::Custom) {
|
||||||
|
Tmp1 = TLI.LowerOperation(Result, DAG);
|
||||||
|
if (Tmp1.Val) {
|
||||||
|
Result = Tmp1;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case TargetLowering::Promote: {
|
case TargetLowering::Promote: {
|
||||||
MVT::ValueType OVT = Tmp1.getValueType();
|
MVT::ValueType OVT = Tmp1.getValueType();
|
||||||
|
|
Loading…
Reference in New Issue