[llvm] [UpdateTestChecks] Add support for SPIRV in update_llc_test_checks.py (PR #66213)

Paulo Matos via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 05:28:55 PDT 2023


pmatos wrote:

> How different would check_label_format have to be? Surely SPIRV has something similar that we can use?
> 

The assembly for the test I just committed looks like:

```
	OpCapability Kernel
	OpCapability Addresses
	OpCapability Linkage
	OpCapability OptNoneINTEL
	OpExtension "SPV_INTEL_optnone"
	%1 = OpExtInstImport "OpenCL.std"
	OpMemoryModel Physical32 OpenCL
	OpExecutionMode %4 ContractionOff
	OpSource Unknown 0
	OpName %4 "_Z3foov"
	OpDecorate %4 LinkageAttributes "_Z3foov" Export
	%2 = OpTypeVoid
	%3 = OpTypeFunction %2
                                        ; -- Begin function _Z3foov
	%4 = OpFunction %2 DontInline %3
	%5 = OpLabel
	OpReturn
	OpFunctionEnd
                                       ; -- End function
```

Besides the comment there's no obvious place where the function body starts and its name due to the structure of the SPIRV file.

> I always like to see at least one use of the update script when we add a new target - please can you regenerate a suitable file in CodeGen\SPIRV to show the generated checks?

Now updated the commit to include one of these.

https://github.com/llvm/llvm-project/pull/66213


More information about the llvm-commits mailing list