This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, i386]: Fix constm1_operand predicate


Brown-paper bag bug ...

>> Do I misuse constm1_operand?
>
> No, it is just a typo that crept in constm1_operand:
>
> ;; Match exactly -1.
> (define_predicate "constm1_operand"
>   (and (match_code "const_int")
>        (match_test "op = constm1_rtx")))
>
> There should be a test, not an assignment.

Fixed by attached patch.

2016-04-29  Uros Bizjak  <ubizjak@gmail.com>

    * config/i386/predicates.md (constm1_operand): Fix comparison.

Bootstrap and regression test in progress, will commit to mainline ASAP.

Uros.

Index: i386/predicates.md
===================================================================
--- i386/predicates.md  (revision 235619)
+++ i386/predicates.md  (working copy)
@@ -678,7 +678,7 @@
 ;; Match exactly -1.
 (define_predicate "constm1_operand"
   (and (match_code "const_int")
-       (match_test "op = constm1_rtx")))
+       (match_test "op == constm1_rtx")))

 ;; Match exactly eight.
 (define_predicate "const8_operand"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]