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

[CIR][CIRGen] Generate CIR for neon_vget and neon_vdup lane intrinsics #884

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

ghehg
Copy link
Collaborator

@ghehg ghehg commented Sep 25, 2024

as title.
This PR has simliar test case organization as to PR882
Notice that comparing to OG, this PR combines cases for some pairs of intrinsics such as
BI__builtin_neon_vget_lane_f32 and BI__builtin_neon_vdups_lane_f32.
They have the same code generated in OG and CIRGen
OG separate them into different case handling because it passes mnemonics which are different. CIRGen doesn't pass that so why not combine them.

// CIR: [[IDX:%.*]] = cir.const #cir.int<15> : !s32i
// CIR: {{%.*}} = cir.vec.extract {{%.*}}[[[IDX]] : !s32i] : !cir.vector<!u8i x 16>

// LLVM: define dso_local i8 @test_vdupb_laneq_s8(<16 x i8> [[ARG:%.*]])
Copy link
Member

Choose a reason for hiding this comment

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

For new rounds, might be a good idea to use LLVM-LABEL or remove the extra details (like dso_local), just so that if more of those unrelated things get added it won't require us to change these tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, I added the full check simply because I want to have [[ARG:%.*]] so I know intrinsic argument is from the function argument. But maybe there is another way to achieve it.

Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

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

LGTM

@bcardosolopes bcardosolopes merged commit 37aafef into llvm:main Sep 25, 2024
7 checks passed
Hugobros3 pushed a commit to shady-gang/clangir that referenced this pull request Oct 2, 2024
llvm#884)

as title. 
This PR has simliar test case organization as to
[PR882](llvm#882)
Notice that comparing to OG, this PR combines cases for some pairs of
intrinsics such as
BI__builtin_neon_vget_lane_f32 and BI__builtin_neon_vdups_lane_f32. 
They have the same code generated in OG and CIRGen
OG separate them into different case handling because it passes
mnemonics which are different. CIRGen doesn't pass that so why not
combine them.

Co-authored-by: Guojin He <guojinhe@meta.com>
smeenai pushed a commit to smeenai/clangir that referenced this pull request Oct 9, 2024
llvm#884)

as title. 
This PR has simliar test case organization as to
[PR882](llvm#882)
Notice that comparing to OG, this PR combines cases for some pairs of
intrinsics such as
BI__builtin_neon_vget_lane_f32 and BI__builtin_neon_vdups_lane_f32. 
They have the same code generated in OG and CIRGen
OG separate them into different case handling because it passes
mnemonics which are different. CIRGen doesn't pass that so why not
combine them.

Co-authored-by: Guojin He <guojinhe@meta.com>
smeenai pushed a commit to smeenai/clangir that referenced this pull request Oct 9, 2024
llvm#884)

as title. 
This PR has simliar test case organization as to
[PR882](llvm#882)
Notice that comparing to OG, this PR combines cases for some pairs of
intrinsics such as
BI__builtin_neon_vget_lane_f32 and BI__builtin_neon_vdups_lane_f32. 
They have the same code generated in OG and CIRGen
OG separate them into different case handling because it passes
mnemonics which are different. CIRGen doesn't pass that so why not
combine them.

Co-authored-by: Guojin He <guojinhe@meta.com>
smeenai pushed a commit to smeenai/clangir that referenced this pull request Oct 9, 2024
llvm#884)

as title. 
This PR has simliar test case organization as to
[PR882](llvm#882)
Notice that comparing to OG, this PR combines cases for some pairs of
intrinsics such as
BI__builtin_neon_vget_lane_f32 and BI__builtin_neon_vdups_lane_f32. 
They have the same code generated in OG and CIRGen
OG separate them into different case handling because it passes
mnemonics which are different. CIRGen doesn't pass that so why not
combine them.

Co-authored-by: Guojin He <guojinhe@meta.com>
keryell pushed a commit to keryell/clangir that referenced this pull request Oct 19, 2024
llvm#884)

as title. 
This PR has simliar test case organization as to
[PR882](llvm#882)
Notice that comparing to OG, this PR combines cases for some pairs of
intrinsics such as
BI__builtin_neon_vget_lane_f32 and BI__builtin_neon_vdups_lane_f32. 
They have the same code generated in OG and CIRGen
OG separate them into different case handling because it passes
mnemonics which are different. CIRGen doesn't pass that so why not
combine them.

Co-authored-by: Guojin He <guojinhe@meta.com>
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