[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 12:59:21 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:

Wouldn't it make more sense to keep this where it was to fold immediately to a constant?

https://github.com/llvm/llvm-project/pull/176588


More information about the Mlir-commits mailing list