Skip to content

[MLIR] [Vector] Error when canonicalizing vector.scatter with tensor output #168695

@sakupan102

Description

@sakupan102

I tried to compile the code below with mlir-opt sample.mlir --pass-pipeline="builtin.module(func.func(canonicalize))"

func.func @scatter_tensor(%base: tensor<16xf32>, %mask: vector<16xi1>, %value: vector<16xf32>) -> tensor<16xf32> {
  %c0 = arith.constant 0 : index
  %index = vector.step : vector<16xindex>
  %0 = vector.scatter %base[%c0] [%index], %mask, %value
      : tensor<16xf32>, vector<16xindex>, vector<16xi1>, vector<16xf32> -> tensor<16xf32>
  return %0 : tensor<16xf32>
}

output

Assertion failed: (op->getNumResults() == newOp->getNumResults() && "ops have different number of results"), function replaceOp, file PatternMatch.cpp, line 144.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.

Version

915e9ad

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions