Skip to content

Commit 6fdc263

Browse files
committed
fix ABS
1 parent 93b387b commit 6fdc263

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5570,6 +5570,9 @@ bool SelectionDAG::canCreateUndefOrPoison(SDValue Op, const APInt &DemandedElts,
55705570
case ISD::BUILD_PAIR:
55715571
case ISD::SPLAT_VECTOR:
55725572
case ISD::FABS:
5573+
case ISD::ABS:
5574+
// ISD::ABS defines abs(INT_MIN) -> INT_MIN and never generates poison.
5575+
// Different to Intrinsic::abs.
55735576
return false;
55745577

55755578
case ISD::ADDC:

0 commit comments

Comments
 (0)