-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[X86][GISEL] - Legalize G_FPTOUI & G_UITOFP for X87 #155562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| ; GISEL-X64-NEXT: andq $1, %rax | ||
| ; GISEL-X64-NEXT: xorps %xmm2, %xmm2 | ||
| ; GISEL-X64-NEXT: cvtsi2ss %rax, %xmm2 | ||
| ; GISEL-X64-NEXT: mulss %xmm1, %xmm2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Legalizer rules need fixing.
| ; 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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
| .legalIf([=](const LegalityQuery &Query) { | ||
| return HasAVX512 && typeInSet(0, {s32, s64})(Query) && | ||
| typeInSet(1, {s32, s64})(Query); | ||
| }) |
There was a problem hiding this comment.
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.
No description provided.