[llvm] [AArch64] Fold CSET + BR_CC into a conditional branch (PR #207398)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 05:26:02 PDT 2026


================
@@ -11725,6 +11725,24 @@ SDValue AArch64TargetLowering::LowerBR_CC(SDValue Op, SelectionDAG &DAG) const {
                        Overflow);
   }
 
+  // Fold CSET + BR_CC to a conditional branch (rather than keeping the CSET
+  // and emitting a TB[N]Z below).
+  {
+    using namespace llvm::SDPatternMatch;
+    SDValue Flags;
+    uint64_t InvCC;
----------------
MacDue wrote:

I've add a comment above the matcher :+1:  

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


More information about the llvm-commits mailing list