diff options
author | Michael Kuperstein <mkuper@google.com> | 2016-07-07 22:50:23 +0000 |
---|---|---|
committer | Michael Kuperstein <mkuper@google.com> | 2016-07-07 22:50:23 +0000 |
commit | 3e3652aef22e2b19e88d48bc9a19834745b910d1 (patch) | |
tree | 71f0b93019945f8bb8882c36e8fec0d8a3d7754e /llvm/lib/Target/X86/X86.h | |
parent | 0fdffd37095b5c5c405518d3fa651315a29a7dc5 (diff) | |
download | bcm5719-llvm-3e3652aef22e2b19e88d48bc9a19834745b910d1.tar.gz bcm5719-llvm-3e3652aef22e2b19e88d48bc9a19834745b910d1.zip |
Recommit r274692 - [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.
The original commit tried inserting an 8bit-subreg into a GR32 (not GR32_ABCD)
which was not appreciated by fast regalloc on 32-bit.
llvm-svn: 274802
Diffstat (limited to 'llvm/lib/Target/X86/X86.h')
-rw-r--r-- | llvm/lib/Target/X86/X86.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86.h b/llvm/lib/Target/X86/X86.h index 27b428e2151..23d6c7120a4 100644 --- a/llvm/lib/Target/X86/X86.h +++ b/llvm/lib/Target/X86/X86.h @@ -59,6 +59,9 @@ FunctionPass *createX86FixupLEAs(); /// recalculations. FunctionPass *createX86OptimizeLEAs(); +/// Return a pass that transforms setcc + movzx pairs into xor + setcc. +FunctionPass *createX86FixupSetCC(); + /// Return a pass that expands WinAlloca pseudo-instructions. FunctionPass *createX86WinAllocaExpander(); |