[Mlir-commits] [mlir] [mlir][linalg] Bugfix for	`InlineScalarOperands` (PR #111534)
    Longsheng Mou 
    llvmlistbot at llvm.org
       
    Sat Oct 12 19:22:42 PDT 2024
    
    
  
================
@@ -78,9 +78,11 @@ struct InlineScalarOperands : public OpRewritePattern<GenericOp> {
       for (auto idx : indices)
         indicesValues.emplace_back(
             rewriter.create<arith::ConstantIndexOp>(loc, idx));
-      Value extractedValue = rewriter.create<tensor::ExtractOp>(
-          loc, opOperand->get(), indicesValues);
-      body->getArgument(idx).replaceAllUsesWith(extractedValue);
+      Value scalarValue = opOperand->get();
+      if (isa<RankedTensorType>(scalarValue.getType()))
----------------
CoTinker wrote:
Done
https://github.com/llvm/llvm-project/pull/111534
    
    
More information about the Mlir-commits
mailing list