arm/neon: add LSX implementations - #1447
Open
jinboson wants to merge 1 commit into
Open
Conversation
This change only implements the NEON instructions used by the libjpeg-turbo project in the simde/arm directory. The remaining instructions in each file will be submitted in subsequent patches.
mr-c
requested changes
Sep 8, 2026
|
|
||
| r = v_.values[lane]; | ||
| #if defined(SIMDE_LOONGARCH_LSX_NATIVE) | ||
| r = __lsx_vpickve2gr_d(simde_x_lsx_load64(&v_.values), 0); |
Collaborator
There was a problem hiding this comment.
2026-09-08T13:56:02.8905240Z In file included from ../simde/arm/neon/cmla_lane.h:39,
2026-09-08T13:56:02.8905555Z from ../simde/arm/neon.h:73,
2026-09-08T13:56:02.8905823Z from ../test/arm/neon/cgez.c:37:
2026-09-08T13:56:02.8906623Z ../simde/arm/neon/get_lane.h: In function ‘simde_vget_lane_s64’:
2026-09-08T13:56:02.8907291Z ../simde/arm/neon/get_lane.h:168:50: error: unused parameter ‘lane’ [-Werror=unused-parameter]
2026-09-08T13:56:02.8907762Z 168 | simde_vget_lane_s64(simde_int64x1_t v, const int lane)
2026-09-08T13:56:02.8908075Z | ~~~~~~~~~~^~~~
Suggested change
| r = __lsx_vpickve2gr_d(simde_x_lsx_load64(&v_.values), 0); | |
| (void) lane; | |
| r = __lsx_vpickve2gr_d(simde_x_lsx_load64(&v_.values), 0); |
mr-c
reviewed
Sep 8, 2026
Comment on lines
+236
to
+245
| case 0: r.m128i = __lsx_vinsgr2vr_h(r.m128i, (int)*ptr, 0); break; | ||
| case 1: r.m128i = __lsx_vinsgr2vr_h(r.m128i, (int)*ptr, 1); break; | ||
| case 2: r.m128i = __lsx_vinsgr2vr_h(r.m128i, (int)*ptr, 2); break; | ||
| case 3: r.m128i = __lsx_vinsgr2vr_h(r.m128i, (int)*ptr, 3); break; | ||
| case 4: r.m128i = __lsx_vinsgr2vr_h(r.m128i, (int)*ptr, 4); break; | ||
| case 5: r.m128i = __lsx_vinsgr2vr_h(r.m128i, (int)*ptr, 5); break; | ||
| case 6: r.m128i = __lsx_vinsgr2vr_h(r.m128i, (int)*ptr, 6); break; | ||
| case 7: r.m128i = __lsx_vinsgr2vr_h(r.m128i, (int)*ptr, 7); break; | ||
| default: HEDLEY_UNREACHABLE(); | ||
| } |
Collaborator
There was a problem hiding this comment.
Did SIMDE_CONSTIFY_8_ not work?
Contributor
Author
|
Sorry for the delay — I'm away on vacation. I'll get back to this once I return. Thanks for your understanding! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on this libjpeg-turbo/libjpeg-turbo#838, we made a performance test:
Current libjpeg-turbo commit: 174da652ef60ef7191357620eaf1d8fe776de723
Current SIMDe commit: 6a72a0434262d0f7f50e1e264284973bcbbd373e
Loongson-3A5000HV, Loongnix GNU/Linux 20 (DaoXiangHu), gcc (Loongnix 8.3.0-6.lnd.vec.44) 8.3.0 :