Skip to content

Commit ef7f64a

Browse files
committed
Replace with *KnownVal
1 parent e7b65b3 commit ef7f64a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13597,13 +13597,7 @@ SDValue DAGCombiner::visitSETCC(SDNode *N) {
1359713597

1359813598
// If the comparison result is known, replace with constant
1359913599
if (KnownVal) {
13600-
if (*KnownVal) {
13601-
// Use the target's true value for comparisons
13602-
return DAG.getBoolConstant(true, DL, VT, VT);
13603-
} else {
13604-
// False is always 0
13605-
return DAG.getConstant(0, DL, VT);
13606-
}
13600+
return DAG.getBoolConstant(*KnownVal, DL, VT, VT);
1360713601
}
1360813602
}
1360913603

0 commit comments

Comments
 (0)