This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/14084] New: Reg allocator changes REG_EXPR


On ppc64 and probably all 64-bit big endian machines
global register allocator IMHO wrongly changes REG_EXPR of an "int" variable
stored in 64-bit when compiling attached testcase (even at -O0).

In the following example, repcount is a 32-bit "int" variable,
subreg:SI (reg:DI 118 [ repcount ]) 4)) is changed into
(reg:SI 0 0 [orig:118 repcount+4 ] [118]))

Note that repcount is only 4 bytes wide so offset 4 makes no sense.

lreg:

(insn 4 3 5 0 (set (reg:SI 119 [ repcount ])
        (subreg:SI (reg:DI 118 [ repcount ]) 4)) 303 {*movsi_internal1} (nil)
    (expr_list:REG_DEAD (reg:DI 118 [ repcount ])
        (nil))) 
                
greg:

(insn 4 3 5 0 (set (reg:SI 0 0 [orig:119 repcount ] [119])
        (reg:SI 0 0 [orig:118 repcount+4 ] [118])) 303 {*movsi_internal1} (nil)
    (nil))

This makes variable tracking think that there are two parts of that variable.

-- 
           Summary: Reg allocator changes REG_EXPR
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zlomek at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc64-unknown-linux
  GCC host triplet: powerpc64-unknown-linux
GCC target triplet: powerpc64-unknown-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14084


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]