From 7e9776b55949f8fdbfdee1a66ec8aa04289436bc Mon Sep 17 00:00:00 2001 From: James Molloy Date: Fri, 15 May 2015 09:03:15 +0000 Subject: Add SDNodes for umin, umax, smin and smax. This adds new SDNodes for signed/unsigned min/max. These nodes are built from select/icmp pairs matched at SDAGBuilder stage. This patch adds the nodes, as well as legalization support and sets them to be "expand" for all targets. NFC for now; this will be tested when I switch AArch64 to using these new nodes. llvm-svn: 237423 --- llvm/lib/CodeGen/TargetLoweringBase.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp') diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 1ca453aa09c..b7f1db6529f 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -811,6 +811,10 @@ void TargetLoweringBase::initActions() { setOperationAction(ISD::FMINNUM, VT, Expand); setOperationAction(ISD::FMAXNUM, VT, Expand); setOperationAction(ISD::FMAD, VT, Expand); + setOperationAction(ISD::SMIN, VT, Expand); + setOperationAction(ISD::SMAX, VT, Expand); + setOperationAction(ISD::UMIN, VT, Expand); + setOperationAction(ISD::UMAX, VT, Expand); // Overflow operations default to expand setOperationAction(ISD::SADDO, VT, Expand); -- cgit v1.2.3