[llvm] [AsmPrinter] Do not emit label instructions after the function body if the target is SPIR-V (PR #107013)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 02:06:42 PDT 2024


MaskRay wrote:

I am not familiar with SPIR-V but isn't this SPIR-V tooling issue? It's fairly common to have the following assembly construct

```
begin:
  begin_instruction
...
  end_instruction
end:
```

then you can use `end-begin` to get the size of the function. Defining a label just past the last byte of the body is normal. I understand that each target may have its own special properties but this one might break LLVM's assumption badly.

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


More information about the llvm-commits mailing list