diff mbox

[5/7,ARC] Update (non)commutative_binary_comparison patterns.

Message ID 1495189862-20533-6-git-send-email-claziss@synopsys.com
State New
Headers show

Commit Message

Claudiu Zissulescu May 19, 2017, 10:31 a.m. UTC
gcc/
2016-12-20  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.md (commutative_binary_comparison): Remove 'I'
	constraint. It is not valid for the pattern.
	(noncommutative_binary_comparison): Likewise.
---
 gcc/config/arc/arc.md | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Andrew Burgess May 31, 2017, 3:40 p.m. UTC | #1
* Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com> [2017-05-19 12:31:00 +0200]:

> gcc/
> 2016-12-20  Claudiu Zissulescu  <claziss@synopsys.com>
> 
> 	* config/arc/arc.md (commutative_binary_comparison): Remove 'I'
> 	constraint. It is not valid for the pattern.
> 	(noncommutative_binary_comparison): Likewise.

Looks good, thanks,
Andrew


> ---
>  gcc/config/arc/arc.md | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
> index c0ad86c..743a844 100644
> --- a/gcc/config/arc/arc.md
> +++ b/gcc/config/arc/arc.md
> @@ -948,15 +948,15 @@
>    [(set (match_operand:CC_ZN 0 "cc_set_register" "")
>  	(match_operator:CC_ZN 5 "zn_compare_operator"
>  	  [(match_operator:SI 4 "commutative_operator"
> -	     [(match_operand:SI 1 "register_operand" "%c,c,c")
> -	      (match_operand:SI 2 "nonmemory_operand" "cL,I,?Cal")])
> +	     [(match_operand:SI 1 "register_operand" "%c,c")
> +	      (match_operand:SI 2 "nonmemory_operand" "cL,Cal")])
>  	   (const_int 0)]))
> -   (clobber (match_scratch:SI 3 "=X,1,X"))]
> +   (clobber (match_scratch:SI 3 "=X,X"))]
>    ""
>    "%O4.f 0,%1,%2"
>    [(set_attr "type" "compare")
>     (set_attr "cond" "set_zn")
> -   (set_attr "length" "4,4,8")])
> +   (set_attr "length" "4,8")])
>  
>  ; for flag setting 'add' instructions like if (a+b) { ...}
>  ; the combiner needs this pattern
> @@ -1050,15 +1050,15 @@
>    [(set (match_operand:CC_ZN 0 "cc_set_register" "")
>  	(match_operator:CC_ZN 5 "zn_compare_operator"
>  	  [(match_operator:SI 4 "noncommutative_operator"
> -	     [(match_operand:SI 1 "register_operand" "c,c,c")
> -	      (match_operand:SI 2 "nonmemory_operand" "cL,I,?Cal")])
> +	     [(match_operand:SI 1 "register_operand" "c,c")
> +	      (match_operand:SI 2 "nonmemory_operand" "cL,Cal")])
>  	   (const_int 0)]))
> -   (clobber (match_scratch:SI 3 "=X,1,X"))]
> +   (clobber (match_scratch:SI 3 "=X,X"))]
>    "TARGET_BARREL_SHIFTER || GET_CODE (operands[4]) == MINUS"
>    "%O4.f 0,%1,%2"
>    [(set_attr "type" "compare")
>     (set_attr "cond" "set_zn")
> -   (set_attr "length" "4,4,8")])
> +   (set_attr "length" "4,8")])
>  
>  (define_expand "bic_f_zn"
>    [(parallel
> -- 
> 1.9.1
>
Claudiu Zissulescu June 1, 2017, 9:46 a.m. UTC | #2
> Looks good, thanks,
> Andrew

Committed, thank you,
Claudiu
diff mbox

Patch

diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
index c0ad86c..743a844 100644
--- a/gcc/config/arc/arc.md
+++ b/gcc/config/arc/arc.md
@@ -948,15 +948,15 @@ 
   [(set (match_operand:CC_ZN 0 "cc_set_register" "")
 	(match_operator:CC_ZN 5 "zn_compare_operator"
 	  [(match_operator:SI 4 "commutative_operator"
-	     [(match_operand:SI 1 "register_operand" "%c,c,c")
-	      (match_operand:SI 2 "nonmemory_operand" "cL,I,?Cal")])
+	     [(match_operand:SI 1 "register_operand" "%c,c")
+	      (match_operand:SI 2 "nonmemory_operand" "cL,Cal")])
 	   (const_int 0)]))
-   (clobber (match_scratch:SI 3 "=X,1,X"))]
+   (clobber (match_scratch:SI 3 "=X,X"))]
   ""
   "%O4.f 0,%1,%2"
   [(set_attr "type" "compare")
    (set_attr "cond" "set_zn")
-   (set_attr "length" "4,4,8")])
+   (set_attr "length" "4,8")])
 
 ; for flag setting 'add' instructions like if (a+b) { ...}
 ; the combiner needs this pattern
@@ -1050,15 +1050,15 @@ 
   [(set (match_operand:CC_ZN 0 "cc_set_register" "")
 	(match_operator:CC_ZN 5 "zn_compare_operator"
 	  [(match_operator:SI 4 "noncommutative_operator"
-	     [(match_operand:SI 1 "register_operand" "c,c,c")
-	      (match_operand:SI 2 "nonmemory_operand" "cL,I,?Cal")])
+	     [(match_operand:SI 1 "register_operand" "c,c")
+	      (match_operand:SI 2 "nonmemory_operand" "cL,Cal")])
 	   (const_int 0)]))
-   (clobber (match_scratch:SI 3 "=X,1,X"))]
+   (clobber (match_scratch:SI 3 "=X,X"))]
   "TARGET_BARREL_SHIFTER || GET_CODE (operands[4]) == MINUS"
   "%O4.f 0,%1,%2"
   [(set_attr "type" "compare")
    (set_attr "cond" "set_zn")
-   (set_attr "length" "4,4,8")])
+   (set_attr "length" "4,8")])
 
 (define_expand "bic_f_zn"
   [(parallel