On 12/20/2010 12:43 PM, Claudiu Zissulescu wrote:
Hi,
Why don't you use a define_insn "zero_extendbisi2" which generates
your conversion instruction.
You're right that this should be a valid workaround, but Bingfeng
reported a bug indeed.
(zero_extend:SI (reg:BI 120))
should have been transformed to
(and:SI (subreg:SI (reg:BI 120) 0)
(const_int 1 [0xff]))
and
(subreg:QI (zero_extend:SI (reg:BI 120)) 0)
to
(and:QI (subreg:QI (reg:BI 120) 0)
(const_int 1 [0xff]))
That said, his observation that
Grep GET_MODE_PRECISION returns not many results.
... misses that GET_MODE_MASK will also return the correct value for
fractional integer modes. This macro has quite a few occurrences in
combine and elsewhere.
Paolo