ref: 4d97f5a9d959679d472e7aa9f68503a69eb47202
parent: 28d333577ee8ecf5b77fda2794625bd6adbfd9ee
author: Henrik Gramner <gramner@twoorioles.com>
date: Sun May 10 11:55:04 EDT 2020
x86: Use 'test' instead of 'or' to compare with zero Allows for macro-op fusion.
--- a/src/x86/cdef_avx2.asm
+++ b/src/x86/cdef_avx2.asm
@@ -459,7 +459,7 @@
movifnidn prid, prim
sub dampingd, 31
movifnidn secdmpd, secdmpm
- or prid, 0
+ test prid, prid
jz .sec_only
movd xm0, prid
lzcnt pridmpd, prid
@@ -466,7 +466,7 @@
add pridmpd, dampingd
cmovs pridmpd, zerod
mov [rsp+0], pridmpq ; pri_shift
- or secdmpd, 0
+ test secdmpd, secdmpd
jz .pri_only
movd xm1, secdmpd
lzcnt secdmpd, secdmpd
@@ -1468,7 +1468,7 @@
movifnidn prid, prim
sub dampingd, 31
movifnidn secdmpd, secdmpm
- or prid, 0
+ test prid, prid
jz .border_sec_only
movd xm0, prid
lzcnt pridmpd, prid
@@ -1475,7 +1475,7 @@
add pridmpd, dampingd
cmovs pridmpd, zerod
mov [rsp+0], pridmpq ; pri_shift
- or secdmpd, 0
+ test secdmpd, secdmpd
jz .border_pri_only
movd xm1, secdmpd
lzcnt secdmpd, secdmpd