[Mlir-commits] [mlir] [MLIR][LLVM] Fold extract of extract (PR	#125980)
    Ivan R. Ivanov 
    llvmlistbot at llvm.org
       
    Wed Feb  5 18:19:08 PST 2025
    
    
  
================
@@ -1898,6 +1898,13 @@ static Type getInsertExtractValueElementType(Type llvmType,
 }
 
 OpFoldResult LLVM::ExtractValueOp::fold(FoldAdaptor adaptor) {
+  if (auto extractValueOp = getContainer().getDefiningOp<ExtractValueOp>()) {
+    SmallVector<int64_t, 1> newPos(extractValueOp.getPosition());
----------------
ivanradanov wrote:
```suggestion
    SmallVector<int64_t, 4> newPos(extractValueOp.getPosition());
```
https://github.com/llvm/llvm-project/pull/125980
    
    
More information about the Mlir-commits
mailing list