Sometimes ISel will generate RSB patterns for sequences that should be transformed into sbfx, instead of the usual shifts, and we end up generating a RSB and a UBFX. This adds some extra patterns to catch the other cases. The existing sbfx patterns are selected through ARMDAGToDAGISel::tryV6T2BitfieldExtractOp, but these tablegen patterns seem to work for these cases just fine. Helps especially in the MVE predication code.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Hello
That wouldn't help the MVE predicate case, which is what i was really after here. It is coming from a insert_vector_elt(extract_vector_elt(..)), where we generate a sign_extend_inreg, which is legalised to the rsb and the and. D67956 contains an alternative where we lower that using a LSL, SRA pair instead, which will then transform to the SBFX as desired.
I didn't see any other cases of this coming up in the tests I ran, so that alternative might be the simpler approach.