[llvm-branch-commits] [llvm] [WebAssembly][GlobalISel] Implement saturating floating-point to int (PR #197259)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed May 13 05:28:33 PDT 2026


================
@@ -15,3 +15,16 @@
 
 include "WebAssembly.td"
 include "WebAssemblyCombine.td"
+
+//===----------------------------------------------------------------------===//
+// Miscallenous patterns
+//===----------------------------------------------------------------------===//
+
+def : Pat<(i32 (fp_to_sint_sat_gi F32:$src)), (I32_TRUNC_S_SAT_F32 F32:$src)>;
----------------
arsenm wrote:

The type profile of FP_TO_UINT_SAT should be the same either way, with a GINodeEquiv defining the relation. This is how every other node works, this one is not special 

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


More information about the llvm-branch-commits mailing list