LLVM-SPIRV-Backend icon indicating copy to clipboard operation
LLVM-SPIRV-Backend copied to clipboard

LLVM ERROR: unable to translate instruction: call

Open iliya-diyachkov opened this issue 4 years ago • 1 comments

After 906a4a82cd400f420ee5cb728996eda30dea5d13 (#52) we have 7 compilation fails with "unable to translate instruction: call" on tests:

linkage-types.ll
layout.ll
llvm-intrinsics/instrprof.ll
llvm-intrinsics/constrained-comparison.ll
llvm-intrinsics/constrained-arithmetic.ll
llvm-intrinsics/constrained-convert.ll
transcoding/GlobalFunAnnotate.ll

and +4 after fixing "Broken function" issues (#57)

transcoding/annotate_attribute.ll
transcoding/spirv-private-array-initialization.ll
llvm-intrinsics/memcpy.align.ll
transcoding/spirv-private-array-initialization.ll

In transcoding/GlobalFunAnnotate.ll IRTranslator fails to convert llvm.spv.track.constant.a23i8.a23i8(...) to call due to a vector arg which "takes" more than one virtual reg (llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:2398). I think the similar reasons causes fails on other tests.

iliya-diyachkov avatar Nov 01 '21 22:11 iliya-diyachkov

After 8b0831dd91a46b3fea55c57a9b470363b0883b2c we have only 3 tests failed in this way:

llvm-intrinsics/constrained-comparison.ll
llvm-intrinsics/constrained-arithmetic.ll
llvm-intrinsics/constrained-convert.ll

It's due to missed support of string metadata in IRTranslator::translateCall (IRTranslator.cpp) and no standard support of some experimental_constrained_* intrinsics that used in the tests.

iliya-diyachkov avatar Nov 24 '21 11:11 iliya-diyachkov