The patch adds two intrinsics: llvm.convert.to.arbitrary.fp and llvm.convert.from.arbitrary.fp. The intrinsics perform conversions between values whose interpretation differs from their representation in LLVM IR. The intrinsics are overloaded on both its return type and first argument. Metadata operands describe how the raw bits should be interpreted before and after the conversion. Typical use case is to convert IEEE-754 floating point types to FP8/FP4 and backwards for ML applications. Addresses https://discourse.llvm.org/t/rfc-spir-v-way-to-represent-float8-in-llvm-ir/87758/10
This directory contains testcases that the verifier is supposed to detect as malformed LLVM code. Testcases for situations that the verifier incorrectly identifies as malformed should go in the test/Assembler directory.