]> git.ipfire.org Git - thirdparty/gcc.git/commit
ext-dce: Don't refine live width with SUBREG mode if !TRULY_NOOP_TRUNCATION_MODES_P...
authorXi Ruoyao <xry111@xry111.site>
Sun, 11 May 2025 08:44:31 +0000 (16:44 +0800)
committerXi Ruoyao <xry111@xry111.site>
Tue, 10 Jun 2025 04:09:14 +0000 (12:09 +0800)
commitba729e217add91ac919c06a51f00145249fbeb4b
treed8a47767b15d973a02325b976023095b2d06bdb4
parent62724eaf59b9a888cc27a4b1f9364ee4c5c5dbff
ext-dce: Don't refine live width with SUBREG mode if !TRULY_NOOP_TRUNCATION_MODES_P [PR 120050]

If we see a promoted subreg and TRULY_NOOP_TRUNCATION says the
truncation is not a noop, then all bits of the inner reg are live.  We
cannot reduce the live mask to that of the mode of the subreg.

gcc/ChangeLog:

PR rtl-optimization/120050
* ext-dce.cc (ext_dce_process_uses): Break early if a SUBREG in
rhs is promoted and the truncation from the inner mode to the
outer mode is not a noop when handling SETs.

(cherry picked from commit 65f3a439c4f76fe780a30ac66969f51035c4bf98)
gcc/ext-dce.cc