OSDN Git Service

[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)
commit37496d05582c786c22c4fa2447fddb0308b7213e
tree02d888019d3b05b772029ca120e0955d87af5046
parentadf9928ba42a0a6341d09b99c1ba973b60c7411b
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325287 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86InstrCompiler.td
lib/Target/X86/X86InstrInfo.td