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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri May 1 05:39:47 PDT 2026


================
@@ -726,6 +726,15 @@ foreach Index = [1, 2, 3] in {
 }
 } // End OtherPredicates = [HasSDWA]
 
+// llvm.convert.from.arbitrary.fp i8 -> f32 scalar patterns.
+let OtherPredicates = [NotHasCvtFP8VOP1Bug, HasSDWA] in {
+  // gfx950 has OCP fp8 hardware with SDWA available.
+  def : GCNPat<(f32 (convert_from_arbitrary_fp i32:$src, (i32 fp8_sem))),
----------------
arsenm wrote:

This shouldn't require specifying the i32 for the magic constant 

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


More information about the llvm-commits mailing list