================
@@ -8891,6 +8964,43 @@ SDValue SystemZTargetLowering::combineBR_CCMASK(SDNode 
*N,
                        DAG.getTargetConstant(CCValidVal, SDLoc(N), MVT::i32),
                        DAG.getTargetConstant(CCMaskVal, SDLoc(N), MVT::i32),
                        N->getOperand(3), CCReg);
+
+  SDLoc DL(N);
+
+  // Combine BR_CCMASK (ICMP (Load FI, Load StackGuard)) into BRC
+  // (COMPARE_STACK_GUARD)
+  int FI = 0;
+  SDValue InChain, OutChain, StackGuardLoad;
+  if (isStackGuardCheck(N, FI, InChain, OutChain, StackGuardLoad, DCI)) {
----------------
dominik-steenken wrote:

I have now added a new `SystemZISD` opcode. That is returned by `getCmp` in the 
appropriate circumstance, and turned into a DAG node in `emitCmp`. This avoids 
the DAG Combine. The DAG machine opcode (now called `COMPARE_SG_DAG`) is now 
selected for this node in DAGToDAG Isel, and from there, the custom insertion 
works as before.

https://github.com/llvm/llvm-project/pull/169317
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to