HomePhabricator

[X86] Use btc/btr/bts to implement xor/and/or that affects a single bit in the…

Authored by craig.topper on Feb 15 2018, 11:57 AM.

Description

[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