X86TargetLowering::LowerToBT

There’s a lot more on peephole optimization than I saw at first glance.
I think that’s where the proper solution is but I’d appreciate any help.