[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 Aug 22 09:37:24 PDT 2025


================
@@ -8826,15 +9029,49 @@ SDValue SystemZTargetLowering::combineSELECT_CCMASK(
   int CCMaskVal = CCMask->getZExtValue();
   SDValue CCReg = N->getOperand(4);
 
-  if (combineCCMask(CCReg, CCValidVal, CCMaskVal))
-    return DAG.getNode(SystemZISD::SELECT_CCMASK, SDLoc(N), N->getValueType(0),
-                       N->getOperand(0), N->getOperand(1),
-                       DAG.getTargetConstant(CCValidVal, SDLoc(N), MVT::i32),
-                       DAG.getTargetConstant(CCMaskVal, SDLoc(N), MVT::i32),
-                       CCReg);
-  return SDValue();
-}
+  if (!combineCCMask(CCReg, CCValidVal, CCMaskVal, DAG))
+    return SDValue();
----------------
uweigand wrote:

Hmm.  Would it ever be beneficial to attempt the True/False optimization (using the original CCReg) even if combineCCMask doesn't find a better CCreg?

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


More information about the llvm-commits mailing list