On 2020/3/28 11:23, Richard Henderson wrote:
On 3/17/20 8:06 AM, LIU Zhiwei wrote:+ for (i = 0; i < vl; i++) { \ + if (!vm && !vext_elem_mask(v0, mlen, i)) { \ + ETYPE s2 = *((ETYPE *)vs2 + H(i)); \ + *((ETYPE *)vd + H1(i)) = s2; \H1 should be H.
Yes.
+ } else { \ + *((ETYPE *)vd + H(i)) = (ETYPE)s1; \ + } \You can also hoist the s2 dereference out of the IF, and let the assignment be unconditional. *((ETYPE *)vd + H(i)) = (!vm && !vext_elem_mask(v0, mlen, i) ? s2 : s1);
Yes, it's much better. Zhiwei
r~
