diff options
author | James Molloy <james.molloy@arm.com> | 2015-05-15 09:03:15 +0000 |
---|---|---|
committer | James Molloy <james.molloy@arm.com> | 2015-05-15 09:03:15 +0000 |
commit | 7e9776b55949f8fdbfdee1a66ec8aa04289436bc (patch) | |
tree | c7a7770e280255a6504f9a7e17f7e1a502b5d823 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | f0ab553fea2e01effa387ead1ae71e774f0793ab (diff) | |
download | llvm-7e9776b55949f8fdbfdee1a66ec8aa04289436bc.zip llvm-7e9776b55949f8fdbfdee1a66ec8aa04289436bc.tar.gz llvm-7e9776b55949f8fdbfdee1a66ec8aa04289436bc.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 1ca453a..b7f1db6 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); |