From 1ef6c59b1d2fe92dd842a68a037c34d5880e1460 Mon Sep 17 00:00:00 2001 From: Michael Kuperstein Date: Wed, 6 Jul 2016 21:56:18 +0000 Subject: [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 --- llvm/test/CodeGen/X86/cmp.ll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/test/CodeGen/X86/cmp.ll') 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 } -- cgit v1.2.3