Hi Richard, This is a really good improvement - I've built all of SPEC2017 without any issues. Overall it shows almost 3.0% codesize reduction with +cmpbr! I noticed that the patches slightly increase codesize even without +cmpbr - not quite sure why.
So overall this looks OK for commit. Btw as a follow-on we'll need to check whether it makes sense to always use the new patterns, perhaps even using the standard immediate range. Then +cmpbr just emits a single instruction when possible. I also checked how often the aarch64_bcond_wide_imm pattern triggers - around 10 times, so in its current form it no longer works properly... Cheers, Wilco