[llvm] 7cb256b - [SelectionDAG] Remove FIXME and commented out code from 20 years ago. NFC (#150055)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 22 11:17:54 PDT 2025
Author: Craig Topper
Date: 2025-07-22T11:17:50-07:00
New Revision: 7cb256bcaa6acd4805e2fdcec4bf5a3704fed7b9
URL: https://github.com/llvm/llvm-project/commit/7cb256bcaa6acd4805e2fdcec4bf5a3704fed7b9
DIFF: https://github.com/llvm/llvm-project/commit/7cb256bcaa6acd4805e2fdcec4bf5a3704fed7b9.diff
LOG: [SelectionDAG] Remove FIXME and commented out code from 20 years ago. NFC (#150055)
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index fe47aa026450e..773ff48eec1d9 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -10860,26 +10860,6 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTList,
(Ops[2]->getAsZExtVal() == 0 || Ops[2]->getAsZExtVal() == 1) &&
"Invalid STRICT_FP_ROUND!");
break;
-#if 0
- // FIXME: figure out how to safely handle things like
- // int foo(int x) { return 1 << (x & 255); }
- // int bar() { return foo(256); }
- case ISD::SRA_PARTS:
- case ISD::SRL_PARTS:
- case ISD::SHL_PARTS:
- if (N3.getOpcode() == ISD::SIGN_EXTEND_INREG &&
- cast<VTSDNode>(N3.getOperand(1))->getVT() != MVT::i1)
- return getNode(Opcode, DL, VT, N1, N2, N3.getOperand(0));
- else if (N3.getOpcode() == ISD::AND)
- if (ConstantSDNode *AndRHS = dyn_cast<ConstantSDNode>(N3.getOperand(1))) {
- // If the and is only masking out bits that cannot effect the shift,
- // eliminate the and.
- unsigned NumBits = VT.getScalarSizeInBits()*2;
- if ((AndRHS->getValue() & (NumBits-1)) == NumBits-1)
- return getNode(Opcode, DL, VT, N1, N2, N3.getOperand(0));
- }
- break;
-#endif
}
// Memoize the node unless it returns a glue result.
More information about the llvm-commits
mailing list