From 33b73ec3e990652e1fa344f4e2a1510799ed3a8a Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Sat, 24 Apr 2021 14:16:03 +0000 Subject: [PATCH] add some more avx512 detection --- avxjudge.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/avxjudge.py b/avxjudge.py index 48ef453..900bfb5 100644 --- a/avxjudge.py +++ b/avxjudge.py @@ -39,7 +39,7 @@ avx2_instructions = set([ "vfnmsub132ss", "vfnmsub213ss", "vfnmsub231ss", "vfnmsub132sd", "vfnmsub231sd", "vfnmsub213sd", ]) -avx512_instructions = set() +avx512_instructions = set(["kmovw", "vpcmpltd", "kshiftrw", "kmovb"]) # 2.0 value instructions avx2_instructions_hv = set([ @@ -137,9 +137,14 @@ def is_avx512(instruction:str, args:str) -> float: val = max(val, 2.0) if "xor" not in instruction and "%ymm" in args and has_high_register(args): - val = max(val, 0.02) + val = max(val, 0.2) if "xor" not in instruction and has_high_register(args): - val = max(val, 0.01) + val = max(val, 0.1) + + if "{%k" in args: # predicate instructions + val = max(val, 0.1) + if "{1to" in args: # broadcast-as-part-of-mov this saves a whole other instruction + val = max(val, 1.0) if "%zmm" in args: if ("pd" in instruction or "ps" in instruction or "vpadd" in instruction or "vpsub" in instruction or instruction in avx2_instructions_ymm) and "xor" not in instruction and "vmov" not in instruction: