[llvm] [X86][GlobalISel] - Legalize And Select of G_FPTOSI/G_SITOFP in X87 mode (PR #137377)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue May 13 05:04:55 PDT 2025
================
@@ -491,46 +491,38 @@ X86LegalizerInfo::X86LegalizerInfo(const X86Subtarget &STI,
});
getActionDefinitionsBuilder(G_SITOFP)
- .legalIf([=](const LegalityQuery &Query) {
- return (HasSSE1 &&
- (typePairInSet(0, 1, {{s32, s32}})(Query) ||
- (Is64Bit && typePairInSet(0, 1, {{s32, s64}})(Query)))) ||
- (HasSSE2 &&
- (typePairInSet(0, 1, {{s64, s32}})(Query) ||
- (Is64Bit && typePairInSet(0, 1, {{s64, s64}})(Query))));
- })
- .customIf([=](const LegalityQuery &Query) -> bool {
- if (!UseX87)
- return false;
- if ((typeIs(0, s32)(Query) && HasSSE1) ||
- (typeIs(0, s64)(Query) && HasSSE2))
- return false;
- return typeInSet(0, {s32, s64, s80})(Query) &&
- typeInSet(1, {s16, s32, s64})(Query);
- })
+ .legalFor(HasSSE1, {s32, s32})
----------------
RKSimon wrote:
Should this be: `.legalFor(HasSSE1, {{s32, s32}})` for the dst/src pair?
https://github.com/llvm/llvm-project/pull/137377
More information about the llvm-commits
mailing list