public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/105879] New: DI mode constants are incorrectly loaded into registers on big-endian xtensa
@ 2022-06-08  4:07 jcmvbkbc at gcc dot gnu.org
  2022-06-08  4:27 ` [Bug target/105879] " jcmvbkbc at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jcmvbkbc at gcc dot gnu.org @ 2022-06-08  4:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105879
           Summary: DI mode constants are incorrectly loaded into
                    registers on big-endian xtensa
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jcmvbkbc at gcc dot gnu.org
  Target Milestone: ---

A lot of testsuite tests are failing in big-endian xtensa configuration, e.g.
gcc.c-torture/execute/20001031-1.c
For the following part

long long t4 (void)
{ 
  long long i;
  t3 ((i = 4096) + 0x7fffffffULL);
  return i;
}

in the generated assembly I see the following:

        .literal .LC7, -2147479553
        .literal .LC8, t3@PLT
        .literal .LC9, 4096
        .align  4
        .global t4
        .type   t4, @function
t4:
        entry   sp, 32
        movi.n  a3, 0
        l32r    a10, .LC7
        mov.n   a11, a3
        l32r    a8, .LC8
        callx8  a8
        l32r    a2, .LC9
        retw.n

(i.e. 0 in a11), while it should've been the following (i.e. 0 in a10):

        .literal .LC7, -2147479553
        .literal .LC8, t3@PLT
        .literal .LC9, 4096
        .align  4
        .global t4
        .type   t4, @function
t4:
        entry   sp, 32
        movi.n  a2, 0
        mov.n   a10, a2
        l32r    a11, .LC7
        l32r    a8, .LC8
        callx8  a8
        l32r    a3, .LC9
        retw.n

This regression clearly traces back to the commit 64a54505ec82 ("gcc: xtensa:
rearrange DI mode constant loading") and is present in gcc-11.1+ and gcc-12.1

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

end of thread, other threads:[~2022-06-08 16:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08  4:07 [Bug target/105879] New: DI mode constants are incorrectly loaded into registers on big-endian xtensa jcmvbkbc at gcc dot gnu.org
2022-06-08  4:27 ` [Bug target/105879] " jcmvbkbc at gcc dot gnu.org
2022-06-08 15:48 ` cvs-commit at gcc dot gnu.org
2022-06-08 16:17 ` cvs-commit at gcc dot gnu.org
2022-06-08 16:25 ` cvs-commit at gcc dot gnu.org
2022-06-08 16:27 ` jcmvbkbc 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).