[patch] inc/dec improvement on H8/300 and H8/S (revised)

Kazu Hirata kazu@hxi.com
Thu Jul 20 15:31:00 GMT 2000


Hi Jeff,

> Also note however, that not setting the cc bits can be 
> useful.  Consider if
> we had something like
> 
> 1 (set (reg X) (and (reg Y) (reg Z)))
> 2 (set (reg A) (plus (reg A) (const_int ))
> 3 (set (cc0) (reg X)))
> 
> If insn #2 was implemented with inc/dec instead of adds/subs 
> we wouldn't
> be able to eliminate the test at insn #3.
> 
> I have no idea which of the two scenarios is more common.

Actually, I have thought about that. I found the following in gcc's manual
under "Machine Descriptions/Defining Jump Instruction Patterns", but I don't
know what they mean by "until the end." The end of compilation? Until the
peephole?

"The reason you can do this is that GNU CC always generates a pair of
consecutive RTL insns, possibly separated by note insns, one to set the
condition code and one to test it, and keeps the pair inviolate until the
end."

Thanks,

Kazu Hirata


More information about the Gcc-patches mailing list