[llvm] [X86][GlobalISel] - Legalize And Select of G_FPTOSI/G_SITOFP in X87 mode (PR #137377)
Evgenii Kudriashov via llvm-commits
llvm-commits at lists.llvm.org
Wed May 21 17:05:26 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)); }];
----------------
e-kud wrote:
Hi @arsenm, I don't get the idea. Do you suggest to specify the type of `$val` and get rid of predicate for both SDAG and GISEL? I've tried to find examples of `PatFrag` using its memory fields but was unsuccessful.
Otherwise GlobalISel will always try to find its own version of predicate regardless of SDAG implementation.
https://github.com/llvm/llvm-project/pull/137377
More information about the llvm-commits
mailing list