Skip to content

Commit b3579ab

Browse files
committed
Apply arsenm's suggestion
1 parent 0a54b44 commit b3579ab

File tree

3 files changed

+241
-447
lines changed

3 files changed

+241
-447
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6219,7 +6219,8 @@ SDValue DAGCombiner::visitIMINMAX(SDNode *N) {
62196219
SDLoc(N), VT, N0, N1))
62206220
return SD;
62216221

6222-
if (TLI.isOperationLegalOrCustom(ISD::USUBO, VT)) {
6222+
if (TLI.isOperationLegalOrCustom(ISD::USUBO, VT) &&
6223+
!TLI.isOperationLegalOrCustom(ISD::UMIN, VT)) {
62236224
SDValue B;
62246225

62256226
// (umin (sub a, b), a) -> (usubo a, b); (select usubo.1, a, usubo.0)

0 commit comments

Comments
 (0)