From a5840d0eb8f5d9bebd5cfd90c318b69ae584524d Mon Sep 17 00:00:00 2001 From: dzaima Date: Sun, 27 Apr 2025 19:12:51 +0300 Subject: [PATCH] fix AVX-512 widen arch check --- src/singeli/src/x86.singeli | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/singeli/src/x86.singeli b/src/singeli/src/x86.singeli index 04d6c97c..e846ef60 100644 --- a/src/singeli/src/x86.singeli +++ b/src/singeli/src/x86.singeli @@ -120,10 +120,10 @@ local def packs_impl{check}{a:V=[k]E, b:V if veci{V} and check{V} and (width{E}= def packs128{...} = packs_impl{{_}=>1} def packs{...} = packs_impl{{V}=>width{V}==128} -def widen{D=[k]DE, x:S=[k0]SE if isint{DE} and quality{DE}==quality{SE} and DE>SE and k<=k0 and hasarch{match (width{D}) { - {128} => 'SSE4.1' - {256} => 'AVX2' +def widen{D=[k]DE, x:S=[k0]SE if isint{DE} and quality{DE}==quality{SE} and DE>SE and k<=k0 and (match (width{D}) { + {128} => hasarch{'SSE4.1'} + {256} => hasarch{'AVX2'} {512} => x86_has512e{re_el{DE,S}} -}}} = { +})} = { emit{D, intrin_i{D, 'cvtep', if (isunsigned{SE}) 'u' else 'i', fmtwidth{SE}}, x86_low_elts{k, x}} }