public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/101882] New: modulus with input and output set to a hard register
@ 2021-08-12 15:20 willschm at gcc dot gnu.org
  2021-08-12 15:27 ` [Bug target/101882] " segher at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: willschm at gcc dot gnu.org @ 2021-08-12 15:20 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101882
           Summary: modulus with input and output set to a hard register
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: willschm at gcc dot gnu.org
  Target Milestone: ---

Noted on powerpc using recent GCC.
  gcc version 12.0.0 20210812 (experimental) (GCC) 


foofoo9.c:
  register a __asm__("r20");
  b() { a = a % 9 ; }

# does not occur with -O0, or with -mcpu=power8.
$ gcc  -O -mcpu=power9 foofoo9.c 

foofoo9.c: In function ‘b’:
foofoo9.c:2:19: error: unable to generate reloads for impossible constraints:
    2 | b() { a = a % 9 ; }
      |                   ^
(insn 7 9 12 2 (set (reg/v:SI 20 20 [ a ])
        (mod:SI (reg/v:SI 20 20 [ a ])
            (reg:SI 120))) "foofoo9.c":2:13 183 {*modsi3}
     (expr_list:REG_DEAD (reg:SI 120)
        (nil)))
during RTL pass: reload
foofoo9.c:2:19: internal compiler error: in process_alt_operands, at
lra-constraints.c:3108
0x101d9597 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        /home/willschm/gcc/gcc-baseline/gcc/rtl-error.c:108
0x10912b4f process_alt_operands
        /home/willschm/gcc/gcc-baseline/gcc/lra-constraints.c:3108
0x10912b4f curr_insn_transform
        /home/willschm/gcc/gcc-baseline/gcc/lra-constraints.c:4102
0x10916dbb lra_constraints(bool)
        /home/willschm/gcc/gcc-baseline/gcc/lra-constraints.c:5168
0x108fc46f lra(_IO_FILE*)
        /home/willschm/gcc/gcc-baseline/gcc/lra.c:2336
0x1089be8b do_reload
        /home/willschm/gcc/gcc-baseline/gcc/ira.c:5932
0x1089be8b execute
        /home/willschm/gcc/gcc-baseline/gcc/ira.c:6118
Please submit a full bug report,

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

end of thread, other threads:[~2023-07-07 10:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 15:20 [Bug target/101882] New: modulus with input and output set to a hard register willschm at gcc dot gnu.org
2021-08-12 15:27 ` [Bug target/101882] " segher at gcc dot gnu.org
2021-08-20 19:03 ` mpolacek at gcc dot gnu.org
2021-08-20 21:04 ` segher at gcc dot gnu.org
2021-08-23 11:17 ` [Bug target/101882] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
2021-08-23 16:13 ` segher at gcc dot gnu.org
2022-01-20 12:27 ` rguenth at gcc dot gnu.org
2022-05-19 22:18 ` [Bug target/101882] [9/10/11/12/13 " bergner at gcc dot gnu.org
2022-05-27  9:46 ` [Bug target/101882] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:45 ` jakub at gcc dot gnu.org
2023-07-07 10:40 ` [Bug target/101882] [11/12/13/14 " rguenth 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).