[Mlir-commits] [mlir] d4974df - [mlir][docs] Add poison example to canonicalization section (#192782)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Apr 19 02:51:56 PDT 2026


Author: Matthias Springer
Date: 2026-04-19T10:51:52+01:00
New Revision: d4974dfe67c9a322f3b9a913dbbaf4e4f4a58a08

URL: https://github.com/llvm/llvm-project/commit/d4974dfe67c9a322f3b9a913dbbaf4e4f4a58a08
DIFF: https://github.com/llvm/llvm-project/commit/d4974dfe67c9a322f3b9a913dbbaf4e4f4a58a08.diff

LOG: [mlir][docs] Add poison example to canonicalization section (#192782)

Mention that folding to `ub.poison` is a common canonicalization.

Added: 
    

Modified: 
    mlir/docs/Canonicalization.md

Removed: 
    


################################################################################
diff  --git a/mlir/docs/Canonicalization.md b/mlir/docs/Canonicalization.md
index 6f48e60c94962..6fbcf09c51df3 100644
--- a/mlir/docs/Canonicalization.md
+++ b/mlir/docs/Canonicalization.md
@@ -96,6 +96,8 @@ canonicalizations include:
   rewriting `tensor.insert_slice(%src, tensor.cast(%dst))` (where the cast
   converts from `tensor<5xf32>` to `tensor<?xf32>`) as
   `tensor.cast(tensor.insert_slice(%src, %dst))`.
+* Replacing poisoned results with `ub.poison`. E.g., replacing
+  `arith.divsi(%c5, %c2, exact)` with `ub.poison`.
 
 
 Note: Some canonicalizations do not apply when they would lead to IR size


        


More information about the Mlir-commits mailing list