This is the mail archive of the gcc@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]

Re: paradoxical subreg problem


In message <10201281959.AA25855@vlsi1.ultra.nyu.edu>, Richard Kenner writes:
 > I think the code issue here is that if the bits are undefined, why is
 > this being generated?
Err, if the bits were undefined, then we can't make any assumptions about
their value.  Contrast that to how the compiler treats those bits -- it
treats them as "don't care, assume any useful value".

If the bits are undefined in the traditional sense, then this expression is
not a compile-time constant:

(eq (subreg:SI (mem/s:QI (plus:SI (reg:SI 3 %r3)
                (const_int 15 [0xf])) 1) 0)
    (mem/s:SI (plus:SI (reg:SI 3 %r3)
            (const_int 12 [0xc])) 1))


If the bits are undefined in the traditional sense, then these two expressions
are _NOT_ equivalent:

(and:SI (subreg:SI (mem:QI) 0) (const_int 255))

(subreg:SI (mem:QI X) 0)



jeff
jeff











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