From 0601a86f56d730e4c7d6c49be49f94f50247e6dd Mon Sep 17 00:00:00 2001 From: dzaima Date: Tue, 11 Jul 2023 02:35:33 +0300 Subject: [PATCH] =?UTF-8?q?don't=20special-case=202/=F0=9D=95=A9=20on=20NE?= =?UTF-8?q?ON?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/singeli/src/constrep.singeli | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/singeli/src/constrep.singeli b/src/singeli/src/constrep.singeli index c00aca0d..db1e7c41 100644 --- a/src/singeli/src/constrep.singeli +++ b/src/singeli/src/constrep.singeli @@ -31,8 +31,9 @@ def get_shufs{step, wv, len} = { def get_shuf_data{wv, len} = get_shufs{vcount{sdtype}, wv, len} # [len] byte-selector vectors for wv/sdtype (expanded to wider types by read_shuf_vecs) def get_shuf_data{wv} = get_shuf_data{wv, wv} -# all shuffle vectors for 𝕨∊3…7 -def rcsh_vals = slice{basic_rep, 1} # Handle 2 specially +# all shuffle vectors for 𝕨≤7 +def special_2 = ~hasarch{'AARCH64'} # handle 2 specially on x86-64 +def rcsh_vals = slice{basic_rep, special_2} rcsh_offs:*u8 = shiftright{0, scan{+,rcsh_vals}} rcsh_data:*i8 = join{join{each{get_shuf_data, rcsh_vals}}} @@ -213,7 +214,7 @@ fn rep_const{T}(wv:u64, x:*void, r:*void, n:u64) : void = { def specialize{k} = { if (wv==k) return{rep_const_shuffle{V, k, *V~~x, *V~~r, n}} } - specialize{2} + if (special_2) specialize{2} rep_const_shuffle_any(wv, lb{wT/8}, *i8~~x, *i8~~r, n) } else { kv := wv / vn