OSDN Git Service

[X86] Artificially lower the complexity of the scalar ANDN patterns so that AND with...
authorCraig Topper <craig.topper@intel.com>
Mon, 5 Feb 2018 18:31:04 +0000 (18:31 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 5 Feb 2018 18:31:04 +0000 (18:31 +0000)
commit73cb5b8a646d3e3a964745c357a85195c13b0615
tree2727c709b3de184fd07dde81f0b5da90a2821e04
parent50b49991b4eb52e1a31f52d0c33dfb31b4a94aad
[X86] Artificially lower the complexity of the scalar ANDN patterns so that AND with immediate will match first.

This allows the immediate to folded into the and instead of being forced to move into a register. This can sometimes result in shorter encodings since the and can sign extend an immediate.

This also allows us to match an and to a movzx after a not.

This can cause an extra move if the input to the separate NOT has an additional user which requires a copy before the NOT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324260 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86InstrArithmetic.td
test/CodeGen/X86/avx512-schedule.ll
test/CodeGen/X86/bmi.ll
test/CodeGen/X86/pr32282.ll