[llvm] [X86][GlobalISel] - Legalize And Select of G_FPTOSI/G_SITOFP in X87 mode (PR #137377)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed May 14 12:26:38 PDT 2025


================
@@ -871,21 +871,21 @@ def X86fp_to_i16mem : PatFrag<(ops node:$val, node:$ptr),
                               (X86fp_to_mem node:$val, node:$ptr), [{
   return cast<MemIntrinsicSDNode>(N)->getMemoryVT() == MVT::i16;
 }]> {
-  let GISelPredicateCode = [{ return checkMemoryOpSize(MI, 2); }];
+  let GISelPredicateCode = [{ return checkMemoryOpSize(MI, LLT::scalar(16)); }];
----------------
arsenm wrote:

You shouldn't need a custom code predicate for this. There is already a MemoryVT and ScalarMemoryVT field on PatFrag 

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


More information about the llvm-commits mailing list