Open pmatos opened 1 year ago
This looks like some regression. The test used to pass at commit 0e8a8c85f8765c086c573f36e60c895920381e18. @pmatos Did you notice since which commit the test started failing? I am wondering if this is related to any change in the SPIR-V backend or something else.
This looks like some regression. The test used to pass at commit 0e8a8c8. @pmatos Did you notice since which commit the test started failing? I am wondering if this is related to any change in the SPIR-V backend or something else.
Unfortunately it fails since the initial commit. I think the difference might be in compiling with debug and expensive checks?
I have a fix for this but still had no time for testing it.
Currently the test
llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_arbitrary_precision_integers.ll
is failing. Backtrace looks like:Reproduce with test.ll as:
Command line is:
bin/llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_INTEL_arbitrary_precision_integers test.ll --print-before-all -o - -debug
I did some investigation on this and failure comes from the SPIRVPreLegalizer.cpp. Instruction is
%5:anyid(s6) = G_CONSTANT i6 2
, which is valid due toSPV_INTEL_arbitrary_precision_integers
, however we enterprocessInstrsWithTypeFolding
which callsprocessInstr
for that specific instruction and exchanges the assigned register so that the instructions ends up as%6:id(s32) = G_CONSTANT i6 2
. However this fails the machine verifier because the source value is i6 and the destination is s32.I tried to grok the code but I am unsure what's going on here or even what the purpose of this code is. Since you (@iliya-diyachkov) developed the initial code, can you take a look at this? Otherwise, if you let me know what's going on I can try to come up with a fix.