Skip to content

Conversation

@pawan-nirpal-031
Copy link
Contributor

No description provided.

; GISEL-X64-NEXT: andq $1, %rax
; GISEL-X64-NEXT: xorps %xmm2, %xmm2
; GISEL-X64-NEXT: cvtsi2ss %rax, %xmm2
; GISEL-X64-NEXT: mulss %xmm1, %xmm2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legalizer rules need fixing.

@pawan-nirpal-031 pawan-nirpal-031 changed the title [X86][GISEL] - Legalize G_FPTOUI for X87 [X86][GISEL] - Legalize G_FPTOUI & G_UITOFP for X87 Sep 1, 2025
@pawan-nirpal-031
Copy link
Contributor Author

@e-kud Thanks for #157377, I take x87 cmov is done here. I will revise our arithmetic workaround to use this.

Comment on lines +2 to +3
; RUN: llc < %s -mtriple=x86_64-- -mattr=+x87,-sse,-sse2 -global-isel=0 | FileCheck %s --check-prefixes X64,SDAG-X64
; RUN: llc < %s -mtriple=x86_64-- -mattr=+x87,-sse,-sse2 -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes X64,GISEL-X64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's about FastISel?

(Is64Bit && typeIs(0, s64)(Query));
})
.clampScalar(0, s32, sMaxScalar)
.clampScalar(0, s16, sMaxScalar)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe clamp to s16 only if no SSE available?

Comment on lines +509 to +512
.legalIf([=](const LegalityQuery &Query) {
return HasAVX512 && typeInSet(0, {s32, s64})(Query) &&
typeInSet(1, {s32, s64})(Query);
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is the part of code before refactoring legalizer to legalFor usage. We should be fine with existing legalFor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants