Re: [PATCH 2/8] xor/arm: Replace vectoriz ed implementation with arm64's intrinsics
Josh Law <[email protected]>
| Newsgroups | gmane.linux.kernel.cryptoapi,gmane.linux.ports.arm.kernel,gmane.linux.raid |
|---|---|
| Message-ID | <[email protected]> |
Hi ard. I like this patch. So, I'd be crazy not to say what I love here. + /* p1 ^= p2 */ + v0 = veorq_u64(vld1q_u64(dp1 + 0), vld1q_u64(dp2 + 0)); + v1 = veorq_u64(vld1q_u64(dp1 + 2), vld1q_u64(dp2 + 2)); + v2 = veorq_u64(vld1q_u64(dp1 + 4), vld1q_u64(dp2 + 4)); + v3 = veorq_u64(vld1q_u64(dp1 + 6), vld1q_u64(dp2 + 6)); + + /* p1 ^= p3 */ + v0 = veorq_u64(v0, vld1q_u64(dp3 + 0)); + v1 = veorq_u64(v1, vld1q_u64(dp3 + 2)); + v2 = veorq_u64(v2, vld1q_u64(dp3 + 4)); + v3 = veorq_u64(v3, vld1q_u64(dp3 + 6)); + + /* store */ + vst1q_u64(dp1 + 0, v0); + vst1q_u64(dp1 + 2, v1); + vst1q_u64(dp1 + 4, v2); + vst1q_u64(dp1 + 6, v3); + + dp1 += 8; + dp2 += 8; + dp3 += 8; + } while (--lines > 0); +} I really like how clean this is, I'm personally nodding my head here Taking the "bad" guesswork of the compiler here is also amazing, it also guarantees we won't get stupid regressions in the future. Also, that performance boost is even better ;) I'm not the biggest expert of this subdirectory, but I understand it well. So well, Reviewed-by: Josh Law <[email protected]> Thanks! (I will review your lib patches) :)