Skip to content

Commit 37e17f2

Browse files
committed
[DAG] MatchRotate - remove (redundant) legal type check.
Rely on the hasOperation() instead - as commented on D77804, the mid-term intention is to recognise rotate/funnel-by-constant pre-legalization to help avoid SimplifyDemandedBits regressions.
1 parent bcad20b commit 37e17f2

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6980,10 +6980,7 @@ SDValue DAGCombiner::MatchFunnelPosNeg(SDValue N0, SDValue N1, SDValue Pos,
69806980
// a rot[lr]. This also matches funnel shift patterns, similar to rotation but
69816981
// with different shifted sources.
69826982
SDValue DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS, const SDLoc &DL) {
6983-
// Must be a legal type. Expanded 'n promoted things won't work with rotates.
69846983
EVT VT = LHS.getValueType();
6985-
if (!TLI.isTypeLegal(VT))
6986-
return SDValue();
69876984

69886985
// The target must have at least one rotate/funnel flavor.
69896986
bool HasROTL = hasOperation(ISD::ROTL, VT);

0 commit comments

Comments
 (0)