public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/90594] [9/10 regression] Spurious popcount emitted
       [not found] <bug-90594-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-12 11:58 ` jakub at gcc dot gnu.org
  2020-06-23  6:29 ` [Bug tree-optimization/90594] [9/10/11 " hailey.chiu at sifive dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-12 11:58 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.3                         |9.4

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 9.3.0 has been released, adjusting target milestone.

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

* [Bug tree-optimization/90594] [9/10/11 regression] Spurious popcount emitted
       [not found] <bug-90594-4@http.gcc.gnu.org/bugzilla/>
  2020-03-12 11:58 ` [Bug tree-optimization/90594] [9/10 regression] Spurious popcount emitted jakub at gcc dot gnu.org
@ 2020-06-23  6:29 ` hailey.chiu at sifive dot com
  2020-06-23  8:20 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: hailey.chiu at sifive dot com @ 2020-06-23  6:29 UTC (permalink / raw)
  To: gcc-bugs

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

Hsiao-Hui Chiu <hailey.chiu at sifive dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hailey.chiu at sifive dot com

--- Comment #6 from Hsiao-Hui Chiu <hailey.chiu at sifive dot com> ---
Hi, 

I got the same issue that my program is compiled with gcc-10.1 with riscv. Here
is my code,

C source:

void foo()
{
    static long *a;
    static int i;
    static int sum;
    sum = 0;

    for ( i = 1 ; i < n ; i++)
    {
        sum += (*a--);
    }
}

Compiling with riscv-gcc-10.1, with -Os,
riscv-gcc-10.1/riscv64-unknown-elf-gcc -Os -march=rv32imac -mabi=ilp32 -S -o
foo.s foo.c

Asm:

foo:
...skip...
.L6:
    addi    a7,a7,1
    bgt a5,a7,.L7
    li  a4,0
    ble a5,zero,.L9
    li  a4,-4        
    mul a4,a5,a4      
    addi    a4,a4,4   #a = -4*n + 4
.L9:
    add a4,a0,a4
    bgt a5,zero,.L10
    li  a5,1
.L10:
    beq t3,zero,.L5
    sw  a4,%lo(a.1)(a1) 
    sw  a6,%lo(sum.3)(a2)
    sw  a5,%lo(i.2)(a3)
.L5:
    ret
.L7:
    lw  a4,0(t1)
    li  t3,1
    addi    t1,t1,-4    #a--
    add a6,a6,a4
    j   .L6

That .L6 segment is totally redundant. By inspecting the gcc trace, this is
happening at SCCP pass as this reported bug described. But, when I compiled the
bad_popcount function, I didn't see any redundant code emitted. 

According previous comments, I know this is under fixing. I am just wondering
if there is anything updated between last May to now? 

Thanks.

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

* [Bug tree-optimization/90594] [9/10/11 regression] Spurious popcount emitted
       [not found] <bug-90594-4@http.gcc.gnu.org/bugzilla/>
  2020-03-12 11:58 ` [Bug tree-optimization/90594] [9/10 regression] Spurious popcount emitted jakub at gcc dot gnu.org
  2020-06-23  6:29 ` [Bug tree-optimization/90594] [9/10/11 " hailey.chiu at sifive dot com
@ 2020-06-23  8:20 ` rguenth at gcc dot gnu.org
  2021-06-01  8:14 ` [Bug tree-optimization/90594] [9/10/11/12 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-23  8:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Sorry, I get easily distracted.  The while the "prerequesite" is ready the
actual fix is not.  I'll see whether to at least get that prerequesite
pushed.

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

* [Bug tree-optimization/90594] [9/10/11/12 regression] Spurious popcount emitted
       [not found] <bug-90594-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-06-23  8:20 ` rguenth at gcc dot gnu.org
@ 2021-06-01  8:14 ` rguenth at gcc dot gnu.org
  2022-05-27  9:40 ` [Bug tree-optimization/90594] [10/11/12/13 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:14 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

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

* [Bug tree-optimization/90594] [10/11/12/13 regression] Spurious popcount emitted
       [not found] <bug-90594-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-06-01  8:14 ` [Bug tree-optimization/90594] [9/10/11/12 " rguenth at gcc dot gnu.org
@ 2022-05-27  9:40 ` rguenth at gcc dot gnu.org
  2022-06-28 10:37 ` jakub at gcc dot gnu.org
  2023-07-07 10:35 ` [Bug tree-optimization/90594] [11/12/13/14 " rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:40 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.4

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

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

* [Bug tree-optimization/90594] [10/11/12/13 regression] Spurious popcount emitted
       [not found] <bug-90594-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2022-05-27  9:40 ` [Bug tree-optimization/90594] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:37 ` jakub at gcc dot gnu.org
  2023-07-07 10:35 ` [Bug tree-optimization/90594] [11/12/13/14 " rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:37 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

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

* [Bug tree-optimization/90594] [11/12/13/14 regression] Spurious popcount emitted
       [not found] <bug-90594-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2022-06-28 10:37 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:35 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:35 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-90594-4@http.gcc.gnu.org/bugzilla/>
2020-03-12 11:58 ` [Bug tree-optimization/90594] [9/10 regression] Spurious popcount emitted jakub at gcc dot gnu.org
2020-06-23  6:29 ` [Bug tree-optimization/90594] [9/10/11 " hailey.chiu at sifive dot com
2020-06-23  8:20 ` rguenth at gcc dot gnu.org
2021-06-01  8:14 ` [Bug tree-optimization/90594] [9/10/11/12 " rguenth at gcc dot gnu.org
2022-05-27  9:40 ` [Bug tree-optimization/90594] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:37 ` jakub at gcc dot gnu.org
2023-07-07 10:35 ` [Bug tree-optimization/90594] [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).