[Mlir-commits] [mlir] [mlir][docs] Add poison example to canonicalization section (PR #192782)
Renato Golin
llvmlistbot at llvm.org
Sat Apr 18 14:32:53 PDT 2026
================
@@ -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`.
----------------
rengolin wrote:
do you mean `%c2` as `arith.constant 0`?
At least two cases here:
* `div x, 0` -> `poison`
* `op poison, ...` -> `poison`
https://github.com/llvm/llvm-project/pull/192782
More information about the Mlir-commits
mailing list