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

[SingleSource/Vectorizer] Add unit tests for AnyOf pattern. #195

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Mel-Chen
Copy link

@Mel-Chen Mel-Chen commented Jan 3, 2025

This patch adds runtime test case for vectorization of AnyOf reduction idiom:

int32_t Rdx = -1;
for (unsigned I = 0; I < TC; I++) {
  Rdx = A[I] > B[I] ? 3 : Rdx;
}
return Rdx;

Improving test coverage, and please refer the issue llvm/llvm-project#120405.

}
return Rdx;
);
checkVectorFunction<uint32_t, int32_t>(ScalarFn, VectorFn,
Copy link
Contributor

Choose a reason for hiding this comment

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

It would probably be good to also check with a smaller type (int8_t or int16_t ?) to trigger epilogue vectorization on more platforms?

Copy link
Author

Choose a reason for hiding this comment

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

37b1efc
Yes, I patched it, but only for IAnyOf.
Checking FAnyOf will require an fp type with a smaller size than float to be possible.

@Mel-Chen Mel-Chen requested a review from fhahn January 6, 2025 09:56
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