public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/106588] New: The constraints on most of the patterns in bitmanip.md are broken
@ 2022-08-11 19:30 pinskia at gcc dot gnu.org
  2022-08-16 15:39 ` [Bug target/106588] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-08-11 19:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106588

            Bug ID: 106588
           Summary: The constraints on most of the patterns in bitmanip.md
                    are broken
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, internal-improvement, wrong-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---
            Target: riscv

Take:
(define_insn "*bseti<mode>"
  [(set (match_operand:X 0 "register_operand" "=r")
        (ior:X (match_operand:X 1 "register_operand" "r")
               (match_operand 2 "single_bit_mask_operand" "i")))]
  "TARGET_ZBS"
  "bseti\t%0,%1,%S2"
  [(set_attr "type" "bitmanip")])

That is if something after reload decides to change operand 2, it will be
accepted and then crash while emitting %S2.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/106588] The constraints on most of the patterns in bitmanip.md are broken
  2022-08-11 19:30 [Bug target/106588] New: The constraints on most of the patterns in bitmanip.md are broken pinskia at gcc dot gnu.org
@ 2022-08-16 15:39 ` pinskia at gcc dot gnu.org
  2022-08-16 23:21 ` hp at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-08-16 15:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106588

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org
   Last reconfirmed|                            |2022-08-16
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Mine.
The patch to the my branch can be found at 
https://gcc.gnu.org/pipermail/gcc-cvs/2022-August/370098.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/106588] The constraints on most of the patterns in bitmanip.md are broken
  2022-08-11 19:30 [Bug target/106588] New: The constraints on most of the patterns in bitmanip.md are broken pinskia at gcc dot gnu.org
  2022-08-16 15:39 ` [Bug target/106588] " pinskia at gcc dot gnu.org
@ 2022-08-16 23:21 ` hp at gcc dot gnu.org
  2022-08-24 19:20 ` cvs-commit at gcc dot gnu.org
  2022-08-24 19:21 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: hp at gcc dot gnu.org @ 2022-08-16 23:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106588

Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hp at gcc dot gnu.org

--- Comment #2 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #0)
> Take:
> (define_insn "*bseti<mode>"
>   [(set (match_operand:X 0 "register_operand" "=r")
> 	(ior:X (match_operand:X 1 "register_operand" "r")
> 	       (match_operand 2 "single_bit_mask_operand" "i")))]
>   "TARGET_ZBS"
>   "bseti\t%0,%1,%S2"
>   [(set_attr "type" "bitmanip")])
> 
> That is if something after reload decides to change operand 2, it will be
> accepted and then crash while emitting %S2.

And that "something" doesn't also re-validate through the
single_bit_mask_operand predicate at the time?  AFAIR, re-validation requires
predicate-matching too, not just constraint-matching.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/106588] The constraints on most of the patterns in bitmanip.md are broken
  2022-08-11 19:30 [Bug target/106588] New: The constraints on most of the patterns in bitmanip.md are broken pinskia at gcc dot gnu.org
  2022-08-16 15:39 ` [Bug target/106588] " pinskia at gcc dot gnu.org
  2022-08-16 23:21 ` hp at gcc dot gnu.org
@ 2022-08-24 19:20 ` cvs-commit at gcc dot gnu.org
  2022-08-24 19:21 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-08-24 19:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106588

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:df5204ddd4b8e3a2d02bb3ad5bcdb9d636b02537

commit r13-2190-gdf5204ddd4b8e3a2d02bb3ad5bcdb9d636b02537
Author: Andrew Pinski <apinski@marvell.com>
Date:   Mon Aug 15 22:58:09 2022 +0000

    [RISCV] Fix PR 106632 and PR 106588 a few constraints in bitmanip.md

    The constraints should be n instead of i. Also there
    needs to a check for out of bounds zero_extract for
    *bexti.

    gcc/ChangeLog:

            PR target/106632
            PR target/106588
            * config/riscv/bitmanip.md (*shNadduw): Use n constraint
            instead of i.
            (*slliuw): Likewise.
            (*bexti): Likewise. Also add a check for operands[2] to be less
            than the mode bitsize.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/106588] The constraints on most of the patterns in bitmanip.md are broken
  2022-08-11 19:30 [Bug target/106588] New: The constraints on most of the patterns in bitmanip.md are broken pinskia at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-08-24 19:20 ` cvs-commit at gcc dot gnu.org
@ 2022-08-24 19:21 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-08-24 19:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106588

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |13.0
             Status|ASSIGNED                    |RESOLVED

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-24 19:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-11 19:30 [Bug target/106588] New: The constraints on most of the patterns in bitmanip.md are broken pinskia at gcc dot gnu.org
2022-08-16 15:39 ` [Bug target/106588] " pinskia at gcc dot gnu.org
2022-08-16 23:21 ` hp at gcc dot gnu.org
2022-08-24 19:20 ` cvs-commit at gcc dot gnu.org
2022-08-24 19:21 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).