[gcc r17-3560] forwprop: Fix underlying type of long_mul_kind and long_mul_extract

Andrea Pinski via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:0eeecd403f81fce28daca37cdeffce3534ff85c4

commit r17-3560-g0eeecd403f81fce28daca37cdeffce3534ff85c4
Author: Andrea Pinski <[email protected]>
Date:   Sat Aug 22 19:24:26 2026 -0700

    forwprop: Fix underlying type of long_mul_kind and long_mul_extract
    
    Fixing the underyling type can safe some space slightly.  Since
    these enums are less than 8bit in its usage fix the underlying type
    to unsigned char.
    
    Pushed as obvious after bootstrap/test on x86_64-linux-gnu.
    
    gcc/ChangeLog:
    
            * tree-ssa-forwprop.cc (enum long_mul_kind): Fix to unsigned char.
            (enum long_mul_extract): Likewise.
    
    Signed-off-by: Andrea Pinski <[email protected]>

Diff:
---
 gcc/tree-ssa-forwprop.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc
index 23a50decab11..ff10baf10193 100644
--- a/gcc/tree-ssa-forwprop.cc
+++ b/gcc/tree-ssa-forwprop.cc
@@ -3732,7 +3732,7 @@ static constexpr unsigned LONG_MUL_MAX_EXTRAS = 4;
 
 namespace {
 
-enum long_mul_kind {
+enum long_mul_kind : unsigned char {
   LMK_MUL_HIHI,
   LMK_MUL_LOLO,
   LMK_MUL_HILO,
@@ -3752,7 +3752,7 @@ enum long_mul_kind {
    match.pd pattern bakes the lshift in, so the leaf is already the
    complete carry expression.  */
 
-enum long_mul_extract {
+enum long_mul_extract : unsigned char  {
   LMX_NONE,
   LMX_HI,
   LMX_LO,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.