[PATCH] D153261: [AMDGPU] Verify dom tree only when -verify-dom-info is passed.

Pravin Jagtap via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 20 04:04:52 PDT 2023


pravinjagtap updated this revision to Diff 532860.
pravinjagtap added a comment.

Removed the asserts and added dom-tree verification test


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153261/new/

https://reviews.llvm.org/D153261

Files:
  llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
  llvm/test/CodeGen/AMDGPU/global_atomics_iterative_scan.ll


Index: llvm/test/CodeGen/AMDGPU/global_atomics_iterative_scan.ll
===================================================================
--- llvm/test/CodeGen/AMDGPU/global_atomics_iterative_scan.ll
+++ llvm/test/CodeGen/AMDGPU/global_atomics_iterative_scan.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN:  opt -S -mtriple=amdgcn-- -amdgpu-atomic-optimizer-strategy=Iterative -passes=amdgpu-atomic-optimizer %s | FileCheck -check-prefix=IR %s
+; RUN:  opt -S -mtriple=amdgcn-- -amdgpu-atomic-optimizer-strategy=Iterative -passes='amdgpu-atomic-optimizer,verify<domtree>' %s | FileCheck -check-prefix=IR %s
 
 define amdgpu_kernel void @uniform_value(ptr addrspace(1) , ptr addrspace(1) %val) #0 {
 ; IR-LABEL: @uniform_value(
Index: llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
@@ -770,9 +770,6 @@
   Instruction *const SingleLaneTerminator =
       SplitBlockAndInsertIfThen(Cond, &I, false, nullptr, &DTU, nullptr);
 
-  // Control flow is changed here after splitting I's block
-  assert(DTU.getDomTree().verify(DominatorTree::VerificationLevel::Full));
-
   // At this point, we have split the I's block to allow one lane in wavefront
   // to update the precomputed reduced value. Also, completed the codegen for
   // new control flow i.e. iterative loop which perform reduction and scan using
@@ -799,7 +796,6 @@
         {{DominatorTree::Insert, EntryBB, ComputeLoop},
          {DominatorTree::Insert, ComputeLoop, ComputeEnd},
          {DominatorTree::Delete, EntryBB, SingleLaneTerminator->getParent()}});
-    assert(DTU.getDomTree().verify(DominatorTree::VerificationLevel::Full));
 
     Predecessor = ComputeEnd;
   } else {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153261.532860.patch
Type: text/x-patch
Size: 1869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230620/768dbe2c/attachment.bin>


More information about the llvm-commits mailing list