[X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow SSE/AVX COMI/UCOMI/CMPS/CMPP fp comparison intrinsics to be used in constexpr
The float/double/half scalar / vector comparison intrinsics can all be handled in constant expressions, accounting for special handling of NAN inputs.
_mm_comieq_ss _mm_comieq_sd _mm_comieq_sh
_mm_comige_ss _mm_comige_sd _mm_comige_sh
_mm_comigt_ss _mm_comigt_sd _mm_comigt_sh
_mm_comile_ss _mm_comile_sd _mm_comile_sh
_mm_comilt_ss _mm_comilt_sd _mm_comilt_sh
_mm_comineq_ss _mm_comineq_sd _mm_comineq_sh
_mm_ucomieq_ss _mm_ucomieq_sd _mm_ucomieq_sh
_mm_ucomige_ss _mm_ucomige_sd _mm_ucomige_sh
_mm_ucomigt_ss _mm_ucomigt_sd _mm_ucomigt_sh
_mm_ucomile_ss _mm_ucomile_sd _mm_ucomile_sh
_mm_ucomilt_ss _mm_ucomilt_sd _mm_ucomilt_sh
_mm_ucomineq_ss _mm_ucomineq_sd _mm_ucomineq_sh
_mm_comi_sh
_mm_cmpeq_ss _mm_cmpeq_sd _mm_cmpeq_ps _mm_cmpeq_pd
_mm_cmpge_ss _mm_cmpge_sd _mm_cmpge_ps _mm_cmpge_pd
_mm_cmpgt_ss _mm_cmpgt_sd _mm_cmpgt_ps _mm_cmpgt_pd
_mm_cmple_ss _mm_cmple_sd _mm_cmple_ps _mm_cmple_pd
_mm_cmplt_ss _mm_cmplt_sd _mm_cmplt_ps _mm_cmplt_pd
_mm_cmpneq_ss _mm_cmpneq_sd _mm_cmpneq_ps _mm_cmpneq_pd
_mm_cmpnge_ss _mm_cmpnge_sd _mm_cmpnge_ps _mm_cmpnge_pd
_mm_cmpngt_ss _mm_cmpngt_sd _mm_cmpngt_ps _mm_cmpngt_pd
_mm_cmpnle_ss _mm_cmpnle_sd _mm_cmpnle_ps _mm_cmpnle_pd
_mm_cmpnlt_ss _mm_cmpnlt_sd _mm_cmpnlt_ps _mm_cmpnlt_pd
_mm_cmpord_ss _mm_cmpord_sd _mm_cmpord_ps _mm_cmpord_pd
_mm_cmpunord_ss _mm_cmpunord_sd _mm_cmpunord_ps _mm_cmpunord_pd
_mm_cmp_ss _mm_cmp_sd
_mm_cmp_ps _mm256_cmp_ps
_mm_cmp_pd _mm256_cmp_pd
@llvm/issue-subscribers-backend-x86
Author: Simon Pilgrim (RKSimon)
_mm_cmpeq_ss _mm_cmpeq_sd _mm_cmpeq_ps _mm_cmpeq_pd _mm_cmpge_ss _mm_cmpge_sd _mm_cmpge_ps _mm_cmpge_pd _mm_cmpgt_ss _mm_cmpgt_sd _mm_cmpgt_ps _mm_cmpgt_pd _mm_cmple_ss _mm_cmple_sd _mm_cmple_ps _mm_cmple_pd _mm_cmplt_ss _mm_cmplt_sd _mm_cmplt_ps _mm_cmplt_pd _mm_cmpneq_ss _mm_cmpneq_sd _mm_cmpneq_ps _mm_cmpneq_pd _mm_cmpnge_ss _mm_cmpnge_sd _mm_cmpnge_ps _mm_cmpnge_pd _mm_cmpngt_ss _mm_cmpngt_sd _mm_cmpngt_ps _mm_cmpngt_pd _mm_cmpnle_ss _mm_cmpnle_sd _mm_cmpnle_ps _mm_cmpnle_pd _mm_cmpnlt_ss _mm_cmpnlt_sd _mm_cmpnlt_ps _mm_cmpnlt_pd _mm_cmpord_ss _mm_cmpord_sd _mm_cmpord_ps _mm_cmpord_pd _mm_cmpunord_ss _mm_cmpunord_sd _mm_cmpunord_ps _mm_cmpunord_pd
_mm_cmp_ss _mm_cmp_sd _mm_cmp_ps _mm256_cmp_ps _mm_cmp_pd _mm256_cmp_pd
</details>
Hi!
This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
- Check that no other contributor is working on this issue. If someone is assigned to the issue or claimed to be working on it, ping the person. After one week without a response, the assignee may be changed.
- Leave a comment indicating that you are working on the issue, or just create a pull request after following the steps below. Mention this issue in the description of the pull request.
- Fix the issue locally.
- Run the test suite locally. Remember that the subdirectories under
test/create fine-grained testing targets, so you can e.g. usemake check-clang-astto only run Clang's AST tests. - Create a Git commit.
- Run
git clang-format HEAD~1to format your changes. - Open a pull request to the upstream repository on GitHub. Detailed instructions can be found in GitHub's documentation. Mention this issue in the description of the pull request.
If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below.
@llvm/issue-subscribers-good-first-issue
Author: Simon Pilgrim (RKSimon)
_mm_cmpeq_ss _mm_cmpeq_sd _mm_cmpeq_ps _mm_cmpeq_pd _mm_cmpge_ss _mm_cmpge_sd _mm_cmpge_ps _mm_cmpge_pd _mm_cmpgt_ss _mm_cmpgt_sd _mm_cmpgt_ps _mm_cmpgt_pd _mm_cmple_ss _mm_cmple_sd _mm_cmple_ps _mm_cmple_pd _mm_cmplt_ss _mm_cmplt_sd _mm_cmplt_ps _mm_cmplt_pd _mm_cmpneq_ss _mm_cmpneq_sd _mm_cmpneq_ps _mm_cmpneq_pd _mm_cmpnge_ss _mm_cmpnge_sd _mm_cmpnge_ps _mm_cmpnge_pd _mm_cmpngt_ss _mm_cmpngt_sd _mm_cmpngt_ps _mm_cmpngt_pd _mm_cmpnle_ss _mm_cmpnle_sd _mm_cmpnle_ps _mm_cmpnle_pd _mm_cmpnlt_ss _mm_cmpnlt_sd _mm_cmpnlt_ps _mm_cmpnlt_pd _mm_cmpord_ss _mm_cmpord_sd _mm_cmpord_ps _mm_cmpord_pd _mm_cmpunord_ss _mm_cmpunord_sd _mm_cmpunord_ps _mm_cmpunord_pd
_mm_cmp_ss _mm_cmp_sd _mm_cmp_ps _mm256_cmp_ps _mm_cmp_pd _mm256_cmp_pd
</details>
Hi, @RKSimon. I'd like to work on this, can you assign this to me?
Hi, I opened a draft PR to track progress on adding constexpr support.
At the moment my availability is limited, so it may take some time before this is fully ready for review.
In the meantime, any early feedback on the overall approach would be greatly appreciated.
@RKSimon Hi, sorry for bothering you. I recently implemented mm(256)_cmp_ss/sd/ps/pd. But I'm not entirely entirely sure if my approach is consistent with the project. Could you kindly take a look when you have a chance? Thanks a lot for your time.
Hi, I've been busy with tasks in other parts of LLVM and likely won't be able to complete this issue in a reasonable timeframe, so I'm going to unassign myself. Apologies for the delay and any inconvenience caused.
If anyone would like to pick up this issue, please feel free to do so. My draft PR for this issue contains a partially completed implementation of the instructions that might be useful as a reference.
Hi can I work on this one?
Hi so I have some other engagements I need to see at the moment so will not be able to work actively if anyone else wants to work on this in the meantime feel free to take it up