This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, i386]: Fix constm1_operand predicate
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "H.J. Lu" <hjl dot tools at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Fri, 29 Apr 2016 14:04:31 +0200
- Subject: [PATCH, i386]: Fix constm1_operand predicate
- Authentication-results: sourceware.org; auth=none
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"