================
@@ -8702,61 +8738,264 @@ SDValue SystemZTargetLowering::combineSETCC(
   return SDValue();
 }
 
+static SmallSet<int, 4> convertCCMaskToCCValsSet(int Mask) {
+  SmallSet<int, 4> CCVals;
+  size_t Pos = 0;
+  while (Mask) {
+    if (Mask & 0x1)
+      CCVals.insert(3 - Pos);
+    Mask >>= 1;
+    ++Pos;
+  }
+  return CCVals;
+}
+
+static std::pair<SDValue, int> findCCUse(const SDValue &Val) {
+  auto *N = Val.getNode();
+  if (!N)
+    return {Val, SystemZ::CCMASK_NONE};
+  if (isa<ConstantSDNode>(Val))
+    return std::make_pair(SDValue(), SystemZ::CCMASK_NONE);
+  else if (N->getOpcode() == ISD::CopyFromReg && N->getNumOperands() > 1) {
+    if (auto *RN = cast<RegisterSDNode>(N->getOperand(1))) {
+      if (RN->getReg() == SystemZ::CC)
+        return {Val, SystemZ::CCMASK_ANY};
+    }
----------------
uweigand wrote:

I don't think we need this directly, we should never get here.   Recursion 
should terminate with IPM or SELECT_CCMASK.

https://github.com/llvm/llvm-project/pull/125970
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to