[llvm] [AMDGPU] Add custom lowering of llvm.convert.from.arbitrary.fp for FP8 (PR #194144)

Dmitry Sidorov via llvm-commits llvm-commits at lists.llvm.org
Sun May 3 14:36:36 PDT 2026


================
@@ -911,6 +911,15 @@ def RtzRoundMode : TImmLeaf<i32, [{
   return Imm == (int)RoundingMode::TowardZero;
 }]>;
 
+// llvm.convert.from.arbitrary.fp format-selector predicates.
+// Only OCP formats are matched here; FNUZ formats use the generic expansion.
+def fp8_sem : TImmLeaf<i32, [{
----------------
MrSidims wrote:

Applied, though like this it will have a bigger blast radius (see changed in llvm/test/TableGen/GlobalISelEmitter/GlobalISelEmitter.td) with I wanted to avoid. But on the other hand it's less code to modify in the future.

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


More information about the llvm-commits mailing list