aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <jlaw@ventanamicro.com>2024-07-21 08:41:28 -0600
committerThomas Koenig <tkoenig@gcc.gnu.org>2024-07-28 19:05:43 +0200
commit3514d03e8ba53f76b672baf7935b0258ac9609b5 (patch)
treecfd015c6cf6f6a328d33a5fdf43b2054469c37be
parent81e528bfffa44566ca6c93aae4acb407144fd241 (diff)
downloadgcc-3514d03e8ba53f76b672baf7935b0258ac9609b5.zip
gcc-3514d03e8ba53f76b672baf7935b0258ac9609b5.tar.gz
gcc-3514d03e8ba53f76b672baf7935b0258ac9609b5.tar.bz2
[PR rtl-optimization/115877][2/n] Improve liveness computation for constant initialization
While debugging pr115877, I noticed we were failing to remove the destination register from LIVENOW bitmap when it was set to a constant value. ie (set (dest) (const_int)). This was a trivial oversight in safe_for_live_propagation. I don't have an example of this affecting code generation, but it certainly could. More importantly, by making LIVENOW more accurate it's easier to debug when LIVENOW differs from expectations. As with the prior patch this has been tested as part of a larger patchset with the crosses as well as individually on x86_64. Pushing to the trunk, PR rtl-optimization/115877 gcc/ * ext-dce.cc (safe_for_live_propagation): Handle RTX_CONST_OBJ.
-rw-r--r--gcc/ext-dce.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ext-dce.cc b/gcc/ext-dce.cc
index b4450e4..cbecfc5 100644
--- a/gcc/ext-dce.cc
+++ b/gcc/ext-dce.cc
@@ -69,6 +69,7 @@ safe_for_live_propagation (rtx_code code)
switch (GET_RTX_CLASS (code))
{
case RTX_OBJ:
+ case RTX_CONST_OBJ:
return true;
case RTX_COMPARE: