[Mlir-commits] [mlir] [mlir][Vector] Fold `vector.extract` from	poison vector (PR #126122)
    Andrzej WarzyĆski 
    llvmlistbot at llvm.org
       
    Fri Feb  7 08:21:10 PST 2025
    
    
  
================
@@ -132,6 +132,28 @@ func.func @extract_from_create_mask_dynamic_position(%dim0: index, %index: index
 
 // -----
 
+// CHECK-LABEL: @extract_scalar_poison
+func.func @extract_scalar_poison() -> f32 {
+  // CHECK-NEXT: ub.poison : f32
+  //  CHECK-NOT: vector.extract
----------------
banach-space wrote:
I find `CHECK-NOT` very helpful (in terms of testing and documenting). This can be re-written as:
```suggestion
  //  CHECK-NOT: vector.extract
  // CHECK-NEXT: %[[RET:.*]] = ub.poison : f32
  // CHECK-NEXT return [[RET]]
```
https://github.com/llvm/llvm-project/pull/126122
    
    
More information about the Mlir-commits
mailing list