This enabled more optimization opportunities by moving
zero/sign-extension closer to the use.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Arith/Transforms/IntNarrowing.cpp | ||
---|---|---|
297 | Worth to put some comments here to explain what this is for and why we require it > inserted/dest bitwidth. Something like "Get the immediate destination/result type bitwidth for insert. It's the the intermediate bitwidth intercepting op chains involving extension ops; so we need to make sure it's larger than the required bitwidths needed to represent both the inserted value and the destination value." | |
mlir/test/Dialect/Arith/int-narrowing.mlir | ||
306 | This would actually fold with your https://reviews.llvm.org/D149286? |
Comment Actions
Add comments
mlir/test/Dialect/Arith/int-narrowing.mlir | ||
---|---|---|
306 | It won't fold after createOrFold but will disappear after canonicalization. |
Worth to put some comments here to explain what this is for and why we require it > inserted/dest bitwidth. Something like "Get the immediate destination/result type bitwidth for insert. It's the the intermediate bitwidth intercepting op chains involving extension ops; so we need to make sure it's larger than the required bitwidths needed to represent both the inserted value and the destination value."