This fixes a miscompilation in the AArch64 fast-isel which was triggered when a branch is based on an icmp with condition eq or ne, and type i1, i8 or i16. The cbz instruction compares the whole 32-bit register, so values with the bottom 1, 8 or 16 bits clear would cause the wrong branch to be taken.
thanks for catching this. I only have a minor comment inline.
It would be great if you also could optimize the i1 case by emitting a 'tbs' instead. Maybe in a separate commit?
Thanks and LGTM.
getValueType doesn't use kill flags - a simple 'true' will do here.
This case could be optimized to use tbz instead.