* [Bug target/112523] [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139
2023-11-13 22:51 [Bug target/112523] New: [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 ro at gcc dot gnu.org
@ 2023-11-13 22:51 ` ro at gcc dot gnu.org
2023-11-13 22:52 ` ro at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ro at gcc dot gnu.org @ 2023-11-13 22:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112523
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/112523] [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139
2023-11-13 22:51 [Bug target/112523] New: [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 ro at gcc dot gnu.org
2023-11-13 22:51 ` [Bug target/112523] " ro at gcc dot gnu.org
@ 2023-11-13 22:52 ` ro at gcc dot gnu.org
2023-11-13 22:55 ` pinskia at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ro at gcc dot gnu.org @ 2023-11-13 22:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112523
--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
Created attachment 56578
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56578&action=edit
reduced testcase
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/112523] [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139
2023-11-13 22:51 [Bug target/112523] New: [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 ro at gcc dot gnu.org
2023-11-13 22:51 ` [Bug target/112523] " ro at gcc dot gnu.org
2023-11-13 22:52 ` ro at gcc dot gnu.org
@ 2023-11-13 22:55 ` pinskia at gcc dot gnu.org
2023-11-13 22:55 ` pinskia at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-13 22:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112523
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Rainer Orth from comment #0)
> Between 20231110 and 20231123, Solaris/x86 bootstrap got broken: both the 32
> and 64-bit libgcc/unwind-dw2.c and unwind-dw2-fde-dip.c cause an ICE:
What stage does the ICE show up at? after stage 1 or stage 2?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/112523] [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139
2023-11-13 22:51 [Bug target/112523] New: [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 ro at gcc dot gnu.org
` (2 preceding siblings ...)
2023-11-13 22:55 ` pinskia at gcc dot gnu.org
@ 2023-11-13 22:55 ` pinskia at gcc dot gnu.org
2023-11-13 22:56 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-13 22:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112523
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=112518
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I suspect PR 112518 was also caused by that same commit too.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/112523] [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139
2023-11-13 22:51 [Bug target/112523] New: [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 ro at gcc dot gnu.org
` (3 preceding siblings ...)
2023-11-13 22:55 ` pinskia at gcc dot gnu.org
@ 2023-11-13 22:56 ` ro at CeBiTec dot Uni-Bielefeld.DE
2023-11-13 23:19 ` [Bug target/112523] [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 during bootstrap since r14-5385-g0a140730c97087 redi at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2023-11-13 22:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112523
--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> (In reply to Rainer Orth from comment #0)
>> Between 20231110 and 20231123, Solaris/x86 bootstrap got broken: both the 32
>> and 64-bit libgcc/unwind-dw2.c and unwind-dw2-fde-dip.c cause an ICE:
>
> What stage does the ICE show up at? after stage 1 or stage 2?
Ah, I forgot: building the stage 2 libgcc; stage 1 is fine.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/112523] [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 during bootstrap since r14-5385-g0a140730c97087
2023-11-13 22:51 [Bug target/112523] New: [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 ro at gcc dot gnu.org
` (4 preceding siblings ...)
2023-11-13 22:56 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2023-11-13 23:19 ` redi at gcc dot gnu.org
2023-11-14 6:31 ` sjames at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2023-11-13 23:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112523
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This also caused some new libstdc++ FAILs:
FAIL: 20_util/duration/io.cc -std=gnu++20 execution test
FAIL: 20_util/to_chars/1.cc -std=gnu++17 execution test
For the first one the failure is:
/home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/20_util/duration/io.cc:62:
void test_format(): Assertion 's == "01:23:45 = 01:23:45"' failed.
The string s contains "01:00:45 = 01:23:45" instead of the expected contents.
Reverting 0a140730c970870a5125beb1114f6c01679a040e fixes both FAILs.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/112523] [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 during bootstrap since r14-5385-g0a140730c97087
2023-11-13 22:51 [Bug target/112523] New: [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 ro at gcc dot gnu.org
` (5 preceding siblings ...)
2023-11-13 23:19 ` [Bug target/112523] [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 during bootstrap since r14-5385-g0a140730c97087 redi at gcc dot gnu.org
@ 2023-11-14 6:31 ` sjames at gcc dot gnu.org
2023-11-14 9:21 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-11-14 6:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112523
Sam James <sjames at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-11-14
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #6 from Sam James <sjames at gcc dot gnu.org> ---
Confirming via
https://inbox.sourceware.org/gcc-regression/20231114032959.06B94180042@gnu-snb-1.sc.intel.com/T/#u
and jwakely's comment.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/112523] [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 during bootstrap since r14-5385-g0a140730c97087
2023-11-13 22:51 [Bug target/112523] New: [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 ro at gcc dot gnu.org
` (6 preceding siblings ...)
2023-11-14 6:31 ` sjames at gcc dot gnu.org
@ 2023-11-14 9:21 ` jakub at gcc dot gnu.org
2023-11-14 10:19 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-11-14 9:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112523
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Trying now
2023-11-14 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.md (<insn><dwi>3_doubleword_lowpart): Move
operands[1] aka low part of input rather than operands[3] aka high
part of input to output if not the same register.
--- gcc/config/i386/i386.md.jj 2023-11-14 08:10:18.932549803 +0100
+++ gcc/config/i386/i386.md 2023-11-14 09:31:05.565019207 +0100
@@ -14825,8 +14825,8 @@ (define_insn_and_split "<insn><dwi>3_dou
{
split_double_mode (<DWI>mode, &operands[1], 1, &operands[1], &operands[3]);
operands[4] = GEN_INT ((<MODE_SIZE> * BITS_PER_UNIT) - INTVAL
(operands[2]));
- if (!rtx_equal_p (operands[0], operands[3]))
- emit_move_insn (operands[0], operands[3]);
+ if (!rtx_equal_p (operands[0], operands[1]))
+ emit_move_insn (operands[0], operands[1]);
})
(define_insn "x86_64_shrd"
if it fixes this.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/112523] [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 during bootstrap since r14-5385-g0a140730c97087
2023-11-13 22:51 [Bug target/112523] New: [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 ro at gcc dot gnu.org
` (7 preceding siblings ...)
2023-11-14 9:21 ` jakub at gcc dot gnu.org
@ 2023-11-14 10:19 ` ro at CeBiTec dot Uni-Bielefeld.DE
2023-11-14 10:22 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2023-11-14 10:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112523
--- Comment #8 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Trying now
> 2023-11-14 Jakub Jelinek <jakub@redhat.com>
>
> * config/i386/i386.md (<insn><dwi>3_doubleword_lowpart): Move
> operands[1] aka low part of input rather than operands[3] aka high
> part of input to output if not the same register.
[...]
> if it fixes this.
With this patch, I could complete a i386-pc-solaris2.11 bootstrap (C/C++
only).
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/112523] [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 during bootstrap since r14-5385-g0a140730c97087
2023-11-13 22:51 [Bug target/112523] New: [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 ro at gcc dot gnu.org
` (8 preceding siblings ...)
2023-11-14 10:19 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2023-11-14 10:22 ` jakub at gcc dot gnu.org
2023-11-14 10:27 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-11-14 10:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112523
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
My i686-linux bootstrap also finished with that patch (failed without it), but
regtest is still pending (and x86_64-linux bootstrap is ongoing too).
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/112523] [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 during bootstrap since r14-5385-g0a140730c97087
2023-11-13 22:51 [Bug target/112523] New: [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 ro at gcc dot gnu.org
` (9 preceding siblings ...)
2023-11-14 10:22 ` jakub at gcc dot gnu.org
@ 2023-11-14 10:27 ` redi at gcc dot gnu.org
2023-11-14 12:20 ` cvs-commit at gcc dot gnu.org
2023-11-14 16:58 ` pinskia at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2023-11-14 10:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112523
--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The patch fixes the libstdc++ tests too.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/112523] [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 during bootstrap since r14-5385-g0a140730c97087
2023-11-13 22:51 [Bug target/112523] New: [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 ro at gcc dot gnu.org
` (10 preceding siblings ...)
2023-11-14 10:27 ` redi at gcc dot gnu.org
@ 2023-11-14 12:20 ` cvs-commit at gcc dot gnu.org
2023-11-14 16:58 ` pinskia at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-14 12:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112523
--- Comment #11 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:aad65285a1c681feb9fc5b041c86d841b24c3d2a
commit r14-5442-gaad65285a1c681feb9fc5b041c86d841b24c3d2a
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Nov 14 13:19:48 2023 +0100
i386: Fix up <insn><dwi>3_doubleword_lowpart [PR112523]
On Sun, Nov 12, 2023 at 09:03:42PM -0000, Roger Sayle wrote:
> This patch improves register pressure during reload, inspired by PR
97756.
> Normally, a double-word right-shift by a constant produces a double-word
> result, the highpart of which is dead when followed by a truncation.
> The dead code calculating the high part gets cleaned up post-reload, so
> the issue isn't normally visible, except for the increased register
> pressure during reload, sometimes leading to odd register assignments.
> Providing a post-reload splitter, which clobbers a single wordmode
> result register instead of a doubleword result register, helps (a bit).
Unfortunately this broke bootstrap on i686-linux, broke all ACATS tests
on x86_64-linux as well as miscompiled e.g. __floattisf in libgcc there
as well.
The bug is that shrd{l,q} instruction expects the low part of the input
to be the same register as the output, rather than the high part as the
patch implemented.
split_double_mode (<DWI>mode, &operands[1], 1, &operands[1],
&operands[3]);
sets operands[1] to the lo_half and operands[3] to the hi_half, so if
operands[0] is not the same register as operands[1] (rather than [3]) after
RA, we should during splitting move operands[1] into operands[0].
Your testcase:
> #define MASK60 ((1ul << 60) - 1)
> unsigned long foo (__uint128_t n)
> {
> unsigned long a = n & MASK60;
> unsigned long b = (n >> 60);
> b = b & MASK60;
> unsigned long c = (n >> 120);
> return a+b+c;
> }
still has the same number of instructions.
Bootstrapped/regtested on x86_64-linux (where it e.g. turns
=== acats Summary ===
-# of unexpected failures 2328
+# of expected passes 2328
+# of unexpected failures 0
and fixes gcc.dg/torture/fp-int-convert-*timode.c FAILs as well)
and i686-linux (where it previously didn't bootstrap, but compared to
Friday evening's bootstrap the testresults are ok).
2023-11-14 Jakub Jelinek <jakub@redhat.com>
PR target/112523
PR ada/112514
* config/i386/i386.md (<insn><dwi>3_doubleword_lowpart): Move
operands[1] aka low part of input rather than operands[3] aka high
part of input to output if not the same register.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/112523] [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 during bootstrap since r14-5385-g0a140730c97087
2023-11-13 22:51 [Bug target/112523] New: [14 regression] ICE in ipa_push_agg_values_from_jfunc, at ipa-cp.cc:2139 ro at gcc dot gnu.org
` (11 preceding siblings ...)
2023-11-14 12:20 ` cvs-commit at gcc dot gnu.org
@ 2023-11-14 16:58 ` pinskia at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-14 16:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112523
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 14+ messages in thread