Skip to content

Commit abbe349

Browse files
committed
Update ARMISelLowering.cpp
1 parent 88cf34a commit abbe349

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

llvm/lib/Target/ARM/ARMISelLowering.cpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20232,19 +20232,8 @@ static bool optimizeLogicalImm(SDValue Op, unsigned Imm, const APInt &Demanded,
2023220232
// Create the new constant immediate node.
2023320233
EVT VT = Op.getValueType();
2023420234
SDLoc DL(Op);
20235-
SDValue New;
20236-
20237-
// If the new constant immediate is all-zeros or all-ones, let the target
20238-
// independent DAG combine optimize this node.
20239-
if (NewImm == 0 || NewImm == ~0U) {
20240-
New = TLO.DAG.getNode(Op.getOpcode(), DL, VT, Op.getOperand(0),
20241-
TLO.DAG.getConstant(NewImm, DL, VT));
20242-
// Otherwise, create a machine node so that target independent DAG combine
20243-
// doesn't undo this optimization.
20244-
} else {
20245-
// Temporarily disable this optimization to avoid crashes
20246-
return false;
20247-
}
20235+
SDValue New = TLO.DAG.getNode(Op.getOpcode(), DL, VT, Op.getOperand(0),
20236+
TLO.DAG.getConstant(NewImm, DL, VT));
2024820237

2024920238
return TLO.CombineTo(Op, New);
2025020239
}

0 commit comments

Comments
 (0)