As in https://godbolt.org/z/4dafd9Geq, the icmp from an and may use an ands to set flags, meaning the icmp is free.
This could also be done for add/sub, but those patterns often happen in the induction variable of a loop, making them quite performance sensitive.