On Mon, 19 Dec 2022 at 05:20, Kito Cheng <kito.ch...@gmail.com> wrote: > > LGTM with a nit: > > ... > > + "TARGET_XTHEADBA > > + && (INTVAL (operands[2]) >= 0) && (INTVAL (operands[2]) <= 3)" > > IN_RANGE(INTVAL(operands[2]), 0, 3) > > and I am little bit suppress it can be zero
So was I, when reading the specification — and I reconfirmed that bit by checking with the folks at T-Head. We discussed this internally before submitting: while this case should never occur (as other pieces in the compiler are smart enough to simplify the RTX), we decided to include the 0 as it is an accurate reflection of the instruction semantics. Philipp. > > > + "th.addsl\t%0,%1,%3,%2" > > + [(set_attr "type" "bitmanip") > > + (set_attr "mode" "<X:MODE>")])