[Bug target/125238] [17 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: Segmentation fault since r17-397

2026-08-26 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125238

--- Comment #7 from GCC Commits  ---
The master branch has been updated by Richard Biener :

https://gcc.gnu.org/g:1350f98b4d54d10e0c5895e50729b1b5df8a54f5

commit r17-3667-g1350f98b4d54d10e0c5895e50729b1b5df8a54f5
Author: Richard Biener 
Date:   Wed Aug 26 10:30:22 2026 +0200

Adjust gcc.target/i386/pr125238.c

The testcase was added for an ICE caused by the x86 vector CSE
pass but after we hoist invariants after loop unswitching the
failure case no longer triggers and the CSE that the testcase
scans for does not happen.  The following removes the now failing
scan, keeping the testcase as compile-only for general coverage.

PR testsuite/125238
* gcc.target/i386/pr125238.c: Remove scan for
mpvabsq.

[Bug target/125238] [17 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: Segmentation fault since r17-397

2026-05-11 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125238

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Richard Biener  ---
Fixed I assume.

[Bug target/125238] [17 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: Segmentation fault since r17-397

2026-05-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125238

--- Comment #5 from GCC Commits  ---
The master branch has been updated by H.J. Lu :

https://gcc.gnu.org/g:ab10e6697f941d4c6a70242dcf1db1db84484113

commit r17-428-gab10e6697f941d4c6a70242dcf1db1db84484113
Author: H.J. Lu 
Date:   Sat May 9 20:58:11 2026 +0800

x86_cse: Convert vector load to constant integer load

Convert vector load:

(insn 14 465 412 3 (set (reg:SI 507 [ j_lsm.26 ])
(const_int 2 [0x2])) "foo.c":10:12 discrim 2 100 {*movsi_internal}
 (nil))
...
(insn 518 507 434 16 (set (reg:V2SI 493)
(reg:V2SI 517)) 2066 {*movv2si_internal}
 (nil))

to constant integer load:

(insn 566 55 56 6 (set (subreg:DI (reg:V2SI 517) 0)
(const_int 8589934594 [0x20002])) -1
 (nil))
...
(insn 518 507 434 16 (set (reg:V2SI 493)
(reg:V2SI 517)) 2066 {*movv2si_internal}
 (nil))

Tested on Linux/x86-64.

gcc/

PR target/125238
* config/i386/i386-features.cc (ix86_broadcast_inner): Set kind
to X86_CSE_CONST_VECTOR if the vector load can be converted to
constant integer load.

gcc/testsuite/

PR target/125238
* gcc.target/i386/pr125238.c: New test.

Signed-off-by: H.J. Lu 

[Bug target/125238] [17 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: Segmentation fault since r17-397

2026-05-09 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125238

H.J. Lu  changed:

   What|Removed |Added

  Attachment #64407|0   |1
is obsolete||

--- Comment #4 from H.J. Lu  ---
Created attachment 64410
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64410&action=edit
An updated patch

[Bug target/125238] [17 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: Segmentation fault since r17-397

2026-05-09 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125238
Bug 125238 depends on bug 125239, which changed state.

Bug 125239 Summary: [17 Regression] ICE on valid code at -O{2,3} with 
"-fno-tree-dse -fno-tree-dce" on x86_64-linux-gnu since r17-397
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125239

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

[Bug target/125238] [17 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: Segmentation fault since r17-397

2026-05-09 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125238

--- Comment #3 from H.J. Lu  ---
Created attachment 64407
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64407&action=edit
A patch

I am testing this.

[Bug target/125238] [17 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: Segmentation fault since r17-397

2026-05-09 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125238

H.J. Lu  changed:

   What|Removed |Added

   Last reconfirmed||2026-05-09
 Status|UNCONFIRMED |NEW
 Depends on||125239
 Ever confirmed|0   |1
   Assignee|unassigned at gcc dot gnu.org  |hjl.tools at gmail dot 
com


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125239
[Bug 125239] [17 Regression] ICE on valid code at -O{2,3} with "-fno-tree-dse
-fno-tree-dce" on x86_64-linux-gnu since r17-397

[Bug target/125238] [17 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: Segmentation fault since r17-397

2026-05-09 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125238

Sam James  changed:

   What|Removed |Added

Summary|[17 Regression] ICE on  |[17 Regression] ICE on
   |valid code at -O3 on|valid code at -O3 on
   |x86_64-linux-gnu:   |x86_64-linux-gnu:
   |Segmentation fault  |Segmentation fault since
   ||r17-397

--- Comment #2 from Sam James  ---
(In reply to Kael Franco from comment #1)
> https://gcc.gnu.org/git/?p=gcc.git;a=commit;
> h=12e4a2acda8da558010c9962f96b3167aee21072
> 
> called
> 
> "x86_cse: Add X86_CSE_CONST_VECTOR"

Thanks for bisecting. If you use contrib/git-descr.sh
12e4a2acda8da558010c9962f96b3167aee21072, it can be converted into a nice link:
r17-397-g12e4a2acda8da5

[Bug target/125238] [17 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: Segmentation fault

2026-05-09 Thread kaelfandrew at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125238

Kael Franco  changed:

   What|Removed |Added

 CC||kaelfandrew at gmail dot com

--- Comment #1 from Kael Franco  ---
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=12e4a2acda8da558010c9962f96b3167aee21072

called

"x86_cse: Add X86_CSE_CONST_VECTOR"

[Bug target/125238] [17 Regression] ICE on valid code at -O3 on x86_64-linux-gnu: Segmentation fault

2026-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125238

Drea Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |17.0
Summary|ICE on valid code at -O3 on |[17 Regression] ICE on
   |x86_64-linux-gnu:   |valid code at -O3 on
   |Segmentation fault  |x86_64-linux-gnu:
   ||Segmentation fault
   Priority|P3  |P1
 Target||x86_64
   Keywords||ice-on-valid-code