Commit 23517a3e authored by Martin Storsjö's avatar Martin Storsjö
Browse files

x86: mc: Skip checks for zero leftext/rightext within the need_left_ext/need_right_ext blocks

If leftext/rightext are zero, we invoke a version of v_loop with
the whole need_left_ext/need_right_ext parts left out altogether,
so these checks seem to be redundant.
parent 41cd4199
......@@ -4883,9 +4883,6 @@ cglobal emu_edge, 10, 13, 1, bw, bh, iw, ih, x, y, dst, dstride, src, sstride, \
%macro v_loop 3 ; need_left_ext, need_right_ext, suffix
.v_loop_%3:
%if %1
test leftextq, leftextq
jz .body_%3
; left extension
xor r3, r3
vpbroadcastb m0, [srcq]
......@@ -4896,7 +4893,6 @@ cglobal emu_edge, 10, 13, 1, bw, bh, iw, ih, x, y, dst, dstride, src, sstride, \
jl .left_loop_%3
; body
.body_%3:
lea r12, [dstq+leftextq]
%endif
xor r3, r3
......@@ -4913,8 +4909,6 @@ cglobal emu_edge, 10, 13, 1, bw, bh, iw, ih, x, y, dst, dstride, src, sstride, \
%if %2
; right extension
test rightextq, rightextq
jz .body_loop_end_%3
%if %1
add r12, centerwq
%else
......@@ -4928,7 +4922,6 @@ cglobal emu_edge, 10, 13, 1, bw, bh, iw, ih, x, y, dst, dstride, src, sstride, \
cmp r3, rightextq
jl .right_loop_%3
.body_loop_end_%3:
%endif
add dstq, dstrideq
add srcq, sstrideq
......
......@@ -4881,8 +4881,6 @@ cglobal emu_edge, 10, 13, 2, bw, bh, iw, ih, x, \
mov r1, r1m
%endif
%if %1
test leftextq, leftextq
jz .body_%3
; left extension
%if ARCH_X86_64
movd m0, [srcq]
......@@ -4898,7 +4896,6 @@ cglobal emu_edge, 10, 13, 2, bw, bh, iw, ih, x, \
cmp r3, leftextq
jl .left_loop_%3
; body
.body_%3:
lea reg_tmp, [dstq+leftextq]
%endif
xor r3, r3
......@@ -4919,13 +4916,6 @@ cglobal emu_edge, 10, 13, 2, bw, bh, iw, ih, x, \
jl .body_loop_%3
%if %2
; right extension
%if ARCH_X86_64
test rightextq, rightextq
%else
mov r1, r3m
test r1, r1
%endif
jz .body_loop_end_%3
%if %1
add reg_tmp, centerwq
%else
......@@ -4948,7 +4938,6 @@ cglobal emu_edge, 10, 13, 2, bw, bh, iw, ih, x, \
cmp r3, r3m
%endif
jl .right_loop_%3
.body_loop_end_%3:
%endif
%if ARCH_X86_64
add dstq, dstrideq
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment