[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 14 08:59:56 PDT 2025


================
@@ -8113,10 +8583,151 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) {
     CCReg = IPM->getOperand(0);
     return true;
   }
-
   return false;
 }
 
+std::optional<SDValue>
+SystemZTargetLowering::combineSELECT_CC_CCIPMMask(SDNode *N,
+                                                  DAGCombinerInfo &DCI) const {
----------------
uweigand wrote:

I don't understand why we need yet another function here, which is called only for `SELECT_CCMASK` and not `BR_CCMASK`.     Shouldn't all these optimizations apply equally to both cases?  Why cannot this be integrated into `combineCCMask`?

https://github.com/llvm/llvm-project/pull/125970


More information about the llvm-commits mailing list