[llvm] [SDAG] Simplify divergence verification (PR #108182)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 03:20:20 PDT 2024


================
@@ -11713,7 +11714,10 @@ void SelectionDAG::CreateTopologicalOrder(std::vector<SDNode *> &Order) {
 }
 
 #ifndef NDEBUG
-void SelectionDAG::VerifyDAGDivergence() {
+void SelectionDAG::VerifyDAGDivergence(TargetTransformInfo *TTI) {
+  if (TTI && !TTI->hasBranchDivergence())
----------------
arsenm wrote:

I'm pretty sure it's impossible for TTI to be null. It should always be an available analysis, and the member is not declared for !NDEBUG 

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


More information about the llvm-commits mailing list