[Mlir-commits] [mlir] [MLIR] Added check for IsTerminator trait (PR	#79317)
    Dmitriy Smirnov 
    llvmlistbot at llvm.org
       
    Wed Jan 24 09:34:30 PST 2024
    
    
  
================
@@ -598,6 +598,10 @@ void RemoveDeadValues::runOnOperation() {
       // Nothing to do because this terminator is associated with either a
       // function op or a region branch op and gets cleaned when these ops are
       // cleaned.
+    } else if (op->hasTrait<::mlir::OpTrait::IsTerminator>()) {
+      // Nothing to do because this terminator is associated with either a
----------------
d-smirnov wrote:
Before the patch gpu.terminator was just removed by cleanSimpleOp method producing invalid IR
https://github.com/llvm/llvm-project/pull/79317
    
    
More information about the Mlir-commits
mailing list