[PATCH] [SDAG] Add SDNodes for umin, umax, smin and smax

Elena Demikhovsky elena.demikhovsky at intel.com
Wed May 13 23:14:03 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:3310
@@ +3309,3 @@
+    default: llvm_unreachable("How did we get here?");
+    case ISD::SMAX: Pred = ISD::SETGT; break;
+    case ISD::SMIN: Pred = ISD::SETLT; break;
----------------
 

================
Comment at: lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:562
@@ -557,1 +561,3 @@
 
+SDValue DAGTypeLegalizer::PromoteIntRes_MINMAX(SDNode *N, unsigned Opcode) {
+  SDValue LHS = GetPromotedInteger(N->getOperand(0));
----------------
You can use PromoteIntRes_SimpleIntBinOp(), it does the same.

http://reviews.llvm.org/D9746

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list