[llvm] r368537 - [X86] Don't use SplitOpsAndApply for ISD::USUBSAT.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 11 10:36:45 PDT 2019
Author: ctopper
Date: Sun Aug 11 10:36:45 2019
New Revision: 368537
URL: http://llvm.org/viewvc/llvm-project?rev=368537&view=rev
Log:
[X86] Don't use SplitOpsAndApply for ISD::USUBSAT.
Target independent type legalization and custom lowering
should be able to handle it.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=368537&r1=368536&r2=368537&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Aug 11 10:36:45 2019
@@ -42896,16 +42896,10 @@ static SDValue combineSubToSubus(SDNode
} else
return SDValue();
- auto USUBSATBuilder = [](SelectionDAG &DAG, const SDLoc &DL,
- ArrayRef<SDValue> Ops) {
- return DAG.getNode(ISD::USUBSAT, DL, Ops[0].getValueType(), Ops);
- };
-
// PSUBUS doesn't support v8i32/v8i64/v16i32, but it can be enabled with
// special preprocessing in some cases.
if (VT != MVT::v8i32 && VT != MVT::v16i32 && VT != MVT::v8i64)
- return SplitOpsAndApply(DAG, Subtarget, SDLoc(N), VT,
- { SubusLHS, SubusRHS }, USUBSATBuilder);
+ return DAG.getNode(ISD::USUBSAT, SDLoc(N), VT, SubusLHS, SubusRHS);
// Special preprocessing case can be only applied
// if the value was zero extended from 16 bit,
@@ -42934,9 +42928,9 @@ static SDValue combineSubToSubus(SDNode
SDValue NewSubusLHS =
DAG.getZExtOrTrunc(SubusLHS, SDLoc(SubusLHS), ShrinkedType);
SDValue NewSubusRHS = DAG.getZExtOrTrunc(UMin, SDLoc(SubusRHS), ShrinkedType);
- SDValue Psubus =
- SplitOpsAndApply(DAG, Subtarget, SDLoc(N), ShrinkedType,
- { NewSubusLHS, NewSubusRHS }, USUBSATBuilder);
+ SDValue Psubus = DAG.getNode(ISD::USUBSAT, SDLoc(N), ShrinkedType,
+ NewSubusLHS, NewSubusRHS);
+
// Zero extend the result, it may be used somewhere as 32 bit,
// if not zext and following trunc will shrink.
return DAG.getZExtOrTrunc(Psubus, SDLoc(N), ExtType);
More information about the llvm-commits
mailing list