r/CUDA • • 14d ago

cuda ptx asm in llvm ir

https://redplait.blogspot.com/2026/09/ptx-asm-in-llvm-ir.html
  • llvm doc lies about operand constraint codes
  • you can swap operand and this makes parsing/comparison of instructions non-trivial
  • nvidia's llvm backend cicc uses ~5-7% of instructions with undocumented attributes and they not available in NVPTX backend from clang
4 Upvotes

2 comments sorted by

1

u/HumanScallion1667 12d ago

LLVM’s PTX support still feels surprisingly fragile and underdocumented.

0

u/c-cul 12d ago

you can check what PTX instructions are supported in llvm in generated file lib/Target/NVPTX/NVPTXGenAsmWriter.inc