There is not a lot of documentation on arith-cbz-fusion in llvm, other than it fuses between arithmetic instructions and cbz branches. It is not explained anywhere that I can find if that is meant to be the arithmetic instruction that defines the register and the cbz that uses it, or any old arithmetic instruction and the branch. The tests seem to suggest it should be the former, but the code only checks for the later.
This updates the code to fuse between the arithmetic instructions setting the register and the cbz using it.