Skip to content

Commit 7cb256b

Browse files
authored
[SelectionDAG] Remove FIXME and commented out code from 20 years ago. NFC (#150055)
1 parent e789f8b commit 7cb256b

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10860,26 +10860,6 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTList,
1086010860
(Ops[2]->getAsZExtVal() == 0 || Ops[2]->getAsZExtVal() == 1) &&
1086110861
"Invalid STRICT_FP_ROUND!");
1086210862
break;
10863-
#if 0
10864-
// FIXME: figure out how to safely handle things like
10865-
// int foo(int x) { return 1 << (x & 255); }
10866-
// int bar() { return foo(256); }
10867-
case ISD::SRA_PARTS:
10868-
case ISD::SRL_PARTS:
10869-
case ISD::SHL_PARTS:
10870-
if (N3.getOpcode() == ISD::SIGN_EXTEND_INREG &&
10871-
cast<VTSDNode>(N3.getOperand(1))->getVT() != MVT::i1)
10872-
return getNode(Opcode, DL, VT, N1, N2, N3.getOperand(0));
10873-
else if (N3.getOpcode() == ISD::AND)
10874-
if (ConstantSDNode *AndRHS = dyn_cast<ConstantSDNode>(N3.getOperand(1))) {
10875-
// If the and is only masking out bits that cannot effect the shift,
10876-
// eliminate the and.
10877-
unsigned NumBits = VT.getScalarSizeInBits()*2;
10878-
if ((AndRHS->getValue() & (NumBits-1)) == NumBits-1)
10879-
return getNode(Opcode, DL, VT, N1, N2, N3.getOperand(0));
10880-
}
10881-
break;
10882-
#endif
1088310863
}
1088410864

1088510865
// Memoize the node unless it returns a glue result.

0 commit comments

Comments
 (0)