Skip to content
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

[AIE2P] Fix combine G_SHUFFLE_VEC to G_AIE_VSEL for <64xs8> #338

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

katerynamuts
Copy link
Collaborator

The PR fixes the combine of G_SHUFFLE_VEC to G_AIE_VSEL for <64xs8> type because in this case during instruction selection G_AIE_VSEL is selected into VSEL_8 with a 2xs32 mask.

; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<64 x s8>) = COPY $x2
; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<64 x s8>) = G_IMPLICIT_DEF
; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<2 x s32>) = G_BITCAST [[C]](s64)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we avoid this bitcast by changing the selection pattern to use i64 for the mask instead of v2i32 now that i64 has been made legal for eL register class?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we make v64i1 legal for eL as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@khallouh good point! Done

; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<64 x s8>) = COPY $x2
; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<64 x s8>) = G_IMPLICIT_DEF
; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<2 x s32>) = G_BITCAST [[C]](s64)
Copy link
Collaborator

@martien-de-jong martien-de-jong Feb 6, 2025

Choose a reason for hiding this comment

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

We can't build it as a 2 x s32 literal? (I would hope 64 x s1, but let's do small steps. )

Copy link
Collaborator

@martien-de-jong martien-de-jong left a comment

Choose a reason for hiding this comment

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

Looks good enough to me. Just a philosophical question.

Copy link
Collaborator

@khallouh khallouh left a comment

Choose a reason for hiding this comment

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

LGTM

@katerynamuts katerynamuts enabled auto-merge (rebase) February 6, 2025 14:27
@katerynamuts katerynamuts merged commit f380c8f into aie-public Feb 6, 2025
8 checks passed
@katerynamuts katerynamuts deleted the kmuts.vsel-64-s8 branch February 7, 2025 08:27
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.

3 participants