Analysis of high priority PR c/2454
Roger Sayle
roger@eyesopen.com
Tue Jul 2 11:03:00 GMT 2002
> It seems that there are three possible semantics: the extra bits are
> either don't care (or unknown), sign-extended, or zero-extended. What if
> these three cases were made explicit (by, say, adding an attribute)?
> Optimizations that don't care about the bits could just ignore this
> attribute; optimizations that do care would have to check it.
> But doing it that way might minimize the number of changes needed for
> robust operation.
A even simpler form of the above, would be to force all MD files to
contain zero extension and sign extension patterns. This allows
subreg to always mean undefined extra bits, and avoids having to
interpret pairs of shift operations as zero or sign extension.
The backend then has the opportunity to use either shift pairs or
LOAD_EXTEND_OP functionality to implement the required operation.
You'll notice that those backends that define zero and sign extension
insns, are unaffected by PR c/2454.
Roger
--
More information about the Gcc
mailing list