This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: paradoxical subreg problem
- From: law at redhat dot com
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 28 Jan 2002 13:12:39 -0700
- Subject: Re: paradoxical subreg problem
- Reply-to: law at redhat dot com
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