On 02/07/2016 10:58 AM, Michael Collison wrote:
Richard,
One other question on the patch. I note that when you expand the addv and uaddv
patterns you emit rtl using gen_add<mode>3_compareV and en_add<mode>3_compareC
respectively. These patterns use sign_extend and zero_extend respectively. Why
do you not do the same thing for the subv and usubv patterns? The subv patterns
expand into calls to gen_sub<mode>3_compare1 which does not emit sign or zero
extends. Why the difference?
The canonical "compare" is a subtraction. Thus if we want the flag bits off of
a subtraction, we only need issue a compare.
We only have to do something special if the flag bits aren't the same as a
subtract. E.g. for addition, where the carry and overflow flags are
(logically) reversed from that of subtraction.
r~