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

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 10:46:39 PST 2025


================
@@ -8132,7 +8722,9 @@ SDValue SystemZTargetLowering::combineBR_CCMASK(
   SDValue Chain = N->getOperand(0);
   SDValue CCReg = N->getOperand(4);
 
-  if (combineCCMask(CCReg, CCValidVal, CCMaskVal))
+  // combineCCIPMMask tries to combine srl/ipm sequence for flag output operand.
+  if (combineCCIPMMask(CCReg, CCValidVal, CCMaskVal) ||
+      combineCCMask(CCReg, CCValidVal, CCMaskVal))
----------------
uweigand wrote:

Why do we need the separate routine here?  `combineCCMask` already attempts to handle cases involving IPM - those that result from intrinsics that set CC.  Note that in general, we should apply the exact same set of optimizations whether the CC value was generated by an intrinsic or by an inline asm.

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


More information about the llvm-commits mailing list