[AArch64][GlobalISel] Fold G_AND into G_BRCOND
When the G_BRCOND is fed by a eq or ne G_ICMP, it may be possible to fold a G_AND into the branch by producing a tbnz/tbz instead. This happens when 1. We have a ne/eq G_ICMP feeding into the G_BRCOND 2. The G_ICMP is a comparison against 0 3. One of the operands of the G_AND is a power of 2 constant This is very similar to the code in AArch64TargetLowering::LowerBR_CC. Add opt-and-tbnz-tbz to test this. Differential Revision: https://reviews.llvm.org/D73573
Loading
Please register or sign in to comment