Skip to content

Commit 80a86ba

Browse files
committed
Remove undef/poison operand handling from the PTRADD dag combine
Those are folded earlier already.
1 parent 30bb17d commit 80a86ba

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
@@ -2644,14 +2644,6 @@ SDValue DAGCombiner::visitPTRADD(SDNode *N) {
26442644
assert(PtrVT == IntVT &&
26452645
"PTRADD with different operand types is not supported");
26462646

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

0 commit comments

Comments
 (0)