This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: missing conditional propagation in cprop.c pass


> Unless there's something arch specific related to arm, insn 882 is a
> compare, which won't change r684. Why do you think 0 should
> propagated to r291 if r684 is not zero?
>

Thanks for replying.
Sorry if I misunderstood anything below, and please correct me.

insn 882          : cc <- compare (r684, 0)
jump_insn 883 : if (cc != 0) goto insn 46
insn 49            : r291 <- r684
......
insn 46

cc contains the result of subtracting 0 from r684;
control flow goes to insn_49 only if (cc == 0), which implies (r684 == 0).
Then at insn_49 we have conditional const propagation "r684 <- 0", is it right?

Thanks again.
-- 
Best Regards.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]