On 08/31/2009 01:07 PM, Jean Christophe Beyler wrote:
If I replace this :
(define_insn "extzv"
[(set (match_operand 0 "register_operand" "")
(zero_extract (match_operand 1 "register_operand" "")
(match_operand 2 "const_int_operand" "")
(match_operand 3 "const_int_operand" "")))]
""
"")
Well, I can tell you that an insn pattern with no modes
on the non-immediate operands will definitely cause problems.
(insn 9 8 10 3 struct4.c:24 (set (subreg:DI (reg:QI 76) 0)
(zero_extract:DI (reg:DI 75)
(const_int 1 [0x1])
(const_int 0 [0x0]))) -1 (nil))
(insn 10 9 11 3 struct4.c:24 (set (reg:DI 77)
(zero_extend:DI (reg:QI 76))) -1 (nil))
Is there anything I can do to remove that zero_extend?
You could try either using a predicate that disallows
a subreg, or by having your expander rewrite things into
(set (reg:DI new-scratch))
(zero_extract:DI ...))
(set (reg:QI 76 (subreg:QI (reg:DI new scratch)))
and relying on subsequent passes to clean that up.
r~