Skip to content

Commit 4c0f401

Browse files
committed
Remove undef/poison operand handling from the PTRADD dag combine
Those are folded earlier already.
1 parent c7aea91 commit 4c0f401

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2645,14 +2645,6 @@ SDValue DAGCombiner::visitPTRADD(SDNode *N) {
26452645
assert(PtrVT == IntVT &&
26462646
"PTRADD with different operand types is not supported");
26472647

2648-
// fold (ptradd undef, y) -> undef
2649-
if (N0.isUndef())
2650-
return N0;
2651-
2652-
// fold (ptradd x, undef) -> undef
2653-
if (N1.isUndef())
2654-
return DAG.getUNDEF(PtrVT);
2655-
26562648
// fold (ptradd x, 0) -> x
26572649
if (isNullConstant(N1))
26582650
return N0;

0 commit comments

Comments
 (0)