You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpAsmINTEL and OpAsmTargetINTEL instructions from SPV_INTEL_inline_assembly should be allowed in the same section as type declarations. This is currently not allowed in SPIRV-Tools which triggers an error during validation.
Reproducible example (using LLVM 19):
// foo.cvoidfoo (constfloat* restrict a, constfloat* restrict b, float* restrict c) {
__asm__ ("nop");
}
> clang -S -emit-llvm foo.c -o foo.ll
> llc -O3 -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_INTEL_inline_assembly foo.ll -o foo.spt
> spirv-as foo.spt -o foo.spv
> spirv-val foo.spv
error: line 24: AsmTargetINTEL must appear in a block
%12 = OpAsmTargetINTEL "spirv64-unknown-unknown"
Note that the spirv-as line works only with fixed headers.
When trying to link the module containing inline assembly, spirv-link complains with a similar error:
> spirv-link foo.spv foo.spv -o foo_linked.spv
error: 0: Unhandled inst type (opcode: 5609) found outside functiondefinition.
error: 0: Failed to build module 1 out of 1.
OpAsmINTEL
andOpAsmTargetINTEL
instructions fromSPV_INTEL_inline_assembly
should be allowed in the same section as type declarations. This is currently not allowed in SPIRV-Tools which triggers an error during validation.Reproducible example (using LLVM 19):
Note that the
spirv-as
line works only with fixed headers.When trying to link the module containing inline assembly,
spirv-link
complains with a similar error:@mmerecki FYI
The text was updated successfully, but these errors were encountered: