diff options
author | Michael Kuperstein <mkuper@google.com> | 2016-07-06 21:56:18 +0000 |
---|---|---|
committer | Michael Kuperstein <mkuper@google.com> | 2016-07-06 21:56:18 +0000 |
commit | 1ef6c59b1d2fe92dd842a68a037c34d5880e1460 (patch) | |
tree | 9d9225c98667736640ff47bca4951d7160e7267a /llvm/test/CodeGen/X86/cmp.ll | |
parent | 0a53fdf00cc42596e6354fbd2a3490defd0f6272 (diff) | |
download | bcm5719-llvm-1ef6c59b1d2fe92dd842a68a037c34d5880e1460.tar.gz bcm5719-llvm-1ef6c59b1d2fe92dd842a68a037c34d5880e1460.zip |
[X86] Transform setcc + movzbl into xorl + setcc
xorl + setcc is generally the preferred sequence due to the partial register
stall setcc + movzbl suffers from. As a bonus, it also encodes one byte smaller.
This fixes PR28146.
Differential Revision: http://reviews.llvm.org/D21774
llvm-svn: 274692
Diffstat (limited to 'llvm/test/CodeGen/X86/cmp.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/cmp.ll | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/X86/cmp.ll b/llvm/test/CodeGen/X86/cmp.ll index 94f7c54c285..d24f27ddf22 100644 --- a/llvm/test/CodeGen/X86/cmp.ll +++ b/llvm/test/CodeGen/X86/cmp.ll @@ -49,9 +49,9 @@ define i64 @test3(i64 %x) nounwind { %r = zext i1 %t to i64 ret i64 %r ; CHECK-LABEL: test3: +; CHECK: xorl %eax, %eax ; CHECK: testq %rdi, %rdi ; CHECK: sete %al -; CHECK: movzbl %al, %eax ; CHECK: ret } @@ -60,9 +60,9 @@ define i64 @test4(i64 %x) nounwind { %r = zext i1 %t to i64 ret i64 %r ; CHECK-LABEL: test4: +; CHECK: xorl %eax, %eax ; CHECK: testq %rdi, %rdi ; CHECK: setle %al -; CHECK: movzbl %al, %eax ; CHECK: ret } |