* [Bug target/102140] [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter
2021-08-31 6:47 [Bug target/102140] New: [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter zsojka at seznam dot cz
@ 2021-08-31 7:02 ` pinskia at gcc dot gnu.org
2021-08-31 7:03 ` pinskia at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-31 7:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102140
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Host|x86_64-pc-linux-gnu |
Known to work| |11.2.0
Last reconfirmed| |2021-08-31
Target|powerpc64le-unknown-linux-g |
|nu |
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, most likely caused by r12-3072.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/102140] [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter
2021-08-31 6:47 [Bug target/102140] New: [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter zsojka at seznam dot cz
2021-08-31 7:02 ` [Bug target/102140] " pinskia at gcc dot gnu.org
@ 2021-08-31 7:03 ` pinskia at gcc dot gnu.org
2021-08-31 7:04 ` pinskia at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-31 7:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102140
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |UNCONFIRMED
Target Milestone|12.0 |---
Target| |powerpc64le-unknown-linux-g
| |nu
Ever confirmed|1 |0
Known to work|11.2.0 |
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Whoops wrong bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/102140] [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter
2021-08-31 6:47 [Bug target/102140] New: [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter zsojka at seznam dot cz
2021-08-31 7:02 ` [Bug target/102140] " pinskia at gcc dot gnu.org
2021-08-31 7:03 ` pinskia at gcc dot gnu.org
@ 2021-08-31 7:04 ` pinskia at gcc dot gnu.org
2021-08-31 17:18 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-31 7:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102140
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/102140] [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter
2021-08-31 6:47 [Bug target/102140] New: [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter zsojka at seznam dot cz
` (2 preceding siblings ...)
2021-08-31 7:04 ` pinskia at gcc dot gnu.org
@ 2021-08-31 17:18 ` jakub at gcc dot gnu.org
2021-09-23 22:05 ` segher at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-08-31 17:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102140
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dje at gcc dot gnu.org,
| |jakub at gcc dot gnu.org,
| |segher at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Priority|P3 |P1
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly adjusted testcase, so that there is no warning about too large
constant:
typedef int __attribute__((__vector_size__ (64))) U;
typedef __int128 __attribute__((__vector_size__ (64))) V;
int a, b;
static void
bar (char c, V v)
{
v *= c;
U u = a + (U) v;
(union { U b; }) { u };
b = 0;
}
void
foo (void)
{
bar (1, (V){((__int128) 9223372036854775808ULL) << 64});
}
Started with r12-139-g7d6bb80931b429631f63e0fd27bee95f32eb57a9 which was a
middle-end change, so I bet it just triggered a latent backend or LRA bug.
If I do:
typedef int V __attribute__((vector_size (16)));
typedef __int128 W __attribute__((vector_size (16)));
V
foo (void)
{
return (V) (W) { (unsigned __int128) 1 << 127 };
}
V
bar (void)
{
return (V) { 0, 0, 0, -__INT_MAX__ - 1 };
}
then the insns like:
(insn 9 5 10 2 (set (reg/i:V4SI 66 2)
(const_vector:V4SI [
(const_int 0 [0]) repeated x3
(const_int -2147483648 [0xffffffff80000000])
])) "pr102140-3.c":8:1 1127 {vsx_movv4si_64bit}
(expr_list:REG_EQUAL (const_vector:V4SI [
(const_int 0 [0]) repeated x3
(const_int -2147483648 [0xffffffff80000000])
])
(nil)))
is split during split1. But on the above testcase we have
(insn 10 7 12 2 (set (reg:TI 118 [ _12 ])
(const_wide_int 0x80000000000000000000000000000000)) "pr102140.c":9:5
1134 {vsx_movti_64bit}
(nil))
...
(insn 17 15 18 2 (set (reg:V4SI 120 [ _14 ])
(subreg:V4SI (reg:TI 118 [ _12 ]) 0)) 1127 {vsx_movv4si_64bit}
(expr_list:REG_DEAD (reg:TI 118 [ _12 ])
(expr_list:REG_EQUAL (const_vector:V4SI [
(const_int 0 [0]) repeated x3
(const_int -2147483648 [0xffffffff80000000])
])
(nil))))
during split1 and only IRA forward propagates the constant into the insn.
So perhaps the operand predicate shouldn't allow such constants after split1?
split1 pass sets PROP_rtl_split_insns property which e.g. the i386 backend is
using to make sure not to match stuff after split1 if it was only supposed to
be valid before split1 (see ix86_pre_reload_split predicate).
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/102140] [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter
2021-08-31 6:47 [Bug target/102140] New: [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter zsojka at seznam dot cz
` (3 preceding siblings ...)
2021-08-31 17:18 ` jakub at gcc dot gnu.org
@ 2021-09-23 22:05 ` segher at gcc dot gnu.org
2022-02-08 13:26 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: segher at gcc dot gnu.org @ 2021-09-23 22:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102140
--- Comment #4 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Confirmed. Doesn't need -mlittle or -mabi=elfv2, or -mcpu=power8 even, but
does need -mvsx.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/102140] [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter
2021-08-31 6:47 [Bug target/102140] New: [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter zsojka at seznam dot cz
` (4 preceding siblings ...)
2021-09-23 22:05 ` segher at gcc dot gnu.org
@ 2022-02-08 13:26 ` jakub at gcc dot gnu.org
2022-02-08 19:15 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-08 13:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102140
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 52374
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52374&action=edit
gcc12-pr102140.patch
Untested fix.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/102140] [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter
2021-08-31 6:47 [Bug target/102140] New: [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter zsojka at seznam dot cz
` (5 preceding siblings ...)
2022-02-08 13:26 ` jakub at gcc dot gnu.org
@ 2022-02-08 19:15 ` cvs-commit at gcc dot gnu.org
2022-02-08 19:16 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-08 19:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102140
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:0c3e491a4e5ae74bfbed6d167d403d262b5a4adc
commit r12-7111-g0c3e491a4e5ae74bfbed6d167d403d262b5a4adc
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Feb 8 20:14:30 2022 +0100
rs6000: Fix up vspltis_shifted [PR102140]
The following testcase ICEs, because
(const_vector:V4SI [
(const_int 0 [0]) repeated x3
(const_int -2147483648 [0xffffffff80000000])
])
is recognized as valid easy_vector_constant in between split1 pass and
end of RA.
The problem is that such constants need to be split, and the only
splitter for that is:
(define_split
[(set (match_operand:VM 0 "altivec_register_operand")
(match_operand:VM 1 "easy_vector_constant_vsldoi"))]
"VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode) && can_create_pseudo_p ()"
There is only a single splitting pass before RA, so after that finishes,
if something gets matched in between that and end of RA (after that
can_create_pseudo_p () would be no longer true), it will never be
successfully split and we ICE at final.cc time or earlier.
The i386 backend (and a few others) already use
(cfun->curr_properties & PROP_rtl_split_insns)
as a test for split1 pass finished, so that some insns that should be split
during split1 and shouldn't be matched afterwards are properly guarded.
So, the following patch does that for vspltis_shifted too.
2022-02-08 Jakub Jelinek <jakub@redhat.com>
PR target/102140
* config/rs6000/rs6000.cc (vspltis_shifted): Return false also if
split1 pass has finished already.
* gcc.dg/pr102140.c: New test.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/102140] [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter
2021-08-31 6:47 [Bug target/102140] New: [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter zsojka at seznam dot cz
` (6 preceding siblings ...)
2022-02-08 19:15 ` cvs-commit at gcc dot gnu.org
@ 2022-02-08 19:16 ` jakub at gcc dot gnu.org
2022-02-19 8:02 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-02-08 19:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102140
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/102140] [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter
2021-08-31 6:47 [Bug target/102140] New: [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter zsojka at seznam dot cz
` (7 preceding siblings ...)
2022-02-08 19:16 ` jakub at gcc dot gnu.org
@ 2022-02-19 8:02 ` cvs-commit at gcc dot gnu.org
2022-05-10 8:23 ` cvs-commit at gcc dot gnu.org
2022-05-11 6:24 ` cvs-commit at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-19 8:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102140
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:bc87b6d859941794072c5a970174d22466eca33d
commit r11-9600-gbc87b6d859941794072c5a970174d22466eca33d
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Feb 8 20:14:30 2022 +0100
rs6000: Fix up vspltis_shifted [PR102140]
The following testcase ICEs, because
(const_vector:V4SI [
(const_int 0 [0]) repeated x3
(const_int -2147483648 [0xffffffff80000000])
])
is recognized as valid easy_vector_constant in between split1 pass and
end of RA.
The problem is that such constants need to be split, and the only
splitter for that is:
(define_split
[(set (match_operand:VM 0 "altivec_register_operand")
(match_operand:VM 1 "easy_vector_constant_vsldoi"))]
"VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode) && can_create_pseudo_p ()"
There is only a single splitting pass before RA, so after that finishes,
if something gets matched in between that and end of RA (after that
can_create_pseudo_p () would be no longer true), it will never be
successfully split and we ICE at final.cc time or earlier.
The i386 backend (and a few others) already use
(cfun->curr_properties & PROP_rtl_split_insns)
as a test for split1 pass finished, so that some insns that should be split
during split1 and shouldn't be matched afterwards are properly guarded.
So, the following patch does that for vspltis_shifted too.
2022-02-08 Jakub Jelinek <jakub@redhat.com>
PR target/102140
* config/rs6000/rs6000.c (vspltis_shifted): Return false also if
split1 pass has finished already.
* gcc.dg/pr102140.c: New test.
(cherry picked from commit 0c3e491a4e5ae74bfbed6d167d403d262b5a4adc)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/102140] [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter
2021-08-31 6:47 [Bug target/102140] New: [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter zsojka at seznam dot cz
` (8 preceding siblings ...)
2022-02-19 8:02 ` cvs-commit at gcc dot gnu.org
@ 2022-05-10 8:23 ` cvs-commit at gcc dot gnu.org
2022-05-11 6:24 ` cvs-commit at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-10 8:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102140
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:df8a6a1fcab38b9e4c5bcb8b9a39f847c18e9026
commit r10-10675-gdf8a6a1fcab38b9e4c5bcb8b9a39f847c18e9026
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Feb 8 20:14:30 2022 +0100
rs6000: Fix up vspltis_shifted [PR102140]
The following testcase ICEs, because
(const_vector:V4SI [
(const_int 0 [0]) repeated x3
(const_int -2147483648 [0xffffffff80000000])
])
is recognized as valid easy_vector_constant in between split1 pass and
end of RA.
The problem is that such constants need to be split, and the only
splitter for that is:
(define_split
[(set (match_operand:VM 0 "altivec_register_operand")
(match_operand:VM 1 "easy_vector_constant_vsldoi"))]
"VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode) && can_create_pseudo_p ()"
There is only a single splitting pass before RA, so after that finishes,
if something gets matched in between that and end of RA (after that
can_create_pseudo_p () would be no longer true), it will never be
successfully split and we ICE at final.cc time or earlier.
The i386 backend (and a few others) already use
(cfun->curr_properties & PROP_rtl_split_insns)
as a test for split1 pass finished, so that some insns that should be split
during split1 and shouldn't be matched afterwards are properly guarded.
So, the following patch does that for vspltis_shifted too.
2022-02-08 Jakub Jelinek <jakub@redhat.com>
PR target/102140
* config/rs6000/rs6000.c (vspltis_shifted): Return false also if
split1 pass has finished already.
* gcc.dg/pr102140.c: New test.
(cherry picked from commit 0c3e491a4e5ae74bfbed6d167d403d262b5a4adc)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/102140] [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter
2021-08-31 6:47 [Bug target/102140] New: [12 Regression] ICE: in extract_constrain_insn, at recog.c:2670 (insn does not satisfy its constraints) with -Og -fipa-cp -fno-tree-ccp -fno-tree-ter zsojka at seznam dot cz
` (9 preceding siblings ...)
2022-05-10 8:23 ` cvs-commit at gcc dot gnu.org
@ 2022-05-11 6:24 ` cvs-commit at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-11 6:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102140
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:8c9f4bafe532508904d4d16379d6882ddedac367
commit r9-10123-g8c9f4bafe532508904d4d16379d6882ddedac367
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Feb 8 20:14:30 2022 +0100
rs6000: Fix up vspltis_shifted [PR102140]
The following testcase ICEs, because
(const_vector:V4SI [
(const_int 0 [0]) repeated x3
(const_int -2147483648 [0xffffffff80000000])
])
is recognized as valid easy_vector_constant in between split1 pass and
end of RA.
The problem is that such constants need to be split, and the only
splitter for that is:
(define_split
[(set (match_operand:VM 0 "altivec_register_operand")
(match_operand:VM 1 "easy_vector_constant_vsldoi"))]
"VECTOR_UNIT_ALTIVEC_OR_VSX_P (<MODE>mode) && can_create_pseudo_p ()"
There is only a single splitting pass before RA, so after that finishes,
if something gets matched in between that and end of RA (after that
can_create_pseudo_p () would be no longer true), it will never be
successfully split and we ICE at final.cc time or earlier.
The i386 backend (and a few others) already use
(cfun->curr_properties & PROP_rtl_split_insns)
as a test for split1 pass finished, so that some insns that should be split
during split1 and shouldn't be matched afterwards are properly guarded.
So, the following patch does that for vspltis_shifted too.
2022-02-08 Jakub Jelinek <jakub@redhat.com>
PR target/102140
* config/rs6000/rs6000.c (vspltis_shifted): Return false also if
split1 pass has finished already.
* gcc.dg/pr102140.c: New test.
(cherry picked from commit 0c3e491a4e5ae74bfbed6d167d403d262b5a4adc)
^ permalink raw reply [flat|nested] 12+ messages in thread