On 10/28/2011 06:49 AM, Peter Bigot wrote: > I'm inclined to follow sparc's lead, but is one or another of the choices > more likely to help combine/reload/etc do a better job?
I don't know. In the case of RX, we don't model CC_REG until after reload, so combine really doesn't get a shot at it. Be careful here. If you explicitly model the carry flag before reload, you need to have an ADD instruction that can avoid any flags modification. Reload needs to generate such instructions in some cases, and needs to be able to insert them between any two arbitrary insns. If you're like sparc (separate add, addcc insns), or i386 (separate add, lea insns), then you're fine. If you're like m68k or RX and have only an add that clobbers the flags, then you'll have to delay splitting flags-using patterns until after reload is complete. r~