llvm / llvm-project

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

[SPIR-V] LIT tests failing with LLVM_ENABLE_EXPENSIVE_CHECKS enabled #61084

Open michalpaszkowski opened 1 year ago

michalpaszkowski commented 1 year ago
Current issues: Issue Total failures First passes to fail Phabricator reviews/Pull Requests
Illegal virtual register for instruction 102 Post-RA pseudo instruction expansion pass, SPIRV pre legalizer D144897
Virtual register does not match instruction constraint 1190 SPIRV pre legalizer, IRTranslator D144897
store memory size cannot exceed value size 3 SPIRV pre legalizer  
inconsistent constant size 66 SPIRV pre legalizer  
bitcast must change the type 34 SPIRV pre legalizer  
Expected a register operand 28 SPIRV pre legalizer, IRTranslator  
Virtual register defs don’t dominate all uses 29 IRTranslator  
G_BUILD_VECTOR result element type must match source type 4 IRTranslator  
store memory size cannot exceed value size 6
MBB has duplicate entries in its successor list 11
MBB has duplicate entries in its predecessor list 43
MBB has duplicate entries in its predecessor list 43
bitcast must change the type 73
Generic truncate has destination type no smaller than source 2
Destination type must be a scalable vector 6
Found PHI instruction after non-PHI 2
pmatos commented 1 year ago

@michalpaszkowski I created an updated list of failures here: https://gist.github.com/pmatos/f9cfad16426cf18de3b03ae8af5c630f

I am thinking about taking on one of the failures. I have been working on other parts of LLVM but would like to look at the SPIR-V backend, so will look at it for the first time. If there's an 'better' one for a beginner to look at, feel free to let me know.

michalpaszkowski commented 1 year ago

@michalpaszkowski I created an updated list of failures here: https://gist.github.com/pmatos/f9cfad16426cf18de3b03ae8af5c630f

I am thinking about taking on one of the failures. I have been working on other parts of LLVM but would like to look at the SPIR-V backend, so will look at it for the first time. If there's an 'better' one for a beginner to look at, feel free to let me know.

@pmatos Great, thank you very much for the updated list! We welcome your contributions and would be very happy if you are able to help in any way! I believe these issues may give you a through understanding of the backend, but are not particularly simple to solve.

We also have a website with runtime testing results of the backend. Nearly all OpenCL conformance tests are passing, but I will be adding SYCL conformance tests to this website in the next month. There will be a rather large number of issues to fix.

Another area of work is adding support for SPIR-V extensions. Here is a draft pull request adding support for SPV_INTEL_arbitrary_precision_integers extension. The pull request will require a rebase after the currently ongoing changes to SPIRVModuleAnalysis, but you can base your work on the commit in this pull request if you would like to add new extensions. Here is a list of all extensions specs. We generally prefer to start with Khronos or Intel extensions first since we have a way to test these with a runtime and not just LIT tests.

pmatos commented 1 year ago

Perfect @michalpaszkowski . Thanks for the thorough answer. I will take a look and see where I can help. If you attend EuroLLVM in the coming week, it would be great to meet you there.