Hi! On Thu, Apr 02, 2020 at 11:53:47AM -0700, Richard Henderson wrote: > The rtl description of signed/unsigned overflow from subtract > was fine, as far as it goes -- we have CC_Cmode and CC_Vmode > that indicate that only those particular bits are valid. > > However, it's not clear how to extend that description to > handle signed comparison, where N == V (GE) N != V (LT) are > the only valid bits. > > Using an UNSPEC means that we can unify all 3 usages without > fear that combine will try to infer anything from the rtl. > It also means we need far fewer variants when various inputs > have constants propagated in, and the rtl folds. > > Accept -1 for the second input by using ADCS.
If you use an unspec anyway, why do you need a separate UNSPEC_SBCS? It is just the same as UNSPEC_ADCS, with one of the inputs inverted? Is there any reason to pretend borrows are different from carries? Segher