public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/116564] New: aarch64: gcc can't finish when compiling vst2_f64 instrinsic with opt level >= O1
@ 2024-09-02  8:16 deminhan at gcc dot gnu.org
  2024-09-02  8:36 ` [Bug target/116564] [12/13/14/15 Regression] " ktkachov at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: deminhan at gcc dot gnu.org @ 2024-09-02  8:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 116564
           Summary: aarch64: gcc can't finish when compiling vst2_f64
                    instrinsic with opt level >= O1
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: deminhan at gcc dot gnu.org
  Target Milestone: ---

#include <arm_neon.h>
void test()
{
  for (int L = 0; L < 4; ++L) {
    float64_t ResData[1 * 2];
    float64x1x2_t Src1;
    vst2_f64(ResData, Src1);       
  }                                    
}

It's seem that gcc stucked on combine pass.

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

* [Bug target/116564] [12/13/14/15 Regression] aarch64: gcc can't finish when compiling vst2_f64 instrinsic with opt level >= O1
  2024-09-02  8:16 [Bug target/116564] New: aarch64: gcc can't finish when compiling vst2_f64 instrinsic with opt level >= O1 deminhan at gcc dot gnu.org
@ 2024-09-02  8:36 ` ktkachov at gcc dot gnu.org
  2024-09-02  9:47 ` acoplan at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2024-09-02  8:36 UTC (permalink / raw)
  To: gcc-bugs

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

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Target|                            |aarch64
            Summary|aarch64: gcc can't finish   |[12/13/14/15 Regression]
                   |when compiling vst2_f64     |aarch64: gcc can't finish
                   |instrinsic with opt level   |when compiling vst2_f64
                   |>= O1                       |instrinsic with opt level
                   |                            |>= O1
                 CC|                            |ktkachov at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-09-02
      Known to work|                            |11.4.0
   Target Milestone|---                         |12.5
      Known to fail|                            |12.4.0

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

* [Bug target/116564] [12/13/14/15 Regression] aarch64: gcc can't finish when compiling vst2_f64 instrinsic with opt level >= O1
  2024-09-02  8:16 [Bug target/116564] New: aarch64: gcc can't finish when compiling vst2_f64 instrinsic with opt level >= O1 deminhan at gcc dot gnu.org
  2024-09-02  8:36 ` [Bug target/116564] [12/13/14/15 Regression] " ktkachov at gcc dot gnu.org
@ 2024-09-02  9:47 ` acoplan at gcc dot gnu.org
  2024-09-02  9:54 ` acoplan at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: acoplan at gcc dot gnu.org @ 2024-09-02  9:47 UTC (permalink / raw)
  To: gcc-bugs

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

Alex Coplan <acoplan at gcc dot gnu.org> changed:

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

--- Comment #1 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Looks like it's spinning running some DCE right at the start of combine:

#10 0x0000000003068ab0 in mark_insn (insn=0xfffff4fd3880, fast=true) at
/home/alecop01/toolchain/src/gcc/gcc/dce.cc:227
#11 0x000000000306b034 in dce_process_block (bb=0xfffff50220c0, redo_out=false,
au=0x4774cd8, global_debug=0xffffffffea08) at
/home/alecop01/toolchain/src/gcc/gcc/dce.cc:1035
#12 0x000000000306b41c in fast_dce (word_level=false) at
/home/alecop01/toolchain/src/gcc/gcc/dce.cc:1128
#13 0x000000000306b618 in rest_of_handle_fast_dce () at
/home/alecop01/toolchain/src/gcc/gcc/dce.cc:1197
#14 0x000000000306b6d4 in run_fast_df_dce () at
/home/alecop01/toolchain/src/gcc/gcc/dce.cc:1245
#15 0x0000000001158380 in df_lr_dce_finalize (all_blocks=0x466c6c0) at
/home/alecop01/toolchain/src/gcc/gcc/df-problems.cc:1252
#16 0x0000000001151bd8 in df_analyze_problem (dflow=0x4519c00,
blocks_to_consider=0x466c6c0, postorder=0x446f9a0, n_blocks=5) at
/home/alecop01/toolchain/src/gcc/gcc/df-core.cc:1191
#17 0x0000000001151d2c in df_analyze_1 () at
/home/alecop01/toolchain/src/gcc/gcc/df-core.cc:1236
#18 0x0000000001152180 in df_analyze () at
/home/alecop01/toolchain/src/gcc/gcc/df-core.cc:1306
#19 0x00000000030479b0 in rest_of_handle_combine () at
/home/alecop01/toolchain/src/gcc/gcc/combine.cc:15127
#20 0x0000000003047ac4 in (anonymous namespace)::pass_combine::execute
(this=0x43b35a0) at /home/alecop01/toolchain/src/gcc/gcc/combine.cc:15177

the dump file shows the following:

Finding needed instructions:
  Adding insn 17 to worklist
  Adding insn 10 to worklist
  Adding insn 8 to worklist
Finished finding needed instructions:
processing block 4 lr out =  29 [x29] 31 [sp] 64 [sfp] 65 [ap]
processing block 3 lr out =  29 [x29] 31 [sp] 64 [sfp] 65 [ap] 101 104
  Adding insn 16 to worklist
  Adding insn 14 to worklist
  Adding insn 13 to worklist
processing block 2 lr out =  29 [x29] 31 [sp] 64 [sfp] 65 [ap] 101
  Adding insn 3 to worklist
DCE: Deleting insn 42
deleting insn with uid = 42.
DCE: Deleting insn 40
deleting insn with uid = 40.
DCE: Deleting insn 39
deleting insn with uid = 39.
DCE: Deleting insn 37
deleting insn with uid = 37.
df_worklist_dataflow_doublequeue: n_basic_blocks 5 n_edges 5 count 5 (    1)
Finding needed instructions:
  Adding insn 17 to worklist
  Adding insn 10 to worklist
  Adding insn 8 to worklist
Finished finding needed instructions:
processing block 4 lr out =  29 [x29] 31 [sp] 64 [sfp] 65 [ap]
processing block 3 lr out =  29 [x29] 31 [sp] 64 [sfp] 65 [ap] 101 104
  Adding insn 16 to worklist
  Adding insn 14 to worklist
  Adding insn 13 to worklist
processing block 2 lr out =  29 [x29] 31 [sp] 64 [sfp] 65 [ap] 101
  Adding insn 3 to worklist
df_worklist_dataflow_doublequeue: n_basic_blocks 5 n_edges 5 count 5 (    1)
Finding needed instructions:
  Adding insn 17 to worklist
  Adding insn 10 to worklist
  Adding insn 8 to worklist
Finished finding needed instructions:
processing block 4 lr out =  29 [x29] 31 [sp] 64 [sfp] 65 [ap]
processing block 3 lr out =  29 [x29] 31 [sp] 64 [sfp] 65 [ap] 101 104
  Adding insn 16 to worklist
  Adding insn 14 to worklist
  Adding insn 13 to worklist

and it just seems to repeat adding insns {17,10,8}, then {16,14,13}, then 3.

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

* [Bug target/116564] [12/13/14/15 Regression] aarch64: gcc can't finish when compiling vst2_f64 instrinsic with opt level >= O1
  2024-09-02  8:16 [Bug target/116564] New: aarch64: gcc can't finish when compiling vst2_f64 instrinsic with opt level >= O1 deminhan at gcc dot gnu.org
  2024-09-02  8:36 ` [Bug target/116564] [12/13/14/15 Regression] " ktkachov at gcc dot gnu.org
  2024-09-02  9:47 ` acoplan at gcc dot gnu.org
@ 2024-09-02  9:54 ` acoplan at gcc dot gnu.org
  2024-09-02 10:43 ` [Bug target/116564] [12/13/14/15 Regression] aarch64: gcc hangs when compiling vst2_f64 instrinsic at -O1 and above since r12-4910-g66f206b853 acoplan at gcc dot gnu.org
  2024-09-02 21:46 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: acoplan at gcc dot gnu.org @ 2024-09-02  9:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Here's a preprocessed testcase (not for the testsuite, just to make it easier
to reproduce using only cc1):

#pragma GCC aarch64 "arm_neon.h"

typedef double float64_t;

__extension__ extern __inline void
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vst2_f64 (float64_t * __a, float64x1x2_t __val)
{
  __builtin_aarch64_st2df ((__builtin_aarch64_simd_df *) __a, __val);
}

void test()
{
  for (int L = 0; L < 4; ++L) {
    float64_t ResData[1 * 2];
    float64x1x2_t Src1;
    vst2_f64(ResData, Src1);
  }
}

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

* [Bug target/116564] [12/13/14/15 Regression] aarch64: gcc hangs when compiling vst2_f64 instrinsic at -O1 and above since r12-4910-g66f206b853
  2024-09-02  8:16 [Bug target/116564] New: aarch64: gcc can't finish when compiling vst2_f64 instrinsic with opt level >= O1 deminhan at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-09-02  9:54 ` acoplan at gcc dot gnu.org
@ 2024-09-02 10:43 ` acoplan at gcc dot gnu.org
  2024-09-02 21:46 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: acoplan at gcc dot gnu.org @ 2024-09-02 10:43 UTC (permalink / raw)
  To: gcc-bugs

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

Alex Coplan <acoplan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[12/13/14/15 Regression]    |[12/13/14/15 Regression]
                   |aarch64: gcc can't finish   |aarch64: gcc hangs when
                   |when compiling vst2_f64     |compiling vst2_f64
                   |instrinsic with opt level   |instrinsic at -O1 and above
                   |>= O1                       |since r12-4910-g66f206b853

--- Comment #3 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Started with r12-4910-g66f206b85395c273980e2b81a54dbddc4897e4a7, FWIW (could
well be a latent issue, though).

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

* [Bug target/116564] [12/13/14/15 Regression] aarch64: gcc hangs when compiling vst2_f64 instrinsic at -O1 and above since r12-4910-g66f206b853
  2024-09-02  8:16 [Bug target/116564] New: aarch64: gcc can't finish when compiling vst2_f64 instrinsic with opt level >= O1 deminhan at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-09-02 10:43 ` [Bug target/116564] [12/13/14/15 Regression] aarch64: gcc hangs when compiling vst2_f64 instrinsic at -O1 and above since r12-4910-g66f206b853 acoplan at gcc dot gnu.org
@ 2024-09-02 21:46 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-09-02 21:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Alex Coplan from comment #1)

> and it just seems to repeat adding insns {17,10,8}, then {16,14,13}, then 3.


(insn 8 6 37 3 (clobber (subreg:V1DF (reg/v:V2x1DF 104 [ __valD.22804 ]) 0)) -1
     (nil))
...
(insn 10 39 40 3 (clobber (subreg:V1DF (reg/v:V2x1DF 104 [ __valD.22804 ]) 8))
-1
     (nil))

...

This looks exactly the same as PR 108681 but happening before register
allocation.

>could well be a latent issue, though

Well if I understand the issue is that might be a latent bug in dse but only
exposed by having the V2x1DF/V1DF and related types.

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

end of thread, other threads:[~2024-09-02 21:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-02  8:16 [Bug target/116564] New: aarch64: gcc can't finish when compiling vst2_f64 instrinsic with opt level >= O1 deminhan at gcc dot gnu.org
2024-09-02  8:36 ` [Bug target/116564] [12/13/14/15 Regression] " ktkachov at gcc dot gnu.org
2024-09-02  9:47 ` acoplan at gcc dot gnu.org
2024-09-02  9:54 ` acoplan at gcc dot gnu.org
2024-09-02 10:43 ` [Bug target/116564] [12/13/14/15 Regression] aarch64: gcc hangs when compiling vst2_f64 instrinsic at -O1 and above since r12-4910-g66f206b853 acoplan at gcc dot gnu.org
2024-09-02 21:46 ` 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).