OSDN Git Service

[X86] Transform setcc + movzbl into xorl + setcc
authorMichael Kuperstein <mkuper@google.com>
Wed, 6 Jul 2016 21:56:18 +0000 (21:56 +0000)
committerMichael Kuperstein <mkuper@google.com>
Wed, 6 Jul 2016 21:56:18 +0000 (21:56 +0000)
commitd5975bb7dad17cb6894705d8abcbabc53470a0c0
tree3435e214db51a4d7c89f62d80a7d7d5e8d024c7e
parent55c8c00ac7f58666c08f57a48c0325e80d86f0c9
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274692 91177308-0d34-0410-b5e6-96231b3b80d8
32 files changed:
lib/Target/X86/CMakeLists.txt
lib/Target/X86/X86.h
lib/Target/X86/X86FixupSetCC.cpp [new file with mode: 0644]
lib/Target/X86/X86TargetMachine.cpp
test/CodeGen/X86/2008-08-17-UComiCodeGenBug.ll
test/CodeGen/X86/2008-09-11-CoalescerBug2.ll
test/CodeGen/X86/avx-intrinsics-fast-isel.ll
test/CodeGen/X86/avx-intrinsics-x86.ll
test/CodeGen/X86/avx512-cmp.ll
test/CodeGen/X86/avx512-intrinsics.ll
test/CodeGen/X86/avx512-mask-op.ll
test/CodeGen/X86/bmi.ll
test/CodeGen/X86/cmov.ll
test/CodeGen/X86/cmp.ll
test/CodeGen/X86/cmpxchg-i1.ll
test/CodeGen/X86/cmpxchg-i128-i1.ll
test/CodeGen/X86/ctpop-combine.ll
test/CodeGen/X86/fp128-cast.ll
test/CodeGen/X86/fp128-compare.ll
test/CodeGen/X86/mcinst-lowering.ll
test/CodeGen/X86/return-ext.ll
test/CodeGen/X86/setcc-narrowing.ll
test/CodeGen/X86/setcc.ll
test/CodeGen/X86/sse-intrinsics-fast-isel.ll
test/CodeGen/X86/sse-intrinsics-x86.ll
test/CodeGen/X86/sse2-intrinsics-fast-isel.ll
test/CodeGen/X86/sse2-intrinsics-x86.ll
test/CodeGen/X86/sse41-intrinsics-fast-isel.ll
test/CodeGen/X86/sse41-intrinsics-x86.ll
test/CodeGen/X86/sse41.ll
test/CodeGen/X86/sse42-intrinsics-fast-isel.ll
test/CodeGen/X86/sse42-intrinsics-x86.ll