[X86] Use btc/btr/bts to implement xor/and/or that affects a single bit in the upper...
authorCraig Topper <craig.topper@intel.com>
Thu, 15 Feb 2018 19:57:35 +0000 (19:57 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 15 Feb 2018 19:57:35 +0000 (19:57 +0000)
commit2b2d8c5eb2629543b7a337af33b3331bccea8af1
tree3db137d194750f468bffcbca564f1df38bc8094e
parent543e8af99d8d4d529d89bde398f9eea809c9d712
[X86] Use btc/btr/bts to implement xor/and/or that affects a single bit in the upper 32-bits of a 64-bit operation.

We can't fold a large immediate into a 64-bit operation. But if we know we're only operating on a single bit we can use the bit instructions.

For now only do this for optsize.

Differential Revision: https://reviews.llvm.org/D37418

llvm-svn: 325287
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/lib/Target/X86/X86InstrCompiler.td
llvm/lib/Target/X86/X86InstrInfo.td