diff options
author | Craig Topper <craig.topper@intel.com> | 2018-02-05 18:31:04 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-02-05 18:31:04 +0000 |
commit | 9a06f24704fc832931c2981d9ec4baa2ab895225 (patch) | |
tree | c1b836f0439392ff73f35047f6577ddb5ed047e1 /llvm/test/CodeGen/X86/bmi.ll | |
parent | c0f116e0607ea0da61128fb14806bd5e4230254f (diff) | |
download | bcm5719-llvm-9a06f24704fc832931c2981d9ec4baa2ab895225.tar.gz bcm5719-llvm-9a06f24704fc832931c2981d9ec4baa2ab895225.zip |
[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.
llvm-svn: 324260
Diffstat (limited to 'llvm/test/CodeGen/X86/bmi.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/bmi.ll | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/X86/bmi.ll b/llvm/test/CodeGen/X86/bmi.ll index 4da10f6cffa..0e79a5a65c1 100644 --- a/llvm/test/CodeGen/X86/bmi.ll +++ b/llvm/test/CodeGen/X86/bmi.ll @@ -188,8 +188,8 @@ define i1 @and_cmp4(i32 %x, i32 %y) { define i1 @and_cmp_const(i32 %x) { ; CHECK-LABEL: and_cmp_const: ; CHECK: # %bb.0: -; CHECK-NEXT: movl $43, %eax -; CHECK-NEXT: andnl %eax, %edi, %eax +; CHECK-NEXT: notl %edi +; CHECK-NEXT: andl $43, %edi ; CHECK-NEXT: sete %al ; CHECK-NEXT: retq %and = and i32 %x, 43 |