[PATCH] D48606: [X86] Use bts/btr/btc for single bit set/clear/complement of a variable bit position

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 26 14:30:27 PDT 2018


craig.topper added a comment.

For the immediate case we prefer AND/OR/XOR because they have reciprocal throughput of 0.25 on Haswell and Skylake. BTR/BTS/BTC have a reciprocal throughput of 0.5. We had a discussion about what to do for 64-bit and/or/xor when the immediate larger than a 32-bit sign extended value and thus requries a movabsq. We currently use bts/btr/btc for those under optsize see x86-64-bittest-logic.lll


https://reviews.llvm.org/D48606





More information about the llvm-commits mailing list