[Mlir-commits] [mlir] [mlir] Always update ExtractValue to use last container in insert chain (PR #176588)
Tobias Gysi
llvmlistbot at llvm.org
Sun Jan 18 23:38:32 PST 2026
================
@@ -1928,11 +1928,20 @@ OpFoldResult LLVM::ExtractValueOp::fold(FoldAdaptor adaptor) {
return getResult();
}
- Operation *container = getContainer().getDefiningOp();
- OpFoldResult result = {};
+ Attribute containerAttr;
+ if (matchPattern(getContainer(), m_Constant(&containerAttr))) {
----------------
gysit wrote:
Ah I didn't think about this case. I don't care in the end. I usually think in terms of the cost and walking the chain has basically no cost in the cases one of the first to simplifications apply. So doing it before makes more sense to me. However, this is a detail and it may not be relevant if we somehow manage to move this work to the canoncialization patterns.
https://github.com/llvm/llvm-project/pull/176588
More information about the Mlir-commits
mailing list