-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
[X86] _mm_test_all_ones - repeated use of macro argument #60006
Closed
Labels
backend:X86
clang:headers
Headers provided by Clang, e.g. for intrinsics
release:backport
release:merged
Milestone
Comments
RKSimon
added
backend:X86
clang:headers
Headers provided by Clang, e.g. for intrinsics
labels
Jan 13, 2023
@llvm/issue-subscribers-backend-x86 |
Agreed. This is indeed a problem. Maybe change it to function? |
Either that or define it as: #define _mm_test_all_ones(val) _mm_testc_si128((val), _mm_set1_epi32(-1)) |
Candidate Patch: https://reviews.llvm.org/D142477 |
/cherry-pick c9b2823 |
/branch llvm/llvm-project-release-prs/issue60006 |
/pull-request llvm/llvm-project-release-prs#231 |
tru
pushed a commit
that referenced
this issue
Jan 27, 2023
…0006) The macro _mm_test_all_ones(V) was defined as _mm_testc_si128((V), _mm_cmpeq_epi32((V), (V))) - which could cause side effects depending on the source of the V value. The _mm_cmpeq_epi32((V), (V)) trick was just to materialize an all-ones value, which can be more safely generated with _mm_set1_epi32(-1) . Fixes #60006 Differential Revision: https://reviews.llvm.org/D142477 (cherry picked from commit c9b2823)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backend:X86
clang:headers
Headers provided by Clang, e.g. for intrinsics
release:backport
release:merged
val
may be re-evaluated due to its additional usesThe text was updated successfully, but these errors were encountered: