Depends On D99153
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| mlir/lib/Dialect/Shape/IR/Shape.cpp | ||
|---|---|---|
| 286 | Thanks! | |
Looks good now. I can't comment on whether there should be a more general pass to do this kind of transform (IfOp has the same issue), though.
| mlir/lib/Dialect/Shape/IR/Shape.cpp | ||
|---|---|---|
| 273 | Here is a counter example: %w = cstr_eq(%shp0, %shp1)
%res = shape.assuming %w {
%bcast = shape.broadcast(%shp0, %shp1)
shape.yield %bcast
}With the knowledge of %w being true, we can simplify the broadcast to %shp0 for example. Applying this canonicalization then would erase the fact that this is conditional on %w. As constraints are not side-effecting (on purpose), we would remove the constraint. | |
Mind adding a comment on what this pattern does?