[llvm] [X86] Don't always seperate conditions in `(br (and/or cond0, cond1))` into seperate branches (PR #81689)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 02:29:22 PST 2024


================
@@ -3339,6 +3361,143 @@ unsigned X86TargetLowering::preferedOpcodeForCmpEqPiecesOfOperand(
   return ISD::SRL;
 }
 
+// Collect dependings on V recursively. This is used for the cost analysis in
+// `keepJumpConditionsTogether`.
+static bool
+collectDeps(SmallPtrSet<const Instruction *, 8> *Deps, const Value *V,
+            SmallPtrSet<const Instruction *, 8> *Necessary = nullptr,
+            unsigned Depth = 0) {
+  // Return false if we have an incomplete count.
+  if (Depth >= 6)
----------------
RKSimon wrote:

Use SelectionDAG::MaxRecursionDepth

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


More information about the llvm-commits mailing list