llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.83k stars 11.91k forks source link

[MLIR]SPIRVToLLVMPass failed to legalize operation 'spv.Constant' #60105

Open BealZephyr opened 1 year ago

BealZephyr commented 1 year ago

Test on commit: #939f5a33 Steps to reproduce:

mlir-opt -convert-spirv-to-llvm test.mlir

test case:

module {
 func.func @const() -> () {
  %8 = spv.Constant [dense<3.0> : vector<2xf32>] : !spv.array<1xvector<2xf32>>
  return
  }
}

error message:

/home/ty/test.mlir:3:8: error: failed to legalize operation 'spv.Constant' that was explicitly marked illegal
  %8 = spv.Constant [dense<3.0> : vector<2xf32>] : !spv.array<1xvector<2xf32>>
       ^
llvmbot commented 1 year ago

@llvm/issue-subscribers-mlir-spirv