* [Bug target/113221] [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9
2024-01-03 18:07 [Bug target/113221] New: [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9 mjires at suse dot cz
@ 2024-01-03 18:09 ` pinskia at gcc dot gnu.org
2024-01-03 18:13 ` pinskia at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-03 18:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113221
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
CC| |pinskia at gcc dot gnu.org
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/113221] [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9
2024-01-03 18:07 [Bug target/113221] New: [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9 mjires at suse dot cz
2024-01-03 18:09 ` [Bug target/113221] " pinskia at gcc dot gnu.org
@ 2024-01-03 18:13 ` pinskia at gcc dot gnu.org
2024-01-03 18:13 ` pinskia at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-03 18:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113221
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, but the IR from the ldp_fusion pass looks ok:
```
(insn 30 29 15 3 (set (reg/f:DI 110)
(lo_sum:DI (reg/f:DI 109)
(symbol_ref:DI ("_Z3barv") [flags 0x41] <function_decl
0x7f1f0f047e00 bar>))) "/app/example.cpp":5:10 discrim 1 -1
(expr_list:REG_DEAD (reg/f:DI 109)
(expr_list:REG_EQUAL (symbol_ref:DI ("_Z3barv") [flags 0x41]
<function_decl 0x7f1f0f047e00 bar>)
(nil))))
(insn 15 30 32 3 (parallel [
(set (reg:DI 106)
(plus:DI (reg:DI 106)
(const_int 4 [0x4])))
(set (mem:SI (reg:DI 106) [0 S4 A8])
(subreg:SI (reg/f:DI 104) 0))
(set (mem:SI (plus:DI (reg:DI 106)
(const_int 4 [0x4])) [0 S4 A8])
(subreg:SI (reg/f:DI 110) 0))
]) "/app/example.cpp":5:10 discrim 1 102 {*storewb_post_pair_4}
(nil))
```
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/113221] [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9
2024-01-03 18:07 [Bug target/113221] New: [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9 mjires at suse dot cz
2024-01-03 18:09 ` [Bug target/113221] " pinskia at gcc dot gnu.org
2024-01-03 18:13 ` pinskia at gcc dot gnu.org
@ 2024-01-03 18:13 ` pinskia at gcc dot gnu.org
2024-01-03 18:19 ` pinskia at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-03 18:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113221
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2024-01-03
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/113221] [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9
2024-01-03 18:07 [Bug target/113221] New: [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9 mjires at suse dot cz
` (2 preceding siblings ...)
2024-01-03 18:13 ` pinskia at gcc dot gnu.org
@ 2024-01-03 18:19 ` pinskia at gcc dot gnu.org
2024-01-08 12:52 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-03 18:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113221
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
IRA decided to combine:
```
(insn 9 8 19 3 (set (reg/f:DI 104)
(lo_sum:DI (reg/f:DI 105)
(symbol_ref:DI ("bar") [flags 0x41] <function_decl 0x7ff639b05f00
bar>))) "t.c":5:10 discrim 1 -1
(expr_list:REG_DEAD (reg/f:DI 105)
(expr_list:REG_EQUAL (symbol_ref:DI ("bar") [flags 0x41]
<function_decl 0x7ff639b05f00 bar>)
(nil))))
...
(insn 21 20 11 3 (set (reg/f:DI 110)
(lo_sum:DI (reg/f:DI 109)
(symbol_ref:DI ("bar") [flags 0x41] <function_decl 0x7ff639b05f00
bar>))) "t.c":5:10 discrim 1 -1
(expr_list:REG_DEAD (reg/f:DI 109)
(expr_list:REG_EQUAL (symbol_ref:DI ("bar") [flags 0x41]
<function_decl 0x7ff639b05f00 bar>)
(nil))))
(insn 11 21 27 3 (parallel [
(set (reg:DI 106)
(plus:DI (reg:DI 106)
(const_int 4 [0x4])))
(set (mem:SI (reg:DI 106) [0 S4 A8])
(subreg:SI (reg/f:DI 104) 0))
(set (mem:SI (plus:DI (reg:DI 106)
(const_int 4 [0x4])) [0 S4 A8])
(subreg:SI (reg/f:DI 110) 0))
]) "t.c":5:10 discrim 1 102 {*storewb_post_pair_4}
(nil))
```
to:
```
(insn 11 20 27 3 (parallel [
(set (reg:DI 106)
(plus:DI (reg:DI 106)
(const_int 4 [0x4])))
(set (mem:SI (reg:DI 106) [0 S4 A8])
(subreg:SI (lo_sum:DI (reg/f:DI 105)
(symbol_ref:DI ("bar") [flags 0x41] <function_decl
0x7ff639b05f00 bar>)) 0))
(set (mem:SI (plus:DI (reg:DI 106)
(const_int 4 [0x4])) [0 S4 A8])
(subreg:SI (lo_sum:DI (reg/f:DI 109)
(symbol_ref:DI ("bar") [flags 0x41] <function_decl
0x7ff639b05f00 bar>)) 0))
]) "t.c":5:10 discrim 1 102 {*storewb_post_pair_4}
(expr_list:REG_DEAD (reg/f:DI 109)
(expr_list:REG_DEAD (reg/f:DI 105)
(nil))))
```
But I have no idea why though ...
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/113221] [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9
2024-01-03 18:07 [Bug target/113221] New: [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9 mjires at suse dot cz
` (3 preceding siblings ...)
2024-01-03 18:19 ` pinskia at gcc dot gnu.org
@ 2024-01-08 12:52 ` jakub at gcc dot gnu.org
2024-01-16 23:24 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-01-08 12:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113221
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Priority|P3 |P1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/113221] [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9
2024-01-03 18:07 [Bug target/113221] New: [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9 mjires at suse dot cz
` (4 preceding siblings ...)
2024-01-08 12:52 ` jakub at gcc dot gnu.org
@ 2024-01-16 23:24 ` pinskia at gcc dot gnu.org
2024-01-16 23:31 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-16 23:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113221
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So I think aarch64_ldp_reg_operand allows too much, it allows `(subreg:SI
(lo_sum:DI` when it should have just allowed `(subreg:SI (reg:`.
I am going to see if that fixes the issue.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/113221] [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9
2024-01-03 18:07 [Bug target/113221] New: [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9 mjires at suse dot cz
` (5 preceding siblings ...)
2024-01-16 23:24 ` pinskia at gcc dot gnu.org
@ 2024-01-16 23:31 ` pinskia at gcc dot gnu.org
2024-01-17 0:10 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-16 23:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113221
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Actually `(match_operand 0 "register_operand")` should be used instead of the
current `(match_code "reg,subreg")`.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/113221] [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9
2024-01-03 18:07 [Bug target/113221] New: [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9 mjires at suse dot cz
` (6 preceding siblings ...)
2024-01-16 23:31 ` pinskia at gcc dot gnu.org
@ 2024-01-17 0:10 ` pinskia at gcc dot gnu.org
2024-01-17 3:38 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-17 0:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113221
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> Actually `(match_operand 0 "register_operand")` should be used instead of
> the current `(match_code "reg,subreg")`.
Except that does not work since register_operand checks the mode ...
and then we fail to match:
```
(insn 46 45 47 2 (parallel [
(set (reg:V4SI 148)
(unspec:V4SI [
(mem/c:V2x16QI (reg:DI 147) [0 +0 S32 A128])
] UNSPEC_LDP_FST))
(set (reg:V4SI 149)
(unspec:V4SI [
(mem/c:V2x16QI (reg:DI 147) [0 +0 S32 A128])
] UNSPEC_LDP_SND))
]) "../../../libgcc/libgcov-interface.c":211:2 -1
(nil))
```
Because we only define the load_pair_16 for TImode and TImode != V4SImode here
...
So Back to changing it to only test for reg and subreg of a reg then.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/113221] [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9
2024-01-03 18:07 [Bug target/113221] New: [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9 mjires at suse dot cz
` (7 preceding siblings ...)
2024-01-17 0:10 ` pinskia at gcc dot gnu.org
@ 2024-01-17 3:38 ` pinskia at gcc dot gnu.org
2024-01-17 22:03 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-17 3:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113221
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |https://gcc.gnu.org/piperma
| |il/gcc-patches/2024-January
| |/643190.html
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Patch submitted:
https://gcc.gnu.org/pipermail/gcc-patches/2024-January/643190.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/113221] [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9
2024-01-03 18:07 [Bug target/113221] New: [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9 mjires at suse dot cz
` (8 preceding siblings ...)
2024-01-17 3:38 ` pinskia at gcc dot gnu.org
@ 2024-01-17 22:03 ` cvs-commit at gcc dot gnu.org
2024-01-17 22:04 ` pinskia at gcc dot gnu.org
2024-01-18 15:26 ` acoplan at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-17 22:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113221
--- Comment #7 from GCC 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:7a8124e341aebcc544b4720e920b625f4ffe4e8a
commit r14-8194-g7a8124e341aebcc544b4720e920b625f4ffe4e8a
Author: Andrew Pinski <quic_apinski@quicinc.com>
Date: Tue Jan 16 15:37:49 2024 -0800
aarch64: Fix aarch64_ldp_reg_operand predicate not to allow all subreg
[PR113221]
So the problem here is that aarch64_ldp_reg_operand will all subreg even
subreg of lo_sum.
When LRA tries to fix that up, all things break. So the fix is to change
the check to only
allow reg and subreg of regs.
Note the tendancy here is to use register_operand but that checks the mode
of the register
but we need to allow a mismatch modes for this predicate for now.
Built and tested for aarch64-linux-gnu with no regressions
(Also tested with the LD/ST pair pass back on).
PR target/113221
gcc/ChangeLog:
* config/aarch64/predicates.md (aarch64_ldp_reg_operand): For
subreg,
only allow REG operands instead of allowing all.
gcc/testsuite/ChangeLog:
* gcc.c-torture/compile/pr113221-1.c: New test.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/113221] [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9
2024-01-03 18:07 [Bug target/113221] New: [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9 mjires at suse dot cz
` (9 preceding siblings ...)
2024-01-17 22:03 ` cvs-commit at gcc dot gnu.org
@ 2024-01-17 22:04 ` pinskia at gcc dot gnu.org
2024-01-18 15:26 ` acoplan at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-17 22:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113221
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/113221] [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9
2024-01-03 18:07 [Bug target/113221] New: [14 Regression][aarch64]ICE in extract_insn, at recog.cc:2812 since r14-6605-gc0911c6b357ba9 mjires at suse dot cz
` (10 preceding siblings ...)
2024-01-17 22:04 ` pinskia at gcc dot gnu.org
@ 2024-01-18 15:26 ` acoplan at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: acoplan at gcc dot gnu.org @ 2024-01-18 15:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113221
Alex Coplan <acoplan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zsojka at seznam dot cz
--- Comment #9 from Alex Coplan <acoplan at gcc dot gnu.org> ---
*** Bug 113184 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 13+ messages in thread