Skip to content

[SYCL][ESIMD] Add unary and shift operators #3014

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

Merged
merged 1 commit into from
Jan 13, 2021

Conversation

cmc-rep
Copy link
Contributor

@cmc-rep cmc-rep commented Jan 11, 2021

Signed-off-by: Gang Y Chen [email protected]

@cmc-rep cmc-rep requested a review from kbobrovs as a code owner January 11, 2021 16:54
@bader bader changed the title [SYCL][ESIMD] - unary and shift operators [SYCL][ESIMD] Add unary and shift operators Jan 11, 2021
@cmc-rep cmc-rep requested a review from kychendev January 11, 2021 17:01
@cmc-rep
Copy link
Contributor Author

cmc-rep commented Jan 11, 2021

@kbobrovs Please review

@cmc-rep
Copy link
Contributor Author

cmc-rep commented Jan 11, 2021

@kychendev please review

DEF_BITWISE_OP(&, &=)
DEF_BITWISE_OP(|, |=)
DEF_BITWISE_OP(^, ^=)
DEF_BITWISE_OP(<<, <<=)
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good. I assume the underlying Clang vector operator will take care of integer promotion as expected.

Looks like the support for % and %= are still missing - could be added to the end of DEF_BINOP list @line 210.

@@ -73,6 +73,16 @@ bool test_simd_bin_ops() __attribute__((sycl_device)) {
return v0[0] == 1;
}

bool test_simd_unary_ops() __attribute__((sycl_device)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

These tests are compile-only. Please create executable test as well in llvm-test-suite. Otherwise looks good to me.

@cmc-rep
Copy link
Contributor Author

cmc-rep commented Jan 13, 2021

@kbobrovs , please help me merge this PR. Thx

@kbobrovs kbobrovs merged commit e7bcb57 into intel:sycl Jan 13, 2021
@cmc-rep cmc-rep deleted the cmc-rep-change branch January 13, 2021 16:23
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