[3/6] arm: vp9lpf: Use orrs instead of orr+cmp

Message ID 1484513752-7472-3-git-send-email-martin@martin.st
State Committed
Commit 435cd7bc99671bf561193421a50ac6e9d63c4266
Headers show

Commit Message

Martin Storsjö Jan. 15, 2017, 8:55 p.m.
---
 libavcodec/arm/vp9lpf_neon.S | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

Comments

Janne Grunau Feb. 10, 2017, 8:38 p.m. | #1
On 2017-01-15 22:55:49 +0200, Martin Storsjö wrote:
> ---
>  libavcodec/arm/vp9lpf_neon.S | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/libavcodec/arm/vp9lpf_neon.S b/libavcodec/arm/vp9lpf_neon.S
> index 5e154f6..9be4cef 100644
> --- a/libavcodec/arm/vp9lpf_neon.S
> +++ b/libavcodec/arm/vp9lpf_neon.S
> @@ -77,8 +77,7 @@
>  
>          vdup.u8         d3,  r3          @ H
>          vmov            r2,  r3,  d4
> -        orr             r2,  r2,  r3
> -        cmp             r2,  #0
> +        orrs            r2,  r2,  r3
>          @ If no pixels need filtering, just exit as soon as possible
>          beq             9f
>  
> @@ -191,8 +190,7 @@
>  
>  .if \wd >= 8
>          vmov            r2,  r3,  d6
> -        orr             r2,  r2,  r3
> -        cmp             r2,  #0
> +        orrs            r2,  r2,  r3
>          @ If no pixels need flat8in, jump to flat8out
>          @ (or to a writeout of the inner 4 pixels, for wd=8)
>          beq             6f
> @@ -247,14 +245,12 @@
>  6:
>          vorr            d2,  d6,  d7
>          vmov            r2,  r3,  d2
> -        orr             r2,  r2,  r3
> -        cmp             r2,  #0
> +        orrs            r2,  r2,  r3
>          @ If no pixels needed flat8in nor flat8out, jump to a
>          @ writeout of the inner 4 pixels
>          beq             7f
>          vmov            r2,  r3,  d7
> -        orr             r2,  r2,  r3
> -        cmp             r2,  #0
> +        orrs            r2,  r2,  r3
>          @ If no pixels need flat8out, jump to a writeout of the inner 6 pixels
>          beq             8f

ok

Janne

Patch

diff --git a/libavcodec/arm/vp9lpf_neon.S b/libavcodec/arm/vp9lpf_neon.S
index 5e154f6..9be4cef 100644
--- a/libavcodec/arm/vp9lpf_neon.S
+++ b/libavcodec/arm/vp9lpf_neon.S
@@ -77,8 +77,7 @@ 
 
         vdup.u8         d3,  r3          @ H
         vmov            r2,  r3,  d4
-        orr             r2,  r2,  r3
-        cmp             r2,  #0
+        orrs            r2,  r2,  r3
         @ If no pixels need filtering, just exit as soon as possible
         beq             9f
 
@@ -191,8 +190,7 @@ 
 
 .if \wd >= 8
         vmov            r2,  r3,  d6
-        orr             r2,  r2,  r3
-        cmp             r2,  #0
+        orrs            r2,  r2,  r3
         @ If no pixels need flat8in, jump to flat8out
         @ (or to a writeout of the inner 4 pixels, for wd=8)
         beq             6f
@@ -247,14 +245,12 @@ 
 6:
         vorr            d2,  d6,  d7
         vmov            r2,  r3,  d2
-        orr             r2,  r2,  r3
-        cmp             r2,  #0
+        orrs            r2,  r2,  r3
         @ If no pixels needed flat8in nor flat8out, jump to a
         @ writeout of the inner 4 pixels
         beq             7f
         vmov            r2,  r3,  d7
-        orr             r2,  r2,  r3
-        cmp             r2,  #0
+        orrs            r2,  r2,  r3
         @ If no pixels need flat8out, jump to a writeout of the inner 6 pixels
         beq             8f