summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/cmov.ll
diff options
context:
space:
mode:
authorMichael Kuperstein <mkuper@google.com>2016-07-06 21:56:18 +0000
committerMichael Kuperstein <mkuper@google.com>2016-07-06 21:56:18 +0000
commit1ef6c59b1d2fe92dd842a68a037c34d5880e1460 (patch)
tree9d9225c98667736640ff47bca4951d7160e7267a /llvm/test/CodeGen/X86/cmov.ll
parent0a53fdf00cc42596e6354fbd2a3490defd0f6272 (diff)
downloadbcm5719-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/cmov.ll')
-rw-r--r--llvm/test/CodeGen/X86/cmov.ll4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/X86/cmov.ll b/llvm/test/CodeGen/X86/cmov.ll
index f2f36b15d0c..9acc9ea4fb1 100644
--- a/llvm/test/CodeGen/X86/cmov.ll
+++ b/llvm/test/CodeGen/X86/cmov.ll
@@ -120,8 +120,8 @@ declare i32 @printf(i8* nocapture, ...) nounwind
define i32 @test5(i32* nocapture %P) nounwind readonly {
entry:
; CHECK-LABEL: test5:
+; CHECK: xorl %eax, %eax
; CHECK: setg %al
-; CHECK: movzbl %al, %eax
; CHECK: orl $-2, %eax
; CHECK: ret
@@ -134,8 +134,8 @@ entry:
define i32 @test6(i32* nocapture %P) nounwind readonly {
entry:
; CHECK-LABEL: test6:
+; CHECK: xorl %eax, %eax
; CHECK: setl %al
-; CHECK: movzbl %al, %eax
; CHECK: leal 4(%rax,%rax,8), %eax
; CHECK: ret
%0 = load i32, i32* %P, align 4 ; <i32> [#uses=1]
OpenPOWER on IntegriCloud